mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 20:28:20 +03:00
a3efa3e8d9
* small hyphen clean up for French * catalan infix similar to french
16 lines
326 B
Python
16 lines
326 B
Python
# coding: utf8
|
||
from __future__ import unicode_literals
|
||
|
||
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
|