* Add __len__ function to StringStore

This commit is contained in:
Matthew Honnibal 2015-06-23 00:02:50 +02:00
parent 46fb24e9fd
commit cc579ed429
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ cdef class StringStore:
def __get__(self):
return self.size-1
def __len__(self):
return self.size
def __getitem__(self, object string_or_id):
cdef bytes byte_string
cdef const Utf8Str* utf8str