public class Literal extends Object
| Modifier and Type | Field and Description |
|---|---|
String |
arg1 |
String |
arg2 |
boolean |
bound |
boolean |
negated |
String |
pred |
boolean |
preserve |
| Constructor and Description |
|---|
Literal() |
| Modifier and Type | Method and Description |
|---|---|
Literal |
applyBindings(HashMap<String,String> bindings) |
void |
applyBindingSelf(HashMap<String,String> bindings)
Apply variable substitutions to a literal
|
Literal |
deepCopy() |
boolean |
equals(Object o) |
boolean |
isGround() |
static void |
main(String[] args)
A test method
|
HashMap<String,String> |
mguTermList(Literal l2)
Unify all terms in term1 with the corresponding terms in term2 with a
common substitution.
|
static Literal |
parse(Lexer lex,
int startLine) |
void |
preProcessQuestionWords(List<String> qwords)
If the tokens in the literal are derived from words parsed
from the Stanford dependency parser, and therefore in the form
word-xx, where xx are digits, prepend a '?' to signify that
it's a variable.
|
static void |
testParse()
A test method for parsing a Literal
|
static void |
testRegexUnify()
A test method for wildcard unification
|
static void |
testUnify()
A test method for unification
|
String |
toString() |
public boolean negated
public boolean preserve
public boolean bound
public String pred
public String arg1
public String arg2
public Literal deepCopy()
public boolean isGround()
public void preProcessQuestionWords(List<String> qwords)
public void applyBindingSelf(HashMap<String,String> bindings)
public Literal applyBindings(HashMap<String,String> bindings)
public HashMap<String,String> mguTermList(Literal l2)
public static Literal parse(Lexer lex, int startLine)
lex - is a Lexer which has been initialized with the
textual version of the LiteralstartLine - is the line in the text file at which the
literal appears. If it is in a large rule the start line
could be different than the actual line of text for the literal.
If the literal is just from a string rather than directly from
a text file then the startLine will be 0.public static void testUnify()
public static void testRegexUnify()
public static void testParse()
public static void main(String[] args)
Copyright © 2015. All rights reserved.