This commit is contained in:
Matthew Honnibal 2015-11-03 09:07:19 +01:00
commit 4083059650
3 changed files with 4 additions and 1 deletions

View File

@ -38,6 +38,7 @@ def install_data(url, extract_path, download_path):
assert tmp == download_path
t = tarfile.open(download_path)
t.extractall(extract_path)
os.unlink(download_path)
@plac.annotations(

View File

@ -88,6 +88,8 @@ cdef class Morphology:
return orth
cdef unicode py_string = self.strings[orth]
if pos != NOUN and pos != VERB and pos != ADJ and pos != PUNCT:
# TODO: This should lower-case
# return self.strings[py_string.lower()]
return orth
cdef set lemma_strings
cdef unicode lemma_string

View File

@ -473,7 +473,7 @@ cdef class Doc:
token.lex = lex
token.spacy = self.data[end-1].spacy
if tag in self.vocab.morphology.tag_map:
self.vocab.morphology.assign_tag(token, self.vocab.strings[tag])
self.vocab.morphology.assign_tag(token, tag)
else:
token.tag = self.vocab.strings[tag]
token.tag = self.vocab.strings[tag]