forked from explosion/spaCy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up and fix small bugs and typos
- Loading branch information
Showing
47 changed files
with
750 additions
and
932 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
# coding: utf8 | ||
from __future__ import unicode_literals | ||
from ..char_classes import LIST_ELLIPSES, LIST_ICONS | ||
from ..char_classes import QUOTES, ALPHA, ALPHA_LOWER, ALPHA_UPPER | ||
_quotes = QUOTES.replace("'", '') | ||
_infixes = (LIST_ELLIPSES + LIST_ICONS + | ||
[r'(?<=[{}])\.(?=[{}])'.format(ALPHA_LOWER, ALPHA_UPPER), | ||
r'(?<=[{a}])[,!?](?=[{a}])'.format(a=ALPHA), | ||
r'(?<=[{a}"])[:<>=](?=[{a}])'.format(a=ALPHA), | ||
r'(?<=[{a}]),(?=[{a}])'.format(a=ALPHA), | ||
r'(?<=[{a}])([{q}\)\]\(\[])(?=[\{a}])'.format(a=ALPHA, q=_quotes), | ||
r'(?<=[{a}])--(?=[{a}])'.format(a=ALPHA)]) | ||
|
||
from ..char_classes import LIST_ELLIPSES, CONCAT_ICONS | ||
from ..char_classes import CONCAT_QUOTES, ALPHA, ALPHA_LOWER, ALPHA_UPPER | ||
|
||
_quotes = CONCAT_QUOTES.replace("'", "") | ||
|
||
_infixes = ( | ||
LIST_ELLIPSES | ||
+ [CONCAT_ICONS] | ||
+ [ | ||
r"(?<=[{al}])\.(?=[{au}])".format(al=ALPHA_LOWER, au=ALPHA_UPPER), | ||
r"(?<=[{a}])[,!?](?=[{a}])".format(a=ALPHA), | ||
r"(?<=[{a}])[:<>=](?=[{a}])".format(a=ALPHA), | ||
r"(?<=[{a}])--(?=[{a}])".format(a=ALPHA), | ||
r"(?<=[{a}]),(?=[{a}])".format(a=ALPHA), | ||
r"(?<=[{a}])([{q}\)\]\(\[])(?=[\-{a}])".format(a=ALPHA, q=CONCAT_QUOTES), | ||
] | ||
) | ||
|
||
TOKENIZER_INFIXES = _infixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.