From 70b51ed7c866896ef13d11258adecef0441eba77 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 8 Dec 2016 19:45:50 +0100 Subject: [PATCH] Remove time from German language data --- spacy/de/__init__.py | 2 -- spacy/de/language_data.py | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/spacy/de/__init__.py b/spacy/de/__init__.py index d4f3e0e50..980a0618e 100644 --- a/spacy/de/__init__.py +++ b/spacy/de/__init__.py @@ -10,7 +10,6 @@ from ..util import update_exc from ..language_data import EMOTICONS from .language_data import ORTH_ONLY from .language_data import strings_to_exc -from .language_data import get_time_exc TOKENIZER_EXCEPTIONS = dict(language_data.TOKENIZER_EXCEPTIONS) @@ -23,7 +22,6 @@ STOP_WORDS = set(language_data.STOP_WORDS) update_exc(TOKENIZER_EXCEPTIONS, strings_to_exc(EMOTICONS)) update_exc(TOKENIZER_EXCEPTIONS, strings_to_exc(ORTH_ONLY)) -update_exc(TOKENIZER_EXCEPTIONS, get_time_exc(range(1, 24 + 1))) class German(Language): diff --git a/spacy/de/language_data.py b/spacy/de/language_data.py index 7a7c044b3..c979815b5 100644 --- a/spacy/de/language_data.py +++ b/spacy/de/language_data.py @@ -9,17 +9,6 @@ def strings_to_exc(orths): return {orth: [{ORTH: orth}] for orth in orths} -def get_time_exc(hours): - exc = {} - for hour in hours: - # currently only supporting formats like "10h", not "10 Uhr" - exc["%dh" % hour] = [ - {ORTH: hour}, - {ORTH: "h", LEMMA: "Uhr"} - ] - return exc - - PRON_LEMMA = "-PRON-"