Serbian language code update "rs" -> "sr" (#4159)

* Serbian stopwords added. (cyrillic alphabet)

* spaCy Contribution agreement included.

* Test initialize updated

* Serbian language code update. --bugfix
This commit is contained in:
Pavle Vidanović 2019-08-21 19:57:37 +02:00 committed by Ines Montani
parent 8fe7bdd0fa
commit 4fe9329bfb
4 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ from ...util import update_exc, add_lookups
class SerbianDefaults(Language.Defaults): class SerbianDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters) lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
lex_attr_getters[LANG] = lambda text: "rs" lex_attr_getters[LANG] = lambda text: "sr"
lex_attr_getters[NORM] = add_lookups( lex_attr_getters[NORM] = add_lookups(
Language.Defaults.lex_attr_getters[NORM], BASE_NORMS Language.Defaults.lex_attr_getters[NORM], BASE_NORMS
) )
@ -21,7 +21,7 @@ class SerbianDefaults(Language.Defaults):
class Serbian(Language): class Serbian(Language):
lang = "rs" lang = "sr"
Defaults = SerbianDefaults Defaults = SerbianDefaults

View File

@ -10,8 +10,8 @@ from spacy.util import get_lang_class
# excluded: ja, ru, th, uk, vi, zh # excluded: ja, ru, th, uk, vi, zh
LANGUAGES = ["af", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en", "es", LANGUAGES = ["af", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en", "es",
"et", "fa", "fi", "fr", "ga", "he", "hi", "hr", "hu", "id", "is", "et", "fa", "fi", "fr", "ga", "he", "hi", "hr", "hu", "id", "is",
"it", "kn", "lt", "lv", "nb", "nl", "pl", "pt", "ro", "rs", "si", "it", "kn", "lt", "lv", "nb", "nl", "pl", "pt", "ro", "si", "sk",
"sk", "sl", "sq", "sv", "ta", "te", "tl", "tr", "tt", "ur"] "sl", "sq", "sr", "sv", "ta", "te", "tl", "tr", "tt", "ur"]
# fmt: on # fmt: on

View File

@ -127,7 +127,7 @@
{ "code": "is", "name": "Icelandic" }, { "code": "is", "name": "Icelandic" },
{ "code": "lt", "name": "Lithuanian" }, { "code": "lt", "name": "Lithuanian" },
{ "code": "lv", "name": "Latvian" }, { "code": "lv", "name": "Latvian" },
{ "code": "rs", "name": "Serbian" }, { "code": "sr", "name": "Serbian" },
{ "code": "sk", "name": "Slovak" }, { "code": "sk", "name": "Slovak" },
{ "code": "sl", "name": "Slovenian" }, { "code": "sl", "name": "Slovenian" },
{ {