2016-12-18 15:54:19 +00:00
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from ..symbols import *
|
2016-12-23 20:35:03 +00:00
|
|
|
from ..language_data import PRON_LEMMA, DET_LEMMA
|
2016-12-18 15:54:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
TOKENIZER_EXCEPTIONS = {
|
|
|
|
"al": [
|
2016-12-21 17:06:17 +00:00
|
|
|
{ORTH: "a", LEMMA: "a", TAG: ADP},
|
|
|
|
{ORTH: "el", LEMMA: "el", TAG: DET}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
2016-12-23 20:35:03 +00:00
|
|
|
"consigo": [
|
|
|
|
{ORTH: "con", LEMMA: "con"},
|
|
|
|
{ORTH: "sigo", LEMMA: PRON_LEMMA, NORM: "sí"}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
2016-12-23 20:35:03 +00:00
|
|
|
"conmigo": [
|
|
|
|
{ORTH: "con", LEMMA: "con"},
|
|
|
|
{ORTH: "migo", LEMMA: PRON_LEMMA, NORM: "mí"}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
2016-12-23 20:35:03 +00:00
|
|
|
"contigo": [
|
|
|
|
{ORTH: "con", LEMMA: "con"},
|
|
|
|
{ORTH: "tigo", LEMMA: PRON_LEMMA, NORM: "ti"}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
"del": [
|
2016-12-21 17:06:17 +00:00
|
|
|
{ORTH: "de", LEMMA: "de", TAG: ADP},
|
2016-12-23 20:35:03 +00:00
|
|
|
{ORTH: "l", LEMMA: "el", TAG: DET}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
"pel": [
|
2016-12-23 20:35:03 +00:00
|
|
|
{ORTH: "pe", LEMMA: "per", TAG: ADP},
|
|
|
|
{ORTH: "l", LEMMA: "el", TAG: DET}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
2016-12-23 20:35:03 +00:00
|
|
|
"pal": [
|
|
|
|
{ORTH: "pa", LEMMA: "para"},
|
|
|
|
{ORTH: "l", LEMMA: DET_LEMMA, NORM: "el"}
|
2016-12-18 15:54:19 +00:00
|
|
|
],
|
|
|
|
|
2016-12-23 20:35:03 +00:00
|
|
|
"pala": [
|
|
|
|
{ORTH: "pa", LEMMA: "para"},
|
|
|
|
{ORTH: "la", LEMMA: DET_LEMMA}
|
2016-12-21 17:06:17 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
"aprox.": [
|
|
|
|
{ORTH: "aprox.", LEMMA: "aproximadamente"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"dna.": [
|
|
|
|
{ORTH: "dna.", LEMMA: "docena"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"esq.": [
|
|
|
|
{ORTH: "esq.", LEMMA: "esquina"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"pág.": [
|
|
|
|
{ORTH: "pág.", LEMMA: "página"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"p.ej.": [
|
|
|
|
{ORTH: "p.ej.", LEMMA: "por ejemplo"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"Ud.": [
|
|
|
|
{ORTH: "Ud.", LEMMA: PRON_LEMMA, NORM: "usted"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"Vd.": [
|
|
|
|
{ORTH: "Vd.", LEMMA: PRON_LEMMA, NORM: "usted"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"Uds.": [
|
|
|
|
{ORTH: "Uds.", LEMMA: PRON_LEMMA, NORM: "ustedes"}
|
|
|
|
],
|
|
|
|
|
|
|
|
"Vds.": [
|
|
|
|
{ORTH: "Vds.", LEMMA: PRON_LEMMA, NORM: "ustedes"}
|
2016-12-18 15:54:19 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ORTH_ONLY = [
|
2016-12-21 17:06:17 +00:00
|
|
|
"a.",
|
|
|
|
"a.C.",
|
|
|
|
"a.J.C.",
|
|
|
|
"apdo.",
|
|
|
|
"Av.",
|
|
|
|
"Avda.",
|
|
|
|
"b.",
|
|
|
|
"c.",
|
|
|
|
"Cía.",
|
|
|
|
"d.",
|
|
|
|
"e.",
|
|
|
|
"etc.",
|
|
|
|
"f.",
|
|
|
|
"g.",
|
|
|
|
"Gob.",
|
|
|
|
"Gral.",
|
|
|
|
"h.",
|
|
|
|
"i.",
|
|
|
|
"Ing.",
|
|
|
|
"j.",
|
|
|
|
"J.C.",
|
|
|
|
"k.",
|
|
|
|
"l.",
|
|
|
|
"Lic.",
|
|
|
|
"m.",
|
|
|
|
"m.n.",
|
|
|
|
"n.",
|
|
|
|
"no.",
|
|
|
|
"núm.",
|
|
|
|
"o.",
|
|
|
|
"p.",
|
|
|
|
"P.D.",
|
|
|
|
"Prof.",
|
|
|
|
"Profa.",
|
|
|
|
"q.",
|
|
|
|
"q.e.p.d."
|
|
|
|
"r.",
|
|
|
|
"s.",
|
|
|
|
"S.A.",
|
|
|
|
"S.L.",
|
|
|
|
"s.s.s.",
|
|
|
|
"Sr.",
|
|
|
|
"Sra.",
|
|
|
|
"Srta.",
|
|
|
|
"t.",
|
|
|
|
"u.",
|
|
|
|
"v.",
|
|
|
|
"w.",
|
|
|
|
"x.",
|
|
|
|
"y.",
|
|
|
|
"z."
|
2016-12-18 15:54:19 +00:00
|
|
|
]
|