Generate a "trie" automaton (a prefix tree) from a finite series, given as a polynomial of words.
Postconditions:
Result.is_deterministic()
Result = p.trie.shortest(N)
for a large enough N.Properties:
See also:
import vcsn
language = '\e+a+b+abc+abcd+abdc'
b = vcsn.context('lal_char, b')
B = vcsn.context('law_char, b')
B.polynomial(language).trie()
b.expression(language).standard().determinize().strip()
series = '<2>\e + <3>a + <4>b + <5>abc + <6>abcd + <7>abdc'
q = vcsn.context('lal_char, z')
Q = vcsn.context('law_char, z')
Q.polynomial(series).trie()
q.expression(series).standard().determinize().strip()