本文整理了Java中edu.illinois.cs.cogcomp.lbjava.classify.Feature.getStringIdentifier()
方法的一些代码示例,展示了Feature.getStringIdentifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Feature.getStringIdentifier()
方法的具体详情如下:
包路径:edu.illinois.cs.cogcomp.lbjava.classify.Feature
类名称:Feature
方法名:getStringIdentifier
[英]Retrieves this feature's identifier as a string.
[中]以字符串形式检索此功能的标识符。
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
/**
* Check it out when done, make sure it worked.
*/
protected void pruneLexicon(int[] uselessfeatures) {
super.pruneLexicon(uselessfeatures);
for (Feature f : this.uselessFeatureNames) {
if (lexicon.contains(f)) {
throw new RuntimeException("The features were not correctly removed from the lexicon : " + f.getStringIdentifier());
}
}
}
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
/**
* Given a list of useless features, prune the entries from the lexicon.
* @param uselessfeatures
*/
protected void pruneLexicon(int[] uselessfeatures) {
lexicon.discardPrunedFeatures(uselessfeatures);
for (Feature f : this.uselessFeatureNames) {
if (lexicon.contains(f)) {
throw new RuntimeException("The features were not correctly removed from the lexicon : " + f.getStringIdentifier());
}
}
}
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
if (!(att.name().equals(f.getStringIdentifier()))) {
System.err.println("WekaWrapper: Error - makeInstance encountered a misaligned "
+ "attribute-feature pair.");
System.err.println(" " + att.name() + " and " + f.getStringIdentifier()
+ " should have been identical.");
new Exception().printStackTrace();
if (!(label.getStringIdentifier().equals(((Attribute) attributeInfo.elementAt(0))
.name()))) {
System.err.println("WekaWrapper: Error - makeInstance found the wrong label name.");
代码示例来源:origin: edu.illinois.cs.cogcomp/saul
Feature label = labelLexicon.lookupKey(0);
if (!label.isDiscrete()) {
Attribute a = new Attribute(label.getStringIdentifier());
attributeInfo.addElement(a);
} else {
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
previousClassifier = f.getGeneratingClassifier();
if (f.hasStringIdentifier())
previousSIdentifier = f.getStringIdentifier();
else if (f.hasByteStringIdentifier())
previousBSIdentifier = f.getByteStringIdentifier();
代码示例来源:origin: edu.illinois.cs.cogcomp/LBJava
previousClassifier = f.getGeneratingClassifier();
if (f.hasStringIdentifier())
previousSIdentifier = f.getStringIdentifier();
else if (f.hasByteStringIdentifier())
previousBSIdentifier = f.getByteStringIdentifier();
内容来源于网络,如有侵权,请联系作者删除!