?? readme
字號:
In this package you will find a whole bunch of files designed to makeit easy to add features without bothering about counting them andsetting the id right. There is a class called FeatureTypes which youinherit from for creating any kind of feature. You will see variousderived classes from them, EdgeFeatures, StartFeatures, etc, etc.In FeatureTypes the num() and setOffset() methods are irrelevant afterthe FeatureMaps class. Also the ".id" field of FeatureImpl does notneed to be set by the FEatureTypes.next() methods. The FeatureGenerator is an aggregator over all these different featuretypes. It is responsible for converting the string-ids that theFeatureTypes assign to their features into distinct numbers. It has ainner class called FeatureMap that will make one pass over thetraining data and create the map of featurenames->integer id and as aside effect count the number of features. You can then just inheritfrom the FeatureGenImpl class and after calling one of theconstructors that does not make a call to (addFeatures()) you can thenimplement your own addFeatures class. There you will typically add theEdgeFeatures feature first and then the rest. So, for example if youwanted to add some parameter for each label (like a prior), you cancreate a new FeatureTypes class that will create as many featureids asthe number of labels. You will have to create a new class that isderived from FeatureGenImpl and just have a different implementationof the addFeatures subroutine. The rest will be handled by the parentclass.Another important class is the dictionary class that is WordsInTrainclass. This is created by FeatureGenTypes and is available for anyfeatureTypes class to use. What it does is provide you counts of thenumber of times a word occurs in a state. A third class is thevarious graph class. This allows you to create CRFs where you can havemore than one state per label.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -