|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.pipe.Pipe
cc.mallet.pipe.FeatureSequenceConvolution
public class FeatureSequenceConvolution
| Constructor Summary | |
|---|---|
FeatureSequenceConvolution()
|
|
| Method Summary | |
|---|---|
Instance |
pipe(Instance carrier)
construct word co-occurrence features from the original sequence do combinatoric, n choose 2, can be extended to n choose 3 public void convolution() { int fi = -1; int pre = -1; int i,j; int curLen = length; for(i = 0; i < curLen-1; i++) { for(j = i + 1; j < curLen; j++) { pre = features[i]; fi = features[j]; Object preO = dictionary.lookupObject(pre); Object curO = dictionary.lookupObject(fi); Object coO = preO.toString() + "_" + curO.toString(); add(coO); } } } |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FeatureSequenceConvolution()
| Method Detail |
|---|
public Instance pipe(Instance carrier)
pipe in class Pipe
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||