File: test9.py

package info (click to toggle)
hfst 3.16.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,532 kB
  • sloc: cpp: 101,875; sh: 6,717; python: 5,225; yacc: 4,985; lex: 2,900; makefile: 2,017; xml: 6
file content (6 lines) | stat: -rw-r--r-- 168 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
import libhfst
tr = libhfst.regex('[a::1 a:b::0.3 (b::0)]::0.7;')
tr.push_weights(libhfst.TO_INITIAL_STATE)
print(tr)
tr.push_weights(libhfst.TO_FINAL_STATE)
print(tr)