Fix Lexeme.from_ptr

This commit is contained in:
Ines Montani 2020-08-10 16:43:37 +02:00
parent 64f2f84098
commit 933a7cf8d1
1 changed files with 2 additions and 1 deletions

View File

@ -18,11 +18,12 @@ cdef class Lexeme:
cdef readonly attr_t orth cdef readonly attr_t orth
@staticmethod @staticmethod
cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab, int vector_length): cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab):
cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth) cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)
self.c = lex self.c = lex
self.vocab = vocab self.vocab = vocab
self.orth = lex.orth self.orth = lex.orth
return self
@staticmethod @staticmethod
cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil: cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil: