1

Me_UnitSpacing ごとに文章を特徴量として設定してみました。しかし、Me_UnitSpacing のすべての出現に対して同じ文の値を取得しています

サンプルコード:

DECLARE LOWERCAMELCASE,UPPERCAMELCASE;
DECLARE ME_UNITSPACING(STRING sentence, STRING replace,STRING description);
Document{-> RETAINTYPE(SPACE)};
SW CW{->MARK(LOWERCAMELCASE,1,2)};
CW CW{->MARK(UPPERCAMELCASE,1,2)};
Document{-> RETAINTYPE};
LOWERCAMELCASE{REGEXP("mmHg")->MARK(ME_UNITSPACING)};
UPPERCAMELCASE{REGEXP("MmHg")->MARK(ME_UNITSPACING)};
W{REGEXP("Mmhg",true)->MARK(ME_UNITSPACING)};

DECLARE UnitspacingSENTENCE;
SENTENCE{CONTAINS(ME_UNITSPACING)->UnitspacingSENTENCE};
STRING unitspacingsent;
UnitspacingSENTENCE{->MATCHEDTEXT(unitspacingsent)};
ME_UNITSPACING{->ME_UNITSPACING.sentence=unitspacingsent};

サンプル入力:

 A number of psychological and  mmHg psychiatric correlates have been found                     
 implicated in the onset and/or repetition of NSSI behavior. Nock et al. 14      
 reported 9 k that more than half of the clinical adolescents they studied 
 met the DSM-IV criteria for an internalizing disorder, an externalizing    
 disorder, or a substance-related disorder, with a prevalence  mmHg  rate of 
 psychiatric pathologies estimated to be as high as 87%. In a large  
 community-based sample of 12,068 adolescents from 11 countries, Brunner et  
 al. (2014) found significant associations mmHg with symptoms of depression    
 and anxiety in adolescents who engaged in self-harming behavior 6, and they   
 emphasized that self-injury is strongly indicative of psychological   
 problems that require professional attention. Their results are consistent    
 with previous reports of a significantly higher rate of depressive and   
 anxious symptoms in self-injurers.5,15,16,17,18,19 The onset of NSSI   
 behavior in teenagers with depression is mainly attributable to the    
 function of NSSI as a way to seek relief from the depressive symptoms. 20  
 The literature generally stresses the broad variety of psychiatric problems  
 seen in mmHg  teenagers with history of NSSI. Cluster B personality   
 disorders are often identified, especially in self-cutting adolescent  
 females, and so are eating disorders; approximately one in three  
 adolescents with eating disorders are also self-injurers, the NSSI 
 frequently coinciding with or following the eating disorder 21, 22.
4

1 に答える 1

2
DECLARE LOWERCAMELCASE,UPPERCAMELCASE;
DECLARE ME_UNITSPACING(STRING sentence, STRING replace,STRING description);
Document{-> RETAINTYPE(SPACE)};
SW CW{->MARK(LOWERCAMELCASE,1,2)};
CW CW{->MARK(UPPERCAMELCASE,1,2)};
Document{-> RETAINTYPE};
LOWERCAMELCASE{REGEXP("mmHg")->MARK(ME_UNITSPACING)};
UPPERCAMELCASE{REGEXP("MmHg")->MARK(ME_UNITSPACING)};
W{REGEXP("Mmhg",true)->MARK(ME_UNITSPACING)};

DECLARE UnitspacingSENTENCE;
SENTENCE{CONTAINS(ME_UNITSPACING)->UnitspacingSENTENCE};
BLOCK(foreach)UnitspacingSENTENCE{}
{
STRING unitspacingsent;
UnitspacingSENTENCE{->MATCHEDTEXT(unitspacingsent)};
ME_UNITSPACING{->ME_UNITSPACING.sentence=unitspacingsent};
}
于 2016-07-28T03:34:11.160 に答える