spaCy/spacy/lang/uk/tokenizer_exceptions.py
Ines Montani db55577c45
Drop Python 2.7 and 3.5 (#4828)
* Remove unicode declarations

* Remove Python 3.5 and 2.7 from CI

* Don't require pathlib

* Replace compat helpers

* Remove OrderedDict

* Use f-strings

* Set Cython compiler language level

* Fix typo

* Re-add OrderedDict for Table

* Update setup.cfg

* Revert CONTRIBUTING.md

* Revert lookups.md

* Revert top-level.md

* Small adjustments and docs [ci skip]
2019-12-22 01:53:56 +01:00

25 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from ...symbols import ORTH, LEMMA, POS, NORM, NOUN
_exc = {}
for exc_data in [
{ORTH: "вул.", LEMMA: "вулиця", NORM: "вулиця", POS: NOUN},
{ORTH: "ім.", LEMMA: "ім'я", NORM: "імені", POS: NOUN},
{ORTH: "просп.", LEMMA: "проспект", NORM: "проспект", POS: NOUN},
{ORTH: "бул.", LEMMA: "бульвар", NORM: "бульвар", POS: NOUN},
{ORTH: "пров.", LEMMA: "провулок", NORM: "провулок", POS: NOUN},
{ORTH: "пл.", LEMMA: "площа", NORM: "площа", POS: NOUN},
{ORTH: "г.", LEMMA: "гора", NORM: "гора", POS: NOUN},
{ORTH: "п.", LEMMA: "пан", NORM: "пан", POS: NOUN},
{ORTH: "м.", LEMMA: "місто", NORM: "місто", POS: NOUN},
{ORTH: "проф.", LEMMA: "професор", NORM: "професор", POS: NOUN},
{ORTH: "акад.", LEMMA: "академік", NORM: "академік", POS: NOUN},
{ORTH: "доц.", LEMMA: "доцент", NORM: "доцент", POS: NOUN},
{ORTH: "оз.", LEMMA: "озеро", NORM: "озеро", POS: NOUN},
]:
_exc[exc_data[ORTH]] = [exc_data]
TOKENIZER_EXCEPTIONS = _exc