public String discreteValue(Object __example) { if (!(__example instanceof ExtendHeadExample)) { String type = __example == null ? "null" : __example.getClass().getName(); System.err.println("Classifier 'extendLabel(ExtendHeadExample)' defined on line 14 of mdExtendHeads.lbj received '" + type + "' as input."); new Exception().printStackTrace(); System.exit(1); } String __cachedValue = _discreteValue(__example); if (valueIndexOf(__cachedValue) == -1) { System.err.println("Classifier 'extendLabel' defined on line 14 of mdExtendHeads.lbj produced '" + __cachedValue + "' as a feature value, which is not allowable."); System.exit(1); } return __cachedValue; }
public Feature featureValue(Object __example) { String result = discreteValue(__example); return new DiscretePrimitiveStringFeature(containingPackage, name, "", result, valueIndexOf(result), (short) allowableValues().length); }
public FeatureVector classify(Object __example) { return new FeatureVector(featureValue(__example)); }
public MDExtendHeads(Parameters p, String modelPath, String lexiconPath) { super(p); try { lcFilePath = new java.net.URL("file:" + modelPath); lexFilePath = new java.net.URL("file:" + lexiconPath); } catch (Exception e) { System.err.println("ERROR: Can't create model or lexicon URL: " + e); e.printStackTrace(); System.exit(1); } if (new java.io.File(modelPath).exists()) { readModel(lcFilePath); readLexiconOnDemand(lexFilePath); } else { containingPackage = "edu.illinois.cs.cogcomp.lbj.coref.learned"; name = "MDExtendHeads"; setLabeler(new extendLabel()); setExtractor(new MDExtendHeads$$1()); } isClone = false; }
public MDExtendHeads(Parameters p, String modelPath, String lexiconPath) { super(p); try { lcFilePath = new java.net.URL("file:" + modelPath); lexFilePath = new java.net.URL("file:" + lexiconPath); } catch (Exception e) { System.err.println("ERROR: Can't create model or lexicon URL: " + e); e.printStackTrace(); System.exit(1); } if (new java.io.File(modelPath).exists()) { readModel(lcFilePath); readLexiconOnDemand(lexFilePath); } else { containingPackage = "edu.illinois.cs.cogcomp.lbj.coref.learned"; name = "MDExtendHeads"; setLabeler(new extendLabel()); setExtractor(new MDExtendHeads$$1()); } isClone = false; }
public Feature featureValue(Object __example) { String result = discreteValue(__example); return new DiscretePrimitiveStringFeature(containingPackage, name, "", result, valueIndexOf(result), (short) allowableValues().length); }
public String discreteValue(Object __example) { if (!(__example instanceof ExtendHeadExample)) { String type = __example == null ? "null" : __example.getClass().getName(); System.err.println("Classifier 'extendLabel(ExtendHeadExample)' defined on line 14 of mdExtendHeads.lbj received '" + type + "' as input."); new Exception().printStackTrace(); System.exit(1); } String __cachedValue = _discreteValue(__example); if (valueIndexOf(__cachedValue) == -1) { System.err.println("Classifier 'extendLabel' defined on line 14 of mdExtendHeads.lbj produced '" + __cachedValue + "' as a feature value, which is not allowable."); System.exit(1); } return __cachedValue; }
private MDExtendHeads(boolean b) { super(new Parameters()); containingPackage = "edu.illinois.cs.cogcomp.lbj.coref.learned"; name = "MDExtendHeads"; setEncoding(null); setLabeler(new extendLabel()); setExtractor(new MDExtendHeads$$1()); isClone = false; }
public FeatureVector classify(Object __example) { return new FeatureVector(featureValue(__example)); }
private MDExtendHeads(boolean b) { super(new Parameters()); containingPackage = "edu.illinois.cs.cogcomp.lbj.coref.learned"; name = "MDExtendHeads"; setEncoding(null); setLabeler(new extendLabel()); setExtractor(new MDExtendHeads$$1()); isClone = false; }