mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix size of allocation when creating a pattern
Each pattern object currently contains two AttrValues rather than just one.
This commit is contained in:
parent
e4ba8a4b5a
commit
cc47b8ad6a
|
@ -41,7 +41,7 @@ cdef Pattern* init_pattern(Pool mem, object token_specs, attr_t entity_type) exc
|
|||
pattern[i].spec[j].attr = attr
|
||||
pattern[i].spec[j].value = value
|
||||
i = len(token_specs)
|
||||
pattern[i].spec = <AttrValue*>mem.alloc(1, sizeof(AttrValue))
|
||||
pattern[i].spec = <AttrValue*>mem.alloc(2, sizeof(AttrValue))
|
||||
pattern[i].spec[0].attr = ENT_TYPE
|
||||
pattern[i].spec[0].value = entity_type
|
||||
pattern[i].spec[1].attr = LENGTH
|
||||
|
|
Loading…
Reference in New Issue
Block a user