spaCy/spacy/lang/ga/tokenizer_exceptions.py

85 lines
3.4 KiB
Python
Raw Normal View History

2017-10-31 18:34:45 +00:00
from ...symbols import POS, DET, ADP, CCONJ, ADV, NOUN, X, AUX
from ...symbols import ORTH, LEMMA, NORM
2017-06-26 20:24:55 +00:00
_exc = {
"'acha'n": [
2017-06-26 20:53:41 +00:00
{ORTH: "'ach", LEMMA: "gach", NORM: "gach", POS: DET},
{ORTH: "a'n", LEMMA: "aon", NORM: "aon", POS: DET},
],
2017-06-26 20:24:55 +00:00
"dem'": [
2017-06-26 20:53:41 +00:00
{ORTH: "de", LEMMA: "de", NORM: "de", POS: ADP},
{ORTH: "m'", LEMMA: "mo", NORM: "mo", POS: DET},
],
2017-06-26 20:24:55 +00:00
"ded'": [
2017-06-26 20:53:41 +00:00
{ORTH: "de", LEMMA: "de", NORM: "de", POS: ADP},
{ORTH: "d'", LEMMA: "do", NORM: "do", POS: DET},
],
2017-06-26 20:24:55 +00:00
"lem'": [
2017-06-26 20:53:41 +00:00
{ORTH: "le", LEMMA: "le", NORM: "le", POS: ADP},
{ORTH: "m'", LEMMA: "mo", NORM: "mo", POS: DET},
],
2017-06-26 20:24:55 +00:00
"led'": [
2017-06-26 20:53:41 +00:00
{ORTH: "le", LEMMA: "le", NORM: "le", POS: ADP},
{ORTH: "d'", LEMMA: "mo", NORM: "do", POS: DET},
],
2017-06-26 20:24:55 +00:00
}
for exc_data in [
2017-06-26 20:53:41 +00:00
{ORTH: "'gus", LEMMA: "agus", NORM: "agus", POS: CCONJ},
{ORTH: "'ach", LEMMA: "gach", NORM: "gach", POS: DET},
2017-06-26 20:24:55 +00:00
{ORTH: "ao'", LEMMA: "aon", NORM: "aon"},
2017-06-26 20:53:41 +00:00
{ORTH: "'niar", LEMMA: "aniar", NORM: "aniar", POS: ADV},
{ORTH: "'níos", LEMMA: "aníos", NORM: "aníos", POS: ADV},
{ORTH: "'ndiu", LEMMA: "inniu", NORM: "inniu", POS: ADV},
{ORTH: "'nocht", LEMMA: "anocht", NORM: "anocht", POS: ADV},
{ORTH: "m'", LEMMA: "mo", POS: DET},
{ORTH: "Aib.", LEMMA: "Aibreán", POS: NOUN},
{ORTH: "Ath.", LEMMA: "athair", POS: NOUN},
{ORTH: "Beal.", LEMMA: "Bealtaine", POS: NOUN},
{ORTH: "a.C.n.", LEMMA: "ante Christum natum", POS: X},
{ORTH: "m.sh.", LEMMA: "mar shampla", POS: ADV},
{ORTH: "M.F.", LEMMA: "Meán Fómhair", POS: NOUN},
{ORTH: "M.Fómh.", LEMMA: "Meán Fómhair", POS: NOUN},
{ORTH: "D.F.", LEMMA: "Deireadh Fómhair", POS: NOUN},
{ORTH: "D.Fómh.", LEMMA: "Deireadh Fómhair", POS: NOUN},
2017-06-26 21:24:14 +00:00
{ORTH: "r.C.", LEMMA: "roimh Chríost", POS: ADV},
{ORTH: "R.C.", LEMMA: "roimh Chríost", POS: ADV},
{ORTH: "r.Ch.", LEMMA: "roimh Chríost", POS: ADV},
{ORTH: "r.Chr.", LEMMA: "roimh Chríost", POS: ADV},
2017-06-26 21:24:14 +00:00
{ORTH: "R.Ch.", LEMMA: "roimh Chríost", POS: ADV},
{ORTH: "R.Chr.", LEMMA: "roimh Chríost", POS: ADV},
{ORTH: "⁊rl.", LEMMA: "agus araile", POS: ADV},
{ORTH: "srl.", LEMMA: "agus araile", POS: ADV},
2017-06-26 20:53:41 +00:00
{ORTH: "Co.", LEMMA: "contae", POS: NOUN},
{ORTH: "Ean.", LEMMA: "Eanáir", POS: NOUN},
{ORTH: "Feab.", LEMMA: "Feabhra", POS: NOUN},
{ORTH: "gCo.", LEMMA: "contae", POS: NOUN},
{ORTH: ".i.", LEMMA: "eadhon", POS: ADV},
2017-06-27 21:42:16 +00:00
{ORTH: "B'", LEMMA: "ba", POS: AUX},
{ORTH: "b'", LEMMA: "ba", POS: AUX},
2017-06-26 20:53:41 +00:00
{ORTH: "lch.", LEMMA: "leathanach", POS: NOUN},
{ORTH: "Lch.", LEMMA: "leathanach", POS: NOUN},
{ORTH: "lgh.", LEMMA: "leathanach", POS: NOUN},
{ORTH: "Lgh.", LEMMA: "leathanach", POS: NOUN},
{ORTH: "Lún.", LEMMA: "Lúnasa", POS: NOUN},
{ORTH: "Már.", LEMMA: "Márta", POS: NOUN},
{ORTH: "Meith.", LEMMA: "Meitheamh", POS: NOUN},
{ORTH: "Noll.", LEMMA: "Nollaig", POS: NOUN},
{ORTH: "Samh.", LEMMA: "Samhain", POS: NOUN},
{ORTH: "tAth.", LEMMA: "athair", POS: NOUN},
{ORTH: "tUas.", LEMMA: "Uasal", POS: NOUN},
{ORTH: "teo.", LEMMA: "teoranta", POS: NOUN},
{ORTH: "Teo.", LEMMA: "teoranta", POS: NOUN},
{ORTH: "Uas.", LEMMA: "Uasal", POS: NOUN},
{ORTH: "uimh.", LEMMA: "uimhir", POS: NOUN},
{ORTH: "Uimh.", LEMMA: "uimhir", POS: NOUN},
]:
_exc[exc_data[ORTH]] = [exc_data]
2017-06-26 20:24:55 +00:00
for orth in ["d'", "D'"]:
2017-06-26 20:24:55 +00:00
_exc[orth] = [{ORTH: orth}]
TOKENIZER_EXCEPTIONS = _exc