Generate a "cotrie" automaton from a finite series, given as a file of (weighted) words.
Arguments:
<2>foo
foo
. In this case <2>foo
is read as a five-letter word.Postconditions:
Result.is_codeterministic()
See also:
import vcsn
vcsn.B.cotrie('''foo
bar
fubar''')
%%file words
hello
world
hell
word
vcsn.B.cotrie('words')
vcsn.Q.cotrie('''one
<20>twenty
<30>thirty
<40>fourty
<50>fifty''')
vcsn.context('lat<law_char, law_char>, q').cotrie('''
<1>one|un
<2>two|deux
<3>three|trois
<4>four|quatre
<14>forteen|quatorze
<40>forty|quarante
''')