# 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.

## Examples¶

In [1]:
import vcsn
ctx = vcsn.context("law_char, b")
ctx

Out[1]:
$\{\ldots\}^*\to\mathbb{B}$
In [2]:
a = ctx.expression("(cat)+(dog)*").standard()
a

Out[2]:
In [3]:
al = a.letterize()
al

Out[3]:
In [4]:
al.context()

Out[4]:
$(\{a, c, d, g, o, t\})^?\to\mathbb{B}$

Note that here, the transitions are no longer words (law) but instead letters (nullableset<lal_char>).

In [5]:
ctx_t = vcsn.context("lat<law_char, law_char, lal_char>, z")

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

Out[6]:
In [7]:
bl = b.letterize()
bl

Out[7]:
In [8]:
bl.context()

Out[8]:
$(\{a, c, t\})^? \times (\{b, d, g, o\})^? \times (\{c, d\})^?\to\mathbb{Z}$

Here, all three labelsets have been converted to letters or the empty word (nullableset<lal_char>).