mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
* Rename LexStr_casefix to LexStr_norm and LexInt_i to LexInt_id
This commit is contained in:
parent
5abb194553
commit
65d3ead4fd
|
@ -6,7 +6,7 @@ cpdef flag_t OOV_DIST_FLAGS
|
|||
|
||||
|
||||
cpdef enum LexInts:
|
||||
LexInt_i
|
||||
LexInt_id
|
||||
LexInt_length
|
||||
LexInt_cluster
|
||||
LexInt_pos
|
||||
|
@ -22,7 +22,7 @@ cpdef enum LexFloats:
|
|||
|
||||
cpdef enum LexStrs:
|
||||
LexStr_orig
|
||||
LexStr_casefix
|
||||
LexStr_norm
|
||||
LexStr_shape
|
||||
LexStr_unsparse
|
||||
LexStr_asciied
|
||||
|
|
|
@ -8,7 +8,7 @@ OOV_DIST_FLAGS = 0
|
|||
|
||||
cpdef dict get_lexeme_dict(size_t i, unicode string):
|
||||
ints = [None for _ in range(LexInt_N)]
|
||||
ints[<int>LexInt_i] = i
|
||||
ints[<int>LexInt_id] = i
|
||||
ints[<int>LexInt_length] = len(string)
|
||||
ints[<int>LexInt_cluster] = 0
|
||||
ints[<int>LexInt_pos] = 0
|
||||
|
@ -20,7 +20,7 @@ cpdef dict get_lexeme_dict(size_t i, unicode string):
|
|||
|
||||
strings = [None for _ in range(LexStr_N)]
|
||||
strings[<int>LexStr_orig] = string
|
||||
strings[<int>LexStr_casefix] = strings[<int>LexStr_orig]
|
||||
strings[<int>LexStr_norm] = strings[<int>LexStr_orig]
|
||||
strings[<int>LexStr_shape] = orth.word_shape(string)
|
||||
strings[<int>LexStr_unsparse] = strings[<int>LexStr_shape]
|
||||
strings[<int>LexStr_asciied] = orth.asciied(string)
|
||||
|
|
Loading…
Reference in New Issue
Block a user