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 .typedefs cimport flags_t, attr_t, hash_t
|
||||||
from .parts_of_speech cimport univ_pos_t
|
from .parts_of_speech cimport univ_pos_t
|
||||||
|
@ -25,21 +25,16 @@ cdef struct LexemeC:
|
||||||
float sentiment
|
float sentiment
|
||||||
float l2_norm
|
float l2_norm
|
||||||
|
|
||||||
|
cdef struct MorphFeatC:
|
||||||
cdef struct Morphology:
|
int name
|
||||||
uint8_t number
|
int value
|
||||||
uint8_t tenspect # Tense/aspect/voice
|
|
||||||
uint8_t mood
|
|
||||||
uint8_t gender
|
|
||||||
uint8_t person
|
|
||||||
uint8_t case
|
|
||||||
uint8_t misc
|
|
||||||
|
|
||||||
|
|
||||||
cdef struct PosTag:
|
cdef struct MorphologyC:
|
||||||
Morphology morph
|
uint64_t[4] feature_set
|
||||||
int id
|
MorphFeatC* features
|
||||||
univ_pos_t pos
|
univ_pos_t pos
|
||||||
|
int n
|
||||||
|
|
||||||
|
|
||||||
cdef struct Entity:
|
cdef struct Entity:
|
||||||
|
@ -59,7 +54,7 @@ cdef struct Constituent:
|
||||||
|
|
||||||
cdef struct TokenC:
|
cdef struct TokenC:
|
||||||
const LexemeC* lex
|
const LexemeC* lex
|
||||||
Morphology morph
|
const MorphologyC* morph
|
||||||
const Constituent* ctnt
|
const Constituent* ctnt
|
||||||
univ_pos_t pos
|
univ_pos_t pos
|
||||||
bint spacy
|
bint spacy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user