use of edu.illinois.cs.cogcomp.comma.datastructures.CommaSRLSentence in project cogcomp-nlp by CogComp.
the class ListCommasConstrainedCommaClassifier method discreteValue.
public String discreteValue(Object __example) {
if (!(__example instanceof Comma)) {
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Classifier 'ListCommasConstrainedCommaClassifier(Comma)' defined on line 284 of CommaClassifier.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
CommaSRLSentence head = ListCommasConstrainedInference.findHead((Comma) __example);
ListCommasConstrainedInference inference = (ListCommasConstrainedInference) InferenceManager.get("edu.illinois.cs.cogcomp.comma.lbj.ListCommasConstrainedInference", head);
if (inference == null) {
inference = new ListCommasConstrainedInference(head);
InferenceManager.put(inference);
}
String result = null;
try {
result = inference.valueOf(__LocalCommaClassifier, __example);
} catch (Exception e) {
System.err.println("LBJava ERROR: Fatal error while evaluating classifier ListCommasConstrainedCommaClassifier: " + e);
e.printStackTrace();
System.exit(1);
}
return result;
}
use of edu.illinois.cs.cogcomp.comma.datastructures.CommaSRLSentence in project cogcomp-nlp by CogComp.
the class ListCommasConstrainedInference$subjectto method discreteValue.
public String discreteValue(Object __example) {
if (!(__example instanceof CommaSRLSentence)) {
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Constraint 'ListCommasConstrainedInference$subjectto(CommaSRLSentence)' defined on line 280 of CommaClassifier.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
CommaSRLSentence s = (CommaSRLSentence) __example;
{
boolean LBJava$constraint$result$0;
LBJava$constraint$result$0 = __listCommas.discreteValue(s).equals("true");
if (!LBJava$constraint$result$0)
return "false";
}
return "true";
}
use of edu.illinois.cs.cogcomp.comma.datastructures.CommaSRLSentence in project cogcomp-nlp by CogComp.
the class SubstitutePairConstrainedCommaClassifier method discreteValue.
public String discreteValue(Object __example) {
if (!(__example instanceof Comma)) {
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Classifier 'SubstitutePairConstrainedCommaClassifier(Comma)' defined on line 268 of CommaClassifier.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
CommaSRLSentence head = SubstitutePairConstrainedInference.findHead((Comma) __example);
SubstitutePairConstrainedInference inference = (SubstitutePairConstrainedInference) InferenceManager.get("edu.illinois.cs.cogcomp.comma.lbj.SubstitutePairConstrainedInference", head);
if (inference == null) {
inference = new SubstitutePairConstrainedInference(head);
InferenceManager.put(inference);
}
String result = null;
try {
result = inference.valueOf(__LocalCommaClassifier, __example);
} catch (Exception e) {
System.err.println("LBJava ERROR: Fatal error while evaluating classifier SubstitutePairConstrainedCommaClassifier: " + e);
e.printStackTrace();
System.exit(1);
}
return result;
}
use of edu.illinois.cs.cogcomp.comma.datastructures.CommaSRLSentence in project cogcomp-nlp by CogComp.
the class SubstitutePairConstrainedInference$subjectto method discreteValue.
public String discreteValue(Object __example) {
if (!(__example instanceof CommaSRLSentence)) {
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Constraint 'SubstitutePairConstrainedInference$subjectto(CommaSRLSentence)' defined on line 264 of CommaClassifier.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
CommaSRLSentence s = (CommaSRLSentence) __example;
{
boolean LBJava$constraint$result$0;
LBJava$constraint$result$0 = __substitutePair.discreteValue(s).equals("true");
if (!LBJava$constraint$result$0)
return "false";
}
return "true";
}
use of edu.illinois.cs.cogcomp.comma.datastructures.CommaSRLSentence in project cogcomp-nlp by CogComp.
the class LocativePairConstrainedInference$subjectto method makeConstraint.
public FirstOrderConstraint makeConstraint(Object __example) {
if (!(__example instanceof CommaSRLSentence)) {
String type = __example == null ? "null" : __example.getClass().getName();
System.err.println("Constraint 'LocativePairConstrainedInference$subjectto(CommaSRLSentence)' defined on line 272 of CommaClassifier.lbj received '" + type + "' as input.");
new Exception().printStackTrace();
System.exit(1);
}
CommaSRLSentence s = (CommaSRLSentence) __example;
FirstOrderConstraint __result = new FirstOrderConstant(true);
{
FirstOrderConstraint LBJava$constraint$result$0 = null;
LBJava$constraint$result$0 = __locativePair.makeConstraint(s);
__result = new FirstOrderConjunction(__result, LBJava$constraint$result$0);
}
return __result;
}
Aggregations