2013-03-20 52 views
0

CRF ++模板文件中的單詞袋功能的語法是什麼?CRF ++中的單詞袋

模板例如:

#Unigrams 
U00:%x[0,0] 
U01:%x[0,1] 
U02:%x[1,0] 

#Bigrams 
B 

回答

0

我認爲是這樣:

#Unigrams 
U00:%x[0,0] 
U00:%x[0,1] 
U00:%x[1,0] 

#Bigrams 
B 

使用相同的標識符。

0

下面是使用(3)字袋正確的模板:

#Unigrams 
U00:%x[-1,0] 
U00:%x[0,0] 
U00:%x[1,0] 

#Bigrams 
B 

註標識符是相同的(U00)。

[-1,0] -> previous word 
[0,0] -> current word 
[1,0] -> next word