Evaluates the weight of the given word through the automata.
Preconditions:
import vcsn
a = vcsn.context('lal(ab), b').de_bruijn(2)
a
a.eval('b')
a.eval('bbabb')
You can also write automaton('word')
to evaluate a word:
a('bbabb')
a = vcsn.Z.expression('(<2>C+c)los(<3>e(s+<4>d)+ing)').standard()
a.shortest(10)
a.eval('Closing')
a.eval('close') # but not enough