In [1]:
import vcsn
ctx = vcsn.context("law_char, b")
ctx
Out[1]:
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]:
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]:
Here, all three labelsets have been converted to letters or the empty word (nullableset<lal_char>
).