Possible implementation:
scala
def add(e: Expression, level: Int = 0): AbstractOperator = {
if (level == 0) new AndOperator(e :: children)
else children.head match {
case c: AbstractOperator => new XYZOperator(c.add(e, level - 1) :: children.tail)
case _ => throw OperatorException(this + ": trying to add to smt else than an operator")
}
}
Possible implementation:
scala
def add(e: Expression, level: Int = 0): AbstractOperator = {
if (level == 0) new AndOperator(e :: children)
else children.head match {
case c: AbstractOperator => new XYZOperator(c.add(e, level - 1) :: children.tail)
case _ => throw OperatorException(this + ": trying to add to smt else than an operator")
}
}
Read a sentence and produce a score (the higher, the more confident)
Read a sentence and produce a score (the higher, the more confident)
see AbstractAtomic or AbstractOperator
the Map exchanged between StarChat and the other services
a score (>= 0) which represents its confidence on triggering the state it is in
Not Operator
It can only take one argument --we leave List instead of Set as argument so that Parser.gobble_command can add one Expression. Still, we throw exception if more than one child is added
Created by mal on 21/02/2017.