-
Notifications
You must be signed in to change notification settings - Fork 27
/
CHEATSHEET
41 lines (37 loc) · 1.47 KB
/
CHEATSHEET
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
,ggggggggggg,
dP"""88""""""Y8,
Yb, 88 `8b
`" 88 ,8P gg gg
88aaaad8P" "" ""
88""""" gg gg ,ggg,,ggg, gg ,ggg,,ggg, gg
88 I8 8I ,8" "8P" "8, 88 ,8" "8P" "8, 88
88 I8, ,8I I8 8I 8I 88 I8 8I 8I 88
88 ,d8b, ,d8I ,dP 8I Yb,_,88,_,dP 8I Yb,_,88,_
88 P""Y88P"8888P' 8I `Y88P""Y88P' 8I `Y88P""Y8
,d8I'
,dP'8I
,8" 8I
I8 8I
`8, ,8I
`Y8P"
IO:
f = Fst.read(...)
f.write(...)
f = string_file(...)
Compilation:
accep("Do you have Camembert?", ...)
cross("Do you have Camembert?", "No.", ...)
string_map([(f, g), (h, i), ...])
cdrewrite(cross("s", "z"), "", "[EOS]", sigma_star)
Sample operations:
closure(f, ...) f.closure(...)
compose(f, g, ...) f @ g
concat(f, g) f + g f.concat(g)
difference(f, g, ...) f - g
invert(f) f.invert()
optimize(f) f.optimize()
project(f, ...) f.project(...)
f.paths(...)
shortestpath(f, ...)
f.string(...)
union(f, g, ...) f | g f.union(g)