edu.stanford.nlp.wordseg
Class Gale2007ChineseSegmenterFeatureFactory<IN extends CoreLabel>
java.lang.Object
edu.stanford.nlp.sequences.FeatureFactory<IN>
edu.stanford.nlp.wordseg.Gale2007ChineseSegmenterFeatureFactory<IN>
- All Implemented Interfaces:
- java.io.Serializable
public class Gale2007ChineseSegmenterFeatureFactory<IN extends CoreLabel>
- extends FeatureFactory<IN>
A Chinese segmenter Feature Factory for GALE project. (modified from Sighan Bakeoff 2005.)
c is Chinese character ("char"). c means current, n means next and p means previous.
| Feature | Templates |
| Current position clique |
| useWord1 | CONSTANT, cc, nc, pc, pc+cc, if (As|Msr|Pk|Hk) cc+nc, pc,nc |
- Author:
- Huihsin Tseng, Pichuan Chang, Christopher Manning
- See Also:
- Serialized Form
| Fields inherited from class edu.stanford.nlp.sequences.FeatureFactory |
cliqueC, cliqueCnC, cliqueCp2C, cliqueCp3C, cliqueCp4C, cliqueCp5C, cliqueCpC, cliqueCpCnC, cliqueCpCp2C, cliqueCpCp2Cp3C, cliqueCpCp2Cp3Cp4C, cliqueCpCp2Cp3Cp4Cp5C, flags, knownCliques |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Gale2007ChineseSegmenterFeatureFactory
public Gale2007ChineseSegmenterFeatureFactory()
init
public void init(SeqClassifierFlags flags)
- Overrides:
init in class FeatureFactory<IN extends CoreLabel>
getCliqueFeatures
public java.util.Collection<java.lang.String> getCliqueFeatures(PaddedList<IN> cInfo,
int loc,
Clique clique)
- Extracts all the features from the input data at a certain index.
- Specified by:
getCliqueFeatures in class FeatureFactory<IN extends CoreLabel>
- Parameters:
cInfo - The complete data set as a List of WordInfoloc - The index at which to extract features.clique - The particular clique for which to extract features. It
should be a member of the knownCliques list.
- Returns:
- A
Collection of the features
calculated for the word at the specified position in info.
featuresC
protected java.util.Collection<java.lang.String> featuresC(PaddedList<? extends CoreLabel> cInfo,
int loc)
featuresCpC
protected java.util.Collection<java.lang.String> featuresCpC(PaddedList<? extends CoreLabel> cInfo,
int loc)
featuresCnC
protected java.util.Collection<java.lang.String> featuresCnC(PaddedList<? extends CoreLabel> cInfo,
int loc)
featuresCpCp2Cp3C
protected java.util.Collection<java.lang.String> featuresCpCp2Cp3C(PaddedList<? extends CoreLabel> cInfo,
int loc)
Stanford NLP Group