mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
* Hack on morphology structs
This commit is contained in:
parent
f8f2f4e545
commit
1d7f2d3abc
|
@ -1,4 +1,4 @@
|
|||
from libc.stdint cimport uint8_t, uint32_t, int32_t
|
||||
from libc.stdint cimport uint8_t, uint32_t, int32_t, uint64_t
|
||||
|
||||
from .typedefs cimport flags_t, attr_t, hash_t
|
||||
from .parts_of_speech cimport univ_pos_t
|
||||
|
@ -25,21 +25,16 @@ cdef struct LexemeC:
|
|||
float sentiment
|
||||
float l2_norm
|
||||
|
||||
|
||||
cdef struct Morphology:
|
||||
uint8_t number
|
||||
uint8_t tenspect # Tense/aspect/voice
|
||||
uint8_t mood
|
||||
uint8_t gender
|
||||
uint8_t person
|
||||
uint8_t case
|
||||
uint8_t misc
|
||||
cdef struct MorphFeatC:
|
||||
int name
|
||||
int value
|
||||
|
||||
|
||||
cdef struct PosTag:
|
||||
Morphology morph
|
||||
int id
|
||||
cdef struct MorphologyC:
|
||||
uint64_t[4] feature_set
|
||||
MorphFeatC* features
|
||||
univ_pos_t pos
|
||||
int n
|
||||
|
||||
|
||||
cdef struct Entity:
|
||||
|
@ -59,7 +54,7 @@ cdef struct Constituent:
|
|||
|
||||
cdef struct TokenC:
|
||||
const LexemeC* lex
|
||||
Morphology morph
|
||||
const MorphologyC* morph
|
||||
const Constituent* ctnt
|
||||
univ_pos_t pos
|
||||
bint spacy
|
||||
|
|
Loading…
Reference in New Issue
Block a user