mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 21:57:15 +03:00
4a615cacd2
* Consolidate and freeze symbols Instead of having symbol values defined in three potentially conflicting places (`spacy.attrs`, `spacy.parts_of_speech`, `spacy.symbols`), define all symbols in `spacy.symbols` and reference those values in `spacy.attrs` and `spacy.parts_of_speech`. Remove deprecated and placeholder symbols from `spacy.attrs.IDS`. Make `spacy.attrs.NAMES` and `spacy.symbols.NAMES` reverse dicts rather than lists in order to support future use of hash values in `attr_id_t`. Minor changes: * Use `uint64_t` for attrs in `Doc.to_array` to support future use of hash values * Remove unneeded attrs filter for error message in `Doc.to_array` * Remove unused attr `SENT_END` * Handle dynamic size of attr_id_t in Doc.to_array * Undo added warnings * Refactor to make Doc.to_array more similar to Doc.from_array * Improve refactoring
25 lines
538 B
Cython
25 lines
538 B
Cython
from . cimport symbols
|
|
|
|
cpdef enum univ_pos_t:
|
|
NO_TAG = 0
|
|
ADJ = symbols.ADJ
|
|
ADP = symbols.ADP
|
|
ADV = symbols.ADV
|
|
AUX = symbols.AUX
|
|
CONJ = symbols.CONJ
|
|
CCONJ = symbols.CCONJ # U20
|
|
DET = symbols.DET
|
|
INTJ = symbols.INTJ
|
|
NOUN = symbols.NOUN
|
|
NUM = symbols.NUM
|
|
PART = symbols.PART
|
|
PRON = symbols.PRON
|
|
PROPN = symbols.PROPN
|
|
PUNCT = symbols.PUNCT
|
|
SCONJ = symbols.SCONJ
|
|
SYM = symbols.SYM
|
|
VERB = symbols.VERB
|
|
X = symbols.X
|
|
EOL = symbols.EOL
|
|
SPACE = symbols.SPACE
|