0.1.3 • Published 2 years ago

language-data v0.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

Language Data

Linguistic data especially useful for font designers: pangrams, sample sentences, character sets and metadata for the languages of the world. Extent and completeness of the data is limited, contributions are welcome!

Data structure

npm

Usage

Install from NPM or from GitHub:

npm i language-data

npm i hyvyys/language-data

ES6 module

import LanguageData from 'language-data';

const polish = LanguageData.find(l => l.language == 'Polish');
console.log(JSON.stringify(polish, null, 2));

CommonJS (Node.js)

const LanguageData = require('./dist');

const polish = LanguageData.find(l => l.language == 'Polish');
console.log(JSON.stringify(polish, null, 2));

Result

{
  "language": "Polish",
  "region": "European",
  "speakers": 40000000,
  "pangrams": [
    "Koń i żółw grali w kości z piękną ćmą u źródła."
  ],
  "letterings": [
    "Aerofłot Bóbr Część Ćmić Dyndasz Ernest Farfocel Gringo Hochsztapler Irbis Jajko Krokus
     Lalka Łękotka Mąkami Nanizać Obrok Ósemka Poprzestań Quiz Rzeżączka Schniesz Świąt Tarty
     Uzurpator Victoria Warszawa Xero Yeti Złorzeczyć Źrebak Żółtko"
  ],
  "gotchas": [
    {
      "topic": "łł",
      "tags": [
        "metrics"
      ],
      "description": "The łł combination an sometimes produces a busy area. A spacing, kerning or ligature solution is possible should the problem arise.",
      "tests": [
        "Kołłątaj Piłka Ełk Półkole Półton PÓŁTON Radziwiłłów"
      ]
    }
  ],
  "specialCharacters": "Ą ą Ć ć Ę ę Ł ł Ń ń Ó ó Ś ś Ź ź Ż ż",
  "htmlTag": "pl",
  "opentypeTag": "PLK",
  "script": "Latn",
  "scriptName": "Latin",
  "sentences": [],
  "paragraphs": [],
  "smallcaps": [],
  "alphabet": "A a Ą ą B b C c Ć ć D d E e Ę ę F f G g H h I i J j K k L l Ł ł M m N n Ń ń O o Ó ó P p Q q R r S s Ś ś T t U u V v W w X x Y y Z z Ź ź Ż ż",
  "optionalCharacters": "",
  "optionalCharactersNote": ""
}

Custom JSON

The data is exported as a JSON file in /dist/language-data.json.

If you want a file limited to the data you're interested in, you can build it yourself. Clone the repository, install dependencies npm i, and build it npm run build -- [fields] where [fields] is a space-delimited list of fields you want to include, e.g.:

npm run build -- script speakers pangrams

The list of available fields with their descriptions is in /dist/README.md.

Roadmap

0.1.3

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

4 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago