本文整理汇总了Java中edu.berkeley.nlp.util.MapFactory类的典型用法代码示例。如果您正苦于以下问题:Java MapFactory类的具体用法?Java MapFactory怎么用?Java MapFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MapFactory类属于edu.berkeley.nlp.util包,在下文中一共展示了MapFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: valueOf
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
/**
* Uses String representation of a Map to populate Map with String keys and
* String values.
*/
public static FeatureLabel valueOf(String s, MapFactory mf)
throws Exception {
return new FeatureLabel(CollectionUtils.getMapFromString(s,
Class.forName("java.lang.String"),
Class.forName("java.lang.String"), mf));
}
示例2: AbstractMapLabel
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
protected AbstractMapLabel(MapFactory mapFactory) {
if (mapFactory == null) {
this.mapFactory = new MapFactory.HashMapFactory();
} else {
this.mapFactory = mapFactory;
}
this.map = this.mapFactory.buildMap();
}
示例3: getConstituents
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
public Map<Tree<L>, Constituent<L>> getConstituents(MapFactory mf) {
Map<Tree<L>, Constituent<L>> constituents = mf.buildMap();
appendConstituent(this, constituents, 0);
return constituents;
}
示例4: UnaryCounterTable
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
public UnaryCounterTable(short[] numSubStates) {
this(new MapFactory.HashMapFactory<UnaryRule, double[][]>(),
numSubStates);
}
示例5: BinaryCounterTable
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
public BinaryCounterTable(short[] numSubStates) {
this(new MapFactory.HashMapFactory<BinaryRule, double[][][]>(),
numSubStates);
}
示例6: FeatureLabel
import edu.berkeley.nlp.util.MapFactory; //导入依赖的package包/类
public FeatureLabel(MapFactory mapFactory) {
super(mapFactory);
}