2017-06-27 00:40:04 +03:00
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2018-03-24 03:05:27 +03:00
|
|
|
from ...symbols import ORTH, LEMMA, POS, ADV, ADJ, NOUN, ADP
|
2017-06-27 00:40:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
_exc = {}
|
|
|
|
|
|
|
|
for exc_data in [
|
|
|
|
{ORTH: "m.in.", LEMMA: "między innymi", POS: ADV},
|
|
|
|
{ORTH: "inż.", LEMMA: "inżynier", POS: NOUN},
|
|
|
|
{ORTH: "mgr.", LEMMA: "magister", POS: NOUN},
|
|
|
|
{ORTH: "tzn.", LEMMA: "to znaczy", POS: ADV},
|
|
|
|
{ORTH: "tj.", LEMMA: "to jest", POS: ADV},
|
2018-03-24 03:05:27 +03:00
|
|
|
{ORTH: "tzw.", LEMMA: "tak zwany", POS: ADJ},
|
|
|
|
{ORTH: "adw.", LEMMA: "adwokat", POS: NOUN},
|
|
|
|
{ORTH: "afr.", LEMMA: "afrykański", POS: ADJ},
|
|
|
|
{ORTH: "c.b.d.o.", LEMMA: "co było do okazania", POS: ADV},
|
|
|
|
{ORTH: "cbdu.", LEMMA: "co było do udowodnienia", POS: ADV},
|
|
|
|
{ORTH: "mn.w.", LEMMA: "mniej więcej", POS: ADV},
|
|
|
|
{ORTH: "nt.", LEMMA: "na temat", POS: ADP},
|
|
|
|
{ORTH: "ok.", LEMMA: "około"},
|
|
|
|
{ORTH: "n.p.u.", LEMMA: "na psa urok"},
|
|
|
|
{ORTH: "ww.", LEMMA: "wyżej wymieniony", POS: ADV}]:
|
2017-11-02 01:02:45 +03:00
|
|
|
_exc[exc_data[ORTH]] = [exc_data]
|
2017-06-27 00:40:04 +03:00
|
|
|
|
|
|
|
for orth in [
|
2018-03-24 03:05:27 +03:00
|
|
|
"w.", "r.", "br.", "bm.", "b.r.", "amer.", "am.", "bdb.", "św.", "p.", "lit.",
|
|
|
|
"wym.", "czyt.", "daw.", "d.", "zob.", "gw.", "dn.", "dyr.", "im.", "mł.",
|
|
|
|
"min.", "dot.", "muz.", "k.k.", "k.p.a.", "k.p.c.", "n.p.m.", "p.p.m.", "nb.",
|
|
|
|
"ob.", "n.e.", "p.n.e.", "zw.", "zool.", "zach.", "żarg.", "żart.", "wzgl.",
|
|
|
|
"wyj.", "xx.", "ks.", "x.", "wyd.", "wsch.", "o.o."]:
|
2017-06-27 00:40:04 +03:00
|
|
|
_exc[orth] = [{ORTH: orth}]
|
|
|
|
|
|
|
|
|
2017-10-31 23:05:29 +03:00
|
|
|
TOKENIZER_EXCEPTIONS = _exc
|