mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Add _ as a symbol (#6153)
* Add _ to StringStore in Morphology * Add _ as a symbol Add `_` as a symbol instead of adding to the `StringStore`.
This commit is contained in:
parent
f29d5b9b89
commit
a6548ead17
|
@ -29,7 +29,8 @@ cdef class Morphology:
|
|||
FEATURE_SEP = "|"
|
||||
FIELD_SEP = "="
|
||||
VALUE_SEP = ","
|
||||
EMPTY_MORPH = "_" # not an empty string so that the PreshMap key is not 0
|
||||
# not an empty string so that the PreshMap key is not 0
|
||||
EMPTY_MORPH = symbols.NAMES[symbols._]
|
||||
|
||||
def __init__(self, StringStore strings):
|
||||
self.mem = Pool()
|
||||
|
|
|
@ -466,3 +466,4 @@ cdef enum symbol_t:
|
|||
ENT_ID
|
||||
|
||||
IDX
|
||||
_
|
||||
|
|
|
@ -465,6 +465,7 @@ IDS = {
|
|||
"acl": acl,
|
||||
"LAW": LAW,
|
||||
"MORPH": MORPH,
|
||||
"_": _,
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user