mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-16 06:37:04 +03:00
13 lines
270 B
Python
13 lines
270 B
Python
|
from ..punctuation import TOKENIZER_INFIXES
|
|||
|
from ..char_classes import ALPHA
|
|||
|
|
|||
|
|
|||
|
ELISION = " ' ’ ".strip().replace(" ", "").replace("\n", "")
|
|||
|
|
|||
|
|
|||
|
_infixes = TOKENIZER_INFIXES + [
|
|||
|
r"(?<=[{a}][{el}])(?=[{a}])".format(a=ALPHA, el=ELISION)
|
|||
|
]
|
|||
|
|
|||
|
TOKENIZER_INFIXES = _infixes
|