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:
Adriane Boyd 2020-09-27 22:20:14 +02:00 committed by GitHub
parent f29d5b9b89
commit a6548ead17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -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()

View File

@ -466,3 +466,4 @@ cdef enum symbol_t:
ENT_ID
IDX
_

View File

@ -465,6 +465,7 @@ IDS = {
"acl": acl,
"LAW": LAW,
"MORPH": MORPH,
"_": _,
}