From c60cc22390c46fd2cc74f7630064dbb2dddc34c4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 3 Jul 2015 04:46:11 +0200 Subject: [PATCH] * Ignore adjective supersenses --- bin/init_model.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/init_model.py b/bin/init_model.py index 1c06285ad..e4f5225d7 100644 --- a/bin/init_model.py +++ b/bin/init_model.py @@ -87,6 +87,8 @@ def _read_senses(loc): word = sense_strings.pop(0) for sense in sense_strings: pos, sense = sense[3:].split('.') + if pos[0].upper() == 'A': + continue sense_name = '%s_%s' % (pos[0].upper(), sense.lower()) if sense_name != 'N_tops': sense_id = sense_names[sense_name] @@ -124,10 +126,6 @@ def setup_vocab(src_dir, dst_dir): for lemma in lemmatizer(word.lower(), pos): lemmas.append(lemma) orth_senses.update(senses[lemma][pos]) - if word.lower() == 'dogging': - print word - print lemmas - print [spacy.senses.STRINGS[si] for si in orth_senses] entry['senses'] = list(sorted(orth_senses)) vocab[word] = entry vocab.dump(str(dst_dir / 'lexemes.bin'))