2014-11-05 09:45:29 +00:00
|
|
|
from spacy.context cimport FIELD_IDS, Token
|
2014-11-04 16:42:14 +00:00
|
|
|
|
|
|
|
|
2014-11-05 09:45:29 +00: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 16:42:14 +00:00
|
|
|
|
|
|
|
|
2014-11-05 09:45:29 +00:00
|
|
|
TEMPLATES = (
|
2014-11-05 11:11:39 +00:00
|
|
|
(N0.sic,),
|
|
|
|
(N0.norm,),
|
|
|
|
(N0.suffix,),
|
|
|
|
(N0.prefix,),
|
2014-11-05 09:45:29 +00:00
|
|
|
(P1.pos,),
|
|
|
|
(P2.pos,),
|
|
|
|
(P1.pos, P2.pos),
|
2014-11-05 11:11:39 +00:00
|
|
|
(P1.pos, N0.norm),
|
|
|
|
(P1.norm,),
|
|
|
|
(P1.suffix,),
|
|
|
|
(P2.norm,),
|
|
|
|
(N1.norm,),
|
|
|
|
(N1.suffix,),
|
|
|
|
(N2.norm,),
|
2014-11-05 09:45:29 +00:00
|
|
|
|
|
|
|
(N0.shape,),
|
2014-11-05 11:11:39 +00:00
|
|
|
(N0.cluster,),
|
|
|
|
(N1.cluster,),
|
|
|
|
(N2.cluster,),
|
|
|
|
(P1.cluster,),
|
|
|
|
(P2.cluster,),
|
2014-11-05 09:45:29 +00:00
|
|
|
(N0.oft_upper,),
|
|
|
|
(N0.oft_title,),
|
|
|
|
|
|
|
|
(N0.postype,),
|
|
|
|
|
2014-11-05 11:11:39 +00:00
|
|
|
(P1.like_url,),
|
|
|
|
(N1.like_number,),
|
|
|
|
(N1.like_url,),
|
2014-11-04 16:42:14 +00:00
|
|
|
)
|