<commit_before>//- 💫 DOCS > USAGE > MODELS > LANGUAGE SUPPORT

p spaCy currently provides models for the following languages:

+table(["Language", "Code", "Language data", "Models"])
    for models, code in MODELS
        - var count = Object.keys(models).length
        +row
            +cell=LANGUAGES[code]
            +cell #[code=code]
            +cell
                +src(gh("spaCy", "spacy/lang/" + code)) #[code lang/#{code}]
            +cell
                +a("/models/" + code) #{count} #{(count == 1) ? "model" : "models"}

+h(3, "alpha-support") Alpha tokenization support

p
    |  Work has started on the following languages. You can help by
    |  #[+a("/usage/adding-languages#language-data") improving the existing language data]
    |  and extending the tokenization patterns.

+aside("Usage note")
    |  Note that the alpha languages don't yet come with a language model. In
    |  order to use them, you have to import them directly, or use
    |  #[+api("spacy#blank") #[code spacy.blank]]:

    +code.o-no-block.
        from spacy.lang.fi import Finnish
        nlp = Finnish()  # use directly
        nlp = spacy.blank('fi')  # blank instance

+table(["Language", "Code", "Language data"])
    for lang, code in LANGUAGES
        if !Object.keys(MODELS).includes(code)
            +row
                +cell #{LANGUAGES[code]}
                +cell #[code=code]
                +cell
                    +src(gh("spaCy", "spacy/lang/" + code)) #[code lang/#{code}]

+infobox("Dependencies")
    .o-block-small Some language tokenizers require external dependencies.<commit_msg>Sort languages alphabetically [ci skip]<commit_after>//- 💫 DOCS > USAGE > MODELS > LANGUAGE SUPPORT

p spaCy currently provides models for the following languages:

+table(["Language", "Code", "Language data", "Models"])
    for models, code in MODELS
        - var count = Object.keys(models).length
        +row
            +cell=LANGUAGES[code]
            +cell #[code=code]
            +cell
                +src(gh("spaCy", "spacy/lang/" + code)) #[code lang/#{code}]
            +cell
                +a("/models/" + code) #{count} #{(count == 1) ? "model" : "models"}

+h(3, "alpha-support") Alpha tokenization support

p
    |  Work has started on the following languages. You can help by
    |  #[+a("/usage/adding-languages#language-data") improving the existing language data]
    |  and extending the tokenization patterns.

+aside("Usage note")
    |  Note that the alpha languages don't yet come with a language model. In
    |  order to use them, you have to import them directly, or use
    |  #[+api("spacy#blank") #[code spacy.blank]]:

    +code.o-no-block.
        from spacy.lang.fi import Finnish
        nlp = Finnish()  # use directly
        nlp = spacy.blank('fi')  # blank instance

+table(["Language", "Code", "Language data"])
    - var sorted_langs = Object.assign({}, ...Object.keys(LANGUAGES).filter(key => !MODELS[key]).sort().map(key => ({ [key]: LANGUAGES[key] })))
    for lang, code in sorted_langs
        +row
            +cell #{LANGUAGES[code]}
            +cell #[code=code]
            +cell
                +src(gh("spaCy", "spacy/lang/" + code)) #[code lang/#{code}]

+infobox("Dependencies")
    .o-block-small Some language tokenizers require external dependencies.
{'fraction_non_alphanumeric': 0.14401928291654112, 'fraction_numerical': 0.0012051822838204278, 'mean_word_length': 2.550802139037433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5309469', 'n_tokens_mistral': 1040, 'n_tokens_neox': 1007, 'n_words': 304}