forked from UFAL-DSG/alex-asr
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsym.pxd
32 lines (28 loc) · 1020 Bytes
/
sym.pxd
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
# distutils: language = c++
from libcpp.string cimport string
from libcpp cimport bool
from util cimport istream
cdef extern from "<fst/symbol-table.h>" namespace "fst":
cdef cppclass SymbolTable:
SymbolTable(SymbolTable &table)
SymbolTable(string &name)
long AddSymbol(string &symbol, long key)
long AddSymbol(string &symbol)
string& Name()
bint Write(string &filename)
bint WriteText (string &filename)
string Find(long key)
long Find(const char* symbol)
unsigned NumSymbols()
string LabeledCheckSum()
cdef cppclass SymbolTableIterator:
SymbolTableIterator(SymbolTable& table)
bint Done()
long Value()
string Symbol()
void Next()
void Reset()
cdef SymbolTable* SymbolTableRead "fst::SymbolTable::Read" (istream &strm,
string& source)
cdef SymbolTable* SymbolTableReadText "fst::SymbolTable::ReadText" (
istream &strm, string& source)