From 06c25a888244e8520d5eeb2df8d5d86499325f48 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Tue, 31 Oct 2017 20:13:16 +0100 Subject: [PATCH] Remove comma that caused list to wrap in tuple! Also removed extra dict wrappings for performance (we used to have them in there, but they should only really exist if copying the dict is absolutely necessary) --- spacy/lang/ga/tokenizer_exceptions.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spacy/lang/ga/tokenizer_exceptions.py b/spacy/lang/ga/tokenizer_exceptions.py index 185b08895..e93ada52f 100644 --- a/spacy/lang/ga/tokenizer_exceptions.py +++ b/spacy/lang/ga/tokenizer_exceptions.py @@ -24,8 +24,7 @@ _exc = { "led'": [ {ORTH: "le", LEMMA: "le", NORM: "le", POS: ADP}, - {ORTH: "d'", LEMMA: "mo", NORM: "do", POS: DET}], - + {ORTH: "d'", LEMMA: "mo", NORM: "do", POS: DET}] } for exc_data in [ @@ -77,11 +76,11 @@ for exc_data in [ {ORTH: "Uas.", LEMMA: "Uasal", POS: NOUN}, {ORTH: "uimh.", LEMMA: "uimhir", POS: NOUN}, {ORTH: "Uimh.", LEMMA: "uimhir", POS: NOUN}]: - _exc[exc_data[ORTH]] = [dict(exc_data)], + _exc[exc_data[ORTH]] = [exc_data] for orth in [ "d'", "D'"]: _exc[orth] = [{ORTH: orth}] -TOKENIZER_EXCEPTIONS = dict(_exc) +TOKENIZER_EXCEPTIONS = _exc