update data -> c :)

This commit is contained in:
Andreas Grivas 2015-11-04 20:20:42 +02:00
parent cb376eadd3
commit 770e3637ff

View File

@ -443,7 +443,7 @@ cdef class Doc:
""" Get index of token in doc that has character index start_idx """ """ Get index of token in doc that has character index start_idx """
cdef int i cdef int i
for i in range(self.length): for i in range(self.length):
if self.data[i].idx == start_idx: if self.c[i].idx == start_idx:
return i return i
return None return None
@ -451,7 +451,7 @@ cdef class Doc:
""" Get index+1 of token in doc ending with character index end_idx """ """ Get index+1 of token in doc ending with character index end_idx """
cdef int i cdef int i
for i in range(self.length): for i in range(self.length):
if (self.data[i].idx + self.data[i].lex.length) == end_idx: if (self.c[i].idx + self.c[i].lex.length) == end_idx:
return i + 1 return i + 1
return None return None