From 6cd5730ee77dfa07c597ba7eb16cd4cb76214304 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 29 May 2017 01:05:09 +0200 Subject: [PATCH] Fix lex struct setters for strings --- spacy/lexeme.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 1cc6c073e..bcd84d184 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -224,27 +224,27 @@ cdef class Lexeme: property lower_: def __get__(self): return self.vocab.strings[self.c.lower] - def __set__(self, unicode x): self.c.lower = self.vocab.strings[x] + def __set__(self, unicode x): self.c.lower = self.vocab.strings.add(x) property norm_: def __get__(self): return self.vocab.strings[self.c.norm] - def __set__(self, unicode x): self.c.norm = self.vocab.strings[x] + def __set__(self, unicode x): self.c.norm = self.vocab.strings.add(x) property shape_: def __get__(self): return self.vocab.strings[self.c.shape] - def __set__(self, unicode x): self.c.shape = self.vocab.strings[x] + def __set__(self, unicode x): self.c.shape = self.vocab.strings.add(x) property prefix_: def __get__(self): return self.vocab.strings[self.c.prefix] - def __set__(self, unicode x): self.c.prefix = self.vocab.strings[x] + def __set__(self, unicode x): self.c.prefix = self.vocab.strings.add(x) property suffix_: def __get__(self): return self.vocab.strings[self.c.suffix] - def __set__(self, unicode x): self.c.suffix = self.vocab.strings[x] + def __set__(self, unicode x): self.c.suffix = self.vocab.strings.add(x) property lang_: def __get__(self): return self.vocab.strings[self.c.lang] - def __set__(self, unicode x): self.c.lang = self.vocab.strings[x] + def __set__(self, unicode x): self.c.lang = self.vocab.strings.add(x) property flags: def __get__(self): return self.c.flags