lingvo


License

License

GroupId

GroupId

org.mitre
ArtifactId

ArtifactId

lingvo_2.12
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

lingvo
lingvo
Project URL

Project URL

https://github.com/mitre/lingvo
Project Organization

Project Organization

org.mitre
Source Code Management

Source Code Management

https://github.com/mitre/lingvo

Download lingvo_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/org.mitre/lingvo_2.12/ -->
<dependency>
    <groupId>org.mitre</groupId>
    <artifactId>lingvo_2.12</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.mitre/lingvo_2.12/
implementation 'org.mitre:lingvo_2.12:0.1.0'
// https://jarcasting.com/artifacts/org.mitre/lingvo_2.12/
implementation ("org.mitre:lingvo_2.12:0.1.0")
'org.mitre:lingvo_2.12:jar:0.1.0'
<dependency org="org.mitre" name="lingvo_2.12" rev="0.1.0">
  <artifact name="lingvo_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.mitre', module='lingvo_2.12', version='0.1.0')
)
libraryDependencies += "org.mitre" % "lingvo_2.12" % "0.1.0"
[org.mitre/lingvo_2.12 "0.1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.5
com.beachape : enumeratum_2.12 jar 1.5.13
com.beachape : enumeratum-play-json_2.12 jar 1.5.13

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.5

Project Modules

There are no modules declared in this project.

lingvo Build Status

Lingvo is a package containing enumerations of various ISO codes related to language, including a considerable amount of the ISO 639-3 and ISO 15924 standards.

Lingvo enumerations are:

Type safe

Language codes used in programs are typically handled one of two ways:

  1. stringified representation
  2. closed-source enumerations of language codes

Both of these leave a lot to be desired. By using a stringified representation, a consumer needs to validate that a string is a valid code. By using made-to-order enumerations of ISO codes, a consumer is unlikely to be able to use these codes to consume results.

Lingvo hopes to remedy this by making the enumerations an open-source standard in which a non-existent ISO code is an invalid ISO code.

For example, consider the notional interface for a language identification tool:

import org.mitre.lingvo.languages.Iso639_3

trait LanguageIdentifier {
  def identify(text: String): Iso639_3
}

In this example, there is no way an invalid language code could be returned from the identification method: the returned value is strictly a valid Iso639_3 -- a consuming client does not need to worry about checking the validity.

JSON (de)serializable

Lingvo enumerations are JSON serializable using play-json. Because of this, lingvo enumerations can be used in web services.

import play.api.libs.json.Json
import org.mitre.lingvo.languages.Iso639_3 
println(Json.toJson(Iso639_3.English)) // {"value": "eng"}

As a dependency

sbt

libraryDependencies += "org.mitre" %% "lingvo" % "0.1.0"

Authors

Disclaimers

Approved for Public Release; Distribution Unlimited. Case Number 18-2247.

The authors' affiliations with the MITRE Corporation is provided for identification purposes only, and is not intended to convey or imply MITRE's concurrence with, or support for, the positions, opinions or viewpoints expressed by the authors.

Copyright © 2018, The MITRE Corporation. All rights reserved.

org.mitre

The MITRE Corporation

Open Source Software from the MITRE Corporation

Versions

Version
0.1.0