edu.illinois.cs.cogcomp.lbjava.classify.Feature.getStringIdentifier()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(133)

本文整理了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

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();

相关文章