Language models

English is built into prose; the English tagger uses the Penn Treebank tag set and the entity model is English only. Each language below is a package under tag/lang and segment/lang, linked only when imported.

Each tagging model is an averaged perceptron trained on the Universal Dependencies treebanks named here, emitting the universal tag set. Accuracy is measured on the treebank's own development and test sections through the production tagger, so it is what a caller of tag.ForLanguage gets on text of that kind.

LanguageCodeTraining dataLicenseDevTestSize
Danishda UD_Danish-DDTCC BY-SA 4.094.22%94.23%0.8 MB
Germande UD_German-GSD, UD_German-HDTCC BY-SA 4.094.49%94.92%4.3 MB
Englishen UD_English-EWTCC BY-SA 4.093.36%93.44%1.9 MB
Spanishes UD_Spanish-AnCora, UD_Spanish-GSDCC BY 4.0, CC BY-SA 4.097.74%97.68%2.0 MB
Finnishfi UD_Finnish-TDTCC BY-SA 4.092.61%92.71%1.8 MB
Frenchfr UD_French-GSDCC BY-SA 4.097.00%96.67%1.6 MB
Italianit UD_Italian-MarkIT, UD_Italian-PUD, UD_Italian-ValicoCC BY 4.0, CC BY-SA 3.0, CC BY-SA 4.092.57%92.42%0.6 MB
Norwegian Bokmålnb UD_Norwegian-BokmaalCC BY-SA 4.096.34%95.96%1.3 MB
Dutchnl UD_Dutch-AlpinoCC BY-SA 4.095.29%93.86%1.2 MB
Portuguesept UD_Portuguese-BosqueCC BY-SA 4.095.72%95.58%1.2 MB
Swedishsv UD_Swedish-TalbankenCC BY-SA 4.093.68%94.86%0.7 MB
Turkishtr UD_Turkish-BOUNCC BY-SA 4.089.72%90.93%1.4 MB

Training your own

cmd/train-tagger trains a model from any CoNLL-U treebank, and tag/lang/build.sh retrains every model above and rewrites this table.