2020-07-22 20:18:46 +00:00
|
|
|
from ..tokenizer_exceptions import BASE_EXCEPTIONS
|
2019-02-20 21:10:13 +00:00
|
|
|
from ...symbols import ORTH, LEMMA
|
2020-07-22 20:18:46 +00:00
|
|
|
from ...util import update_exc
|
|
|
|
|
2019-02-20 21:10:13 +00:00
|
|
|
|
2020-03-25 10:28:02 +00:00
|
|
|
_exc = {
|
|
|
|
"all'art.": [{ORTH: "all'"}, {ORTH: "art."}],
|
|
|
|
"dall'art.": [{ORTH: "dall'"}, {ORTH: "art."}],
|
|
|
|
"dell'art.": [{ORTH: "dell'"}, {ORTH: "art."}],
|
|
|
|
"L'art.": [{ORTH: "L'"}, {ORTH: "art."}],
|
|
|
|
"l'art.": [{ORTH: "l'"}, {ORTH: "art."}],
|
|
|
|
"nell'art.": [{ORTH: "nell'"}, {ORTH: "art."}],
|
|
|
|
"po'": [{ORTH: "po'", LEMMA: "poco"}],
|
2020-03-25 11:28:12 +00:00
|
|
|
"sett..": [{ORTH: "sett."}, {ORTH: "."}],
|
2020-03-25 10:28:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for orth in [
|
|
|
|
"..",
|
|
|
|
"....",
|
|
|
|
"al.",
|
|
|
|
"all-path",
|
|
|
|
"art.",
|
|
|
|
"Art.",
|
|
|
|
"artt.",
|
|
|
|
"att.",
|
|
|
|
"by-pass",
|
|
|
|
"c.d.",
|
|
|
|
"centro-sinistra",
|
|
|
|
"check-up",
|
|
|
|
"Civ.",
|
|
|
|
"cm.",
|
|
|
|
"Cod.",
|
|
|
|
"col.",
|
|
|
|
"Cost.",
|
|
|
|
"d.C.",
|
2020-03-25 11:28:12 +00:00
|
|
|
'de"',
|
2020-03-25 10:28:02 +00:00
|
|
|
"distr.",
|
|
|
|
"E'",
|
|
|
|
"ecc.",
|
|
|
|
"e-mail",
|
|
|
|
"e/o",
|
|
|
|
"etc.",
|
|
|
|
"Jr.",
|
|
|
|
"n°",
|
|
|
|
"nord-est",
|
|
|
|
"pag.",
|
|
|
|
"Proc.",
|
|
|
|
"prof.",
|
|
|
|
"sett.",
|
|
|
|
"s.p.a.",
|
|
|
|
"ss.",
|
|
|
|
"St.",
|
|
|
|
"tel.",
|
|
|
|
"week-end",
|
|
|
|
]:
|
|
|
|
_exc[orth] = [{ORTH: orth}]
|
2019-02-20 21:10:13 +00:00
|
|
|
|
2020-07-22 20:18:46 +00:00
|
|
|
TOKENIZER_EXCEPTIONS = update_exc(BASE_EXCEPTIONS, _exc)
|