spaCy/spacy/lang/bn/tokenizer_exceptions.py

25 lines
873 B
Python
Raw Normal View History

2017-05-08 20:29:04 +00:00
from ...symbols import ORTH, LEMMA
2017-05-08 20:29:49 +00:00
_exc = {}
2017-05-08 20:29:49 +00:00
for exc_data in [
{ORTH: "ডঃ", LEMMA: "ডক্টর"},
{ORTH: "ডাঃ", LEMMA: "ডাক্তার"},
{ORTH: "ড.", LEMMA: "ডক্টর"},
{ORTH: "ডা.", LEMMA: "ডাক্তার"},
{ORTH: "মোঃ", LEMMA: "মোহাম্মদ"},
{ORTH: "মো.", LEMMA: "মোহাম্মদ"},
{ORTH: "সে.", LEMMA: "সেলসিয়াস"},
{ORTH: "কি.মি.", LEMMA: "কিলোমিটার"},
{ORTH: "কি.মি", LEMMA: "কিলোমিটার"},
{ORTH: "সে.মি.", LEMMA: "সেন্টিমিটার"},
{ORTH: "সে.মি", LEMMA: "সেন্টিমিটার"},
{ORTH: "মি.লি.", LEMMA: "মিলিলিটার"},
]:
2017-11-01 22:02:45 +00:00
_exc[exc_data[ORTH]] = [exc_data]
2017-05-08 20:29:49 +00:00
TOKENIZER_EXCEPTIONS = _exc