mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +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 = "|"
|
FEATURE_SEP = "|"
|
||||||
FIELD_SEP = "="
|
FIELD_SEP = "="
|
||||||
VALUE_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):
|
def __init__(self, StringStore strings):
|
||||||
self.mem = Pool()
|
self.mem = Pool()
|
||||||
|
|
|
@ -466,3 +466,4 @@ cdef enum symbol_t:
|
||||||
ENT_ID
|
ENT_ID
|
||||||
|
|
||||||
IDX
|
IDX
|
||||||
|
_
|
||||||
|
|
|
@ -465,6 +465,7 @@ IDS = {
|
||||||
"acl": acl,
|
"acl": acl,
|
||||||
"LAW": LAW,
|
"LAW": LAW,
|
||||||
"MORPH": MORPH,
|
"MORPH": MORPH,
|
||||||
|
"_": _,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user