Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 2.23 KB

creating-dictionaries.md

File metadata and controls

64 lines (40 loc) · 2.23 KB

Creating / Contributing Dictionaries

There are two types of dictionaries. Programming / file-type dictionaries and natural language dictionaries.

Programming / File-type Dictionaries

Examples include TypeScript / JavaScript and Python.

These include keywords, common libraries, function names, and other words associated with that ecosystem.

Natural Language Dictionaries

Examples include English US.

Building from Hunspell

[TBD]

Dictionary Definition

field Description
name This is the name of the dictionary, it is good practice to have it match the locale, i.e. en_us or pt_br
path This is the relative path from the cspell-ext.json file to the dictionary .trie.gz files.
description This should be an easy to read description of the languages, i.e. British English Dictionary.
dictionaryInformation See Dictionary Information

Dictionary Information

See Dutch example: Dutch cspell.config.yaml.

field example Description
alphabet a-zA-Zé These are the letters of the Alphabet.
locale nl-NL This is the locale of the dictionary.
accents \u0300-\u0308 Accent characters.

Tips and Tricks

Using .yaml files.

Writing configuration in Yaml can be much easier than writing in JSON.

Just have the cspell-ext.json file import the Yaml file.

cspell-ext.json

{
  "import": ["./cspell.config.yaml"]
}

Viewing Suggestions

Example:

cspell suggestions -v words

Use --locale or --dictionary to limit the suggestions.