2018-07-25 00:47:23 +00:00
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2018-08-07 09:26:31 +00:00
|
|
|
from ...symbols import *
|
2018-07-25 00:47:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
TOKENIZER_EXCEPTIONS = {
|
|
|
|
"Jan.": [
|
|
|
|
{ORTH: "Jan.", LEMMA: "January"}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# exceptions mapped to a single token containing only ORTH property
|
|
|
|
# example: {"string": [{ORTH: "string"}]}
|
|
|
|
# converted using strings_to_exc() util
|
|
|
|
|
|
|
|
ORTH_ONLY = [
|
|
|
|
"a.",
|
|
|
|
"b.",
|
|
|
|
"c.",
|
|
|
|
"d.",
|
|
|
|
"e.",
|
|
|
|
"f.",
|
|
|
|
"g.",
|
|
|
|
"h.",
|
|
|
|
"i.",
|
|
|
|
"j.",
|
|
|
|
"k.",
|
|
|
|
"l.",
|
|
|
|
"m.",
|
|
|
|
"n.",
|
|
|
|
"o.",
|
|
|
|
"p.",
|
|
|
|
"q.",
|
|
|
|
"r.",
|
|
|
|
"s.",
|
|
|
|
"t.",
|
|
|
|
"u.",
|
|
|
|
"v.",
|
|
|
|
"w.",
|
|
|
|
"x.",
|
|
|
|
"y.",
|
|
|
|
"z."
|
|
|
|
]
|