mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 05:37:03 +03:00
cf52510631
* Add Amharic to space * clean up * Add some PRON_LEMMA * add Tigrinya support * remove text_noun_chunks * Tigrinya Support * added some more details for ti * fix unit test * add amharic char range * changes from review * amharic and tigrinya share same unicode block * get rid of _amharic/_tigrinya in char_classes Co-authored-by: Josiah Solomon <jsolomon@meteorcomm.com>
23 lines
593 B
Python
23 lines
593 B
Python
# coding: utf8
|
|
from __future__ import unicode_literals
|
|
|
|
from ..char_classes import LIST_PUNCT, LIST_ELLIPSES, LIST_QUOTES, CURRENCY
|
|
from ..char_classes import UNITS, ALPHA_UPPER
|
|
|
|
_list_punct = LIST_PUNCT + "፡ ። ፣ ፤ ፥ ፦ ፧".strip().split()
|
|
|
|
_suffixes = (
|
|
_list_punct
|
|
+ LIST_ELLIPSES
|
|
+ LIST_QUOTES
|
|
+ [
|
|
r"(?<=[0-9])\+",
|
|
# Tigrinya is written from Left-To-Right
|
|
r"(?<=[0-9])(?:{c})".format(c=CURRENCY),
|
|
r"(?<=[0-9])(?:{u})".format(u=UNITS),
|
|
r"(?<=[{au}][{au}])\.".format(au=ALPHA_UPPER),
|
|
]
|
|
)
|
|
|
|
TOKENIZER_SUFFIXES = _suffixes
|