2014-11-05 12:45:29 +03:00
|
|
|
from spacy.context cimport FIELD_IDS, Token
|
2014-11-04 19:42:14 +03:00
|
|
|
|
|
|
|
|
2014-11-05 12:45:29 +03:00
|
|
|
cpdef Token P2 = FIELD_IDS.P2
|
|
|
|
cpdef Token P1 = FIELD_IDS.P1
|
|
|
|
cpdef Token N0 = FIELD_IDS.N0
|
|
|
|
cpdef Token N1 = FIELD_IDS.N1
|
|
|
|
cpdef Token N2 = FIELD_IDS.N2
|
2014-11-04 19:42:14 +03:00
|
|
|
|
|
|
|
|
2014-11-05 12:45:29 +03:00
|
|
|
TEMPLATES = (
|
2014-11-05 14:11:39 +03:00
|
|
|
(N0.sic,),
|
|
|
|
(N0.norm,),
|
|
|
|
(N0.suffix,),
|
|
|
|
(N0.prefix,),
|
2014-11-05 12:45:29 +03:00
|
|
|
(P1.pos,),
|
|
|
|
(P2.pos,),
|
|
|
|
(P1.pos, P2.pos),
|
2014-11-05 14:11:39 +03:00
|
|
|
(P1.pos, N0.norm),
|
|
|
|
(P1.norm,),
|
|
|
|
(P1.suffix,),
|
|
|
|
(P2.norm,),
|
|
|
|
(N1.norm,),
|
|
|
|
(N1.suffix,),
|
|
|
|
(N2.norm,),
|
2014-11-05 12:45:29 +03:00
|
|
|
|
|
|
|
(N0.shape,),
|
2014-11-05 14:11:39 +03:00
|
|
|
(N0.cluster,),
|
|
|
|
(N1.cluster,),
|
|
|
|
(N2.cluster,),
|
|
|
|
(P1.cluster,),
|
|
|
|
(P2.cluster,),
|
2014-11-05 12:45:29 +03:00
|
|
|
(N0.oft_upper,),
|
|
|
|
(N0.oft_title,),
|
|
|
|
|
|
|
|
(N0.postype,),
|
|
|
|
|
2014-11-05 14:11:39 +03:00
|
|
|
(P1.like_url,),
|
|
|
|
(N1.like_number,),
|
|
|
|
(N1.like_url,),
|
2014-11-04 19:42:14 +03:00
|
|
|
)
|