コード例 #1
0
  public void addFeatureManager(String name, String inputParams, FeatureManager fm) {
    Assert.a(startIndexes == null, "Attempted to add a new FeatureManager after training.");

    if (name != null) fm.setInputComponent(name);
    allFeatureTypes.add(fm);

    // Add each feature type into the right list for evalution
    if (fm instanceof FeatureManagerNode) {
      nodeFeatureTypes.add((FeatureManagerNode) fm);
    }
    if (fm instanceof FeatureManagerEdge) {
      edgeFeatureTypes.add((FeatureManagerEdge) fm);
    }
    if (fm instanceof FeatureManagerNodeExplicitLength) {
      explicitLengthNodeFeatureTypes.add((FeatureManagerNodeExplicitLength) fm);
    }
    if (fm instanceof FeatureManagerEdgeExplicitLength) {
      explicitLengthEdgeFeatureTypes.add((FeatureManagerEdgeExplicitLength) fm);
    }
  }