Class ClNLPTranslator
- java.lang.Object
-
- net.sf.tweety.logics.translators.Translator
-
- net.sf.tweety.logics.translators.clnlp.ClNLPTranslator
-
public class ClNLPTranslator extends Translator
Translates between propositional Conditionals and NLP.- Author:
- Sebastian Homann
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.logics.translators.Translator
TT_ASSOC, TT_ATOM, TT_PREDICATE, TT_RULE
-
-
Constructor Summary
Constructors Constructor Description ClNLPTranslator()
-
Method Summary
Modifier and Type Method Description protected Map<Class<?>,net.sf.tweety.commons.util.Pair<Integer,Class<?>>>createTranslateMap()net.sf.tweety.logics.cl.syntax.ClBeliefSettoCl(net.sf.tweety.lp.nlp.syntax.NLPProgram program)Translate the given NLP-program into a conditional belief set.net.sf.tweety.logics.cl.syntax.ConditionaltoCl(net.sf.tweety.lp.nlp.syntax.NLPRule rule)Translates the given NLP-rule into a conditional.net.sf.tweety.lp.nlp.syntax.NLPProgramtoNLP(net.sf.tweety.logics.cl.syntax.ClBeliefSet conditionals)Translate the given conditional belief set into a NLP-program.-
Methods inherited from class net.sf.tweety.logics.translators.Translator
createInstance, getTranslateInfo, translateAssociative, translateAtom, translatePredicate, translateRule, translateUsingMap
-
-
-
-
Method Detail
-
toCl
public net.sf.tweety.logics.cl.syntax.Conditional toCl(net.sf.tweety.lp.nlp.syntax.NLPRule rule)
Translates the given NLP-rule into a conditional. This only works for unquantified ground nlp-rules. In all other cases, an exception is thrown.- Parameters:
rule- some rule- Returns:
- a conditional
-
toCl
public net.sf.tweety.logics.cl.syntax.ClBeliefSet toCl(net.sf.tweety.lp.nlp.syntax.NLPProgram program)
Translate the given NLP-program into a conditional belief set.- Parameters:
program- The NLP-program that is translated- Returns:
- A conditional belief set representing the given NLP-program.
-
toNLP
public net.sf.tweety.lp.nlp.syntax.NLPProgram toNLP(net.sf.tweety.logics.cl.syntax.ClBeliefSet conditionals)
Translate the given conditional belief set into a NLP-program.- Parameters:
conditionals- The set of conditionals that is translated- Returns:
- A NLP-program representing the given set of conditionals
-
createTranslateMap
protected Map<Class<?>,net.sf.tweety.commons.util.Pair<Integer,Class<?>>> createTranslateMap()
- Specified by:
createTranslateMapin classTranslator
-
-