import vcsn
ctx = vcsn.context("law_char, b")
ctx

a = ctx.expression("(cat)+(dog)*").standard()
a

al = a.letterize()
al

al.context()

"""
Explanation: automaton.letterize()
Split the transition labels into letters.
Preconditions:
- None
Postconditions:
- the output transitions are atomic, meaning that they are composed of one letter (as viewed by the labelset). The labelset is adapted to provide this guarantee.
See also:
- automaton.is_letterized
- automaton.is_realtime
- automaton.realtime
Examples
End of explanation
"""


ctx_t = vcsn.context("lat<law_char, law_char, lal_char>, z")

b = ctx_t.expression(r"(<2>'cat,dog,c')*+'\e,b,d'").derived_term()
b

bl = b.letterize()
bl

bl.context()

"""
Explanation: Note that here, the transitions are no longer words (law) but instead letters (nullableset&lt;lal_char&gt;).
End of explanation
"""


