|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.fol.parser.ParserBasedTranslator
This class is an implementation of FirstOrderLogicTranslator
that uses an auxiliary parser
to do the transformation. The parser emits clauses (in the form of a ClauseIterator
), which are
collected together in a conjunction, forming a CNF sentence.
Constructor Summary | |
ParserBasedTranslator()
|
|
ParserBasedTranslator(FirstOrderLogicParser parser)
|
Method Summary | |
FirstOrderLogicParser |
getParser()
Get the value of parser. |
void |
setParser(FirstOrderLogicParser v)
Set the value of parser. |
Object |
translate(Object o)
|
CNFSentence |
translate(String text)
Translates a sentence into CNF. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParserBasedTranslator()
public ParserBasedTranslator(FirstOrderLogicParser parser)
Method Detail |
public FirstOrderLogicParser getParser()
public void setParser(FirstOrderLogicParser v)
v
- Value to assign to parser.public Object translate(Object o)
translate
in interface Translator
public CNFSentence translate(String text)
FirstOrderLogicTranslator
translate
in interface FirstOrderLogicTranslator
text
- the string representation of a sentence.
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |