struct __pyx_obj_9pywrapfst_MutableFst;
struct __pyx_obj_9pywrapfst_VectorFst;
struct __pyx_obj_9pywrapfst_Arc;
-struct __pyx_obj_9pywrapfst_ArcIterator;
-struct __pyx_obj_9pywrapfst_MutableArcIterator;
-struct __pyx_obj_9pywrapfst_StateIterator;
+struct __pyx_obj_9pywrapfst__ArcIterator;
+struct __pyx_obj_9pywrapfst__MutableArcIterator;
+struct __pyx_obj_9pywrapfst__StateIterator;
struct __pyx_obj_9pywrapfst_Compiler;
struct __pyx_obj_9pywrapfst_FarReader;
struct __pyx_obj_9pywrapfst_FarWriter;
struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__;
-/* "cpywrapfst.pxd":507
+/* "cpywrapfst.pxd":509
*
*
* ctypedef pair[int64, const FstClass *] LabelFstClassPair # <<<<<<<<<<<<<<
*/
typedef std::pair<int64,fst::script::FstClass const *> __pyx_t_10cpywrapfst_LabelFstClassPair;
-/* "cpywrapfst.pxd":509
+/* "cpywrapfst.pxd":511
* ctypedef pair[int64, const FstClass *] LabelFstClassPair
*
* ctypedef pair[int64, int64] LabelPair # <<<<<<<<<<<<<<
struct __pyx_opt_args_9pywrapfst__shortestdistance;
struct __pyx_opt_args_9pywrapfst_shortestpath;
-/* "pywrapfst.pxd":103
+/* "pywrapfst.pxd":104
* # SymbolTable.
*
* ctypedef fst.SymbolTable * SymbolTable_ptr # <<<<<<<<<<<<<<
*/
typedef fst::SymbolTable *__pyx_t_9pywrapfst_SymbolTable_ptr;
-/* "pywrapfst.pxd":104
+/* "pywrapfst.pxd":105
*
* ctypedef fst.SymbolTable * SymbolTable_ptr
* ctypedef const fst.SymbolTable * const_SymbolTable_ptr # <<<<<<<<<<<<<<
*/
typedef fst::SymbolTable const *__pyx_t_9pywrapfst_const_SymbolTable_ptr;
-/* "pywrapfst.pxd":160
+/* "pywrapfst.pxd":161
* cdef fst.SymbolTable *_mutable_raw_ptr_or_raise(self) except *
*
* cpdef int64 add_symbol(self, symbol, int64 key=?) except * # <<<<<<<<<<<<<<
int64 key;
};
-/* "pywrapfst.pxd":207
+/* "pywrapfst.pxd":208
*
*
* ctypedef fst.EncodeMapperClass * EncodeMapperClass_ptr # <<<<<<<<<<<<<<
*/
typedef fst::script::EncodeMapperClass *__pyx_t_9pywrapfst_EncodeMapperClass_ptr;
-/* "pywrapfst.pxd":241
+/* "pywrapfst.pxd":242
*
*
* ctypedef fst.FstClass * FstClass_ptr # <<<<<<<<<<<<<<
*/
typedef fst::script::FstClass *__pyx_t_9pywrapfst_FstClass_ptr;
-/* "pywrapfst.pxd":242
+/* "pywrapfst.pxd":243
*
* ctypedef fst.FstClass * FstClass_ptr
* ctypedef const fst.FstClass * const_FstClass_ptr # <<<<<<<<<<<<<<
*/
typedef fst::script::FstClass const *__pyx_t_9pywrapfst_const_FstClass_ptr;
-/* "pywrapfst.pxd":243
+/* "pywrapfst.pxd":244
* ctypedef fst.FstClass * FstClass_ptr
* ctypedef const fst.FstClass * const_FstClass_ptr
* ctypedef fst.MutableFstClass * MutableFstClass_ptr # <<<<<<<<<<<<<<
*/
typedef fst::script::MutableFstClass *__pyx_t_9pywrapfst_MutableFstClass_ptr;
-/* "pywrapfst.pxd":244
+/* "pywrapfst.pxd":245
* ctypedef const fst.FstClass * const_FstClass_ptr
* ctypedef fst.MutableFstClass * MutableFstClass_ptr
* ctypedef fst.VectorFstClass * VectorFstClass_ptr # <<<<<<<<<<<<<<
*/
typedef fst::script::VectorFstClass *__pyx_t_9pywrapfst_VectorFstClass_ptr;
-/* "pywrapfst.pxd":260
+/* "pywrapfst.pxd":261
* cpdef Fst copy(self)
*
* cpdef void draw(self, # <<<<<<<<<<<<<<
bool show_weight_one;
};
-/* "pywrapfst.pxd":292
+/* "pywrapfst.pxd":293
* cpdef _FstSymbolTableView output_symbols(self)
*
* cpdef string print(self, # <<<<<<<<<<<<<<
PyObject *missing_sym;
};
-/* "pywrapfst.pxd":325
+/* "pywrapfst.pxd":326
* cpdef void add_states(self, size_t)
*
* cdef void _arcsort(self, sort_type=?) except * # <<<<<<<<<<<<<<
PyObject *sort_type;
};
-/* "pywrapfst.pxd":327
+/* "pywrapfst.pxd":328
* cdef void _arcsort(self, sort_type=?) except *
*
* cdef void _closure(self, bool closure_plus=?) # <<<<<<<<<<<<<<
bool closure_plus;
};
-/* "pywrapfst.pxd":335
+/* "pywrapfst.pxd":336
* cdef void _decode(self, EncodeMapper) except *
*
* cdef void _delete_arcs(self, int64 state, size_t n=?) except * # <<<<<<<<<<<<<<
size_t n;
};
-/* "pywrapfst.pxd":337
+/* "pywrapfst.pxd":338
* cdef void _delete_arcs(self, int64 state, size_t n=?) except *
*
* cdef void _delete_states(self, states=?) except * # <<<<<<<<<<<<<<
PyObject *states;
};
-/* "pywrapfst.pxd":343
+/* "pywrapfst.pxd":344
* cdef void _invert(self)
*
* cdef void _minimize(self, float delta=?, bool allow_nondet=?) except * # <<<<<<<<<<<<<<
*
- * cpdef MutableArcIterator mutable_arcs(self, int64 state)
+ * cpdef _MutableArcIterator mutable_arcs(self, int64 state)
*/
struct __pyx_opt_args_9pywrapfst_10MutableFst__minimize {
int __pyx_n;
bool allow_nondet;
};
-/* "pywrapfst.pxd":351
+/* "pywrapfst.pxd":352
* cdef void _project(self, project_type) except *
*
* cdef void _prune(self, float delta=?, int64 nstate=?, weight=?) except * # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":353
+/* "pywrapfst.pxd":354
* cdef void _prune(self, float delta=?, int64 nstate=?, weight=?) except *
*
* cdef void _push(self, # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":358
+/* "pywrapfst.pxd":359
* bool to_final=?)
*
* cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * # <<<<<<<<<<<<<<
PyObject *opairs;
};
-/* "pywrapfst.pxd":360
+/* "pywrapfst.pxd":361
* cdef void _relabel_pairs(self, ipairs=?, opairs=?) except *
*
* cdef void _relabel_tables(self, # <<<<<<<<<<<<<<
bool attach_new_osymbols;
};
-/* "pywrapfst.pxd":374
+/* "pywrapfst.pxd":375
* cdef void _reserve_states(self, int64 n)
*
* cdef void _reweight(self, potentials, bool to_final=?) except * # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":376
+/* "pywrapfst.pxd":377
* cdef void _reweight(self, potentials, bool to_final=?) except *
*
* cdef void _rmepsilon(self, # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":383
+/* "pywrapfst.pxd":384
* float delta=?) except *
*
* cdef void _set_final(self, int64 state, weight=?) except * # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":489
+/* "pywrapfst.pxd":490
*
*
* cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":491
+/* "pywrapfst.pxd":492
* cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?)
*
* cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":493
+/* "pywrapfst.pxd":494
* cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?)
*
* cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":498
+/* "pywrapfst.pxd":499
* bool connect=?)
*
* cpdef Fst convert(Fst ifst, fst_type=?) # <<<<<<<<<<<<<<
PyObject *fst_type;
};
-/* "pywrapfst.pxd":500
+/* "pywrapfst.pxd":501
* cpdef Fst convert(Fst ifst, fst_type=?)
*
* cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<<
bool increment_subsequential_label;
};
-/* "pywrapfst.pxd":508
+/* "pywrapfst.pxd":509
* bool increment_subsequential_label=?)
*
* cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":513
+/* "pywrapfst.pxd":514
* bool connect=?)
*
* cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":519
+/* "pywrapfst.pxd":520
* weight=?)
*
* cpdef MutableFst epsnormalize(Fst ifst, bool eps_norm_output=?) # <<<<<<<<<<<<<<
bool eps_norm_output;
};
-/* "pywrapfst.pxd":521
+/* "pywrapfst.pxd":522
* cpdef MutableFst epsnormalize(Fst ifst, bool eps_norm_output=?)
*
* cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":523
+/* "pywrapfst.pxd":524
* cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?)
*
* cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except * # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":525
+/* "pywrapfst.pxd":526
* cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except *
*
* cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":530
+/* "pywrapfst.pxd":531
* bool connect=?)
*
* cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":532
+/* "pywrapfst.pxd":533
* cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?)
*
* cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":537
+/* "pywrapfst.pxd":538
* weight=?)
*
* cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":545
+/* "pywrapfst.pxd":546
* bool to_final=?)
*
* cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<<
uint64 seed;
};
-/* "pywrapfst.pxd":553
+/* "pywrapfst.pxd":554
* uint64 seed=?) except *
*
* cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<<
uint64 seed;
};
-/* "pywrapfst.pxd":561
+/* "pywrapfst.pxd":562
* uint64 seed=?)
*
* cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<<
int64 return_label;
};
-/* "pywrapfst.pxd":567
+/* "pywrapfst.pxd":568
* int64 return_label=?)
*
* cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?) # <<<<<<<<<<<<<<
bool require_superinitial;
};
-/* "pywrapfst.pxd":569
+/* "pywrapfst.pxd":570
* cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?)
*
* cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
bool reverse;
};
-/* "pywrapfst.pxd":576
+/* "pywrapfst.pxd":577
* bool reverse=?) except *
*
* cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":71
+/* "pywrapfst.pxd":72
*
*
- * cdef class Weight(object): # <<<<<<<<<<<<<<
+ * cdef class Weight: # <<<<<<<<<<<<<<
*
* cdef unique_ptr[fst.WeightClass] _weight
*/
};
-/* "pywrapfst.pxd":107
+/* "pywrapfst.pxd":108
*
*
- * cdef class SymbolTableView(object): # <<<<<<<<<<<<<<
+ * cdef class SymbolTableView: # <<<<<<<<<<<<<<
*
* cdef const fst.SymbolTable *_raw(self)
*/
};
-/* "pywrapfst.pxd":138
+/* "pywrapfst.pxd":139
*
*
* cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":146
+/* "pywrapfst.pxd":147
*
*
* cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":154
+/* "pywrapfst.pxd":155
*
*
* cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":167
+/* "pywrapfst.pxd":168
*
*
* cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":175
+/* "pywrapfst.pxd":176
*
*
* cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":198
+/* "pywrapfst.pxd":199
*
*
- * cdef class _SymbolTableIterator(object): # <<<<<<<<<<<<<<
+ * cdef class _SymbolTableIterator: # <<<<<<<<<<<<<<
*
* cdef SymbolTableView _table
*/
};
-/* "pywrapfst.pxd":210
+/* "pywrapfst.pxd":211
*
*
- * cdef class EncodeMapper(object): # <<<<<<<<<<<<<<
+ * cdef class EncodeMapper: # <<<<<<<<<<<<<<
*
* cdef shared_ptr[fst.EncodeMapperClass] _mapper
*/
};
-/* "pywrapfst.pxd":247
+/* "pywrapfst.pxd":248
*
*
- * cdef class Fst(object): # <<<<<<<<<<<<<<
+ * cdef class Fst: # <<<<<<<<<<<<<<
*
* cdef shared_ptr[fst.FstClass] _fst
*/
};
-/* "pywrapfst.pxd":313
+/* "pywrapfst.pxd":314
*
*
* cdef class MutableFst(Fst): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":394
+/* "pywrapfst.pxd":395
*
*
* cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":416
+/* "pywrapfst.pxd":417
*
*
- * cdef class Arc(object): # <<<<<<<<<<<<<<
+ * cdef class Arc: # <<<<<<<<<<<<<<
*
* cdef unique_ptr[fst.ArcClass] _arc
*/
};
-/* "pywrapfst.pxd":426
+/* "pywrapfst.pxd":427
*
*
- * cdef class ArcIterator(object): # <<<<<<<<<<<<<<
+ * cdef class _ArcIterator: # <<<<<<<<<<<<<<
*
* cdef shared_ptr[fst.FstClass] _fst
*/
-struct __pyx_obj_9pywrapfst_ArcIterator {
+struct __pyx_obj_9pywrapfst__ArcIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_9pywrapfst_ArcIterator *__pyx_vtab;
+ struct __pyx_vtabstruct_9pywrapfst__ArcIterator *__pyx_vtab;
std::shared_ptr<fst::script::FstClass> _fst;
std::unique_ptr<fst::script::ArcIteratorClass> _aiter;
};
-/* "pywrapfst.pxd":448
+/* "pywrapfst.pxd":449
*
*
- * cdef class MutableArcIterator(object): # <<<<<<<<<<<<<<
+ * cdef class _MutableArcIterator: # <<<<<<<<<<<<<<
*
* cdef shared_ptr[fst.MutableFstClass] _mfst
*/
-struct __pyx_obj_9pywrapfst_MutableArcIterator {
+struct __pyx_obj_9pywrapfst__MutableArcIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *__pyx_vtab;
+ struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *__pyx_vtab;
std::shared_ptr<fst::script::MutableFstClass> _mfst;
std::unique_ptr<fst::script::MutableArcIteratorClass> _aiter;
};
-/* "pywrapfst.pxd":472
+/* "pywrapfst.pxd":473
*
*
- * cdef class StateIterator(object): # <<<<<<<<<<<<<<
+ * cdef class _StateIterator: # <<<<<<<<<<<<<<
*
* cdef shared_ptr[fst.FstClass] _fst
*/
-struct __pyx_obj_9pywrapfst_StateIterator {
+struct __pyx_obj_9pywrapfst__StateIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_9pywrapfst_StateIterator *__pyx_vtab;
+ struct __pyx_vtabstruct_9pywrapfst__StateIterator *__pyx_vtab;
std::shared_ptr<fst::script::FstClass> _fst;
std::unique_ptr<fst::script::StateIteratorClass> _siter;
};
-/* "pywrapfst.pxd":592
+/* "pywrapfst.pxd":593
*
*
- * cdef class Compiler(object): # <<<<<<<<<<<<<<
+ * cdef class Compiler: # <<<<<<<<<<<<<<
*
* cdef unique_ptr[stringstream] _sstrm
*/
};
-/* "pywrapfst.pxd":613
+/* "pywrapfst.pxd":614
* # FarReader.
*
- * cdef class FarReader(object): # <<<<<<<<<<<<<<
+ * cdef class FarReader: # <<<<<<<<<<<<<<
*
* cdef unique_ptr[fst.FarReaderClass] _reader
*/
};
-/* "pywrapfst.pxd":638
+/* "pywrapfst.pxd":639
* # FarWriter.
*
- * cdef class FarWriter(object): # <<<<<<<<<<<<<<
+ * cdef class FarWriter: # <<<<<<<<<<<<<<
*
* cdef unique_ptr[fst.FarWriterClass] _writer
*/
};
-/* "pywrapfst.pyx":3271
+/* "pywrapfst.pyx":3276
*
* # Magic method used to get a Pythonic Iterator API out of the C++ API.
* def __iter__(self): # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ {
PyObject_HEAD
- struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self;
+ struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self;
};
-/* "pywrapfst.pyx":404
+/* "pywrapfst.pyx":406
*
*
* cdef class Weight: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_Weight *__pyx_vtabptr_9pywrapfst_Weight;
-/* "pywrapfst.pyx":731
+/* "pywrapfst.pyx":733
*
*
* cdef class SymbolTableView: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *__pyx_vtabptr_9pywrapfst_SymbolTableView;
-/* "pywrapfst.pyx":934
+/* "pywrapfst.pyx":936
*
*
* cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTableView *__pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTableView;
-/* "pywrapfst.pyx":958
+/* "pywrapfst.pyx":960
*
*
* cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__FstSymbolTableView *__pyx_vtabptr_9pywrapfst__FstSymbolTableView;
-/* "pywrapfst.pyx":981
+/* "pywrapfst.pyx":983
*
*
* cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *__pyx_vtabptr_9pywrapfst__MutableSymbolTable;
-/* "pywrapfst.pyx":1053
+/* "pywrapfst.pyx":1055
*
*
* cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTableView *__pyx_vtabptr_9pywrapfst__MutableFstSymbolTableView;
-/* "pywrapfst.pyx":1068
+/* "pywrapfst.pyx":1070
*
*
* cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_SymbolTable *__pyx_vtabptr_9pywrapfst_SymbolTable;
-/* "pywrapfst.pyx":1296
+/* "pywrapfst.pyx":1298
*
*
* cdef class EncodeMapper: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *__pyx_vtabptr_9pywrapfst_EncodeMapper;
-/* "pywrapfst.pyx":1563
+/* "pywrapfst.pyx":1565
*
*
* cdef class Fst: # <<<<<<<<<<<<<<
struct __pyx_vtabstruct_9pywrapfst_Fst {
std::string (*_local_render_svg)(std::string const &);
std::string (*arc_type)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
- struct __pyx_obj_9pywrapfst_ArcIterator *(*arcs)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch);
+ struct __pyx_obj_9pywrapfst__ArcIterator *(*arcs)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch);
struct __pyx_obj_9pywrapfst_Fst *(*copy)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
void (*draw)(struct __pyx_obj_9pywrapfst_Fst *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_draw *__pyx_optional_args);
struct __pyx_obj_9pywrapfst_Weight *(*final)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch);
struct __pyx_obj_9pywrapfst__FstSymbolTableView *(*output_symbols)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
std::string (*print)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_print *__pyx_optional_args);
int64 (*start)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
- struct __pyx_obj_9pywrapfst_StateIterator *(*states)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
+ struct __pyx_obj_9pywrapfst__StateIterator *(*states)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
bool (*verify)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
std::string (*weight_type)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch);
void (*write)(struct __pyx_obj_9pywrapfst_Fst *, PyObject *, int __pyx_skip_dispatch);
static struct __pyx_vtabstruct_9pywrapfst_Fst *__pyx_vtabptr_9pywrapfst_Fst;
-/* "pywrapfst.pyx":2028
+/* "pywrapfst.pyx":2030
*
*
* cdef class MutableFst(Fst): # <<<<<<<<<<<<<<
void (*_encode)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_obj_9pywrapfst_EncodeMapper *);
void (*_invert)(struct __pyx_obj_9pywrapfst_MutableFst *);
void (*_minimize)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_opt_args_9pywrapfst_10MutableFst__minimize *__pyx_optional_args);
- struct __pyx_obj_9pywrapfst_MutableArcIterator *(*mutable_arcs)(struct __pyx_obj_9pywrapfst_MutableFst *, int64, int __pyx_skip_dispatch);
+ struct __pyx_obj_9pywrapfst__MutableArcIterator *(*mutable_arcs)(struct __pyx_obj_9pywrapfst_MutableFst *, int64, int __pyx_skip_dispatch);
int64 (*num_states)(struct __pyx_obj_9pywrapfst_MutableFst *, int __pyx_skip_dispatch);
void (*_project)(struct __pyx_obj_9pywrapfst_MutableFst *, PyObject *);
void (*_prune)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_opt_args_9pywrapfst_10MutableFst__prune *__pyx_optional_args);
static struct __pyx_vtabstruct_9pywrapfst_MutableFst *__pyx_vtabptr_9pywrapfst_MutableFst;
-/* "pywrapfst.pyx":2890
+/* "pywrapfst.pyx":2892
*
*
* cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_VectorFst *__pyx_vtabptr_9pywrapfst_VectorFst;
-/* "pywrapfst.pyx":3073
+/* "pywrapfst.pyx":3075
*
*
* cdef class Arc: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_Arc *__pyx_vtabptr_9pywrapfst_Arc;
-/* "pywrapfst.pyx":3140
+/* "pywrapfst.pyx":3145
*
*
- * cdef class ArcIterator: # <<<<<<<<<<<<<<
+ * cdef class _ArcIterator: # <<<<<<<<<<<<<<
*
* """
*/
-struct __pyx_vtabstruct_9pywrapfst_ArcIterator {
- bool (*done)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
- uint8 (*flags)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
- void (*next)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
- size_t (*position)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
- void (*reset)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
- void (*seek)(struct __pyx_obj_9pywrapfst_ArcIterator *, size_t, int __pyx_skip_dispatch);
- void (*set_flags)(struct __pyx_obj_9pywrapfst_ArcIterator *, uint8, uint8, int __pyx_skip_dispatch);
- PyObject *(*value)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_9pywrapfst__ArcIterator {
+ bool (*done)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
+ uint8 (*flags)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
+ void (*next)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
+ size_t (*position)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
+ void (*reset)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
+ void (*seek)(struct __pyx_obj_9pywrapfst__ArcIterator *, size_t, int __pyx_skip_dispatch);
+ void (*set_flags)(struct __pyx_obj_9pywrapfst__ArcIterator *, uint8, uint8, int __pyx_skip_dispatch);
+ PyObject *(*value)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_9pywrapfst_ArcIterator *__pyx_vtabptr_9pywrapfst_ArcIterator;
+static struct __pyx_vtabstruct_9pywrapfst__ArcIterator *__pyx_vtabptr_9pywrapfst__ArcIterator;
-/* "pywrapfst.pyx":3251
+/* "pywrapfst.pyx":3256
*
*
- * cdef class MutableArcIterator: # <<<<<<<<<<<<<<
+ * cdef class _MutableArcIterator: # <<<<<<<<<<<<<<
*
* """
*/
-struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator {
- bool (*done)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
- uint8 (*flags)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
- void (*next)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
- size_t (*position)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
- void (*reset)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
- void (*seek)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, size_t, int __pyx_skip_dispatch);
- void (*set_flags)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, uint8, uint8, int __pyx_skip_dispatch);
- void (*set_value)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch);
- PyObject *(*value)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator {
+ bool (*done)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
+ uint8 (*flags)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
+ void (*next)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
+ size_t (*position)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
+ void (*reset)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
+ void (*seek)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, size_t, int __pyx_skip_dispatch);
+ void (*set_flags)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, uint8, uint8, int __pyx_skip_dispatch);
+ void (*set_value)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch);
+ PyObject *(*value)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *__pyx_vtabptr_9pywrapfst_MutableArcIterator;
+static struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *__pyx_vtabptr_9pywrapfst__MutableArcIterator;
-/* "pywrapfst.pyx":3371
+/* "pywrapfst.pyx":3384
*
*
- * cdef class StateIterator: # <<<<<<<<<<<<<<
+ * cdef class _StateIterator: # <<<<<<<<<<<<<<
*
* """
*/
-struct __pyx_vtabstruct_9pywrapfst_StateIterator {
- bool (*done)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch);
- void (*next)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch);
- void (*reset)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch);
- int64 (*value)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_9pywrapfst__StateIterator {
+ bool (*done)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch);
+ void (*next)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch);
+ void (*reset)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch);
+ int64 (*value)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_9pywrapfst_StateIterator *__pyx_vtabptr_9pywrapfst_StateIterator;
+static struct __pyx_vtabstruct_9pywrapfst__StateIterator *__pyx_vtabptr_9pywrapfst__StateIterator;
-/* "pywrapfst.pyx":4280
+/* "pywrapfst.pyx":4294
*
*
* cdef class Compiler: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_Compiler *__pyx_vtabptr_9pywrapfst_Compiler;
-/* "pywrapfst.pyx":4417
+/* "pywrapfst.pyx":4431
*
*
* cdef class FarReader: # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_FarReader *__pyx_vtabptr_9pywrapfst_FarReader;
-/* "pywrapfst.pyx":4572
+/* "pywrapfst.pyx":4586
*
*
* cdef class FarWriter: # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx_obj_9pywrapfst_EncodeMapper *__pyx_v_self, struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_symbols); /* proto*/
static std::string __pyx_f_9pywrapfst_3Fst__local_render_svg(std::string const &__pyx_v_dot); /* proto*/
static std::string __pyx_f_9pywrapfst_3Fst_arc_type(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_3Fst_arcs(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch); /* proto*/
+static struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_f_9pywrapfst_3Fst_arcs(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9pywrapfst_Fst *__pyx_f_9pywrapfst_3Fst_copy(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_9pywrapfst_3Fst_draw(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_draw *__pyx_optional_args); /* proto*/
static struct __pyx_obj_9pywrapfst_Weight *__pyx_f_9pywrapfst_3Fst_final(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9pywrapfst__FstSymbolTableView *__pyx_f_9pywrapfst_3Fst_output_symbols(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static std::string __pyx_f_9pywrapfst_3Fst_print(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_print *__pyx_optional_args); /* proto*/
static int64 __pyx_f_9pywrapfst_3Fst_start(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static struct __pyx_obj_9pywrapfst_StateIterator *__pyx_f_9pywrapfst_3Fst_states(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static struct __pyx_obj_9pywrapfst__StateIterator *__pyx_f_9pywrapfst_3Fst_states(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static bool __pyx_f_9pywrapfst_3Fst_verify(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static std::string __pyx_f_9pywrapfst_3Fst_weight_type(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_9pywrapfst_3Fst_write(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__encode(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_obj_9pywrapfst_EncodeMapper *__pyx_v_mapper); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__invert(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__minimize(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__minimize *__pyx_optional_args); /* proto*/
-static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch); /* proto*/
+static struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch); /* proto*/
static int64 __pyx_f_9pywrapfst_10MutableFst_num_states(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__project(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, PyObject *__pyx_v_project_type); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__prune(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__prune *__pyx_optional_args); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__set_start(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int64 __pyx_v_state); /* proto*/
static void __pyx_f_9pywrapfst_10MutableFst__topsort(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self); /* proto*/
static struct __pyx_obj_9pywrapfst_Arc *__pyx_f_9pywrapfst_3Arc_copy(struct __pyx_obj_9pywrapfst_Arc *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static bool __pyx_f_9pywrapfst_11ArcIterator_done(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static uint8 __pyx_f_9pywrapfst_11ArcIterator_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_next(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static size_t __pyx_f_9pywrapfst_11ArcIterator_position(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_reset(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_seek(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch); /* proto*/
-static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static bool __pyx_f_9pywrapfst_18MutableArcIterator_done(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static uint8 __pyx_f_9pywrapfst_18MutableArcIterator_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_next(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static size_t __pyx_f_9pywrapfst_18MutableArcIterator_position(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_reset(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_seek(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_set_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc, int __pyx_skip_dispatch); /* proto*/
-static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static bool __pyx_f_9pywrapfst_13StateIterator_done(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_13StateIterator_next(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static void __pyx_f_9pywrapfst_13StateIterator_reset(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
-static int64 __pyx_f_9pywrapfst_13StateIterator_value(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static bool __pyx_f_9pywrapfst_12_ArcIterator_done(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static uint8 __pyx_f_9pywrapfst_12_ArcIterator_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_next(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static size_t __pyx_f_9pywrapfst_12_ArcIterator_position(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_reset(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_seek(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch); /* proto*/
+static PyObject *__pyx_f_9pywrapfst_12_ArcIterator_value(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static bool __pyx_f_9pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static uint8 __pyx_f_9pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static size_t __pyx_f_9pywrapfst_19_MutableArcIterator_position(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_set_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc, int __pyx_skip_dispatch); /* proto*/
+static PyObject *__pyx_f_9pywrapfst_19_MutableArcIterator_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static bool __pyx_f_9pywrapfst_14_StateIterator_done(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_14_StateIterator_next(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static void __pyx_f_9pywrapfst_14_StateIterator_reset(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
+static int64 __pyx_f_9pywrapfst_14_StateIterator_value(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_9pywrapfst_Fst *__pyx_f_9pywrapfst_8Compiler_compile(struct __pyx_obj_9pywrapfst_Compiler *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_9pywrapfst_8Compiler_write(struct __pyx_obj_9pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_expression, int __pyx_skip_dispatch); /* proto*/
static std::string __pyx_f_9pywrapfst_9FarReader_arc_type(struct __pyx_obj_9pywrapfst_FarReader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyTypeObject *__pyx_ptype_9pywrapfst_MutableFst = 0;
static PyTypeObject *__pyx_ptype_9pywrapfst_VectorFst = 0;
static PyTypeObject *__pyx_ptype_9pywrapfst_Arc = 0;
-static PyTypeObject *__pyx_ptype_9pywrapfst_ArcIterator = 0;
-static PyTypeObject *__pyx_ptype_9pywrapfst_MutableArcIterator = 0;
-static PyTypeObject *__pyx_ptype_9pywrapfst_StateIterator = 0;
+static PyTypeObject *__pyx_ptype_9pywrapfst__ArcIterator = 0;
+static PyTypeObject *__pyx_ptype_9pywrapfst__MutableArcIterator = 0;
+static PyTypeObject *__pyx_ptype_9pywrapfst__StateIterator = 0;
static PyTypeObject *__pyx_ptype_9pywrapfst_Compiler = 0;
static PyTypeObject *__pyx_ptype_9pywrapfst_FarReader = 0;
static PyTypeObject *__pyx_ptype_9pywrapfst_FarWriter = 0;
static std::string __pyx_f_9pywrapfst_path_tostring(PyObject *); /*proto*/
static enum fst::ComposeFilter __pyx_f_9pywrapfst__get_compose_filter(std::string const &); /*proto*/
static enum fst::QueueType __pyx_f_9pywrapfst__get_queue_type(std::string const &); /*proto*/
-static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selection(std::string const &); /*proto*/
+static fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selection(std::string const &); /*proto*/
static enum fst::ReplaceLabelType __pyx_f_9pywrapfst__get_replace_label_type(std::string const &, bool); /*proto*/
static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_one(std::string const &, PyObject *); /*proto*/
static fst::script::WeightClass __pyx_f_9pywrapfst__get_WeightClass_or_zero(std::string const &, PyObject *); /*proto*/
static const char __pyx_k_queue_type[] = "queue_type";
static const char __pyx_k_subprocess[] = "subprocess";
static const char __pyx_k_write_text[] = "write_text";
-static const char __pyx_k_ArcIterator[] = "ArcIterator";
+static const char __pyx_k_ArcIterator[] = "_ArcIterator";
static const char __pyx_k_FstArgError[] = "FstArgError";
static const char __pyx_k_NO_EPSILONS[] = "NO_EPSILONS";
static const char __pyx_k_NO_STATE_ID[] = "NO_STATE_ID";
static const char __pyx_k_FstProperties[] = "FstProperties";
static const char __pyx_k_NO_I_EPSILONS[] = "NO_I_EPSILONS";
static const char __pyx_k_NO_O_EPSILONS[] = "NO_O_EPSILONS";
-static const char __pyx_k_StateIterator[] = "StateIterator";
+static const char __pyx_k_StateIterator[] = "_StateIterator";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_SymbolTable_2[] = "SymbolTable";
static const char __pyx_k_available_key[] = "available_key";
static const char __pyx_k_shortestdistance[] = "shortestdistance";
static const char __pyx_k_ARC_I_LABEL_VALUE[] = "ARC_I_LABEL_VALUE";
static const char __pyx_k_ARC_O_LABEL_VALUE[] = "ARC_O_LABEL_VALUE";
-static const char __pyx_k_ArcIterator_at_0x[] = "<ArcIterator at 0x";
+static const char __pyx_k_ArcIterator_at_0x[] = "<_ArcIterator at 0x";
static const char __pyx_k_BINARY_PROPERTIES[] = "BINARY_PROPERTIES";
static const char __pyx_k_FstBadWeightError[] = "FstBadWeightError";
static const char __pyx_k_UNWEIGHTED_CYCLES[] = "UNWEIGHTED_CYCLES";
static const char __pyx_k_Compilation_failed[] = "Compilation failed";
static const char __pyx_k_EncodeMapper_at_0x[] = "<EncodeMapper at 0x";
static const char __pyx_k_FstSymbolTableView[] = "_FstSymbolTableView";
-static const char __pyx_k_MutableArcIterator[] = "MutableArcIterator";
+static const char __pyx_k_MutableArcIterator[] = "_MutableArcIterator";
static const char __pyx_k_MutableSymbolTable[] = "_MutableSymbolTable";
static const char __pyx_k_NOT_I_LABEL_SORTED[] = "NOT_I_LABEL_SORTED";
static const char __pyx_k_NOT_O_LABEL_SORTED[] = "NOT_O_LABEL_SORTED";
static const char __pyx_k_NON_I_DETERMINISTIC[] = "NON_I_DETERMINISTIC";
static const char __pyx_k_NON_O_DETERMINISTIC[] = "NON_O_DETERMINISTIC";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
-static const char __pyx_k_StateIterator_at_0x[] = "<StateIterator at 0x";
+static const char __pyx_k_StateIterator_at_0x[] = "<_StateIterator at 0x";
static const char __pyx_k_SymbolTableIterator[] = "_SymbolTableIterator";
static const char __pyx_k_attach_new_isymbols[] = "attach_new_isymbols";
static const char __pyx_k_attach_new_osymbols[] = "attach_new_osymbols";
static const char __pyx_k_DELETE_STATE_PROPERTIES[] = "DELETE_STATE_PROPERTIES";
static const char __pyx_k_Read_from_string_failed[] = "Read from string failed";
static const char __pyx_k_Unknown_projection_type[] = "Unknown projection type: ";
-static const char __pyx_k_MutableArcIterator_at_0x[] = "<MutableArcIterator at 0x";
+static const char __pyx_k_MutableArcIterator_at_0x[] = "<_MutableArcIterator at 0x";
static const char __pyx_k_RM_SUPERFINAL_PROPERTIES[] = "RM_SUPERFINAL_PROPERTIES";
static const char __pyx_k_State_index_out_of_range[] = "State index out of range";
static const char __pyx_k_ADD_SUPERFINAL_PROPERTIES[] = "ADD_SUPERFINAL_PROPERTIES";
static const char __pyx_k_Cannot_topsort_cyclic_FST[] = "Cannot topsort cyclic FST";
-static const char __pyx_k_MutableArcIterator___iter[] = "MutableArcIterator.__iter__";
+static const char __pyx_k_MutableArcIterator___iter[] = "_MutableArcIterator.__iter__";
static const char __pyx_k_MutableFstSymbolTableView[] = "_MutableFstSymbolTableView";
static const char __pyx_k_SymbolTableIterator_at_0x[] = "<_SymbolTableIterator at 0x";
static const char __pyx_k_const_Fst_SymbolTableView[] = "<const Fst SymbolTableView ";
static int __pyx_pf_9pywrapfst_3Arc_9nextstate_2__set__(struct __pyx_obj_9pywrapfst_Arc *__pyx_v_self, int64 __pyx_v_value); /* proto */
static PyObject *__pyx_pf_9pywrapfst_3Arc_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_Arc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9pywrapfst_3Arc_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_Arc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, int64 __pyx_v_state); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_4__iter__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_8done(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_10flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_12next(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_14position(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_16reset(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_18seek(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, size_t __pyx_v_a); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_20set_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_22value(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_ifst, int64 __pyx_v_state); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_4__iter__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_7done(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_9flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_11next(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_13position(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_15reset(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_17seek(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, size_t __pyx_v_a); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_19set_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_23value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_4__iter__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_8done(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_10next(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_12reset(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_14value(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static int __pyx_pf_9pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, int64 __pyx_v_state); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_4__iter__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_8done(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_10flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_12next(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_14position(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_16reset(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_18seek(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, size_t __pyx_v_a); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_20set_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_22value(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator___repr__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static int __pyx_pf_9pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_ifst, int64 __pyx_v_state); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_4__iter__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_7__next__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_9done(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_11flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_13next(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_15position(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_17reset(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_19seek(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, size_t __pyx_v_a); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_21set_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_23set_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_25value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_27__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_29__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator___repr__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static int __pyx_pf_9pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_4__iter__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_6__next__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_8done(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_10next(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_12reset(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_14value(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_9pywrapfst_20arcmap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, float __pyx_v_delta, PyObject *__pyx_v_map_type, double __pyx_v_power, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_9pywrapfst_22compose(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst2, PyObject *__pyx_v_compose_filter, bool __pyx_v_connect); /* proto */
static PyObject *__pyx_pf_9pywrapfst_24convert(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, PyObject *__pyx_v_fst_type); /* proto */
static PyObject *__pyx_tp_new_9pywrapfst_MutableFst(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9pywrapfst_VectorFst(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9pywrapfst_Arc(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_9pywrapfst_ArcIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_9pywrapfst_MutableArcIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_9pywrapfst_StateIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_9pywrapfst__ArcIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_9pywrapfst__MutableArcIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_9pywrapfst__StateIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9pywrapfst_Compiler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9pywrapfst_FarReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_9pywrapfst_FarWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_codeobj__70;
/* Late includes */
-/* "pywrapfst.pyx":175
+/* "pywrapfst.pyx":177
*
*
* cdef string tostring(data) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("tostring", 0);
- /* "pywrapfst.pyx":194
+ /* "pywrapfst.pyx":196
* """
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":195
+ /* "pywrapfst.pyx":197
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str):
* return data # <<<<<<<<<<<<<<
* raise TypeError(f"Expected {str.__name__} but received "
* f"{type(data).__name__}: {data!r}")
*/
- __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L1_error)
__pyx_r = __pyx_t_3;
goto __pyx_L0;
- /* "pywrapfst.pyx":194
+ /* "pywrapfst.pyx":196
* """
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":196
+ /* "pywrapfst.pyx":198
* if isinstance(data, str):
* return data
* raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<<
* f"{type(data).__name__}: {data!r}")
*
*/
- __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = 0;
__pyx_t_6 = 127;
__pyx_t_5 += 9;
__Pyx_GIVEREF(__pyx_kp_u_Expected);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Expected);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6;
__Pyx_GIVEREF(__pyx_kp_u_but_received);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_but_received);
- /* "pywrapfst.pyx":197
+ /* "pywrapfst.pyx":199
* return data
* raise TypeError(f"Expected {str.__name__} but received "
* f"{type(data).__name__}: {data!r}") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
__pyx_t_5 += 2;
__Pyx_GIVEREF(__pyx_kp_u_);
PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_);
- __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
__pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_7);
__pyx_t_7 = 0;
- /* "pywrapfst.pyx":196
+ /* "pywrapfst.pyx":198
* if isinstance(data, str):
* return data
* raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<<
* f"{type(data).__name__}: {data!r}")
*
*/
- __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 196, __pyx_L1_error)
+ __PYX_ERR(0, 198, __pyx_L1_error)
- /* "pywrapfst.pyx":175
+ /* "pywrapfst.pyx":177
*
*
* cdef string tostring(data) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":200
+/* "pywrapfst.pyx":202
*
*
* cdef string weight_tostring(data) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("weight_tostring", 0);
- /* "pywrapfst.pyx":222
+ /* "pywrapfst.pyx":224
* """
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":223
+ /* "pywrapfst.pyx":225
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str):
* return data # <<<<<<<<<<<<<<
* elif isinstance(data, numbers.Number):
* return str(data)
*/
- __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 223, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error)
__pyx_r = __pyx_t_3;
goto __pyx_L0;
- /* "pywrapfst.pyx":222
+ /* "pywrapfst.pyx":224
* """
* # A Python string can be implicitly cast to a C++ string.
* if isinstance(data, str): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":224
+ /* "pywrapfst.pyx":226
* if isinstance(data, str):
* return data
* elif isinstance(data, numbers.Number): # <<<<<<<<<<<<<<
* return str(data)
* raise TypeError(f"Expected {str.__name__} but received "
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_2 = PyObject_IsInstance(__pyx_v_data, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error)
+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_data, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":225
+ /* "pywrapfst.pyx":227
* return data
* elif isinstance(data, numbers.Number):
* return str(data) # <<<<<<<<<<<<<<
* raise TypeError(f"Expected {str.__name__} but received "
* f"{type(data).__name__}: {data!r}")
*/
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_3;
goto __pyx_L0;
- /* "pywrapfst.pyx":224
+ /* "pywrapfst.pyx":226
* if isinstance(data, str):
* return data
* elif isinstance(data, numbers.Number): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":226
+ /* "pywrapfst.pyx":228
* elif isinstance(data, numbers.Number):
* return str(data)
* raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<<
* f"{type(data).__name__}: {data!r}")
*
*/
- __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = 0;
__pyx_t_7 = 127;
__pyx_t_6 += 9;
__Pyx_GIVEREF(__pyx_kp_u_Expected);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Expected);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
__Pyx_GIVEREF(__pyx_kp_u_but_received);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_but_received);
- /* "pywrapfst.pyx":227
+ /* "pywrapfst.pyx":229
* return str(data)
* raise TypeError(f"Expected {str.__name__} but received "
* f"{type(data).__name__}: {data!r}") # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7;
__pyx_t_6 += 2;
__Pyx_GIVEREF(__pyx_kp_u_);
PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u_);
- __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_7;
__pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_4);
__pyx_t_4 = 0;
- /* "pywrapfst.pyx":226
+ /* "pywrapfst.pyx":228
* elif isinstance(data, numbers.Number):
* return str(data)
* raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<<
* f"{type(data).__name__}: {data!r}")
*
*/
- __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __PYX_ERR(0, 226, __pyx_L1_error)
+ __PYX_ERR(0, 228, __pyx_L1_error)
- /* "pywrapfst.pyx":200
+ /* "pywrapfst.pyx":202
*
*
* cdef string weight_tostring(data) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":230
+/* "pywrapfst.pyx":232
*
*
* cdef string path_tostring(data) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("path_tostring", 0);
- /* "pywrapfst.pyx":231
+ /* "pywrapfst.pyx":233
*
* cdef string path_tostring(data) except *:
* return tostring(os.fspath(data)) # <<<<<<<<<<<<<<
*
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
}
__pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 231, __pyx_L1_error)
+ __pyx_t_4 = __pyx_f_9pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_4;
goto __pyx_L0;
- /* "pywrapfst.pyx":230
+ /* "pywrapfst.pyx":232
*
*
* cdef string path_tostring(data) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":234
+/* "pywrapfst.pyx":236
*
*
* cdef fst.FarType _get_far_type(const string &far_type) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_far_type", 0);
- /* "pywrapfst.pyx":250
+ /* "pywrapfst.pyx":252
* """
* cdef fst.FarType _far_type
* if not fst.GetFarType(far_type, addr(_far_type)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetFarType(__pyx_v_far_type, (&__pyx_v__far_type)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":251
+ /* "pywrapfst.pyx":253
* cdef fst.FarType _far_type
* if not fst.GetFarType(far_type, addr(_far_type)):
* raise FstArgError(f"Unknown FAR type: {far_type!r}") # <<<<<<<<<<<<<<
* return _far_type
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_far_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_far_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_FAR_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_FAR_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 251, __pyx_L1_error)
+ __PYX_ERR(0, 253, __pyx_L1_error)
- /* "pywrapfst.pyx":250
+ /* "pywrapfst.pyx":252
* """
* cdef fst.FarType _far_type
* if not fst.GetFarType(far_type, addr(_far_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":252
+ /* "pywrapfst.pyx":254
* if not fst.GetFarType(far_type, addr(_far_type)):
* raise FstArgError(f"Unknown FAR type: {far_type!r}")
* return _far_type # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__far_type;
goto __pyx_L0;
- /* "pywrapfst.pyx":234
+ /* "pywrapfst.pyx":236
*
*
* cdef fst.FarType _get_far_type(const string &far_type) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":255
+/* "pywrapfst.pyx":257
*
*
* cdef fst.ComposeFilter _get_compose_filter( # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_compose_filter", 0);
- /* "pywrapfst.pyx":277
+ /* "pywrapfst.pyx":279
* """
* cdef fst.ComposeFilter _compose_filter
* if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetComposeFilter(__pyx_v_compose_filter, (&__pyx_v__compose_filter)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":278
+ /* "pywrapfst.pyx":280
* cdef fst.ComposeFilter _compose_filter
* if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)):
* raise FstArgError(f"Unknown compose filter type: {compose_filter!r}") # <<<<<<<<<<<<<<
* return _compose_filter
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_compose_filter_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_compose_filter_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 278, __pyx_L1_error)
+ __PYX_ERR(0, 280, __pyx_L1_error)
- /* "pywrapfst.pyx":277
+ /* "pywrapfst.pyx":279
* """
* cdef fst.ComposeFilter _compose_filter
* if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":279
+ /* "pywrapfst.pyx":281
* if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)):
* raise FstArgError(f"Unknown compose filter type: {compose_filter!r}")
* return _compose_filter # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__compose_filter;
goto __pyx_L0;
- /* "pywrapfst.pyx":255
+ /* "pywrapfst.pyx":257
*
*
* cdef fst.ComposeFilter _get_compose_filter( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":282
+/* "pywrapfst.pyx":284
*
*
* cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_determinize_type", 0);
- /* "pywrapfst.pyx":298
+ /* "pywrapfst.pyx":300
* """
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(det_type, addr(_det_type)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetDeterminizeType(__pyx_v_det_type, (&__pyx_v__det_type)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":299
+ /* "pywrapfst.pyx":301
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(det_type, addr(_det_type)):
* raise FstArgError(f"Unknown determinization type: {det_type!r}") # <<<<<<<<<<<<<<
* return _det_type
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 299, __pyx_L1_error)
+ __PYX_ERR(0, 301, __pyx_L1_error)
- /* "pywrapfst.pyx":298
+ /* "pywrapfst.pyx":300
* """
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(det_type, addr(_det_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":300
+ /* "pywrapfst.pyx":302
* if not fst.GetDeterminizeType(det_type, addr(_det_type)):
* raise FstArgError(f"Unknown determinization type: {det_type!r}")
* return _det_type # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__det_type;
goto __pyx_L0;
- /* "pywrapfst.pyx":282
+ /* "pywrapfst.pyx":284
*
*
* cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":303
+/* "pywrapfst.pyx":305
*
*
* cdef fst.ProjectType _get_project_type(const string &project_type) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_project_type", 0);
- /* "pywrapfst.pyx":319
+ /* "pywrapfst.pyx":321
* """
* cdef fst.ProjectType _project_type
* if not fst.GetProjectType(project_type, addr(_project_type)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetProjectType(__pyx_v_project_type, (&__pyx_v__project_type)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":320
+ /* "pywrapfst.pyx":322
* cdef fst.ProjectType _project_type
* if not fst.GetProjectType(project_type, addr(_project_type)):
* raise FstArgError(f"Unknown projection type: {project_type!r}") # <<<<<<<<<<<<<<
* return _project_type
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_project_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_project_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 320, __pyx_L1_error)
+ __PYX_ERR(0, 322, __pyx_L1_error)
- /* "pywrapfst.pyx":319
+ /* "pywrapfst.pyx":321
* """
* cdef fst.ProjectType _project_type
* if not fst.GetProjectType(project_type, addr(_project_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":321
+ /* "pywrapfst.pyx":323
* if not fst.GetProjectType(project_type, addr(_project_type)):
* raise FstArgError(f"Unknown projection type: {project_type!r}")
* return _project_type # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__project_type;
goto __pyx_L0;
- /* "pywrapfst.pyx":303
+ /* "pywrapfst.pyx":305
*
*
* cdef fst.ProjectType _get_project_type(const string &project_type) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":324
+/* "pywrapfst.pyx":326
*
*
* cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_queue_type", 0);
- /* "pywrapfst.pyx":343
+ /* "pywrapfst.pyx":345
* """
* cdef fst.QueueType _queue_type
* if not fst.GetQueueType(queue_type, addr(_queue_type)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetQueueType(__pyx_v_queue_type, (&__pyx_v__queue_type)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":344
+ /* "pywrapfst.pyx":346
* cdef fst.QueueType _queue_type
* if not fst.GetQueueType(queue_type, addr(_queue_type)):
* raise FstArgError(f"Unknown queue type: {queue_type!r}") # <<<<<<<<<<<<<<
* return _queue_type
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_queue_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_queue_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 344, __pyx_L1_error)
+ __PYX_ERR(0, 346, __pyx_L1_error)
- /* "pywrapfst.pyx":343
+ /* "pywrapfst.pyx":345
* """
* cdef fst.QueueType _queue_type
* if not fst.GetQueueType(queue_type, addr(_queue_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":345
+ /* "pywrapfst.pyx":347
* if not fst.GetQueueType(queue_type, addr(_queue_type)):
* raise FstArgError(f"Unknown queue type: {queue_type!r}")
* return _queue_type # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__queue_type;
goto __pyx_L0;
- /* "pywrapfst.pyx":324
+ /* "pywrapfst.pyx":326
*
*
* cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":348
+/* "pywrapfst.pyx":350
*
*
* cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<<
* """Matches string with the appropriate RandArcSelection enum value.
*/
-static enum fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selection(std::string const &__pyx_v_select) {
- enum fst::script::RandArcSelection __pyx_v__select;
- enum fst::script::RandArcSelection __pyx_r;
+static fst::script::RandArcSelection __pyx_f_9pywrapfst__get_rand_arc_selection(std::string const &__pyx_v_select) {
+ fst::script::RandArcSelection __pyx_v__select;
+ fst::script::RandArcSelection __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_rand_arc_selection", 0);
- /* "pywrapfst.pyx":368
+ /* "pywrapfst.pyx":370
* """
* cdef fst.RandArcSelection _select
* if not fst.GetRandArcSelection(select, addr(_select)): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetRandArcSelection(__pyx_v_select, (&__pyx_v__select)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":369
+ /* "pywrapfst.pyx":371
* cdef fst.RandArcSelection _select
* if not fst.GetRandArcSelection(select, addr(_select)):
* raise FstArgError(f"Unknown random arc selection type: {select!r}") # <<<<<<<<<<<<<<
* return _select
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 369, __pyx_L1_error)
+ __PYX_ERR(0, 371, __pyx_L1_error)
- /* "pywrapfst.pyx":368
+ /* "pywrapfst.pyx":370
* """
* cdef fst.RandArcSelection _select
* if not fst.GetRandArcSelection(select, addr(_select)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":370
+ /* "pywrapfst.pyx":372
* if not fst.GetRandArcSelection(select, addr(_select)):
* raise FstArgError(f"Unknown random arc selection type: {select!r}")
* return _select # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__select;
goto __pyx_L0;
- /* "pywrapfst.pyx":348
+ /* "pywrapfst.pyx":350
*
*
* cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("pywrapfst._get_rand_arc_selection", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = (enum fst::script::RandArcSelection) 0;
+ __pyx_r = (fst::script::RandArcSelection) 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":373
+/* "pywrapfst.pyx":375
*
*
* cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_replace_label_type", 0);
- /* "pywrapfst.pyx":394
+ /* "pywrapfst.pyx":396
* """
* cdef fst.ReplaceLabelType _replace_label_type
* if not fst.GetReplaceLabelType(replace_label_type, # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(fst::script::GetReplaceLabelType(__pyx_v_replace_label_type, __pyx_v_epsilon_on_replace, (&__pyx_v__replace_label_type)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":397
+ /* "pywrapfst.pyx":399
* epsilon_on_replace,
* addr(_replace_label_type)):
* raise FstArgError(f"Unknown replace label type: {replace_label_type!r}") # <<<<<<<<<<<<<<
* return _replace_label_type
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 397, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_replace_label_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 397, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_replace_label_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 397, __pyx_L1_error)
+ __PYX_ERR(0, 399, __pyx_L1_error)
- /* "pywrapfst.pyx":394
+ /* "pywrapfst.pyx":396
* """
* cdef fst.ReplaceLabelType _replace_label_type
* if not fst.GetReplaceLabelType(replace_label_type, # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":398
+ /* "pywrapfst.pyx":400
* addr(_replace_label_type)):
* raise FstArgError(f"Unknown replace label type: {replace_label_type!r}")
* return _replace_label_type # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__replace_label_type;
goto __pyx_L0;
- /* "pywrapfst.pyx":373
+ /* "pywrapfst.pyx":375
*
*
* cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":424
+/* "pywrapfst.pyx":426
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":425
+ /* "pywrapfst.pyx":427
*
* def __repr__(self):
* return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __str__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
- __PYX_ERR(0, 425, __pyx_L1_error)
+ __PYX_ERR(0, 427, __pyx_L1_error)
}
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
__pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Weight);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string");
- __PYX_ERR(0, 425, __pyx_L1_error)
+ __PYX_ERR(0, 427, __pyx_L1_error)
}
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
__pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
__pyx_t_2 += 6;
__Pyx_GIVEREF(__pyx_kp_u_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":424
+ /* "pywrapfst.pyx":426
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":427
+/* "pywrapfst.pyx":429
* return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>"
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "pywrapfst.pyx":428
+ /* "pywrapfst.pyx":430
*
* def __str__(self):
* return self.to_string() # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string");
- __PYX_ERR(0, 428, __pyx_L1_error)
+ __PYX_ERR(0, 430, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":427
+ /* "pywrapfst.pyx":429
* return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>"
*
* def __str__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":433
+/* "pywrapfst.pyx":435
* # ValueError when that is not appropriate.
*
* def __float__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__float__", 0);
- /* "pywrapfst.pyx":434
+ /* "pywrapfst.pyx":436
*
* def __float__(self):
* return float(self.to_string()) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string");
- __PYX_ERR(0, 434, __pyx_L1_error)
+ __PYX_ERR(0, 436, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":433
+ /* "pywrapfst.pyx":435
* # ValueError when that is not appropriate.
*
* def __float__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":436
+/* "pywrapfst.pyx":438
* return float(self.to_string())
*
* def __init__(self, weight_type, weight): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 436, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 438, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 436, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 438, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 436, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 438, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Weight.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":437
+ /* "pywrapfst.pyx":439
*
* def __init__(self, weight_type, weight):
* self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 437, __pyx_L1_error)
+ __PYX_ERR(0, 439, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error)
- /* "pywrapfst.pyx":438
+ /* "pywrapfst.pyx":440
* def __init__(self, weight_type, weight):
* self._weight.reset(new fst.WeightClass(tostring(weight_type),
* weight_tostring(weight))) # <<<<<<<<<<<<<<
* self._check_weight()
*
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error)
- /* "pywrapfst.pyx":437
+ /* "pywrapfst.pyx":439
*
* def __init__(self, weight_type, weight):
* self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<<
*/
__pyx_v_self->_weight.reset(new fst::script::WeightClass(__pyx_t_1, __pyx_t_2));
- /* "pywrapfst.pyx":439
+ /* "pywrapfst.pyx":441
* self._weight.reset(new fst.WeightClass(tostring(weight_type),
* weight_tostring(weight)))
* self._check_weight() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight");
- __PYX_ERR(0, 439, __pyx_L1_error)
+ __PYX_ERR(0, 441, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L1_error)
- /* "pywrapfst.pyx":436
+ /* "pywrapfst.pyx":438
* return float(self.to_string())
*
* def __init__(self, weight_type, weight): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":441
+/* "pywrapfst.pyx":443
* self._check_weight()
*
* cdef void _check_weight(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_check_weight", 0);
- /* "pywrapfst.pyx":442
+ /* "pywrapfst.pyx":444
*
* cdef void _check_weight(self) except *:
* if self.type() == b"none": # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type");
- __PYX_ERR(0, 442, __pyx_L1_error)
+ __PYX_ERR(0, 444, __pyx_L1_error)
}
__pyx_t_1 = ((((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0) == ((char const *)"none")) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":443
+ /* "pywrapfst.pyx":445
* cdef void _check_weight(self) except *:
* if self.type() == b"none":
* raise FstArgError("Weight type not found") # <<<<<<<<<<<<<<
* if not self.member():
* raise FstBadWeightError("Invalid weight")
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Weight_type_not_found);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 443, __pyx_L1_error)
+ __PYX_ERR(0, 445, __pyx_L1_error)
- /* "pywrapfst.pyx":442
+ /* "pywrapfst.pyx":444
*
* cdef void _check_weight(self) except *:
* if self.type() == b"none": # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":444
+ /* "pywrapfst.pyx":446
* if self.type() == b"none":
* raise FstArgError("Weight type not found")
* if not self.member(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member");
- __PYX_ERR(0, 444, __pyx_L1_error)
+ __PYX_ERR(0, 446, __pyx_L1_error)
}
__pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->member(__pyx_v_self, 0) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":445
+ /* "pywrapfst.pyx":447
* raise FstArgError("Weight type not found")
* if not self.member():
* raise FstBadWeightError("Invalid weight") # <<<<<<<<<<<<<<
*
* cpdef Weight copy(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Invalid_weight) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Invalid_weight);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 445, __pyx_L1_error)
+ __PYX_ERR(0, 447, __pyx_L1_error)
- /* "pywrapfst.pyx":444
+ /* "pywrapfst.pyx":446
* if self.type() == b"none":
* raise FstArgError("Weight type not found")
* if not self.member(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":441
+ /* "pywrapfst.pyx":443
* self._check_weight()
*
* cdef void _check_weight(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":447
+/* "pywrapfst.pyx":449
* raise FstBadWeightError("Invalid weight")
*
* cpdef Weight copy(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_9copy)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 447, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 449, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":453
+ /* "pywrapfst.pyx":455
* Returns a copy of the Weight.
* """
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(deref(self._weight)))
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":454
+ /* "pywrapfst.pyx":456
* """
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(deref(self._weight))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 454, __pyx_L1_error)
+ __PYX_ERR(0, 456, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 454, __pyx_L1_error)
+ __PYX_ERR(0, 456, __pyx_L1_error)
}
__pyx_v__weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_weight)));
- /* "pywrapfst.pyx":455
+ /* "pywrapfst.pyx":457
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(deref(self._weight)))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":447
+ /* "pywrapfst.pyx":449
* raise FstBadWeightError("Invalid weight")
*
* cpdef Weight copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":461
+/* "pywrapfst.pyx":463
*
* @classmethod
* def zero(cls, weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("zero", 0);
- /* "pywrapfst.pyx":467
+ /* "pywrapfst.pyx":469
* Constructs semiring zero.
* """
* return _zero(weight_type) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":461
+ /* "pywrapfst.pyx":463
*
* @classmethod
* def zero(cls, weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":470
+/* "pywrapfst.pyx":472
*
* @classmethod
* def one(cls, weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("one", 0);
- /* "pywrapfst.pyx":476
+ /* "pywrapfst.pyx":478
* Constructs semiring One.
* """
* return _one(weight_type) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__one(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__one(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":470
+ /* "pywrapfst.pyx":472
*
* @classmethod
* def one(cls, weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":479
+/* "pywrapfst.pyx":481
*
* @classmethod
* def no_weight(cls, weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("no_weight", 0);
- /* "pywrapfst.pyx":485
+ /* "pywrapfst.pyx":487
* Constructs a non-member weight in the semiring.
* """
* return _no_weight(weight_type) # <<<<<<<<<<<<<<
* def __eq__(Weight w1, Weight w2):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__no_weight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__no_weight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":479
+ /* "pywrapfst.pyx":481
*
* @classmethod
* def no_weight(cls, weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":487
+/* "pywrapfst.pyx":489
* return _no_weight(weight_type)
*
* def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 487, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 489, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_6Weight_16__eq__(((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w2));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__eq__", 0);
- /* "pywrapfst.pyx":488
+ /* "pywrapfst.pyx":490
*
* def __eq__(Weight w1, Weight w2):
* return fst.Eq(deref(w1._weight), deref(w2._weight)) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_w1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 488, __pyx_L1_error)
+ __PYX_ERR(0, 490, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_w2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 488, __pyx_L1_error)
+ __PYX_ERR(0, 490, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":487
+ /* "pywrapfst.pyx":489
* return _no_weight(weight_type)
*
* def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":490
+/* "pywrapfst.pyx":492
* return fst.Eq(deref(w1._weight), deref(w2._weight))
*
* def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 490, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_9pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 492, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_6Weight_18__ne__(((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_w2));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__ne__", 0);
- /* "pywrapfst.pyx":491
+ /* "pywrapfst.pyx":493
*
* def __ne__(Weight w1, Weight w2):
* return not w1 == w2 # <<<<<<<<<<<<<<
* cpdef string to_string(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 493, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":490
+ /* "pywrapfst.pyx":492
* return fst.Eq(deref(w1._weight), deref(w2._weight))
*
* def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":493
+/* "pywrapfst.pyx":495
* return not w1 == w2
*
* cpdef string to_string(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_21to_string)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":494
+ /* "pywrapfst.pyx":496
*
* cpdef string to_string(self):
* return self._weight.get().ToString() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 494, __pyx_L1_error)
+ __PYX_ERR(0, 496, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_weight.get()->ToString();
goto __pyx_L0;
- /* "pywrapfst.pyx":493
+ /* "pywrapfst.pyx":495
* return not w1 == w2
*
* cpdef string to_string(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("to_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_to_string(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_to_string(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":496
+/* "pywrapfst.pyx":498
* return self._weight.get().ToString()
*
* cpdef string type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_23type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":501
+ /* "pywrapfst.pyx":503
* Returns a string indicating the weight type.
* """
* return self._weight.get().Type() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 501, __pyx_L1_error)
+ __PYX_ERR(0, 503, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_weight.get()->Type();
goto __pyx_L0;
- /* "pywrapfst.pyx":496
+ /* "pywrapfst.pyx":498
* return self._weight.get().ToString()
*
* cpdef string type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_6Weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":503
+/* "pywrapfst.pyx":505
* return self._weight.get().Type()
*
* cpdef bool member(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_6Weight_25member)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":504
+ /* "pywrapfst.pyx":506
*
* cpdef bool member(self):
* return self._weight.get().Member() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 504, __pyx_L1_error)
+ __PYX_ERR(0, 506, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_weight.get()->Member();
goto __pyx_L0;
- /* "pywrapfst.pyx":503
+ /* "pywrapfst.pyx":505
* return self._weight.get().Type()
*
* cpdef bool member(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("member", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_6Weight_member(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_6Weight_member(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":507
+/* "pywrapfst.pyx":509
*
*
* cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_plus", 0);
- /* "pywrapfst.pyx":508
+ /* "pywrapfst.pyx":510
*
* cdef Weight _plus(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight),
* deref(rhs._weight))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":509
+ /* "pywrapfst.pyx":511
* cdef Weight _plus(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 509, __pyx_L1_error)
+ __PYX_ERR(0, 511, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 509, __pyx_L1_error)
+ __PYX_ERR(0, 511, __pyx_L1_error)
}
- /* "pywrapfst.pyx":510
+ /* "pywrapfst.pyx":512
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight),
* deref(rhs._weight)))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 510, __pyx_L1_error)
+ __PYX_ERR(0, 512, __pyx_L1_error)
}
- /* "pywrapfst.pyx":509
+ /* "pywrapfst.pyx":511
* cdef Weight _plus(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Plus((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight))));
- /* "pywrapfst.pyx":511
+ /* "pywrapfst.pyx":513
* _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight),
* deref(rhs._weight))))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":507
+ /* "pywrapfst.pyx":509
*
*
* cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":514
+/* "pywrapfst.pyx":516
*
*
* def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 514, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 516, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plus") < 0)) __PYX_ERR(0, 514, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "plus") < 0)) __PYX_ERR(0, 516, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 516, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.plus", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 514, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 514, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 516, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 516, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_plus(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("plus", 0);
- /* "pywrapfst.pyx":534
+ /* "pywrapfst.pyx":536
* FstBadWeightError: invalid weight.
* """
* cdef Weight _weight = _plus(lhs, rhs) # <<<<<<<<<<<<<<
* _weight._check_weight()
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":535
+ /* "pywrapfst.pyx":537
* """
* cdef Weight _weight = _plus(lhs, rhs)
* _weight._check_weight() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight");
- __PYX_ERR(0, 535, __pyx_L1_error)
+ __PYX_ERR(0, 537, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 535, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L1_error)
- /* "pywrapfst.pyx":536
+ /* "pywrapfst.pyx":538
* cdef Weight _weight = _plus(lhs, rhs)
* _weight._check_weight()
* return _weight # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v__weight);
goto __pyx_L0;
- /* "pywrapfst.pyx":514
+ /* "pywrapfst.pyx":516
*
*
* def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":539
+/* "pywrapfst.pyx":541
*
*
* cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_times", 0);
- /* "pywrapfst.pyx":540
+ /* "pywrapfst.pyx":542
*
* cdef Weight _times(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight),
* deref(rhs._weight))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":541
+ /* "pywrapfst.pyx":543
* cdef Weight _times(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 541, __pyx_L1_error)
+ __PYX_ERR(0, 543, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 541, __pyx_L1_error)
+ __PYX_ERR(0, 543, __pyx_L1_error)
}
- /* "pywrapfst.pyx":542
+ /* "pywrapfst.pyx":544
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight),
* deref(rhs._weight)))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 542, __pyx_L1_error)
+ __PYX_ERR(0, 544, __pyx_L1_error)
}
- /* "pywrapfst.pyx":541
+ /* "pywrapfst.pyx":543
* cdef Weight _times(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Times((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight))));
- /* "pywrapfst.pyx":543
+ /* "pywrapfst.pyx":545
* _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight),
* deref(rhs._weight))))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":539
+ /* "pywrapfst.pyx":541
*
*
* cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":546
+/* "pywrapfst.pyx":548
*
*
* def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 546, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 548, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "times") < 0)) __PYX_ERR(0, 546, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "times") < 0)) __PYX_ERR(0, 548, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 546, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 548, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.times", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 546, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 546, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 548, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 548, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_2times(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("times", 0);
- /* "pywrapfst.pyx":566
+ /* "pywrapfst.pyx":568
* FstBadWeightError: Invalid weight.
* """
* cdef Weight _weight = _times(lhs, rhs) # <<<<<<<<<<<<<<
* _weight._check_weight()
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":567
+ /* "pywrapfst.pyx":569
* """
* cdef Weight _weight = _times(lhs, rhs)
* _weight._check_weight() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight");
- __PYX_ERR(0, 567, __pyx_L1_error)
+ __PYX_ERR(0, 569, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L1_error)
- /* "pywrapfst.pyx":568
+ /* "pywrapfst.pyx":570
* cdef Weight _weight = _times(lhs, rhs)
* _weight._check_weight()
* return _weight # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v__weight);
goto __pyx_L0;
- /* "pywrapfst.pyx":546
+ /* "pywrapfst.pyx":548
*
*
* def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":571
+/* "pywrapfst.pyx":573
*
*
* cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_divide", 0);
- /* "pywrapfst.pyx":572
+ /* "pywrapfst.pyx":574
*
* cdef Weight _divide(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight),
* deref(rhs._weight))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":573
+ /* "pywrapfst.pyx":575
* cdef Weight _divide(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 573, __pyx_L1_error)
+ __PYX_ERR(0, 575, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 573, __pyx_L1_error)
+ __PYX_ERR(0, 575, __pyx_L1_error)
}
- /* "pywrapfst.pyx":574
+ /* "pywrapfst.pyx":576
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight),
* deref(rhs._weight)))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 574, __pyx_L1_error)
+ __PYX_ERR(0, 576, __pyx_L1_error)
}
- /* "pywrapfst.pyx":573
+ /* "pywrapfst.pyx":575
* cdef Weight _divide(Weight lhs, Weight rhs):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Divide((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight))));
- /* "pywrapfst.pyx":575
+ /* "pywrapfst.pyx":577
* _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight),
* deref(rhs._weight))))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":571
+ /* "pywrapfst.pyx":573
*
*
* cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":578
+/* "pywrapfst.pyx":580
*
*
* def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 578, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 580, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "divide") < 0)) __PYX_ERR(0, 578, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "divide") < 0)) __PYX_ERR(0, 580, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 578, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 580, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.divide", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 578, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 578, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 580, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 580, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_4divide(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("divide", 0);
- /* "pywrapfst.pyx":600
+ /* "pywrapfst.pyx":602
* FstBadWeightError: Invalid weight.
* """
* cdef Weight _weight = _divide(lhs, rhs) # <<<<<<<<<<<<<<
* _weight._check_weight()
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":601
+ /* "pywrapfst.pyx":603
* """
* cdef Weight _weight = _divide(lhs, rhs)
* _weight._check_weight() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight");
- __PYX_ERR(0, 601, __pyx_L1_error)
+ __PYX_ERR(0, 603, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L1_error)
- /* "pywrapfst.pyx":602
+ /* "pywrapfst.pyx":604
* cdef Weight _weight = _divide(lhs, rhs)
* _weight._check_weight()
* return _weight # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v__weight);
goto __pyx_L0;
- /* "pywrapfst.pyx":578
+ /* "pywrapfst.pyx":580
*
*
* def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":605
+/* "pywrapfst.pyx":607
*
*
* cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_power", 0);
- /* "pywrapfst.pyx":606
+ /* "pywrapfst.pyx":608
*
* cdef Weight _power(Weight w, size_t n):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n)))
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":607
+ /* "pywrapfst.pyx":609
* cdef Weight _power(Weight w, size_t n):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 607, __pyx_L1_error)
+ __PYX_ERR(0, 609, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_w) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 607, __pyx_L1_error)
+ __PYX_ERR(0, 609, __pyx_L1_error)
}
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Power((*__pyx_v_w->_weight), __pyx_v_n)));
- /* "pywrapfst.pyx":608
+ /* "pywrapfst.pyx":610
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n)))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":605
+ /* "pywrapfst.pyx":607
*
*
* cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":611
+/* "pywrapfst.pyx":613
*
*
* def power(Weight w, size_t n): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 611, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 613, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "power") < 0)) __PYX_ERR(0, 611, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "power") < 0)) __PYX_ERR(0, 613, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_w = ((struct __pyx_obj_9pywrapfst_Weight *)values[0]);
- __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 611, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 613, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.power", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_9pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 611, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_9pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 613, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_6power(__pyx_self, __pyx_v_w, __pyx_v_n);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("power", 0);
- /* "pywrapfst.pyx":628
+ /* "pywrapfst.pyx":630
* FstBadWeightError: Invalid weight.
* """
* cdef Weight _weight = _power(w, n) # <<<<<<<<<<<<<<
* _weight._check_weight()
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":629
+ /* "pywrapfst.pyx":631
* """
* cdef Weight _weight = _power(w, n)
* _weight._check_weight() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight");
- __PYX_ERR(0, 629, __pyx_L1_error)
+ __PYX_ERR(0, 631, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L1_error)
- /* "pywrapfst.pyx":630
+ /* "pywrapfst.pyx":632
* cdef Weight _weight = _power(w, n)
* _weight._check_weight()
* return _weight # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v__weight);
goto __pyx_L0;
- /* "pywrapfst.pyx":611
+ /* "pywrapfst.pyx":613
*
*
* def power(Weight w, size_t n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":633
+/* "pywrapfst.pyx":635
*
*
* cdef fst.WeightClass _get_WeightClass_or_zero(const string &weight_type, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_WeightClass_or_zero", 0);
- /* "pywrapfst.pyx":651
+ /* "pywrapfst.pyx":653
* """
* cdef fst.WeightClass _weight
* if weight is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":652
+ /* "pywrapfst.pyx":654
* cdef fst.WeightClass _weight
* if weight is None:
* _weight = fst.WeightClass.Zero(weight_type) # <<<<<<<<<<<<<<
*/
__pyx_v__weight = fst::script::WeightClass::Zero(__pyx_v_weight_type);
- /* "pywrapfst.pyx":651
+ /* "pywrapfst.pyx":653
* """
* cdef fst.WeightClass _weight
* if weight is None: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":653
+ /* "pywrapfst.pyx":655
* if weight is None:
* _weight = fst.WeightClass.Zero(weight_type)
* elif isinstance(weight, Weight): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":654
+ /* "pywrapfst.pyx":656
* _weight = fst.WeightClass.Zero(weight_type)
* elif isinstance(weight, Weight):
* _weight = deref(<fst.WeightClass *> (<Weight> weight)._weight.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_weight == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 654, __pyx_L1_error)
+ __PYX_ERR(0, 656, __pyx_L1_error)
}
__pyx_v__weight = (*((fst::script::WeightClass *)((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_weight)->_weight.get()));
- /* "pywrapfst.pyx":653
+ /* "pywrapfst.pyx":655
* if weight is None:
* _weight = fst.WeightClass.Zero(weight_type)
* elif isinstance(weight, Weight): # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":656
+ /* "pywrapfst.pyx":658
* _weight = deref(<fst.WeightClass *> (<Weight> weight)._weight.get())
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<<
* raise FstBadWeightError(weight_tostring(weight))
*/
/*else*/ {
- __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 656, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error)
__pyx_v__weight = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_3);
- /* "pywrapfst.pyx":657
+ /* "pywrapfst.pyx":659
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member(): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(__pyx_v__weight.Member() != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":658
+ /* "pywrapfst.pyx":660
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member():
* raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<<
* return _weight
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error)
- __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 658, __pyx_L1_error)
+ __PYX_ERR(0, 660, __pyx_L1_error)
- /* "pywrapfst.pyx":657
+ /* "pywrapfst.pyx":659
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member(): # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pywrapfst.pyx":659
+ /* "pywrapfst.pyx":661
* if not _weight.Member():
* raise FstBadWeightError(weight_tostring(weight))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":633
+ /* "pywrapfst.pyx":635
*
*
* cdef fst.WeightClass _get_WeightClass_or_zero(const string &weight_type, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":662
+/* "pywrapfst.pyx":664
*
*
* cdef fst.WeightClass _get_WeightClass_or_one(const string &weight_type, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_get_WeightClass_or_one", 0);
- /* "pywrapfst.pyx":680
+ /* "pywrapfst.pyx":682
* """
* cdef fst.WeightClass _weight
* if weight is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":681
+ /* "pywrapfst.pyx":683
* cdef fst.WeightClass _weight
* if weight is None:
* _weight = fst.WeightClass.One(weight_type) # <<<<<<<<<<<<<<
*/
__pyx_v__weight = fst::script::WeightClass::One(__pyx_v_weight_type);
- /* "pywrapfst.pyx":680
+ /* "pywrapfst.pyx":682
* """
* cdef fst.WeightClass _weight
* if weight is None: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":682
+ /* "pywrapfst.pyx":684
* if weight is None:
* _weight = fst.WeightClass.One(weight_type)
* elif isinstance(weight, Weight): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":683
+ /* "pywrapfst.pyx":685
* _weight = fst.WeightClass.One(weight_type)
* elif isinstance(weight, Weight):
* _weight = deref(<fst.WeightClass *> (<Weight> weight)._weight.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_weight == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 683, __pyx_L1_error)
+ __PYX_ERR(0, 685, __pyx_L1_error)
}
__pyx_v__weight = (*((fst::script::WeightClass *)((struct __pyx_obj_9pywrapfst_Weight *)__pyx_v_weight)->_weight.get()));
- /* "pywrapfst.pyx":682
+ /* "pywrapfst.pyx":684
* if weight is None:
* _weight = fst.WeightClass.One(weight_type)
* elif isinstance(weight, Weight): # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":685
+ /* "pywrapfst.pyx":687
* _weight = deref(<fst.WeightClass *> (<Weight> weight)._weight.get())
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<<
* raise FstBadWeightError(weight_tostring(weight))
*/
/*else*/ {
- __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error)
__pyx_v__weight = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_3);
- /* "pywrapfst.pyx":686
+ /* "pywrapfst.pyx":688
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member(): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(__pyx_v__weight.Member() != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":687
+ /* "pywrapfst.pyx":689
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member():
* raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<<
* return _weight
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error)
- __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 687, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 689, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
__pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 687, __pyx_L1_error)
+ __PYX_ERR(0, 689, __pyx_L1_error)
- /* "pywrapfst.pyx":686
+ /* "pywrapfst.pyx":688
* else:
* _weight = fst.WeightClass(weight_type, weight_tostring(weight))
* if not _weight.Member(): # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "pywrapfst.pyx":688
+ /* "pywrapfst.pyx":690
* if not _weight.Member():
* raise FstBadWeightError(weight_tostring(weight))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":662
+ /* "pywrapfst.pyx":664
*
*
* cdef fst.WeightClass _get_WeightClass_or_one(const string &weight_type, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":691
+/* "pywrapfst.pyx":693
*
*
* cdef Weight _zero(weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_zero", 0);
- /* "pywrapfst.pyx":692
+ /* "pywrapfst.pyx":694
*
* cdef Weight _zero(weight_type):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":693
+ /* "pywrapfst.pyx":695
* cdef Weight _zero(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 693, __pyx_L1_error)
+ __PYX_ERR(0, 695, __pyx_L1_error)
}
- /* "pywrapfst.pyx":694
+ /* "pywrapfst.pyx":696
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) # <<<<<<<<<<<<<<
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found")
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 694, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 696, __pyx_L1_error)
- /* "pywrapfst.pyx":693
+ /* "pywrapfst.pyx":695
* cdef Weight _zero(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::Zero(__pyx_t_2)));
- /* "pywrapfst.pyx":695
+ /* "pywrapfst.pyx":697
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 695, __pyx_L1_error)
+ __PYX_ERR(0, 697, __pyx_L1_error)
}
__pyx_t_3 = ((__pyx_v__weight->_weight.get()->Type() == ((char const *)"none")) != 0);
if (unlikely(__pyx_t_3)) {
- /* "pywrapfst.pyx":696
+ /* "pywrapfst.pyx":698
* new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found") # <<<<<<<<<<<<<<
* return _weight
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
}
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Weight_type_not_found);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 696, __pyx_L1_error)
+ __PYX_ERR(0, 698, __pyx_L1_error)
- /* "pywrapfst.pyx":695
+ /* "pywrapfst.pyx":697
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":697
+ /* "pywrapfst.pyx":699
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found")
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":691
+ /* "pywrapfst.pyx":693
*
*
* cdef Weight _zero(weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":700
+/* "pywrapfst.pyx":702
*
*
* cdef Weight _one(weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_one", 0);
- /* "pywrapfst.pyx":701
+ /* "pywrapfst.pyx":703
*
* cdef Weight _one(weight_type):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.One(tostring(weight_type))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":702
+ /* "pywrapfst.pyx":704
* cdef Weight _one(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 702, __pyx_L1_error)
+ __PYX_ERR(0, 704, __pyx_L1_error)
}
- /* "pywrapfst.pyx":703
+ /* "pywrapfst.pyx":705
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) # <<<<<<<<<<<<<<
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found")
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error)
- /* "pywrapfst.pyx":702
+ /* "pywrapfst.pyx":704
* cdef Weight _one(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::One(__pyx_t_2)));
- /* "pywrapfst.pyx":704
+ /* "pywrapfst.pyx":706
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.One(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 704, __pyx_L1_error)
+ __PYX_ERR(0, 706, __pyx_L1_error)
}
__pyx_t_3 = ((__pyx_v__weight->_weight.get()->Type() == ((char const *)"none")) != 0);
if (unlikely(__pyx_t_3)) {
- /* "pywrapfst.pyx":705
+ /* "pywrapfst.pyx":707
* new fst.WeightClass(fst.WeightClass.One(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found") # <<<<<<<<<<<<<<
* return _weight
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
}
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_Weight_type_not_found) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Weight_type_not_found);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 705, __pyx_L1_error)
+ __PYX_ERR(0, 707, __pyx_L1_error)
- /* "pywrapfst.pyx":704
+ /* "pywrapfst.pyx":706
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.One(tostring(weight_type))))
* if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":706
+ /* "pywrapfst.pyx":708
* if _weight._weight.get().Type() == b"none":
* raise FstArgError("Weight type not found")
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":700
+ /* "pywrapfst.pyx":702
*
*
* cdef Weight _one(weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":709
+/* "pywrapfst.pyx":711
*
*
* cdef Weight _no_weight(weight_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_no_weight", 0);
- /* "pywrapfst.pyx":710
+ /* "pywrapfst.pyx":712
*
* cdef Weight _no_weight(weight_type):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type))))
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":711
+ /* "pywrapfst.pyx":713
* cdef Weight _no_weight(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 711, __pyx_L1_error)
+ __PYX_ERR(0, 713, __pyx_L1_error)
}
- /* "pywrapfst.pyx":712
+ /* "pywrapfst.pyx":714
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type)))) # <<<<<<<<<<<<<<
* return _weight
*
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 714, __pyx_L1_error)
- /* "pywrapfst.pyx":711
+ /* "pywrapfst.pyx":713
* cdef Weight _no_weight(weight_type):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::NoWeight(__pyx_t_2)));
- /* "pywrapfst.pyx":713
+ /* "pywrapfst.pyx":715
* _weight._weight.reset(
* new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type))))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":709
+ /* "pywrapfst.pyx":711
*
*
* cdef Weight _no_weight(weight_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":745
+/* "pywrapfst.pyx":747
* # Doing so will allow undefined behavior.
*
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":746
+ /* "pywrapfst.pyx":748
*
* def __init__(self):
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") # <<<<<<<<<<<<<<
*
* def __iter__(self):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 746, __pyx_L1_error)
+ __PYX_ERR(0, 748, __pyx_L1_error)
- /* "pywrapfst.pyx":745
+ /* "pywrapfst.pyx":747
* # Doing so will allow undefined behavior.
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":748
+/* "pywrapfst.pyx":750
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __iter__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":749
+ /* "pywrapfst.pyx":751
*
* def __iter__(self):
* return _SymbolTableIterator(self) # <<<<<<<<<<<<<<
* # Registers the class for pickling.
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst__SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst__SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":748
+ /* "pywrapfst.pyx":750
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":753
+/* "pywrapfst.pyx":755
* # Registers the class for pickling.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce__", 0);
- /* "pywrapfst.pyx":754
+ /* "pywrapfst.pyx":756
*
* def __reduce__(self):
* return (_read_SymbolTable_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<<
* # Returns a raw const pointer to SymbolTable.
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string");
- __PYX_ERR(0, 754, __pyx_L1_error)
+ __PYX_ERR(0, 756, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":753
+ /* "pywrapfst.pyx":755
* # Registers the class for pickling.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":760
+/* "pywrapfst.pyx":762
* # Should not be directly accessed except by `_raw_ptr_or_raise()`.
* # All other methods should use the safer _raw_ptr_or_raise() instead.
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_raw", 0);
- /* "pywrapfst.pyx":761
+ /* "pywrapfst.pyx":763
* # All other methods should use the safer _raw_ptr_or_raise() instead.
* cdef const_SymbolTable_ptr _raw(self):
* return NULL # <<<<<<<<<<<<<<
__pyx_r = NULL;
goto __pyx_L0;
- /* "pywrapfst.pyx":760
+ /* "pywrapfst.pyx":762
* # Should not be directly accessed except by `_raw_ptr_or_raise()`.
* # All other methods should use the safer _raw_ptr_or_raise() instead.
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":764
+/* "pywrapfst.pyx":766
*
* # Raises an FstOpError for a nonexistent SymbolTable.
* cdef void _raise_nonexistent(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_raise_nonexistent", 0);
- /* "pywrapfst.pyx":765
+ /* "pywrapfst.pyx":767
* # Raises an FstOpError for a nonexistent SymbolTable.
* cdef void _raise_nonexistent(self) except *:
* raise FstOpError("SymbolTable no longer exists") # <<<<<<<<<<<<<<
*
* # Internal API method that should be used when a const pointer to an
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_SymbolTable_no_longer_exists) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_SymbolTable_no_longer_exists);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 765, __pyx_L1_error)
+ __PYX_ERR(0, 767, __pyx_L1_error)
- /* "pywrapfst.pyx":764
+ /* "pywrapfst.pyx":766
*
* # Raises an FstOpError for a nonexistent SymbolTable.
* cdef void _raise_nonexistent(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":769
+/* "pywrapfst.pyx":771
* # Internal API method that should be used when a const pointer to an
* # fst.SymbolTable is required.
* cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_raw_ptr_or_raise", 0);
- /* "pywrapfst.pyx":770
+ /* "pywrapfst.pyx":772
* # fst.SymbolTable is required.
* cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *:
* cdef const_SymbolTable_ptr _raw = self._raw() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw");
- __PYX_ERR(0, 770, __pyx_L1_error)
+ __PYX_ERR(0, 772, __pyx_L1_error)
}
__pyx_v__raw = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw(__pyx_v_self);
- /* "pywrapfst.pyx":771
+ /* "pywrapfst.pyx":773
* cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *:
* cdef const_SymbolTable_ptr _raw = self._raw()
* if _raw == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v__raw == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":772
+ /* "pywrapfst.pyx":774
* cdef const_SymbolTable_ptr _raw = self._raw()
* if _raw == NULL:
* self._raise_nonexistent() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raise_nonexistent");
- __PYX_ERR(0, 772, __pyx_L1_error)
+ __PYX_ERR(0, 774, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raise_nonexistent(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raise_nonexistent(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L1_error)
- /* "pywrapfst.pyx":771
+ /* "pywrapfst.pyx":773
* cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *:
* cdef const_SymbolTable_ptr _raw = self._raw()
* if _raw == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":773
+ /* "pywrapfst.pyx":775
* if _raw == NULL:
* self._raise_nonexistent()
* return _raw # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__raw;
goto __pyx_L0;
- /* "pywrapfst.pyx":769
+ /* "pywrapfst.pyx":771
* # Internal API method that should be used when a const pointer to an
* # fst.SymbolTable is required.
* cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":775
+/* "pywrapfst.pyx":777
* return _raw
*
* cpdef int64 available_key(self) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_7available_key)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":781
+ /* "pywrapfst.pyx":783
* Returns an integer indicating the next available key index in the table.
* """
* return self._raw_ptr_or_raise().AvailableKey() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 781, __pyx_L1_error)
+ __PYX_ERR(0, 783, __pyx_L1_error)
}
- __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error)
__pyx_r = __pyx_t_6->AvailableKey();
goto __pyx_L0;
- /* "pywrapfst.pyx":775
+ /* "pywrapfst.pyx":777
* return _raw
*
* cpdef int64 available_key(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("available_key", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_available_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_available_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 777, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":783
+/* "pywrapfst.pyx":785
* return self._raw_ptr_or_raise().AvailableKey()
*
* cpdef bytes checksum(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_9checksum)) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 783, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 785, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":789
+ /* "pywrapfst.pyx":791
* Returns a bytestring indicating the label-independent MD5 checksum.
* """
* return self._raw_ptr_or_raise().CheckSum() # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 789, __pyx_L1_error)
+ __PYX_ERR(0, 791, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L1_error)
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":783
+ /* "pywrapfst.pyx":785
* return self._raw_ptr_or_raise().AvailableKey()
*
* cpdef bytes checksum(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("checksum", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":791
+/* "pywrapfst.pyx":793
* return self._raw_ptr_or_raise().CheckSum()
*
* cpdef SymbolTable copy(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_11copy)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_SymbolTable))))) __PYX_ERR(0, 791, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_SymbolTable))))) __PYX_ERR(0, 793, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":797
+ /* "pywrapfst.pyx":799
* Returns a mutable copy of the SymbolTable.
* """
* return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 797, __pyx_L1_error)
+ __PYX_ERR(0, 799, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L1_error)
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(__pyx_t_5->Copy()))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 799, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(__pyx_t_5->Copy()))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":791
+ /* "pywrapfst.pyx":793
* return self._raw_ptr_or_raise().CheckSum()
*
* cpdef SymbolTable copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_15SymbolTableView_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_15SymbolTableView_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":799
+/* "pywrapfst.pyx":801
* return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy()))
*
* def find(self, key): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("find", 0);
- /* "pywrapfst.pyx":816
+ /* "pywrapfst.pyx":818
* not found.
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 816, __pyx_L1_error)
+ __PYX_ERR(0, 818, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error)
__pyx_v__raw = __pyx_t_1;
- /* "pywrapfst.pyx":817
+ /* "pywrapfst.pyx":819
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_4);
/*try:*/ {
- /* "pywrapfst.pyx":818
+ /* "pywrapfst.pyx":820
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try:
* return _raw.FindIndex(tostring(key)) # <<<<<<<<<<<<<<
* return _raw.FindSymbol(key)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L3_error)
- __pyx_t_6 = __Pyx_PyInt_From_int64_t(__pyx_v__raw->Find(__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 818, __pyx_L3_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L3_error)
+ __pyx_t_6 = __Pyx_PyInt_From_int64_t(__pyx_v__raw->Find(__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L7_try_return;
- /* "pywrapfst.pyx":817
+ /* "pywrapfst.pyx":819
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "pywrapfst.pyx":819
+ /* "pywrapfst.pyx":821
* try:
* return _raw.FindIndex(tostring(key))
* except TypeError: # <<<<<<<<<<<<<<
__pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_7) {
__Pyx_AddTraceback("pywrapfst.SymbolTableView.find", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 819, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 821, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_9);
- /* "pywrapfst.pyx":820
+ /* "pywrapfst.pyx":822
* return _raw.FindIndex(tostring(key))
* except TypeError:
* return _raw.FindSymbol(key) # <<<<<<<<<<<<<<
* cpdef int64 get_nth_key(self, ssize_t pos) except *:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L5_except_error)
- __pyx_t_11 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__raw->Find(__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 820, __pyx_L5_except_error)
+ __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 822, __pyx_L5_except_error)
+ __pyx_t_11 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__raw->Find(__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 822, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_11);
__pyx_r = __pyx_t_11;
__pyx_t_11 = 0;
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "pywrapfst.pyx":817
+ /* "pywrapfst.pyx":819
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "pywrapfst.pyx":799
+ /* "pywrapfst.pyx":801
* return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy()))
*
* def find(self, key): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":822
+/* "pywrapfst.pyx":824
* return _raw.FindSymbol(key)
*
* cpdef int64 get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_15get_nth_key)) {
- __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 822, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":834
+ /* "pywrapfst.pyx":836
* The integer index of the n-th key, or NO_LABEL if not found.
* """
* return self._raw_ptr_or_raise().GetNthKey(pos) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 834, __pyx_L1_error)
+ __PYX_ERR(0, 836, __pyx_L1_error)
}
- __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L1_error)
+ __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
__pyx_r = __pyx_t_7->GetNthKey(__pyx_v_pos);
goto __pyx_L0;
- /* "pywrapfst.pyx":822
+ /* "pywrapfst.pyx":824
* return _raw.FindSymbol(key)
*
* cpdef int64 get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_nth_key (wrapper)", 0);
assert(__pyx_arg_pos); {
- __pyx_v_pos = PyInt_AsSsize_t(__pyx_arg_pos); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 822, __pyx_L3_error)
+ __pyx_v_pos = PyInt_AsSsize_t(__pyx_arg_pos); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_nth_key", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 822, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":836
+/* "pywrapfst.pyx":838
* return self._raw_ptr_or_raise().GetNthKey(pos)
*
* cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_17labeled_checksum)) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 836, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 838, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":842
+ /* "pywrapfst.pyx":844
* Returns a bytestring indicating the label-dependent MD5 checksum.
* """
* return self._raw_ptr_or_raise().LabeledCheckSum() # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 842, __pyx_L1_error)
+ __PYX_ERR(0, 844, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L1_error)
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":836
+ /* "pywrapfst.pyx":838
* return self._raw_ptr_or_raise().GetNthKey(pos)
*
* cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("labeled_checksum", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":844
+/* "pywrapfst.pyx":846
* return self._raw_ptr_or_raise().LabeledCheckSum()
*
* cpdef bool member(self, key) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_19member)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":860
+ /* "pywrapfst.pyx":862
* Whether or not the key is present (as a string or a index) in the table.
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 860, __pyx_L1_error)
+ __PYX_ERR(0, 862, __pyx_L1_error)
}
- __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L1_error)
__pyx_v__raw = __pyx_t_6;
- /* "pywrapfst.pyx":861
+ /* "pywrapfst.pyx":863
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_9);
/*try:*/ {
- /* "pywrapfst.pyx":862
+ /* "pywrapfst.pyx":864
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try:
* return _raw.MemberSymbol(tostring(key)) # <<<<<<<<<<<<<<
* except TypeError:
* return _raw.MemberIndex(key)
*/
- __pyx_t_10 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L3_error)
+ __pyx_t_10 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L3_error)
__pyx_r = __pyx_v__raw->Member(__pyx_t_10);
goto __pyx_L7_try_return;
- /* "pywrapfst.pyx":861
+ /* "pywrapfst.pyx":863
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":863
+ /* "pywrapfst.pyx":865
* try:
* return _raw.MemberSymbol(tostring(key))
* except TypeError: # <<<<<<<<<<<<<<
__pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_11) {
__Pyx_AddTraceback("pywrapfst.SymbolTableView.member", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 863, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 865, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_t_3);
- /* "pywrapfst.pyx":864
+ /* "pywrapfst.pyx":866
* return _raw.MemberSymbol(tostring(key))
* except TypeError:
* return _raw.MemberIndex(key) # <<<<<<<<<<<<<<
*
* cpdef string name(self) except *:
*/
- __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_12 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L5_except_error)
+ __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_12 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L5_except_error)
__pyx_r = __pyx_v__raw->Member(__pyx_t_12);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "pywrapfst.pyx":861
+ /* "pywrapfst.pyx":863
* """
* cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise()
* try: # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "pywrapfst.pyx":844
+ /* "pywrapfst.pyx":846
* return self._raw_ptr_or_raise().LabeledCheckSum()
*
* cpdef bool member(self, key) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("member", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_member(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_member(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":866
+/* "pywrapfst.pyx":868
* return _raw.MemberIndex(key)
*
* cpdef string name(self) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_21name)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":872
+ /* "pywrapfst.pyx":874
* Returns the symbol table's name.
* """
* return self._raw_ptr_or_raise().Name() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 872, __pyx_L1_error)
+ __PYX_ERR(0, 874, __pyx_L1_error)
}
- __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 872, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error)
__pyx_r = __pyx_t_6->Name();
goto __pyx_L0;
- /* "pywrapfst.pyx":866
+ /* "pywrapfst.pyx":868
* return _raw.MemberIndex(key)
*
* cpdef string name(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("name", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L1_error)
- __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 868, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":874
+/* "pywrapfst.pyx":876
* return self._raw_ptr_or_raise().Name()
*
* cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_23num_symbols)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":880
+ /* "pywrapfst.pyx":882
* Returns the number of symbols in the symbol table.
* """
* return self._raw_ptr_or_raise().NumSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 880, __pyx_L1_error)
+ __PYX_ERR(0, 882, __pyx_L1_error)
}
- __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 880, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error)
__pyx_r = __pyx_t_6->NumSymbols();
goto __pyx_L0;
- /* "pywrapfst.pyx":874
+ /* "pywrapfst.pyx":876
* return self._raw_ptr_or_raise().Name()
*
* cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("num_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_num_symbols(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 874, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_num_symbols(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":882
+/* "pywrapfst.pyx":884
* return self._raw_ptr_or_raise().NumSymbols()
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_25write)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_source) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_source);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":896
+ /* "pywrapfst.pyx":898
* FstIOError: Write failed.
* """
* if not self._raw_ptr_or_raise().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 896, __pyx_L1_error)
+ __PYX_ERR(0, 898, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error)
- __pyx_t_6 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
__pyx_t_7 = ((!(__pyx_t_5->Write(__pyx_t_6) != 0)) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":897
+ /* "pywrapfst.pyx":899
* """
* if not self._raw_ptr_or_raise().Write(path_tostring(source)):
* raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<<
*
* cpdef void write_text(self, source) except *:
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 897, __pyx_L1_error)
+ __PYX_ERR(0, 899, __pyx_L1_error)
- /* "pywrapfst.pyx":896
+ /* "pywrapfst.pyx":898
* FstIOError: Write failed.
* """
* if not self._raw_ptr_or_raise().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":882
+ /* "pywrapfst.pyx":884
* return self._raw_ptr_or_raise().NumSymbols()
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_15SymbolTableView_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __pyx_f_9pywrapfst_15SymbolTableView_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":899
+/* "pywrapfst.pyx":901
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_27write_text)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_source) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_source);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":913
+ /* "pywrapfst.pyx":915
* FstIOError: Write failed.
* """
* if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 913, __pyx_L1_error)
+ __PYX_ERR(0, 915, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 913, __pyx_L1_error)
- __pyx_t_6 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 913, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
__pyx_t_7 = ((!(__pyx_t_5->WriteText(__pyx_t_6) != 0)) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":914
+ /* "pywrapfst.pyx":916
* """
* if not self._raw_ptr_or_raise().WriteText(path_tostring(source)):
* raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<<
*
* cpdef bytes write_to_string(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 914, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 914, __pyx_L1_error)
+ __PYX_ERR(0, 916, __pyx_L1_error)
- /* "pywrapfst.pyx":913
+ /* "pywrapfst.pyx":915
* FstIOError: Write failed.
* """
* if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":899
+ /* "pywrapfst.pyx":901
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_text", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_15SymbolTableView_write_text(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
+ __pyx_f_9pywrapfst_15SymbolTableView_write_text(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":916
+/* "pywrapfst.pyx":918
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_15SymbolTableView_29write_to_string)) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 916, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 918, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":929
+ /* "pywrapfst.pyx":931
* """
* cdef stringstream _sstrm
* if not self._raw_ptr_or_raise().Write(_sstrm): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 929, __pyx_L1_error)
+ __PYX_ERR(0, 931, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L1_error)
__pyx_t_6 = ((!(__pyx_t_5->Write(__pyx_v__sstrm) != 0)) != 0);
if (unlikely(__pyx_t_6)) {
- /* "pywrapfst.pyx":930
+ /* "pywrapfst.pyx":932
* cdef stringstream _sstrm
* if not self._raw_ptr_or_raise().Write(_sstrm):
* raise FstIOError("Write to string failed") # <<<<<<<<<<<<<<
* return _sstrm.str()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Write_to_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Write_to_string_failed);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 930, __pyx_L1_error)
+ __PYX_ERR(0, 932, __pyx_L1_error)
- /* "pywrapfst.pyx":929
+ /* "pywrapfst.pyx":931
* """
* cdef stringstream _sstrm
* if not self._raw_ptr_or_raise().Write(_sstrm): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":931
+ /* "pywrapfst.pyx":933
* if not self._raw_ptr_or_raise().Write(_sstrm):
* raise FstIOError("Write to string failed")
* return _sstrm.str() # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":916
+ /* "pywrapfst.pyx":918
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_to_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_15SymbolTableView_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":949
+/* "pywrapfst.pyx":951
* # Doing so will allow undefined behavior.
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":950
+ /* "pywrapfst.pyx":952
*
* def __repr__(self):
* return (f"<const EncodeMapper SymbolTableView {self.name()!r} " # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_const_EncodeMapper_SymbolTableV);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name");
- __PYX_ERR(0, 950, __pyx_L1_error)
+ __PYX_ERR(0, 952, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error)
- __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 950, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3;
__Pyx_GIVEREF(__pyx_kp_u_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x);
- /* "pywrapfst.pyx":951
+ /* "pywrapfst.pyx":953
* def __repr__(self):
* return (f"<const EncodeMapper SymbolTableView {self.name()!r} "
* f"at 0x{id(self):x}>") # <<<<<<<<<<<<<<
*
* cdef const_SymbolTable_ptr _raw(self):
*/
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 951, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 951, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- /* "pywrapfst.pyx":950
+ /* "pywrapfst.pyx":952
*
* def __repr__(self):
* return (f"<const EncodeMapper SymbolTableView {self.name()!r} " # <<<<<<<<<<<<<<
* f"at 0x{id(self):x}>")
*
*/
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":949
+ /* "pywrapfst.pyx":951
* # Doing so will allow undefined behavior.
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":953
+/* "pywrapfst.pyx":955
* f"at 0x{id(self):x}>")
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_raw", 0);
- /* "pywrapfst.pyx":954
+ /* "pywrapfst.pyx":956
*
* cdef const_SymbolTable_ptr _raw(self):
* return (self._mapper.get().InputSymbols() if self._input_side # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 954, __pyx_L1_error)
+ __PYX_ERR(0, 956, __pyx_L1_error)
}
if ((__pyx_v_self->_input_side != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 954, __pyx_L1_error)
+ __PYX_ERR(0, 956, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mapper.get()->InputSymbols();
} else {
- /* "pywrapfst.pyx":955
+ /* "pywrapfst.pyx":957
* cdef const_SymbolTable_ptr _raw(self):
* return (self._mapper.get().InputSymbols() if self._input_side
* else self._mapper.get().OutputSymbols()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 955, __pyx_L1_error)
+ __PYX_ERR(0, 957, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mapper.get()->OutputSymbols();
}
__pyx_r = __pyx_t_1;
goto __pyx_L0;
- /* "pywrapfst.pyx":953
+ /* "pywrapfst.pyx":955
* f"at 0x{id(self):x}>")
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":972
+/* "pywrapfst.pyx":974
* # Doing so will allow undefined behavior.
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":973
+ /* "pywrapfst.pyx":975
*
* def __repr__(self):
* return (f"<const Fst SymbolTableView {self.name()!r} " # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_const_Fst_SymbolTableView);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name");
- __PYX_ERR(0, 973, __pyx_L1_error)
+ __PYX_ERR(0, 975, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__FstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error)
- __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__FstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 975, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 975, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3;
__Pyx_GIVEREF(__pyx_kp_u_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x);
- /* "pywrapfst.pyx":974
+ /* "pywrapfst.pyx":976
* def __repr__(self):
* return (f"<const Fst SymbolTableView {self.name()!r} "
* f"at 0x{id(self):x}>") # <<<<<<<<<<<<<<
*
* cdef const_SymbolTable_ptr _raw(self):
*/
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- /* "pywrapfst.pyx":973
+ /* "pywrapfst.pyx":975
*
* def __repr__(self):
* return (f"<const Fst SymbolTableView {self.name()!r} " # <<<<<<<<<<<<<<
* f"at 0x{id(self):x}>")
*
*/
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 975, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":972
+ /* "pywrapfst.pyx":974
* # Doing so will allow undefined behavior.
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":976
+/* "pywrapfst.pyx":978
* f"at 0x{id(self):x}>")
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_raw", 0);
- /* "pywrapfst.pyx":977
+ /* "pywrapfst.pyx":979
*
* cdef const_SymbolTable_ptr _raw(self):
* return (self._fst.get().InputSymbols() if self._input_side # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 977, __pyx_L1_error)
+ __PYX_ERR(0, 979, __pyx_L1_error)
}
if ((__pyx_v_self->_input_side != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 977, __pyx_L1_error)
+ __PYX_ERR(0, 979, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_fst.get()->InputSymbols();
} else {
- /* "pywrapfst.pyx":978
+ /* "pywrapfst.pyx":980
* cdef const_SymbolTable_ptr _raw(self):
* return (self._fst.get().InputSymbols() if self._input_side
* else self._fst.get().OutputSymbols()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 978, __pyx_L1_error)
+ __PYX_ERR(0, 980, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_fst.get()->OutputSymbols();
}
__pyx_r = __pyx_t_1;
goto __pyx_L0;
- /* "pywrapfst.pyx":976
+ /* "pywrapfst.pyx":978
* f"at 0x{id(self):x}>")
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":992
+/* "pywrapfst.pyx":994
* """
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_raw", 0);
- /* "pywrapfst.pyx":993
+ /* "pywrapfst.pyx":995
*
* cdef const_SymbolTable_ptr _raw(self):
* return self._mutable_raw() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw");
- __PYX_ERR(0, 993, __pyx_L1_error)
+ __PYX_ERR(0, 995, __pyx_L1_error)
}
__pyx_r = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":992
+ /* "pywrapfst.pyx":994
* """
*
* cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":999
+/* "pywrapfst.pyx":1001
* # Should not be directly accessed except by `_mutable__raw_ptr_or_raise()`.
* # All other methods should use the safer _mutable__raw_ptr_or_raise() instead.
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_mutable_raw", 0);
- /* "pywrapfst.pyx":1000
+ /* "pywrapfst.pyx":1002
* # All other methods should use the safer _mutable__raw_ptr_or_raise() instead.
* cdef SymbolTable_ptr _mutable_raw(self):
* return NULL # <<<<<<<<<<<<<<
__pyx_r = NULL;
goto __pyx_L0;
- /* "pywrapfst.pyx":999
+ /* "pywrapfst.pyx":1001
* # Should not be directly accessed except by `_mutable__raw_ptr_or_raise()`.
* # All other methods should use the safer _mutable__raw_ptr_or_raise() instead.
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1004
+/* "pywrapfst.pyx":1006
* # Internal API method that should be used when a mutable pointer to an
* # fst.SymbolTable is required.
* cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_mutable_raw_ptr_or_raise", 0);
- /* "pywrapfst.pyx":1005
+ /* "pywrapfst.pyx":1007
* # fst.SymbolTable is required.
* cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *:
* cdef SymbolTable_ptr mutable_raw = self._mutable_raw() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw");
- __PYX_ERR(0, 1005, __pyx_L1_error)
+ __PYX_ERR(0, 1007, __pyx_L1_error)
}
__pyx_v_mutable_raw = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self);
- /* "pywrapfst.pyx":1006
+ /* "pywrapfst.pyx":1008
* cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *:
* cdef SymbolTable_ptr mutable_raw = self._mutable_raw()
* if mutable_raw == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_mutable_raw == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1007
+ /* "pywrapfst.pyx":1009
* cdef SymbolTable_ptr mutable_raw = self._mutable_raw()
* if mutable_raw == NULL:
* self._raise_nonexistent() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raise_nonexistent");
- __PYX_ERR(0, 1007, __pyx_L1_error)
+ __PYX_ERR(0, 1009, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._raise_nonexistent(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._raise_nonexistent(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L1_error)
- /* "pywrapfst.pyx":1006
+ /* "pywrapfst.pyx":1008
* cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *:
* cdef SymbolTable_ptr mutable_raw = self._mutable_raw()
* if mutable_raw == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1008
+ /* "pywrapfst.pyx":1010
* if mutable_raw == NULL:
* self._raise_nonexistent()
* return mutable_raw # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_mutable_raw;
goto __pyx_L0;
- /* "pywrapfst.pyx":1004
+ /* "pywrapfst.pyx":1006
* # Internal API method that should be used when a mutable pointer to an
* # fst.SymbolTable is required.
* cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1010
+/* "pywrapfst.pyx":1012
* return mutable_raw
*
* cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_1add_symbol)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_symbol, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_symbol, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
if (__pyx_t_5) {
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_8 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_8;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1027
+ /* "pywrapfst.pyx":1029
* The integer key of the new symbol.
* """
* cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise");
- __PYX_ERR(0, 1027, __pyx_L1_error)
+ __PYX_ERR(0, 1029, __pyx_L1_error)
}
- __pyx_t_9 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L1_error)
+ __pyx_t_9 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L1_error)
__pyx_v__mutable_raw = __pyx_t_9;
- /* "pywrapfst.pyx":1028
+ /* "pywrapfst.pyx":1030
* """
* cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise()
* cdef string _symbol = tostring(symbol) # <<<<<<<<<<<<<<
* if key != fst.kNoSymbol:
* return _mutable_raw.AddSymbol(_symbol, key)
*/
- __pyx_t_10 = __pyx_f_9pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __pyx_t_10 = __pyx_f_9pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error)
__pyx_v__symbol = __pyx_t_10;
- /* "pywrapfst.pyx":1029
+ /* "pywrapfst.pyx":1031
* cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise()
* cdef string _symbol = tostring(symbol)
* if key != fst.kNoSymbol: # <<<<<<<<<<<<<<
__pyx_t_11 = ((__pyx_v_key != fst::kNoSymbol) != 0);
if (__pyx_t_11) {
- /* "pywrapfst.pyx":1030
+ /* "pywrapfst.pyx":1032
* cdef string _symbol = tostring(symbol)
* if key != fst.kNoSymbol:
* return _mutable_raw.AddSymbol(_symbol, key) # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__mutable_raw->AddSymbol(__pyx_v__symbol, __pyx_v_key);
goto __pyx_L0;
- /* "pywrapfst.pyx":1029
+ /* "pywrapfst.pyx":1031
* cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise()
* cdef string _symbol = tostring(symbol)
* if key != fst.kNoSymbol: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1032
+ /* "pywrapfst.pyx":1034
* return _mutable_raw.AddSymbol(_symbol, key)
* else:
* return _mutable_raw.AddSymbol(_symbol) # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "pywrapfst.pyx":1010
+ /* "pywrapfst.pyx":1012
* return mutable_raw
*
* cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symbol") < 0)) __PYX_ERR(0, 1010, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symbol") < 0)) __PYX_ERR(0, 1012, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_symbol = values[0];
if (values[1]) {
- __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1010, __pyx_L3_error)
+ __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L3_error)
} else {
__pyx_v_key = __pyx_k__6;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1010, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1012, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableSymbolTable.add_symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__Pyx_XDECREF(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.key = __pyx_v_key;
- __pyx_t_1 = __pyx_vtabptr_9pywrapfst__MutableSymbolTable->add_symbol(__pyx_v_self, __pyx_v_symbol, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1010, __pyx_L1_error)
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L1_error)
+ __pyx_t_1 = __pyx_vtabptr_9pywrapfst__MutableSymbolTable->add_symbol(__pyx_v_self, __pyx_v_symbol, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1034
+/* "pywrapfst.pyx":1036
* return _mutable_raw.AddSymbol(_symbol)
*
* cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_3add_table)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_symbols)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_symbols));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":1046
+ /* "pywrapfst.pyx":1048
* symbols: A SymbolTable to be merged with the current table.
* """
* self._mutable_raw_ptr_or_raise().AddTable( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise");
- __PYX_ERR(0, 1046, __pyx_L1_error)
+ __PYX_ERR(0, 1048, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1048, __pyx_L1_error)
- /* "pywrapfst.pyx":1047
+ /* "pywrapfst.pyx":1049
* """
* self._mutable_raw_ptr_or_raise().AddTable(
* deref(symbols._raw_ptr_or_raise())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1047, __pyx_L1_error)
+ __PYX_ERR(0, 1049, __pyx_L1_error)
}
- __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __pyx_t_6 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1049, __pyx_L1_error)
- /* "pywrapfst.pyx":1046
+ /* "pywrapfst.pyx":1048
* symbols: A SymbolTable to be merged with the current table.
* """
* self._mutable_raw_ptr_or_raise().AddTable( # <<<<<<<<<<<<<<
*/
__pyx_t_5->AddTable((*__pyx_t_6));
- /* "pywrapfst.pyx":1034
+ /* "pywrapfst.pyx":1036
* return _mutable_raw.AddSymbol(_symbol)
*
* cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("add_table (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1034, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1036, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_19_MutableSymbolTable_2add_table(((struct __pyx_obj_9pywrapfst__MutableSymbolTable *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add_table", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_symbols, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1034, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error)
+ __pyx_f_9pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_symbols, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1049
+/* "pywrapfst.pyx":1051
* deref(symbols._raw_ptr_or_raise()))
*
* cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableSymbolTable_5set_name)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_new_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_name);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":1050
+ /* "pywrapfst.pyx":1052
*
* cpdef void set_name(self, new_name) except *:
* self._mutable_raw_ptr_or_raise().SetName(tostring(new_name)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise");
- __PYX_ERR(0, 1050, __pyx_L1_error)
+ __PYX_ERR(0, 1052, __pyx_L1_error)
}
- __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L1_error)
- __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L1_error)
+ __pyx_t_5 = ((struct __pyx_vtabstruct_9pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L1_error)
__pyx_t_5->SetName(__pyx_t_6);
- /* "pywrapfst.pyx":1049
+ /* "pywrapfst.pyx":1051
* deref(symbols._raw_ptr_or_raise()))
*
* cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_name", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1049, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
+ __pyx_f_9pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1060
+/* "pywrapfst.pyx":1062
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":1061
+ /* "pywrapfst.pyx":1063
*
* def __repr__(self):
* return f"<Fst SymbolTableView {self.name()!r} at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* cdef SymbolTable_ptr _mutable_raw(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Fst_SymbolTableView);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name");
- __PYX_ERR(0, 1061, __pyx_L1_error)
+ __PYX_ERR(0, 1063, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L1_error)
- __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst__MutableFstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3;
__pyx_t_2 += 6;
__Pyx_GIVEREF(__pyx_kp_u_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x);
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1060
+ /* "pywrapfst.pyx":1062
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1063
+/* "pywrapfst.pyx":1065
* return f"<Fst SymbolTableView {self.name()!r} at 0x{id(self):x}>"
*
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_mutable_raw", 0);
- /* "pywrapfst.pyx":1064
+ /* "pywrapfst.pyx":1066
*
* cdef SymbolTable_ptr _mutable_raw(self):
* return (self._mfst.get().MutableInputSymbols() if self._input_side else # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 1064, __pyx_L1_error)
+ __PYX_ERR(0, 1066, __pyx_L1_error)
}
if ((__pyx_v_self->_input_side != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 1064, __pyx_L1_error)
+ __PYX_ERR(0, 1066, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->MutableInputSymbols();
} else {
- /* "pywrapfst.pyx":1065
+ /* "pywrapfst.pyx":1067
* cdef SymbolTable_ptr _mutable_raw(self):
* return (self._mfst.get().MutableInputSymbols() if self._input_side else
* self._mfst.get().MutableOutputSymbols()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 1065, __pyx_L1_error)
+ __PYX_ERR(0, 1067, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->MutableOutputSymbols();
}
__pyx_r = __pyx_t_1;
goto __pyx_L0;
- /* "pywrapfst.pyx":1063
+ /* "pywrapfst.pyx":1065
* return f"<Fst SymbolTableView {self.name()!r} at 0x{id(self):x}>"
*
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1085
+/* "pywrapfst.pyx":1087
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":1086
+ /* "pywrapfst.pyx":1088
*
* def __repr__(self):
* return f"<SymbolTable {self.name()!r} at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __init__(self, name="<unspecified>"):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_SymbolTable);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name");
- __PYX_ERR(0, 1086, __pyx_L1_error)
+ __PYX_ERR(0, 1088, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
- __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3;
__pyx_t_2 += 6;
__Pyx_GIVEREF(__pyx_kp_u_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x);
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1088, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1085
+ /* "pywrapfst.pyx":1087
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1088
+/* "pywrapfst.pyx":1090
* return f"<SymbolTable {self.name()!r} at 0x{id(self):x}>"
*
* def __init__(self, name="<unspecified>"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1088, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1090, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1088, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1090, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.SymbolTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":1089
+ /* "pywrapfst.pyx":1091
*
* def __init__(self, name="<unspecified>"):
* self._smart_table.reset(new fst.SymbolTable(tostring(name))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table");
- __PYX_ERR(0, 1089, __pyx_L1_error)
+ __PYX_ERR(0, 1091, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
__pyx_v_self->_smart_table.reset(new fst::SymbolTable(__pyx_t_1));
- /* "pywrapfst.pyx":1088
+ /* "pywrapfst.pyx":1090
* return f"<SymbolTable {self.name()!r} at 0x{id(self):x}>"
*
* def __init__(self, name="<unspecified>"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1091
+/* "pywrapfst.pyx":1093
* self._smart_table.reset(new fst.SymbolTable(tostring(name)))
*
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_mutable_raw", 0);
- /* "pywrapfst.pyx":1092
+ /* "pywrapfst.pyx":1094
*
* cdef SymbolTable_ptr _mutable_raw(self):
* return self._smart_table.get() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table");
- __PYX_ERR(0, 1092, __pyx_L1_error)
+ __PYX_ERR(0, 1094, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_smart_table.get();
goto __pyx_L0;
- /* "pywrapfst.pyx":1091
+ /* "pywrapfst.pyx":1093
* self._smart_table.reset(new fst.SymbolTable(tostring(name)))
*
* cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1095
+/* "pywrapfst.pyx":1097
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read", 0);
- /* "pywrapfst.pyx":1110
+ /* "pywrapfst.pyx":1112
* """
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.Read(path_tostring(source))) # <<<<<<<<<<<<<<
* if _symbols.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error)
__pyx_v__symbols.reset(fst::SymbolTable::Read(__pyx_t_1));
- /* "pywrapfst.pyx":1111
+ /* "pywrapfst.pyx":1113
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.Read(path_tostring(source)))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__symbols.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1112
+ /* "pywrapfst.pyx":1114
* _symbols.reset(fst.SymbolTable.Read(path_tostring(source)))
* if _symbols.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<<
* return _init_SymbolTable(move(_symbols))
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1114, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1112, __pyx_L1_error)
+ __PYX_ERR(0, 1114, __pyx_L1_error)
- /* "pywrapfst.pyx":1111
+ /* "pywrapfst.pyx":1113
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.Read(path_tostring(source)))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1113
+ /* "pywrapfst.pyx":1115
* if _symbols.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
* return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1113, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1095
+ /* "pywrapfst.pyx":1097
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1116
+/* "pywrapfst.pyx":1118
*
* @classmethod
* def read_text(cls, source, bool allow_negative_labels=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_text") < 0)) __PYX_ERR(0, 1116, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_text") < 0)) __PYX_ERR(0, 1118, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_source = values[0];
if (values[1]) {
- __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1116, __pyx_L3_error)
+ __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error)
} else {
__pyx_v_allow_negative_labels = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read_text", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1116, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read_text", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1118, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.SymbolTable.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_text", 0);
- /* "pywrapfst.pyx":1133
+ /* "pywrapfst.pyx":1135
* """
* cdef unique_ptr[fst.SymbolTableTextOptions] _opts
* _opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::SymbolTableTextOptions(__pyx_v_allow_negative_labels));
- /* "pywrapfst.pyx":1135
+ /* "pywrapfst.pyx":1137
* _opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels))
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), # <<<<<<<<<<<<<<
* deref(_opts)))
* if _symbols.get() == NULL:
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L1_error)
- /* "pywrapfst.pyx":1136
+ /* "pywrapfst.pyx":1138
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source),
* deref(_opts))) # <<<<<<<<<<<<<<
*/
__pyx_v__symbols.reset(fst::SymbolTable::ReadText(__pyx_t_1, (*__pyx_v__opts)));
- /* "pywrapfst.pyx":1137
+ /* "pywrapfst.pyx":1139
* _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source),
* deref(_opts)))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__symbols.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1138
+ /* "pywrapfst.pyx":1140
* deref(_opts)))
* if _symbols.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<<
* return _init_SymbolTable(move(_symbols))
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1138, __pyx_L1_error)
+ __PYX_ERR(0, 1140, __pyx_L1_error)
- /* "pywrapfst.pyx":1137
+ /* "pywrapfst.pyx":1139
* _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source),
* deref(_opts)))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1139
+ /* "pywrapfst.pyx":1141
* if _symbols.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
* return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1116
+ /* "pywrapfst.pyx":1118
*
* @classmethod
* def read_text(cls, source, bool allow_negative_labels=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1142
+/* "pywrapfst.pyx":1144
*
* @classmethod
* def read_fst(cls, source, bool input_table): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_table)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1142, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1144, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_fst") < 0)) __PYX_ERR(0, 1142, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_fst") < 0)) __PYX_ERR(0, 1144, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_source = values[0];
- __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1142, __pyx_L3_error)
+ __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1144, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1142, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1144, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.SymbolTable.read_fst", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_fst", 0);
- /* "pywrapfst.pyx":1163
+ /* "pywrapfst.pyx":1165
* """
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table)) # <<<<<<<<<<<<<<
* if _symbols.get() == NULL:
* raise FstIOError(f"Read from FST failed: {source!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L1_error)
__pyx_v__symbols.reset(fst::FstReadSymbols(__pyx_t_1, __pyx_v_input_table));
- /* "pywrapfst.pyx":1164
+ /* "pywrapfst.pyx":1166
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__symbols.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1165
+ /* "pywrapfst.pyx":1167
* _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table))
* if _symbols.get() == NULL:
* raise FstIOError(f"Read from FST failed: {source!r}") # <<<<<<<<<<<<<<
* return _init_SymbolTable(move(_symbols))
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1165, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_from_FST_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1165, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_from_FST_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1165, __pyx_L1_error)
+ __PYX_ERR(0, 1167, __pyx_L1_error)
- /* "pywrapfst.pyx":1164
+ /* "pywrapfst.pyx":1166
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1166
+ /* "pywrapfst.pyx":1168
* if _symbols.get() == NULL:
* raise FstIOError(f"Read from FST failed: {source!r}")
* return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1142
+ /* "pywrapfst.pyx":1144
*
* @classmethod
* def read_fst(cls, source, bool input_table): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1169
+/* "pywrapfst.pyx":1171
*
*
* cdef _EncodeMapperSymbolTableView _init_EncodeMapperSymbolTableView( # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_EncodeMapperSymbolTableView", 0);
- /* "pywrapfst.pyx":1172
+ /* "pywrapfst.pyx":1174
* shared_ptr[fst.EncodeMapperClass] mapper, bool input_side):
* cdef _EncodeMapperSymbolTableView _symbols = (
* _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView)) # <<<<<<<<<<<<<<
* _symbols._mapper = move(mapper)
* _symbols._input_side = input_side
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__EncodeMapperSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__EncodeMapperSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__symbols = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1173
+ /* "pywrapfst.pyx":1175
* cdef _EncodeMapperSymbolTableView _symbols = (
* _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView))
* _symbols._mapper = move(mapper) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1173, __pyx_L1_error)
+ __PYX_ERR(0, 1175, __pyx_L1_error)
}
__pyx_v__symbols->_mapper = fst::move<std::shared_ptr<fst::script::EncodeMapperClass> >(__pyx_v_mapper);
- /* "pywrapfst.pyx":1174
+ /* "pywrapfst.pyx":1176
* _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView))
* _symbols._mapper = move(mapper)
* _symbols._input_side = input_side # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 1174, __pyx_L1_error)
+ __PYX_ERR(0, 1176, __pyx_L1_error)
}
__pyx_v__symbols->_input_side = __pyx_v_input_side;
- /* "pywrapfst.pyx":1175
+ /* "pywrapfst.pyx":1177
* _symbols._mapper = move(mapper)
* _symbols._input_side = input_side
* return _symbols # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__symbols;
goto __pyx_L0;
- /* "pywrapfst.pyx":1169
+ /* "pywrapfst.pyx":1171
*
*
* cdef _EncodeMapperSymbolTableView _init_EncodeMapperSymbolTableView( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1178
+/* "pywrapfst.pyx":1180
*
*
* cdef _FstSymbolTableView _init_FstSymbolTableView(shared_ptr[fst.FstClass] ifst, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_FstSymbolTableView", 0);
- /* "pywrapfst.pyx":1181
+ /* "pywrapfst.pyx":1183
* bool input_side):
* cdef _FstSymbolTableView _symbols = (
* _FstSymbolTableView.__new__(_FstSymbolTableView)) # <<<<<<<<<<<<<<
* _symbols._fst = move(ifst)
* _symbols._input_side = input_side
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__FstSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__FstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__FstSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__FstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__symbols = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1182
+ /* "pywrapfst.pyx":1184
* cdef _FstSymbolTableView _symbols = (
* _FstSymbolTableView.__new__(_FstSymbolTableView))
* _symbols._fst = move(ifst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1182, __pyx_L1_error)
+ __PYX_ERR(0, 1184, __pyx_L1_error)
}
__pyx_v__symbols->_fst = fst::move<std::shared_ptr<fst::script::FstClass> >(__pyx_v_ifst);
- /* "pywrapfst.pyx":1183
+ /* "pywrapfst.pyx":1185
* _FstSymbolTableView.__new__(_FstSymbolTableView))
* _symbols._fst = move(ifst)
* _symbols._input_side = input_side # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 1183, __pyx_L1_error)
+ __PYX_ERR(0, 1185, __pyx_L1_error)
}
__pyx_v__symbols->_input_side = __pyx_v_input_side;
- /* "pywrapfst.pyx":1184
+ /* "pywrapfst.pyx":1186
* _symbols._fst = move(ifst)
* _symbols._input_side = input_side
* return _symbols # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__symbols;
goto __pyx_L0;
- /* "pywrapfst.pyx":1178
+ /* "pywrapfst.pyx":1180
*
*
* cdef _FstSymbolTableView _init_FstSymbolTableView(shared_ptr[fst.FstClass] ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1187
+/* "pywrapfst.pyx":1189
*
*
* cdef _MutableFstSymbolTableView _init_MutableFstSymbolTableView( # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_MutableFstSymbolTableView", 0);
- /* "pywrapfst.pyx":1191
+ /* "pywrapfst.pyx":1193
* bool input_side):
* cdef _MutableFstSymbolTableView _symbols = (
* _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView)) # <<<<<<<<<<<<<<
* _symbols._mfst = move(ifst)
* _symbols._input_side = input_side
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFstSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst__MutableFstSymbolTableView(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__symbols = ((struct __pyx_obj_9pywrapfst__MutableFstSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1192
+ /* "pywrapfst.pyx":1194
* cdef _MutableFstSymbolTableView _symbols = (
* _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView))
* _symbols._mfst = move(ifst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 1192, __pyx_L1_error)
+ __PYX_ERR(0, 1194, __pyx_L1_error)
}
__pyx_v__symbols->_mfst = fst::move<std::shared_ptr<fst::script::MutableFstClass> >(__pyx_v_ifst);
- /* "pywrapfst.pyx":1193
+ /* "pywrapfst.pyx":1195
* _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView))
* _symbols._mfst = move(ifst)
* _symbols._input_side = input_side # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side");
- __PYX_ERR(0, 1193, __pyx_L1_error)
+ __PYX_ERR(0, 1195, __pyx_L1_error)
}
__pyx_v__symbols->_input_side = __pyx_v_input_side;
- /* "pywrapfst.pyx":1194
+ /* "pywrapfst.pyx":1196
* _symbols._mfst = move(ifst)
* _symbols._input_side = input_side
* return _symbols # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__symbols;
goto __pyx_L0;
- /* "pywrapfst.pyx":1187
+ /* "pywrapfst.pyx":1189
*
*
* cdef _MutableFstSymbolTableView _init_MutableFstSymbolTableView( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1197
+/* "pywrapfst.pyx":1199
*
*
* cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_SymbolTable", 0);
- /* "pywrapfst.pyx":1198
+ /* "pywrapfst.pyx":1200
*
* cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols):
* cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable) # <<<<<<<<<<<<<<
* _symbols._smart_table = move(symbols)
* return _symbols
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_9pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__symbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1199
+ /* "pywrapfst.pyx":1201
* cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols):
* cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable)
* _symbols._smart_table = move(symbols) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table");
- __PYX_ERR(0, 1199, __pyx_L1_error)
+ __PYX_ERR(0, 1201, __pyx_L1_error)
}
__pyx_v__symbols->_smart_table = fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v_symbols);
- /* "pywrapfst.pyx":1200
+ /* "pywrapfst.pyx":1202
* cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable)
* _symbols._smart_table = move(symbols)
* return _symbols # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__symbols;
goto __pyx_L0;
- /* "pywrapfst.pyx":1197
+ /* "pywrapfst.pyx":1199
*
*
* cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1203
+/* "pywrapfst.pyx":1205
*
*
* cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 0);
- /* "pywrapfst.pyx":1205
+ /* "pywrapfst.pyx":1207
* cpdef SymbolTable _read_SymbolTable_from_string(string state):
* cdef stringstream _sstrm
* _sstrm << state # <<<<<<<<<<<<<<
*/
(void)((__pyx_v__sstrm << __pyx_v_state));
- /* "pywrapfst.pyx":1207
+ /* "pywrapfst.pyx":1209
* _sstrm << state
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"<pywrapfst>")) # <<<<<<<<<<<<<<
*/
__pyx_v__symbols.reset(fst::SymbolTable::Read(__pyx_v__sstrm, __pyx_k_pywrapfst));
- /* "pywrapfst.pyx":1208
+ /* "pywrapfst.pyx":1210
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"<pywrapfst>"))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v__symbols.get() == NULL) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":1209
+ /* "pywrapfst.pyx":1211
* _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"<pywrapfst>"))
* if _symbols.get() == NULL:
* raise FstIOError("Read from string failed") # <<<<<<<<<<<<<<
* return _init_SymbolTable(move(_symbols))
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Read_from_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Read_from_string_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 1209, __pyx_L1_error)
+ __PYX_ERR(0, 1211, __pyx_L1_error)
- /* "pywrapfst.pyx":1208
+ /* "pywrapfst.pyx":1210
* cdef unique_ptr[fst.SymbolTable] _symbols
* _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"<pywrapfst>"))
* if _symbols.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1210
+ /* "pywrapfst.pyx":1212
* if _symbols.get() == NULL:
* raise FstIOError("Read from string failed")
* return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::move<std::unique_ptr<fst::SymbolTable> >(__pyx_v__symbols))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1203
+ /* "pywrapfst.pyx":1205
*
*
* cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_read_SymbolTable_from_string (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error)
+ __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1216
+/* "pywrapfst.pyx":1218
*
*
* cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("compact_symbol_table", 0);
- /* "pywrapfst.pyx":1228
+ /* "pywrapfst.pyx":1230
* A new compacted SymbolTable.
* """
* return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable( # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "pywrapfst.pyx":1229
+ /* "pywrapfst.pyx":1231
* """
* return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable(
* deref(symbols._raw_ptr_or_raise())))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1229, __pyx_L1_error)
+ __PYX_ERR(0, 1231, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1229, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L1_error)
- /* "pywrapfst.pyx":1228
+ /* "pywrapfst.pyx":1230
* A new compacted SymbolTable.
* """
* return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable( # <<<<<<<<<<<<<<
* deref(symbols._raw_ptr_or_raise()))))
*
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(fst::CompactSymbolTable((*__pyx_t_1))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(fst::CompactSymbolTable((*__pyx_t_1))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1216
+ /* "pywrapfst.pyx":1218
*
*
* cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("compact_symbol_table (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1216, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1218, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10compact_symbol_table(__pyx_self, ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("compact_symbol_table", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compact_symbol_table(__pyx_v_symbols, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compact_symbol_table(__pyx_v_symbols, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1232
+/* "pywrapfst.pyx":1234
*
*
* cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("merge_symbol_table", 0);
- /* "pywrapfst.pyx":1255
+ /* "pywrapfst.pyx":1257
* A new merged SymbolTable.
* """
* return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "pywrapfst.pyx":1256
+ /* "pywrapfst.pyx":1258
* """
* return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable(
* deref(lhs._raw_ptr_or_raise()), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1256, __pyx_L1_error)
+ __PYX_ERR(0, 1258, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_lhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_lhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1256, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_lhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_lhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L1_error)
- /* "pywrapfst.pyx":1257
+ /* "pywrapfst.pyx":1259
* return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable(
* deref(lhs._raw_ptr_or_raise()),
* deref(rhs._raw_ptr_or_raise()), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1257, __pyx_L1_error)
+ __PYX_ERR(0, 1259, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_rhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_rhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1257, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_rhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_rhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L1_error)
- /* "pywrapfst.pyx":1255
+ /* "pywrapfst.pyx":1257
* A new merged SymbolTable.
* """
* return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( # <<<<<<<<<<<<<<
* deref(lhs._raw_ptr_or_raise()),
* deref(rhs._raw_ptr_or_raise()),
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(fst::MergeSymbolTable((*__pyx_t_1), (*__pyx_t_2), NULL)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_SymbolTable(fst::WrapUnique<fst::SymbolTable>(fst::MergeSymbolTable((*__pyx_t_1), (*__pyx_t_2), NULL)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_SymbolTable *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1232
+ /* "pywrapfst.pyx":1234
*
*
* cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1232, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1234, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1232, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1234, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1232, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1234, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.merge_symbol_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "lhs", 0))) __PYX_ERR(0, 1232, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "rhs", 0))) __PYX_ERR(0, 1233, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "lhs", 0))) __PYX_ERR(0, 1234, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "rhs", 0))) __PYX_ERR(0, 1235, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_12merge_symbol_table(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("merge_symbol_table", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1271
+/* "pywrapfst.pyx":1273
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":1272
+ /* "pywrapfst.pyx":1274
*
* def __repr__(self):
* return f"<_SymbolTableIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __init__(self, SymbolTableView symbols):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__pyx_t_2 += 27;
__Pyx_GIVEREF(__pyx_kp_u_SymbolTableIterator_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_SymbolTableIterator_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1271
+ /* "pywrapfst.pyx":1273
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1274
+/* "pywrapfst.pyx":1276
* return f"<_SymbolTableIterator at 0x{id(self):x}>"
*
* def __init__(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1274, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1276, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1274, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1276, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._SymbolTableIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1274, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1276, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_20_SymbolTableIterator_2__init__(((struct __pyx_obj_9pywrapfst__SymbolTableIterator *)__pyx_v_self), __pyx_v_symbols);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":1275
+ /* "pywrapfst.pyx":1277
*
* def __init__(self, SymbolTableView symbols):
* self._table = symbols # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table");
- __PYX_ERR(0, 1275, __pyx_L1_error)
+ __PYX_ERR(0, 1277, __pyx_L1_error)
}
__Pyx_INCREF(((PyObject *)__pyx_v_symbols));
__Pyx_GIVEREF(((PyObject *)__pyx_v_symbols));
__Pyx_DECREF(((PyObject *)__pyx_v_self->_table));
__pyx_v_self->_table = __pyx_v_symbols;
- /* "pywrapfst.pyx":1276
+ /* "pywrapfst.pyx":1278
* def __init__(self, SymbolTableView symbols):
* self._table = symbols
* self._siter.reset( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 1276, __pyx_L1_error)
+ __PYX_ERR(0, 1278, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1277
+ /* "pywrapfst.pyx":1279
* self._table = symbols
* self._siter.reset(
* new fst.SymbolTableIterator(self._table._raw_ptr_or_raise().begin())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table");
- __PYX_ERR(0, 1277, __pyx_L1_error)
+ __PYX_ERR(0, 1279, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self->_table) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1277, __pyx_L1_error)
+ __PYX_ERR(0, 1279, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L1_error)
- /* "pywrapfst.pyx":1276
+ /* "pywrapfst.pyx":1278
* def __init__(self, SymbolTableView symbols):
* self._table = symbols
* self._siter.reset( # <<<<<<<<<<<<<<
*/
__pyx_v_self->_siter.reset(new fst::SymbolTable::iterator(__pyx_t_1->begin()));
- /* "pywrapfst.pyx":1274
+ /* "pywrapfst.pyx":1276
* return f"<_SymbolTableIterator at 0x{id(self):x}>"
*
* def __init__(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1280
+/* "pywrapfst.pyx":1282
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":1281
+ /* "pywrapfst.pyx":1283
* # This just registers this class as a possible iterator.
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1280
+ /* "pywrapfst.pyx":1282
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1284
+/* "pywrapfst.pyx":1286
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":1285
+ /* "pywrapfst.pyx":1287
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self._table._raw_ptr_or_raise().end() == deref(self._siter): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table");
- __PYX_ERR(0, 1285, __pyx_L1_error)
+ __PYX_ERR(0, 1287, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self->_table) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1285, __pyx_L1_error)
+ __PYX_ERR(0, 1287, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1285, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 1285, __pyx_L1_error)
+ __PYX_ERR(0, 1287, __pyx_L1_error)
}
__pyx_t_2 = ((__pyx_t_1->end() == (*__pyx_v_self->_siter)) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1286
+ /* "pywrapfst.pyx":1288
* def __next__(self):
* if self._table._raw_ptr_or_raise().end() == deref(self._siter):
* raise StopIteration # <<<<<<<<<<<<<<
* cdef string _symbol = self._siter.get().Pair().Symbol()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 1286, __pyx_L1_error)
+ __PYX_ERR(0, 1288, __pyx_L1_error)
- /* "pywrapfst.pyx":1285
+ /* "pywrapfst.pyx":1287
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self._table._raw_ptr_or_raise().end() == deref(self._siter): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1287
+ /* "pywrapfst.pyx":1289
* if self._table._raw_ptr_or_raise().end() == deref(self._siter):
* raise StopIteration
* cdef int64 _label = self._siter.get().Pair().Label() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 1287, __pyx_L1_error)
+ __PYX_ERR(0, 1289, __pyx_L1_error)
}
__pyx_v__label = __pyx_v_self->_siter.get()->operator*().Label();
- /* "pywrapfst.pyx":1288
+ /* "pywrapfst.pyx":1290
* raise StopIteration
* cdef int64 _label = self._siter.get().Pair().Label()
* cdef string _symbol = self._siter.get().Pair().Symbol() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 1288, __pyx_L1_error)
+ __PYX_ERR(0, 1290, __pyx_L1_error)
}
__pyx_v__symbol = __pyx_v_self->_siter.get()->operator*().Symbol();
- /* "pywrapfst.pyx":1289
+ /* "pywrapfst.pyx":1291
* cdef int64 _label = self._siter.get().Pair().Label()
* cdef string _symbol = self._siter.get().Pair().Symbol()
* inc(deref(self._siter)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 1289, __pyx_L1_error)
+ __PYX_ERR(0, 1291, __pyx_L1_error)
}
(void)((++(*__pyx_v_self->_siter)));
- /* "pywrapfst.pyx":1290
+ /* "pywrapfst.pyx":1292
* cdef string _symbol = self._siter.get().Pair().Symbol()
* inc(deref(self._siter))
* return (_label, _symbol) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v__label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1290, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v__label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1290, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1290, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1284
+ /* "pywrapfst.pyx":1286
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1319
+/* "pywrapfst.pyx":1321
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":1320
+ /* "pywrapfst.pyx":1322
*
* def __repr__(self):
* return f"<EncodeMapper at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __init__(self,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__pyx_t_2 += 19;
__Pyx_GIVEREF(__pyx_kp_u_EncodeMapper_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_EncodeMapper_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1319
+ /* "pywrapfst.pyx":1321
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1322
+/* "pywrapfst.pyx":1324
* return f"<EncodeMapper at 0x{id(self):x}>"
*
* def __init__(self, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1322, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1324, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_arc_type = values[0];
if (values[1]) {
- __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1324, __pyx_L3_error)
+ __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1324
+ /* "pywrapfst.pyx":1326
* def __init__(self,
* arc_type="standard",
* bool encode_labels=False, # <<<<<<<<<<<<<<
__pyx_v_encode_labels = ((bool)0);
}
if (values[2]) {
- __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L3_error)
+ __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1325
+ /* "pywrapfst.pyx":1327
* arc_type="standard",
* bool encode_labels=False,
* bool encode_weights=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1322, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1324, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.EncodeMapper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_2__init__(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc_type, __pyx_v_encode_labels, __pyx_v_encode_weights);
- /* "pywrapfst.pyx":1322
+ /* "pywrapfst.pyx":1324
* return f"<EncodeMapper at 0x{id(self):x}>"
*
* def __init__(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":1326
+ /* "pywrapfst.pyx":1328
* bool encode_labels=False,
* bool encode_weights=False):
* cdef uint8 _flags = fst.GetEncodeFlags(encode_labels, encode_weights) # <<<<<<<<<<<<<<
*/
__pyx_v__flags = fst::script::GetEncodeFlags(__pyx_v_encode_labels, __pyx_v_encode_weights);
- /* "pywrapfst.pyx":1327
+ /* "pywrapfst.pyx":1329
* bool encode_weights=False):
* cdef uint8 _flags = fst.GetEncodeFlags(encode_labels, encode_weights)
* self._mapper.reset( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1327, __pyx_L1_error)
+ __PYX_ERR(0, 1329, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1328
+ /* "pywrapfst.pyx":1330
* cdef uint8 _flags = fst.GetEncodeFlags(encode_labels, encode_weights)
* self._mapper.reset(
* new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE)) # <<<<<<<<<<<<<<
* if self._mapper.get() == NULL:
* raise FstOpError(f"Unknown arc type: {arc_type!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1328, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1330, __pyx_L1_error)
- /* "pywrapfst.pyx":1327
+ /* "pywrapfst.pyx":1329
* bool encode_weights=False):
* cdef uint8 _flags = fst.GetEncodeFlags(encode_labels, encode_weights)
* self._mapper.reset( # <<<<<<<<<<<<<<
*/
__pyx_v_self->_mapper.reset(new fst::script::EncodeMapperClass(__pyx_t_1, __pyx_v__flags, fst::ENCODE));
- /* "pywrapfst.pyx":1329
+ /* "pywrapfst.pyx":1331
* self._mapper.reset(
* new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE))
* if self._mapper.get() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1329, __pyx_L1_error)
+ __PYX_ERR(0, 1331, __pyx_L1_error)
}
__pyx_t_2 = ((__pyx_v_self->_mapper.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1330
+ /* "pywrapfst.pyx":1332
* new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE))
* if self._mapper.get() == NULL:
* raise FstOpError(f"Unknown arc type: {arc_type!r}") # <<<<<<<<<<<<<<
*
* # Python's equivalent to operator().
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1330, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1330, __pyx_L1_error)
+ __PYX_ERR(0, 1332, __pyx_L1_error)
- /* "pywrapfst.pyx":1329
+ /* "pywrapfst.pyx":1331
* self._mapper.reset(
* new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE))
* if self._mapper.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1322
+ /* "pywrapfst.pyx":1324
* return f"<EncodeMapper at 0x{id(self):x}>"
*
* def __init__(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1334
+/* "pywrapfst.pyx":1336
* # Python's equivalent to operator().
*
* def __call__(self, Arc arc): # <<<<<<<<<<<<<<
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1334, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1336, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1334, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1336, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.EncodeMapper.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1334, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1336, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_4__call__(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__call__", 0);
- /* "pywrapfst.pyx":1350
+ /* "pywrapfst.pyx":1352
* FstOpError: Incompatible or invalid weight.
* """
* return _init_Arc(self._mapper.get().__call__(deref(arc._arc))) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1350, __pyx_L1_error)
+ __PYX_ERR(0, 1352, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 1350, __pyx_L1_error)
+ __PYX_ERR(0, 1352, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_mapper.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_mapper.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1334
+ /* "pywrapfst.pyx":1336
* # Python's equivalent to operator().
*
* def __call__(self, Arc arc): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1354
+/* "pywrapfst.pyx":1356
* # Registers the class for pickling.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce__", 0);
- /* "pywrapfst.pyx":1355
+ /* "pywrapfst.pyx":1357
*
* def __reduce__(self):
* return (_read_EncodeMapper_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<<
* cpdef string arc_type(self):
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_EncodeMapper_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_EncodeMapper_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string");
- __PYX_ERR(0, 1355, __pyx_L1_error)
+ __PYX_ERR(0, 1357, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1354
+ /* "pywrapfst.pyx":1356
* # Registers the class for pickling.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1357
+/* "pywrapfst.pyx":1359
* return (_read_EncodeMapper_from_string, (self.write_to_string(),))
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_9arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1359, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1363
+ /* "pywrapfst.pyx":1365
* Returns a string indicating the arc type.
* """
* return self._mapper.get().ArcType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1363, __pyx_L1_error)
+ __PYX_ERR(0, 1365, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mapper.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1357
+ /* "pywrapfst.pyx":1359
* return (_read_EncodeMapper_from_string, (self.write_to_string(),))
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1365
+/* "pywrapfst.pyx":1367
* return self._mapper.get().ArcType()
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_11weight_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1371
+ /* "pywrapfst.pyx":1373
* Returns a string indicating the weight type.
* """
* return self._mapper.get().WeightType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1371, __pyx_L1_error)
+ __PYX_ERR(0, 1373, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mapper.get()->WeightType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1365
+ /* "pywrapfst.pyx":1367
* return self._mapper.get().ArcType()
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("weight_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1373
+/* "pywrapfst.pyx":1375
* return self._mapper.get().WeightType()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_13flags)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1375, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1379
+ /* "pywrapfst.pyx":1381
* Returns the mapper's flags.
* """
* return self._mapper.get().Flags() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1379, __pyx_L1_error)
+ __PYX_ERR(0, 1381, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mapper.get()->Flags();
goto __pyx_L0;
- /* "pywrapfst.pyx":1373
+ /* "pywrapfst.pyx":1375
* return self._mapper.get().WeightType()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1381
+/* "pywrapfst.pyx":1383
* return self._mapper.get().Flags()
*
* def properties(self, mask): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("properties", 0);
- /* "pywrapfst.pyx":1396
+ /* "pywrapfst.pyx":1398
* """
*
* return FstProperties(self._mapper.get().Properties(mask.value)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1396, __pyx_L1_error)
+ __PYX_ERR(0, 1398, __pyx_L1_error)
}
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1396, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_mapper.get()->Properties(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_mapper.get()->Properties(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1381
+ /* "pywrapfst.pyx":1383
* return self._mapper.get().Flags()
*
* def properties(self, mask): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1399
+/* "pywrapfst.pyx":1401
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read", 0);
- /* "pywrapfst.pyx":1415
+ /* "pywrapfst.pyx":1417
* """
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.Read(path_tostring(source))) # <<<<<<<<<<<<<<
* if _mapper.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1415, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L1_error)
__pyx_v__mapper.reset(fst::script::EncodeMapperClass::Read(__pyx_t_1));
- /* "pywrapfst.pyx":1416
+ /* "pywrapfst.pyx":1418
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.Read(path_tostring(source)))
* if _mapper.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__mapper.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":1417
+ /* "pywrapfst.pyx":1419
* _mapper.reset(fst.EncodeMapperClass.Read(path_tostring(source)))
* if _mapper.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<<
* return _init_EncodeMapper(_mapper.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1417, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1417, __pyx_L1_error)
+ __PYX_ERR(0, 1419, __pyx_L1_error)
- /* "pywrapfst.pyx":1416
+ /* "pywrapfst.pyx":1418
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.Read(path_tostring(source)))
* if _mapper.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1418
+ /* "pywrapfst.pyx":1420
* if _mapper.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
* return _init_EncodeMapper(_mapper.release()) # <<<<<<<<<<<<<<
* @staticmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1399
+ /* "pywrapfst.pyx":1401
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1421
+/* "pywrapfst.pyx":1423
*
* @staticmethod
* def read_from_string(state): # <<<<<<<<<<<<<<
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_from_string") < 0)) __PYX_ERR(0, 1421, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_from_string") < 0)) __PYX_ERR(0, 1423, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1421, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1423, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.EncodeMapper.read_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_from_string", 0);
- /* "pywrapfst.pyx":1436
+ /* "pywrapfst.pyx":1438
* FstIOError: Read failed.
* """
* return _read_EncodeMapper_from_string(state) # <<<<<<<<<<<<<<
* cpdef void write(self, source) except *:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L1_error)
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__read_EncodeMapper_from_string(__pyx_t_1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1438, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__read_EncodeMapper_from_string(__pyx_t_1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1421
+ /* "pywrapfst.pyx":1423
*
* @staticmethod
* def read_from_string(state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1438
+/* "pywrapfst.pyx":1440
* return _read_EncodeMapper_from_string(state)
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_21write)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_source) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_source);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":1451
+ /* "pywrapfst.pyx":1453
* FstIOError: Write failed.
* """
* if not self._mapper.get().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1451, __pyx_L1_error)
+ __PYX_ERR(0, 1453, __pyx_L1_error)
}
- __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L1_error)
__pyx_t_6 = ((!(__pyx_v_self->_mapper.get()->Write(__pyx_t_5) != 0)) != 0);
if (unlikely(__pyx_t_6)) {
- /* "pywrapfst.pyx":1452
+ /* "pywrapfst.pyx":1454
* """
* if not self._mapper.get().Write(path_tostring(source)):
* raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<<
*
* cpdef bytes write_to_string(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1452, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1454, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1452, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1454, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1452, __pyx_L1_error)
+ __PYX_ERR(0, 1454, __pyx_L1_error)
- /* "pywrapfst.pyx":1451
+ /* "pywrapfst.pyx":1453
* FstIOError: Write failed.
* """
* if not self._mapper.get().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1438
+ /* "pywrapfst.pyx":1440
* return _read_EncodeMapper_from_string(state)
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_12EncodeMapper_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1438, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
+ __pyx_f_9pywrapfst_12EncodeMapper_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1454
+/* "pywrapfst.pyx":1456
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_23write_to_string)) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1454, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1454, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1456, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1467
+ /* "pywrapfst.pyx":1469
* """
* cdef stringstream _sstrm
* if not self._mapper.get().WriteStream(_sstrm, b"<pywrapfst>"): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1467, __pyx_L1_error)
+ __PYX_ERR(0, 1469, __pyx_L1_error)
}
__pyx_t_5 = ((!(__pyx_v_self->_mapper.get()->Write(__pyx_v__sstrm, __pyx_k_pywrapfst) != 0)) != 0);
if (unlikely(__pyx_t_5)) {
- /* "pywrapfst.pyx":1468
+ /* "pywrapfst.pyx":1470
* cdef stringstream _sstrm
* if not self._mapper.get().WriteStream(_sstrm, b"<pywrapfst>"):
* raise FstIOError("Write to string failed") # <<<<<<<<<<<<<<
* return _sstrm.str()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Write_to_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Write_to_string_failed);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1468, __pyx_L1_error)
+ __PYX_ERR(0, 1470, __pyx_L1_error)
- /* "pywrapfst.pyx":1467
+ /* "pywrapfst.pyx":1469
* """
* cdef stringstream _sstrm
* if not self._mapper.get().WriteStream(_sstrm, b"<pywrapfst>"): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1469
+ /* "pywrapfst.pyx":1471
* if not self._mapper.get().WriteStream(_sstrm, b"<pywrapfst>"):
* raise FstIOError("Write to string failed")
* return _sstrm.str() # <<<<<<<<<<<<<<
* cpdef _EncodeMapperSymbolTableView input_symbols(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1454
+ /* "pywrapfst.pyx":1456
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_to_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_12EncodeMapper_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_12EncodeMapper_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1471
+/* "pywrapfst.pyx":1473
* return _sstrm.str()
*
* cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_25input_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1473, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1471, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1473, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1477
+ /* "pywrapfst.pyx":1479
* Returns the mapper's input symbol table, or None if none is present.
* """
* if self._mapper.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1477, __pyx_L1_error)
+ __PYX_ERR(0, 1479, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_mapper.get()->InputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1478
+ /* "pywrapfst.pyx":1480
* """
* if self._mapper.get().InputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1477
+ /* "pywrapfst.pyx":1479
* Returns the mapper's input symbol table, or None if none is present.
* """
* if self._mapper.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1479
+ /* "pywrapfst.pyx":1481
* if self._mapper.get().InputSymbols() == NULL:
* return
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1479, __pyx_L1_error)
+ __PYX_ERR(0, 1481, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1471
+ /* "pywrapfst.pyx":1473
* return _sstrm.str()
*
* cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("input_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1481
+/* "pywrapfst.pyx":1483
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True)
*
* cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12EncodeMapper_27output_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1481, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1483, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1487
+ /* "pywrapfst.pyx":1489
* Returns the mapper's output symbol table, or None if none is present.
* """
* if self._mapper.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1487, __pyx_L1_error)
+ __PYX_ERR(0, 1489, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_mapper.get()->OutputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1488
+ /* "pywrapfst.pyx":1490
* """
* if self._mapper.get().OutputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1487
+ /* "pywrapfst.pyx":1489
* Returns the mapper's output symbol table, or None if none is present.
* """
* if self._mapper.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1489
+ /* "pywrapfst.pyx":1491
* if self._mapper.get().OutputSymbols() == NULL:
* return
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1489, __pyx_L1_error)
+ __PYX_ERR(0, 1491, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1481
+ /* "pywrapfst.pyx":1483
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True)
*
* cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("output_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1491
+/* "pywrapfst.pyx":1493
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False)
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_set_input_symbols", 0);
- /* "pywrapfst.pyx":1492
+ /* "pywrapfst.pyx":1494
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":1493
+ /* "pywrapfst.pyx":1495
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None:
* self._mapper.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1493, __pyx_L1_error)
+ __PYX_ERR(0, 1495, __pyx_L1_error)
}
__pyx_v_self->_mapper.get()->SetInputSymbols(NULL);
- /* "pywrapfst.pyx":1494
+ /* "pywrapfst.pyx":1496
* if symbols is None:
* self._mapper.get().SetInputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":1492
+ /* "pywrapfst.pyx":1494
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1495
+ /* "pywrapfst.pyx":1497
* self._mapper.get().SetInputSymbols(NULL)
* return
* self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1495, __pyx_L1_error)
+ __PYX_ERR(0, 1497, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1495, __pyx_L1_error)
+ __PYX_ERR(0, 1497, __pyx_L1_error)
}
- __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error)
__pyx_v_self->_mapper.get()->SetInputSymbols(__pyx_t_3);
- /* "pywrapfst.pyx":1491
+ /* "pywrapfst.pyx":1493
* return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False)
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1497
+/* "pywrapfst.pyx":1499
* self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise())
*
* def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_input_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1497, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1499, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_28set_input_symbols(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_input_symbols", 0);
- /* "pywrapfst.pyx":1511
+ /* "pywrapfst.pyx":1513
* self.
* """
* self._set_input_symbols(symbols) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_input_symbols");
- __PYX_ERR(0, 1511, __pyx_L1_error)
+ __PYX_ERR(0, 1513, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L1_error)
- /* "pywrapfst.pyx":1512
+ /* "pywrapfst.pyx":1514
* """
* self._set_input_symbols(symbols)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1497
+ /* "pywrapfst.pyx":1499
* self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise())
*
* def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1514
+/* "pywrapfst.pyx":1516
* return self
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_set_output_symbols", 0);
- /* "pywrapfst.pyx":1515
+ /* "pywrapfst.pyx":1517
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":1516
+ /* "pywrapfst.pyx":1518
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None:
* self._mapper.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1516, __pyx_L1_error)
+ __PYX_ERR(0, 1518, __pyx_L1_error)
}
__pyx_v_self->_mapper.get()->SetOutputSymbols(NULL);
- /* "pywrapfst.pyx":1517
+ /* "pywrapfst.pyx":1519
* if symbols is None:
* self._mapper.get().SetOutputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":1515
+ /* "pywrapfst.pyx":1517
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1518
+ /* "pywrapfst.pyx":1520
* self._mapper.get().SetOutputSymbols(NULL)
* return
* self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1518, __pyx_L1_error)
+ __PYX_ERR(0, 1520, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1518, __pyx_L1_error)
+ __PYX_ERR(0, 1520, __pyx_L1_error)
}
- __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1518, __pyx_L1_error)
+ __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1520, __pyx_L1_error)
__pyx_v_self->_mapper.get()->SetOutputSymbols(__pyx_t_3);
- /* "pywrapfst.pyx":1514
+ /* "pywrapfst.pyx":1516
* return self
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1520
+/* "pywrapfst.pyx":1522
* self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise())
*
* def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_output_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1520, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1522, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_12EncodeMapper_30set_output_symbols(((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_output_symbols", 0);
- /* "pywrapfst.pyx":1534
+ /* "pywrapfst.pyx":1536
* self.
* """
* self._set_output_symbols(symbols) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_output_symbols");
- __PYX_ERR(0, 1534, __pyx_L1_error)
+ __PYX_ERR(0, 1536, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1534, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1536, __pyx_L1_error)
- /* "pywrapfst.pyx":1535
+ /* "pywrapfst.pyx":1537
* """
* self._set_output_symbols(symbols)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1520
+ /* "pywrapfst.pyx":1522
* self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise())
*
* def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1538
+/* "pywrapfst.pyx":1540
*
*
* cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_EncodeMapper", 0);
- /* "pywrapfst.pyx":1539
+ /* "pywrapfst.pyx":1541
*
* cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper):
* cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper) # <<<<<<<<<<<<<<
* result._mapper.reset(mapper)
* return result
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_EncodeMapper(((PyTypeObject *)__pyx_ptype_9pywrapfst_EncodeMapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1539, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_EncodeMapper(((PyTypeObject *)__pyx_ptype_9pywrapfst_EncodeMapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v_result = ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1540
+ /* "pywrapfst.pyx":1542
* cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper):
* cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper)
* result._mapper.reset(mapper) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 1540, __pyx_L1_error)
+ __PYX_ERR(0, 1542, __pyx_L1_error)
}
__pyx_v_result->_mapper.reset(__pyx_v_mapper);
- /* "pywrapfst.pyx":1541
+ /* "pywrapfst.pyx":1543
* cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper)
* result._mapper.reset(mapper)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1538
+ /* "pywrapfst.pyx":1540
*
*
* cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1544
+/* "pywrapfst.pyx":1546
*
*
* cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_EncodeMapper_from_string", 0);
- /* "pywrapfst.pyx":1546
+ /* "pywrapfst.pyx":1548
* cpdef EncodeMapper _read_EncodeMapper_from_string(string state):
* cdef stringstream _sstrm
* _sstrm << state # <<<<<<<<<<<<<<
*/
(void)((__pyx_v__sstrm << __pyx_v_state));
- /* "pywrapfst.pyx":1548
+ /* "pywrapfst.pyx":1550
* _sstrm << state
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.ReadStream(_sstrm, b"<pywrapfst>")) # <<<<<<<<<<<<<<
*/
__pyx_v__mapper.reset(fst::script::EncodeMapperClass::Read(__pyx_v__sstrm, __pyx_k_pywrapfst));
- /* "pywrapfst.pyx":1549
+ /* "pywrapfst.pyx":1551
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _mapper.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v__mapper.get() == NULL) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":1550
+ /* "pywrapfst.pyx":1552
* _mapper.reset(fst.EncodeMapperClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _mapper.get() == NULL:
* raise FstIOError("Read from string failed") # <<<<<<<<<<<<<<
* return _init_EncodeMapper(_mapper.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Read_from_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Read_from_string_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 1550, __pyx_L1_error)
+ __PYX_ERR(0, 1552, __pyx_L1_error)
- /* "pywrapfst.pyx":1549
+ /* "pywrapfst.pyx":1551
* cdef unique_ptr[fst.EncodeMapperClass] _mapper
* _mapper.reset(fst.EncodeMapperClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _mapper.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1551
+ /* "pywrapfst.pyx":1553
* if _mapper.get() == NULL:
* raise FstIOError("Read from string failed")
* return _init_EncodeMapper(_mapper.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1553, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1544
+ /* "pywrapfst.pyx":1546
*
*
* cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_read_EncodeMapper_from_string (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1544, __pyx_L3_error)
+ __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1546, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_EncodeMapper_from_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_EncodeMapper_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_EncodeMapper_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1577
+/* "pywrapfst.pyx":1579
*
* @staticmethod
* cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_local_render_svg", 0);
- /* "pywrapfst.pyx":1578
+ /* "pywrapfst.pyx":1580
* @staticmethod
* cdef string _local_render_svg(const string &dot):
* proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<<
* stdin=subprocess.PIPE,
* stdout=subprocess.PIPE)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":1579
+ /* "pywrapfst.pyx":1581
* cdef string _local_render_svg(const string &dot):
* proc = subprocess.Popen(("dot", "-Tsvg"),
* stdin=subprocess.PIPE, # <<<<<<<<<<<<<<
* stdout=subprocess.PIPE)
* return proc.communicate(dot.encode("utf8"))[0]
*/
- __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1579, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_4) < 0) __PYX_ERR(0, 1579, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_4) < 0) __PYX_ERR(0, 1581, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":1580
+ /* "pywrapfst.pyx":1582
* proc = subprocess.Popen(("dot", "-Tsvg"),
* stdin=subprocess.PIPE,
* stdout=subprocess.PIPE) # <<<<<<<<<<<<<<
* return proc.communicate(dot.encode("utf8"))[0]
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1580, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1582, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1582, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_3) < 0) __PYX_ERR(0, 1579, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_3) < 0) __PYX_ERR(0, 1581, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pywrapfst.pyx":1578
+ /* "pywrapfst.pyx":1580
* @staticmethod
* cdef string _local_render_svg(const string &dot):
* proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<<
* stdin=subprocess.PIPE,
* stdout=subprocess.PIPE)
*/
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_proc = __pyx_t_3;
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":1581
+ /* "pywrapfst.pyx":1583
* stdin=subprocess.PIPE,
* stdout=subprocess.PIPE)
* return proc.communicate(dot.encode("utf8"))[0] # <<<<<<<<<<<<<<
*
* def _repr_svg_(self):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L1_error)
+ __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = NULL;
__pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(__pyx_t_3 == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 1581, __pyx_L1_error)
+ __PYX_ERR(0, 1583, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
- /* "pywrapfst.pyx":1577
+ /* "pywrapfst.pyx":1579
*
* @staticmethod
* cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1583
+/* "pywrapfst.pyx":1585
* return proc.communicate(dot.encode("utf8"))[0]
*
* def _repr_svg_(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_repr_svg_", 0);
- /* "pywrapfst.pyx":1591
+ /* "pywrapfst.pyx":1593
* """
* cdef stringstream _sstrm
* cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1591, __pyx_L1_error)
+ __PYX_ERR(0, 1593, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1592
+ /* "pywrapfst.pyx":1594
* cdef stringstream _sstrm
* cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) ==
* fst.kAcceptor) # <<<<<<<<<<<<<<
*/
__pyx_v_acceptor = (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor);
- /* "pywrapfst.pyx":1593
+ /* "pywrapfst.pyx":1595
* cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) ==
* fst.kAcceptor)
* fst.Draw(deref(self._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1593, __pyx_L1_error)
+ __PYX_ERR(0, 1595, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1594
+ /* "pywrapfst.pyx":1596
* fst.kAcceptor)
* fst.Draw(deref(self._fst),
* self._fst.get().InputSymbols(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1594, __pyx_L1_error)
+ __PYX_ERR(0, 1596, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1595
+ /* "pywrapfst.pyx":1597
* fst.Draw(deref(self._fst),
* self._fst.get().InputSymbols(),
* self._fst.get().OutputSymbols(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1595, __pyx_L1_error)
+ __PYX_ERR(0, 1597, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1593
+ /* "pywrapfst.pyx":1595
* cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) ==
* fst.kAcceptor)
* fst.Draw(deref(self._fst), # <<<<<<<<<<<<<<
*/
fst::script::Draw((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, __pyx_v_acceptor, __pyx_k__11, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_k_g, 0, __pyx_v__sstrm, __pyx_k_pywrapfst);
- /* "pywrapfst.pyx":1611
+ /* "pywrapfst.pyx":1613
* _sstrm,
* b"<pywrapfst>")
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
- /* "pywrapfst.pyx":1612
+ /* "pywrapfst.pyx":1614
* b"<pywrapfst>")
* try:
* return Fst._local_render_svg(_sstrm.str()) # <<<<<<<<<<<<<<
* logging.error("Dot rendering failed: %s", e)
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst__local_render_svg(__pyx_v__sstrm.str())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1612, __pyx_L3_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst__local_render_svg(__pyx_v__sstrm.str())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1614, __pyx_L3_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L7_try_return;
- /* "pywrapfst.pyx":1611
+ /* "pywrapfst.pyx":1613
* _sstrm,
* b"<pywrapfst>")
* try: # <<<<<<<<<<<<<<
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":1613
+ /* "pywrapfst.pyx":1615
* try:
* return Fst._local_render_svg(_sstrm.str())
* except Exception as e: # <<<<<<<<<<<<<<
__pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
if (__pyx_t_5) {
__Pyx_AddTraceback("pywrapfst.Fst._repr_svg_", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1613, __pyx_L5_except_error)
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1615, __pyx_L5_except_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_e = __pyx_t_6;
/*try:*/ {
- /* "pywrapfst.pyx":1614
+ /* "pywrapfst.pyx":1616
* return Fst._local_render_svg(_sstrm.str())
* except Exception as e:
* logging.error("Dot rendering failed: %s", e) # <<<<<<<<<<<<<<
*
* def __init__(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logging); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_logging); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_10)) {
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_Dot_rendering_failed_s, __pyx_v_e};
- __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_8);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_Dot_rendering_failed_s, __pyx_v_e};
- __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_8);
} else
#endif
{
- __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_GOTREF(__pyx_t_11);
if (__pyx_t_9) {
__Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
__Pyx_INCREF(__pyx_v_e);
__Pyx_GIVEREF(__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_v_e);
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1614, __pyx_L14_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1616, __pyx_L14_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- /* "pywrapfst.pyx":1613
+ /* "pywrapfst.pyx":1615
* try:
* return Fst._local_render_svg(_sstrm.str())
* except Exception as e: # <<<<<<<<<<<<<<
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
- /* "pywrapfst.pyx":1611
+ /* "pywrapfst.pyx":1613
* _sstrm,
* b"<pywrapfst>")
* try: # <<<<<<<<<<<<<<
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
}
- /* "pywrapfst.pyx":1583
+ /* "pywrapfst.pyx":1585
* return proc.communicate(dot.encode("utf8"))[0]
*
* def _repr_svg_(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1616
+/* "pywrapfst.pyx":1618
* logging.error("Dot rendering failed: %s", e)
*
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":1617
+ /* "pywrapfst.pyx":1619
*
* def __init__(self):
* raise NotImplementedError(f"Cannot construct {self._class__.__name__}") # <<<<<<<<<<<<<<
*
* # Registers the class for pickling; must be repeated in any subclass which
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1617, __pyx_L1_error)
+ __PYX_ERR(0, 1619, __pyx_L1_error)
- /* "pywrapfst.pyx":1616
+ /* "pywrapfst.pyx":1618
* logging.error("Dot rendering failed: %s", e)
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1622
+/* "pywrapfst.pyx":1624
* # can't be derived by _init_XFst.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__reduce__", 0);
- /* "pywrapfst.pyx":1623
+ /* "pywrapfst.pyx":1625
*
* def __reduce__(self):
* return (_read_Fst_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<<
* def __repr__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string");
- __PYX_ERR(0, 1623, __pyx_L1_error)
+ __PYX_ERR(0, 1625, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1622
+ /* "pywrapfst.pyx":1624
* # can't be derived by _init_XFst.
*
* def __reduce__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1625
+/* "pywrapfst.pyx":1627
* return (_read_Fst_from_string, (self.write_to_string(),))
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":1626
+ /* "pywrapfst.pyx":1628
*
* def __repr__(self):
* return f"<{self.fst_type()} Fst at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __str__(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "fst_type");
- __PYX_ERR(0, 1626, __pyx_L1_error)
+ __PYX_ERR(0, 1628, __pyx_L1_error)
}
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1628, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
__pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
__pyx_t_2 += 10;
__Pyx_GIVEREF(__pyx_kp_u_Fst_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Fst_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1628, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1628, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1628, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1625
+ /* "pywrapfst.pyx":1627
* return (_read_Fst_from_string, (self.write_to_string(),))
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1628
+/* "pywrapfst.pyx":1630
* return f"<{self.fst_type()} Fst at 0x{id(self):x}>"
*
* def __str__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__str__", 0);
- /* "pywrapfst.pyx":1629
+ /* "pywrapfst.pyx":1631
*
* def __str__(self):
* return self.print() # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "print");
- __PYX_ERR(0, 1629, __pyx_L1_error)
+ __PYX_ERR(0, 1631, __pyx_L1_error)
}
- __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->print(__pyx_v_self, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error)
- __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
+ __pyx_t_1 = ((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->print(__pyx_v_self, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1628
+ /* "pywrapfst.pyx":1630
* return f"<{self.fst_type()} Fst at 0x{id(self):x}>"
*
* def __str__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1631
+/* "pywrapfst.pyx":1633
* return self.print()
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_11arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1631, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1633, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1637
+ /* "pywrapfst.pyx":1639
* Returns a string indicating the arc type.
* """
* return self._fst.get().ArcType() # <<<<<<<<<<<<<<
*
- * cpdef ArcIterator arcs(self, int64 state):
+ * cpdef _ArcIterator arcs(self, int64 state):
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1637, __pyx_L1_error)
+ __PYX_ERR(0, 1639, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1631
+ /* "pywrapfst.pyx":1633
* return self.print()
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1639
+/* "pywrapfst.pyx":1641
* return self._fst.get().ArcType()
*
- * cpdef ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<<
+ * cpdef _ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<<
* """
* arcs(self, state)
*/
static PyObject *__pyx_pw_9pywrapfst_3Fst_13arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state); /*proto*/
-static struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_f_9pywrapfst_3Fst_arcs(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch) {
- struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_r = NULL;
+static struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_f_9pywrapfst_3Fst_arcs(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch) {
+ struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_13arcs)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1639, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1639, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_ArcIterator))))) __PYX_ERR(0, 1639, __pyx_L1_error)
- __pyx_r = ((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_t_2);
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__ArcIterator))))) __PYX_ERR(0, 1641, __pyx_L1_error)
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
#endif
}
- /* "pywrapfst.pyx":1651
- * An ArcIterator.
+ /* "pywrapfst.pyx":1653
+ * An _ArcIterator.
* """
- * return ArcIterator(self, state) # <<<<<<<<<<<<<<
+ * return _ArcIterator(self, state) # <<<<<<<<<<<<<<
*
* cpdef Fst copy(self):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst__ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = ((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_t_1);
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1639
+ /* "pywrapfst.pyx":1641
* return self._fst.get().ArcType()
*
- * cpdef ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<<
+ * cpdef _ArcIterator arcs(self, int64 state): # <<<<<<<<<<<<<<
* """
* arcs(self, state)
*/
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_3Fst_13arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state); /*proto*/
-static char __pyx_doc_9pywrapfst_3Fst_12arcs[] = "\n arcs(self, state)\n\n Returns an iterator over arcs leaving the specified state.\n\n Args:\n state: The source state ID.\n\n Returns:\n An ArcIterator.\n ";
+static char __pyx_doc_9pywrapfst_3Fst_12arcs[] = "\n arcs(self, state)\n\n Returns an iterator over arcs leaving the specified state.\n\n Args:\n state: The source state ID.\n\n Returns:\n An _ArcIterator.\n ";
static PyObject *__pyx_pw_9pywrapfst_3Fst_13arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state) {
int64 __pyx_v_state;
int __pyx_lineno = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("arcs (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1639, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arcs", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1653
- * return ArcIterator(self, state)
+/* "pywrapfst.pyx":1655
+ * return _ArcIterator(self, state)
*
* cpdef Fst copy(self): # <<<<<<<<<<<<<<
* """
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_15copy)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1653, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 1653, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 1655, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1659
+ /* "pywrapfst.pyx":1661
* Makes a copy of the FST.
* """
* return _init_XFst(new fst.FstClass(deref(self._fst))) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1659, __pyx_L1_error)
+ __PYX_ERR(0, 1661, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1653
- * return ArcIterator(self, state)
+ /* "pywrapfst.pyx":1655
+ * return _ArcIterator(self, state)
*
* cpdef Fst copy(self): # <<<<<<<<<<<<<<
* """
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1661
+/* "pywrapfst.pyx":1663
* return _init_XFst(new fst.FstClass(deref(self._fst)))
*
* cpdef void draw(self, # <<<<<<<<<<<<<<
static PyObject *__pyx_pw_9pywrapfst_3Fst_17draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_9pywrapfst_3Fst_draw(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_draw *__pyx_optional_args) {
- /* "pywrapfst.pyx":1663
+ /* "pywrapfst.pyx":1665
* cpdef void draw(self,
* source,
* SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_isymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1664
+ /* "pywrapfst.pyx":1666
* source,
* SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1665
+ /* "pywrapfst.pyx":1667
* SymbolTableView isymbols=None,
* SymbolTableView osymbols=None,
* SymbolTableView ssymbols=None, # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1666
+ /* "pywrapfst.pyx":1668
* SymbolTableView osymbols=None,
* SymbolTableView ssymbols=None,
* bool acceptor=False, # <<<<<<<<<<<<<<
double __pyx_v_width = ((double)8.5);
double __pyx_v_height = ((double)11.0);
- /* "pywrapfst.pyx":1670
+ /* "pywrapfst.pyx":1672
* double width=8.5,
* double height=11,
* bool portrait=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_portrait = ((bool)0);
- /* "pywrapfst.pyx":1671
+ /* "pywrapfst.pyx":1673
* double height=11,
* bool portrait=False,
* bool vertical=False, # <<<<<<<<<<<<<<
int32 __pyx_v_precision = ((int32)5);
PyObject *__pyx_v_float_format = ((PyObject *)__pyx_n_u_g);
- /* "pywrapfst.pyx":1677
+ /* "pywrapfst.pyx":1679
* int32 precision=5,
* float_format="g",
* bool show_weight_one=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1661
+ /* "pywrapfst.pyx":1663
* return _init_XFst(new fst.FstClass(deref(self._fst)))
*
* cpdef void draw(self, # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_17draw)) {
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_12);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_13 = __pyx_t_1; __pyx_t_14 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_13)) {
PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_source, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_v_title, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_float_format, __pyx_t_12};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_source, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_v_title, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_v_float_format, __pyx_t_12};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 16+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_16 = PyTuple_New(16+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_16 = PyTuple_New(16+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_16);
if (__pyx_t_14) {
__Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
__pyx_t_10 = 0;
__pyx_t_11 = 0;
__pyx_t_12 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
}
#endif
}
- /* "pywrapfst.pyx":1709
+ /* "pywrapfst.pyx":1711
* show_weight_one: Should weights equivalent to semiring One be printed?
* """
* cdef string _source = path_tostring(source) # <<<<<<<<<<<<<<
* cdef unique_ptr[ostream] _fstrm
* _fstrm.reset(new ofstream(_source))
*/
- __pyx_t_17 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L1_error)
+ __pyx_t_17 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L1_error)
__pyx_v__source = __pyx_t_17;
- /* "pywrapfst.pyx":1711
+ /* "pywrapfst.pyx":1713
* cdef string _source = path_tostring(source)
* cdef unique_ptr[ostream] _fstrm
* _fstrm.reset(new ofstream(_source)) # <<<<<<<<<<<<<<
*/
__pyx_v__fstrm.reset(new std::ofstream(__pyx_v__source));
- /* "pywrapfst.pyx":1712
+ /* "pywrapfst.pyx":1714
* cdef unique_ptr[ostream] _fstrm
* _fstrm.reset(new ofstream(_source))
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1712, __pyx_L1_error)
+ __PYX_ERR(0, 1714, __pyx_L1_error)
}
__pyx_v__isymbols = __pyx_v_self->_fst.get()->InputSymbols();
- /* "pywrapfst.pyx":1713
+ /* "pywrapfst.pyx":1715
* _fstrm.reset(new ofstream(_source))
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_19 = (__pyx_t_18 != 0);
if (__pyx_t_19) {
- /* "pywrapfst.pyx":1714
+ /* "pywrapfst.pyx":1716
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None:
* _isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1714, __pyx_L1_error)
+ __PYX_ERR(0, 1716, __pyx_L1_error)
}
- __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1714, __pyx_L1_error)
+ __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1716, __pyx_L1_error)
__pyx_v__isymbols = __pyx_t_20;
- /* "pywrapfst.pyx":1713
+ /* "pywrapfst.pyx":1715
* _fstrm.reset(new ofstream(_source))
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1715
+ /* "pywrapfst.pyx":1717
* if isymbols is not None:
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1715, __pyx_L1_error)
+ __PYX_ERR(0, 1717, __pyx_L1_error)
}
__pyx_v__osymbols = __pyx_v_self->_fst.get()->OutputSymbols();
- /* "pywrapfst.pyx":1716
+ /* "pywrapfst.pyx":1718
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_18 = (__pyx_t_19 != 0);
if (__pyx_t_18) {
- /* "pywrapfst.pyx":1717
+ /* "pywrapfst.pyx":1719
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None:
* _osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1717, __pyx_L1_error)
+ __PYX_ERR(0, 1719, __pyx_L1_error)
}
- __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L1_error)
+ __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1719, __pyx_L1_error)
__pyx_v__osymbols = __pyx_t_20;
- /* "pywrapfst.pyx":1716
+ /* "pywrapfst.pyx":1718
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1718
+ /* "pywrapfst.pyx":1720
* if osymbols is not None:
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL # <<<<<<<<<<<<<<
*/
__pyx_v__ssymbols = NULL;
- /* "pywrapfst.pyx":1719
+ /* "pywrapfst.pyx":1721
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_19 = (__pyx_t_18 != 0);
if (__pyx_t_19) {
- /* "pywrapfst.pyx":1720
+ /* "pywrapfst.pyx":1722
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None:
* _ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1720, __pyx_L1_error)
+ __PYX_ERR(0, 1722, __pyx_L1_error)
}
- __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L1_error)
+ __pyx_t_20 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L1_error)
__pyx_v__ssymbols = __pyx_t_20;
- /* "pywrapfst.pyx":1719
+ /* "pywrapfst.pyx":1721
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1721
+ /* "pywrapfst.pyx":1723
* if ssymbols is not None:
* _ssymbols = ssymbols._raw_ptr_or_raise()
* fst.Draw(deref(self._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1721, __pyx_L1_error)
+ __PYX_ERR(0, 1723, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1726
+ /* "pywrapfst.pyx":1728
* _ssymbols,
* acceptor,
* tostring(title), # <<<<<<<<<<<<<<
* width,
* height,
*/
- __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1726, __pyx_L1_error)
+ __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1728, __pyx_L1_error)
- /* "pywrapfst.pyx":1735
+ /* "pywrapfst.pyx":1737
* fontsize,
* precision,
* tostring(float_format), # <<<<<<<<<<<<<<
* show_weight_one,
* deref(_fstrm),
*/
- __pyx_t_21 = __pyx_f_9pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L1_error)
+ __pyx_t_21 = __pyx_f_9pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L1_error)
- /* "pywrapfst.pyx":1721
+ /* "pywrapfst.pyx":1723
* if ssymbols is not None:
* _ssymbols = ssymbols._raw_ptr_or_raise()
* fst.Draw(deref(self._fst), # <<<<<<<<<<<<<<
*/
fst::script::Draw((*__pyx_v_self->_fst), __pyx_v__isymbols, __pyx_v__osymbols, __pyx_v__ssymbols, __pyx_v_acceptor, __pyx_t_17, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_t_21, __pyx_v_show_weight_one, (*__pyx_v__fstrm), __pyx_v__source);
- /* "pywrapfst.pyx":1661
+ /* "pywrapfst.pyx":1663
* return _init_XFst(new fst.FstClass(deref(self._fst)))
*
* cpdef void draw(self, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_title,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_portrait,&__pyx_n_s_vertical,&__pyx_n_s_ranksep,&__pyx_n_s_nodesep,&__pyx_n_s_fontsize,&__pyx_n_s_precision,&__pyx_n_s_float_format,&__pyx_n_s_show_weight_one,0};
PyObject* values[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
- /* "pywrapfst.pyx":1663
+ /* "pywrapfst.pyx":1665
* cpdef void draw(self,
* source,
* SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
*/
values[1] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1664
+ /* "pywrapfst.pyx":1666
* source,
* SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, # <<<<<<<<<<<<<<
*/
values[2] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1665
+ /* "pywrapfst.pyx":1667
* SymbolTableView isymbols=None,
* SymbolTableView osymbols=None,
* SymbolTableView ssymbols=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1661, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1663, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[2]);
__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[3]);
if (values[4]) {
- __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1666, __pyx_L3_error)
+ __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1668, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1666
+ /* "pywrapfst.pyx":1668
* SymbolTableView osymbols=None,
* SymbolTableView ssymbols=None,
* bool acceptor=False, # <<<<<<<<<<<<<<
}
__pyx_v_title = values[5];
if (values[6]) {
- __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1668, __pyx_L3_error)
+ __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1670, __pyx_L3_error)
} else {
__pyx_v_width = ((double)8.5);
}
if (values[7]) {
- __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1669, __pyx_L3_error)
+ __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L3_error)
} else {
__pyx_v_height = ((double)11.0);
}
if (values[8]) {
- __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1670, __pyx_L3_error)
+ __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1672, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1670
+ /* "pywrapfst.pyx":1672
* double width=8.5,
* double height=11,
* bool portrait=False, # <<<<<<<<<<<<<<
__pyx_v_portrait = ((bool)0);
}
if (values[9]) {
- __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L3_error)
+ __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1673, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1671
+ /* "pywrapfst.pyx":1673
* double height=11,
* bool portrait=False,
* bool vertical=False, # <<<<<<<<<<<<<<
__pyx_v_vertical = ((bool)0);
}
if (values[10]) {
- __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1672, __pyx_L3_error)
+ __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error)
} else {
__pyx_v_ranksep = ((double)0.4);
}
if (values[11]) {
- __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1673, __pyx_L3_error)
+ __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1675, __pyx_L3_error)
} else {
__pyx_v_nodesep = ((double)0.25);
}
if (values[12]) {
- __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error)
+ __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1676, __pyx_L3_error)
} else {
__pyx_v_fontsize = ((int32)14);
}
if (values[13]) {
- __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1675, __pyx_L3_error)
+ __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1677, __pyx_L3_error)
} else {
__pyx_v_precision = ((int32)5);
}
__pyx_v_float_format = values[14];
if (values[15]) {
- __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1677, __pyx_L3_error)
+ __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1679, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1677
+ /* "pywrapfst.pyx":1679
* int32 precision=5,
* float_format="g",
* bool show_weight_one=False) except *: # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1661, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1663, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1663, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1664, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1665, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1665, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1666, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1667, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_3Fst_16draw(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), __pyx_v_source, __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_title, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_v_float_format, __pyx_v_show_weight_one);
- /* "pywrapfst.pyx":1661
+ /* "pywrapfst.pyx":1663
* return _init_XFst(new fst.FstClass(deref(self._fst)))
*
* cpdef void draw(self, # <<<<<<<<<<<<<<
__pyx_t_1.precision = __pyx_v_precision;
__pyx_t_1.float_format = __pyx_v_float_format;
__pyx_t_1.show_weight_one = __pyx_v_show_weight_one;
- __pyx_vtabptr_9pywrapfst_Fst->draw(__pyx_v_self, __pyx_v_source, 1, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1661, __pyx_L1_error)
- __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __pyx_vtabptr_9pywrapfst_Fst->draw(__pyx_v_self, __pyx_v_source, 1, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1663, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1740
+/* "pywrapfst.pyx":1742
* _source)
*
* cpdef Weight final(self, int64 state): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_19final)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 1740, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 1742, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1755
+ /* "pywrapfst.pyx":1757
* FstIndexError: State index out of range.
* """
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* if not _weight.member():
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1756
+ /* "pywrapfst.pyx":1758
* """
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 1756, __pyx_L1_error)
+ __PYX_ERR(0, 1758, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1756, __pyx_L1_error)
+ __PYX_ERR(0, 1758, __pyx_L1_error)
}
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(__pyx_v_self->_fst.get()->Final(__pyx_v_state)));
- /* "pywrapfst.pyx":1757
+ /* "pywrapfst.pyx":1759
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* if not _weight.member(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member");
- __PYX_ERR(0, 1757, __pyx_L1_error)
+ __PYX_ERR(0, 1759, __pyx_L1_error)
}
__pyx_t_6 = ((!(((struct __pyx_vtabstruct_9pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->member(__pyx_v__weight, 0) != 0)) != 0);
if (unlikely(__pyx_t_6)) {
- /* "pywrapfst.pyx":1758
+ /* "pywrapfst.pyx":1760
* _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* if not _weight.member():
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return _weight
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1758, __pyx_L1_error)
+ __PYX_ERR(0, 1760, __pyx_L1_error)
- /* "pywrapfst.pyx":1757
+ /* "pywrapfst.pyx":1759
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* if not _weight.member(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1759
+ /* "pywrapfst.pyx":1761
* if not _weight.member():
* raise FstIndexError("State index out of range")
* return _weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":1740
+ /* "pywrapfst.pyx":1742
* _source)
*
* cpdef Weight final(self, int64 state): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("final (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1742, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("final", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1761
+/* "pywrapfst.pyx":1763
* return _weight
*
* cpdef string fst_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_21fst_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1763, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1767
+ /* "pywrapfst.pyx":1769
* Returns a string indicating the FST type.
* """
* return self._fst.get().FstType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1767, __pyx_L1_error)
+ __PYX_ERR(0, 1769, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->FstType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1761
+ /* "pywrapfst.pyx":1763
* return _weight
*
* cpdef string fst_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("fst_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1769
+/* "pywrapfst.pyx":1771
* return self._fst.get().FstType()
*
* cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_23input_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1769, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1771, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1775
+ /* "pywrapfst.pyx":1777
* Returns the FST's input symbol table, or None if none is present.
* """
* if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1775, __pyx_L1_error)
+ __PYX_ERR(0, 1777, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_fst.get()->InputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1776
+ /* "pywrapfst.pyx":1778
* """
* if self._fst.get().InputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1775
+ /* "pywrapfst.pyx":1777
* Returns the FST's input symbol table, or None if none is present.
* """
* if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1777
+ /* "pywrapfst.pyx":1779
* if self._fst.get().InputSymbols() == NULL:
* return
* return _init_FstSymbolTableView(self._fst, input_side=True) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1777, __pyx_L1_error)
+ __PYX_ERR(0, 1779, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1769
+ /* "pywrapfst.pyx":1771
* return self._fst.get().FstType()
*
* cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("input_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1779
+/* "pywrapfst.pyx":1781
* return _init_FstSymbolTableView(self._fst, input_side=True)
*
* cpdef size_t num_arcs(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_25num_arcs)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1779, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1794
+ /* "pywrapfst.pyx":1796
* FstIndexError: State index out of range.
* """
* cdef size_t _result = self._fst.get().NumArcs(state) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1794, __pyx_L1_error)
+ __PYX_ERR(0, 1796, __pyx_L1_error)
}
__pyx_v__result = __pyx_v_self->_fst.get()->NumArcs(__pyx_v_state);
- /* "pywrapfst.pyx":1795
+ /* "pywrapfst.pyx":1797
* """
* cdef size_t _result = self._fst.get().NumArcs(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_7 = ((__pyx_v__result == SIZE_MAX) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":1796
+ /* "pywrapfst.pyx":1798
* cdef size_t _result = self._fst.get().NumArcs(state)
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return _result
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1796, __pyx_L1_error)
+ __PYX_ERR(0, 1798, __pyx_L1_error)
- /* "pywrapfst.pyx":1795
+ /* "pywrapfst.pyx":1797
* """
* cdef size_t _result = self._fst.get().NumArcs(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1797
+ /* "pywrapfst.pyx":1799
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return _result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1779
+ /* "pywrapfst.pyx":1781
* return _init_FstSymbolTableView(self._fst, input_side=True)
*
* cpdef size_t num_arcs(self, int64 state) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("num_arcs (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1779, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("num_arcs", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1779, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1799
+/* "pywrapfst.pyx":1801
* return _result
*
* cpdef size_t num_input_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_27num_input_epsilons)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1799, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1799, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1814
+ /* "pywrapfst.pyx":1816
* FstIndexError: State index out of range.
* """
* cdef size_t _result = self._fst.get().NumInputEpsilons(state) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1814, __pyx_L1_error)
+ __PYX_ERR(0, 1816, __pyx_L1_error)
}
__pyx_v__result = __pyx_v_self->_fst.get()->NumInputEpsilons(__pyx_v_state);
- /* "pywrapfst.pyx":1815
+ /* "pywrapfst.pyx":1817
* """
* cdef size_t _result = self._fst.get().NumInputEpsilons(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_7 = ((__pyx_v__result == SIZE_MAX) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":1816
+ /* "pywrapfst.pyx":1818
* cdef size_t _result = self._fst.get().NumInputEpsilons(state)
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return _result
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1816, __pyx_L1_error)
+ __PYX_ERR(0, 1818, __pyx_L1_error)
- /* "pywrapfst.pyx":1815
+ /* "pywrapfst.pyx":1817
* """
* cdef size_t _result = self._fst.get().NumInputEpsilons(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1817
+ /* "pywrapfst.pyx":1819
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return _result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1799
+ /* "pywrapfst.pyx":1801
* return _result
*
* cpdef size_t num_input_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("num_input_epsilons (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1799, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("num_input_epsilons", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1799, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1819
+/* "pywrapfst.pyx":1821
* return _result
*
* cpdef size_t num_output_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_29num_output_epsilons)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1819, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1819, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_6;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1834
+ /* "pywrapfst.pyx":1836
* FstIndexError: State index out of range.
* """
* cdef size_t _result = self._fst.get().NumOutputEpsilons(state) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1834, __pyx_L1_error)
+ __PYX_ERR(0, 1836, __pyx_L1_error)
}
__pyx_v__result = __pyx_v_self->_fst.get()->NumOutputEpsilons(__pyx_v_state);
- /* "pywrapfst.pyx":1835
+ /* "pywrapfst.pyx":1837
* """
* cdef size_t _result = self._fst.get().NumOutputEpsilons(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_7 = ((__pyx_v__result == SIZE_MAX) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":1836
+ /* "pywrapfst.pyx":1838
* cdef size_t _result = self._fst.get().NumOutputEpsilons(state)
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return _result
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 1836, __pyx_L1_error)
+ __PYX_ERR(0, 1838, __pyx_L1_error)
- /* "pywrapfst.pyx":1835
+ /* "pywrapfst.pyx":1837
* """
* cdef size_t _result = self._fst.get().NumOutputEpsilons(state)
* if _result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1837
+ /* "pywrapfst.pyx":1839
* if _result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return _result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1819
+ /* "pywrapfst.pyx":1821
* return _result
*
* cpdef size_t num_output_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("num_output_epsilons (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("num_output_epsilons", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1819, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1839
+/* "pywrapfst.pyx":1841
* return _result
*
* cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_31output_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1839, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1841, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1845
+ /* "pywrapfst.pyx":1847
* Returns the FST's output symbol table, or None if none is present.
* """
* if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1845, __pyx_L1_error)
+ __PYX_ERR(0, 1847, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_fst.get()->OutputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1846
+ /* "pywrapfst.pyx":1848
* """
* if self._fst.get().OutputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1845
+ /* "pywrapfst.pyx":1847
* Returns the FST's output symbol table, or None if none is present.
* """
* if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1847
+ /* "pywrapfst.pyx":1849
* if self._fst.get().OutputSymbols() == NULL:
* return
* return _init_FstSymbolTableView(self._fst, input_side=False) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1847, __pyx_L1_error)
+ __PYX_ERR(0, 1849, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTableView *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1839
+ /* "pywrapfst.pyx":1841
* return _result
*
* cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("output_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1849
+/* "pywrapfst.pyx":1851
* return _init_FstSymbolTableView(self._fst, input_side=False)
*
* cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
static std::string __pyx_f_9pywrapfst_3Fst_print(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_print *__pyx_optional_args) {
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_isymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1850
+ /* "pywrapfst.pyx":1852
*
* cpdef string print(self, SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, SymbolTableView ssymbols=None, # <<<<<<<<<<<<<<
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1851
+ /* "pywrapfst.pyx":1853
* cpdef string print(self, SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, SymbolTableView ssymbols=None,
* bool acceptor=False, bool show_weight_one=False, # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1849
+ /* "pywrapfst.pyx":1851
* return _init_FstSymbolTableView(self._fst, input_side=False)
*
* cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_33print)) {
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[7] = {__pyx_t_6, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_t_4, __pyx_v_missing_sym};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[7] = {__pyx_t_6, ((PyObject *)__pyx_v_isymbols), ((PyObject *)__pyx_v_osymbols), ((PyObject *)__pyx_v_ssymbols), __pyx_t_3, __pyx_t_4, __pyx_v_missing_sym};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
if (__pyx_t_6) {
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_v_missing_sym);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_9;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1875
+ /* "pywrapfst.pyx":1877
* """
* # Prints FST to stringstream, then returns resulting string.
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1875, __pyx_L1_error)
+ __PYX_ERR(0, 1877, __pyx_L1_error)
}
__pyx_v__isymbols = __pyx_v_self->_fst.get()->InputSymbols();
- /* "pywrapfst.pyx":1876
+ /* "pywrapfst.pyx":1878
* # Prints FST to stringstream, then returns resulting string.
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_11 = (__pyx_t_10 != 0);
if (__pyx_t_11) {
- /* "pywrapfst.pyx":1877
+ /* "pywrapfst.pyx":1879
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None:
* _isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1877, __pyx_L1_error)
+ __PYX_ERR(0, 1879, __pyx_L1_error)
}
- __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1877, __pyx_L1_error)
+ __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L1_error)
__pyx_v__isymbols = __pyx_t_12;
- /* "pywrapfst.pyx":1876
+ /* "pywrapfst.pyx":1878
* # Prints FST to stringstream, then returns resulting string.
* cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols()
* if isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1878
+ /* "pywrapfst.pyx":1880
* if isymbols is not None:
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1878, __pyx_L1_error)
+ __PYX_ERR(0, 1880, __pyx_L1_error)
}
__pyx_v__osymbols = __pyx_v_self->_fst.get()->OutputSymbols();
- /* "pywrapfst.pyx":1879
+ /* "pywrapfst.pyx":1881
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_10 = (__pyx_t_11 != 0);
if (__pyx_t_10) {
- /* "pywrapfst.pyx":1880
+ /* "pywrapfst.pyx":1882
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None:
* _osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1880, __pyx_L1_error)
+ __PYX_ERR(0, 1882, __pyx_L1_error)
}
- __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1882, __pyx_L1_error)
__pyx_v__osymbols = __pyx_t_12;
- /* "pywrapfst.pyx":1879
+ /* "pywrapfst.pyx":1881
* _isymbols = isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols()
* if osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1881
+ /* "pywrapfst.pyx":1883
* if osymbols is not None:
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL # <<<<<<<<<<<<<<
*/
__pyx_v__ssymbols = NULL;
- /* "pywrapfst.pyx":1882
+ /* "pywrapfst.pyx":1884
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_11 = (__pyx_t_10 != 0);
if (__pyx_t_11) {
- /* "pywrapfst.pyx":1883
+ /* "pywrapfst.pyx":1885
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None:
* _ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 1883, __pyx_L1_error)
+ __PYX_ERR(0, 1885, __pyx_L1_error)
}
- __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1883, __pyx_L1_error)
+ __pyx_t_12 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1885, __pyx_L1_error)
__pyx_v__ssymbols = __pyx_t_12;
- /* "pywrapfst.pyx":1882
+ /* "pywrapfst.pyx":1884
* _osymbols = osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1885
+ /* "pywrapfst.pyx":1887
* _ssymbols = ssymbols._raw_ptr_or_raise()
* cdef stringstream _sstrm
* fst.Print(deref(self._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1885, __pyx_L1_error)
+ __PYX_ERR(0, 1887, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1893
+ /* "pywrapfst.pyx":1895
* acceptor,
* show_weight_one,
* tostring(missing_sym)) # <<<<<<<<<<<<<<
* return _sstrm.str()
*
*/
- __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1893, __pyx_L1_error)
+ __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1895, __pyx_L1_error)
- /* "pywrapfst.pyx":1885
+ /* "pywrapfst.pyx":1887
* _ssymbols = ssymbols._raw_ptr_or_raise()
* cdef stringstream _sstrm
* fst.Print(deref(self._fst), # <<<<<<<<<<<<<<
*/
fst::script::Print((*__pyx_v_self->_fst), __pyx_v__sstrm, __pyx_k_pywrapfst, __pyx_v__isymbols, __pyx_v__osymbols, __pyx_v__ssymbols, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_t_9);
- /* "pywrapfst.pyx":1894
+ /* "pywrapfst.pyx":1896
* show_weight_one,
* tostring(missing_sym))
* return _sstrm.str() # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__sstrm.str();
goto __pyx_L0;
- /* "pywrapfst.pyx":1849
+ /* "pywrapfst.pyx":1851
* return _init_FstSymbolTableView(self._fst, input_side=False)
*
* cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
PyObject* values[6] = {0,0,0,0,0,0};
values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":1850
+ /* "pywrapfst.pyx":1852
*
* cpdef string print(self, SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, SymbolTableView ssymbols=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print") < 0)) __PYX_ERR(0, 1849, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print") < 0)) __PYX_ERR(0, 1851, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[1]);
__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[2]);
if (values[3]) {
- __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L3_error)
+ __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1851
+ /* "pywrapfst.pyx":1853
* cpdef string print(self, SymbolTableView isymbols=None,
* SymbolTableView osymbols=None, SymbolTableView ssymbols=None,
* bool acceptor=False, bool show_weight_one=False, # <<<<<<<<<<<<<<
__pyx_v_acceptor = ((bool)0);
}
if (values[4]) {
- __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L3_error)
+ __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L3_error)
} else {
__pyx_v_show_weight_one = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("print", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1849, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("print", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1851, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.print", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1849, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1850, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1850, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1851, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1852, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1852, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_3Fst_32print(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_v_missing_sym);
- /* "pywrapfst.pyx":1849
+ /* "pywrapfst.pyx":1851
* return _init_FstSymbolTableView(self._fst, input_side=False)
*
* cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<<
__pyx_t_2.acceptor = __pyx_v_acceptor;
__pyx_t_2.show_weight_one = __pyx_v_show_weight_one;
__pyx_t_2.missing_sym = __pyx_v_missing_sym;
- __pyx_t_1 = __pyx_vtabptr_9pywrapfst_Fst->print(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error)
- __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1849, __pyx_L1_error)
+ __pyx_t_1 = __pyx_vtabptr_9pywrapfst_Fst->print(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1851, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1896
+/* "pywrapfst.pyx":1898
* return _sstrm.str()
*
* def properties(self, mask, bool test): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_test)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1896, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1898, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "properties") < 0)) __PYX_ERR(0, 1896, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "properties") < 0)) __PYX_ERR(0, 1898, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_mask = values[0];
- __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1896, __pyx_L3_error)
+ __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1898, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1896, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1898, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.properties", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("properties", 0);
- /* "pywrapfst.pyx":1914
+ /* "pywrapfst.pyx":1916
* A FstProperties representing a 64-bit bitmask of the requested properties.
* """
* return FstProperties(self._fst.get().Properties(mask.value, test)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1914, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1914, __pyx_L1_error)
+ __PYX_ERR(0, 1916, __pyx_L1_error)
}
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1914, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1916, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_fst.get()->Properties(__pyx_t_4, __pyx_v_test)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_fst.get()->Properties(__pyx_t_4, __pyx_v_test)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1896
+ /* "pywrapfst.pyx":1898
* return _sstrm.str()
*
* def properties(self, mask, bool test): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1917
+/* "pywrapfst.pyx":1919
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read", 0);
- /* "pywrapfst.pyx":1932
+ /* "pywrapfst.pyx":1934
* FstIOError: Read failed.
* """
* return _read_Fst(source) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1917
+ /* "pywrapfst.pyx":1919
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1935
+/* "pywrapfst.pyx":1937
*
* @classmethod
* def read_from_string(cls, state): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_from_string", 0);
- /* "pywrapfst.pyx":1950
+ /* "pywrapfst.pyx":1952
* FstIOError: Read failed.
* """
* return _read_Fst_from_string(state) # <<<<<<<<<<<<<<
* cpdef int64 start(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1950, __pyx_L1_error)
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_t_1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_t_1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1935
+ /* "pywrapfst.pyx":1937
*
* @classmethod
* def read_from_string(cls, state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1952
+/* "pywrapfst.pyx":1954
* return _read_Fst_from_string(state)
*
* cpdef int64 start(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_41start)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1954, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1958
+ /* "pywrapfst.pyx":1960
* Returns the start state.
* """
* return self._fst.get().Start() # <<<<<<<<<<<<<<
*
- * cpdef StateIterator states(self):
+ * cpdef _StateIterator states(self):
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1958, __pyx_L1_error)
+ __PYX_ERR(0, 1960, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->Start();
goto __pyx_L0;
- /* "pywrapfst.pyx":1952
+ /* "pywrapfst.pyx":1954
* return _read_Fst_from_string(state)
*
* cpdef int64 start(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("start", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_3Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_3Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1960
+/* "pywrapfst.pyx":1962
* return self._fst.get().Start()
*
- * cpdef StateIterator states(self): # <<<<<<<<<<<<<<
+ * cpdef _StateIterator states(self): # <<<<<<<<<<<<<<
* """
* states(self)
*/
static PyObject *__pyx_pw_9pywrapfst_3Fst_43states(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static struct __pyx_obj_9pywrapfst_StateIterator *__pyx_f_9pywrapfst_3Fst_states(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch) {
- struct __pyx_obj_9pywrapfst_StateIterator *__pyx_r = NULL;
+static struct __pyx_obj_9pywrapfst__StateIterator *__pyx_f_9pywrapfst_3Fst_states(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch) {
+ struct __pyx_obj_9pywrapfst__StateIterator *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_43states)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_StateIterator))))) __PYX_ERR(0, 1960, __pyx_L1_error)
- __pyx_r = ((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_t_2);
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__StateIterator))))) __PYX_ERR(0, 1962, __pyx_L1_error)
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
#endif
}
- /* "pywrapfst.pyx":1969
- * A StateIterator object for the FST.
+ /* "pywrapfst.pyx":1971
+ * A _StateIterator object for the FST.
* """
- * return StateIterator(self) # <<<<<<<<<<<<<<
+ * return _StateIterator(self) # <<<<<<<<<<<<<<
*
* cpdef bool verify(self):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst_StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_9pywrapfst__StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_r = ((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_t_1);
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1960
+ /* "pywrapfst.pyx":1962
* return self._fst.get().Start()
*
- * cpdef StateIterator states(self): # <<<<<<<<<<<<<<
+ * cpdef _StateIterator states(self): # <<<<<<<<<<<<<<
* """
* states(self)
*/
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_3Fst_43states(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_3Fst_42states[] = "\n states(self)\n\n Returns an iterator over all states in the FST.\n\n Returns:\n A StateIterator object for the FST.\n ";
+static char __pyx_doc_9pywrapfst_3Fst_42states[] = "\n states(self)\n\n Returns an iterator over all states in the FST.\n\n Returns:\n A _StateIterator object for the FST.\n ";
static PyObject *__pyx_pw_9pywrapfst_3Fst_43states(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("states", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1971
- * return StateIterator(self)
+/* "pywrapfst.pyx":1973
+ * return _StateIterator(self)
*
* cpdef bool verify(self): # <<<<<<<<<<<<<<
* """
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_45verify)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1973, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1980
+ /* "pywrapfst.pyx":1982
* True if the contents are sane, False otherwise.
* """
* return fst.Verify(deref(self._fst)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1980, __pyx_L1_error)
+ __PYX_ERR(0, 1982, __pyx_L1_error)
}
__pyx_r = fst::script::Verify((*__pyx_v_self->_fst));
goto __pyx_L0;
- /* "pywrapfst.pyx":1971
- * return StateIterator(self)
+ /* "pywrapfst.pyx":1973
+ * return _StateIterator(self)
*
* cpdef bool verify(self): # <<<<<<<<<<<<<<
* """
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("verify", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_3Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_3Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1982
+/* "pywrapfst.pyx":1984
* return fst.Verify(deref(self._fst))
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_47weight_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1982, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1982, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1984, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":1991
+ /* "pywrapfst.pyx":1993
* A string representing the weight type.
* """
* return self._fst.get().WeightType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 1991, __pyx_L1_error)
+ __PYX_ERR(0, 1993, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->WeightType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1982
+ /* "pywrapfst.pyx":1984
* return fst.Verify(deref(self._fst))
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("weight_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_3Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1993
+/* "pywrapfst.pyx":1995
* return self._fst.get().WeightType()
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_49write)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_source) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_source);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1993, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1995, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":2007
+ /* "pywrapfst.pyx":2009
* FstIOError: Write failed.
* """
* if not self._fst.get().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2007, __pyx_L1_error)
+ __PYX_ERR(0, 2009, __pyx_L1_error)
}
- __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2007, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2009, __pyx_L1_error)
__pyx_t_6 = ((!(__pyx_v_self->_fst.get()->Write(__pyx_t_5) != 0)) != 0);
if (unlikely(__pyx_t_6)) {
- /* "pywrapfst.pyx":2008
+ /* "pywrapfst.pyx":2010
* """
* if not self._fst.get().Write(path_tostring(source)):
* raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<<
*
* cpdef bytes write_to_string(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2008, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2008, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 2008, __pyx_L1_error)
+ __PYX_ERR(0, 2010, __pyx_L1_error)
- /* "pywrapfst.pyx":2007
+ /* "pywrapfst.pyx":2009
* FstIOError: Write failed.
* """
* if not self._fst.get().Write(path_tostring(source)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1993
+ /* "pywrapfst.pyx":1995
* return self._fst.get().WeightType()
*
* cpdef void write(self, source) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_3Fst_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1993, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L1_error)
+ __pyx_f_9pywrapfst_3Fst_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2010
+/* "pywrapfst.pyx":2012
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Fst_51write_to_string)) {
__Pyx_XDECREF(__pyx_r);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2010, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2010, __pyx_L1_error)
+ if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2012, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":2023
+ /* "pywrapfst.pyx":2025
* """
* cdef stringstream _sstrm
* if not self._fst.get().Write(_sstrm, b"<pywrapfst>"): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2023, __pyx_L1_error)
+ __PYX_ERR(0, 2025, __pyx_L1_error)
}
__pyx_t_5 = ((!(__pyx_v_self->_fst.get()->Write(__pyx_v__sstrm, __pyx_k_pywrapfst) != 0)) != 0);
if (unlikely(__pyx_t_5)) {
- /* "pywrapfst.pyx":2024
+ /* "pywrapfst.pyx":2026
* cdef stringstream _sstrm
* if not self._fst.get().Write(_sstrm, b"<pywrapfst>"):
* raise FstIOError("Write to string failed") # <<<<<<<<<<<<<<
* return _sstrm.str()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2024, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2026, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Write_to_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Write_to_string_failed);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2024, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 2024, __pyx_L1_error)
+ __PYX_ERR(0, 2026, __pyx_L1_error)
- /* "pywrapfst.pyx":2023
+ /* "pywrapfst.pyx":2025
* """
* cdef stringstream _sstrm
* if not self._fst.get().Write(_sstrm, b"<pywrapfst>"): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2025
+ /* "pywrapfst.pyx":2027
* if not self._fst.get().Write(_sstrm, b"<pywrapfst>"):
* raise FstIOError("Write to string failed")
* return _sstrm.str() # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2025, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2027, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2010
+ /* "pywrapfst.pyx":2012
* raise FstIOError(f"Write failed: {source!r}")
*
* cpdef bytes write_to_string(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write_to_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_3Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2038
+/* "pywrapfst.pyx":2040
* """
*
* cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_check_mutating_imethod", 0);
- /* "pywrapfst.pyx":2043
+ /* "pywrapfst.pyx":2045
* This function is not visible to Python users.
* """
* if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2043, __pyx_L1_error)
+ __PYX_ERR(0, 2045, __pyx_L1_error)
}
__pyx_t_1 = ((__pyx_v_self->__pyx_base._fst.get()->Properties(fst::kError, 1) == fst::kError) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2044
+ /* "pywrapfst.pyx":2046
* """
* if self._fst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef void _add_arc(self, int64 state, Arc arc) except *:
* if not self._fst.get().ValidStateId(state):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2044, __pyx_L1_error)
+ __PYX_ERR(0, 2046, __pyx_L1_error)
- /* "pywrapfst.pyx":2043
+ /* "pywrapfst.pyx":2045
* This function is not visible to Python users.
* """
* if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2038
+ /* "pywrapfst.pyx":2040
* """
*
* cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2045
+/* "pywrapfst.pyx":2047
* if self._fst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed")
* cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_add_arc", 0);
- /* "pywrapfst.pyx":2046
+ /* "pywrapfst.pyx":2048
* raise FstOpError("Operation failed")
* cdef void _add_arc(self, int64 state, Arc arc) except *:
* if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2046, __pyx_L1_error)
+ __PYX_ERR(0, 2048, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2047
+ /* "pywrapfst.pyx":2049
* cdef void _add_arc(self, int64 state, Arc arc) except *:
* if not self._fst.get().ValidStateId(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* if not self._mfst.get().AddArc(state, deref(arc._arc)):
* raise FstOpError("Incompatible or invalid weight type")
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2049, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2047, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2049, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2047, __pyx_L1_error)
+ __PYX_ERR(0, 2049, __pyx_L1_error)
- /* "pywrapfst.pyx":2046
+ /* "pywrapfst.pyx":2048
* raise FstOpError("Operation failed")
* cdef void _add_arc(self, int64 state, Arc arc) except *:
* if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2048
+ /* "pywrapfst.pyx":2050
* if not self._fst.get().ValidStateId(state):
* raise FstIndexError("State index out of range")
* if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2048, __pyx_L1_error)
+ __PYX_ERR(0, 2050, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 2048, __pyx_L1_error)
+ __PYX_ERR(0, 2050, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->AddArc(__pyx_v_state, (*__pyx_v_arc->_arc)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2049
+ /* "pywrapfst.pyx":2051
* raise FstIndexError("State index out of range")
* if not self._mfst.get().AddArc(state, deref(arc._arc)):
* raise FstOpError("Incompatible or invalid weight type") # <<<<<<<<<<<<<<
*
* def add_arc(self, int64 state, Arc arc):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2049, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight_t) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_weight_t);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2049, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2049, __pyx_L1_error)
+ __PYX_ERR(0, 2051, __pyx_L1_error)
- /* "pywrapfst.pyx":2048
+ /* "pywrapfst.pyx":2050
* if not self._fst.get().ValidStateId(state):
* raise FstIndexError("State index out of range")
* if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2045
+ /* "pywrapfst.pyx":2047
* if self._fst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed")
* cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2051
+/* "pywrapfst.pyx":2053
* raise FstOpError("Incompatible or invalid weight type")
*
* def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arc)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 2051, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 2053, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc") < 0)) __PYX_ERR(0, 2051, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc") < 0)) __PYX_ERR(0, 2053, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2051, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2053, __pyx_L3_error)
__pyx_v_arc = ((struct __pyx_obj_9pywrapfst_Arc *)values[1]);
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2051, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2053, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.add_arc", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 2051, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 2053, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_add_arc(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_state, __pyx_v_arc);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add_arc", 0);
- /* "pywrapfst.pyx":2068
+ /* "pywrapfst.pyx":2070
* FstOpdexError: Incompatible or invalid weight type.
* """
* self._add_arc(state, arc) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_add_arc");
- __PYX_ERR(0, 2068, __pyx_L1_error)
+ __PYX_ERR(0, 2070, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add_arc(__pyx_v_self, __pyx_v_state, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2068, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_add_arc(__pyx_v_self, __pyx_v_state, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2070, __pyx_L1_error)
- /* "pywrapfst.pyx":2069
+ /* "pywrapfst.pyx":2071
* """
* self._add_arc(state, arc)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2051
+ /* "pywrapfst.pyx":2053
* raise FstOpError("Incompatible or invalid weight type")
*
* def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2071
+/* "pywrapfst.pyx":2073
* return self
*
* cpdef int64 add_state(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_10MutableFst_3add_state)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2073, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2071, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2073, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":2080
+ /* "pywrapfst.pyx":2082
* The integer index of the new state.
* """
* return self._mfst.get().AddState() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2080, __pyx_L1_error)
+ __PYX_ERR(0, 2082, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mfst.get()->AddState();
goto __pyx_L0;
- /* "pywrapfst.pyx":2071
+ /* "pywrapfst.pyx":2073
* return self
*
* cpdef int64 add_state(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add_state", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_10MutableFst_add_state(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_10MutableFst_add_state(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2082
+/* "pywrapfst.pyx":2084
* return self._mfst.get().AddState()
*
* cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_10MutableFst_5add_states)) {
- __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2082, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2084, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2082, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2084, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":2091
+ /* "pywrapfst.pyx":2093
* n: The number of states to add.
* """
* self._mfst.get().AddStates(n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2091, __pyx_L1_error)
+ __PYX_ERR(0, 2093, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->AddStates(__pyx_v_n);
- /* "pywrapfst.pyx":2082
+ /* "pywrapfst.pyx":2084
* return self._mfst.get().AddState()
*
* cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("add_states (wrapper)", 0);
assert(__pyx_arg_n); {
- __pyx_v_n = __Pyx_PyInt_As_size_t(__pyx_arg_n); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2082, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_size_t(__pyx_arg_n); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2084, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add_states", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_10MutableFst_add_states(__pyx_v_self, __pyx_v_n, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_10MutableFst_add_states(__pyx_v_self, __pyx_v_n, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2093
+/* "pywrapfst.pyx":2095
* self._mfst.get().AddStates(n)
*
* cdef void _arcsort(self, sort_type="ilabel") except *: # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_10MutableFst__arcsort(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__arcsort *__pyx_optional_args) {
PyObject *__pyx_v_sort_type = ((PyObject *)__pyx_n_u_ilabel);
- enum fst::script::ArcSortType __pyx_v__sort_type;
+ fst::script::ArcSortType __pyx_v__sort_type;
__Pyx_RefNannyDeclarations
std::string __pyx_t_1;
int __pyx_t_2;
}
}
- /* "pywrapfst.pyx":2095
+ /* "pywrapfst.pyx":2097
* cdef void _arcsort(self, sort_type="ilabel") except *:
* cdef fst.ArcSortType _sort_type
* if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): # <<<<<<<<<<<<<<
* raise FstArgError(f"Unknown sort type: {sort_type!r}")
* fst.ArcSort(self._mfst.get(), _sort_type)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2097, __pyx_L1_error)
__pyx_t_2 = ((!(fst::script::GetArcSortType(__pyx_t_1, (&__pyx_v__sort_type)) != 0)) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":2096
+ /* "pywrapfst.pyx":2098
* cdef fst.ArcSortType _sort_type
* if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)):
* raise FstArgError(f"Unknown sort type: {sort_type!r}") # <<<<<<<<<<<<<<
* fst.ArcSort(self._mfst.get(), _sort_type)
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sort_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sort_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_sort_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_sort_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2096, __pyx_L1_error)
+ __PYX_ERR(0, 2098, __pyx_L1_error)
- /* "pywrapfst.pyx":2095
+ /* "pywrapfst.pyx":2097
* cdef void _arcsort(self, sort_type="ilabel") except *:
* cdef fst.ArcSortType _sort_type
* if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2097
+ /* "pywrapfst.pyx":2099
* if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)):
* raise FstArgError(f"Unknown sort type: {sort_type!r}")
* fst.ArcSort(self._mfst.get(), _sort_type) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2097, __pyx_L1_error)
+ __PYX_ERR(0, 2099, __pyx_L1_error)
}
fst::script::ArcSort(__pyx_v_self->_mfst.get(), __pyx_v__sort_type);
- /* "pywrapfst.pyx":2093
+ /* "pywrapfst.pyx":2095
* self._mfst.get().AddStates(n)
*
* cdef void _arcsort(self, sort_type="ilabel") except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2099
+/* "pywrapfst.pyx":2101
* fst.ArcSort(self._mfst.get(), _sort_type)
*
* def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 2099, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 2101, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2099, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2101, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.arcsort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arcsort", 0);
- /* "pywrapfst.pyx":2118
+ /* "pywrapfst.pyx":2120
* FstArgError: Unknown sort type.
* """
* self._arcsort(sort_type) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arcsort");
- __PYX_ERR(0, 2118, __pyx_L1_error)
+ __PYX_ERR(0, 2120, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.sort_type = __pyx_v_sort_type;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2118, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2120, __pyx_L1_error)
- /* "pywrapfst.pyx":2119
+ /* "pywrapfst.pyx":2121
* """
* self._arcsort(sort_type)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2099
+ /* "pywrapfst.pyx":2101
* fst.ArcSort(self._mfst.get(), _sort_type)
*
* def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2121
+/* "pywrapfst.pyx":2123
* return self
*
* cdef void _closure(self, bool closure_plus=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2122
+ /* "pywrapfst.pyx":2124
*
* cdef void _closure(self, bool closure_plus=False):
* fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2122, __pyx_L1_error)
+ __PYX_ERR(0, 2124, __pyx_L1_error)
}
fst::script::Closure(__pyx_v_self->_mfst.get(), fst::script::GetClosureType(__pyx_v_closure_plus));
- /* "pywrapfst.pyx":2121
+ /* "pywrapfst.pyx":2123
* return self
*
* cdef void _closure(self, bool closure_plus=False): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2124
+/* "pywrapfst.pyx":2126
* fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus))
*
* def closure(self, bool closure_plus=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "closure") < 0)) __PYX_ERR(0, 2124, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "closure") < 0)) __PYX_ERR(0, 2126, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_closure_plus = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_closure_plus == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2124, __pyx_L3_error)
+ __pyx_v_closure_plus = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_closure_plus == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2126, __pyx_L3_error)
} else {
__pyx_v_closure_plus = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2124, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2126, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.closure", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("closure", 0);
- /* "pywrapfst.pyx":2142
+ /* "pywrapfst.pyx":2144
* self.
* """
* self._closure(closure_plus) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_closure");
- __PYX_ERR(0, 2142, __pyx_L1_error)
+ __PYX_ERR(0, 2144, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.closure_plus = __pyx_v_closure_plus;
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1);
- /* "pywrapfst.pyx":2143
+ /* "pywrapfst.pyx":2145
* """
* self._closure(closure_plus)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2124
+ /* "pywrapfst.pyx":2126
* fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus))
*
* def closure(self, bool closure_plus=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2145
+/* "pywrapfst.pyx":2147
* return self
*
* cdef void _concat(self, Fst fst2) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_concat", 0);
- /* "pywrapfst.pyx":2146
+ /* "pywrapfst.pyx":2148
*
* cdef void _concat(self, Fst fst2) except *:
* fst.Concat(self._mfst.get(), deref(fst2._fst)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2146, __pyx_L1_error)
+ __PYX_ERR(0, 2148, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_fst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2146, __pyx_L1_error)
+ __PYX_ERR(0, 2148, __pyx_L1_error)
}
fst::script::Concat(__pyx_v_self->_mfst.get(), (*__pyx_v_fst2->_fst));
- /* "pywrapfst.pyx":2147
+ /* "pywrapfst.pyx":2149
* cdef void _concat(self, Fst fst2) except *:
* fst.Concat(self._mfst.get(), deref(fst2._fst))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2147, __pyx_L1_error)
+ __PYX_ERR(0, 2149, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2147, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L1_error)
- /* "pywrapfst.pyx":2145
+ /* "pywrapfst.pyx":2147
* return self
*
* cdef void _concat(self, Fst fst2) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2149
+/* "pywrapfst.pyx":2151
* self._check_mutating_imethod()
*
* def concat(self, Fst fst2): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("concat (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst2), __pyx_ptype_9pywrapfst_Fst, 1, "fst2", 0))) __PYX_ERR(0, 2149, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst2), __pyx_ptype_9pywrapfst_Fst, 1, "fst2", 0))) __PYX_ERR(0, 2151, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_10concat(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_fst2));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("concat", 0);
- /* "pywrapfst.pyx":2166
+ /* "pywrapfst.pyx":2168
* self.
* """
* self._concat(fst2) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_concat");
- __PYX_ERR(0, 2166, __pyx_L1_error)
+ __PYX_ERR(0, 2168, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_fst2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2166, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_fst2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2168, __pyx_L1_error)
- /* "pywrapfst.pyx":2167
+ /* "pywrapfst.pyx":2169
* """
* self._concat(fst2)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2149
+ /* "pywrapfst.pyx":2151
* self._check_mutating_imethod()
*
* def concat(self, Fst fst2): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2169
+/* "pywrapfst.pyx":2171
* return self
*
* cdef void _connect(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_connect", 0);
- /* "pywrapfst.pyx":2170
+ /* "pywrapfst.pyx":2172
*
* cdef void _connect(self):
* fst.Connect(self._mfst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2170, __pyx_L1_error)
+ __PYX_ERR(0, 2172, __pyx_L1_error)
}
fst::script::Connect(__pyx_v_self->_mfst.get());
- /* "pywrapfst.pyx":2169
+ /* "pywrapfst.pyx":2171
* return self
*
* cdef void _connect(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2172
+/* "pywrapfst.pyx":2174
* fst.Connect(self._mfst.get())
*
* def connect(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("connect", 0);
- /* "pywrapfst.pyx":2184
+ /* "pywrapfst.pyx":2186
* self.
* """
* self._connect() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_connect");
- __PYX_ERR(0, 2184, __pyx_L1_error)
+ __PYX_ERR(0, 2186, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self);
- /* "pywrapfst.pyx":2185
+ /* "pywrapfst.pyx":2187
* """
* self._connect()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2172
+ /* "pywrapfst.pyx":2174
* fst.Connect(self._mfst.get())
*
* def connect(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2187
+/* "pywrapfst.pyx":2189
* return self
*
* cdef void _decode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_decode", 0);
- /* "pywrapfst.pyx":2188
+ /* "pywrapfst.pyx":2190
*
* cdef void _decode(self, EncodeMapper mapper) except *:
* fst.Decode(self._mfst.get(), deref(mapper._mapper)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2188, __pyx_L1_error)
+ __PYX_ERR(0, 2190, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_mapper) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 2188, __pyx_L1_error)
+ __PYX_ERR(0, 2190, __pyx_L1_error)
}
fst::script::Decode(__pyx_v_self->_mfst.get(), (*__pyx_v_mapper->_mapper));
- /* "pywrapfst.pyx":2189
+ /* "pywrapfst.pyx":2191
* cdef void _decode(self, EncodeMapper mapper) except *:
* fst.Decode(self._mfst.get(), deref(mapper._mapper))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2189, __pyx_L1_error)
+ __PYX_ERR(0, 2191, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2189, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2191, __pyx_L1_error)
- /* "pywrapfst.pyx":2187
+ /* "pywrapfst.pyx":2189
* return self
*
* cdef void _decode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2191
+/* "pywrapfst.pyx":2193
* self._check_mutating_imethod()
*
* def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("decode (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2191, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2193, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_14decode(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_mapper));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("decode", 0);
- /* "pywrapfst.pyx":2205
+ /* "pywrapfst.pyx":2207
* self.
* """
* self._decode(mapper) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_decode");
- __PYX_ERR(0, 2205, __pyx_L1_error)
+ __PYX_ERR(0, 2207, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2207, __pyx_L1_error)
- /* "pywrapfst.pyx":2206
+ /* "pywrapfst.pyx":2208
* """
* self._decode(mapper)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2191
+ /* "pywrapfst.pyx":2193
* self._check_mutating_imethod()
*
* def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2208
+/* "pywrapfst.pyx":2210
* return self
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2209
+ /* "pywrapfst.pyx":2211
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *:
* if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<<
if ((__pyx_v_n != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2209, __pyx_L1_error)
+ __PYX_ERR(0, 2211, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state, __pyx_v_n);
} else {
- /* "pywrapfst.pyx":2210
+ /* "pywrapfst.pyx":2212
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *:
* if not (self._mfst.get().DeleteArcs(state, n) if n else
* self._mfst.get().DeleteArcs(state)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2210, __pyx_L1_error)
+ __PYX_ERR(0, 2212, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state);
}
- /* "pywrapfst.pyx":2209
+ /* "pywrapfst.pyx":2211
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *:
* if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<<
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":2211
+ /* "pywrapfst.pyx":2213
* if not (self._mfst.get().DeleteArcs(state, n) if n else
* self._mfst.get().DeleteArcs(state)):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2213, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
}
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2211, __pyx_L1_error)
+ __PYX_ERR(0, 2213, __pyx_L1_error)
- /* "pywrapfst.pyx":2209
+ /* "pywrapfst.pyx":2211
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *:
* if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2212
+ /* "pywrapfst.pyx":2214
* self._mfst.get().DeleteArcs(state)):
* raise FstIndexError("State index out of range")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2212, __pyx_L1_error)
+ __PYX_ERR(0, 2214, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2212, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2214, __pyx_L1_error)
- /* "pywrapfst.pyx":2208
+ /* "pywrapfst.pyx":2210
* return self
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2214
+/* "pywrapfst.pyx":2216
* self._check_mutating_imethod()
*
* def delete_arcs(self, int64 state, size_t n=0): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 2214, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 2216, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2214, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2216, __pyx_L3_error)
if (values[1]) {
- __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2214, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2216, __pyx_L3_error)
} else {
__pyx_v_n = ((size_t)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2214, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2216, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.delete_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("delete_arcs", 0);
- /* "pywrapfst.pyx":2232
+ /* "pywrapfst.pyx":2234
* FstIndexError: State index out of range.
* """
* self._delete_arcs(state, n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_arcs");
- __PYX_ERR(0, 2232, __pyx_L1_error)
+ __PYX_ERR(0, 2234, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.n = __pyx_v_n;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_arcs(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2232, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_arcs(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2234, __pyx_L1_error)
- /* "pywrapfst.pyx":2233
+ /* "pywrapfst.pyx":2235
* """
* self._delete_arcs(state, n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2214
+ /* "pywrapfst.pyx":2216
* self._check_mutating_imethod()
*
* def delete_arcs(self, int64 state, size_t n=0): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2235
+/* "pywrapfst.pyx":2237
* return self
*
* cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2237
+ /* "pywrapfst.pyx":2239
* cdef void _delete_states(self, states=None) except *:
* # Only the former signature has a possible indexing failure.
* if states: # <<<<<<<<<<<<<<
* if not self._mfst.get().DeleteStates(<const vector[int64]> states):
* raise FstIndexError("State index out of range")
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2237, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2239, __pyx_L1_error)
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2238
+ /* "pywrapfst.pyx":2240
* # Only the former signature has a possible indexing failure.
* if states:
* if not self._mfst.get().DeleteStates(<const vector[int64]> states): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2238, __pyx_L1_error)
+ __PYX_ERR(0, 2240, __pyx_L1_error)
}
- __pyx_t_2 = __pyx_convert_vector_from_py_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2238, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_vector_from_py_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2240, __pyx_L1_error)
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->DeleteStates(((std::vector<int64> const )__pyx_t_2)) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2239
+ /* "pywrapfst.pyx":2241
* if states:
* if not self._mfst.get().DeleteStates(<const vector[int64]> states):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* else:
* self._mfst.get().DeleteStates()
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2241, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
}
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2239, __pyx_L1_error)
+ __PYX_ERR(0, 2241, __pyx_L1_error)
- /* "pywrapfst.pyx":2238
+ /* "pywrapfst.pyx":2240
* # Only the former signature has a possible indexing failure.
* if states:
* if not self._mfst.get().DeleteStates(<const vector[int64]> states): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2237
+ /* "pywrapfst.pyx":2239
* cdef void _delete_states(self, states=None) except *:
* # Only the former signature has a possible indexing failure.
* if states: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":2241
+ /* "pywrapfst.pyx":2243
* raise FstIndexError("State index out of range")
* else:
* self._mfst.get().DeleteStates() # <<<<<<<<<<<<<<
/*else*/ {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2241, __pyx_L1_error)
+ __PYX_ERR(0, 2243, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->DeleteStates();
}
__pyx_L3:;
- /* "pywrapfst.pyx":2242
+ /* "pywrapfst.pyx":2244
* else:
* self._mfst.get().DeleteStates()
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2242, __pyx_L1_error)
+ __PYX_ERR(0, 2244, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2242, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2244, __pyx_L1_error)
- /* "pywrapfst.pyx":2235
+ /* "pywrapfst.pyx":2237
* return self
*
* cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2244
+/* "pywrapfst.pyx":2246
* self._check_mutating_imethod()
*
* def delete_states(self, states=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_states") < 0)) __PYX_ERR(0, 2244, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_states") < 0)) __PYX_ERR(0, 2246, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2244, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2246, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.delete_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("delete_states", 0);
- /* "pywrapfst.pyx":2260
+ /* "pywrapfst.pyx":2262
* FstIndexError: State index out of range.
* """
* self._delete_states(states) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_states");
- __PYX_ERR(0, 2260, __pyx_L1_error)
+ __PYX_ERR(0, 2262, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.states = __pyx_v_states;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2260, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2262, __pyx_L1_error)
- /* "pywrapfst.pyx":2261
+ /* "pywrapfst.pyx":2263
* """
* self._delete_states(states)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2244
+ /* "pywrapfst.pyx":2246
* self._check_mutating_imethod()
*
* def delete_states(self, states=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2263
+/* "pywrapfst.pyx":2265
* return self
*
* cdef void _encode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_encode", 0);
- /* "pywrapfst.pyx":2264
+ /* "pywrapfst.pyx":2266
*
* cdef void _encode(self, EncodeMapper mapper) except *:
* fst.Encode(self._mfst.get(), mapper._mapper.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2264, __pyx_L1_error)
+ __PYX_ERR(0, 2266, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_mapper) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper");
- __PYX_ERR(0, 2264, __pyx_L1_error)
+ __PYX_ERR(0, 2266, __pyx_L1_error)
}
fst::script::Encode(__pyx_v_self->_mfst.get(), __pyx_v_mapper->_mapper.get());
- /* "pywrapfst.pyx":2265
+ /* "pywrapfst.pyx":2267
* cdef void _encode(self, EncodeMapper mapper) except *:
* fst.Encode(self._mfst.get(), mapper._mapper.get())
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2265, __pyx_L1_error)
+ __PYX_ERR(0, 2267, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2265, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2267, __pyx_L1_error)
- /* "pywrapfst.pyx":2263
+ /* "pywrapfst.pyx":2265
* return self
*
* cdef void _encode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2267
+/* "pywrapfst.pyx":2269
* self._check_mutating_imethod()
*
* def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("encode (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2267, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2269, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_20encode(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_mapper));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("encode", 0);
- /* "pywrapfst.pyx":2286
+ /* "pywrapfst.pyx":2288
* self.
* """
* self._encode(mapper) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encode");
- __PYX_ERR(0, 2286, __pyx_L1_error)
+ __PYX_ERR(0, 2288, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2286, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2288, __pyx_L1_error)
- /* "pywrapfst.pyx":2287
+ /* "pywrapfst.pyx":2289
* """
* self._encode(mapper)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2267
+ /* "pywrapfst.pyx":2269
* self._check_mutating_imethod()
*
* def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2289
+/* "pywrapfst.pyx":2291
* return self
*
* cdef void _invert(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_invert", 0);
- /* "pywrapfst.pyx":2290
+ /* "pywrapfst.pyx":2292
*
* cdef void _invert(self):
* fst.Invert(self._mfst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2290, __pyx_L1_error)
+ __PYX_ERR(0, 2292, __pyx_L1_error)
}
fst::script::Invert(__pyx_v_self->_mfst.get());
- /* "pywrapfst.pyx":2289
+ /* "pywrapfst.pyx":2291
* return self
*
* cdef void _invert(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2292
+/* "pywrapfst.pyx":2294
* fst.Invert(self._mfst.get())
*
* def invert(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("invert", 0);
- /* "pywrapfst.pyx":2304
+ /* "pywrapfst.pyx":2306
* self.
* """
* self._invert() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_invert");
- __PYX_ERR(0, 2304, __pyx_L1_error)
+ __PYX_ERR(0, 2306, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self);
- /* "pywrapfst.pyx":2305
+ /* "pywrapfst.pyx":2307
* """
* self._invert()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2292
+ /* "pywrapfst.pyx":2294
* fst.Invert(self._mfst.get())
*
* def invert(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2307
+/* "pywrapfst.pyx":2309
* return self
*
* cdef void _minimize(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_10MutableFst__minimize(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__minimize *__pyx_optional_args) {
float __pyx_v_delta = __pyx_k__12;
- /* "pywrapfst.pyx":2309
+ /* "pywrapfst.pyx":2311
* cdef void _minimize(self,
* float delta=fst.kShortestDelta,
* bool allow_nondet=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2311
+ /* "pywrapfst.pyx":2313
* bool allow_nondet=False) except *:
* # This runs in-place when the second argument is null.
* fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2311, __pyx_L1_error)
+ __PYX_ERR(0, 2313, __pyx_L1_error)
}
fst::script::Minimize(__pyx_v_self->_mfst.get(), NULL, __pyx_v_delta, __pyx_v_allow_nondet);
- /* "pywrapfst.pyx":2312
+ /* "pywrapfst.pyx":2314
* # This runs in-place when the second argument is null.
* fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2312, __pyx_L1_error)
+ __PYX_ERR(0, 2314, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2312, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L1_error)
- /* "pywrapfst.pyx":2307
+ /* "pywrapfst.pyx":2309
* return self
*
* cdef void _minimize(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2314
+/* "pywrapfst.pyx":2316
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimize") < 0)) __PYX_ERR(0, 2314, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimize") < 0)) __PYX_ERR(0, 2316, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2316, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__13;
}
if (values[1]) {
- __pyx_v_allow_nondet = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_nondet == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L3_error)
+ __pyx_v_allow_nondet = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_nondet == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2316, __pyx_L3_error)
} else {
__pyx_v_allow_nondet = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2314, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2316, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.minimize", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("minimize", 0);
- /* "pywrapfst.pyx":2340
+ /* "pywrapfst.pyx":2342
* self.
* """
* self._minimize(delta, allow_nondet) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_minimize");
- __PYX_ERR(0, 2340, __pyx_L1_error)
+ __PYX_ERR(0, 2342, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 2;
__pyx_t_1.delta = __pyx_v_delta;
__pyx_t_1.allow_nondet = __pyx_v_allow_nondet;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2342, __pyx_L1_error)
- /* "pywrapfst.pyx":2341
+ /* "pywrapfst.pyx":2343
* """
* self._minimize(delta, allow_nondet)
* return self # <<<<<<<<<<<<<<
*
- * cpdef MutableArcIterator mutable_arcs(self, int64 state):
+ * cpdef _MutableArcIterator mutable_arcs(self, int64 state):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2314
+ /* "pywrapfst.pyx":2316
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2343
+/* "pywrapfst.pyx":2345
* return self
*
- * cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
+ * cpdef _MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
* """
* mutable_arcs(self, state)
*/
static PyObject *__pyx_pw_9pywrapfst_10MutableFst_27mutable_arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state); /*proto*/
-static struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch) {
- struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_r = NULL;
+static struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, int64 __pyx_v_state, int __pyx_skip_dispatch) {
+ struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_10MutableFst_27mutable_arcs)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2343, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_MutableArcIterator))))) __PYX_ERR(0, 2343, __pyx_L1_error)
- __pyx_r = ((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_t_2);
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__MutableArcIterator))))) __PYX_ERR(0, 2345, __pyx_L1_error)
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
#endif
}
- /* "pywrapfst.pyx":2355
- * A MutableArcIterator.
+ /* "pywrapfst.pyx":2357
+ * A _MutableArcIterator.
* """
- * return MutableArcIterator(self, state) # <<<<<<<<<<<<<<
+ * return _MutableArcIterator(self, state) # <<<<<<<<<<<<<<
*
* def mutable_input_symbols(self):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2355, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2355, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst__MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = ((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_t_1);
+ __pyx_r = ((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2343
+ /* "pywrapfst.pyx":2345
* return self
*
- * cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
+ * cpdef _MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
* """
* mutable_arcs(self, state)
*/
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_10MutableFst_27mutable_arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state); /*proto*/
-static char __pyx_doc_9pywrapfst_10MutableFst_26mutable_arcs[] = "\n mutable_arcs(self, state)\n\n Returns a mutable iterator over arcs leaving the specified state.\n\n Args:\n state: The source state ID.\n\n Returns:\n A MutableArcIterator.\n ";
+static char __pyx_doc_9pywrapfst_10MutableFst_26mutable_arcs[] = "\n mutable_arcs(self, state)\n\n Returns a mutable iterator over arcs leaving the specified state.\n\n Args:\n state: The source state ID.\n\n Returns:\n A _MutableArcIterator.\n ";
static PyObject *__pyx_pw_9pywrapfst_10MutableFst_27mutable_arcs(PyObject *__pyx_v_self, PyObject *__pyx_arg_state) {
int64 __pyx_v_state;
int __pyx_lineno = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("mutable_arcs (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2343, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2345, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("mutable_arcs", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_10MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2357
- * return MutableArcIterator(self, state)
+/* "pywrapfst.pyx":2359
+ * return _MutableArcIterator(self, state)
*
* def mutable_input_symbols(self): # <<<<<<<<<<<<<<
* """
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("mutable_input_symbols", 0);
- /* "pywrapfst.pyx":2363
+ /* "pywrapfst.pyx":2365
* Returns the FST's (mutable) input symbol table, or None if none is present.
* """
* if self._mfst.get().MutableInputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2363, __pyx_L1_error)
+ __PYX_ERR(0, 2365, __pyx_L1_error)
}
__pyx_t_1 = ((__pyx_v_self->_mfst.get()->MutableInputSymbols() == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2364
+ /* "pywrapfst.pyx":2366
* """
* if self._mfst.get().MutableInputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":2363
+ /* "pywrapfst.pyx":2365
* Returns the FST's (mutable) input symbol table, or None if none is present.
* """
* if self._mfst.get().MutableInputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2365
+ /* "pywrapfst.pyx":2367
* if self._mfst.get().MutableInputSymbols() == NULL:
* return
* return _init_MutableFstSymbolTableView(self._mfst, input_side=True) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2365, __pyx_L1_error)
+ __PYX_ERR(0, 2367, __pyx_L1_error)
}
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2365, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2357
- * return MutableArcIterator(self, state)
+ /* "pywrapfst.pyx":2359
+ * return _MutableArcIterator(self, state)
*
* def mutable_input_symbols(self): # <<<<<<<<<<<<<<
* """
return __pyx_r;
}
-/* "pywrapfst.pyx":2367
+/* "pywrapfst.pyx":2369
* return _init_MutableFstSymbolTableView(self._mfst, input_side=True)
*
* def mutable_output_symbols(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("mutable_output_symbols", 0);
- /* "pywrapfst.pyx":2373
+ /* "pywrapfst.pyx":2375
* Returns the FST's (mutable) output symbol table, or None if none is present.
* """
* if self._mfst.get().MutableOutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2373, __pyx_L1_error)
+ __PYX_ERR(0, 2375, __pyx_L1_error)
}
__pyx_t_1 = ((__pyx_v_self->_mfst.get()->MutableOutputSymbols() == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2374
+ /* "pywrapfst.pyx":2376
* """
* if self._mfst.get().MutableOutputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":2373
+ /* "pywrapfst.pyx":2375
* Returns the FST's (mutable) output symbol table, or None if none is present.
* """
* if self._mfst.get().MutableOutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2375
+ /* "pywrapfst.pyx":2377
* if self._mfst.get().MutableOutputSymbols() == NULL:
* return
* return _init_MutableFstSymbolTableView(self._mfst, input_side=False) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2375, __pyx_L1_error)
+ __PYX_ERR(0, 2377, __pyx_L1_error)
}
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2375, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2377, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2367
+ /* "pywrapfst.pyx":2369
* return _init_MutableFstSymbolTableView(self._mfst, input_side=True)
*
* def mutable_output_symbols(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2377
+/* "pywrapfst.pyx":2379
* return _init_MutableFstSymbolTableView(self._mfst, input_side=False)
*
* cpdef int64 num_states(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_10MutableFst_33num_states)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2379, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2379, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":2383
+ /* "pywrapfst.pyx":2385
* Returns the number of states.
* """
* return self._mfst.get().NumStates() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2383, __pyx_L1_error)
+ __PYX_ERR(0, 2385, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mfst.get()->NumStates();
goto __pyx_L0;
- /* "pywrapfst.pyx":2377
+ /* "pywrapfst.pyx":2379
* return _init_MutableFstSymbolTableView(self._mfst, input_side=False)
*
* cpdef int64 num_states(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("num_states", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_10MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_10MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2385
+/* "pywrapfst.pyx":2387
* return self._mfst.get().NumStates()
*
* cdef void _project(self, project_type) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_project", 0);
- /* "pywrapfst.pyx":2386
+ /* "pywrapfst.pyx":2388
*
* cdef void _project(self, project_type) except *:
* fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2386, __pyx_L1_error)
+ __PYX_ERR(0, 2388, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2386, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_project_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2386, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2388, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_project_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2388, __pyx_L1_error)
fst::script::Project(__pyx_v_self->_mfst.get(), __pyx_t_2);
- /* "pywrapfst.pyx":2385
+ /* "pywrapfst.pyx":2387
* return self._mfst.get().NumStates()
*
* cdef void _project(self, project_type) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2388
+/* "pywrapfst.pyx":2390
* fst.Project(self._mfst.get(), _get_project_type(tostring(project_type)))
*
* def project(self, project_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("project", 0);
- /* "pywrapfst.pyx":2405
+ /* "pywrapfst.pyx":2407
* self.
* """
* self._project(project_type) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_project");
- __PYX_ERR(0, 2405, __pyx_L1_error)
+ __PYX_ERR(0, 2407, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, __pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, __pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2407, __pyx_L1_error)
- /* "pywrapfst.pyx":2406
+ /* "pywrapfst.pyx":2408
* """
* self._project(project_type)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2388
+ /* "pywrapfst.pyx":2390
* fst.Project(self._mfst.get(), _get_project_type(tostring(project_type)))
*
* def project(self, project_type): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2408
+/* "pywrapfst.pyx":2410
* return self
*
* cdef void _prune(self, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__14;
int64 __pyx_v_nstate = __pyx_k__15;
- /* "pywrapfst.pyx":2411
+ /* "pywrapfst.pyx":2413
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2413
+ /* "pywrapfst.pyx":2415
* weight=None) except *:
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 2413, __pyx_L1_error)
+ __PYX_ERR(0, 2415, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2414
+ /* "pywrapfst.pyx":2416
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* fst.Prune(self._mfst.get(), _weight, nstate, delta)
* self._check_mutating_imethod()
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2413, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2415, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":2415
+ /* "pywrapfst.pyx":2417
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(),
* weight)
* fst.Prune(self._mfst.get(), _weight, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2415, __pyx_L1_error)
+ __PYX_ERR(0, 2417, __pyx_L1_error)
}
fst::script::Prune(__pyx_v_self->_mfst.get(), __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":2416
+ /* "pywrapfst.pyx":2418
* weight)
* fst.Prune(self._mfst.get(), _weight, nstate, delta)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2416, __pyx_L1_error)
+ __PYX_ERR(0, 2418, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2416, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2418, __pyx_L1_error)
- /* "pywrapfst.pyx":2408
+ /* "pywrapfst.pyx":2410
* return self
*
* cdef void _prune(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2418
+/* "pywrapfst.pyx":2420
* self._check_mutating_imethod()
*
* def prune(self, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0};
PyObject* values[3] = {0,0,0};
- /* "pywrapfst.pyx":2421
+ /* "pywrapfst.pyx":2423
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 2418, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 2420, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2419, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2421, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__16;
}
if (values[1]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2422, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__17;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2418, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2420, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.prune", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_36prune(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight);
- /* "pywrapfst.pyx":2418
+ /* "pywrapfst.pyx":2420
* self._check_mutating_imethod()
*
* def prune(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("prune", 0);
- /* "pywrapfst.pyx":2441
+ /* "pywrapfst.pyx":2443
* self.
* """
* self._prune(delta, nstate, weight) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_prune");
- __PYX_ERR(0, 2441, __pyx_L1_error)
+ __PYX_ERR(0, 2443, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 3;
__pyx_t_1.delta = __pyx_v_delta;
__pyx_t_1.nstate = __pyx_v_nstate;
__pyx_t_1.weight = __pyx_v_weight;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2443, __pyx_L1_error)
- /* "pywrapfst.pyx":2442
+ /* "pywrapfst.pyx":2444
* """
* self._prune(delta, nstate, weight)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2418
+ /* "pywrapfst.pyx":2420
* self._check_mutating_imethod()
*
* def prune(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2444
+/* "pywrapfst.pyx":2446
* return self
*
* cdef void _push(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_10MutableFst__push(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__push *__pyx_optional_args) {
float __pyx_v_delta = __pyx_k__18;
- /* "pywrapfst.pyx":2446
+ /* "pywrapfst.pyx":2448
* cdef void _push(self,
* float delta=fst.kShortestDelta,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_total_weight = ((bool)0);
- /* "pywrapfst.pyx":2447
+ /* "pywrapfst.pyx":2449
* float delta=fst.kShortestDelta,
* bool remove_total_weight=False,
* bool to_final=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2448
+ /* "pywrapfst.pyx":2450
* bool remove_total_weight=False,
* bool to_final=False):
* fst.Push(self._mfst.get(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2448, __pyx_L1_error)
+ __PYX_ERR(0, 2450, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2451
+ /* "pywrapfst.pyx":2453
* fst.GetReweightType(to_final),
* delta,
* remove_total_weight) # <<<<<<<<<<<<<<
*/
fst::script::Push(__pyx_v_self->_mfst.get(), fst::script::GetReweightType(__pyx_v_to_final), __pyx_v_delta, __pyx_v_remove_total_weight);
- /* "pywrapfst.pyx":2444
+ /* "pywrapfst.pyx":2446
* return self
*
* cdef void _push(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2453
+/* "pywrapfst.pyx":2455
* remove_total_weight)
*
* def push(self, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 2453, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 2455, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2454, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2456, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__19;
}
if (values[1]) {
- __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2455, __pyx_L3_error)
+ __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2457, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2455
+ /* "pywrapfst.pyx":2457
* def push(self,
* float delta=fst.kShortestDelta,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
__pyx_v_remove_total_weight = ((bool)0);
}
if (values[2]) {
- __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2456, __pyx_L3_error)
+ __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2456
+ /* "pywrapfst.pyx":2458
* float delta=fst.kShortestDelta,
* bool remove_total_weight=False,
* bool to_final=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2453, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2455, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_38push(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_remove_total_weight, __pyx_v_to_final);
- /* "pywrapfst.pyx":2453
+ /* "pywrapfst.pyx":2455
* remove_total_weight)
*
* def push(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("push", 0);
- /* "pywrapfst.pyx":2480
+ /* "pywrapfst.pyx":2482
* self.
* """
* self._push(delta, remove_total_weight, to_final) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_push");
- __PYX_ERR(0, 2480, __pyx_L1_error)
+ __PYX_ERR(0, 2482, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 3;
__pyx_t_1.delta = __pyx_v_delta;
__pyx_t_1.to_final = __pyx_v_to_final;
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1);
- /* "pywrapfst.pyx":2481
+ /* "pywrapfst.pyx":2483
* """
* self._push(delta, remove_total_weight, to_final)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2453
+ /* "pywrapfst.pyx":2455
* remove_total_weight)
*
* def push(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2483
+/* "pywrapfst.pyx":2485
* return self
*
* cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2486
+ /* "pywrapfst.pyx":2488
* cdef vector[fst.LabelPair] _ipairs
* cdef vector[fst.LabelPair] _opairs
* if ipairs: # <<<<<<<<<<<<<<
* for (before, after) in ipairs:
* _ipairs.push_back(fst.LabelPair(before, after))
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2488, __pyx_L1_error)
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2487
+ /* "pywrapfst.pyx":2489
* cdef vector[fst.LabelPair] _opairs
* if ipairs:
* for (before, after) in ipairs: # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_ipairs; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2489, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_4)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2489, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2489, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2487, __pyx_L1_error)
+ else __PYX_ERR(0, 2489, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2487, __pyx_L1_error)
+ __PYX_ERR(0, 2489, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_7);
#else
- __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2487, __pyx_L1_error)
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
__Pyx_GOTREF(__pyx_t_6);
index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2487, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2487, __pyx_L1_error)
+ __PYX_ERR(0, 2489, __pyx_L1_error)
__pyx_L7_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_before, __pyx_t_6);
__Pyx_XDECREF_SET(__pyx_v_after, __pyx_t_7);
__pyx_t_7 = 0;
- /* "pywrapfst.pyx":2488
+ /* "pywrapfst.pyx":2490
* if ipairs:
* for (before, after) in ipairs:
* _ipairs.push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<<
* if opairs:
* for (before, after) in opairs:
*/
- __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2488, __pyx_L1_error)
- __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_11 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2488, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_11 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L1_error)
try {
__pyx_t_12 = __pyx_t_10cpywrapfst_LabelPair(__pyx_t_10, __pyx_t_11);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2488, __pyx_L1_error)
+ __PYX_ERR(0, 2490, __pyx_L1_error)
}
try {
__pyx_v__ipairs.push_back(__pyx_t_12);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2488, __pyx_L1_error)
+ __PYX_ERR(0, 2490, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2487
+ /* "pywrapfst.pyx":2489
* cdef vector[fst.LabelPair] _opairs
* if ipairs:
* for (before, after) in ipairs: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2486
+ /* "pywrapfst.pyx":2488
* cdef vector[fst.LabelPair] _ipairs
* cdef vector[fst.LabelPair] _opairs
* if ipairs: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2489
+ /* "pywrapfst.pyx":2491
* for (before, after) in ipairs:
* _ipairs.push_back(fst.LabelPair(before, after))
* if opairs: # <<<<<<<<<<<<<<
* for (before, after) in opairs:
* _opairs.push_back(fst.LabelPair(before, after))
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2491, __pyx_L1_error)
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2490
+ /* "pywrapfst.pyx":2492
* _ipairs.push_back(fst.LabelPair(before, after))
* if opairs:
* for (before, after) in opairs: # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_opairs; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2492, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_4)) {
if (likely(PyList_CheckExact(__pyx_t_2))) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
} else {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error)
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2490, __pyx_L1_error)
+ else __PYX_ERR(0, 2492, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2490, __pyx_L1_error)
+ __PYX_ERR(0, 2492, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_7);
__Pyx_INCREF(__pyx_t_6);
#else
- __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2490, __pyx_L1_error)
+ __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2492, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
__Pyx_GOTREF(__pyx_t_7);
index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2490, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2492, __pyx_L1_error)
__pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L12_unpacking_done;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2490, __pyx_L1_error)
+ __PYX_ERR(0, 2492, __pyx_L1_error)
__pyx_L12_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_before, __pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_after, __pyx_t_6);
__pyx_t_6 = 0;
- /* "pywrapfst.pyx":2491
+ /* "pywrapfst.pyx":2493
* if opairs:
* for (before, after) in opairs:
* _opairs.push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<<
* if _ipairs.empty() and _opairs.empty():
* raise FstArgError("No relabeling pairs specified")
*/
- __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_11 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2491, __pyx_L1_error)
- __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2491, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_11 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_10 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L1_error)
try {
__pyx_t_12 = __pyx_t_10cpywrapfst_LabelPair(__pyx_t_11, __pyx_t_10);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2491, __pyx_L1_error)
+ __PYX_ERR(0, 2493, __pyx_L1_error)
}
try {
__pyx_v__opairs.push_back(__pyx_t_12);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2491, __pyx_L1_error)
+ __PYX_ERR(0, 2493, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2490
+ /* "pywrapfst.pyx":2492
* _ipairs.push_back(fst.LabelPair(before, after))
* if opairs:
* for (before, after) in opairs: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2489
+ /* "pywrapfst.pyx":2491
* for (before, after) in ipairs:
* _ipairs.push_back(fst.LabelPair(before, after))
* if opairs: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2492
+ /* "pywrapfst.pyx":2494
* for (before, after) in opairs:
* _opairs.push_back(fst.LabelPair(before, after))
* if _ipairs.empty() and _opairs.empty(): # <<<<<<<<<<<<<<
__pyx_L14_bool_binop_done:;
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2493
+ /* "pywrapfst.pyx":2495
* _opairs.push_back(fst.LabelPair(before, after))
* if _ipairs.empty() and _opairs.empty():
* raise FstArgError("No relabeling pairs specified") # <<<<<<<<<<<<<<
* fst.Relabel(self._mfst.get(), _ipairs, _opairs)
* self._check_mutating_imethod()
*/
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2493, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2495, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
}
__pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_u_No_relabeling_pairs_specified) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_No_relabeling_pairs_specified);
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2493, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2495, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2493, __pyx_L1_error)
+ __PYX_ERR(0, 2495, __pyx_L1_error)
- /* "pywrapfst.pyx":2492
+ /* "pywrapfst.pyx":2494
* for (before, after) in opairs:
* _opairs.push_back(fst.LabelPair(before, after))
* if _ipairs.empty() and _opairs.empty(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2494
+ /* "pywrapfst.pyx":2496
* if _ipairs.empty() and _opairs.empty():
* raise FstArgError("No relabeling pairs specified")
* fst.Relabel(self._mfst.get(), _ipairs, _opairs) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2494, __pyx_L1_error)
+ __PYX_ERR(0, 2496, __pyx_L1_error)
}
fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_v__ipairs, __pyx_v__opairs);
- /* "pywrapfst.pyx":2495
+ /* "pywrapfst.pyx":2497
* raise FstArgError("No relabeling pairs specified")
* fst.Relabel(self._mfst.get(), _ipairs, _opairs)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2495, __pyx_L1_error)
+ __PYX_ERR(0, 2497, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2495, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2497, __pyx_L1_error)
- /* "pywrapfst.pyx":2483
+ /* "pywrapfst.pyx":2485
* return self
*
* cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2497
+/* "pywrapfst.pyx":2499
* self._check_mutating_imethod()
*
* def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2497, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2499, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2497, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2499, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.relabel_pairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("relabel_pairs", 0);
- /* "pywrapfst.pyx":2517
+ /* "pywrapfst.pyx":2519
* FstArgError: No relabeling pairs specified.
* """
* self._relabel_pairs(ipairs, opairs) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_pairs");
- __PYX_ERR(0, 2517, __pyx_L1_error)
+ __PYX_ERR(0, 2519, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 2;
__pyx_t_1.ipairs = __pyx_v_ipairs;
__pyx_t_1.opairs = __pyx_v_opairs;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2517, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2519, __pyx_L1_error)
- /* "pywrapfst.pyx":2518
+ /* "pywrapfst.pyx":2520
* """
* self._relabel_pairs(ipairs, opairs)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2497
+ /* "pywrapfst.pyx":2499
* self._check_mutating_imethod()
*
* def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2520
+/* "pywrapfst.pyx":2522
* return self
*
* cdef void _relabel_tables(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__relabel_tables *__pyx_optional_args) {
- /* "pywrapfst.pyx":2521
+ /* "pywrapfst.pyx":2523
*
* cdef void _relabel_tables(self,
* SymbolTableView old_isymbols=None, # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_old_isymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":2522
+ /* "pywrapfst.pyx":2524
* cdef void _relabel_tables(self,
* SymbolTableView old_isymbols=None,
* SymbolTableView new_isymbols=None, # <<<<<<<<<<<<<<
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
PyObject *__pyx_v_unknown_isymbol = ((PyObject *)__pyx_kp_u__11);
- /* "pywrapfst.pyx":2524
+ /* "pywrapfst.pyx":2526
* SymbolTableView new_isymbols=None,
* unknown_isymbol="",
* bool attach_new_isymbols=True, # <<<<<<<<<<<<<<
*/
bool __pyx_v_attach_new_isymbols = ((bool)1);
- /* "pywrapfst.pyx":2525
+ /* "pywrapfst.pyx":2527
* unknown_isymbol="",
* bool attach_new_isymbols=True,
* SymbolTableView old_osymbols=None, # <<<<<<<<<<<<<<
*/
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_old_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":2526
+ /* "pywrapfst.pyx":2528
* bool attach_new_isymbols=True,
* SymbolTableView old_osymbols=None,
* SymbolTableView new_osymbols=None, # <<<<<<<<<<<<<<
struct __pyx_obj_9pywrapfst_SymbolTableView *__pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
PyObject *__pyx_v_unknown_osymbol = ((PyObject *)__pyx_kp_u__11);
- /* "pywrapfst.pyx":2528
+ /* "pywrapfst.pyx":2530
* SymbolTableView new_osymbols=None,
* unknown_osymbol="",
* bool attach_new_osymbols=True) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2529
+ /* "pywrapfst.pyx":2531
* unknown_osymbol="",
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<<
__pyx_L4_bool_binop_done:;
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2530
+ /* "pywrapfst.pyx":2532
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified") # <<<<<<<<<<<<<<
* cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols()
* if old_isymbols is not None:
*/
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2530, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2532, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
}
__pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_u_No_new_SymbolTables_specified) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_No_new_SymbolTables_specified);
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2532, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 2530, __pyx_L1_error)
+ __PYX_ERR(0, 2532, __pyx_L1_error)
- /* "pywrapfst.pyx":2529
+ /* "pywrapfst.pyx":2531
* unknown_osymbol="",
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2531
+ /* "pywrapfst.pyx":2533
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified")
* cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2531, __pyx_L1_error)
+ __PYX_ERR(0, 2533, __pyx_L1_error)
}
__pyx_v__old_isymbols = __pyx_v_self->__pyx_base._fst.get()->InputSymbols();
- /* "pywrapfst.pyx":2532
+ /* "pywrapfst.pyx":2534
* raise FstArgError("No new SymbolTables specified")
* cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols()
* if old_isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2533
+ /* "pywrapfst.pyx":2535
* cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols()
* if old_isymbols is not None:
* _old_isymbols = old_isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_old_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2533, __pyx_L1_error)
+ __PYX_ERR(0, 2535, __pyx_L1_error)
}
- __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_old_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2533, __pyx_L1_error)
+ __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_old_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2535, __pyx_L1_error)
__pyx_v__old_isymbols = __pyx_t_7;
- /* "pywrapfst.pyx":2532
+ /* "pywrapfst.pyx":2534
* raise FstArgError("No new SymbolTables specified")
* cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols()
* if old_isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2534
+ /* "pywrapfst.pyx":2536
* if old_isymbols is not None:
* _old_isymbols = old_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2534, __pyx_L1_error)
+ __PYX_ERR(0, 2536, __pyx_L1_error)
}
__pyx_v__old_osymbols = __pyx_v_self->__pyx_base._fst.get()->OutputSymbols();
- /* "pywrapfst.pyx":2535
+ /* "pywrapfst.pyx":2537
* _old_isymbols = old_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols()
* if old_osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2536
+ /* "pywrapfst.pyx":2538
* cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols()
* if old_osymbols is not None:
* _old_osymbols = old_osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_old_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2536, __pyx_L1_error)
+ __PYX_ERR(0, 2538, __pyx_L1_error)
}
- __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_old_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2536, __pyx_L1_error)
+ __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_old_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2538, __pyx_L1_error)
__pyx_v__old_osymbols = __pyx_t_7;
- /* "pywrapfst.pyx":2535
+ /* "pywrapfst.pyx":2537
* _old_isymbols = old_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols()
* if old_osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2537
+ /* "pywrapfst.pyx":2539
* if old_osymbols is not None:
* _old_osymbols = old_osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_isymbols = NULL # <<<<<<<<<<<<<<
*/
__pyx_v__new_isymbols = NULL;
- /* "pywrapfst.pyx":2538
+ /* "pywrapfst.pyx":2540
* _old_osymbols = old_osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_isymbols = NULL
* if new_isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2539
+ /* "pywrapfst.pyx":2541
* cdef const fst.SymbolTable *_new_isymbols = NULL
* if new_isymbols is not None:
* _new_isymbols = new_isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_new_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2539, __pyx_L1_error)
+ __PYX_ERR(0, 2541, __pyx_L1_error)
}
- __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_new_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2539, __pyx_L1_error)
+ __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_new_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L1_error)
__pyx_v__new_isymbols = __pyx_t_7;
- /* "pywrapfst.pyx":2538
+ /* "pywrapfst.pyx":2540
* _old_osymbols = old_osymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_isymbols = NULL
* if new_isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2540
+ /* "pywrapfst.pyx":2542
* if new_isymbols is not None:
* _new_isymbols = new_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_osymbols = NULL # <<<<<<<<<<<<<<
*/
__pyx_v__new_osymbols = NULL;
- /* "pywrapfst.pyx":2541
+ /* "pywrapfst.pyx":2543
* _new_isymbols = new_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_osymbols = NULL
* if new_osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2542
+ /* "pywrapfst.pyx":2544
* cdef const fst.SymbolTable *_new_osymbols = NULL
* if new_osymbols is not None:
* _new_osymbols = new_osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_new_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2542, __pyx_L1_error)
+ __PYX_ERR(0, 2544, __pyx_L1_error)
}
- __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_new_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2542, __pyx_L1_error)
+ __pyx_t_7 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_new_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2544, __pyx_L1_error)
__pyx_v__new_osymbols = __pyx_t_7;
- /* "pywrapfst.pyx":2541
+ /* "pywrapfst.pyx":2543
* _new_isymbols = new_isymbols._raw_ptr_or_raise()
* cdef const fst.SymbolTable *_new_osymbols = NULL
* if new_osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2543
+ /* "pywrapfst.pyx":2545
* if new_osymbols is not None:
* _new_osymbols = new_osymbols._raw_ptr_or_raise()
* fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2543, __pyx_L1_error)
+ __PYX_ERR(0, 2545, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2546
+ /* "pywrapfst.pyx":2548
* _old_isymbols,
* _new_isymbols,
* tostring(unknown_isymbol), # <<<<<<<<<<<<<<
* attach_new_isymbols,
* _old_osymbols,
*/
- __pyx_t_8 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2546, __pyx_L1_error)
+ __pyx_t_8 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2548, __pyx_L1_error)
- /* "pywrapfst.pyx":2550
+ /* "pywrapfst.pyx":2552
* _old_osymbols,
* _new_osymbols,
* tostring(unknown_osymbol), # <<<<<<<<<<<<<<
* attach_new_osymbols)
* self._check_mutating_imethod()
*/
- __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2550, __pyx_L1_error)
+ __pyx_t_9 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2552, __pyx_L1_error)
- /* "pywrapfst.pyx":2543
+ /* "pywrapfst.pyx":2545
* if new_osymbols is not None:
* _new_osymbols = new_osymbols._raw_ptr_or_raise()
* fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<<
*/
fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_v__old_isymbols, __pyx_v__new_isymbols, __pyx_t_8, __pyx_v_attach_new_isymbols, __pyx_v__old_osymbols, __pyx_v__new_osymbols, __pyx_t_9, __pyx_v_attach_new_osymbols);
- /* "pywrapfst.pyx":2552
+ /* "pywrapfst.pyx":2554
* tostring(unknown_osymbol),
* attach_new_osymbols)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2552, __pyx_L1_error)
+ __PYX_ERR(0, 2554, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2552, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2554, __pyx_L1_error)
- /* "pywrapfst.pyx":2520
+ /* "pywrapfst.pyx":2522
* return self
*
* cdef void _relabel_tables(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2554
+/* "pywrapfst.pyx":2556
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old_isymbols,&__pyx_n_s_new_isymbols,&__pyx_n_s_unknown_isymbol,&__pyx_n_s_attach_new_isymbols,&__pyx_n_s_old_osymbols,&__pyx_n_s_new_osymbols,&__pyx_n_s_unknown_osymbol,&__pyx_n_s_attach_new_osymbols,0};
PyObject* values[8] = {0,0,0,0,0,0,0,0};
- /* "pywrapfst.pyx":2555
+ /* "pywrapfst.pyx":2557
*
* def relabel_tables(self,
* SymbolTableView old_isymbols=None, # <<<<<<<<<<<<<<
*/
values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":2556
+ /* "pywrapfst.pyx":2558
* def relabel_tables(self,
* SymbolTableView old_isymbols=None,
* SymbolTableView new_isymbols=None, # <<<<<<<<<<<<<<
values[1] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
values[2] = ((PyObject *)__pyx_kp_u__11);
- /* "pywrapfst.pyx":2559
+ /* "pywrapfst.pyx":2561
* unknown_isymbol="",
* bool attach_new_isymbols=True,
* SymbolTableView old_osymbols=None, # <<<<<<<<<<<<<<
*/
values[4] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTableView *)Py_None);
- /* "pywrapfst.pyx":2560
+ /* "pywrapfst.pyx":2562
* bool attach_new_isymbols=True,
* SymbolTableView old_osymbols=None,
* SymbolTableView new_osymbols=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2554, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2556, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[1]);
__pyx_v_unknown_isymbol = values[2];
if (values[3]) {
- __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2558, __pyx_L3_error)
+ __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2560, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2558
+ /* "pywrapfst.pyx":2560
* SymbolTableView new_isymbols=None,
* unknown_isymbol="",
* bool attach_new_isymbols=True, # <<<<<<<<<<<<<<
__pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTableView *)values[5]);
__pyx_v_unknown_osymbol = values[6];
if (values[7]) {
- __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2562, __pyx_L3_error)
+ __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2564, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2562
+ /* "pywrapfst.pyx":2564
* SymbolTableView new_osymbols=None,
* unknown_osymbol="",
* bool attach_new_osymbols=True): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2554, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2556, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.relabel_tables", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "old_isymbols", 0))) __PYX_ERR(0, 2555, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "new_isymbols", 0))) __PYX_ERR(0, 2556, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "old_osymbols", 0))) __PYX_ERR(0, 2559, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "new_osymbols", 0))) __PYX_ERR(0, 2560, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "old_isymbols", 0))) __PYX_ERR(0, 2557, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "new_isymbols", 0))) __PYX_ERR(0, 2558, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "old_osymbols", 0))) __PYX_ERR(0, 2561, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "new_osymbols", 0))) __PYX_ERR(0, 2562, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_42relabel_tables(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_old_isymbols, __pyx_v_new_isymbols, __pyx_v_unknown_isymbol, __pyx_v_attach_new_isymbols, __pyx_v_old_osymbols, __pyx_v_new_osymbols, __pyx_v_unknown_osymbol, __pyx_v_attach_new_osymbols);
- /* "pywrapfst.pyx":2554
+ /* "pywrapfst.pyx":2556
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("relabel_tables", 0);
- /* "pywrapfst.pyx":2596
+ /* "pywrapfst.pyx":2598
* FstArgError: No SymbolTable specified.
* """
* self._relabel_tables(old_isymbols, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_tables");
- __PYX_ERR(0, 2596, __pyx_L1_error)
+ __PYX_ERR(0, 2598, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2603
+ /* "pywrapfst.pyx":2605
* new_osymbols,
* unknown_osymbol,
* attach_new_osymbols) # <<<<<<<<<<<<<<
__pyx_t_1.new_osymbols = __pyx_v_new_osymbols;
__pyx_t_1.unknown_osymbol = __pyx_v_unknown_osymbol;
__pyx_t_1.attach_new_osymbols = __pyx_v_attach_new_osymbols;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2596, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2598, __pyx_L1_error)
- /* "pywrapfst.pyx":2604
+ /* "pywrapfst.pyx":2606
* unknown_osymbol,
* attach_new_osymbols)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2554
+ /* "pywrapfst.pyx":2556
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2606
+/* "pywrapfst.pyx":2608
* return self
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_reserve_arcs", 0);
- /* "pywrapfst.pyx":2607
+ /* "pywrapfst.pyx":2609
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *:
* if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2607, __pyx_L1_error)
+ __PYX_ERR(0, 2609, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ReserveArcs(__pyx_v_state, __pyx_v_n) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2608
+ /* "pywrapfst.pyx":2610
* cdef void _reserve_arcs(self, int64 state, size_t n) except *:
* if not self._mfst.get().ReserveArcs(state, n):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2608, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2608, __pyx_L1_error)
+ __PYX_ERR(0, 2610, __pyx_L1_error)
- /* "pywrapfst.pyx":2607
+ /* "pywrapfst.pyx":2609
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *:
* if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2609
+ /* "pywrapfst.pyx":2611
* if not self._mfst.get().ReserveArcs(state, n):
* raise FstIndexError("State index out of range")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2609, __pyx_L1_error)
+ __PYX_ERR(0, 2611, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2609, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
- /* "pywrapfst.pyx":2606
+ /* "pywrapfst.pyx":2608
* return self
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2611
+/* "pywrapfst.pyx":2613
* self._check_mutating_imethod()
*
* def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2611, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2613, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2611, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2613, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
- __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2613, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2613, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2611, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2613, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.reserve_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reserve_arcs", 0);
- /* "pywrapfst.pyx":2627
+ /* "pywrapfst.pyx":2629
* FstIndexError: State index out of range.
* """
* self._reserve_arcs(state, n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_arcs");
- __PYX_ERR(0, 2627, __pyx_L1_error)
+ __PYX_ERR(0, 2629, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_arcs(__pyx_v_self, __pyx_v_state, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2627, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_arcs(__pyx_v_self, __pyx_v_state, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2629, __pyx_L1_error)
- /* "pywrapfst.pyx":2628
+ /* "pywrapfst.pyx":2630
* """
* self._reserve_arcs(state, n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2611
+ /* "pywrapfst.pyx":2613
* self._check_mutating_imethod()
*
* def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2630
+/* "pywrapfst.pyx":2632
* return self
*
* cdef void _reserve_states(self, int64 n): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_reserve_states", 0);
- /* "pywrapfst.pyx":2631
+ /* "pywrapfst.pyx":2633
*
* cdef void _reserve_states(self, int64 n):
* self._mfst.get().ReserveStates(n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2631, __pyx_L1_error)
+ __PYX_ERR(0, 2633, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->ReserveStates(__pyx_v_n);
- /* "pywrapfst.pyx":2630
+ /* "pywrapfst.pyx":2632
* return self
*
* cdef void _reserve_states(self, int64 n): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2633
+/* "pywrapfst.pyx":2635
* self._mfst.get().ReserveStates(n)
*
* def reserve_states(self, int64 n): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reserve_states (wrapper)", 0);
assert(__pyx_arg_n); {
- __pyx_v_n = __Pyx_PyInt_As_int64_t(__pyx_arg_n); if (unlikely((__pyx_v_n == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2633, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_int64_t(__pyx_arg_n); if (unlikely((__pyx_v_n == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2635, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reserve_states", 0);
- /* "pywrapfst.pyx":2645
+ /* "pywrapfst.pyx":2647
* self.
* """
* self._reserve_states(n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_states");
- __PYX_ERR(0, 2645, __pyx_L1_error)
+ __PYX_ERR(0, 2647, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n);
- /* "pywrapfst.pyx":2646
+ /* "pywrapfst.pyx":2648
* """
* self._reserve_states(n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2633
+ /* "pywrapfst.pyx":2635
* self._mfst.get().ReserveStates(n)
*
* def reserve_states(self, int64 n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2648
+/* "pywrapfst.pyx":2650
* return self
*
* cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2649
+ /* "pywrapfst.pyx":2651
*
* cdef void _reweight(self, potentials, bool to_final=False) except *:
* cdef string _weight_type = self.weight_type() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 2649, __pyx_L1_error)
+ __PYX_ERR(0, 2651, __pyx_L1_error)
}
__pyx_v__weight_type = ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0);
- /* "pywrapfst.pyx":2651
+ /* "pywrapfst.pyx":2653
* cdef string _weight_type = self.weight_type()
* cdef vector[fst.WeightClass] _potentials
* for weight in potentials: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_potentials; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2653, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2653, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2653, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2651, __pyx_L1_error)
+ else __PYX_ERR(0, 2653, __pyx_L1_error)
}
break;
}
__Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_4);
__pyx_t_4 = 0;
- /* "pywrapfst.pyx":2652
+ /* "pywrapfst.pyx":2654
* cdef vector[fst.WeightClass] _potentials
* for weight in potentials:
* _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight)) # <<<<<<<<<<<<<<
* fst.Reweight(self._mfst.get(), _potentials, fst.GetReweightType(to_final))
* self._check_mutating_imethod()
*/
- __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_v__weight_type, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2652, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_v__weight_type, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2654, __pyx_L1_error)
try {
__pyx_v__potentials.push_back(__pyx_t_5);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2652, __pyx_L1_error)
+ __PYX_ERR(0, 2654, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2651
+ /* "pywrapfst.pyx":2653
* cdef string _weight_type = self.weight_type()
* cdef vector[fst.WeightClass] _potentials
* for weight in potentials: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":2653
+ /* "pywrapfst.pyx":2655
* for weight in potentials:
* _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight))
* fst.Reweight(self._mfst.get(), _potentials, fst.GetReweightType(to_final)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2653, __pyx_L1_error)
+ __PYX_ERR(0, 2655, __pyx_L1_error)
}
fst::script::Reweight(__pyx_v_self->_mfst.get(), __pyx_v__potentials, fst::script::GetReweightType(__pyx_v_to_final));
- /* "pywrapfst.pyx":2654
+ /* "pywrapfst.pyx":2656
* _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight))
* fst.Reweight(self._mfst.get(), _potentials, fst.GetReweightType(to_final))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2654, __pyx_L1_error)
+ __PYX_ERR(0, 2656, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2654, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L1_error)
- /* "pywrapfst.pyx":2648
+ /* "pywrapfst.pyx":2650
* return self
*
* cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2656
+/* "pywrapfst.pyx":2658
* self._check_mutating_imethod()
*
* def reweight(self, potentials, bool to_final=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reweight") < 0)) __PYX_ERR(0, 2656, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reweight") < 0)) __PYX_ERR(0, 2658, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_potentials = values[0];
if (values[1]) {
- __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2656, __pyx_L3_error)
+ __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2658, __pyx_L3_error)
} else {
__pyx_v_to_final = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2656, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2658, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.reweight", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reweight", 0);
- /* "pywrapfst.pyx":2678
+ /* "pywrapfst.pyx":2680
* self.
* """
* self._reweight(potentials, to_final) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reweight");
- __PYX_ERR(0, 2678, __pyx_L1_error)
+ __PYX_ERR(0, 2680, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.to_final = __pyx_v_to_final;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reweight(__pyx_v_self, __pyx_v_potentials, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2678, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reweight(__pyx_v_self, __pyx_v_potentials, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2680, __pyx_L1_error)
- /* "pywrapfst.pyx":2679
+ /* "pywrapfst.pyx":2681
* """
* self._reweight(potentials, to_final)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2656
+ /* "pywrapfst.pyx":2658
* self._check_mutating_imethod()
*
* def reweight(self, potentials, bool to_final=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2681
+/* "pywrapfst.pyx":2683
* return self
*
* cdef void _rmepsilon(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_10MutableFst__rmepsilon *__pyx_optional_args) {
PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":2683
+ /* "pywrapfst.pyx":2685
* cdef void _rmepsilon(self,
* queue_type="auto",
* bool connect=True, # <<<<<<<<<<<<<<
*/
bool __pyx_v_connect = ((bool)1);
- /* "pywrapfst.pyx":2684
+ /* "pywrapfst.pyx":2686
* queue_type="auto",
* bool connect=True,
* weight=None, # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2687
+ /* "pywrapfst.pyx":2689
* int64 nstate=fst.kNoStateId,
* float delta=fst.kShortestDelta) except *:
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 2687, __pyx_L1_error)
+ __PYX_ERR(0, 2689, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2688
+ /* "pywrapfst.pyx":2690
* float delta=fst.kShortestDelta) except *:
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.RmEpsilonOptions] _opts
* _opts.reset(
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2687, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2689, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":2691
+ /* "pywrapfst.pyx":2693
* cdef unique_ptr[fst.RmEpsilonOptions] _opts
* _opts.reset(
* new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<<
* connect,
* _weight,
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2691, __pyx_L1_error)
- __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2691, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2693, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2693, __pyx_L1_error)
- /* "pywrapfst.pyx":2690
+ /* "pywrapfst.pyx":2692
* weight)
* cdef unique_ptr[fst.RmEpsilonOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::script::RmEpsilonOptions(__pyx_t_3, __pyx_v_connect, __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta));
- /* "pywrapfst.pyx":2696
+ /* "pywrapfst.pyx":2698
* nstate,
* delta))
* fst.RmEpsilon(self._mfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2696, __pyx_L1_error)
+ __PYX_ERR(0, 2698, __pyx_L1_error)
}
fst::script::RmEpsilon(__pyx_v_self->_mfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":2697
+ /* "pywrapfst.pyx":2699
* delta))
* fst.RmEpsilon(self._mfst.get(), deref(_opts))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2697, __pyx_L1_error)
+ __PYX_ERR(0, 2699, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2697, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2699, __pyx_L1_error)
- /* "pywrapfst.pyx":2681
+ /* "pywrapfst.pyx":2683
* return self
*
* cdef void _rmepsilon(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2699
+/* "pywrapfst.pyx":2701
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
PyObject* values[5] = {0,0,0,0,0};
values[0] = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":2702
+ /* "pywrapfst.pyx":2704
* queue_type="auto",
* bool connect=True,
* weight=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2699, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2701, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_queue_type = values[0];
if (values[1]) {
- __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2701, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2703, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2701
+ /* "pywrapfst.pyx":2703
* def rmepsilon(self,
* queue_type="auto",
* bool connect=True, # <<<<<<<<<<<<<<
}
__pyx_v_weight = values[2];
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2703, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__22;
}
if (values[4]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2704, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2706, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__23;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2699, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2701, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.rmepsilon", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_50rmepsilon(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_queue_type, __pyx_v_connect, __pyx_v_weight, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":2699
+ /* "pywrapfst.pyx":2701
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("rmepsilon", 0);
- /* "pywrapfst.pyx":2726
+ /* "pywrapfst.pyx":2728
* self.
* """
* self._rmepsilon(queue_type, connect, weight, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_rmepsilon");
- __PYX_ERR(0, 2726, __pyx_L1_error)
+ __PYX_ERR(0, 2728, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 5;
__pyx_t_1.queue_type = __pyx_v_queue_type;
__pyx_t_1.weight = __pyx_v_weight;
__pyx_t_1.nstate = __pyx_v_nstate;
__pyx_t_1.delta = __pyx_v_delta;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2726, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2728, __pyx_L1_error)
- /* "pywrapfst.pyx":2727
+ /* "pywrapfst.pyx":2729
* """
* self._rmepsilon(queue_type, connect, weight, nstate, delta)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2699
+ /* "pywrapfst.pyx":2701
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2729
+/* "pywrapfst.pyx":2731
* return self
*
* cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2730
+ /* "pywrapfst.pyx":2732
*
* cdef void _set_final(self, int64 state, weight=None) except *:
* if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2730, __pyx_L1_error)
+ __PYX_ERR(0, 2732, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2731
+ /* "pywrapfst.pyx":2733
* cdef void _set_final(self, int64 state, weight=None) except *:
* if not self._mfst.get().ValidStateId(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(),
* weight)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2733, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2731, __pyx_L1_error)
+ __PYX_ERR(0, 2733, __pyx_L1_error)
- /* "pywrapfst.pyx":2730
+ /* "pywrapfst.pyx":2732
*
* cdef void _set_final(self, int64 state, weight=None) except *:
* if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2732
+ /* "pywrapfst.pyx":2734
* if not self._mfst.get().ValidStateId(state):
* raise FstIndexError("State index out of range")
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 2732, __pyx_L1_error)
+ __PYX_ERR(0, 2734, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2733
+ /* "pywrapfst.pyx":2735
* raise FstIndexError("State index out of range")
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* if not self._mfst.get().SetFinal(state, _weight):
* raise FstOpError("Incompatible or invalid weight")
*/
- __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_one(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2732, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst__get_WeightClass_or_one(((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_self), 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2734, __pyx_L1_error)
__pyx_v__weight = __pyx_t_5;
- /* "pywrapfst.pyx":2734
+ /* "pywrapfst.pyx":2736
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(),
* weight)
* if not self._mfst.get().SetFinal(state, _weight): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2734, __pyx_L1_error)
+ __PYX_ERR(0, 2736, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetFinal(__pyx_v_state, __pyx_v__weight) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2735
+ /* "pywrapfst.pyx":2737
* weight)
* if not self._mfst.get().SetFinal(state, _weight):
* raise FstOpError("Incompatible or invalid weight") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2735, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_weight);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2735, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2735, __pyx_L1_error)
+ __PYX_ERR(0, 2737, __pyx_L1_error)
- /* "pywrapfst.pyx":2734
+ /* "pywrapfst.pyx":2736
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(),
* weight)
* if not self._mfst.get().SetFinal(state, _weight): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2736
+ /* "pywrapfst.pyx":2738
* if not self._mfst.get().SetFinal(state, _weight):
* raise FstOpError("Incompatible or invalid weight")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2736, __pyx_L1_error)
+ __PYX_ERR(0, 2738, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2736, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2738, __pyx_L1_error)
- /* "pywrapfst.pyx":2729
+ /* "pywrapfst.pyx":2731
* return self
*
* cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2738
+/* "pywrapfst.pyx":2740
* self._check_mutating_imethod()
*
* def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2738, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2740, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2738, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2740, __pyx_L3_error)
__pyx_v_weight = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2738, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2740, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.set_final", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_final", 0);
- /* "pywrapfst.pyx":2756
+ /* "pywrapfst.pyx":2758
* FstOpError: Incompatible or invalid weight.
* """
* self._set_final(state, weight) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_final");
- __PYX_ERR(0, 2756, __pyx_L1_error)
+ __PYX_ERR(0, 2758, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.weight = __pyx_v_weight;
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_final(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_final(__pyx_v_self, __pyx_v_state, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error)
- /* "pywrapfst.pyx":2757
+ /* "pywrapfst.pyx":2759
* """
* self._set_final(state, weight)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2738
+ /* "pywrapfst.pyx":2740
* self._check_mutating_imethod()
*
* def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2759
+/* "pywrapfst.pyx":2761
* return self
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_set_input_symbols", 0);
- /* "pywrapfst.pyx":2760
+ /* "pywrapfst.pyx":2762
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2761
+ /* "pywrapfst.pyx":2763
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None:
* self._mfst.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2761, __pyx_L1_error)
+ __PYX_ERR(0, 2763, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetInputSymbols(NULL);
- /* "pywrapfst.pyx":2762
+ /* "pywrapfst.pyx":2764
* if symbols is None:
* self._mfst.get().SetInputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":2760
+ /* "pywrapfst.pyx":2762
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2763
+ /* "pywrapfst.pyx":2765
* self._mfst.get().SetInputSymbols(NULL)
* return
* self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2763, __pyx_L1_error)
+ __PYX_ERR(0, 2765, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2763, __pyx_L1_error)
+ __PYX_ERR(0, 2765, __pyx_L1_error)
}
- __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2763, __pyx_L1_error)
+ __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2765, __pyx_L1_error)
__pyx_v_self->_mfst.get()->SetInputSymbols(__pyx_t_3);
- /* "pywrapfst.pyx":2759
+ /* "pywrapfst.pyx":2761
* return self
*
* cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2765
+/* "pywrapfst.pyx":2767
* self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise())
*
* def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_input_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2765, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2767, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_54set_input_symbols(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_input_symbols", 0);
- /* "pywrapfst.pyx":2779
+ /* "pywrapfst.pyx":2781
* self.
* """
* self._set_input_symbols(symbols) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_input_symbols");
- __PYX_ERR(0, 2779, __pyx_L1_error)
+ __PYX_ERR(0, 2781, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2779, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2781, __pyx_L1_error)
- /* "pywrapfst.pyx":2780
+ /* "pywrapfst.pyx":2782
* """
* self._set_input_symbols(symbols)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2765
+ /* "pywrapfst.pyx":2767
* self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise())
*
* def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2782
+/* "pywrapfst.pyx":2784
* return self
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_set_output_symbols", 0);
- /* "pywrapfst.pyx":2783
+ /* "pywrapfst.pyx":2785
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2784
+ /* "pywrapfst.pyx":2786
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None:
* self._mfst.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2784, __pyx_L1_error)
+ __PYX_ERR(0, 2786, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetOutputSymbols(NULL);
- /* "pywrapfst.pyx":2785
+ /* "pywrapfst.pyx":2787
* if symbols is None:
* self._mfst.get().SetOutputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":2783
+ /* "pywrapfst.pyx":2785
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *:
* if symbols is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2786
+ /* "pywrapfst.pyx":2788
* self._mfst.get().SetOutputSymbols(NULL)
* return
* self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2786, __pyx_L1_error)
+ __PYX_ERR(0, 2788, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 2786, __pyx_L1_error)
+ __PYX_ERR(0, 2788, __pyx_L1_error)
}
- __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2786, __pyx_L1_error)
+ __pyx_t_3 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2788, __pyx_L1_error)
__pyx_v_self->_mfst.get()->SetOutputSymbols(__pyx_t_3);
- /* "pywrapfst.pyx":2782
+ /* "pywrapfst.pyx":2784
* return self
*
* cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2788
+/* "pywrapfst.pyx":2790
* self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise())
*
* def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_output_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2788, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_9pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2790, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_10MutableFst_56set_output_symbols(((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_symbols));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_output_symbols", 0);
- /* "pywrapfst.pyx":2802
+ /* "pywrapfst.pyx":2804
* self.
* """
* self._set_output_symbols(symbols) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_output_symbols");
- __PYX_ERR(0, 2802, __pyx_L1_error)
+ __PYX_ERR(0, 2804, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2802, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2804, __pyx_L1_error)
- /* "pywrapfst.pyx":2803
+ /* "pywrapfst.pyx":2805
* """
* self._set_output_symbols(symbols)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2788
+ /* "pywrapfst.pyx":2790
* self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise())
*
* def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2805
+/* "pywrapfst.pyx":2807
* return self
*
* def set_properties(self, props, mask): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2805, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2807, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_properties") < 0)) __PYX_ERR(0, 2805, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_properties") < 0)) __PYX_ERR(0, 2807, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2805, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2807, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableFst.set_properties", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_properties", 0);
- /* "pywrapfst.pyx":2819
+ /* "pywrapfst.pyx":2821
* self.
* """
* self._mfst.get().SetProperties(props.value, mask.value) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2819, __pyx_L1_error)
+ __PYX_ERR(0, 2821, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_props, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_props, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2821, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2821, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_self->_mfst.get()->SetProperties(__pyx_t_2, __pyx_t_3);
- /* "pywrapfst.pyx":2820
+ /* "pywrapfst.pyx":2822
* """
* self._mfst.get().SetProperties(props.value, mask.value)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2805
+ /* "pywrapfst.pyx":2807
* return self
*
* def set_properties(self, props, mask): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2822
+/* "pywrapfst.pyx":2824
* return self
*
* cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_set_start", 0);
- /* "pywrapfst.pyx":2823
+ /* "pywrapfst.pyx":2825
*
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2823, __pyx_L1_error)
+ __PYX_ERR(0, 2825, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetStart(__pyx_v_state) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2824
+ /* "pywrapfst.pyx":2826
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
*
* def set_start(self, int64 state):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2824, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2826, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2824, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2826, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2824, __pyx_L1_error)
+ __PYX_ERR(0, 2826, __pyx_L1_error)
- /* "pywrapfst.pyx":2823
+ /* "pywrapfst.pyx":2825
*
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2822
+ /* "pywrapfst.pyx":2824
* return self
*
* cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2826
+/* "pywrapfst.pyx":2828
* raise FstIndexError("State index out of range")
*
* def set_start(self, int64 state): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_start (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2826, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2828, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_start", 0);
- /* "pywrapfst.pyx":2841
+ /* "pywrapfst.pyx":2843
* FstIndexError: State index out of range.
* """
* self._set_start(state) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_start");
- __PYX_ERR(0, 2841, __pyx_L1_error)
+ __PYX_ERR(0, 2843, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2841, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2843, __pyx_L1_error)
- /* "pywrapfst.pyx":2842
+ /* "pywrapfst.pyx":2844
* """
* self._set_start(state)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2826
+ /* "pywrapfst.pyx":2828
* raise FstIndexError("State index out of range")
*
* def set_start(self, int64 state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2844
+/* "pywrapfst.pyx":2846
* return self
*
* cdef void _topsort(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_topsort", 0);
- /* "pywrapfst.pyx":2846
+ /* "pywrapfst.pyx":2848
* cdef void _topsort(self):
* # TopSort returns False if the FST is cyclic, and thus can't be TopSorted.
* if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2846, __pyx_L1_error)
+ __PYX_ERR(0, 2848, __pyx_L1_error)
}
__pyx_t_1 = ((!(fst::script::TopSort(__pyx_v_self->_mfst.get()) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2847
+ /* "pywrapfst.pyx":2849
* # TopSort returns False if the FST is cyclic, and thus can't be TopSorted.
* if not fst.TopSort(self._mfst.get()):
* logging.warning("Cannot topsort cyclic FST") # <<<<<<<<<<<<<<
*
* def topsort(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2847, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
}
__pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_u_Cannot_topsort_cyclic_FST) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_Cannot_topsort_cyclic_FST);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2847, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2846
+ /* "pywrapfst.pyx":2848
* cdef void _topsort(self):
* # TopSort returns False if the FST is cyclic, and thus can't be TopSorted.
* if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2844
+ /* "pywrapfst.pyx":2846
* return self
*
* cdef void _topsort(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2849
+/* "pywrapfst.pyx":2851
* logging.warning("Cannot topsort cyclic FST")
*
* def topsort(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("topsort", 0);
- /* "pywrapfst.pyx":2862
+ /* "pywrapfst.pyx":2864
* self.
* """
* self._topsort() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_topsort");
- __PYX_ERR(0, 2862, __pyx_L1_error)
+ __PYX_ERR(0, 2864, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self);
- /* "pywrapfst.pyx":2863
+ /* "pywrapfst.pyx":2865
* """
* self._topsort()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2849
+ /* "pywrapfst.pyx":2851
* logging.warning("Cannot topsort cyclic FST")
*
* def topsort(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2865
+/* "pywrapfst.pyx":2867
* return self
*
* def union(self, *fsts2): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("union", 0);
- /* "pywrapfst.pyx":2883
+ /* "pywrapfst.pyx":2885
* cdef Fst _fst2
* cdef vector[const_FstClass_ptr] _fsts2
* for _fst2 in fsts2: # <<<<<<<<<<<<<<
for (;;) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2883, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2885, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2885, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 2883, __pyx_L1_error)
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 2885, __pyx_L1_error)
__Pyx_XDECREF_SET(__pyx_v__fst2, ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_3));
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":2884
+ /* "pywrapfst.pyx":2886
* cdef vector[const_FstClass_ptr] _fsts2
* for _fst2 in fsts2:
* _fsts2.push_back(_fst2._fst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2884, __pyx_L1_error)
+ __PYX_ERR(0, 2886, __pyx_L1_error)
}
try {
__pyx_v__fsts2.push_back(__pyx_v__fst2->_fst.get());
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2884, __pyx_L1_error)
+ __PYX_ERR(0, 2886, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2883
+ /* "pywrapfst.pyx":2885
* cdef Fst _fst2
* cdef vector[const_FstClass_ptr] _fsts2
* for _fst2 in fsts2: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":2885
+ /* "pywrapfst.pyx":2887
* for _fst2 in fsts2:
* _fsts2.push_back(_fst2._fst.get())
* fst.Union(self._mfst.get(), _fsts2) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2885, __pyx_L1_error)
+ __PYX_ERR(0, 2887, __pyx_L1_error)
}
fst::script::Union(__pyx_v_self->_mfst.get(), __pyx_v__fsts2);
- /* "pywrapfst.pyx":2886
+ /* "pywrapfst.pyx":2888
* _fsts2.push_back(_fst2._fst.get())
* fst.Union(self._mfst.get(), _fsts2)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2886, __pyx_L1_error)
+ __PYX_ERR(0, 2888, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2886, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2888, __pyx_L1_error)
- /* "pywrapfst.pyx":2887
+ /* "pywrapfst.pyx":2889
* fst.Union(self._mfst.get(), _fsts2)
* self._check_mutating_imethod()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2865
+ /* "pywrapfst.pyx":2867
* return self
*
* def union(self, *fsts2): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2903
+/* "pywrapfst.pyx":2905
* """
*
* def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2903, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2905, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2903, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2905, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.VectorFst.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":2905
+ /* "pywrapfst.pyx":2907
* def __init__(self, arc_type="standard"):
* cdef unique_ptr[fst.MutableFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(tostring(arc_type))) # <<<<<<<<<<<<<<
* if _tfst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError(f"Unknown arc type: {arc_type!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2905, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2907, __pyx_L1_error)
__pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1));
- /* "pywrapfst.pyx":2906
+ /* "pywrapfst.pyx":2908
* cdef unique_ptr[fst.MutableFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(tostring(arc_type)))
* if _tfst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__tfst.get()->Properties(fst::kError, 1) == fst::kError) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":2907
+ /* "pywrapfst.pyx":2909
* _tfst.reset(new fst.VectorFstClass(tostring(arc_type)))
* if _tfst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError(f"Unknown arc type: {arc_type!r}") # <<<<<<<<<<<<<<
* self._fst.reset(_tfst.release())
* self._mfst = static_pointer_cast[fst.MutableFstClass,
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2907, __pyx_L1_error)
+ __PYX_ERR(0, 2909, __pyx_L1_error)
- /* "pywrapfst.pyx":2906
+ /* "pywrapfst.pyx":2908
* cdef unique_ptr[fst.MutableFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(tostring(arc_type)))
* if _tfst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2908
+ /* "pywrapfst.pyx":2910
* if _tfst.get().Properties(fst.kError, True) == fst.kError:
* raise FstOpError(f"Unknown arc type: {arc_type!r}")
* self._fst.reset(_tfst.release()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2908, __pyx_L1_error)
+ __PYX_ERR(0, 2910, __pyx_L1_error)
}
__pyx_v_self->__pyx_base.__pyx_base._fst.reset(__pyx_v__tfst.release());
- /* "pywrapfst.pyx":2910
+ /* "pywrapfst.pyx":2912
* self._fst.reset(_tfst.release())
* self._mfst = static_pointer_cast[fst.MutableFstClass,
* fst.FstClass](self._fst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2910, __pyx_L1_error)
+ __PYX_ERR(0, 2912, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2909
+ /* "pywrapfst.pyx":2911
* raise FstOpError(f"Unknown arc type: {arc_type!r}")
* self._fst.reset(_tfst.release())
* self._mfst = static_pointer_cast[fst.MutableFstClass, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2909, __pyx_L1_error)
+ __PYX_ERR(0, 2911, __pyx_L1_error)
}
__pyx_v_self->__pyx_base._mfst = std::static_pointer_cast<fst::script::MutableFstClass,fst::script::FstClass>(__pyx_v_self->__pyx_base.__pyx_base._fst);
- /* "pywrapfst.pyx":2903
+ /* "pywrapfst.pyx":2905
* """
*
* def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2929
+/* "pywrapfst.pyx":2931
*
*
* cdef Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_Fst", 0);
- /* "pywrapfst.pyx":2930
+ /* "pywrapfst.pyx":2932
*
* cdef Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2931
+ /* "pywrapfst.pyx":2933
* cdef Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef Fst _ofst = Fst.__new__(Fst)
* _ofst._fst.reset(tfst)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2933, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2931, __pyx_L1_error)
+ __PYX_ERR(0, 2933, __pyx_L1_error)
- /* "pywrapfst.pyx":2930
+ /* "pywrapfst.pyx":2932
*
* cdef Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2932
+ /* "pywrapfst.pyx":2934
* if tfst.Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed")
* cdef Fst _ofst = Fst.__new__(Fst) # <<<<<<<<<<<<<<
* _ofst._fst.reset(tfst)
* return _ofst
*/
- __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst_Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst_Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_v__ofst = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":2933
+ /* "pywrapfst.pyx":2935
* raise FstOpError("Operation failed")
* cdef Fst _ofst = Fst.__new__(Fst)
* _ofst._fst.reset(tfst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2933, __pyx_L1_error)
+ __PYX_ERR(0, 2935, __pyx_L1_error)
}
__pyx_v__ofst->_fst.reset(__pyx_v_tfst);
- /* "pywrapfst.pyx":2934
+ /* "pywrapfst.pyx":2936
* cdef Fst _ofst = Fst.__new__(Fst)
* _ofst._fst.reset(tfst)
* return _ofst # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__ofst;
goto __pyx_L0;
- /* "pywrapfst.pyx":2929
+ /* "pywrapfst.pyx":2931
*
*
* cdef Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2937
+/* "pywrapfst.pyx":2939
*
*
* cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_MutableFst", 0);
- /* "pywrapfst.pyx":2938
+ /* "pywrapfst.pyx":2940
*
* cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2939
+ /* "pywrapfst.pyx":2941
* cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef MutableFst _ofst = MutableFst.__new__(MutableFst)
* _ofst._fst.reset(tfst)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2939, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2941, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Operation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Operation_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2941, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2939, __pyx_L1_error)
+ __PYX_ERR(0, 2941, __pyx_L1_error)
- /* "pywrapfst.pyx":2938
+ /* "pywrapfst.pyx":2940
*
* cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2940
+ /* "pywrapfst.pyx":2942
* if tfst.Properties(fst.kError, True) == fst.kError:
* raise FstOpError("Operation failed")
* cdef MutableFst _ofst = MutableFst.__new__(MutableFst) # <<<<<<<<<<<<<<
* _ofst._fst.reset(tfst)
* # Makes a copy of it as the derived type! Cool.
*/
- __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst_MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst_MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2940, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_tp_new_9pywrapfst_MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst_MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
__pyx_v__ofst = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":2941
+ /* "pywrapfst.pyx":2943
* raise FstOpError("Operation failed")
* cdef MutableFst _ofst = MutableFst.__new__(MutableFst)
* _ofst._fst.reset(tfst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2941, __pyx_L1_error)
+ __PYX_ERR(0, 2943, __pyx_L1_error)
}
__pyx_v__ofst->__pyx_base._fst.reset(__pyx_v_tfst);
- /* "pywrapfst.pyx":2944
+ /* "pywrapfst.pyx":2946
* # Makes a copy of it as the derived type! Cool.
* _ofst._mfst = static_pointer_cast[fst.MutableFstClass,
* fst.FstClass](_ofst._fst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 2944, __pyx_L1_error)
+ __PYX_ERR(0, 2946, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2943
+ /* "pywrapfst.pyx":2945
* _ofst._fst.reset(tfst)
* # Makes a copy of it as the derived type! Cool.
* _ofst._mfst = static_pointer_cast[fst.MutableFstClass, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 2943, __pyx_L1_error)
+ __PYX_ERR(0, 2945, __pyx_L1_error)
}
__pyx_v__ofst->_mfst = std::static_pointer_cast<fst::script::MutableFstClass,fst::script::FstClass>(__pyx_v__ofst->__pyx_base._fst);
- /* "pywrapfst.pyx":2945
+ /* "pywrapfst.pyx":2947
* _ofst._mfst = static_pointer_cast[fst.MutableFstClass,
* fst.FstClass](_ofst._fst)
* return _ofst # <<<<<<<<<<<<<<
__pyx_r = __pyx_v__ofst;
goto __pyx_L0;
- /* "pywrapfst.pyx":2937
+ /* "pywrapfst.pyx":2939
*
*
* cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2948
+/* "pywrapfst.pyx":2950
*
*
* cdef Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_XFst", 0);
- /* "pywrapfst.pyx":2949
+ /* "pywrapfst.pyx":2951
*
* cdef Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_tfst->Properties(fst::kMutable, 1) == fst::kMutable) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2950
+ /* "pywrapfst.pyx":2952
* cdef Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True) == fst.kMutable:
* return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst)) # <<<<<<<<<<<<<<
* return _init_Fst(tfst)
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(static_cast<__pyx_t_9pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(static_cast<__pyx_t_9pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2949
+ /* "pywrapfst.pyx":2951
*
* cdef Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2952
+ /* "pywrapfst.pyx":2954
* return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst))
* else:
* return _init_Fst(tfst) # <<<<<<<<<<<<<<
*/
/*else*/ {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2954, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
}
- /* "pywrapfst.pyx":2948
+ /* "pywrapfst.pyx":2950
*
*
* cdef Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2955
+/* "pywrapfst.pyx":2957
*
*
* cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_Fst", 0);
- /* "pywrapfst.pyx":2957
+ /* "pywrapfst.pyx":2959
* cpdef Fst _read_Fst(source):
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.Read(path_tostring(source))) # <<<<<<<<<<<<<<
* if _tfst.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2957, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2959, __pyx_L1_error)
__pyx_v__tfst.reset(fst::script::FstClass::Read(__pyx_t_1));
- /* "pywrapfst.pyx":2958
+ /* "pywrapfst.pyx":2960
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.Read(path_tostring(source)))
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v__tfst.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":2959
+ /* "pywrapfst.pyx":2961
* _tfst.reset(fst.FstClass.Read(path_tostring(source)))
* if _tfst.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<<
* return _init_XFst(_tfst.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2959, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2959, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2959, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2959, __pyx_L1_error)
+ __PYX_ERR(0, 2961, __pyx_L1_error)
- /* "pywrapfst.pyx":2958
+ /* "pywrapfst.pyx":2960
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.Read(path_tostring(source)))
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2960
+ /* "pywrapfst.pyx":2962
* if _tfst.get() == NULL:
* raise FstIOError(f"Read failed: {source!r}")
* return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2962, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2955
+ /* "pywrapfst.pyx":2957
*
*
* cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_Fst", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2955, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2957, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2963
+/* "pywrapfst.pyx":2965
*
*
* cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_Fst_from_string", 0);
- /* "pywrapfst.pyx":2965
+ /* "pywrapfst.pyx":2967
* cpdef Fst _read_Fst_from_string(string state):
* cdef stringstream _sstrm
* _sstrm << state # <<<<<<<<<<<<<<
*/
(void)((__pyx_v__sstrm << __pyx_v_state));
- /* "pywrapfst.pyx":2967
+ /* "pywrapfst.pyx":2969
* _sstrm << state
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.ReadStream(_sstrm, b"<pywrapfst>")) # <<<<<<<<<<<<<<
*/
__pyx_v__tfst.reset(fst::script::FstClass::Read(__pyx_v__sstrm, __pyx_k_pywrapfst));
- /* "pywrapfst.pyx":2968
+ /* "pywrapfst.pyx":2970
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v__tfst.get() == NULL) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":2969
+ /* "pywrapfst.pyx":2971
* _tfst.reset(fst.FstClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _tfst.get() == NULL:
* raise FstIOError("Read from string failed") # <<<<<<<<<<<<<<
* return _init_XFst(_tfst.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2969, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2971, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_Read_from_string_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_Read_from_string_failed);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2969, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 2969, __pyx_L1_error)
+ __PYX_ERR(0, 2971, __pyx_L1_error)
- /* "pywrapfst.pyx":2968
+ /* "pywrapfst.pyx":2970
* cdef unique_ptr[fst.FstClass] _tfst
* _tfst.reset(fst.FstClass.ReadStream(_sstrm, b"<pywrapfst>"))
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2970
+ /* "pywrapfst.pyx":2972
* if _tfst.get() == NULL:
* raise FstIOError("Read from string failed")
* return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2970, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2963
+ /* "pywrapfst.pyx":2965
*
*
* cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_read_Fst_from_string (wrapper)", 0);
assert(__pyx_arg_state); {
- __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2963, __pyx_L3_error)
+ __pyx_v_state = __pyx_convert_string_from_py_std__in_string(__pyx_arg_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2965, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_read_Fst_from_string", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2963, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2965, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3089
+/* "pywrapfst.pyx":3091
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":3090
+ /* "pywrapfst.pyx":3092
*
* def __repr__(self):
* return f"<Arc at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__pyx_t_2 += 10;
__Pyx_GIVEREF(__pyx_kp_u_Arc_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Arc_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3092, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3089
+ /* "pywrapfst.pyx":3091
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3092
+/* "pywrapfst.pyx":3094
* return f"<Arc at 0x{id(self):x}>"
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_olabel)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 3092, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 3094, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 3092, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 3094, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 3:
if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nextstate)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 3092, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 3094, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3092, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3094, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
}
- __pyx_v_ilabel = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_ilabel == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3092, __pyx_L3_error)
- __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3092, __pyx_L3_error)
+ __pyx_v_ilabel = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_ilabel == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3094, __pyx_L3_error)
+ __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3094, __pyx_L3_error)
__pyx_v_weight = values[2];
- __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3092, __pyx_L3_error)
+ __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3094, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3092, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3094, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Arc.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":3093
+ /* "pywrapfst.pyx":3095
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(b"tropical", weight) # <<<<<<<<<<<<<<
* self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate))
*
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":3094
+ /* "pywrapfst.pyx":3096
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
* cdef fst.WeightClass _weight = _get_WeightClass_or_one(b"tropical", weight)
* self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3094, __pyx_L1_error)
+ __PYX_ERR(0, 3096, __pyx_L1_error)
}
__pyx_v_self->_arc.reset(new fst::script::ArcClass(__pyx_v_ilabel, __pyx_v_olabel, __pyx_v__weight, __pyx_v_nextstate));
- /* "pywrapfst.pyx":3092
+ /* "pywrapfst.pyx":3094
* return f"<Arc at 0x{id(self):x}>"
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3096
+/* "pywrapfst.pyx":3098
* self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate))
*
* cpdef Arc copy(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_3Arc_5copy)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Arc))))) __PYX_ERR(0, 3096, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Arc))))) __PYX_ERR(0, 3098, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3097
+ /* "pywrapfst.pyx":3099
*
* cpdef Arc copy(self):
* return Arc(self.ilabel, self.olabel, self.weight, self.nextstate) # <<<<<<<<<<<<<<
* property ilabel:
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_nextstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3099, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3096
+ /* "pywrapfst.pyx":3098
* self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate))
*
* cpdef Arc copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3101
+/* "pywrapfst.pyx":3103
* property ilabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":3102
+ /* "pywrapfst.pyx":3104
*
* def __get__(self):
* return deref(self._arc).ilabel # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3102, __pyx_L1_error)
+ __PYX_ERR(0, 3104, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3102, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3101
+ /* "pywrapfst.pyx":3103
* property ilabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3104
+/* "pywrapfst.pyx":3106
* return deref(self._arc).ilabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
assert(__pyx_arg_value); {
- __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3104, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3106, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":3105
+ /* "pywrapfst.pyx":3107
*
* def __set__(self, int64 value):
* deref(self._arc).ilabel = value # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3105, __pyx_L1_error)
+ __PYX_ERR(0, 3107, __pyx_L1_error)
}
(*__pyx_v_self->_arc).ilabel = __pyx_v_value;
- /* "pywrapfst.pyx":3104
+ /* "pywrapfst.pyx":3106
* return deref(self._arc).ilabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3109
+/* "pywrapfst.pyx":3111
* property olabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":3110
+ /* "pywrapfst.pyx":3112
*
* def __get__(self):
* return deref(self._arc).olabel # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3110, __pyx_L1_error)
+ __PYX_ERR(0, 3112, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3109
+ /* "pywrapfst.pyx":3111
* property olabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3112
+/* "pywrapfst.pyx":3114
* return deref(self._arc).olabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
assert(__pyx_arg_value); {
- __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3112, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3114, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":3113
+ /* "pywrapfst.pyx":3115
*
* def __set__(self, int64 value):
* deref(self._arc).olabel = value # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3113, __pyx_L1_error)
+ __PYX_ERR(0, 3115, __pyx_L1_error)
}
(*__pyx_v_self->_arc).olabel = __pyx_v_value;
- /* "pywrapfst.pyx":3112
+ /* "pywrapfst.pyx":3114
* return deref(self._arc).olabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3117
+/* "pywrapfst.pyx":3119
* property weight:
*
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":3118
+ /* "pywrapfst.pyx":3120
*
* def __get__(self):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight))
* return _weight
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3118, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3120, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":3119
+ /* "pywrapfst.pyx":3121
* def __get__(self):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 3119, __pyx_L1_error)
+ __PYX_ERR(0, 3121, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3119, __pyx_L1_error)
+ __PYX_ERR(0, 3121, __pyx_L1_error)
}
__pyx_v__weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_arc).weight));
- /* "pywrapfst.pyx":3120
+ /* "pywrapfst.pyx":3122
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight))
* return _weight # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v__weight);
goto __pyx_L0;
- /* "pywrapfst.pyx":3117
+ /* "pywrapfst.pyx":3119
* property weight:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3122
+/* "pywrapfst.pyx":3124
* return _weight
*
* def __set__(self, weight): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":3123
+ /* "pywrapfst.pyx":3125
*
* def __set__(self, weight):
* deref(self._arc).weight = _get_WeightClass_or_one(b"tropical", weight) # <<<<<<<<<<<<<<
*
* property nextstate:
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3123, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3125, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3123, __pyx_L1_error)
+ __PYX_ERR(0, 3125, __pyx_L1_error)
}
(*__pyx_v_self->_arc).weight = __pyx_t_1;
- /* "pywrapfst.pyx":3122
+ /* "pywrapfst.pyx":3124
* return _weight
*
* def __set__(self, weight): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3127
+/* "pywrapfst.pyx":3129
* property nextstate:
*
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":3128
+ /* "pywrapfst.pyx":3130
*
* def __get__(self):
* return deref(self._arc).nextstate # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3128, __pyx_L1_error)
+ __PYX_ERR(0, 3130, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3130, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3127
+ /* "pywrapfst.pyx":3129
* property nextstate:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3130
+/* "pywrapfst.pyx":3132
* return deref(self._arc).nextstate
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
assert(__pyx_arg_value); {
- __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3130, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3132, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":3131
+ /* "pywrapfst.pyx":3133
*
* def __set__(self, int64 value):
* deref(self._arc).nextstate = value # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3131, __pyx_L1_error)
+ __PYX_ERR(0, 3133, __pyx_L1_error)
}
(*__pyx_v_self->_arc).nextstate = __pyx_v_value;
- /* "pywrapfst.pyx":3130
+ /* "pywrapfst.pyx":3132
* return deref(self._arc).nextstate
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3134
+/* "pywrapfst.pyx":3136
*
*
* cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_init_Arc", 0);
- /* "pywrapfst.pyx":3135
+ /* "pywrapfst.pyx":3137
*
* cdef Arc _init_Arc(const fst.ArcClass &arc):
* cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* _weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(arc.ilabel, arc.olabel, _weight, arc.nextstate)
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3137, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v__weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":3136
+ /* "pywrapfst.pyx":3138
* cdef Arc _init_Arc(const fst.ArcClass &arc):
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(arc.weight)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight");
- __PYX_ERR(0, 3136, __pyx_L1_error)
+ __PYX_ERR(0, 3138, __pyx_L1_error)
}
__pyx_v__weight->_weight.reset(new fst::script::WeightClass(__pyx_v_arc.weight));
- /* "pywrapfst.pyx":3137
+ /* "pywrapfst.pyx":3139
* cdef Weight _weight = Weight.__new__(Weight)
* _weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(arc.ilabel, arc.olabel, _weight, arc.nextstate) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3137, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3137, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3137, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3137, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3137, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3134
+ /* "pywrapfst.pyx":3136
*
*
* cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3148
+/* "pywrapfst.pyx":3153
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<ArcIterator at 0x{id(self):x}>"
+ * return f"<_ArcIterator at 0x{id(self):x}>"
*
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_1__repr__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_1__repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator___repr__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator___repr__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator___repr__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":3149
+ /* "pywrapfst.pyx":3154
*
* def __repr__(self):
- * return f"<ArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
+ * return f"<_ArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
*
* def __init__(self, Fst ifst, int64 state):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__Pyx_INCREF(__pyx_kp_u_ArcIterator_at_0x);
- __pyx_t_2 += 18;
+ __pyx_t_2 += 19;
__Pyx_GIVEREF(__pyx_kp_u_ArcIterator_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ArcIterator_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3148
+ /* "pywrapfst.pyx":3153
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<ArcIterator at 0x{id(self):x}>"
+ * return f"<_ArcIterator at 0x{id(self):x}>"
*
*/
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3151
- * return f"<ArcIterator at 0x{id(self):x}>"
+/* "pywrapfst.pyx":3156
+ * return f"<_ArcIterator at 0x{id(self):x}>"
*
* def __init__(self, Fst ifst, int64 state): # <<<<<<<<<<<<<<
* if not ifst._fst.get().ValidStateId(state):
*/
/* Python wrapper */
-static int __pyx_pw_9pywrapfst_11ArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_9pywrapfst_11ArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_9pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_9pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst = 0;
int64 __pyx_v_state;
int __pyx_lineno = 0;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3151, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3156, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3151, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3156, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3151, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3156, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3151, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3156, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3151, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_2__init__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_2__init__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state);
/* function exit code */
goto __pyx_L0;
return __pyx_r;
}
-static int __pyx_pf_9pywrapfst_11ArcIterator_2__init__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, int64 __pyx_v_state) {
+static int __pyx_pf_9pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, int64 __pyx_v_state) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":3152
+ /* "pywrapfst.pyx":3157
*
* def __init__(self, Fst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3152, __pyx_L1_error)
+ __PYX_ERR(0, 3157, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_ifst->_fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":3153
+ /* "pywrapfst.pyx":3158
* def __init__(self, Fst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._fst = ifst._fst
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3158, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 3153, __pyx_L1_error)
+ __PYX_ERR(0, 3158, __pyx_L1_error)
- /* "pywrapfst.pyx":3152
+ /* "pywrapfst.pyx":3157
*
* def __init__(self, Fst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3155
+ /* "pywrapfst.pyx":3160
* raise FstIndexError("State index out of range")
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._fst = ifst._fst # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3155, __pyx_L1_error)
+ __PYX_ERR(0, 3160, __pyx_L1_error)
}
__pyx_t_5 = __pyx_v_ifst->_fst;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3155, __pyx_L1_error)
+ __PYX_ERR(0, 3160, __pyx_L1_error)
}
__pyx_v_self->_fst = __pyx_t_5;
- /* "pywrapfst.pyx":3156
+ /* "pywrapfst.pyx":3161
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._fst = ifst._fst
* self._aiter.reset(new fst.ArcIteratorClass(deref(self._fst), state)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3156, __pyx_L1_error)
+ __PYX_ERR(0, 3161, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3156, __pyx_L1_error)
+ __PYX_ERR(0, 3161, __pyx_L1_error)
}
__pyx_v_self->_aiter.reset(new fst::script::ArcIteratorClass((*__pyx_v_self->_fst), __pyx_v_state));
- /* "pywrapfst.pyx":3151
- * return f"<ArcIterator at 0x{id(self):x}>"
+ /* "pywrapfst.pyx":3156
+ * return f"<_ArcIterator at 0x{id(self):x}>"
*
* def __init__(self, Fst ifst, int64 state): # <<<<<<<<<<<<<<
* if not ifst._fst.get().ValidStateId(state):
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":3159
+/* "pywrapfst.pyx":3164
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_4__iter__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_4__iter__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_4__iter__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_4__iter__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":3160
+ /* "pywrapfst.pyx":3165
* # This just registers this class as a possible iterator.
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":3159
+ /* "pywrapfst.pyx":3164
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3163
+/* "pywrapfst.pyx":3168
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_7__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_7__next__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_6__next__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_6__next__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_6__next__(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":3164
+ /* "pywrapfst.pyx":3169
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done");
- __PYX_ERR(0, 3164, __pyx_L1_error)
+ __PYX_ERR(0, 3169, __pyx_L1_error)
}
- __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
+ __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":3165
+ /* "pywrapfst.pyx":3170
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* self.next()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 3165, __pyx_L1_error)
+ __PYX_ERR(0, 3170, __pyx_L1_error)
- /* "pywrapfst.pyx":3164
+ /* "pywrapfst.pyx":3169
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3166
+ /* "pywrapfst.pyx":3171
* if self.done():
* raise StopIteration
* result = self.value() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value");
- __PYX_ERR(0, 3166, __pyx_L1_error)
+ __PYX_ERR(0, 3171, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3171, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":3167
+ /* "pywrapfst.pyx":3172
* raise StopIteration
* result = self.value()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next");
- __PYX_ERR(0, 3167, __pyx_L1_error)
+ __PYX_ERR(0, 3172, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
+ ((struct __pyx_vtabstruct_9pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3168
+ /* "pywrapfst.pyx":3173
* result = self.value()
* self.next()
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":3163
+ /* "pywrapfst.pyx":3168
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
return __pyx_r;
}
-/* "pywrapfst.pyx":3170
+/* "pywrapfst.pyx":3175
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
* done(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static bool __pyx_f_9pywrapfst_11ArcIterator_done(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static bool __pyx_f_9pywrapfst_12_ArcIterator_done(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
bool __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3170, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_9done)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_9done)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3170, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3175, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3170, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3175, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3179
+ /* "pywrapfst.pyx":3184
* True if the iterator is exhausted, False otherwise.
* """
* return self._aiter.get().Done() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3179, __pyx_L1_error)
+ __PYX_ERR(0, 3184, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":3170
+ /* "pywrapfst.pyx":3175
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_8done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_8done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("done (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_8done(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_8done(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_8done(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_8done(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("done", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_11ArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3170, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_12_ArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3181
+/* "pywrapfst.pyx":3186
* return self._aiter.get().Done()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
* flags(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static uint8 __pyx_f_9pywrapfst_11ArcIterator_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static uint8 __pyx_f_9pywrapfst_12_ArcIterator_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
uint8 __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_11flags)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_11flags)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3186, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3190
+ /* "pywrapfst.pyx":3195
* The current iterator behavioral flags as an integer.
* """
* return self._aiter.get().Flags() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3190, __pyx_L1_error)
+ __PYX_ERR(0, 3195, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Flags();
goto __pyx_L0;
- /* "pywrapfst.pyx":3181
+ /* "pywrapfst.pyx":3186
* return self._aiter.get().Done()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_10flags[] = "\n flags(self)\n\n Returns the current iterator behavioral flags.\n\n Returns:\n The current iterator behavioral flags as an integer.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_10flags[] = "\n flags(self)\n\n Returns the current iterator behavioral flags.\n\n Returns:\n The current iterator behavioral flags as an integer.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_11flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("flags (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_10flags(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_10flags(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_10flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_10flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_11ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_12_ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3192
+/* "pywrapfst.pyx":3197
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
* next(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_next(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_next(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3192, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3197, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_13next)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_13next)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3192, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3197, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3198
+ /* "pywrapfst.pyx":3203
* Advances the iterator.
* """
* self._aiter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3198, __pyx_L1_error)
+ __PYX_ERR(0, 3203, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Next();
- /* "pywrapfst.pyx":3192
+ /* "pywrapfst.pyx":3197
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_12next[] = "\n next(self)\n\n Advances the iterator.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_12next[] = "\n next(self)\n\n Advances the iterator.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_13next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("next (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_12next(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_12next(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_12next(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_12next(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("next", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3192, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_12_ArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3197, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3200
+/* "pywrapfst.pyx":3205
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
* position(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static size_t __pyx_f_9pywrapfst_11ArcIterator_position(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static size_t __pyx_f_9pywrapfst_12_ArcIterator_position(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
size_t __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3200, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_15position)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_15position)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3200, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3200, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3205, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3209
+ /* "pywrapfst.pyx":3214
* The iterator's position, expressed as an integer.
* """
* return self._aiter.get().Position() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3209, __pyx_L1_error)
+ __PYX_ERR(0, 3214, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Position();
goto __pyx_L0;
- /* "pywrapfst.pyx":3200
+ /* "pywrapfst.pyx":3205
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_14position[] = "\n position(self)\n\n Returns the position of the iterator.\n\n Returns:\n The iterator's position, expressed as an integer.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_14position[] = "\n position(self)\n\n Returns the position of the iterator.\n\n Returns:\n The iterator's position, expressed as an integer.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_15position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("position (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_14position(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_14position(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_14position(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_14position(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("position", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_11ArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3200, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_12_ArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3211
+/* "pywrapfst.pyx":3216
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
* reset(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_reset(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_reset(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3216, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_17reset)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_17reset)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3216, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3217
+ /* "pywrapfst.pyx":3222
* Resets the iterator to the initial position.
* """
* self._aiter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3217, __pyx_L1_error)
+ __PYX_ERR(0, 3222, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Reset();
- /* "pywrapfst.pyx":3211
+ /* "pywrapfst.pyx":3216
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_16reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_16reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_17reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_16reset(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_16reset(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_16reset(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_16reset(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reset", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_12_ArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3216, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3219
+/* "pywrapfst.pyx":3224
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
* seek(self, a)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_seek(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_seek(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_19seek)) {
- __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_19seek)) {
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3224, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3228
+ /* "pywrapfst.pyx":3233
* a: The position to seek to.
* """
* self._aiter.get().Seek(a) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3228, __pyx_L1_error)
+ __PYX_ERR(0, 3233, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Seek(__pyx_v_a);
- /* "pywrapfst.pyx":3219
+ /* "pywrapfst.pyx":3224
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_18seek[] = "\n seek(self, a)\n\n Advance the iterator to a new position.\n\n Args:\n a: The position to seek to.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_18seek[] = "\n seek(self, a)\n\n Advance the iterator to a new position.\n\n Args:\n a: The position to seek to.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_19seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a) {
size_t __pyx_v_a;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("seek (wrapper)", 0);
assert(__pyx_arg_a); {
- __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3219, __pyx_L3_error)
+ __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3224, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_18seek(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self), ((size_t)__pyx_v_a));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_18seek(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self), ((size_t)__pyx_v_a));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_18seek(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, size_t __pyx_v_a) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_18seek(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, size_t __pyx_v_a) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("seek", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_12_ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3230
+/* "pywrapfst.pyx":3235
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint8 flags, uint8 mask): # <<<<<<<<<<<<<<
* set_flags(self, flags, mask)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static void __pyx_f_9pywrapfst_11ArcIterator_set_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static void __pyx_f_9pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_21set_flags)) {
- __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_21set_flags)) {
+ __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
if (__pyx_t_6) {
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
#endif
}
- /* "pywrapfst.pyx":3240
+ /* "pywrapfst.pyx":3245
* mask: A mask to be applied to the `flags` argument before setting them.
* """
* self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3240, __pyx_L1_error)
+ __PYX_ERR(0, 3245, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask);
- /* "pywrapfst.pyx":3230
+ /* "pywrapfst.pyx":3235
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint8 flags, uint8 mask): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_WriteUnraisable("pywrapfst.ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_20set_flags[] = "\n set_flags(self, flags, mask)\n\n Sets the current iterator behavioral flags.\n\n Args:\n flags: The properties to be set.\n mask: A mask to be applied to the `flags` argument before setting them.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_20set_flags[] = "\n set_flags(self, flags, mask)\n\n Sets the current iterator behavioral flags.\n\n Args:\n flags: The properties to be set.\n mask: A mask to be applied to the `flags` argument before setting them.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_21set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
uint8 __pyx_v_flags;
uint8 __pyx_v_mask;
int __pyx_lineno = 0;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3230, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3235, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3230, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3235, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3230, __pyx_L3_error)
- __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3230, __pyx_L3_error)
+ __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3235, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3235, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3230, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3235, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_20set_flags(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self), __pyx_v_flags, __pyx_v_mask);
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_20set_flags(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self), __pyx_v_flags, __pyx_v_mask);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_20set_flags(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_20set_flags(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_12_ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3242
+/* "pywrapfst.pyx":3247
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef object value(self): # <<<<<<<<<<<<<<
* value(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_f_9pywrapfst_11ArcIterator_value(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_f_9pywrapfst_12_ArcIterator_value(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3242, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3247, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_11ArcIterator_23value)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_12_ArcIterator_23value)) {
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3242, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3247, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
#endif
}
- /* "pywrapfst.pyx":3248
+ /* "pywrapfst.pyx":3253
* Returns the current arc.
* """
* return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3248, __pyx_L1_error)
+ __PYX_ERR(0, 3253, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3253, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3242
+ /* "pywrapfst.pyx":3247
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef object value(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_11ArcIterator_22value[] = "\n value(self)\n\n Returns the current arc.\n ";
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_12_ArcIterator_22value[] = "\n value(self)\n\n Returns the current arc.\n ";
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_23value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("value (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_22value(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_22value(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_22value(struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_22value(struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("value", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_11ArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3242, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_12_ArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3247, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_24__reduce_cython__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_24__reduce_cython__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_11ArcIterator_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_12_ArcIterator_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_11ArcIterator_26__setstate_cython__(((struct __pyx_obj_9pywrapfst_ArcIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+ __pyx_r = __pyx_pf_9pywrapfst_12_ArcIterator_26__setstate_cython__(((struct __pyx_obj_9pywrapfst__ArcIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11ArcIterator_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_ArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pf_9pywrapfst_12_ArcIterator_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__ArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.ArcIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._ArcIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":3260
+/* "pywrapfst.pyx":3265
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<MutableArcIterator at 0x{id(self):x}>"
+ * return f"<_MutableArcIterator at 0x{id(self):x}>"
*
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_1__repr__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_1__repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator___repr__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator___repr__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator___repr__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator___repr__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":3261
+ /* "pywrapfst.pyx":3266
*
* def __repr__(self):
- * return f"<MutableArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
+ * return f"<_MutableArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
*
* def __init__(self, MutableFst ifst, int64 state):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3261, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__Pyx_INCREF(__pyx_kp_u_MutableArcIterator_at_0x);
- __pyx_t_2 += 25;
+ __pyx_t_2 += 26;
__Pyx_GIVEREF(__pyx_kp_u_MutableArcIterator_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_MutableArcIterator_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3261, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3261, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3261, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3260
+ /* "pywrapfst.pyx":3265
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<MutableArcIterator at 0x{id(self):x}>"
+ * return f"<_MutableArcIterator at 0x{id(self):x}>"
*
*/
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3263
- * return f"<MutableArcIterator at 0x{id(self):x}>"
+/* "pywrapfst.pyx":3268
+ * return f"<_MutableArcIterator at 0x{id(self):x}>"
*
* def __init__(self, MutableFst ifst, int64 state): # <<<<<<<<<<<<<<
* if not ifst._fst.get().ValidStateId(state):
*/
/* Python wrapper */
-static int __pyx_pw_9pywrapfst_18MutableArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_9pywrapfst_18MutableArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_9pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_9pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_ifst = 0;
int64 __pyx_v_state;
int __pyx_lineno = 0;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3263, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3268, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3263, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3268, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_MutableFst *)values[0]);
- __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3263, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3268, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3263, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3268, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3263, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_2__init__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state);
/* function exit code */
goto __pyx_L0;
return __pyx_r;
}
-static int __pyx_pf_9pywrapfst_18MutableArcIterator_2__init__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_ifst, int64 __pyx_v_state) {
+static int __pyx_pf_9pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_MutableFst *__pyx_v_ifst, int64 __pyx_v_state) {
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":3264
+ /* "pywrapfst.pyx":3269
*
* def __init__(self, MutableFst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3264, __pyx_L1_error)
+ __PYX_ERR(0, 3269, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_ifst->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":3265
+ /* "pywrapfst.pyx":3270
* def __init__(self, MutableFst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._mfst = ifst._mfst
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_State_index_out_of_range) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_State_index_out_of_range);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3265, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 3265, __pyx_L1_error)
+ __PYX_ERR(0, 3270, __pyx_L1_error)
- /* "pywrapfst.pyx":3264
+ /* "pywrapfst.pyx":3269
*
* def __init__(self, MutableFst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3267
+ /* "pywrapfst.pyx":3272
* raise FstIndexError("State index out of range")
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._mfst = ifst._mfst # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 3267, __pyx_L1_error)
+ __PYX_ERR(0, 3272, __pyx_L1_error)
}
__pyx_t_5 = __pyx_v_ifst->_mfst;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 3267, __pyx_L1_error)
+ __PYX_ERR(0, 3272, __pyx_L1_error)
}
__pyx_v_self->_mfst = __pyx_t_5;
- /* "pywrapfst.pyx":3268
+ /* "pywrapfst.pyx":3273
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._mfst = ifst._mfst
* self._aiter.reset(new fst.MutableArcIteratorClass(ifst._mfst.get(), state)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3268, __pyx_L1_error)
+ __PYX_ERR(0, 3273, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst");
- __PYX_ERR(0, 3268, __pyx_L1_error)
+ __PYX_ERR(0, 3273, __pyx_L1_error)
}
__pyx_v_self->_aiter.reset(new fst::script::MutableArcIteratorClass(__pyx_v_ifst->_mfst.get(), __pyx_v_state));
- /* "pywrapfst.pyx":3263
- * return f"<MutableArcIterator at 0x{id(self):x}>"
+ /* "pywrapfst.pyx":3268
+ * return f"<_MutableArcIterator at 0x{id(self):x}>"
*
* def __init__(self, MutableFst ifst, int64 state): # <<<<<<<<<<<<<<
* if not ifst._fst.get().ValidStateId(state):
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_9pywrapfst_19_MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
-/* "pywrapfst.pyx":3271
+/* "pywrapfst.pyx":3276
*
* # Magic method used to get a Pythonic Iterator API out of the C++ API.
* def __iter__(self): # <<<<<<<<<<<<<<
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_4__iter__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_4__iter__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_4__iter__(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_4__iter__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ *__pyx_cur_scope;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
if (unlikely(!__pyx_cur_scope)) {
__pyx_cur_scope = ((struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ *)Py_None);
__Pyx_INCREF(Py_None);
- __PYX_ERR(0, 3271, __pyx_L1_error)
+ __PYX_ERR(0, 3276, __pyx_L1_error)
} else {
__Pyx_GOTREF(__pyx_cur_scope);
}
__Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
__Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
{
- __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pywrapfst_18MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3271, __pyx_L1_error)
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9pywrapfst_19_MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3276, __pyx_L1_error)
__Pyx_DECREF(__pyx_cur_scope);
__Pyx_RefNannyFinishContext();
return (PyObject *) gen;
/* function exit code */
__pyx_L1_error:;
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_DECREF(((PyObject *)__pyx_cur_scope));
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-static PyObject *__pyx_gb_9pywrapfst_18MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_9pywrapfst_19_MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_9pywrapfst___pyx_scope_struct____iter__ *)__pyx_generator->closure);
PyObject *__pyx_r = NULL;
return NULL;
}
__pyx_L3_first_run:;
- if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3271, __pyx_L1_error)
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3276, __pyx_L1_error)
- /* "pywrapfst.pyx":3272
+ /* "pywrapfst.pyx":3277
* # Magic method used to get a Pythonic Iterator API out of the C++ API.
* def __iter__(self):
* while not self.done(): # <<<<<<<<<<<<<<
while (1) {
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done");
- __PYX_ERR(0, 3272, __pyx_L1_error)
+ __PYX_ERR(0, 3277, __pyx_L1_error)
}
- __pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->done(__pyx_cur_scope->__pyx_v_self, 0) != 0)) != 0);
+ __pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->done(__pyx_cur_scope->__pyx_v_self, 0) != 0)) != 0);
if (!__pyx_t_1) break;
- /* "pywrapfst.pyx":3273
+ /* "pywrapfst.pyx":3278
* def __iter__(self):
* while not self.done():
* yield self.value() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value");
- __PYX_ERR(0, 3273, __pyx_L1_error)
+ __PYX_ERR(0, 3278, __pyx_L1_error)
}
- __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->value(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->value(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3278, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__pyx_generator->resume_label = 1;
return __pyx_r;
__pyx_L6_resume_from_yield:;
- if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3278, __pyx_L1_error)
- /* "pywrapfst.pyx":3274
+ /* "pywrapfst.pyx":3279
* while not self.done():
* yield self.value()
* self.next() # <<<<<<<<<<<<<<
*
- * cpdef bool done(self):
+ * # Magic method used to get a Pythonic API out of the C++ API.
*/
if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next");
- __PYX_ERR(0, 3274, __pyx_L1_error)
+ __PYX_ERR(0, 3279, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->next(__pyx_cur_scope->__pyx_v_self, 0);
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->next(__pyx_cur_scope->__pyx_v_self, 0);
}
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
- /* "pywrapfst.pyx":3271
+ /* "pywrapfst.pyx":3276
*
* # Magic method used to get a Pythonic Iterator API out of the C++ API.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3276
- * self.next()
+/* "pywrapfst.pyx":3282
+ *
+ * # Magic method used to get a Pythonic API out of the C++ API.
+ * def __next__(self): # <<<<<<<<<<<<<<
+ * if self.done():
+ * raise StopIteration
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_7__next__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_7__next__(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
+ PyObject *__pyx_v_result = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__next__", 0);
+
+ /* "pywrapfst.pyx":3283
+ * # Magic method used to get a Pythonic API out of the C++ API.
+ * def __next__(self):
+ * if self.done(): # <<<<<<<<<<<<<<
+ * raise StopIteration
+ * result = self.value()
+ */
+ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
+ PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done");
+ __PYX_ERR(0, 3283, __pyx_L1_error)
+ }
+ __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
+ if (unlikely(__pyx_t_1)) {
+
+ /* "pywrapfst.pyx":3284
+ * def __next__(self):
+ * if self.done():
+ * raise StopIteration # <<<<<<<<<<<<<<
+ * result = self.value()
+ * self.next()
+ */
+ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+ __PYX_ERR(0, 3284, __pyx_L1_error)
+
+ /* "pywrapfst.pyx":3283
+ * # Magic method used to get a Pythonic API out of the C++ API.
+ * def __next__(self):
+ * if self.done(): # <<<<<<<<<<<<<<
+ * raise StopIteration
+ * result = self.value()
+ */
+ }
+
+ /* "pywrapfst.pyx":3285
+ * if self.done():
+ * raise StopIteration
+ * result = self.value() # <<<<<<<<<<<<<<
+ * self.next()
+ * return result
+ */
+ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
+ PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value");
+ __PYX_ERR(0, 3285, __pyx_L1_error)
+ }
+ __pyx_t_2 = ((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_result = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pywrapfst.pyx":3286
+ * raise StopIteration
+ * result = self.value()
+ * self.next() # <<<<<<<<<<<<<<
+ * return result
+ *
+ */
+ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
+ PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next");
+ __PYX_ERR(0, 3286, __pyx_L1_error)
+ }
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
+
+ /* "pywrapfst.pyx":3287
+ * result = self.value()
+ * self.next()
+ * return result # <<<<<<<<<<<<<<
+ *
+ * cpdef bool done(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_result);
+ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
+
+ /* "pywrapfst.pyx":3282
+ *
+ * # Magic method used to get a Pythonic API out of the C++ API.
+ * def __next__(self): # <<<<<<<<<<<<<<
+ * if self.done():
+ * raise StopIteration
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pywrapfst.pyx":3289
+ * return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
* """
* done(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_8done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static bool __pyx_f_9pywrapfst_18MutableArcIterator_done(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_10done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static bool __pyx_f_9pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
bool __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_8done)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_10done)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3289, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3285
+ /* "pywrapfst.pyx":3298
* True if the iterator is exhausted, False otherwise.
* """
* return self._aiter.get().Done() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3285, __pyx_L1_error)
+ __PYX_ERR(0, 3298, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":3276
- * self.next()
+ /* "pywrapfst.pyx":3289
+ * return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
* """
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_8done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_7done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_8done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_10done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_9done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_10done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("done (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_7done(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_9done(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_7done(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_9done(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("done", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_18MutableArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_19_MutableArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3287
+/* "pywrapfst.pyx":3300
* return self._aiter.get().Done()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
* flags(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_10flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static uint8 __pyx_f_9pywrapfst_18MutableArcIterator_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_12flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static uint8 __pyx_f_9pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
uint8 __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_10flags)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_12flags)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3287, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3300, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3300, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3296
+ /* "pywrapfst.pyx":3309
* The current iterator behavioral flags as an integer.
* """
* return self._aiter.get().Flags() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3296, __pyx_L1_error)
+ __PYX_ERR(0, 3309, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Flags();
goto __pyx_L0;
- /* "pywrapfst.pyx":3287
+ /* "pywrapfst.pyx":3300
* return self._aiter.get().Done()
*
* cpdef uint8 flags(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_10flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_9flags[] = "\n flags(self)\n\n Returns the current iterator behavioral flags.\n\n Returns:\n The current iterator behavioral flags as an integer.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_10flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_12flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_11flags[] = "\n flags(self)\n\n Returns the current iterator behavioral flags.\n\n Returns:\n The current iterator behavioral flags as an integer.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_12flags(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("flags (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_9flags(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_11flags(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_9flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_11flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_18MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint8_t(__pyx_f_9pywrapfst_19_MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3298
+/* "pywrapfst.pyx":3311
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
* next(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_12next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_next(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_14next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_12next)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_14next)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3304
+ /* "pywrapfst.pyx":3317
* Advances the iterator.
* """
* self._aiter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3304, __pyx_L1_error)
+ __PYX_ERR(0, 3317, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Next();
- /* "pywrapfst.pyx":3298
+ /* "pywrapfst.pyx":3311
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_12next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_11next[] = "\n next(self)\n\n Advances the iterator.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_12next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_14next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_13next[] = "\n next(self)\n\n Advances the iterator.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_14next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("next (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_11next(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_13next(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_11next(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_13next(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("next", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3311, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3306
+/* "pywrapfst.pyx":3319
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
* position(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_14position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static size_t __pyx_f_9pywrapfst_18MutableArcIterator_position(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_16position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static size_t __pyx_f_9pywrapfst_19_MutableArcIterator_position(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
size_t __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_14position)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_16position)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3306, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3306, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3319, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3315
+ /* "pywrapfst.pyx":3328
* The iterator's position, expressed as an integer.
* """
* return self._aiter.get().Position() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3315, __pyx_L1_error)
+ __PYX_ERR(0, 3328, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Position();
goto __pyx_L0;
- /* "pywrapfst.pyx":3306
+ /* "pywrapfst.pyx":3319
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_14position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_13position[] = "\n position(self)\n\n Returns the position of the iterator.\n\n Returns:\n The iterator's position, expressed as an integer.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_14position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_16position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_15position[] = "\n position(self)\n\n Returns the position of the iterator.\n\n Returns:\n The iterator's position, expressed as an integer.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_16position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("position (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_13position(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_15position(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_13position(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_15position(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("position", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_18MutableArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3306, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_19_MutableArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.position", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3317
+/* "pywrapfst.pyx":3330
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
* reset(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_16reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_reset(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_18reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3330, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_16reset)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_18reset)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3330, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3323
+ /* "pywrapfst.pyx":3336
* Resets the iterator to the initial position.
* """
* self._aiter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3323, __pyx_L1_error)
+ __PYX_ERR(0, 3336, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Reset();
- /* "pywrapfst.pyx":3317
+ /* "pywrapfst.pyx":3330
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_16reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_15reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_16reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_18reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_17reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_18reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_15reset(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_17reset(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_15reset(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_17reset(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reset", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3330, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3325
+/* "pywrapfst.pyx":3338
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
* seek(self, a)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_18seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_seek(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_20seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, size_t __pyx_v_a, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3325, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_18seek)) {
- __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L1_error)
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_20seek)) {
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3338, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
__pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3325, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3334
+ /* "pywrapfst.pyx":3347
* a: The position to seek to.
* """
* self._aiter.get().Seek(a) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3334, __pyx_L1_error)
+ __PYX_ERR(0, 3347, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Seek(__pyx_v_a);
- /* "pywrapfst.pyx":3325
+ /* "pywrapfst.pyx":3338
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_18seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_17seek[] = "\n seek(self, a)\n\n Advance the iterator to a new position.\n\n Args:\n a: The position to seek to.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_18seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_20seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_19seek[] = "\n seek(self, a)\n\n Advance the iterator to a new position.\n\n Args:\n a: The position to seek to.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_20seek(PyObject *__pyx_v_self, PyObject *__pyx_arg_a) {
size_t __pyx_v_a;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("seek (wrapper)", 0);
assert(__pyx_arg_a); {
- __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L3_error)
+ __pyx_v_a = __Pyx_PyInt_As_size_t(__pyx_arg_a); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_17seek(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), ((size_t)__pyx_v_a));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_19seek(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self), ((size_t)__pyx_v_a));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_17seek(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, size_t __pyx_v_a) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_19seek(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, size_t __pyx_v_a) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("seek", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3325, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.seek", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3336
+/* "pywrapfst.pyx":3349
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint8 flags, uint8 mask): # <<<<<<<<<<<<<<
* set_flags(self, flags, mask)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_set_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_22set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags)) {
- __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_22set_flags)) {
+ __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
if (__pyx_t_6) {
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
#endif
}
- /* "pywrapfst.pyx":3346
+ /* "pywrapfst.pyx":3359
* mask: A mask to be applied to the `flags` argument before setting them.
* """
* self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3346, __pyx_L1_error)
+ __PYX_ERR(0, 3359, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask);
- /* "pywrapfst.pyx":3336
+ /* "pywrapfst.pyx":3349
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint8 flags, uint8 mask): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_8);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_19set_flags[] = "\n set_flags(self, flags, mask)\n\n Sets the current iterator behavioral flags.\n\n Args:\n flags: The properties to be set.\n mask: A mask to be applied to the `flags` argument before setting them.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_22set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_21set_flags[] = "\n set_flags(self, flags, mask)\n\n Sets the current iterator behavioral flags.\n\n Args:\n flags: The properties to be set.\n mask: A mask to be applied to the `flags` argument before setting them.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_22set_flags(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
uint8 __pyx_v_flags;
uint8 __pyx_v_mask;
int __pyx_lineno = 0;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3336, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3349, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3336, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3349, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
}
- __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
- __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
+ __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3349, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3349, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3336, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3349, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_19set_flags(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), __pyx_v_flags, __pyx_v_mask);
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_21set_flags(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self), __pyx_v_flags, __pyx_v_mask);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_19set_flags(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_21set_flags(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, uint8 __pyx_v_flags, uint8 __pyx_v_mask) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3336, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3348
+/* "pywrapfst.pyx":3361
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<<
* set_value(self, arc)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc); /*proto*/
-static void __pyx_f_9pywrapfst_18MutableArcIterator_set_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_24set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc); /*proto*/
+static void __pyx_f_9pywrapfst_19_MutableArcIterator_set_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_24set_value)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_arc)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_arc));
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3357
+ /* "pywrapfst.pyx":3370
* arc: The arc to replace the current arc with.
* """
* self._aiter.get().SetValue(deref(arc._arc)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3357, __pyx_L1_error)
+ __PYX_ERR(0, 3370, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc");
- __PYX_ERR(0, 3357, __pyx_L1_error)
+ __PYX_ERR(0, 3370, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetValue((*__pyx_v_arc->_arc));
- /* "pywrapfst.pyx":3348
+ /* "pywrapfst.pyx":3361
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.MutableArcIterator.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._MutableArcIterator.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_21set_value[] = "\n set_value(self, arc)\n\n Replace the current arc with a new arc.\n\n Args:\n arc: The arc to replace the current arc with.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_24set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_23set_value[] = "\n set_value(self, arc)\n\n Replace the current arc with a new arc.\n\n Args:\n arc: The arc to replace the current arc with.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_24set_value(PyObject *__pyx_v_self, PyObject *__pyx_v_arc) {
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_value (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3348, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_v_arc));
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3361, __pyx_L1_error)
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_23set_value(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_v_arc));
/* function exit code */
goto __pyx_L0;
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_21set_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_23set_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Arc *__pyx_v_arc) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("set_value", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_set_value(__pyx_v_self, __pyx_v_arc, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_19_MutableArcIterator_set_value(__pyx_v_self, __pyx_v_arc, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3361, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3359
+/* "pywrapfst.pyx":3372
* self._aiter.get().SetValue(deref(arc._arc))
*
* cpdef object value(self): # <<<<<<<<<<<<<<
* value(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_24value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_f_9pywrapfst_18MutableArcIterator_value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_26value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_f_9pywrapfst_19_MutableArcIterator_value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, int __pyx_skip_dispatch) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3359, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_18MutableArcIterator_24value)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_19_MutableArcIterator_26value)) {
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3359, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
#endif
}
- /* "pywrapfst.pyx":3365
+ /* "pywrapfst.pyx":3378
* Returns the current arc.
* """
* return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter");
- __PYX_ERR(0, 3365, __pyx_L1_error)
+ __PYX_ERR(0, 3378, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3365, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3378, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3359
+ /* "pywrapfst.pyx":3372
* self._aiter.get().SetValue(deref(arc._arc))
*
* cpdef object value(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_24value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_18MutableArcIterator_23value[] = "\n value(self)\n\n Returns the current arc.\n ";
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_24value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_26value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_19_MutableArcIterator_25value[] = "\n value(self)\n\n Returns the current arc.\n ";
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_26value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("value (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_23value(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_25value(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_23value(struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_25value(struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("value", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_18MutableArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3359, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_19_MutableArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_28__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_28__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_25__reduce_cython__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_27__reduce_cython__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_27__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_18MutableArcIterator_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_30__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_19_MutableArcIterator_30__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_27__setstate_cython__(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+ __pyx_r = __pyx_pf_9pywrapfst_19_MutableArcIterator_29__setstate_cython__(((struct __pyx_obj_9pywrapfst__MutableArcIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_18MutableArcIterator_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_MutableArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pf_9pywrapfst_19_MutableArcIterator_29__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__MutableArcIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.MutableArcIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._MutableArcIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":3379
+/* "pywrapfst.pyx":3392
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<StateIterator at 0x{id(self):x}>"
+ * return f"<_StateIterator at 0x{id(self):x}>"
*
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_1__repr__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_1__repr__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_1__repr__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator___repr__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator___repr__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator___repr__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator___repr__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":3380
+ /* "pywrapfst.pyx":3393
*
* def __repr__(self):
- * return f"<StateIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
+ * return f"<_StateIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<<
*
* def __init__(self, Fst ifst):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3393, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
__Pyx_INCREF(__pyx_kp_u_StateIterator_at_0x);
- __pyx_t_2 += 20;
+ __pyx_t_2 += 21;
__Pyx_GIVEREF(__pyx_kp_u_StateIterator_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_StateIterator_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3393, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3393, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3393, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3379
+ /* "pywrapfst.pyx":3392
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
- * return f"<StateIterator at 0x{id(self):x}>"
+ * return f"<_StateIterator at 0x{id(self):x}>"
*
*/
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_AddTraceback("pywrapfst.StateIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3382
- * return f"<StateIterator at 0x{id(self):x}>"
+/* "pywrapfst.pyx":3395
+ * return f"<_StateIterator at 0x{id(self):x}>"
*
* def __init__(self, Fst ifst): # <<<<<<<<<<<<<<
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
*/
/* Python wrapper */
-static int __pyx_pw_9pywrapfst_13StateIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_9pywrapfst_13StateIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_9pywrapfst_14_StateIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_9pywrapfst_14_StateIterator_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3382, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3395, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3382, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3395, __pyx_L3_error)
__pyx_L3_error:;
- __Pyx_AddTraceback("pywrapfst.StateIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3382, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_2__init__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self), __pyx_v_ifst);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3395, __pyx_L1_error)
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_2__init__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self), __pyx_v_ifst);
/* function exit code */
goto __pyx_L0;
return __pyx_r;
}
-static int __pyx_pf_9pywrapfst_13StateIterator_2__init__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst) {
+static int __pyx_pf_9pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst) {
int __pyx_r;
__Pyx_RefNannyDeclarations
std::shared_ptr<fst::script::FstClass> __pyx_t_1;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":3384
+ /* "pywrapfst.pyx":3397
* def __init__(self, Fst ifst):
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._fst = ifst._fst # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3384, __pyx_L1_error)
+ __PYX_ERR(0, 3397, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_ifst->_fst;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3384, __pyx_L1_error)
+ __PYX_ERR(0, 3397, __pyx_L1_error)
}
__pyx_v_self->_fst = __pyx_t_1;
- /* "pywrapfst.pyx":3385
+ /* "pywrapfst.pyx":3398
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
* self._fst = ifst._fst
* self._siter.reset(new fst.StateIteratorClass(deref(self._fst))) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 3385, __pyx_L1_error)
+ __PYX_ERR(0, 3398, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3385, __pyx_L1_error)
+ __PYX_ERR(0, 3398, __pyx_L1_error)
}
__pyx_v_self->_siter.reset(new fst::script::StateIteratorClass((*__pyx_v_self->_fst)));
- /* "pywrapfst.pyx":3382
- * return f"<StateIterator at 0x{id(self):x}>"
+ /* "pywrapfst.pyx":3395
+ * return f"<_StateIterator at 0x{id(self):x}>"
*
* def __init__(self, Fst ifst): # <<<<<<<<<<<<<<
* # Makes copy of the shared_ptr, potentially extending the FST's lifetime.
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_AddTraceback("pywrapfst.StateIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":3388
+/* "pywrapfst.pyx":3401
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_5__iter__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_5__iter__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_4__iter__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_4__iter__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_4__iter__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_4__iter__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":3389
+ /* "pywrapfst.pyx":3402
* # This just registers this class as a possible iterator.
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":3388
+ /* "pywrapfst.pyx":3401
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3392
+/* "pywrapfst.pyx":3405
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_7__next__(PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_7__next__(PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_6__next__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_6__next__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_6__next__(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_6__next__(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
int64 __pyx_v_result;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":3393
+ /* "pywrapfst.pyx":3406
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done");
- __PYX_ERR(0, 3393, __pyx_L1_error)
+ __PYX_ERR(0, 3406, __pyx_L1_error)
}
- __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
+ __pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":3394
+ /* "pywrapfst.pyx":3407
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* self.next()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 3394, __pyx_L1_error)
+ __PYX_ERR(0, 3407, __pyx_L1_error)
- /* "pywrapfst.pyx":3393
+ /* "pywrapfst.pyx":3406
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3395
+ /* "pywrapfst.pyx":3408
* if self.done():
* raise StopIteration
* cdef int64 result = self.value() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "value");
- __PYX_ERR(0, 3395, __pyx_L1_error)
+ __PYX_ERR(0, 3408, __pyx_L1_error)
}
- __pyx_v_result = ((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0);
+ __pyx_v_result = ((struct __pyx_vtabstruct_9pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3396
+ /* "pywrapfst.pyx":3409
* raise StopIteration
* cdef int64 result = self.value()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next");
- __PYX_ERR(0, 3396, __pyx_L1_error)
+ __PYX_ERR(0, 3409, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
+ ((struct __pyx_vtabstruct_9pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3397
+ /* "pywrapfst.pyx":3410
* cdef int64 result = self.value()
* self.next()
* return result # <<<<<<<<<<<<<<
* cpdef bool done(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3397, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3410, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3392
+ /* "pywrapfst.pyx":3405
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
- __Pyx_AddTraceback("pywrapfst.StateIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3399
+/* "pywrapfst.pyx":3412
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
* done(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static bool __pyx_f_9pywrapfst_13StateIterator_done(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static bool __pyx_f_9pywrapfst_14_StateIterator_done(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
bool __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3399, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3412, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_9done)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_14_StateIterator_9done)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3399, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3412, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3399, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3412, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3408
+ /* "pywrapfst.pyx":3421
* True if the iterator is exhausted, False otherwise.
* """
* return self._siter.get().Done() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 3408, __pyx_L1_error)
+ __PYX_ERR(0, 3421, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_siter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":3399
+ /* "pywrapfst.pyx":3412
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.StateIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._StateIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_13StateIterator_8done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_14_StateIterator_8done[] = "\n done(self)\n\n Indicates whether the iterator is exhausted or not.\n\n Returns:\n True if the iterator is exhausted, False otherwise.\n ";
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_9done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("done (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_8done(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_8done(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_8done(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_8done(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("done", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_13StateIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3399, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_14_StateIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3412, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.done", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3410
+/* "pywrapfst.pyx":3423
* return self._siter.get().Done()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
* next(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_13StateIterator_next(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_14_StateIterator_next(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3410, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_11next)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_14_StateIterator_11next)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3410, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3416
+ /* "pywrapfst.pyx":3429
* Advances the iterator.
* """
* self._siter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 3416, __pyx_L1_error)
+ __PYX_ERR(0, 3429, __pyx_L1_error)
}
__pyx_v_self->_siter.get()->Next();
- /* "pywrapfst.pyx":3410
+ /* "pywrapfst.pyx":3423
* return self._siter.get().Done()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.StateIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._StateIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_13StateIterator_10next[] = "\n next(self)\n\n Advances the iterator.\n ";
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_14_StateIterator_10next[] = "\n next(self)\n\n Advances the iterator.\n ";
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_11next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("next (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_10next(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_10next(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_10next(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_10next(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("next", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3410, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_14_StateIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3418
+/* "pywrapfst.pyx":3431
* self._siter.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
* reset(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static void __pyx_f_9pywrapfst_13StateIterator_reset(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static void __pyx_f_9pywrapfst_14_StateIterator_reset(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3418, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3431, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_13reset)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_14_StateIterator_13reset)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3418, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3431, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":3424
+ /* "pywrapfst.pyx":3437
* Resets the iterator to the initial position.
* """
* self._siter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 3424, __pyx_L1_error)
+ __PYX_ERR(0, 3437, __pyx_L1_error)
}
__pyx_v_self->_siter.get()->Reset();
- /* "pywrapfst.pyx":3418
+ /* "pywrapfst.pyx":3431
* self._siter.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.StateIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._StateIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_13StateIterator_12reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_14_StateIterator_12reset[] = "\n reset(self)\n\n Resets the iterator to the initial position.\n ";
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reset (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_12reset(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_12reset(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_12reset(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_12reset(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reset", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3418, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_14_StateIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3431, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
return __pyx_r;
}
-/* "pywrapfst.pyx":3426
+/* "pywrapfst.pyx":3439
* self._siter.get().Reset()
*
* cpdef int64 value(self): # <<<<<<<<<<<<<<
* value(self)
*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static int64 __pyx_f_9pywrapfst_13StateIterator_value(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static int64 __pyx_f_9pywrapfst_14_StateIterator_value(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, int __pyx_skip_dispatch) {
int64 __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3426, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3439, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_13StateIterator_15value)) {
+ if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_14_StateIterator_15value)) {
__Pyx_INCREF(__pyx_t_1);
__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3426, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3439, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3426, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3439, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":3432
+ /* "pywrapfst.pyx":3445
* Returns the current state index.
* """
* return self._siter.get().Value() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter");
- __PYX_ERR(0, 3432, __pyx_L1_error)
+ __PYX_ERR(0, 3445, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_siter.get()->Value();
goto __pyx_L0;
- /* "pywrapfst.pyx":3426
+ /* "pywrapfst.pyx":3439
* self._siter.get().Reset()
*
* cpdef int64 value(self): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_WriteUnraisable("pywrapfst.StateIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __Pyx_WriteUnraisable("pywrapfst._StateIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static char __pyx_doc_9pywrapfst_13StateIterator_14value[] = "\n value(self)\n\n Returns the current state index.\n ";
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_9pywrapfst_14_StateIterator_14value[] = "\n value(self)\n\n Returns the current state index.\n ";
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_15value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("value (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_14value(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_14value(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_14value(struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_14value(struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("value", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_13StateIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3426, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_14_StateIterator_value(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3439, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_16__reduce_cython__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_16__reduce_cython__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
*/
/* Python wrapper */
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-static PyObject *__pyx_pw_9pywrapfst_13StateIterator_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_9pywrapfst_14_StateIterator_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
- __pyx_r = __pyx_pf_9pywrapfst_13StateIterator_18__setstate_cython__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+ __pyx_r = __pyx_pf_9pywrapfst_14_StateIterator_18__setstate_cython__(((struct __pyx_obj_9pywrapfst__StateIterator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_13StateIterator_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst_StateIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+static PyObject *__pyx_pf_9pywrapfst_14_StateIterator_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9pywrapfst__StateIterator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("pywrapfst.StateIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("pywrapfst._StateIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "pywrapfst.pyx":3438
+/* "pywrapfst.pyx":3451
*
*
* cdef Fst _map(Fst ifst, # <<<<<<<<<<<<<<
PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_u_identity);
double __pyx_v_power = ((double)1.);
- /* "pywrapfst.pyx":3442
+ /* "pywrapfst.pyx":3455
* map_type="identity",
* double power=1.,
* weight=None): # <<<<<<<<<<<<<<
* if not fst.GetMapType(tostring(map_type), addr(_map_type)):
*/
PyObject *__pyx_v_weight = ((PyObject *)Py_None);
- enum fst::script::MapType __pyx_v__map_type;
+ fst::script::MapType __pyx_v__map_type;
fst::script::WeightClass __pyx_v__weight;
struct __pyx_obj_9pywrapfst_Fst *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
}
}
- /* "pywrapfst.pyx":3444
+ /* "pywrapfst.pyx":3457
* weight=None):
* cdef fst.MapType _map_type
* if not fst.GetMapType(tostring(map_type), addr(_map_type)): # <<<<<<<<<<<<<<
* raise FstArgError(f"Unknown map type: {map_type!r}")
* cdef fst.WeightClass _weight
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3444, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3457, __pyx_L1_error)
__pyx_t_2 = ((!(fst::script::GetMapType(__pyx_t_1, (&__pyx_v__map_type)) != 0)) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":3445
+ /* "pywrapfst.pyx":3458
* cdef fst.MapType _map_type
* if not fst.GetMapType(tostring(map_type), addr(_map_type)):
* raise FstArgError(f"Unknown map type: {map_type!r}") # <<<<<<<<<<<<<<
* cdef fst.WeightClass _weight
- * if _map_type == fst.TIMES_MAPPER:
+ * if _map_type == fst.MapType.TIMES_MAPPER:
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3458, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_map_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3445, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_map_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3458, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_map_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3445, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_map_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3458, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3445, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3458, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3445, __pyx_L1_error)
+ __PYX_ERR(0, 3458, __pyx_L1_error)
- /* "pywrapfst.pyx":3444
+ /* "pywrapfst.pyx":3457
* weight=None):
* cdef fst.MapType _map_type
* if not fst.GetMapType(tostring(map_type), addr(_map_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3447
+ /* "pywrapfst.pyx":3460
* raise FstArgError(f"Unknown map type: {map_type!r}")
* cdef fst.WeightClass _weight
- * if _map_type == fst.TIMES_MAPPER: # <<<<<<<<<<<<<<
+ * if _map_type == fst.MapType.TIMES_MAPPER: # <<<<<<<<<<<<<<
* _weight = _get_WeightClass_or_one(ifst.weight_type(), weight)
* else:
*/
- __pyx_t_2 = ((__pyx_v__map_type == fst::script::TIMES_MAPPER) != 0);
+ __pyx_t_2 = ((__pyx_v__map_type == fst::script::MapType::TIMES) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":3448
+ /* "pywrapfst.pyx":3461
* cdef fst.WeightClass _weight
- * if _map_type == fst.TIMES_MAPPER:
+ * if _map_type == fst.MapType.TIMES_MAPPER:
* _weight = _get_WeightClass_or_one(ifst.weight_type(), weight) # <<<<<<<<<<<<<<
* else:
* _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight)
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 3448, __pyx_L1_error)
+ __PYX_ERR(0, 3461, __pyx_L1_error)
}
- __pyx_t_7 = __pyx_f_9pywrapfst__get_WeightClass_or_one(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3448, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_9pywrapfst__get_WeightClass_or_one(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3461, __pyx_L1_error)
__pyx_v__weight = __pyx_t_7;
- /* "pywrapfst.pyx":3447
+ /* "pywrapfst.pyx":3460
* raise FstArgError(f"Unknown map type: {map_type!r}")
* cdef fst.WeightClass _weight
- * if _map_type == fst.TIMES_MAPPER: # <<<<<<<<<<<<<<
+ * if _map_type == fst.MapType.TIMES_MAPPER: # <<<<<<<<<<<<<<
* _weight = _get_WeightClass_or_one(ifst.weight_type(), weight)
* else:
*/
goto __pyx_L4;
}
- /* "pywrapfst.pyx":3450
+ /* "pywrapfst.pyx":3463
* _weight = _get_WeightClass_or_one(ifst.weight_type(), weight)
* else:
* _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight) # <<<<<<<<<<<<<<
- * return _init_XFst(fst.Map(deref(ifst._fst), _map_type, delta, power, _weight))
- *
+ * return _init_XFst(
+ * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release())
*/
/*else*/ {
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 3450, __pyx_L1_error)
+ __PYX_ERR(0, 3463, __pyx_L1_error)
}
- __pyx_t_7 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3450, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3463, __pyx_L1_error)
__pyx_v__weight = __pyx_t_7;
}
__pyx_L4:;
- /* "pywrapfst.pyx":3451
+ /* "pywrapfst.pyx":3464
* else:
* _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight)
- * return _init_XFst(fst.Map(deref(ifst._fst), _map_type, delta, power, _weight)) # <<<<<<<<<<<<<<
- *
+ * return _init_XFst( # <<<<<<<<<<<<<<
+ * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release())
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
+
+ /* "pywrapfst.pyx":3465
+ * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight)
+ * return _init_XFst(
+ * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release()) # <<<<<<<<<<<<<<
+ *
+ *
+ */
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3451, __pyx_L1_error)
+ __PYX_ERR(0, 3465, __pyx_L1_error)
}
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v__map_type, __pyx_v_delta, __pyx_v_power, __pyx_v__weight))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3451, __pyx_L1_error)
+
+ /* "pywrapfst.pyx":3464
+ * else:
+ * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight)
+ * return _init_XFst( # <<<<<<<<<<<<<<
+ * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release())
+ *
+ */
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v__map_type, __pyx_v_delta, __pyx_v_power, __pyx_v__weight).release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3464, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3438
+ /* "pywrapfst.pyx":3451
*
*
* cdef Fst _map(Fst ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3454
+/* "pywrapfst.pyx":3468
*
*
* cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<<
PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_u_identity);
double __pyx_v_power = ((double)1.);
- /* "pywrapfst.pyx":3458
+ /* "pywrapfst.pyx":3472
* map_type="identity",
* double power=1.,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3498
+ /* "pywrapfst.pyx":3512
* FstArgError: Unknown map type.
* """
* return _map(ifst, delta, map_type, power, weight) # <<<<<<<<<<<<<<
__pyx_t_2.map_type = __pyx_v_map_type;
__pyx_t_2.power = __pyx_v_power;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3512, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3454
+ /* "pywrapfst.pyx":3468
*
*
* cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[5] = {0,0,0,0,0};
values[2] = ((PyObject *)__pyx_n_u_identity);
- /* "pywrapfst.pyx":3458
+ /* "pywrapfst.pyx":3472
* map_type="identity",
* double power=1.,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3454, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3468, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3455, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3469, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__33;
}
__pyx_v_map_type = values[2];
if (values[3]) {
- __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3457, __pyx_L3_error)
+ __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3471, __pyx_L3_error)
} else {
__pyx_v_power = ((double)1.);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3454, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3468, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.arcmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3454, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3468, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_20arcmap(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_map_type, __pyx_v_power, __pyx_v_weight);
- /* "pywrapfst.pyx":3454
+ /* "pywrapfst.pyx":3468
*
*
* cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.map_type = __pyx_v_map_type;
__pyx_t_2.power = __pyx_v_power;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3454, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3501
+/* "pywrapfst.pyx":3515
*
*
* cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<<
static struct __pyx_obj_9pywrapfst_MutableFst *__pyx_f_9pywrapfst_compose(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_compose *__pyx_optional_args) {
PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":3504
+ /* "pywrapfst.pyx":3518
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3528
+ /* "pywrapfst.pyx":3542
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3528, __pyx_L1_error)
+ __PYX_ERR(0, 3542, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0)));
- /* "pywrapfst.pyx":3532
+ /* "pywrapfst.pyx":3546
* _opts.reset(
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<<
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release())
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3532, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3532, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L1_error)
- /* "pywrapfst.pyx":3530
+ /* "pywrapfst.pyx":3544
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type()))
* cdef unique_ptr[fst.ComposeOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3533
+ /* "pywrapfst.pyx":3547
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter))))
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3533, __pyx_L1_error)
+ __PYX_ERR(0, 3547, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3533, __pyx_L1_error)
+ __PYX_ERR(0, 3547, __pyx_L1_error)
}
fst::script::Compose((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":3534
+ /* "pywrapfst.pyx":3548
* _get_compose_filter(tostring(compose_filter))))
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3534, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3501
+ /* "pywrapfst.pyx":3515
*
*
* cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3501, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3515, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3501, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3515, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
__pyx_v_compose_filter = values[2];
if (values[3]) {
- __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3504, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3518, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3504
+ /* "pywrapfst.pyx":3518
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3501, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3515, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.compose", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3501, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3502, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3515, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3516, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_22compose(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect);
- /* "pywrapfst.pyx":3501
+ /* "pywrapfst.pyx":3515
*
*
* cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.compose_filter = __pyx_v_compose_filter;
__pyx_t_2.connect = __pyx_v_connect;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3501, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3515, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3537
+/* "pywrapfst.pyx":3551
*
*
* cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3554
+ /* "pywrapfst.pyx":3568
* FstOpError: Conversion failed.
* """
* cdef string _fst_type = tostring(fst_type) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.FstClass] _tfst
- * _tfst.reset(fst.Convert(deref(ifst._fst), _fst_type))
+ * _tfst = fst.Convert(deref(ifst._fst), _fst_type)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3554, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3568, __pyx_L1_error)
__pyx_v__fst_type = __pyx_t_1;
- /* "pywrapfst.pyx":3556
+ /* "pywrapfst.pyx":3570
* cdef string _fst_type = tostring(fst_type)
* cdef unique_ptr[fst.FstClass] _tfst
- * _tfst.reset(fst.Convert(deref(ifst._fst), _fst_type)) # <<<<<<<<<<<<<<
+ * _tfst = fst.Convert(deref(ifst._fst), _fst_type) # <<<<<<<<<<<<<<
* # Script-land Convert returns a null pointer to signal failure.
* if _tfst.get() == NULL:
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3556, __pyx_L1_error)
+ __PYX_ERR(0, 3570, __pyx_L1_error)
}
- __pyx_v__tfst.reset(fst::script::Convert((*__pyx_v_ifst->_fst), __pyx_v__fst_type));
+ __pyx_v__tfst = fst::script::Convert((*__pyx_v_ifst->_fst), __pyx_v__fst_type);
- /* "pywrapfst.pyx":3558
- * _tfst.reset(fst.Convert(deref(ifst._fst), _fst_type))
+ /* "pywrapfst.pyx":3572
+ * _tfst = fst.Convert(deref(ifst._fst), _fst_type)
* # Script-land Convert returns a null pointer to signal failure.
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
* raise FstOpError(f"Conversion to {fst_type!r} failed")
__pyx_t_2 = ((__pyx_v__tfst.get() == NULL) != 0);
if (unlikely(__pyx_t_2)) {
- /* "pywrapfst.pyx":3559
+ /* "pywrapfst.pyx":3573
* # Script-land Convert returns a null pointer to signal failure.
* if _tfst.get() == NULL:
* raise FstOpError(f"Conversion to {fst_type!r} failed") # <<<<<<<<<<<<<<
* return _init_XFst(_tfst.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3559, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3559, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = 0;
__pyx_t_7 = 127;
__pyx_t_6 += 14;
__Pyx_GIVEREF(__pyx_kp_u_Conversion_to);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Conversion_to);
- __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_fst_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3559, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_fst_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
__pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
__pyx_t_6 += 7;
__Pyx_GIVEREF(__pyx_kp_u_failed);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_failed);
- __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3559, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
__pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3559, __pyx_L1_error)
+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3573, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3559, __pyx_L1_error)
+ __PYX_ERR(0, 3573, __pyx_L1_error)
- /* "pywrapfst.pyx":3558
- * _tfst.reset(fst.Convert(deref(ifst._fst), _fst_type))
+ /* "pywrapfst.pyx":3572
+ * _tfst = fst.Convert(deref(ifst._fst), _fst_type)
* # Script-land Convert returns a null pointer to signal failure.
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
* raise FstOpError(f"Conversion to {fst_type!r} failed")
*/
}
- /* "pywrapfst.pyx":3560
+ /* "pywrapfst.pyx":3574
* if _tfst.get() == NULL:
* raise FstOpError(f"Conversion to {fst_type!r} failed")
* return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3560, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3574, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3537
+ /* "pywrapfst.pyx":3551
*
*
* cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3537, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3551, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3537, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3551, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.convert", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3537, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3551, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_24convert(__pyx_self, __pyx_v_ifst, __pyx_v_fst_type);
/* function exit code */
__Pyx_XDECREF(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.fst_type = __pyx_v_fst_type;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3537, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3551, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3563
+/* "pywrapfst.pyx":3577
*
*
* cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<<
int64 __pyx_v_nstate = __pyx_k__35;
int64 __pyx_v_subsequential_label = ((int64)0);
- /* "pywrapfst.pyx":3568
+ /* "pywrapfst.pyx":3582
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None, # <<<<<<<<<<<<<<
*/
PyObject *__pyx_v_weight = ((PyObject *)Py_None);
- /* "pywrapfst.pyx":3569
+ /* "pywrapfst.pyx":3583
* int64 subsequential_label=0,
* weight=None,
* bool increment_subsequential_label=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3603
+ /* "pywrapfst.pyx":3617
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3603, __pyx_L1_error)
+ __PYX_ERR(0, 3617, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":3605
+ /* "pywrapfst.pyx":3619
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 3605, __pyx_L1_error)
+ __PYX_ERR(0, 3619, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3606
+ /* "pywrapfst.pyx":3620
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)):
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3605, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3619, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":3608
+ /* "pywrapfst.pyx":3622
* weight)
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): # <<<<<<<<<<<<<<
* raise FstArgError(f"Unknown determinization type: {det_type!r}")
* cdef unique_ptr[fst.DeterminizeOptions] _opts
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3608, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L1_error)
__pyx_t_3 = ((!(fst::script::GetDeterminizeType(__pyx_t_2, (&__pyx_v__det_type)) != 0)) != 0);
if (unlikely(__pyx_t_3)) {
- /* "pywrapfst.pyx":3609
+ /* "pywrapfst.pyx":3623
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)):
* raise FstArgError(f"Unknown determinization type: {det_type!r}") # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.DeterminizeOptions] _opts
* _opts.reset(
*/
- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3609, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3623, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_det_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3609, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_det_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3623, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3609, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3623, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = NULL;
__pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3609, __pyx_L1_error)
+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3623, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 3609, __pyx_L1_error)
+ __PYX_ERR(0, 3623, __pyx_L1_error)
- /* "pywrapfst.pyx":3608
+ /* "pywrapfst.pyx":3622
* weight)
* cdef fst.DeterminizeType _det_type
* if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3611
+ /* "pywrapfst.pyx":3625
* raise FstArgError(f"Unknown determinization type: {det_type!r}")
* cdef unique_ptr[fst.DeterminizeOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::script::DeterminizeOptions(__pyx_v_delta, __pyx_v__weight, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v__det_type, __pyx_v_increment_subsequential_label));
- /* "pywrapfst.pyx":3618
+ /* "pywrapfst.pyx":3632
* _det_type,
* increment_subsequential_label))
* fst.Determinize(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3618, __pyx_L1_error)
+ __PYX_ERR(0, 3632, __pyx_L1_error)
}
fst::script::Determinize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":3619
+ /* "pywrapfst.pyx":3633
* increment_subsequential_label))
* fst.Determinize(deref(ifst._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3619, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3633, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3563
+ /* "pywrapfst.pyx":3577
*
*
* cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[7] = {0,0,0,0,0,0,0};
values[2] = ((PyObject *)__pyx_n_u_functional);
- /* "pywrapfst.pyx":3568
+ /* "pywrapfst.pyx":3582
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "determinize") < 0)) __PYX_ERR(0, 3563, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "determinize") < 0)) __PYX_ERR(0, 3577, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3564, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3578, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__34;
}
__pyx_v_det_type = values[2];
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3566, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3580, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__35;
}
if (values[4]) {
- __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3567, __pyx_L3_error)
+ __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3581, __pyx_L3_error)
} else {
__pyx_v_subsequential_label = ((int64)0);
}
__pyx_v_weight = values[5];
if (values[6]) {
- __pyx_v_increment_subsequential_label = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_increment_subsequential_label == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3569, __pyx_L3_error)
+ __pyx_v_increment_subsequential_label = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_increment_subsequential_label == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3583, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3569
+ /* "pywrapfst.pyx":3583
* int64 subsequential_label=0,
* weight=None,
* bool increment_subsequential_label=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3563, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3577, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.determinize", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3563, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_26determinize(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_det_type, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight, __pyx_v_increment_subsequential_label);
- /* "pywrapfst.pyx":3563
+ /* "pywrapfst.pyx":3577
*
*
* cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.subsequential_label = __pyx_v_subsequential_label;
__pyx_t_2.weight = __pyx_v_weight;
__pyx_t_2.increment_subsequential_label = __pyx_v_increment_subsequential_label;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3563, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3577, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3622
+/* "pywrapfst.pyx":3636
*
*
* cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<<
static struct __pyx_obj_9pywrapfst_MutableFst *__pyx_f_9pywrapfst_difference(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_difference *__pyx_optional_args) {
PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":3625
+ /* "pywrapfst.pyx":3639
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3650
+ /* "pywrapfst.pyx":3664
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3650, __pyx_L1_error)
+ __PYX_ERR(0, 3664, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0)));
- /* "pywrapfst.pyx":3654
+ /* "pywrapfst.pyx":3668
* _opts.reset(
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<<
* fst.Difference(deref(ifst1._fst),
* deref(ifst2._fst),
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3668, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3668, __pyx_L1_error)
- /* "pywrapfst.pyx":3652
+ /* "pywrapfst.pyx":3666
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type()))
* cdef unique_ptr[fst.ComposeOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3655
+ /* "pywrapfst.pyx":3669
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter))))
* fst.Difference(deref(ifst1._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3655, __pyx_L1_error)
+ __PYX_ERR(0, 3669, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3656
+ /* "pywrapfst.pyx":3670
* _get_compose_filter(tostring(compose_filter))))
* fst.Difference(deref(ifst1._fst),
* deref(ifst2._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3656, __pyx_L1_error)
+ __PYX_ERR(0, 3670, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3655
+ /* "pywrapfst.pyx":3669
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter))))
* fst.Difference(deref(ifst1._fst), # <<<<<<<<<<<<<<
*/
fst::script::Difference((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":3659
+ /* "pywrapfst.pyx":3673
* _tfst.get(),
* deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3659, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3673, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3622
+ /* "pywrapfst.pyx":3636
*
*
* cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3622, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3636, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3622, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3636, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
__pyx_v_compose_filter = values[2];
if (values[3]) {
- __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3625, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3639, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3625
+ /* "pywrapfst.pyx":3639
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3622, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3636, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.difference", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3622, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3623, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3636, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3637, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_28difference(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect);
- /* "pywrapfst.pyx":3622
+ /* "pywrapfst.pyx":3636
*
*
* cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.compose_filter = __pyx_v_compose_filter;
__pyx_t_2.connect = __pyx_v_connect;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3622, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3636, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3662
+/* "pywrapfst.pyx":3676
*
*
* cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<<
int64 __pyx_v_nstate = __pyx_k__37;
int64 __pyx_v_subsequential_label = ((int64)0);
- /* "pywrapfst.pyx":3666
+ /* "pywrapfst.pyx":3680
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3691
+ /* "pywrapfst.pyx":3705
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3691, __pyx_L1_error)
+ __PYX_ERR(0, 3705, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":3693
+ /* "pywrapfst.pyx":3707
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 3693, __pyx_L1_error)
+ __PYX_ERR(0, 3707, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3694
+ /* "pywrapfst.pyx":3708
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.DisambiguateOptions] _opts
* _opts.reset(
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3693, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3707, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":3696
+ /* "pywrapfst.pyx":3710
* weight)
* cdef unique_ptr[fst.DisambiguateOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::script::DisambiguateOptions(__pyx_v_delta, __pyx_v__weight, __pyx_v_nstate, __pyx_v_subsequential_label));
- /* "pywrapfst.pyx":3701
+ /* "pywrapfst.pyx":3715
* nstate,
* subsequential_label))
* fst.Disambiguate(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3701, __pyx_L1_error)
+ __PYX_ERR(0, 3715, __pyx_L1_error)
}
fst::script::Disambiguate((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":3702
+ /* "pywrapfst.pyx":3716
* subsequential_label))
* fst.Disambiguate(deref(ifst._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3702, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3716, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3662
+ /* "pywrapfst.pyx":3676
*
*
* cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_subsequential_label,&__pyx_n_s_weight,0};
PyObject* values[5] = {0,0,0,0,0};
- /* "pywrapfst.pyx":3666
+ /* "pywrapfst.pyx":3680
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3662, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3676, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3663, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3677, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__36;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3664, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__37;
}
if (values[3]) {
- __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3665, __pyx_L3_error)
+ __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3679, __pyx_L3_error)
} else {
__pyx_v_subsequential_label = ((int64)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3662, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3676, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.disambiguate", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3662, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3676, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_30disambiguate(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight);
- /* "pywrapfst.pyx":3662
+ /* "pywrapfst.pyx":3676
*
*
* cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.nstate = __pyx_v_nstate;
__pyx_t_2.subsequential_label = __pyx_v_subsequential_label;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3662, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3676, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3705
+/* "pywrapfst.pyx":3719
*
*
* cpdef MutableFst epsnormalize(Fst ifst, bool eps_norm_output=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3726
+ /* "pywrapfst.pyx":3740
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3726, __pyx_L1_error)
+ __PYX_ERR(0, 3740, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":3728
+ /* "pywrapfst.pyx":3742
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.EpsNormalize(
* deref(ifst._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3728, __pyx_L1_error)
+ __PYX_ERR(0, 3742, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3730
+ /* "pywrapfst.pyx":3744
* deref(ifst._fst),
* _tfst.get(),
* fst.EPS_NORM_OUTPUT if eps_norm_output else fst.EPS_NORM_INPUT) # <<<<<<<<<<<<<<
__pyx_t_1 = fst::EPS_NORM_INPUT;
}
- /* "pywrapfst.pyx":3727
+ /* "pywrapfst.pyx":3741
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.EpsNormalize( # <<<<<<<<<<<<<<
*/
fst::script::EpsNormalize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_t_1);
- /* "pywrapfst.pyx":3731
+ /* "pywrapfst.pyx":3745
* _tfst.get(),
* fst.EPS_NORM_OUTPUT if eps_norm_output else fst.EPS_NORM_INPUT)
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3731, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3745, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3705
+ /* "pywrapfst.pyx":3719
*
*
* cpdef MutableFst epsnormalize(Fst ifst, bool eps_norm_output=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3705, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3719, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_eps_norm_output = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_eps_norm_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3705, __pyx_L3_error)
+ __pyx_v_eps_norm_output = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_eps_norm_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3719, __pyx_L3_error)
} else {
__pyx_v_eps_norm_output = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3705, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3719, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.epsnormalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3705, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3719, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_32epsnormalize(__pyx_self, __pyx_v_ifst, __pyx_v_eps_norm_output);
/* function exit code */
__Pyx_XDECREF(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.eps_norm_output = __pyx_v_eps_norm_output;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3705, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3719, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3734
+/* "pywrapfst.pyx":3748
*
*
* cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3752
+ /* "pywrapfst.pyx":3766
* True if the FSTs satisfy the above condition, else False.
* """
* return fst.Equal(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3752, __pyx_L1_error)
+ __PYX_ERR(0, 3766, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3752, __pyx_L1_error)
+ __PYX_ERR(0, 3766, __pyx_L1_error)
}
__pyx_r = fst::script::Equal((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta);
goto __pyx_L0;
- /* "pywrapfst.pyx":3734
+ /* "pywrapfst.pyx":3748
*
*
* cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3734, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3748, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3734, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3748, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
if (values[2]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3734, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3748, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__38;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3734, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3748, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3734, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3734, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3748, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3748, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_34equal(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta);
/* function exit code */
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_1 = __pyx_f_9pywrapfst_equal(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2);
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3734, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3755
+/* "pywrapfst.pyx":3769
*
*
* cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3773
+ /* "pywrapfst.pyx":3787
* True if the FSTs satisfy the above condition, else False.
* """
* return fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3773, __pyx_L1_error)
+ __PYX_ERR(0, 3787, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3773, __pyx_L1_error)
+ __PYX_ERR(0, 3787, __pyx_L1_error)
}
__pyx_r = fst::script::Equivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta);
goto __pyx_L0;
- /* "pywrapfst.pyx":3755
+ /* "pywrapfst.pyx":3769
*
*
* cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3755, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3769, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3755, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3769, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
if (values[2]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3755, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3769, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__39;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3755, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3769, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.equivalent", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3755, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3755, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3769, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3769, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_36equivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta);
/* function exit code */
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_1 = __pyx_f_9pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2);
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3755, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3776
+/* "pywrapfst.pyx":3790
*
*
* cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<<
static struct __pyx_obj_9pywrapfst_MutableFst *__pyx_f_9pywrapfst_intersect(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_intersect *__pyx_optional_args) {
PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":3779
+ /* "pywrapfst.pyx":3793
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3802
+ /* "pywrapfst.pyx":3816
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3802, __pyx_L1_error)
+ __PYX_ERR(0, 3816, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0)));
- /* "pywrapfst.pyx":3806
+ /* "pywrapfst.pyx":3820
* _opts.reset(
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<<
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release())
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3806, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3806, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3820, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3820, __pyx_L1_error)
- /* "pywrapfst.pyx":3804
+ /* "pywrapfst.pyx":3818
* _tfst.reset(new fst.VectorFstClass(ifst1.arc_type()))
* cdef unique_ptr[fst.ComposeOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3807
+ /* "pywrapfst.pyx":3821
* new fst.ComposeOptions(connect,
* _get_compose_filter(tostring(compose_filter))))
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3807, __pyx_L1_error)
+ __PYX_ERR(0, 3821, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3807, __pyx_L1_error)
+ __PYX_ERR(0, 3821, __pyx_L1_error)
}
fst::script::Intersect((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":3808
+ /* "pywrapfst.pyx":3822
* _get_compose_filter(tostring(compose_filter))))
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3808, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3822, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3776
+ /* "pywrapfst.pyx":3790
*
*
* cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3776, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3790, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3776, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3790, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
__pyx_v_compose_filter = values[2];
if (values[3]) {
- __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3779, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3793, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3779
+ /* "pywrapfst.pyx":3793
* Fst ifst2,
* compose_filter="auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3776, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3790, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3776, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3777, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3790, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3791, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_38intersect(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect);
- /* "pywrapfst.pyx":3776
+ /* "pywrapfst.pyx":3790
*
*
* cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.compose_filter = __pyx_v_compose_filter;
__pyx_t_2.connect = __pyx_v_connect;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3776, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3790, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3811
+/* "pywrapfst.pyx":3825
*
*
* cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3832
+ /* "pywrapfst.pyx":3846
* True if the two transducers satisfy the above condition, else False.
* """
* return fst.Isomorphic(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3832, __pyx_L1_error)
+ __PYX_ERR(0, 3846, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3832, __pyx_L1_error)
+ __PYX_ERR(0, 3846, __pyx_L1_error)
}
__pyx_r = fst::script::Isomorphic((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta);
goto __pyx_L0;
- /* "pywrapfst.pyx":3811
+ /* "pywrapfst.pyx":3825
*
*
* cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3811, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3825, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3811, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3825, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
if (values[2]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3811, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3825, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__40;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3811, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3825, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.isomorphic", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3811, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3811, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3825, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3825, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_40isomorphic(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta);
/* function exit code */
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_1 = __pyx_f_9pywrapfst_isomorphic(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2);
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3811, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3825, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3835
+/* "pywrapfst.pyx":3849
*
*
* cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__41;
int64 __pyx_v_nstate = __pyx_k__42;
- /* "pywrapfst.pyx":3838
+ /* "pywrapfst.pyx":3852
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3860
+ /* "pywrapfst.pyx":3874
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3860, __pyx_L1_error)
+ __PYX_ERR(0, 3874, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":3861
+ /* "pywrapfst.pyx":3875
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 3861, __pyx_L1_error)
+ __PYX_ERR(0, 3875, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3862
+ /* "pywrapfst.pyx":3876
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta)
* return _init_MutableFst(_tfst.release())
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3861, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3875, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":3863
+ /* "pywrapfst.pyx":3877
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(),
* weight)
* fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3863, __pyx_L1_error)
+ __PYX_ERR(0, 3877, __pyx_L1_error)
}
fst::script::Prune((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":3864
+ /* "pywrapfst.pyx":3878
* weight)
* fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta)
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3864, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3835
+ /* "pywrapfst.pyx":3849
*
*
* cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0};
PyObject* values[4] = {0,0,0,0};
- /* "pywrapfst.pyx":3838
+ /* "pywrapfst.pyx":3852
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 3835, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 3849, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3836, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3850, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__41;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3837, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3851, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__42;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3835, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3849, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.prune", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3835, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3849, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_42prune(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight);
- /* "pywrapfst.pyx":3835
+ /* "pywrapfst.pyx":3849
*
*
* cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_2.nstate = __pyx_v_nstate;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3835, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3867
+/* "pywrapfst.pyx":3881
*
*
* cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<<
static struct __pyx_obj_9pywrapfst_MutableFst *__pyx_f_9pywrapfst_push(struct __pyx_obj_9pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_push *__pyx_optional_args) {
float __pyx_v_delta = __pyx_k__43;
- /* "pywrapfst.pyx":3869
+ /* "pywrapfst.pyx":3883
* cpdef MutableFst push(Fst ifst,
* float delta=fst.kDelta,
* bool push_weights=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_push_weights = ((bool)0);
- /* "pywrapfst.pyx":3870
+ /* "pywrapfst.pyx":3884
* float delta=fst.kDelta,
* bool push_weights=False,
* bool push_labels=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_push_labels = ((bool)0);
- /* "pywrapfst.pyx":3871
+ /* "pywrapfst.pyx":3885
* bool push_weights=False,
* bool push_labels=False,
* bool remove_common_affix=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_common_affix = ((bool)0);
- /* "pywrapfst.pyx":3872
+ /* "pywrapfst.pyx":3886
* bool push_labels=False,
* bool remove_common_affix=False,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_total_weight = ((bool)0);
- /* "pywrapfst.pyx":3873
+ /* "pywrapfst.pyx":3887
* bool remove_common_affix=False,
* bool remove_total_weight=False,
* bool to_final=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3910
+ /* "pywrapfst.pyx":3924
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 3910, __pyx_L1_error)
+ __PYX_ERR(0, 3924, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":3911
+ /* "pywrapfst.pyx":3925
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* cdef uint8 flags = fst.GetPushFlags(push_weights, # <<<<<<<<<<<<<<
*/
__pyx_v_flags = fst::script::GetPushFlags(__pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight);
- /* "pywrapfst.pyx":3915
+ /* "pywrapfst.pyx":3929
* remove_common_affix,
* remove_total_weight)
* fst.Push(deref(ifst._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3915, __pyx_L1_error)
+ __PYX_ERR(0, 3929, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3919
+ /* "pywrapfst.pyx":3933
* flags,
* fst.GetReweightType(to_final),
* delta) # <<<<<<<<<<<<<<
*/
fst::script::Push((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v_flags, fst::script::GetReweightType(__pyx_v_to_final), __pyx_v_delta);
- /* "pywrapfst.pyx":3920
+ /* "pywrapfst.pyx":3934
* fst.GetReweightType(to_final),
* delta)
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3920, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3934, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3867
+ /* "pywrapfst.pyx":3881
*
*
* cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 3867, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 3881, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3868, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3882, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__43;
}
if (values[2]) {
- __pyx_v_push_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_push_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3869, __pyx_L3_error)
+ __pyx_v_push_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_push_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3883, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3869
+ /* "pywrapfst.pyx":3883
* cpdef MutableFst push(Fst ifst,
* float delta=fst.kDelta,
* bool push_weights=False, # <<<<<<<<<<<<<<
__pyx_v_push_weights = ((bool)0);
}
if (values[3]) {
- __pyx_v_push_labels = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_push_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3870, __pyx_L3_error)
+ __pyx_v_push_labels = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_push_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3884, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3870
+ /* "pywrapfst.pyx":3884
* float delta=fst.kDelta,
* bool push_weights=False,
* bool push_labels=False, # <<<<<<<<<<<<<<
__pyx_v_push_labels = ((bool)0);
}
if (values[4]) {
- __pyx_v_remove_common_affix = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_remove_common_affix == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3871, __pyx_L3_error)
+ __pyx_v_remove_common_affix = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_remove_common_affix == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3885, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3871
+ /* "pywrapfst.pyx":3885
* bool push_weights=False,
* bool push_labels=False,
* bool remove_common_affix=False, # <<<<<<<<<<<<<<
__pyx_v_remove_common_affix = ((bool)0);
}
if (values[5]) {
- __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3872, __pyx_L3_error)
+ __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3886, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3872
+ /* "pywrapfst.pyx":3886
* bool push_labels=False,
* bool remove_common_affix=False,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
__pyx_v_remove_total_weight = ((bool)0);
}
if (values[6]) {
- __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3873, __pyx_L3_error)
+ __pyx_v_to_final = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_to_final == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3887, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3873
+ /* "pywrapfst.pyx":3887
* bool remove_common_affix=False,
* bool remove_total_weight=False,
* bool to_final=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3867, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3881, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3867, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3881, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_44push(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight, __pyx_v_to_final);
- /* "pywrapfst.pyx":3867
+ /* "pywrapfst.pyx":3881
*
*
* cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.remove_common_affix = __pyx_v_remove_common_affix;
__pyx_t_2.remove_total_weight = __pyx_v_remove_total_weight;
__pyx_t_2.to_final = __pyx_v_to_final;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3867, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3881, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3923
+/* "pywrapfst.pyx":3937
*
*
* cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<<
PyObject *__pyx_v_select = ((PyObject *)__pyx_n_u_uniform);
int32 __pyx_v_max_length = __pyx_k__45;
uint64 __pyx_v_seed = ((uint64)0);
- enum fst::script::RandArcSelection __pyx_v__select;
- std::unique_ptr<fst::RandGenOptions<enum fst::script::RandArcSelection> > __pyx_v__opts;
+ fst::script::RandArcSelection __pyx_v__select;
+ std::unique_ptr<fst::RandGenOptions<fst::script::RandArcSelection> > __pyx_v__opts;
bool __pyx_r;
__Pyx_RefNannyDeclarations
std::string __pyx_t_1;
- enum fst::script::RandArcSelection __pyx_t_2;
+ fst::script::RandArcSelection __pyx_t_2;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
}
}
- /* "pywrapfst.pyx":3956
+ /* "pywrapfst.pyx":3970
* True if the two transducers satisfy the above condition, else False.
* """
* cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts
* # The three trailing options will be ignored by RandEquivalent.
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3956, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3956, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3970, __pyx_L1_error)
__pyx_v__select = __pyx_t_2;
- /* "pywrapfst.pyx":3959
+ /* "pywrapfst.pyx":3973
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts
* # The three trailing options will be ignored by RandEquivalent.
* _opts.reset( # <<<<<<<<<<<<<<
* new fst.RandGenOptions[fst.RandArcSelection](_select,
* max_length,
*/
- __pyx_v__opts.reset(new fst::RandGenOptions<enum fst::script::RandArcSelection> (__pyx_v__select, __pyx_v_max_length, 1, 0, 0));
+ __pyx_v__opts.reset(new fst::RandGenOptions<fst::script::RandArcSelection> (__pyx_v__select, __pyx_v_max_length, 1, 0, 0));
- /* "pywrapfst.pyx":3965
+ /* "pywrapfst.pyx":3979
* False,
* False))
* if seed == 0: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_seed == 0) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":3966
+ /* "pywrapfst.pyx":3980
* False))
* if seed == 0:
* seed = time(NULL) # <<<<<<<<<<<<<<
*/
__pyx_v_seed = time(NULL);
- /* "pywrapfst.pyx":3965
+ /* "pywrapfst.pyx":3979
* False,
* False))
* if seed == 0: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3967
+ /* "pywrapfst.pyx":3981
* if seed == 0:
* seed = time(NULL)
* return fst.RandEquivalent(deref(ifst1._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3967, __pyx_L1_error)
+ __PYX_ERR(0, 3981, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3968
+ /* "pywrapfst.pyx":3982
* seed = time(NULL)
* return fst.RandEquivalent(deref(ifst1._fst),
* deref(ifst2._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 3968, __pyx_L1_error)
+ __PYX_ERR(0, 3982, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3967
+ /* "pywrapfst.pyx":3981
* if seed == 0:
* seed = time(NULL)
* return fst.RandEquivalent(deref(ifst1._fst), # <<<<<<<<<<<<<<
__pyx_r = fst::script::RandEquivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_npath, (*__pyx_v__opts), __pyx_v_delta, __pyx_v_seed);
goto __pyx_L0;
- /* "pywrapfst.pyx":3923
+ /* "pywrapfst.pyx":3937
*
*
* cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3923, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3937, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3923, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3937, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst1 = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst_Fst *)values[1]);
if (values[2]) {
- __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_npath == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3925, __pyx_L3_error)
+ __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_npath == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L3_error)
} else {
__pyx_v_npath = ((int32)1);
}
if (values[3]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3926, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3940, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__44;
}
__pyx_v_select = values[4];
if (values[5]) {
- __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[5]); if (unlikely((__pyx_v_max_length == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3928, __pyx_L3_error)
+ __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[5]); if (unlikely((__pyx_v_max_length == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L3_error)
} else {
__pyx_v_max_length = __pyx_k__45;
}
if (values[6]) {
- __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3929, __pyx_L3_error)
+ __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3943, __pyx_L3_error)
} else {
__pyx_v_seed = ((uint64)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3923, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3937, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.randequivalent", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3923, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3924, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3937, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3938, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_46randequivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_npath, __pyx_v_delta, __pyx_v_select, __pyx_v_max_length, __pyx_v_seed);
/* function exit code */
__pyx_t_2.select = __pyx_v_select;
__pyx_t_2.max_length = __pyx_v_max_length;
__pyx_t_2.seed = __pyx_v_seed;
- __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3923, __pyx_L1_error)
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3923, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3937, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3937, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3975
+/* "pywrapfst.pyx":3989
*
*
* cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<<
PyObject *__pyx_v_select = ((PyObject *)__pyx_n_u_uniform);
int32 __pyx_v_max_length = __pyx_k__46;
- /* "pywrapfst.pyx":3979
+ /* "pywrapfst.pyx":3993
* select="uniform",
* int32 max_length=INT32_MAX,
* bool weighted=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_weighted = ((bool)0);
- /* "pywrapfst.pyx":3980
+ /* "pywrapfst.pyx":3994
* int32 max_length=INT32_MAX,
* bool weighted=False,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_total_weight = ((bool)0);
uint64 __pyx_v_seed = ((uint64)0);
- enum fst::script::RandArcSelection __pyx_v__select;
- std::unique_ptr<fst::RandGenOptions<enum fst::script::RandArcSelection> > __pyx_v__opts;
+ fst::script::RandArcSelection __pyx_v__select;
+ std::unique_ptr<fst::RandGenOptions<fst::script::RandArcSelection> > __pyx_v__opts;
std::unique_ptr<fst::script::VectorFstClass> __pyx_v__tfst;
struct __pyx_obj_9pywrapfst_MutableFst *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
std::string __pyx_t_1;
- enum fst::script::RandArcSelection __pyx_t_2;
+ fst::script::RandArcSelection __pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
int __pyx_lineno = 0;
}
}
- /* "pywrapfst.pyx":4011
+ /* "pywrapfst.pyx":4025
* An FST containing one or more random paths.
* """
* cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts
* _opts.reset(
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4011, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4011, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4025, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4025, __pyx_L1_error)
__pyx_v__select = __pyx_t_2;
- /* "pywrapfst.pyx":4013
+ /* "pywrapfst.pyx":4027
* cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select))
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts
* _opts.reset( # <<<<<<<<<<<<<<
* new fst.RandGenOptions[fst.RandArcSelection](_select,
* max_length,
*/
- __pyx_v__opts.reset(new fst::RandGenOptions<enum fst::script::RandArcSelection> (__pyx_v__select, __pyx_v_max_length, __pyx_v_npath, __pyx_v_weighted, __pyx_v_remove_total_weight));
+ __pyx_v__opts.reset(new fst::RandGenOptions<fst::script::RandArcSelection> (__pyx_v__select, __pyx_v_max_length, __pyx_v_npath, __pyx_v_weighted, __pyx_v_remove_total_weight));
- /* "pywrapfst.pyx":4020
+ /* "pywrapfst.pyx":4034
* remove_total_weight))
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 4020, __pyx_L1_error)
+ __PYX_ERR(0, 4034, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":4021
+ /* "pywrapfst.pyx":4035
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* if seed == 0: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_seed == 0) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":4022
+ /* "pywrapfst.pyx":4036
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* if seed == 0:
* seed = time(NULL) # <<<<<<<<<<<<<<
*/
__pyx_v_seed = time(NULL);
- /* "pywrapfst.pyx":4021
+ /* "pywrapfst.pyx":4035
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* if seed == 0: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4023
+ /* "pywrapfst.pyx":4037
* if seed == 0:
* seed = time(NULL)
* fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4023, __pyx_L1_error)
+ __PYX_ERR(0, 4037, __pyx_L1_error)
}
fst::script::RandGen((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts), __pyx_v_seed);
- /* "pywrapfst.pyx":4024
+ /* "pywrapfst.pyx":4038
* seed = time(NULL)
* fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed)
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4024, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4038, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3975
+ /* "pywrapfst.pyx":3989
*
*
* cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randgen") < 0)) __PYX_ERR(0, 3975, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randgen") < 0)) __PYX_ERR(0, 3989, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_npath == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3976, __pyx_L3_error)
+ __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_npath == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3990, __pyx_L3_error)
} else {
__pyx_v_npath = ((int32)1);
}
__pyx_v_select = values[2];
if (values[3]) {
- __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[3]); if (unlikely((__pyx_v_max_length == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3978, __pyx_L3_error)
+ __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[3]); if (unlikely((__pyx_v_max_length == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3992, __pyx_L3_error)
} else {
__pyx_v_max_length = __pyx_k__46;
}
if (values[4]) {
- __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3979, __pyx_L3_error)
+ __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3993, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3979
+ /* "pywrapfst.pyx":3993
* select="uniform",
* int32 max_length=INT32_MAX,
* bool weighted=False, # <<<<<<<<<<<<<<
__pyx_v_weighted = ((bool)0);
}
if (values[5]) {
- __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3980, __pyx_L3_error)
+ __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3994, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3980
+ /* "pywrapfst.pyx":3994
* int32 max_length=INT32_MAX,
* bool weighted=False,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
__pyx_v_remove_total_weight = ((bool)0);
}
if (values[6]) {
- __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3981, __pyx_L3_error)
+ __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3995, __pyx_L3_error)
} else {
__pyx_v_seed = ((uint64)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3975, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3989, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.randgen", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3975, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3989, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_48randgen(__pyx_self, __pyx_v_ifst, __pyx_v_npath, __pyx_v_select, __pyx_v_max_length, __pyx_v_weighted, __pyx_v_remove_total_weight, __pyx_v_seed);
- /* "pywrapfst.pyx":3975
+ /* "pywrapfst.pyx":3989
*
*
* cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.remove_total_weight = __pyx_v_weighted;
__pyx_t_2.weighted = __pyx_v_remove_total_weight;
__pyx_t_2.seed = __pyx_v_seed;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4027
+/* "pywrapfst.pyx":4041
*
*
* cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<<
PyObject *__pyx_v_call_arc_labeling = ((PyObject *)__pyx_n_u_input);
PyObject *__pyx_v_return_arc_labeling = ((PyObject *)__pyx_n_u_neither);
- /* "pywrapfst.pyx":4030
+ /* "pywrapfst.pyx":4044
* call_arc_labeling="input",
* return_arc_labeling="neither",
* bool epsilon_on_replace=False, # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":4071
+ /* "pywrapfst.pyx":4085
* cdef Fst _pfst
* cdef vector[fst.LabelFstClassPair] _pairs
* for (_label, _pfst) in pairs: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_pairs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4085, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_3)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4085, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 4085, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 4071, __pyx_L1_error)
+ else __PYX_ERR(0, 4085, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 4071, __pyx_L1_error)
+ __PYX_ERR(0, 4085, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
#else
- __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
__Pyx_GOTREF(__pyx_t_5);
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4071, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4085, __pyx_L1_error)
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 4071, __pyx_L1_error)
+ __PYX_ERR(0, 4085, __pyx_L1_error)
__pyx_L6_unpacking_done:;
}
- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4071, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4085, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4071, __pyx_L1_error)
+ if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4085, __pyx_L1_error)
__pyx_v__label = __pyx_t_9;
__Pyx_XDECREF_SET(__pyx_v__pfst, ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_6));
__pyx_t_6 = 0;
- /* "pywrapfst.pyx":4072
+ /* "pywrapfst.pyx":4086
* cdef vector[fst.LabelFstClassPair] _pairs
* for (_label, _pfst) in pairs:
* _pairs.push_back(fst.LabelFstClassPair(_label, _pfst._fst.get())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v__pfst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4072, __pyx_L1_error)
+ __PYX_ERR(0, 4086, __pyx_L1_error)
}
try {
__pyx_t_10 = __pyx_t_10cpywrapfst_LabelFstClassPair(__pyx_v__label, __pyx_v__pfst->_fst.get());
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 4072, __pyx_L1_error)
+ __PYX_ERR(0, 4086, __pyx_L1_error)
}
try {
__pyx_v__pairs.push_back(__pyx_t_10);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 4072, __pyx_L1_error)
+ __PYX_ERR(0, 4086, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4071
+ /* "pywrapfst.pyx":4085
* cdef Fst _pfst
* cdef vector[fst.LabelFstClassPair] _pairs
* for (_label, _pfst) in pairs: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":4074
+ /* "pywrapfst.pyx":4088
* _pairs.push_back(fst.LabelFstClassPair(_label, _pfst._fst.get()))
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType())) # <<<<<<<<<<<<<<
*/
__pyx_v__tfst.reset(new fst::script::VectorFstClass((__pyx_v__pairs[0]).second->ArcType()));
- /* "pywrapfst.pyx":4076
+ /* "pywrapfst.pyx":4090
* _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType()))
* cdef fst.ReplaceLabelType _cal = _get_replace_label_type(
* tostring(call_arc_labeling), # <<<<<<<<<<<<<<
* epsilon_on_replace)
* cdef fst.ReplaceLabelType _ral = _get_replace_label_type(
*/
- __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4076, __pyx_L1_error)
+ __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4090, __pyx_L1_error)
- /* "pywrapfst.pyx":4075
+ /* "pywrapfst.pyx":4089
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType()))
* cdef fst.ReplaceLabelType _cal = _get_replace_label_type( # <<<<<<<<<<<<<<
* tostring(call_arc_labeling),
* epsilon_on_replace)
*/
- __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L1_error)
+ __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4089, __pyx_L1_error)
__pyx_v__cal = __pyx_t_12;
- /* "pywrapfst.pyx":4079
+ /* "pywrapfst.pyx":4093
* epsilon_on_replace)
* cdef fst.ReplaceLabelType _ral = _get_replace_label_type(
* tostring(return_arc_labeling), # <<<<<<<<<<<<<<
* epsilon_on_replace)
* cdef unique_ptr[fst.ReplaceOptions] _opts
*/
- __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4079, __pyx_L1_error)
+ __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L1_error)
- /* "pywrapfst.pyx":4078
+ /* "pywrapfst.pyx":4092
* tostring(call_arc_labeling),
* epsilon_on_replace)
* cdef fst.ReplaceLabelType _ral = _get_replace_label_type( # <<<<<<<<<<<<<<
* tostring(return_arc_labeling),
* epsilon_on_replace)
*/
- __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4078, __pyx_L1_error)
+ __pyx_t_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4092, __pyx_L1_error)
__pyx_v__ral = __pyx_t_12;
- /* "pywrapfst.pyx":4082
+ /* "pywrapfst.pyx":4096
* epsilon_on_replace)
* cdef unique_ptr[fst.ReplaceOptions] _opts
* _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label)) # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::script::ReplaceOptions((__pyx_v__pairs[0]).first, __pyx_v__cal, __pyx_v__ral, __pyx_v_return_label));
- /* "pywrapfst.pyx":4083
+ /* "pywrapfst.pyx":4097
* cdef unique_ptr[fst.ReplaceOptions] _opts
* _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label))
* fst.Replace(_pairs, _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
fst::script::Replace(__pyx_v__pairs, __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":4084
+ /* "pywrapfst.pyx":4098
* _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label))
* fst.Replace(_pairs, _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4084, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4098, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4027
+ /* "pywrapfst.pyx":4041
*
*
* cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 4027, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 4041, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_call_arc_labeling = values[1];
__pyx_v_return_arc_labeling = values[2];
if (values[3]) {
- __pyx_v_epsilon_on_replace = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_epsilon_on_replace == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error)
+ __pyx_v_epsilon_on_replace = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_epsilon_on_replace == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4044, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4030
+ /* "pywrapfst.pyx":4044
* call_arc_labeling="input",
* return_arc_labeling="neither",
* bool epsilon_on_replace=False, # <<<<<<<<<<<<<<
__pyx_v_epsilon_on_replace = ((bool)0);
}
if (values[4]) {
- __pyx_v_return_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_return_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4031, __pyx_L3_error)
+ __pyx_v_return_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_return_label == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4045, __pyx_L3_error)
} else {
__pyx_v_return_label = ((int64)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4027, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4041, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9pywrapfst_50replace(__pyx_self, __pyx_v_pairs, __pyx_v_call_arc_labeling, __pyx_v_return_arc_labeling, __pyx_v_epsilon_on_replace, __pyx_v_return_label);
- /* "pywrapfst.pyx":4027
+ /* "pywrapfst.pyx":4041
*
*
* cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<<
__pyx_t_2.return_arc_labeling = __pyx_v_return_arc_labeling;
__pyx_t_2.epsilon_on_replace = __pyx_v_epsilon_on_replace;
__pyx_t_2.return_label = __pyx_v_return_label;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4027, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4041, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4087
+/* "pywrapfst.pyx":4101
*
*
* cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":4107
+ /* "pywrapfst.pyx":4121
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 4107, __pyx_L1_error)
+ __PYX_ERR(0, 4121, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":4108
+ /* "pywrapfst.pyx":4122
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.Reverse(deref(ifst._fst), _tfst.get(), require_superinitial) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4108, __pyx_L1_error)
+ __PYX_ERR(0, 4122, __pyx_L1_error)
}
fst::script::Reverse((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v_require_superinitial);
- /* "pywrapfst.pyx":4109
+ /* "pywrapfst.pyx":4123
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.Reverse(deref(ifst._fst), _tfst.get(), require_superinitial)
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4109, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4123, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4087
+ /* "pywrapfst.pyx":4101
*
*
* cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse") < 0)) __PYX_ERR(0, 4087, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse") < 0)) __PYX_ERR(0, 4101, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_require_superinitial = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_superinitial == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4087, __pyx_L3_error)
+ __pyx_v_require_superinitial = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_superinitial == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4101, __pyx_L3_error)
} else {
__pyx_v_require_superinitial = ((bool)1);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4087, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4101, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4087, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4101, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_52reverse(__pyx_self, __pyx_v_ifst, __pyx_v_require_superinitial);
/* function exit code */
__Pyx_XDECREF(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.require_superinitial = __pyx_v_require_superinitial;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4087, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4101, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4115
+/* "pywrapfst.pyx":4129
*
*
* cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
int64 __pyx_v_nstate = __pyx_k__48;
PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":4120
+ /* "pywrapfst.pyx":4134
* int64 nstate=fst.kNoStateId,
* queue_type="auto",
* bool reverse=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":4122
+ /* "pywrapfst.pyx":4136
* bool reverse=False) except *:
* cdef unique_ptr[fst.ShortestDistanceOptions] _opts
* if reverse: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_reverse != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":4125
+ /* "pywrapfst.pyx":4139
* # Only the simpler signature supports shortest distance to final states;
* # `nstate` and `queue_type` arguments are ignored.
* fst.ShortestDistance(deref(ifst._fst), distance, True, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4125, __pyx_L1_error)
+ __PYX_ERR(0, 4139, __pyx_L1_error)
}
fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, 1, __pyx_v_delta);
- /* "pywrapfst.pyx":4122
+ /* "pywrapfst.pyx":4136
* bool reverse=False) except *:
* cdef unique_ptr[fst.ShortestDistanceOptions] _opts
* if reverse: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":4127
+ /* "pywrapfst.pyx":4141
* fst.ShortestDistance(deref(ifst._fst), distance, True, delta)
* else:
* _opts.reset( # <<<<<<<<<<<<<<
* new fst.ShortestDistanceOptions(_get_queue_type(tostring(queue_type)),
- * fst.ANY_ARC_FILTER,
+ * fst.ArcFilterType.ANY_ARC_FILTER,
*/
/*else*/ {
- /* "pywrapfst.pyx":4128
+ /* "pywrapfst.pyx":4142
* else:
* _opts.reset(
* new fst.ShortestDistanceOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<<
- * fst.ANY_ARC_FILTER,
+ * fst.ArcFilterType.ANY_ARC_FILTER,
* nstate,
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4128, __pyx_L1_error)
- __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4128, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4142, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4142, __pyx_L1_error)
- /* "pywrapfst.pyx":4127
+ /* "pywrapfst.pyx":4141
* fst.ShortestDistance(deref(ifst._fst), distance, True, delta)
* else:
* _opts.reset( # <<<<<<<<<<<<<<
* new fst.ShortestDistanceOptions(_get_queue_type(tostring(queue_type)),
- * fst.ANY_ARC_FILTER,
+ * fst.ArcFilterType.ANY_ARC_FILTER,
*/
- __pyx_v__opts.reset(new fst::script::ShortestDistanceOptions(__pyx_t_3, fst::script::ANY_ARC_FILTER, __pyx_v_nstate, __pyx_v_delta));
+ __pyx_v__opts.reset(new fst::script::ShortestDistanceOptions(__pyx_t_3, fst::script::ArcFilterType::ANY, __pyx_v_nstate, __pyx_v_delta));
- /* "pywrapfst.pyx":4132
+ /* "pywrapfst.pyx":4146
* nstate,
* delta))
* fst.ShortestDistance(deref(ifst._fst), distance, deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4132, __pyx_L1_error)
+ __PYX_ERR(0, 4146, __pyx_L1_error)
}
fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, (*__pyx_v__opts));
}
__pyx_L3:;
- /* "pywrapfst.pyx":4115
+ /* "pywrapfst.pyx":4129
*
*
* cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":4135
+/* "pywrapfst.pyx":4149
*
*
* def shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 4135, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 4149, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4136, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4150, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__49;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4137, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4151, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__50;
}
__pyx_v_queue_type = values[3];
if (values[4]) {
- __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error)
+ __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4153, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4139
+ /* "pywrapfst.pyx":4153
* int64 nstate=fst.kNoStateId,
* queue_type="auto",
* bool reverse=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4135, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4149, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.shortestdistance", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4135, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4149, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_54shortestdistance(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_reverse);
- /* "pywrapfst.pyx":4135
+ /* "pywrapfst.pyx":4149
*
*
* def shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("shortestdistance", 0);
- /* "pywrapfst.pyx":4167
+ /* "pywrapfst.pyx":4181
* """
* cdef vector[fst.WeightClass] _distance
* _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) # <<<<<<<<<<<<<<
__pyx_t_1.nstate = __pyx_v_nstate;
__pyx_t_1.queue_type = __pyx_v_queue_type;
__pyx_t_1.reverse = __pyx_v_reverse;
- __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, (&__pyx_v__distance), &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4167, __pyx_L1_error)
+ __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, (&__pyx_v__distance), &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4181, __pyx_L1_error)
- /* "pywrapfst.pyx":4168
+ /* "pywrapfst.pyx":4182
* cdef vector[fst.WeightClass] _distance
* _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse)
* return [Weight(ifst._fst.get().WeightType(), weight.ToString()) # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
{ /* enter inner scope */
- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4168, __pyx_L1_error)
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":4169
+ /* "pywrapfst.pyx":4183
* _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse)
* return [Weight(ifst._fst.get().WeightType(), weight.ToString())
* for weight in _distance] # <<<<<<<<<<<<<<
++__pyx_t_3;
__pyx_7genexpr__pyx_v_weight = __pyx_t_4;
- /* "pywrapfst.pyx":4168
+ /* "pywrapfst.pyx":4182
* cdef vector[fst.WeightClass] _distance
* _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse)
* return [Weight(ifst._fst.get().WeightType(), weight.ToString()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4168, __pyx_L1_error)
+ __PYX_ERR(0, 4182, __pyx_L1_error)
}
- __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_ifst->_fst.get()->WeightType()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4168, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_ifst->_fst.get()->WeightType()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4168, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4168, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
__pyx_t_5 = 0;
__pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4168, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4168, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4182, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "pywrapfst.pyx":4169
+ /* "pywrapfst.pyx":4183
* _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse)
* return [Weight(ifst._fst.get().WeightType(), weight.ToString())
* for weight in _distance] # <<<<<<<<<<<<<<
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4135
+ /* "pywrapfst.pyx":4149
*
*
* def shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4172
+/* "pywrapfst.pyx":4186
*
*
* cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<<
int64 __pyx_v_nstate = __pyx_k__52;
PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":4177
+ /* "pywrapfst.pyx":4191
* int64 nstate=fst.kNoStateId,
* queue_type="auto",
* bool unique=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_unique = ((bool)0);
- /* "pywrapfst.pyx":4178
+ /* "pywrapfst.pyx":4192
* queue_type="auto",
* bool unique=False,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":4210
+ /* "pywrapfst.pyx":4224
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 4210, __pyx_L1_error)
+ __PYX_ERR(0, 4224, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":4212
+ /* "pywrapfst.pyx":4226
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type");
- __PYX_ERR(0, 4212, __pyx_L1_error)
+ __PYX_ERR(0, 4226, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4213
+ /* "pywrapfst.pyx":4227
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.ShortestPathOptions] _opts
* _opts.reset(
*/
- __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4212, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__get_WeightClass_or_zero(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0), __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4226, __pyx_L1_error)
__pyx_v__weight = __pyx_t_1;
- /* "pywrapfst.pyx":4216
+ /* "pywrapfst.pyx":4230
* cdef unique_ptr[fst.ShortestPathOptions] _opts
* _opts.reset(
* new fst.ShortestPathOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<<
* nshortest,
* unique,
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4216, __pyx_L1_error)
- __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4216, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4230, __pyx_L1_error)
- /* "pywrapfst.pyx":4215
+ /* "pywrapfst.pyx":4229
* weight)
* cdef unique_ptr[fst.ShortestPathOptions] _opts
* _opts.reset( # <<<<<<<<<<<<<<
*/
__pyx_v__opts.reset(new fst::script::ShortestPathOptions(__pyx_t_3, __pyx_v_nshortest, __pyx_v_unique, __pyx_v_delta, __pyx_v__weight, __pyx_v_nstate));
- /* "pywrapfst.pyx":4222
+ /* "pywrapfst.pyx":4236
* _weight,
* nstate))
* fst.ShortestPath(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4222, __pyx_L1_error)
+ __PYX_ERR(0, 4236, __pyx_L1_error)
}
fst::script::ShortestPath((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts));
- /* "pywrapfst.pyx":4223
+ /* "pywrapfst.pyx":4237
* nstate))
* fst.ShortestPath(deref(ifst._fst), _tfst.get(), deref(_opts))
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4223, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4237, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4172
+ /* "pywrapfst.pyx":4186
*
*
* cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[7] = {0,0,0,0,0,0,0};
values[4] = ((PyObject *)__pyx_n_u_auto);
- /* "pywrapfst.pyx":4178
+ /* "pywrapfst.pyx":4192
* queue_type="auto",
* bool unique=False,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4172, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4186, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst_Fst *)values[0]);
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4173, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4187, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__51;
}
if (values[2]) {
- __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4174, __pyx_L3_error)
+ __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4188, __pyx_L3_error)
} else {
__pyx_v_nshortest = ((int32)1);
}
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4189, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__52;
}
__pyx_v_queue_type = values[4];
if (values[5]) {
- __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4177, __pyx_L3_error)
+ __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4191, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4177
+ /* "pywrapfst.pyx":4191
* int64 nstate=fst.kNoStateId,
* queue_type="auto",
* bool unique=False, # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4172, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4186, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.shortestpath", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4172, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4186, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_56shortestpath(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nshortest, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_unique, __pyx_v_weight);
- /* "pywrapfst.pyx":4172
+ /* "pywrapfst.pyx":4186
*
*
* cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.queue_type = __pyx_v_queue_type;
__pyx_t_2.unique = __pyx_v_unique;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4172, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4226
+/* "pywrapfst.pyx":4240
*
*
* cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("statemap", 0);
- /* "pywrapfst.pyx":4249
+ /* "pywrapfst.pyx":4263
* FstArgError: Unknown map type.
* """
* return _map(ifst, fst.kDelta, map_type, 1., None) # <<<<<<<<<<<<<<
__pyx_t_2.map_type = __pyx_v_map_type;
__pyx_t_2.power = 1.;
__pyx_t_2.weight = Py_None;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4263, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4226
+ /* "pywrapfst.pyx":4240
*
*
* cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_map_type)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4226, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4240, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "statemap") < 0)) __PYX_ERR(0, 4226, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "statemap") < 0)) __PYX_ERR(0, 4240, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4226, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4240, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.statemap", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4226, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4240, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_58statemap(__pyx_self, __pyx_v_ifst, __pyx_v_map_type);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("statemap", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4226, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4240, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4252
+/* "pywrapfst.pyx":4266
*
*
* cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("synchronize", 0);
- /* "pywrapfst.pyx":4272
+ /* "pywrapfst.pyx":4286
* """
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type");
- __PYX_ERR(0, 4272, __pyx_L1_error)
+ __PYX_ERR(0, 4286, __pyx_L1_error)
}
__pyx_v__tfst.reset(new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0)));
- /* "pywrapfst.pyx":4273
+ /* "pywrapfst.pyx":4287
* cdef unique_ptr[fst.VectorFstClass] _tfst
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.Synchronize(deref(ifst._fst), _tfst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4273, __pyx_L1_error)
+ __PYX_ERR(0, 4287, __pyx_L1_error)
}
fst::script::Synchronize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get());
- /* "pywrapfst.pyx":4274
+ /* "pywrapfst.pyx":4288
* _tfst.reset(new fst.VectorFstClass(ifst.arc_type()))
* fst.Synchronize(deref(ifst._fst), _tfst.get())
* return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4274, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4288, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_MutableFst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4252
+ /* "pywrapfst.pyx":4266
*
*
* cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("synchronize (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4252, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4266, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_60synchronize(__pyx_self, ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_ifst));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("synchronize", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4252, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4266, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4331
+/* "pywrapfst.pyx":4345
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
values[0] = ((PyObject*)__pyx_n_u_vector);
values[1] = ((PyObject*)__pyx_n_u_standard);
- /* "pywrapfst.pyx":4334
+ /* "pywrapfst.pyx":4348
* str fst_type="vector",
* str arc_type="standard",
* SymbolTable isymbols=None, # <<<<<<<<<<<<<<
*/
values[2] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None);
- /* "pywrapfst.pyx":4335
+ /* "pywrapfst.pyx":4349
* str arc_type="standard",
* SymbolTable isymbols=None,
* SymbolTable osymbols=None, # <<<<<<<<<<<<<<
*/
values[3] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None);
- /* "pywrapfst.pyx":4336
+ /* "pywrapfst.pyx":4350
* SymbolTable isymbols=None,
* SymbolTable osymbols=None,
* SymbolTable ssymbols=None, # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4331, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4345, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)values[3]);
__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst_SymbolTable *)values[4]);
if (values[5]) {
- __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4337, __pyx_L3_error)
+ __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4351, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4337
+ /* "pywrapfst.pyx":4351
* SymbolTable osymbols=None,
* SymbolTable ssymbols=None,
* bool acceptor=False, # <<<<<<<<<<<<<<
__pyx_v_acceptor = ((bool)0);
}
if (values[6]) {
- __pyx_v_keep_isymbols = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_keep_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4338, __pyx_L3_error)
+ __pyx_v_keep_isymbols = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_keep_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4352, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4338
+ /* "pywrapfst.pyx":4352
* SymbolTable ssymbols=None,
* bool acceptor=False,
* bool keep_isymbols=False, # <<<<<<<<<<<<<<
__pyx_v_keep_isymbols = ((bool)0);
}
if (values[7]) {
- __pyx_v_keep_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_keep_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4339, __pyx_L3_error)
+ __pyx_v_keep_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_keep_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4339
+ /* "pywrapfst.pyx":4353
* bool acceptor=False,
* bool keep_isymbols=False,
* bool keep_osymbols=False, # <<<<<<<<<<<<<<
__pyx_v_keep_osymbols = ((bool)0);
}
if (values[8]) {
- __pyx_v_keep_state_numbering = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_keep_state_numbering == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4340, __pyx_L3_error)
+ __pyx_v_keep_state_numbering = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_keep_state_numbering == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4354, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4340
+ /* "pywrapfst.pyx":4354
* bool keep_isymbols=False,
* bool keep_osymbols=False,
* bool keep_state_numbering=False, # <<<<<<<<<<<<<<
__pyx_v_keep_state_numbering = ((bool)0);
}
if (values[9]) {
- __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4341, __pyx_L3_error)
+ __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4355, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4341
+ /* "pywrapfst.pyx":4355
* bool keep_osymbols=False,
* bool keep_state_numbering=False,
* bool allow_negative_labels=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4331, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4345, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Compiler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst_type), (&PyUnicode_Type), 1, "fst_type", 1))) __PYX_ERR(0, 4332, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc_type), (&PyUnicode_Type), 1, "arc_type", 1))) __PYX_ERR(0, 4333, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4334, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4335, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4336, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst_type), (&PyUnicode_Type), 1, "fst_type", 1))) __PYX_ERR(0, 4346, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc_type), (&PyUnicode_Type), 1, "arc_type", 1))) __PYX_ERR(0, 4347, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4348, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4349, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4350, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_8Compiler___cinit__(((struct __pyx_obj_9pywrapfst_Compiler *)__pyx_v_self), __pyx_v_fst_type, __pyx_v_arc_type, __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_keep_isymbols, __pyx_v_keep_osymbols, __pyx_v_keep_state_numbering, __pyx_v_allow_negative_labels);
- /* "pywrapfst.pyx":4331
+ /* "pywrapfst.pyx":4345
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "pywrapfst.pyx":4342
+ /* "pywrapfst.pyx":4356
* bool keep_state_numbering=False,
* bool allow_negative_labels=False):
* self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm");
- __PYX_ERR(0, 4342, __pyx_L1_error)
+ __PYX_ERR(0, 4356, __pyx_L1_error)
}
__pyx_v_self->_sstrm.reset(new std::stringstream());
- /* "pywrapfst.pyx":4343
+ /* "pywrapfst.pyx":4357
* bool allow_negative_labels=False):
* self._sstrm.reset(new stringstream())
* self._fst_type = tostring(fst_type) # <<<<<<<<<<<<<<
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4343, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4357, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type");
- __PYX_ERR(0, 4343, __pyx_L1_error)
+ __PYX_ERR(0, 4357, __pyx_L1_error)
}
__pyx_v_self->_fst_type = __pyx_t_1;
- /* "pywrapfst.pyx":4344
+ /* "pywrapfst.pyx":4358
* self._sstrm.reset(new stringstream())
* self._fst_type = tostring(fst_type)
* self._arc_type = tostring(arc_type) # <<<<<<<<<<<<<<
* self._isymbols = NULL
* if isymbols is not None:
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4344, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4358, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type");
- __PYX_ERR(0, 4344, __pyx_L1_error)
+ __PYX_ERR(0, 4358, __pyx_L1_error)
}
__pyx_v_self->_arc_type = __pyx_t_1;
- /* "pywrapfst.pyx":4345
+ /* "pywrapfst.pyx":4359
* self._fst_type = tostring(fst_type)
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols");
- __PYX_ERR(0, 4345, __pyx_L1_error)
+ __PYX_ERR(0, 4359, __pyx_L1_error)
}
__pyx_v_self->_isymbols = NULL;
- /* "pywrapfst.pyx":4346
+ /* "pywrapfst.pyx":4360
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL
* if isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":4347
+ /* "pywrapfst.pyx":4361
* self._isymbols = NULL
* if isymbols is not None:
* self._isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 4347, __pyx_L1_error)
+ __PYX_ERR(0, 4361, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_isymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_isymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4347, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_isymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_isymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4361, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols");
- __PYX_ERR(0, 4347, __pyx_L1_error)
+ __PYX_ERR(0, 4361, __pyx_L1_error)
}
__pyx_v_self->_isymbols = __pyx_t_4;
- /* "pywrapfst.pyx":4346
+ /* "pywrapfst.pyx":4360
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL
* if isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4348
+ /* "pywrapfst.pyx":4362
* if isymbols is not None:
* self._isymbols = isymbols._raw_ptr_or_raise()
* self._osymbols = NULL # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols");
- __PYX_ERR(0, 4348, __pyx_L1_error)
+ __PYX_ERR(0, 4362, __pyx_L1_error)
}
__pyx_v_self->_osymbols = NULL;
- /* "pywrapfst.pyx":4349
+ /* "pywrapfst.pyx":4363
* self._isymbols = isymbols._raw_ptr_or_raise()
* self._osymbols = NULL
* if osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":4350
+ /* "pywrapfst.pyx":4364
* self._osymbols = NULL
* if osymbols is not None:
* self._osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 4350, __pyx_L1_error)
+ __PYX_ERR(0, 4364, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_osymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_osymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4350, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_osymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_osymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4364, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols");
- __PYX_ERR(0, 4350, __pyx_L1_error)
+ __PYX_ERR(0, 4364, __pyx_L1_error)
}
__pyx_v_self->_osymbols = __pyx_t_4;
- /* "pywrapfst.pyx":4349
+ /* "pywrapfst.pyx":4363
* self._isymbols = isymbols._raw_ptr_or_raise()
* self._osymbols = NULL
* if osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4351
+ /* "pywrapfst.pyx":4365
* if osymbols is not None:
* self._osymbols = osymbols._raw_ptr_or_raise()
* self._ssymbols = NULL # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols");
- __PYX_ERR(0, 4351, __pyx_L1_error)
+ __PYX_ERR(0, 4365, __pyx_L1_error)
}
__pyx_v_self->_ssymbols = NULL;
- /* "pywrapfst.pyx":4352
+ /* "pywrapfst.pyx":4366
* self._osymbols = osymbols._raw_ptr_or_raise()
* self._ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":4353
+ /* "pywrapfst.pyx":4367
* self._ssymbols = NULL
* if ssymbols is not None:
* self._ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise");
- __PYX_ERR(0, 4353, __pyx_L1_error)
+ __PYX_ERR(0, 4367, __pyx_L1_error)
}
- __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_ssymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4353, __pyx_L1_error)
+ __pyx_t_4 = ((struct __pyx_vtabstruct_9pywrapfst_SymbolTable *)__pyx_v_ssymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_9pywrapfst_SymbolTableView *)__pyx_v_ssymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4367, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols");
- __PYX_ERR(0, 4353, __pyx_L1_error)
+ __PYX_ERR(0, 4367, __pyx_L1_error)
}
__pyx_v_self->_ssymbols = __pyx_t_4;
- /* "pywrapfst.pyx":4352
+ /* "pywrapfst.pyx":4366
* self._osymbols = osymbols._raw_ptr_or_raise()
* self._ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4354
+ /* "pywrapfst.pyx":4368
* if ssymbols is not None:
* self._ssymbols = ssymbols._raw_ptr_or_raise()
* self._acceptor = acceptor # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor");
- __PYX_ERR(0, 4354, __pyx_L1_error)
+ __PYX_ERR(0, 4368, __pyx_L1_error)
}
__pyx_v_self->_acceptor = __pyx_v_acceptor;
- /* "pywrapfst.pyx":4355
+ /* "pywrapfst.pyx":4369
* self._ssymbols = ssymbols._raw_ptr_or_raise()
* self._acceptor = acceptor
* self._keep_isymbols = keep_isymbols # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols");
- __PYX_ERR(0, 4355, __pyx_L1_error)
+ __PYX_ERR(0, 4369, __pyx_L1_error)
}
__pyx_v_self->_keep_isymbols = __pyx_v_keep_isymbols;
- /* "pywrapfst.pyx":4356
+ /* "pywrapfst.pyx":4370
* self._acceptor = acceptor
* self._keep_isymbols = keep_isymbols
* self._keep_osymbols = keep_osymbols # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols");
- __PYX_ERR(0, 4356, __pyx_L1_error)
+ __PYX_ERR(0, 4370, __pyx_L1_error)
}
__pyx_v_self->_keep_osymbols = __pyx_v_keep_osymbols;
- /* "pywrapfst.pyx":4357
+ /* "pywrapfst.pyx":4371
* self._keep_isymbols = keep_isymbols
* self._keep_osymbols = keep_osymbols
* self._keep_state_numbering = keep_state_numbering # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering");
- __PYX_ERR(0, 4357, __pyx_L1_error)
+ __PYX_ERR(0, 4371, __pyx_L1_error)
}
__pyx_v_self->_keep_state_numbering = __pyx_v_keep_state_numbering;
- /* "pywrapfst.pyx":4358
+ /* "pywrapfst.pyx":4372
* self._keep_osymbols = keep_osymbols
* self._keep_state_numbering = keep_state_numbering
* self._allow_negative_labels = allow_negative_labels # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels");
- __PYX_ERR(0, 4358, __pyx_L1_error)
+ __PYX_ERR(0, 4372, __pyx_L1_error)
}
__pyx_v_self->_allow_negative_labels = __pyx_v_allow_negative_labels;
- /* "pywrapfst.pyx":4331
+ /* "pywrapfst.pyx":4345
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4360
+/* "pywrapfst.pyx":4374
* self._allow_negative_labels = allow_negative_labels
*
* cpdef Fst compile(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4360, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4374, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_8Compiler_3compile)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4360, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4374, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4360, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4374, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4375
+ /* "pywrapfst.pyx":4389
* """
* cdef unique_ptr[fst.FstClass] _tfst
- * _tfst.reset(fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
- * b"<pywrapfst>",
- * self._fst_type,
+ * _tfst = fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
+ * b"<pywrapfst>",
+ * self._fst_type,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm");
- __PYX_ERR(0, 4375, __pyx_L1_error)
+ __PYX_ERR(0, 4389, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4377
- * _tfst.reset(fst.CompileFstInternal(deref(self._sstrm),
- * b"<pywrapfst>",
- * self._fst_type, # <<<<<<<<<<<<<<
- * self._arc_type,
- * self._isymbols,
+ /* "pywrapfst.pyx":4391
+ * _tfst = fst.CompileFstInternal(deref(self._sstrm),
+ * b"<pywrapfst>",
+ * self._fst_type, # <<<<<<<<<<<<<<
+ * self._arc_type,
+ * self._isymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type");
- __PYX_ERR(0, 4377, __pyx_L1_error)
+ __PYX_ERR(0, 4391, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4378
- * b"<pywrapfst>",
- * self._fst_type,
- * self._arc_type, # <<<<<<<<<<<<<<
- * self._isymbols,
- * self._osymbols,
+ /* "pywrapfst.pyx":4392
+ * b"<pywrapfst>",
+ * self._fst_type,
+ * self._arc_type, # <<<<<<<<<<<<<<
+ * self._isymbols,
+ * self._osymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type");
- __PYX_ERR(0, 4378, __pyx_L1_error)
+ __PYX_ERR(0, 4392, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4379
- * self._fst_type,
- * self._arc_type,
- * self._isymbols, # <<<<<<<<<<<<<<
- * self._osymbols,
- * self._ssymbols,
+ /* "pywrapfst.pyx":4393
+ * self._fst_type,
+ * self._arc_type,
+ * self._isymbols, # <<<<<<<<<<<<<<
+ * self._osymbols,
+ * self._ssymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols");
- __PYX_ERR(0, 4379, __pyx_L1_error)
+ __PYX_ERR(0, 4393, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4380
- * self._arc_type,
- * self._isymbols,
- * self._osymbols, # <<<<<<<<<<<<<<
- * self._ssymbols,
- * self._acceptor,
+ /* "pywrapfst.pyx":4394
+ * self._arc_type,
+ * self._isymbols,
+ * self._osymbols, # <<<<<<<<<<<<<<
+ * self._ssymbols,
+ * self._acceptor,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols");
- __PYX_ERR(0, 4380, __pyx_L1_error)
+ __PYX_ERR(0, 4394, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4381
- * self._isymbols,
- * self._osymbols,
- * self._ssymbols, # <<<<<<<<<<<<<<
- * self._acceptor,
- * self._keep_isymbols,
+ /* "pywrapfst.pyx":4395
+ * self._isymbols,
+ * self._osymbols,
+ * self._ssymbols, # <<<<<<<<<<<<<<
+ * self._acceptor,
+ * self._keep_isymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols");
- __PYX_ERR(0, 4381, __pyx_L1_error)
+ __PYX_ERR(0, 4395, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4382
- * self._osymbols,
- * self._ssymbols,
- * self._acceptor, # <<<<<<<<<<<<<<
- * self._keep_isymbols,
- * self._keep_osymbols,
+ /* "pywrapfst.pyx":4396
+ * self._osymbols,
+ * self._ssymbols,
+ * self._acceptor, # <<<<<<<<<<<<<<
+ * self._keep_isymbols,
+ * self._keep_osymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor");
- __PYX_ERR(0, 4382, __pyx_L1_error)
+ __PYX_ERR(0, 4396, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4383
- * self._ssymbols,
- * self._acceptor,
- * self._keep_isymbols, # <<<<<<<<<<<<<<
- * self._keep_osymbols,
- * self._keep_state_numbering,
+ /* "pywrapfst.pyx":4397
+ * self._ssymbols,
+ * self._acceptor,
+ * self._keep_isymbols, # <<<<<<<<<<<<<<
+ * self._keep_osymbols,
+ * self._keep_state_numbering,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols");
- __PYX_ERR(0, 4383, __pyx_L1_error)
+ __PYX_ERR(0, 4397, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4384
- * self._acceptor,
- * self._keep_isymbols,
- * self._keep_osymbols, # <<<<<<<<<<<<<<
- * self._keep_state_numbering,
- * self._allow_negative_labels))
+ /* "pywrapfst.pyx":4398
+ * self._acceptor,
+ * self._keep_isymbols,
+ * self._keep_osymbols, # <<<<<<<<<<<<<<
+ * self._keep_state_numbering,
+ * self._allow_negative_labels)
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols");
- __PYX_ERR(0, 4384, __pyx_L1_error)
+ __PYX_ERR(0, 4398, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4385
- * self._keep_isymbols,
- * self._keep_osymbols,
- * self._keep_state_numbering, # <<<<<<<<<<<<<<
- * self._allow_negative_labels))
+ /* "pywrapfst.pyx":4399
+ * self._keep_isymbols,
+ * self._keep_osymbols,
+ * self._keep_state_numbering, # <<<<<<<<<<<<<<
+ * self._allow_negative_labels)
* self._sstrm.reset(new stringstream())
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering");
- __PYX_ERR(0, 4385, __pyx_L1_error)
+ __PYX_ERR(0, 4399, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4386
- * self._keep_osymbols,
- * self._keep_state_numbering,
- * self._allow_negative_labels)) # <<<<<<<<<<<<<<
+ /* "pywrapfst.pyx":4400
+ * self._keep_osymbols,
+ * self._keep_state_numbering,
+ * self._allow_negative_labels) # <<<<<<<<<<<<<<
* self._sstrm.reset(new stringstream())
* if _tfst.get() == NULL:
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels");
- __PYX_ERR(0, 4386, __pyx_L1_error)
+ __PYX_ERR(0, 4400, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4375
+ /* "pywrapfst.pyx":4389
* """
* cdef unique_ptr[fst.FstClass] _tfst
- * _tfst.reset(fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
- * b"<pywrapfst>",
- * self._fst_type,
+ * _tfst = fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
+ * b"<pywrapfst>",
+ * self._fst_type,
*/
- __pyx_v__tfst.reset(fst::script::CompileFstInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering, __pyx_v_self->_allow_negative_labels));
+ __pyx_v__tfst = fst::script::CompileFstInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering, __pyx_v_self->_allow_negative_labels);
- /* "pywrapfst.pyx":4387
- * self._keep_state_numbering,
- * self._allow_negative_labels))
+ /* "pywrapfst.pyx":4401
+ * self._keep_state_numbering,
+ * self._allow_negative_labels)
* self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<<
* if _tfst.get() == NULL:
* raise FstOpError("Compilation failed")
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm");
- __PYX_ERR(0, 4387, __pyx_L1_error)
+ __PYX_ERR(0, 4401, __pyx_L1_error)
}
__pyx_v_self->_sstrm.reset(new std::stringstream());
- /* "pywrapfst.pyx":4388
- * self._allow_negative_labels))
+ /* "pywrapfst.pyx":4402
+ * self._allow_negative_labels)
* self._sstrm.reset(new stringstream())
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
* raise FstOpError("Compilation failed")
__pyx_t_5 = ((__pyx_v__tfst.get() == NULL) != 0);
if (unlikely(__pyx_t_5)) {
- /* "pywrapfst.pyx":4389
+ /* "pywrapfst.pyx":4403
* self._sstrm.reset(new stringstream())
* if _tfst.get() == NULL:
* raise FstOpError("Compilation failed") # <<<<<<<<<<<<<<
* return _init_XFst(_tfst.release())
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4389, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4403, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Compilation_failed) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Compilation_failed);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4389, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4403, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 4389, __pyx_L1_error)
+ __PYX_ERR(0, 4403, __pyx_L1_error)
- /* "pywrapfst.pyx":4388
- * self._allow_negative_labels))
+ /* "pywrapfst.pyx":4402
+ * self._allow_negative_labels)
* self._sstrm.reset(new stringstream())
* if _tfst.get() == NULL: # <<<<<<<<<<<<<<
* raise FstOpError("Compilation failed")
*/
}
- /* "pywrapfst.pyx":4390
+ /* "pywrapfst.pyx":4404
* if _tfst.get() == NULL:
* raise FstOpError("Compilation failed")
* return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<<
* cpdef void write(self, expression):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4390, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4360
+ /* "pywrapfst.pyx":4374
* self._allow_negative_labels = allow_negative_labels
*
* cpdef Fst compile(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("compile", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4360, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4374, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4392
+/* "pywrapfst.pyx":4406
* return _init_XFst(_tfst.release())
*
* cpdef void write(self, expression): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4406, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_8Compiler_5write)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_expression) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expression);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4392, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4406, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":4408
+ /* "pywrapfst.pyx":4422
* expression: A string expression to add to compiler string buffer.
* """
* cdef string _line = tostring(expression) # <<<<<<<<<<<<<<
* if not _line.empty() and _line.back() != b'\n':
* _line.append(b'\n')
*/
- __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4422, __pyx_L1_error)
__pyx_v__line = __pyx_t_5;
- /* "pywrapfst.pyx":4409
+ /* "pywrapfst.pyx":4423
* """
* cdef string _line = tostring(expression)
* if not _line.empty() and _line.back() != b'\n': # <<<<<<<<<<<<<<
__pyx_L4_bool_binop_done:;
if (__pyx_t_6) {
- /* "pywrapfst.pyx":4410
+ /* "pywrapfst.pyx":4424
* cdef string _line = tostring(expression)
* if not _line.empty() and _line.back() != b'\n':
* _line.append(b'\n') # <<<<<<<<<<<<<<
*/
(void)(__pyx_v__line.append(((char const *)"\n")));
- /* "pywrapfst.pyx":4409
+ /* "pywrapfst.pyx":4423
* """
* cdef string _line = tostring(expression)
* if not _line.empty() and _line.back() != b'\n': # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4411
+ /* "pywrapfst.pyx":4425
* if not _line.empty() and _line.back() != b'\n':
* _line.append(b'\n')
* deref(self._sstrm) << _line # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm");
- __PYX_ERR(0, 4411, __pyx_L1_error)
+ __PYX_ERR(0, 4425, __pyx_L1_error)
}
(void)(((*__pyx_v_self->_sstrm) << __pyx_v__line));
- /* "pywrapfst.pyx":4392
+ /* "pywrapfst.pyx":4406
* return _init_XFst(_tfst.release())
*
* cpdef void write(self, expression): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("write", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_8Compiler_write(__pyx_v_self, __pyx_v_expression, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4392, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_8Compiler_write(__pyx_v_self, __pyx_v_expression, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4406, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4433
+/* "pywrapfst.pyx":4447
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":4434
+ /* "pywrapfst.pyx":4448
*
* def __init__(self):
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") # <<<<<<<<<<<<<<
*
* def __repr__(self):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4448, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4448, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4448, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4448, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4448, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 4434, __pyx_L1_error)
+ __PYX_ERR(0, 4448, __pyx_L1_error)
- /* "pywrapfst.pyx":4433
+ /* "pywrapfst.pyx":4447
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4436
+/* "pywrapfst.pyx":4450
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":4437
+ /* "pywrapfst.pyx":4451
*
* def __repr__(self):
* return f"<{self.far_type()} FarReader at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type");
- __PYX_ERR(0, 4437, __pyx_L1_error)
+ __PYX_ERR(0, 4451, __pyx_L1_error)
}
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
__pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
__pyx_t_2 += 16;
__Pyx_GIVEREF(__pyx_kp_u_FarReader_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_FarReader_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4451, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4436
+ /* "pywrapfst.pyx":4450
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4440
+/* "pywrapfst.pyx":4454
*
* @classmethod
* def open(cls, *sources): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("open", 0);
- /* "pywrapfst.pyx":4458
+ /* "pywrapfst.pyx":4472
* FstIOError: Read failed.
* """
* cdef vector[string] _sources = [path_tostring(source) for source in sources] # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.FarReaderClass] _tfar
- * _tfar.reset(fst.FarReaderClass.Open(_sources))
+ * _tfar = fst.FarReaderClass.Open(_sources)
*/
{ /* enter inner scope */
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4458, __pyx_L5_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4472, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_sources; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
for (;;) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4458, __pyx_L5_error)
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 4472, __pyx_L5_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4458, __pyx_L5_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4472, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
__Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_source, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_8genexpr1__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4458, __pyx_L5_error)
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4458, __pyx_L5_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_path_tostring(__pyx_8genexpr1__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4472, __pyx_L5_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4472, __pyx_L5_error)
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4458, __pyx_L5_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4472, __pyx_L5_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L1_error;
__pyx_L8_exit_scope:;
} /* exit inner scope */
- __pyx_t_6 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4458, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4472, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v__sources = __pyx_t_6;
- /* "pywrapfst.pyx":4460
+ /* "pywrapfst.pyx":4474
* cdef vector[string] _sources = [path_tostring(source) for source in sources]
* cdef unique_ptr[fst.FarReaderClass] _tfar
- * _tfar.reset(fst.FarReaderClass.Open(_sources)) # <<<<<<<<<<<<<<
+ * _tfar = fst.FarReaderClass.Open(_sources) # <<<<<<<<<<<<<<
* if _tfar.get() == NULL:
* raise FstIOError(f"Read failed: {sources!r}")
*/
- __pyx_v__tfar.reset(fst::script::FarReaderClass::Open(__pyx_v__sources));
+ __pyx_v__tfar = fst::script::FarReaderClass::Open(__pyx_v__sources);
- /* "pywrapfst.pyx":4461
+ /* "pywrapfst.pyx":4475
* cdef unique_ptr[fst.FarReaderClass] _tfar
- * _tfar.reset(fst.FarReaderClass.Open(_sources))
+ * _tfar = fst.FarReaderClass.Open(_sources)
* if _tfar.get() == NULL: # <<<<<<<<<<<<<<
* raise FstIOError(f"Read failed: {sources!r}")
* cdef FarReader reader = FarReader.__new__(FarReader)
__pyx_t_7 = ((__pyx_v__tfar.get() == NULL) != 0);
if (unlikely(__pyx_t_7)) {
- /* "pywrapfst.pyx":4462
- * _tfar.reset(fst.FarReaderClass.Open(_sources))
+ /* "pywrapfst.pyx":4476
+ * _tfar = fst.FarReaderClass.Open(_sources)
* if _tfar.get() == NULL:
* raise FstIOError(f"Read failed: {sources!r}") # <<<<<<<<<<<<<<
* cdef FarReader reader = FarReader.__new__(FarReader)
- * reader._reader.reset(_tfar.release())
+ * reader._reader = move(_tfar)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4462, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4476, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sources), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4462, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sources), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4476, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4462, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4476, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
__pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4462, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4476, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 4462, __pyx_L1_error)
+ __PYX_ERR(0, 4476, __pyx_L1_error)
- /* "pywrapfst.pyx":4461
+ /* "pywrapfst.pyx":4475
* cdef unique_ptr[fst.FarReaderClass] _tfar
- * _tfar.reset(fst.FarReaderClass.Open(_sources))
+ * _tfar = fst.FarReaderClass.Open(_sources)
* if _tfar.get() == NULL: # <<<<<<<<<<<<<<
* raise FstIOError(f"Read failed: {sources!r}")
* cdef FarReader reader = FarReader.__new__(FarReader)
*/
}
- /* "pywrapfst.pyx":4463
+ /* "pywrapfst.pyx":4477
* if _tfar.get() == NULL:
* raise FstIOError(f"Read failed: {sources!r}")
* cdef FarReader reader = FarReader.__new__(FarReader) # <<<<<<<<<<<<<<
- * reader._reader.reset(_tfar.release())
+ * reader._reader = move(_tfar)
* return reader
*/
- __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4463, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4477, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
__pyx_v_reader = ((struct __pyx_obj_9pywrapfst_FarReader *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":4464
+ /* "pywrapfst.pyx":4478
* raise FstIOError(f"Read failed: {sources!r}")
* cdef FarReader reader = FarReader.__new__(FarReader)
- * reader._reader.reset(_tfar.release()) # <<<<<<<<<<<<<<
+ * reader._reader = move(_tfar) # <<<<<<<<<<<<<<
* return reader
*
*/
if (unlikely(((PyObject *)__pyx_v_reader) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4464, __pyx_L1_error)
+ __PYX_ERR(0, 4478, __pyx_L1_error)
}
- __pyx_v_reader->_reader.reset(__pyx_v__tfar.release());
+ __pyx_v_reader->_reader = fst::move<std::unique_ptr<fst::script::FarReaderClass> >(__pyx_v__tfar);
- /* "pywrapfst.pyx":4465
+ /* "pywrapfst.pyx":4479
* cdef FarReader reader = FarReader.__new__(FarReader)
- * reader._reader.reset(_tfar.release())
+ * reader._reader = move(_tfar)
* return reader # <<<<<<<<<<<<<<
*
* cpdef string arc_type(self):
__pyx_r = ((PyObject *)__pyx_v_reader);
goto __pyx_L0;
- /* "pywrapfst.pyx":4440
+ /* "pywrapfst.pyx":4454
*
* @classmethod
* def open(cls, *sources): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4467
+/* "pywrapfst.pyx":4481
* return reader
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_7arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4467, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4467, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4481, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4473
+ /* "pywrapfst.pyx":4487
* Returns a string indicating the arc type.
* """
* return self._reader.get().ArcType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4473, __pyx_L1_error)
+ __PYX_ERR(0, 4487, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":4467
+ /* "pywrapfst.pyx":4481
* return reader
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4467, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4475
+/* "pywrapfst.pyx":4489
* return self._reader.get().ArcType()
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_9done)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4475, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4475, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4489, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4484
+ /* "pywrapfst.pyx":4498
* True if the iterator is exhausted, False otherwise.
* """
* return self._reader.get().Done() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4484, __pyx_L1_error)
+ __PYX_ERR(0, 4498, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":4475
+ /* "pywrapfst.pyx":4489
* return self._reader.get().ArcType()
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("done", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4489, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4486
+/* "pywrapfst.pyx":4500
* return self._reader.get().Done()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4486, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_11error)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4486, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4500, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4486, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4500, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4495
+ /* "pywrapfst.pyx":4509
* True if the FarReader is in an errorful state, False otherwise.
* """
* return self._reader.get().Error() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4495, __pyx_L1_error)
+ __PYX_ERR(0, 4509, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->Error();
goto __pyx_L0;
- /* "pywrapfst.pyx":4486
+ /* "pywrapfst.pyx":4500
* return self._reader.get().Done()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("error", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4486, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4497
+/* "pywrapfst.pyx":4511
* return self._reader.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4497, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_13far_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4497, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4497, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4511, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4498
+ /* "pywrapfst.pyx":4512
*
* cpdef string far_type(self):
* return fst.GetFarTypeString(self._reader.get().Type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4498, __pyx_L1_error)
+ __PYX_ERR(0, 4512, __pyx_L1_error)
}
__pyx_r = fst::GetFarTypeString(__pyx_v_self->_reader.get()->Type());
goto __pyx_L0;
- /* "pywrapfst.pyx":4497
+ /* "pywrapfst.pyx":4511
* return self._reader.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("far_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4497, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4511, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4500
+/* "pywrapfst.pyx":4514
* return fst.GetFarTypeString(self._reader.get().Type())
*
* cpdef bool find(self, key): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_15find)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4500, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4500, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4514, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4513
+ /* "pywrapfst.pyx":4527
* True if the key was found, False otherwise.
* """
* return self._reader.get().Find(tostring(key)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4513, __pyx_L1_error)
+ __PYX_ERR(0, 4527, __pyx_L1_error)
}
- __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4513, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4527, __pyx_L1_error)
__pyx_r = __pyx_v_self->_reader.get()->Find(__pyx_t_6);
goto __pyx_L0;
- /* "pywrapfst.pyx":4500
+ /* "pywrapfst.pyx":4514
* return fst.GetFarTypeString(self._reader.get().Type())
*
* cpdef bool find(self, key): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("find", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_find(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4500, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarReader_find(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4514, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4515
+/* "pywrapfst.pyx":4529
* return self._reader.get().Find(tostring(key))
*
* cpdef Fst get_fst(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4515, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4529, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_17get_fst)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4515, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4529, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4515, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Fst))))) __PYX_ERR(0, 4529, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4524
+ /* "pywrapfst.pyx":4538
* A copy of the FST at the current position.
* """
* return _init_XFst(new fst.FstClass(deref(self._reader.get().GetFstClass()))) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4524, __pyx_L1_error)
+ __PYX_ERR(0, 4538, __pyx_L1_error)
}
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_reader.get()->GetFstClass())))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4524, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_reader.get()->GetFstClass())))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4538, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4515
+ /* "pywrapfst.pyx":4529
* return self._reader.get().Find(tostring(key))
*
* cpdef Fst get_fst(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_fst", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_9FarReader_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4515, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_9FarReader_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4529, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4526
+/* "pywrapfst.pyx":4540
* return _init_XFst(new fst.FstClass(deref(self._reader.get().GetFstClass())))
*
* cpdef string get_key(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4540, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_19get_key)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4540, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4540, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4535
+ /* "pywrapfst.pyx":4549
* The string key at the current position.
* """
* return self._reader.get().GetKey() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4535, __pyx_L1_error)
+ __PYX_ERR(0, 4549, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->GetKey();
goto __pyx_L0;
- /* "pywrapfst.pyx":4526
+ /* "pywrapfst.pyx":4540
* return _init_XFst(new fst.FstClass(deref(self._reader.get().GetFstClass())))
*
* cpdef string get_key(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_key", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4526, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4540, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4537
+/* "pywrapfst.pyx":4551
* return self._reader.get().GetKey()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4537, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4551, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_21next)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4537, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4551, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":4543
+ /* "pywrapfst.pyx":4557
* Advances the iterator.
* """
* self._reader.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4543, __pyx_L1_error)
+ __PYX_ERR(0, 4557, __pyx_L1_error)
}
__pyx_v_self->_reader.get()->Next();
- /* "pywrapfst.pyx":4537
+ /* "pywrapfst.pyx":4551
* return self._reader.get().GetKey()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("next", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4537, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4551, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4545
+/* "pywrapfst.pyx":4559
* self._reader.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4545, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarReader_23reset)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4545, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
#endif
}
- /* "pywrapfst.pyx":4551
+ /* "pywrapfst.pyx":4565
* Resets the iterator to the initial position.
* """
* self._reader.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4551, __pyx_L1_error)
+ __PYX_ERR(0, 4565, __pyx_L1_error)
}
__pyx_v_self->_reader.get()->Reset();
- /* "pywrapfst.pyx":4545
+ /* "pywrapfst.pyx":4559
* self._reader.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("reset", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4545, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_9FarReader_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4559, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4553
+/* "pywrapfst.pyx":4567
* self._reader.get().Reset()
*
* def __getitem__(self, key): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "pywrapfst.pyx":4554
+ /* "pywrapfst.pyx":4568
*
* def __getitem__(self, key):
* if self._reader.get().Find(tostring(key)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader");
- __PYX_ERR(0, 4554, __pyx_L1_error)
+ __PYX_ERR(0, 4568, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4554, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4568, __pyx_L1_error)
__pyx_t_2 = (__pyx_v_self->_reader.get()->Find(__pyx_t_1) != 0);
if (likely(__pyx_t_2)) {
- /* "pywrapfst.pyx":4555
+ /* "pywrapfst.pyx":4569
* def __getitem__(self, key):
* if self._reader.get().Find(tostring(key)):
* return self.get_fst() # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_fst");
- __PYX_ERR(0, 4555, __pyx_L1_error)
+ __PYX_ERR(0, 4569, __pyx_L1_error)
}
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4555, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4569, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4554
+ /* "pywrapfst.pyx":4568
*
* def __getitem__(self, key):
* if self._reader.get().Find(tostring(key)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4557
+ /* "pywrapfst.pyx":4571
* return self.get_fst()
* else:
* raise KeyError(key) # <<<<<<<<<<<<<<
* def __next__(self):
*/
/*else*/ {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4557, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4571, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 4557, __pyx_L1_error)
+ __PYX_ERR(0, 4571, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4553
+ /* "pywrapfst.pyx":4567
* self._reader.get().Reset()
*
* def __getitem__(self, key): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4559
+/* "pywrapfst.pyx":4573
* raise KeyError(key)
*
* def __next__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":4560
+ /* "pywrapfst.pyx":4574
*
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done");
- __PYX_ERR(0, 4560, __pyx_L1_error)
+ __PYX_ERR(0, 4574, __pyx_L1_error)
}
__pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (unlikely(__pyx_t_1)) {
- /* "pywrapfst.pyx":4561
+ /* "pywrapfst.pyx":4575
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* cdef Fst _fst = self.get_fst()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 4561, __pyx_L1_error)
+ __PYX_ERR(0, 4575, __pyx_L1_error)
- /* "pywrapfst.pyx":4560
+ /* "pywrapfst.pyx":4574
*
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4562
+ /* "pywrapfst.pyx":4576
* if self.done():
* raise StopIteration
* cdef string _key = self.get_key() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_key");
- __PYX_ERR(0, 4562, __pyx_L1_error)
+ __PYX_ERR(0, 4576, __pyx_L1_error)
}
__pyx_v__key = ((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_key(__pyx_v_self, 0);
- /* "pywrapfst.pyx":4563
+ /* "pywrapfst.pyx":4577
* raise StopIteration
* cdef string _key = self.get_key()
* cdef Fst _fst = self.get_fst() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_fst");
- __PYX_ERR(0, 4563, __pyx_L1_error)
+ __PYX_ERR(0, 4577, __pyx_L1_error)
}
- __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4563, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4577, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v__fst = ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":4564
+ /* "pywrapfst.pyx":4578
* cdef string _key = self.get_key()
* cdef Fst _fst = self.get_fst()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next");
- __PYX_ERR(0, 4564, __pyx_L1_error)
+ __PYX_ERR(0, 4578, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":4565
+ /* "pywrapfst.pyx":4579
* cdef Fst _fst = self.get_fst()
* self.next()
* return (_key, _fst) # <<<<<<<<<<<<<<
* # This just registers this class as a possible iterator.
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4565, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4579, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4565, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4579, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4559
+ /* "pywrapfst.pyx":4573
* raise KeyError(key)
*
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4568
+/* "pywrapfst.pyx":4582
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":4569
+ /* "pywrapfst.pyx":4583
* # This just registers this class as a possible iterator.
* def __iter__(self):
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":4568
+ /* "pywrapfst.pyx":4582
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4592
+/* "pywrapfst.pyx":4606
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":4593
+ /* "pywrapfst.pyx":4607
*
* def __init__(self):
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") # <<<<<<<<<<<<<<
*
* def __repr__(self):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4593, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4593, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4593, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4593, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4593, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4607, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 4593, __pyx_L1_error)
+ __PYX_ERR(0, 4607, __pyx_L1_error)
- /* "pywrapfst.pyx":4592
+ /* "pywrapfst.pyx":4606
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4595
+/* "pywrapfst.pyx":4609
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __repr__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":4596
+ /* "pywrapfst.pyx":4610
*
* def __repr__(self):
* return f"<{self.far_type()} FarWriter at 0x{id(self):x}>" # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = 0;
__pyx_t_3 = 127;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type");
- __PYX_ERR(0, 4596, __pyx_L1_error)
+ __PYX_ERR(0, 4610, __pyx_L1_error)
}
- __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
__pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
__pyx_t_2 += 16;
__Pyx_GIVEREF(__pyx_kp_u_FarWriter_at_0x);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_FarWriter_at_0x);
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
__pyx_t_2 += 1;
__Pyx_GIVEREF(__pyx_kp_u__3);
PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
- __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4610, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4595
+ /* "pywrapfst.pyx":4609
* raise NotImplementedError(f"Cannot construct {self.__class__.__name__}")
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4599
+/* "pywrapfst.pyx":4613
*
* @classmethod
* def create(cls, source, arc_type="standard", far_type="default"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4599, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4613, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("create", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4599, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("create", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4613, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.FarWriter.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("create", 0);
- /* "pywrapfst.pyx":4622
+ /* "pywrapfst.pyx":4636
* cdef unique_ptr[fst.FarWriterClass] _tfar
- * _tfar.reset(fst.FarWriterClass.Create(
+ * _tfar = fst.FarWriterClass.Create(
* path_tostring(source), # <<<<<<<<<<<<<<
* tostring(arc_type),
- * _get_far_type(tostring(far_type))))
+ * _get_far_type(tostring(far_type)))
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4622, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4636, __pyx_L1_error)
- /* "pywrapfst.pyx":4623
- * _tfar.reset(fst.FarWriterClass.Create(
+ /* "pywrapfst.pyx":4637
+ * _tfar = fst.FarWriterClass.Create(
* path_tostring(source),
* tostring(arc_type), # <<<<<<<<<<<<<<
- * _get_far_type(tostring(far_type))))
+ * _get_far_type(tostring(far_type)))
* if _tfar.get() == NULL:
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4623, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4637, __pyx_L1_error)
- /* "pywrapfst.pyx":4624
+ /* "pywrapfst.pyx":4638
* path_tostring(source),
* tostring(arc_type),
- * _get_far_type(tostring(far_type)))) # <<<<<<<<<<<<<<
+ * _get_far_type(tostring(far_type))) # <<<<<<<<<<<<<<
* if _tfar.get() == NULL:
* raise FstIOError(f"Open failed: {source!r}")
*/
- __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4624, __pyx_L1_error)
- __pyx_t_4 = __pyx_f_9pywrapfst__get_far_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4624, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4638, __pyx_L1_error)
+ __pyx_t_4 = __pyx_f_9pywrapfst__get_far_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4638, __pyx_L1_error)
- /* "pywrapfst.pyx":4621
+ /* "pywrapfst.pyx":4635
* """
* cdef unique_ptr[fst.FarWriterClass] _tfar
- * _tfar.reset(fst.FarWriterClass.Create( # <<<<<<<<<<<<<<
+ * _tfar = fst.FarWriterClass.Create( # <<<<<<<<<<<<<<
* path_tostring(source),
* tostring(arc_type),
*/
- __pyx_v__tfar.reset(fst::script::FarWriterClass::Create(__pyx_t_1, __pyx_t_2, __pyx_t_4));
+ __pyx_v__tfar = fst::script::FarWriterClass::Create(__pyx_t_1, __pyx_t_2, __pyx_t_4);
- /* "pywrapfst.pyx":4625
+ /* "pywrapfst.pyx":4639
* tostring(arc_type),
- * _get_far_type(tostring(far_type))))
+ * _get_far_type(tostring(far_type)))
* if _tfar.get() == NULL: # <<<<<<<<<<<<<<
* raise FstIOError(f"Open failed: {source!r}")
* cdef FarWriter writer = FarWriter.__new__(FarWriter)
__pyx_t_5 = ((__pyx_v__tfar.get() == NULL) != 0);
if (unlikely(__pyx_t_5)) {
- /* "pywrapfst.pyx":4626
- * _get_far_type(tostring(far_type))))
+ /* "pywrapfst.pyx":4640
+ * _get_far_type(tostring(far_type)))
* if _tfar.get() == NULL:
* raise FstIOError(f"Open failed: {source!r}") # <<<<<<<<<<<<<<
* cdef FarWriter writer = FarWriter.__new__(FarWriter)
* writer._writer = move(_tfar)
*/
- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4626, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4626, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Open_failed, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4626, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Open_failed, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_t_8 = NULL;
__pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9);
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4626, __pyx_L1_error)
+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4640, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __PYX_ERR(0, 4626, __pyx_L1_error)
+ __PYX_ERR(0, 4640, __pyx_L1_error)
- /* "pywrapfst.pyx":4625
+ /* "pywrapfst.pyx":4639
* tostring(arc_type),
- * _get_far_type(tostring(far_type))))
+ * _get_far_type(tostring(far_type)))
* if _tfar.get() == NULL: # <<<<<<<<<<<<<<
* raise FstIOError(f"Open failed: {source!r}")
* cdef FarWriter writer = FarWriter.__new__(FarWriter)
*/
}
- /* "pywrapfst.pyx":4627
+ /* "pywrapfst.pyx":4641
* if _tfar.get() == NULL:
* raise FstIOError(f"Open failed: {source!r}")
* cdef FarWriter writer = FarWriter.__new__(FarWriter) # <<<<<<<<<<<<<<
* writer._writer = move(_tfar)
* return writer
*/
- __pyx_t_6 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4627, __pyx_L1_error)
+ __pyx_t_6 = ((PyObject *)__pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4641, __pyx_L1_error)
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
__pyx_v_writer = ((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_t_6);
__pyx_t_6 = 0;
- /* "pywrapfst.pyx":4628
+ /* "pywrapfst.pyx":4642
* raise FstIOError(f"Open failed: {source!r}")
* cdef FarWriter writer = FarWriter.__new__(FarWriter)
* writer._writer = move(_tfar) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_writer) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4628, __pyx_L1_error)
+ __PYX_ERR(0, 4642, __pyx_L1_error)
}
__pyx_v_writer->_writer = fst::move<std::unique_ptr<fst::script::FarWriterClass> >(__pyx_v__tfar);
- /* "pywrapfst.pyx":4629
+ /* "pywrapfst.pyx":4643
* cdef FarWriter writer = FarWriter.__new__(FarWriter)
* writer._writer = move(_tfar)
* return writer # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_writer);
goto __pyx_L0;
- /* "pywrapfst.pyx":4599
+ /* "pywrapfst.pyx":4613
*
* @classmethod
* def create(cls, source, arc_type="standard", far_type="default"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4633
+/* "pywrapfst.pyx":4647
* # NB: Invoking this method may be dangerous: calling any other method on the
* # instance after this is invoked may result in a null dereference.
* cdef void close(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("close", 0);
- /* "pywrapfst.pyx":4634
+ /* "pywrapfst.pyx":4648
* # instance after this is invoked may result in a null dereference.
* cdef void close(self):
* self._writer.reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4634, __pyx_L1_error)
+ __PYX_ERR(0, 4648, __pyx_L1_error)
}
__pyx_v_self->_writer.reset();
- /* "pywrapfst.pyx":4633
+ /* "pywrapfst.pyx":4647
* # NB: Invoking this method may be dangerous: calling any other method on the
* # instance after this is invoked may result in a null dereference.
* cdef void close(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":4636
+/* "pywrapfst.pyx":4650
* self._writer.reset()
*
* cpdef void add(self, key, Fst ifst) except *: # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_7add)) {
__Pyx_INCREF(__pyx_t_1);
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_key, ((PyObject *)__pyx_v_ifst)};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_key, ((PyObject *)__pyx_v_ifst)};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#endif
{
- __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
if (__pyx_t_4) {
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(((PyObject *)__pyx_v_ifst));
__Pyx_GIVEREF(((PyObject *)__pyx_v_ifst));
PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_ifst));
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
#endif
}
- /* "pywrapfst.pyx":4654
+ /* "pywrapfst.pyx":4668
* # Failure here results from passing an FST with a different arc type than
* # used by the FAR was initialized to use.
* if not self._writer.get().Add(tostring(key), deref(ifst._fst)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4654, __pyx_L1_error)
+ __PYX_ERR(0, 4668, __pyx_L1_error)
}
- __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4654, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4668, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst");
- __PYX_ERR(0, 4654, __pyx_L1_error)
+ __PYX_ERR(0, 4668, __pyx_L1_error)
}
__pyx_t_8 = ((!(__pyx_v_self->_writer.get()->Add(__pyx_t_7, (*__pyx_v_ifst->_fst)) != 0)) != 0);
if (unlikely(__pyx_t_8)) {
- /* "pywrapfst.pyx":4655
+ /* "pywrapfst.pyx":4669
* # used by the FAR was initialized to use.
* if not self._writer.get().Add(tostring(key), deref(ifst._fst)):
* raise FstOpError("Incompatible or invalid arc type") # <<<<<<<<<<<<<<
*
* cpdef string arc_type(self):
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4655, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4669, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
}
__pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_Incompatible_or_invalid_arc_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Incompatible_or_invalid_arc_type);
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4655, __pyx_L1_error)
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4669, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 4655, __pyx_L1_error)
+ __PYX_ERR(0, 4669, __pyx_L1_error)
- /* "pywrapfst.pyx":4654
+ /* "pywrapfst.pyx":4668
* # Failure here results from passing an FST with a different arc type than
* # used by the FAR was initialized to use.
* if not self._writer.get().Add(tostring(key), deref(ifst._fst)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4636
+ /* "pywrapfst.pyx":4650
* self._writer.reset()
*
* cpdef void add(self, key, Fst ifst) except *: # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ifst)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4636, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4650, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 4636, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 4650, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4636, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4650, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.FarWriter.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4636, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4650, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_9FarWriter_6add(((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_v_self), __pyx_v_key, __pyx_v_ifst);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("add", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_9FarWriter_add(__pyx_v_self, __pyx_v_key, __pyx_v_ifst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4636, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4636, __pyx_L1_error)
+ __pyx_f_9pywrapfst_9FarWriter_add(__pyx_v_self, __pyx_v_key, __pyx_v_ifst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4650, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4650, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4657
+/* "pywrapfst.pyx":4671
* raise FstOpError("Incompatible or invalid arc type")
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4657, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_9arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4657, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4657, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4671, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4663
+ /* "pywrapfst.pyx":4677
* Returns a string indicating the arc type.
* """
* return self._writer.get().ArcType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4663, __pyx_L1_error)
+ __PYX_ERR(0, 4677, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_writer.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":4657
+ /* "pywrapfst.pyx":4671
* raise FstOpError("Incompatible or invalid arc type")
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4657, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4665
+/* "pywrapfst.pyx":4679
* return self._writer.get().ArcType()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4665, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_11error)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4665, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4679, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4665, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4679, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4674
+ /* "pywrapfst.pyx":4688
* True if the FarWriter is in an errorful state, False otherwise.
* """
* return self._writer.get().Error() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4674, __pyx_L1_error)
+ __PYX_ERR(0, 4688, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_writer.get()->Error();
goto __pyx_L0;
- /* "pywrapfst.pyx":4665
+ /* "pywrapfst.pyx":4679
* return self._writer.get().ArcType()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("error", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarWriter_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4665, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_9FarWriter_error(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4679, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4676
+/* "pywrapfst.pyx":4690
* return self._writer.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
#endif
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4690, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_9pywrapfst_9FarWriter_13far_type)) {
__Pyx_INCREF(__pyx_t_1);
}
__pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4676, __pyx_L1_error)
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4690, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4676, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4690, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_5;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#endif
}
- /* "pywrapfst.pyx":4682
+ /* "pywrapfst.pyx":4696
* Returns a string indicating the FAR type.
* """
* return fst.GetFarTypeString(self._writer.get().Type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer");
- __PYX_ERR(0, 4682, __pyx_L1_error)
+ __PYX_ERR(0, 4696, __pyx_L1_error)
}
__pyx_r = fst::GetFarTypeString(__pyx_v_self->_writer.get()->Type());
goto __pyx_L0;
- /* "pywrapfst.pyx":4676
+ /* "pywrapfst.pyx":4690
* return self._writer.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("far_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4690, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4685
+/* "pywrapfst.pyx":4699
*
* # Dictionary-like assignment.
* def __setitem__(self, key, Fst fst): # <<<<<<<<<<<<<<
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_9pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 4685, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_9pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 4699, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_9FarWriter_14__setitem__(((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((struct __pyx_obj_9pywrapfst_Fst *)__pyx_v_fst));
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "pywrapfst.pyx":4686
+ /* "pywrapfst.pyx":4700
* # Dictionary-like assignment.
* def __setitem__(self, key, Fst fst):
* self.add(key, fst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
- __PYX_ERR(0, 4686, __pyx_L1_error)
+ __PYX_ERR(0, 4700, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4686, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst_FarWriter *)__pyx_v_self->__pyx_vtab)->add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4700, __pyx_L1_error)
- /* "pywrapfst.pyx":4685
+ /* "pywrapfst.pyx":4699
*
* # Dictionary-like assignment.
* def __setitem__(self, key, Fst fst): # <<<<<<<<<<<<<<
0, /*tp_print*/
#endif
};
-static struct __pyx_vtabstruct_9pywrapfst_ArcIterator __pyx_vtable_9pywrapfst_ArcIterator;
+static struct __pyx_vtabstruct_9pywrapfst__ArcIterator __pyx_vtable_9pywrapfst__ArcIterator;
-static PyObject *__pyx_tp_new_9pywrapfst_ArcIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_9pywrapfst_ArcIterator *p;
+static PyObject *__pyx_tp_new_9pywrapfst__ArcIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_9pywrapfst__ArcIterator *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_9pywrapfst_ArcIterator *)o);
- p->__pyx_vtab = __pyx_vtabptr_9pywrapfst_ArcIterator;
+ p = ((struct __pyx_obj_9pywrapfst__ArcIterator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9pywrapfst__ArcIterator;
new((void*)&(p->_fst)) std::shared_ptr<fst::script::FstClass> ();
new((void*)&(p->_aiter)) std::unique_ptr<fst::script::ArcIteratorClass> ();
return o;
}
-static void __pyx_tp_dealloc_9pywrapfst_ArcIterator(PyObject *o) {
- struct __pyx_obj_9pywrapfst_ArcIterator *p = (struct __pyx_obj_9pywrapfst_ArcIterator *)o;
+static void __pyx_tp_dealloc_9pywrapfst__ArcIterator(PyObject *o) {
+ struct __pyx_obj_9pywrapfst__ArcIterator *p = (struct __pyx_obj_9pywrapfst__ArcIterator *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_specialmethod___pyx_pw_9pywrapfst_11ArcIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pywrapfst_11ArcIterator_7__next__(self);}
-
-static PyMethodDef __pyx_methods_9pywrapfst_ArcIterator[] = {
- {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pywrapfst_11ArcIterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
- {"done", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_9done, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_8done},
- {"flags", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_11flags, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_10flags},
- {"next", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_13next, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_12next},
- {"position", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_15position, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_14position},
- {"reset", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_17reset, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_16reset},
- {"seek", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_19seek, METH_O, __pyx_doc_9pywrapfst_11ArcIterator_18seek},
- {"set_flags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pywrapfst_11ArcIterator_21set_flags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pywrapfst_11ArcIterator_20set_flags},
- {"value", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_23value, METH_NOARGS, __pyx_doc_9pywrapfst_11ArcIterator_22value},
- {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_25__reduce_cython__, METH_NOARGS, 0},
- {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_27__setstate_cython__, METH_O, 0},
+static PyObject *__pyx_specialmethod___pyx_pw_9pywrapfst_12_ArcIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pywrapfst_12_ArcIterator_7__next__(self);}
+
+static PyMethodDef __pyx_methods_9pywrapfst__ArcIterator[] = {
+ {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pywrapfst_12_ArcIterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
+ {"done", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_9done, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_8done},
+ {"flags", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_11flags, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_10flags},
+ {"next", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_13next, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_12next},
+ {"position", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_15position, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_14position},
+ {"reset", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_17reset, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_16reset},
+ {"seek", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_19seek, METH_O, __pyx_doc_9pywrapfst_12_ArcIterator_18seek},
+ {"set_flags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pywrapfst_12_ArcIterator_21set_flags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pywrapfst_12_ArcIterator_20set_flags},
+ {"value", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_23value, METH_NOARGS, __pyx_doc_9pywrapfst_12_ArcIterator_22value},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_25__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_12_ArcIterator_27__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_9pywrapfst_ArcIterator = {
+static PyTypeObject __pyx_type_9pywrapfst__ArcIterator = {
PyVarObject_HEAD_INIT(0, 0)
- "pywrapfst.ArcIterator", /*tp_name*/
- sizeof(struct __pyx_obj_9pywrapfst_ArcIterator), /*tp_basicsize*/
+ "pywrapfst._ArcIterator", /*tp_name*/
+ sizeof(struct __pyx_obj_9pywrapfst__ArcIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_9pywrapfst_ArcIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_9pywrapfst__ArcIterator, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
- __pyx_pw_9pywrapfst_11ArcIterator_1__repr__, /*tp_repr*/
+ __pyx_pw_9pywrapfst_12_ArcIterator_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- "\n ArcIterator(ifst, state)\n\n This class is used for iterating over the arcs leaving some state of an FST.\n ", /*tp_doc*/
+ "\n _ArcIterator(ifst, state)\n\n This class is used for iterating over the arcs leaving some state of an FST.\n ", /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_9pywrapfst_11ArcIterator_5__iter__, /*tp_iter*/
- __pyx_pw_9pywrapfst_11ArcIterator_7__next__, /*tp_iternext*/
- __pyx_methods_9pywrapfst_ArcIterator, /*tp_methods*/
+ __pyx_pw_9pywrapfst_12_ArcIterator_5__iter__, /*tp_iter*/
+ __pyx_pw_9pywrapfst_12_ArcIterator_7__next__, /*tp_iternext*/
+ __pyx_methods_9pywrapfst__ArcIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_9pywrapfst_11ArcIterator_3__init__, /*tp_init*/
+ __pyx_pw_9pywrapfst_12_ArcIterator_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_9pywrapfst_ArcIterator, /*tp_new*/
+ __pyx_tp_new_9pywrapfst__ArcIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_print*/
#endif
};
-static struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator __pyx_vtable_9pywrapfst_MutableArcIterator;
+static struct __pyx_vtabstruct_9pywrapfst__MutableArcIterator __pyx_vtable_9pywrapfst__MutableArcIterator;
-static PyObject *__pyx_tp_new_9pywrapfst_MutableArcIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_9pywrapfst_MutableArcIterator *p;
+static PyObject *__pyx_tp_new_9pywrapfst__MutableArcIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_9pywrapfst__MutableArcIterator *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_9pywrapfst_MutableArcIterator *)o);
- p->__pyx_vtab = __pyx_vtabptr_9pywrapfst_MutableArcIterator;
+ p = ((struct __pyx_obj_9pywrapfst__MutableArcIterator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9pywrapfst__MutableArcIterator;
new((void*)&(p->_mfst)) std::shared_ptr<fst::script::MutableFstClass> ();
new((void*)&(p->_aiter)) std::unique_ptr<fst::script::MutableArcIteratorClass> ();
return o;
}
-static void __pyx_tp_dealloc_9pywrapfst_MutableArcIterator(PyObject *o) {
- struct __pyx_obj_9pywrapfst_MutableArcIterator *p = (struct __pyx_obj_9pywrapfst_MutableArcIterator *)o;
+static void __pyx_tp_dealloc_9pywrapfst__MutableArcIterator(PyObject *o) {
+ struct __pyx_obj_9pywrapfst__MutableArcIterator *p = (struct __pyx_obj_9pywrapfst__MutableArcIterator *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_9pywrapfst_MutableArcIterator[] = {
- {"done", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_8done, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_7done},
- {"flags", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_10flags, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_9flags},
- {"next", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_12next, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_11next},
- {"position", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_14position, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_13position},
- {"reset", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_16reset, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_15reset},
- {"seek", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_18seek, METH_O, __pyx_doc_9pywrapfst_18MutableArcIterator_17seek},
- {"set_flags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pywrapfst_18MutableArcIterator_20set_flags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pywrapfst_18MutableArcIterator_19set_flags},
- {"set_value", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_22set_value, METH_O, __pyx_doc_9pywrapfst_18MutableArcIterator_21set_value},
- {"value", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_24value, METH_NOARGS, __pyx_doc_9pywrapfst_18MutableArcIterator_23value},
- {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_26__reduce_cython__, METH_NOARGS, 0},
- {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_28__setstate_cython__, METH_O, 0},
+static PyObject *__pyx_specialmethod___pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__(self);}
+
+static PyMethodDef __pyx_methods_9pywrapfst__MutableArcIterator[] = {
+ {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__, METH_NOARGS|METH_COEXIST, 0},
+ {"done", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_10done, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_9done},
+ {"flags", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_12flags, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_11flags},
+ {"next", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_14next, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_13next},
+ {"position", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_16position, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_15position},
+ {"reset", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_18reset, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_17reset},
+ {"seek", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_20seek, METH_O, __pyx_doc_9pywrapfst_19_MutableArcIterator_19seek},
+ {"set_flags", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9pywrapfst_19_MutableArcIterator_22set_flags, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9pywrapfst_19_MutableArcIterator_21set_flags},
+ {"set_value", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_24set_value, METH_O, __pyx_doc_9pywrapfst_19_MutableArcIterator_23set_value},
+ {"value", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_26value, METH_NOARGS, __pyx_doc_9pywrapfst_19_MutableArcIterator_25value},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_28__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_19_MutableArcIterator_30__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_9pywrapfst_MutableArcIterator = {
+static PyTypeObject __pyx_type_9pywrapfst__MutableArcIterator = {
PyVarObject_HEAD_INIT(0, 0)
- "pywrapfst.MutableArcIterator", /*tp_name*/
- sizeof(struct __pyx_obj_9pywrapfst_MutableArcIterator), /*tp_basicsize*/
+ "pywrapfst._MutableArcIterator", /*tp_name*/
+ sizeof(struct __pyx_obj_9pywrapfst__MutableArcIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_9pywrapfst_MutableArcIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_9pywrapfst__MutableArcIterator, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
- __pyx_pw_9pywrapfst_18MutableArcIterator_1__repr__, /*tp_repr*/
+ __pyx_pw_9pywrapfst_19_MutableArcIterator_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- "\n MutableArcIterator(ifst, state)\n\n This class is used for iterating over the arcs leaving some state of an FST,\n also permitting mutation of the current arc.\n ", /*tp_doc*/
+ "\n _MutableArcIterator(ifst, state)\n\n This class is used for iterating over the arcs leaving some state of an FST,\n also permitting mutation of the current arc.\n ", /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_9pywrapfst_18MutableArcIterator_5__iter__, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_9pywrapfst_MutableArcIterator, /*tp_methods*/
+ __pyx_pw_9pywrapfst_19_MutableArcIterator_5__iter__, /*tp_iter*/
+ __pyx_pw_9pywrapfst_19_MutableArcIterator_8__next__, /*tp_iternext*/
+ __pyx_methods_9pywrapfst__MutableArcIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_9pywrapfst_18MutableArcIterator_3__init__, /*tp_init*/
+ __pyx_pw_9pywrapfst_19_MutableArcIterator_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_9pywrapfst_MutableArcIterator, /*tp_new*/
+ __pyx_tp_new_9pywrapfst__MutableArcIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_print*/
#endif
};
-static struct __pyx_vtabstruct_9pywrapfst_StateIterator __pyx_vtable_9pywrapfst_StateIterator;
+static struct __pyx_vtabstruct_9pywrapfst__StateIterator __pyx_vtable_9pywrapfst__StateIterator;
-static PyObject *__pyx_tp_new_9pywrapfst_StateIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_9pywrapfst_StateIterator *p;
+static PyObject *__pyx_tp_new_9pywrapfst__StateIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_9pywrapfst__StateIterator *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_9pywrapfst_StateIterator *)o);
- p->__pyx_vtab = __pyx_vtabptr_9pywrapfst_StateIterator;
+ p = ((struct __pyx_obj_9pywrapfst__StateIterator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_9pywrapfst__StateIterator;
new((void*)&(p->_fst)) std::shared_ptr<fst::script::FstClass> ();
new((void*)&(p->_siter)) std::unique_ptr<fst::script::StateIteratorClass> ();
return o;
}
-static void __pyx_tp_dealloc_9pywrapfst_StateIterator(PyObject *o) {
- struct __pyx_obj_9pywrapfst_StateIterator *p = (struct __pyx_obj_9pywrapfst_StateIterator *)o;
+static void __pyx_tp_dealloc_9pywrapfst__StateIterator(PyObject *o) {
+ struct __pyx_obj_9pywrapfst__StateIterator *p = (struct __pyx_obj_9pywrapfst__StateIterator *)o;
#if CYTHON_USE_TP_FINALIZE
if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
(*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_specialmethod___pyx_pw_9pywrapfst_13StateIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pywrapfst_13StateIterator_7__next__(self);}
+static PyObject *__pyx_specialmethod___pyx_pw_9pywrapfst_14_StateIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_9pywrapfst_14_StateIterator_7__next__(self);}
-static PyMethodDef __pyx_methods_9pywrapfst_StateIterator[] = {
- {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pywrapfst_13StateIterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
- {"done", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_9done, METH_NOARGS, __pyx_doc_9pywrapfst_13StateIterator_8done},
- {"next", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_11next, METH_NOARGS, __pyx_doc_9pywrapfst_13StateIterator_10next},
- {"reset", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_13reset, METH_NOARGS, __pyx_doc_9pywrapfst_13StateIterator_12reset},
- {"value", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_15value, METH_NOARGS, __pyx_doc_9pywrapfst_13StateIterator_14value},
- {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_17__reduce_cython__, METH_NOARGS, 0},
- {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_19__setstate_cython__, METH_O, 0},
+static PyMethodDef __pyx_methods_9pywrapfst__StateIterator[] = {
+ {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_9pywrapfst_14_StateIterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
+ {"done", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_9done, METH_NOARGS, __pyx_doc_9pywrapfst_14_StateIterator_8done},
+ {"next", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_11next, METH_NOARGS, __pyx_doc_9pywrapfst_14_StateIterator_10next},
+ {"reset", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_13reset, METH_NOARGS, __pyx_doc_9pywrapfst_14_StateIterator_12reset},
+ {"value", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_15value, METH_NOARGS, __pyx_doc_9pywrapfst_14_StateIterator_14value},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_17__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9pywrapfst_14_StateIterator_19__setstate_cython__, METH_O, 0},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_9pywrapfst_StateIterator = {
+static PyTypeObject __pyx_type_9pywrapfst__StateIterator = {
PyVarObject_HEAD_INIT(0, 0)
- "pywrapfst.StateIterator", /*tp_name*/
- sizeof(struct __pyx_obj_9pywrapfst_StateIterator), /*tp_basicsize*/
+ "pywrapfst._StateIterator", /*tp_name*/
+ sizeof(struct __pyx_obj_9pywrapfst__StateIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_9pywrapfst_StateIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_9pywrapfst__StateIterator, /*tp_dealloc*/
#if PY_VERSION_HEX < 0x030800b4
0, /*tp_print*/
#endif
#if PY_MAJOR_VERSION >= 3
0, /*tp_as_async*/
#endif
- __pyx_pw_9pywrapfst_13StateIterator_1__repr__, /*tp_repr*/
+ __pyx_pw_9pywrapfst_14_StateIterator_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- "\n StateIterator(ifst)\n\n This class is used for iterating over the states in an FST.\n ", /*tp_doc*/
+ "\n _StateIterator(ifst)\n\n This class is used for iterating over the states in an FST.\n ", /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_9pywrapfst_13StateIterator_5__iter__, /*tp_iter*/
- __pyx_pw_9pywrapfst_13StateIterator_7__next__, /*tp_iternext*/
- __pyx_methods_9pywrapfst_StateIterator, /*tp_methods*/
+ __pyx_pw_9pywrapfst_14_StateIterator_5__iter__, /*tp_iter*/
+ __pyx_pw_9pywrapfst_14_StateIterator_7__next__, /*tp_iternext*/
+ __pyx_methods_9pywrapfst__StateIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_9pywrapfst_13StateIterator_3__init__, /*tp_init*/
+ __pyx_pw_9pywrapfst_14_StateIterator_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_9pywrapfst_StateIterator, /*tp_new*/
+ __pyx_tp_new_9pywrapfst__StateIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
{0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 147, __pyx_L1_error)
- __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 157, __pyx_L1_error)
- __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 162, __pyx_L1_error)
- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 167, __pyx_L1_error)
- __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1420, __pyx_L1_error)
- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 196, __pyx_L1_error)
- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 425, __pyx_L1_error)
- __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 746, __pyx_L1_error)
- __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1286, __pyx_L1_error)
- __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 4557, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 149, __pyx_L1_error)
+ __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 159, __pyx_L1_error)
+ __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 164, __pyx_L1_error)
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 169, __pyx_L1_error)
+ __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1422, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 198, __pyx_L1_error)
+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 427, __pyx_L1_error)
+ __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 748, __pyx_L1_error)
+ __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1288, __pyx_L1_error)
+ __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 4571, __pyx_L1_error)
return 0;
__pyx_L1_error:;
return -1;
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- /* "pywrapfst.pyx":1578
+ /* "pywrapfst.pyx":1580
* @staticmethod
* cdef string _local_render_svg(const string &dot):
* proc = subprocess.Popen(("dot", "-Tsvg"), # <<<<<<<<<<<<<<
* stdin=subprocess.PIPE,
* stdout=subprocess.PIPE)
*/
- __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_u_dot, __pyx_kp_u_Tsvg); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_u_dot, __pyx_kp_u_Tsvg); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_tuple__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_tuple__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
__Pyx_GOTREF(__pyx_tuple__58);
__Pyx_GIVEREF(__pyx_tuple__58);
- /* "pywrapfst.pyx":514
+ /* "pywrapfst.pyx":516
*
*
* def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* plus(lhs, rhs)
*/
- __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 514, __pyx_L1_error)
+ __pyx_tuple__59 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__59);
__Pyx_GIVEREF(__pyx_tuple__59);
- __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_plus, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 514, __pyx_L1_error)
+ __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_plus, 516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 516, __pyx_L1_error)
- /* "pywrapfst.pyx":546
+ /* "pywrapfst.pyx":548
*
*
* def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* times(lhs, rhs)
*/
- __pyx_tuple__61 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_tuple__61 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__61);
__Pyx_GIVEREF(__pyx_tuple__61);
- __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_times, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_times, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 548, __pyx_L1_error)
- /* "pywrapfst.pyx":578
+ /* "pywrapfst.pyx":580
*
*
* def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* divide(lhs, rhs)
*/
- __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 578, __pyx_L1_error)
+ __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__63);
__Pyx_GIVEREF(__pyx_tuple__63);
- __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_divide, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 578, __pyx_L1_error)
+ __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_divide, 580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 580, __pyx_L1_error)
- /* "pywrapfst.pyx":611
+ /* "pywrapfst.pyx":613
*
*
* def power(Weight w, size_t n): # <<<<<<<<<<<<<<
* """
* power(lhs, rhs)
*/
- __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __pyx_tuple__65 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__65);
__Pyx_GIVEREF(__pyx_tuple__65);
- __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_power, 611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_power, 613, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 613, __pyx_L1_error)
- /* "pywrapfst.pyx":1421
+ /* "pywrapfst.pyx":1423
*
* @staticmethod
* def read_from_string(state): # <<<<<<<<<<<<<<
* """
* read_from_string(state)
*/
- __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1421, __pyx_L1_error)
+ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__67);
__Pyx_GIVEREF(__pyx_tuple__67);
- __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read_from_string, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1421, __pyx_L1_error)
+ __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_read_from_string, 1423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1423, __pyx_L1_error)
- /* "pywrapfst.pyx":4135
+ /* "pywrapfst.pyx":4149
*
*
* def shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
* float delta=fst.kShortestDelta,
* int64 nstate=fst.kNoStateId,
*/
- __pyx_tuple__69 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __pyx_tuple__69 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__69);
__Pyx_GIVEREF(__pyx_tuple__69);
- __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_shortestdistance, 4135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pywrapfst_pyx, __pyx_n_s_shortestdistance, 4149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 4149, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
if (__Pyx_ExportFunction("_get_compose_filter", (void (*)(void))__pyx_f_9pywrapfst__get_compose_filter, "enum fst::ComposeFilter (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
if (__Pyx_ExportFunction("_get_determinize_type", (void (*)(void))__pyx_f_9pywrapfst__get_determinize_type, "enum fst::DeterminizeType (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
if (__Pyx_ExportFunction("_get_queue_type", (void (*)(void))__pyx_f_9pywrapfst__get_queue_type, "enum fst::QueueType (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
- if (__Pyx_ExportFunction("_get_rand_arc_selection", (void (*)(void))__pyx_f_9pywrapfst__get_rand_arc_selection, "enum fst::script::RandArcSelection (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (__Pyx_ExportFunction("_get_rand_arc_selection", (void (*)(void))__pyx_f_9pywrapfst__get_rand_arc_selection, "fst::script::RandArcSelection (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
if (__Pyx_ExportFunction("_get_replace_label_type", (void (*)(void))__pyx_f_9pywrapfst__get_replace_label_type, "enum fst::ReplaceLabelType (std::string const &, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
if (__Pyx_ExportFunction("_get_WeightClass_or_one", (void (*)(void))__pyx_f_9pywrapfst__get_WeightClass_or_one, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
if (__Pyx_ExportFunction("_get_WeightClass_or_zero", (void (*)(void))__pyx_f_9pywrapfst__get_WeightClass_or_zero, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_vtable_9pywrapfst_Weight.to_string = (std::string (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_to_string;
__pyx_vtable_9pywrapfst_Weight.type = (std::string (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_type;
__pyx_vtable_9pywrapfst_Weight.member = (bool (*)(struct __pyx_obj_9pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_6Weight_member;
- if (PyType_Ready(&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_Weight.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Weight.tp_dictoffset && __pyx_type_9pywrapfst_Weight.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_Weight.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Weight.tp_dict, __pyx_vtabptr_9pywrapfst_Weight) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight_2, (PyObject *)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Weight.tp_dict, __pyx_vtabptr_9pywrapfst_Weight) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight_2, (PyObject *)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Weight) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
__pyx_ptype_9pywrapfst_Weight = &__pyx_type_9pywrapfst_Weight;
__pyx_vtabptr_9pywrapfst_SymbolTableView = &__pyx_vtable_9pywrapfst_SymbolTableView;
__pyx_vtable_9pywrapfst_SymbolTableView._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_15SymbolTableView__raw;
__pyx_vtable_9pywrapfst_SymbolTableView.write = (void (*)(struct __pyx_obj_9pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_15SymbolTableView_write;
__pyx_vtable_9pywrapfst_SymbolTableView.write_text = (void (*)(struct __pyx_obj_9pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_15SymbolTableView_write_text;
__pyx_vtable_9pywrapfst_SymbolTableView.write_to_string = (PyObject *(*)(struct __pyx_obj_9pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_15SymbolTableView_write_to_string;
- if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_SymbolTableView.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_SymbolTableView.tp_dictoffset && __pyx_type_9pywrapfst_SymbolTableView.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_SymbolTableView.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableView, (PyObject *)&__pyx_type_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 731, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableView, (PyObject *)&__pyx_type_9pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
__pyx_ptype_9pywrapfst_SymbolTableView = &__pyx_type_9pywrapfst_SymbolTableView;
__pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTableView = &__pyx_vtable_9pywrapfst__EncodeMapperSymbolTableView;
__pyx_vtable_9pywrapfst__EncodeMapperSymbolTableView.__pyx_base = *__pyx_vtabptr_9pywrapfst_SymbolTableView;
__pyx_vtable_9pywrapfst__EncodeMapperSymbolTableView.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_28_EncodeMapperSymbolTableView__raw;
__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_base = __pyx_ptype_9pywrapfst_SymbolTableView;
- if (PyType_Ready(&__pyx_type_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_dictoffset && __pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__EncodeMapperSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
__pyx_ptype_9pywrapfst__EncodeMapperSymbolTableView = &__pyx_type_9pywrapfst__EncodeMapperSymbolTableView;
__pyx_vtabptr_9pywrapfst__FstSymbolTableView = &__pyx_vtable_9pywrapfst__FstSymbolTableView;
__pyx_vtable_9pywrapfst__FstSymbolTableView.__pyx_base = *__pyx_vtabptr_9pywrapfst_SymbolTableView;
__pyx_vtable_9pywrapfst__FstSymbolTableView.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_19_FstSymbolTableView__raw;
__pyx_type_9pywrapfst__FstSymbolTableView.tp_base = __pyx_ptype_9pywrapfst_SymbolTableView;
- if (PyType_Ready(&__pyx_type_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 960, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst__FstSymbolTableView.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__FstSymbolTableView.tp_dictoffset && __pyx_type_9pywrapfst__FstSymbolTableView.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst__FstSymbolTableView.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst__FstSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__FstSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 960, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 960, __pyx_L1_error)
__pyx_ptype_9pywrapfst__FstSymbolTableView = &__pyx_type_9pywrapfst__FstSymbolTableView;
__pyx_vtabptr_9pywrapfst__MutableSymbolTable = &__pyx_vtable_9pywrapfst__MutableSymbolTable;
__pyx_vtable_9pywrapfst__MutableSymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst_SymbolTableView;
__pyx_vtable_9pywrapfst__MutableSymbolTable.add_table = (void (*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *, struct __pyx_obj_9pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableSymbolTable_add_table;
__pyx_vtable_9pywrapfst__MutableSymbolTable.set_name = (void (*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableSymbolTable_set_name;
__pyx_type_9pywrapfst__MutableSymbolTable.tp_base = __pyx_ptype_9pywrapfst_SymbolTableView;
- if (PyType_Ready(&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst__MutableSymbolTable.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableSymbolTable.tp_dictoffset && __pyx_type_9pywrapfst__MutableSymbolTable.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst__MutableSymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableSymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *)&__pyx_type_9pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
__pyx_ptype_9pywrapfst__MutableSymbolTable = &__pyx_type_9pywrapfst__MutableSymbolTable;
__pyx_vtabptr_9pywrapfst__MutableFstSymbolTableView = &__pyx_vtable_9pywrapfst__MutableFstSymbolTableView;
__pyx_vtable_9pywrapfst__MutableFstSymbolTableView.__pyx_base = *__pyx_vtabptr_9pywrapfst__MutableSymbolTable;
__pyx_vtable_9pywrapfst__MutableFstSymbolTableView.__pyx_base._mutable_raw = (fst::SymbolTable *(*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *))__pyx_f_9pywrapfst_26_MutableFstSymbolTableView__mutable_raw;
__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_base = __pyx_ptype_9pywrapfst__MutableSymbolTable;
- if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_dictoffset && __pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1053, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFstSymbolTableView.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTableView, (PyObject *)&__pyx_type_9pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1055, __pyx_L1_error)
__pyx_ptype_9pywrapfst__MutableFstSymbolTableView = &__pyx_type_9pywrapfst__MutableFstSymbolTableView;
__pyx_vtabptr_9pywrapfst_SymbolTable = &__pyx_vtable_9pywrapfst_SymbolTable;
__pyx_vtable_9pywrapfst_SymbolTable.__pyx_base = *__pyx_vtabptr_9pywrapfst__MutableSymbolTable;
__pyx_vtable_9pywrapfst_SymbolTable.__pyx_base._mutable_raw = (fst::SymbolTable *(*)(struct __pyx_obj_9pywrapfst__MutableSymbolTable *))__pyx_f_9pywrapfst_11SymbolTable__mutable_raw;
__pyx_type_9pywrapfst_SymbolTable.tp_base = __pyx_ptype_9pywrapfst__MutableSymbolTable;
- if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_SymbolTable.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_SymbolTable.tp_dictoffset && __pyx_type_9pywrapfst_SymbolTable.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_SymbolTable.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *)&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1068, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_SymbolTable.tp_dict, __pyx_vtabptr_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *)&__pyx_type_9pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
__pyx_ptype_9pywrapfst_SymbolTable = &__pyx_type_9pywrapfst_SymbolTable;
- if (PyType_Ready(&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1264, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1266, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst__SymbolTableIterator.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__SymbolTableIterator.tp_dictoffset && __pyx_type_9pywrapfst__SymbolTableIterator.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst__SymbolTableIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *)&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1264, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1264, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *)&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1266, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1266, __pyx_L1_error)
__pyx_ptype_9pywrapfst__SymbolTableIterator = &__pyx_type_9pywrapfst__SymbolTableIterator;
__pyx_vtabptr_9pywrapfst_EncodeMapper = &__pyx_vtable_9pywrapfst_EncodeMapper;
__pyx_vtable_9pywrapfst_EncodeMapper.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_arc_type;
__pyx_vtable_9pywrapfst_EncodeMapper.output_symbols = (struct __pyx_obj_9pywrapfst__EncodeMapperSymbolTableView *(*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12EncodeMapper_output_symbols;
__pyx_vtable_9pywrapfst_EncodeMapper._set_input_symbols = (void (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_12EncodeMapper__set_input_symbols;
__pyx_vtable_9pywrapfst_EncodeMapper._set_output_symbols = (void (*)(struct __pyx_obj_9pywrapfst_EncodeMapper *, struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_12EncodeMapper__set_output_symbols;
- if (PyType_Ready(&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_EncodeMapper.tp_print = 0;
#endif
}
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1296, __pyx_L1_error)
+ PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_9pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1298, __pyx_L1_error)
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
__pyx_wrapperbase_9pywrapfst_12EncodeMapper_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
__pyx_wrapperbase_9pywrapfst_12EncodeMapper_4__call__.doc = __pyx_doc_9pywrapfst_12EncodeMapper_4__call__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_EncodeMapper.tp_dict, __pyx_vtabptr_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_EncodeMapper.tp_dict, __pyx_vtabptr_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *)&__pyx_type_9pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1298, __pyx_L1_error)
__pyx_ptype_9pywrapfst_EncodeMapper = &__pyx_type_9pywrapfst_EncodeMapper;
__pyx_vtabptr_9pywrapfst_Fst = &__pyx_vtable_9pywrapfst_Fst;
__pyx_vtable_9pywrapfst_Fst._local_render_svg = (std::string (*)(std::string const &))__pyx_f_9pywrapfst_3Fst__local_render_svg;
__pyx_vtable_9pywrapfst_Fst.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_arc_type;
- __pyx_vtable_9pywrapfst_Fst.arcs = (struct __pyx_obj_9pywrapfst_ArcIterator *(*)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_arcs;
+ __pyx_vtable_9pywrapfst_Fst.arcs = (struct __pyx_obj_9pywrapfst__ArcIterator *(*)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_arcs;
__pyx_vtable_9pywrapfst_Fst.copy = (struct __pyx_obj_9pywrapfst_Fst *(*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_copy;
__pyx_vtable_9pywrapfst_Fst.draw = (void (*)(struct __pyx_obj_9pywrapfst_Fst *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_draw *__pyx_optional_args))__pyx_f_9pywrapfst_3Fst_draw;
__pyx_vtable_9pywrapfst_Fst.final = (struct __pyx_obj_9pywrapfst_Weight *(*)(struct __pyx_obj_9pywrapfst_Fst *, int64, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_final;
__pyx_vtable_9pywrapfst_Fst.output_symbols = (struct __pyx_obj_9pywrapfst__FstSymbolTableView *(*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_output_symbols;
__pyx_vtable_9pywrapfst_Fst.print = (std::string (*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_3Fst_print *__pyx_optional_args))__pyx_f_9pywrapfst_3Fst_print;
__pyx_vtable_9pywrapfst_Fst.start = (int64 (*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_start;
- __pyx_vtable_9pywrapfst_Fst.states = (struct __pyx_obj_9pywrapfst_StateIterator *(*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_states;
+ __pyx_vtable_9pywrapfst_Fst.states = (struct __pyx_obj_9pywrapfst__StateIterator *(*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_states;
__pyx_vtable_9pywrapfst_Fst.verify = (bool (*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_verify;
__pyx_vtable_9pywrapfst_Fst.weight_type = (std::string (*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_weight_type;
__pyx_vtable_9pywrapfst_Fst.write = (void (*)(struct __pyx_obj_9pywrapfst_Fst *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_write;
__pyx_vtable_9pywrapfst_Fst.write_to_string = (PyObject *(*)(struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Fst_write_to_string;
- if (PyType_Ready(&__pyx_type_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1565, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_Fst.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Fst.tp_dictoffset && __pyx_type_9pywrapfst_Fst.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_Fst.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Fst.tp_dict, __pyx_vtabptr_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *)&__pyx_type_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1563, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Fst.tp_dict, __pyx_vtabptr_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1565, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *)&__pyx_type_9pywrapfst_Fst) < 0) __PYX_ERR(0, 1565, __pyx_L1_error)
__pyx_ptype_9pywrapfst_Fst = &__pyx_type_9pywrapfst_Fst;
__pyx_vtabptr_9pywrapfst_MutableFst = &__pyx_vtable_9pywrapfst_MutableFst;
__pyx_vtable_9pywrapfst_MutableFst.__pyx_base = *__pyx_vtabptr_9pywrapfst_Fst;
__pyx_vtable_9pywrapfst_MutableFst._encode = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_obj_9pywrapfst_EncodeMapper *))__pyx_f_9pywrapfst_10MutableFst__encode;
__pyx_vtable_9pywrapfst_MutableFst._invert = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *))__pyx_f_9pywrapfst_10MutableFst__invert;
__pyx_vtable_9pywrapfst_MutableFst._minimize = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_opt_args_9pywrapfst_10MutableFst__minimize *__pyx_optional_args))__pyx_f_9pywrapfst_10MutableFst__minimize;
- __pyx_vtable_9pywrapfst_MutableFst.mutable_arcs = (struct __pyx_obj_9pywrapfst_MutableArcIterator *(*)(struct __pyx_obj_9pywrapfst_MutableFst *, int64, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_10MutableFst_mutable_arcs;
+ __pyx_vtable_9pywrapfst_MutableFst.mutable_arcs = (struct __pyx_obj_9pywrapfst__MutableArcIterator *(*)(struct __pyx_obj_9pywrapfst_MutableFst *, int64, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_10MutableFst_mutable_arcs;
__pyx_vtable_9pywrapfst_MutableFst.num_states = (int64 (*)(struct __pyx_obj_9pywrapfst_MutableFst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_10MutableFst_num_states;
__pyx_vtable_9pywrapfst_MutableFst._project = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *, PyObject *))__pyx_f_9pywrapfst_10MutableFst__project;
__pyx_vtable_9pywrapfst_MutableFst._prune = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_opt_args_9pywrapfst_10MutableFst__prune *__pyx_optional_args))__pyx_f_9pywrapfst_10MutableFst__prune;
__pyx_vtable_9pywrapfst_MutableFst._set_output_symbols = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *, struct __pyx_obj_9pywrapfst_SymbolTableView *))__pyx_f_9pywrapfst_10MutableFst__set_output_symbols;
__pyx_vtable_9pywrapfst_MutableFst._topsort = (void (*)(struct __pyx_obj_9pywrapfst_MutableFst *))__pyx_f_9pywrapfst_10MutableFst__topsort;
__pyx_type_9pywrapfst_MutableFst.tp_base = __pyx_ptype_9pywrapfst_Fst;
- if (PyType_Ready(&__pyx_type_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2028, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_MutableFst.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_MutableFst.tp_dictoffset && __pyx_type_9pywrapfst_MutableFst.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_MutableFst.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2028, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *)&__pyx_type_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2028, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *)&__pyx_type_9pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2030, __pyx_L1_error)
__pyx_ptype_9pywrapfst_MutableFst = &__pyx_type_9pywrapfst_MutableFst;
__pyx_vtabptr_9pywrapfst_VectorFst = &__pyx_vtable_9pywrapfst_VectorFst;
__pyx_vtable_9pywrapfst_VectorFst.__pyx_base = *__pyx_vtabptr_9pywrapfst_MutableFst;
__pyx_type_9pywrapfst_VectorFst.tp_base = __pyx_ptype_9pywrapfst_MutableFst;
- if (PyType_Ready(&__pyx_type_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2890, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2892, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_VectorFst.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_VectorFst.tp_dictoffset && __pyx_type_9pywrapfst_VectorFst.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_VectorFst.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_VectorFst.tp_dict, __pyx_vtabptr_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2890, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VectorFst, (PyObject *)&__pyx_type_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2890, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_VectorFst.tp_dict, __pyx_vtabptr_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2892, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VectorFst, (PyObject *)&__pyx_type_9pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2892, __pyx_L1_error)
__pyx_ptype_9pywrapfst_VectorFst = &__pyx_type_9pywrapfst_VectorFst;
__pyx_vtabptr_9pywrapfst_Arc = &__pyx_vtable_9pywrapfst_Arc;
__pyx_vtable_9pywrapfst_Arc.copy = (struct __pyx_obj_9pywrapfst_Arc *(*)(struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_3Arc_copy;
- if (PyType_Ready(&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3073, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3075, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_Arc.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Arc.tp_dictoffset && __pyx_type_9pywrapfst_Arc.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_Arc.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3073, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3073, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3073, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3075, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3075, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 3075, __pyx_L1_error)
__pyx_ptype_9pywrapfst_Arc = &__pyx_type_9pywrapfst_Arc;
- __pyx_vtabptr_9pywrapfst_ArcIterator = &__pyx_vtable_9pywrapfst_ArcIterator;
- __pyx_vtable_9pywrapfst_ArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_done;
- __pyx_vtable_9pywrapfst_ArcIterator.flags = (uint8 (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_flags;
- __pyx_vtable_9pywrapfst_ArcIterator.next = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_next;
- __pyx_vtable_9pywrapfst_ArcIterator.position = (size_t (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_position;
- __pyx_vtable_9pywrapfst_ArcIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_reset;
- __pyx_vtable_9pywrapfst_ArcIterator.seek = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, size_t, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_seek;
- __pyx_vtable_9pywrapfst_ArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst_ArcIterator *, uint8, uint8, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_set_flags;
- __pyx_vtable_9pywrapfst_ArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst_ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_11ArcIterator_value;
- if (PyType_Ready(&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 3140, __pyx_L1_error)
+ __pyx_vtabptr_9pywrapfst__ArcIterator = &__pyx_vtable_9pywrapfst__ArcIterator;
+ __pyx_vtable_9pywrapfst__ArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_done;
+ __pyx_vtable_9pywrapfst__ArcIterator.flags = (uint8 (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_flags;
+ __pyx_vtable_9pywrapfst__ArcIterator.next = (void (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_next;
+ __pyx_vtable_9pywrapfst__ArcIterator.position = (size_t (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_position;
+ __pyx_vtable_9pywrapfst__ArcIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_reset;
+ __pyx_vtable_9pywrapfst__ArcIterator.seek = (void (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, size_t, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_seek;
+ __pyx_vtable_9pywrapfst__ArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst__ArcIterator *, uint8, uint8, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_set_flags;
+ __pyx_vtable_9pywrapfst__ArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_12_ArcIterator_value;
+ if (PyType_Ready(&__pyx_type_9pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3145, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9pywrapfst_ArcIterator.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_ArcIterator.tp_dictoffset && __pyx_type_9pywrapfst_ArcIterator.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9pywrapfst_ArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 3140, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 3140, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 3140, __pyx_L1_error)
- __pyx_ptype_9pywrapfst_ArcIterator = &__pyx_type_9pywrapfst_ArcIterator;
- __pyx_vtabptr_9pywrapfst_MutableArcIterator = &__pyx_vtable_9pywrapfst_MutableArcIterator;
- __pyx_vtable_9pywrapfst_MutableArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_done;
- __pyx_vtable_9pywrapfst_MutableArcIterator.flags = (uint8 (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_flags;
- __pyx_vtable_9pywrapfst_MutableArcIterator.next = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_next;
- __pyx_vtable_9pywrapfst_MutableArcIterator.position = (size_t (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_position;
- __pyx_vtable_9pywrapfst_MutableArcIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_reset;
- __pyx_vtable_9pywrapfst_MutableArcIterator.seek = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, size_t, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_seek;
- __pyx_vtable_9pywrapfst_MutableArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, uint8, uint8, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_set_flags;
- __pyx_vtable_9pywrapfst_MutableArcIterator.set_value = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_set_value;
- __pyx_vtable_9pywrapfst_MutableArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_18MutableArcIterator_value;
- if (PyType_Ready(&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __pyx_type_9pywrapfst__ArcIterator.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__ArcIterator.tp_dictoffset && __pyx_type_9pywrapfst__ArcIterator.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9pywrapfst__ArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3145, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *)&__pyx_type_9pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3145, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3145, __pyx_L1_error)
+ __pyx_ptype_9pywrapfst__ArcIterator = &__pyx_type_9pywrapfst__ArcIterator;
+ __pyx_vtabptr_9pywrapfst__MutableArcIterator = &__pyx_vtable_9pywrapfst__MutableArcIterator;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_done;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.flags = (uint8 (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_flags;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.next = (void (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_next;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.position = (size_t (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_position;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_reset;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.seek = (void (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, size_t, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_seek;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.set_flags = (void (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, uint8, uint8, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_set_flags;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.set_value = (void (*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, struct __pyx_obj_9pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_set_value;
+ __pyx_vtable_9pywrapfst__MutableArcIterator.value = (PyObject *(*)(struct __pyx_obj_9pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_19_MutableArcIterator_value;
+ if (PyType_Ready(&__pyx_type_9pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3256, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9pywrapfst_MutableArcIterator.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_MutableArcIterator.tp_dictoffset && __pyx_type_9pywrapfst_MutableArcIterator.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9pywrapfst_MutableArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
- __pyx_ptype_9pywrapfst_MutableArcIterator = &__pyx_type_9pywrapfst_MutableArcIterator;
- __pyx_vtabptr_9pywrapfst_StateIterator = &__pyx_vtable_9pywrapfst_StateIterator;
- __pyx_vtable_9pywrapfst_StateIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_done;
- __pyx_vtable_9pywrapfst_StateIterator.next = (void (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_next;
- __pyx_vtable_9pywrapfst_StateIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_reset;
- __pyx_vtable_9pywrapfst_StateIterator.value = (int64 (*)(struct __pyx_obj_9pywrapfst_StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_13StateIterator_value;
- if (PyType_Ready(&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3371, __pyx_L1_error)
+ __pyx_type_9pywrapfst__MutableArcIterator.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__MutableArcIterator.tp_dictoffset && __pyx_type_9pywrapfst__MutableArcIterator.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9pywrapfst__MutableArcIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3256, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *)&__pyx_type_9pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3256, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3256, __pyx_L1_error)
+ __pyx_ptype_9pywrapfst__MutableArcIterator = &__pyx_type_9pywrapfst__MutableArcIterator;
+ __pyx_vtabptr_9pywrapfst__StateIterator = &__pyx_vtable_9pywrapfst__StateIterator;
+ __pyx_vtable_9pywrapfst__StateIterator.done = (bool (*)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_14_StateIterator_done;
+ __pyx_vtable_9pywrapfst__StateIterator.next = (void (*)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_14_StateIterator_next;
+ __pyx_vtable_9pywrapfst__StateIterator.reset = (void (*)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_14_StateIterator_reset;
+ __pyx_vtable_9pywrapfst__StateIterator.value = (int64 (*)(struct __pyx_obj_9pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_14_StateIterator_value;
+ if (PyType_Ready(&__pyx_type_9pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9pywrapfst_StateIterator.tp_print = 0;
+ __pyx_type_9pywrapfst__StateIterator.tp_print = 0;
#endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_StateIterator.tp_dictoffset && __pyx_type_9pywrapfst_StateIterator.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9pywrapfst_StateIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst__StateIterator.tp_dictoffset && __pyx_type_9pywrapfst__StateIterator.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9pywrapfst__StateIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3371, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3371, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3371, __pyx_L1_error)
- __pyx_ptype_9pywrapfst_StateIterator = &__pyx_type_9pywrapfst_StateIterator;
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *)&__pyx_type_9pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3384, __pyx_L1_error)
+ __pyx_ptype_9pywrapfst__StateIterator = &__pyx_type_9pywrapfst__StateIterator;
__pyx_vtabptr_9pywrapfst_Compiler = &__pyx_vtable_9pywrapfst_Compiler;
__pyx_vtable_9pywrapfst_Compiler.compile = (struct __pyx_obj_9pywrapfst_Fst *(*)(struct __pyx_obj_9pywrapfst_Compiler *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_8Compiler_compile;
__pyx_vtable_9pywrapfst_Compiler.write = (void (*)(struct __pyx_obj_9pywrapfst_Compiler *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_8Compiler_write;
- if (PyType_Ready(&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4280, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4294, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_Compiler.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_Compiler.tp_dictoffset && __pyx_type_9pywrapfst_Compiler.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_Compiler.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4280, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4280, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4280, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4294, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4294, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4294, __pyx_L1_error)
__pyx_ptype_9pywrapfst_Compiler = &__pyx_type_9pywrapfst_Compiler;
__pyx_vtabptr_9pywrapfst_FarReader = &__pyx_vtable_9pywrapfst_FarReader;
__pyx_vtable_9pywrapfst_FarReader.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_arc_type;
__pyx_vtable_9pywrapfst_FarReader.get_key = (std::string (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_get_key;
__pyx_vtable_9pywrapfst_FarReader.next = (void (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_next;
__pyx_vtable_9pywrapfst_FarReader.reset = (void (*)(struct __pyx_obj_9pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarReader_reset;
- if (PyType_Ready(&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4417, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4431, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_FarReader.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_FarReader.tp_dictoffset && __pyx_type_9pywrapfst_FarReader.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_FarReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4417, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarReader, (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4417, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4417, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4431, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarReader, (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4431, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4431, __pyx_L1_error)
__pyx_ptype_9pywrapfst_FarReader = &__pyx_type_9pywrapfst_FarReader;
__pyx_vtabptr_9pywrapfst_FarWriter = &__pyx_vtable_9pywrapfst_FarWriter;
__pyx_vtable_9pywrapfst_FarWriter.arc_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_arc_type;
__pyx_vtable_9pywrapfst_FarWriter.add = (void (*)(struct __pyx_obj_9pywrapfst_FarWriter *, PyObject *, struct __pyx_obj_9pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_add;
__pyx_vtable_9pywrapfst_FarWriter.error = (bool (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_error;
__pyx_vtable_9pywrapfst_FarWriter.far_type = (std::string (*)(struct __pyx_obj_9pywrapfst_FarWriter *, int __pyx_skip_dispatch))__pyx_f_9pywrapfst_9FarWriter_far_type;
- if (PyType_Ready(&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4572, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4586, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst_FarWriter.tp_print = 0;
#endif
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9pywrapfst_FarWriter.tp_dictoffset && __pyx_type_9pywrapfst_FarWriter.tp_getattro == PyObject_GenericGetAttr)) {
__pyx_type_9pywrapfst_FarWriter.tp_getattro = __Pyx_PyObject_GenericGetAttr;
}
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4572, __pyx_L1_error)
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarWriter, (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4572, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4572, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4586, __pyx_L1_error)
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FarWriter, (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4586, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4586, __pyx_L1_error)
__pyx_ptype_9pywrapfst_FarWriter = &__pyx_type_9pywrapfst_FarWriter;
- if (PyType_Ready(&__pyx_type_9pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3271, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3276, __pyx_L1_error)
#if PY_VERSION_HEX < 0x030800B1
__pyx_type_9pywrapfst___pyx_scope_struct____iter__.tp_print = 0;
#endif
if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
#endif
- /* "pywrapfst.pyx":99
+ /* "pywrapfst.pyx":101
*
* # Python imports.
* import logging # <<<<<<<<<<<<<<
* import enum
* import numbers
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":100
+ /* "pywrapfst.pyx":102
* # Python imports.
* import logging
* import enum # <<<<<<<<<<<<<<
* import numbers
* import os
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":101
+ /* "pywrapfst.pyx":103
* import logging
* import enum
* import numbers # <<<<<<<<<<<<<<
* import os
* import subprocess
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":102
+ /* "pywrapfst.pyx":104
* import enum
* import numbers
* import os # <<<<<<<<<<<<<<
* import subprocess
* import sys
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":103
+ /* "pywrapfst.pyx":105
* import numbers
* import os
* import subprocess # <<<<<<<<<<<<<<
* import sys
*
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_subprocess, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_subprocess, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_1) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":104
+ /* "pywrapfst.pyx":106
* import os
* import subprocess
* import sys # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":111
+ /* "pywrapfst.pyx":113
* # These defintions only ensure that these are defined to avoid attribute errors,
* # but don't actually contain the type definitions. Those are in _pywrapfst.pyi.
* import typing # <<<<<<<<<<<<<<
*
* ArcMapType = """typing.Literal["identity", "input_epsilon", "invert",
*/
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_typing, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_1) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_1) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":113
+ /* "pywrapfst.pyx":115
* import typing
*
* ArcMapType = """typing.Literal["identity", "input_epsilon", "invert", # <<<<<<<<<<<<<<
* "output_epsilon", "plus", "power", "quantize",
* "rmweight", "superfinal", "times", "to_log",
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_kp_u_typing_Literal_identity_input_ep) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_kp_u_typing_Literal_identity_input_ep) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
- /* "pywrapfst.pyx":118
+ /* "pywrapfst.pyx":120
* # NOTE: Both spellings of "to_std"
* "to_log64", "to_std", "to_standard"]"""
* ComposeFilter = """typing.Literal["alt_sequence", "auto", "match", "no_match", # <<<<<<<<<<<<<<
* "null", "sequence", "trivial"]"""
* DeterminizeType = """typing.Literal["functional", "nonfunctional",
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_kp_u_typing_Literal_alt_sequence_auto) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_kp_u_typing_Literal_alt_sequence_auto) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
- /* "pywrapfst.pyx":120
+ /* "pywrapfst.pyx":122
* ComposeFilter = """typing.Literal["alt_sequence", "auto", "match", "no_match",
* "null", "sequence", "trivial"]"""
* DeterminizeType = """typing.Literal["functional", "nonfunctional", # <<<<<<<<<<<<<<
* "disambiguate"]"""
* DrawFloatFormat = """typing.Literal["e", "f", "g"]"""
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_kp_u_typing_Literal_functional_nonfun) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_kp_u_typing_Literal_functional_nonfun) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
- /* "pywrapfst.pyx":122
+ /* "pywrapfst.pyx":124
* DeterminizeType = """typing.Literal["functional", "nonfunctional",
* "disambiguate"]"""
* DrawFloatFormat = """typing.Literal["e", "f", "g"]""" # <<<<<<<<<<<<<<
* FarType = """typing.Literal[
* "fst",
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_DrawFloatFormat, __pyx_kp_u_typing_Literal_e_f_g) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DrawFloatFormat, __pyx_kp_u_typing_Literal_e_f_g) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
- /* "pywrapfst.pyx":123
+ /* "pywrapfst.pyx":125
* "disambiguate"]"""
* DrawFloatFormat = """typing.Literal["e", "f", "g"]"""
* FarType = """typing.Literal[ # <<<<<<<<<<<<<<
* "fst",
* "stlist",
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_kp_u_typing_Literal_fst_stlist_sttabl) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_kp_u_typing_Literal_fst_stlist_sttabl) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
- /* "pywrapfst.pyx":129
+ /* "pywrapfst.pyx":131
* "default"
* ]"""
* ProjectType = """typing.Literal["input", "output"]""" # <<<<<<<<<<<<<<
* QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state",
* "top"]"""
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
- /* "pywrapfst.pyx":130
+ /* "pywrapfst.pyx":132
* ]"""
* ProjectType = """typing.Literal["input", "output"]"""
* QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state", # <<<<<<<<<<<<<<
* "top"]"""
* RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]"""
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_kp_u_typing_Literal_auto_fifo_lifo_sh) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_kp_u_typing_Literal_auto_fifo_lifo_sh) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
- /* "pywrapfst.pyx":132
+ /* "pywrapfst.pyx":134
* QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state",
* "top"]"""
* RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" # <<<<<<<<<<<<<<
* ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]"""
* SortType = """typing.Literal["ilabel", "olabel"]"""
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_kp_u_typing_Literal_uniform_log_prob) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_kp_u_typing_Literal_uniform_log_prob) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
- /* "pywrapfst.pyx":133
+ /* "pywrapfst.pyx":135
* "top"]"""
* RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]"""
* ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" # <<<<<<<<<<<<<<
* SortType = """typing.Literal["ilabel", "olabel"]"""
* StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]"""
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_kp_u_typing_Literal_neither_input_out) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_kp_u_typing_Literal_neither_input_out) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
- /* "pywrapfst.pyx":134
+ /* "pywrapfst.pyx":136
* RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]"""
* ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]"""
* SortType = """typing.Literal["ilabel", "olabel"]""" # <<<<<<<<<<<<<<
* StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]"""
*
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_kp_u_typing_Literal_ilabel_olabel) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_kp_u_typing_Literal_ilabel_olabel) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
- /* "pywrapfst.pyx":135
+ /* "pywrapfst.pyx":137
* ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]"""
* SortType = """typing.Literal["ilabel", "olabel"]"""
* StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" # <<<<<<<<<<<<<<
*
* WeightLike = "typing.Union[Weight, typing.Union[str, int, float]]"
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_kp_u_typing_Literal_arc_sum_arc_uniqu) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_kp_u_typing_Literal_arc_sum_arc_uniqu) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
- /* "pywrapfst.pyx":137
+ /* "pywrapfst.pyx":139
* StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]"""
*
* WeightLike = "typing.Union[Weight, typing.Union[str, int, float]]" # <<<<<<<<<<<<<<
*
* ## Custom exceptions.
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_kp_u_typing_Union_Weight_typing_Union) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_kp_u_typing_Union_Weight_typing_Union) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
- /* "pywrapfst.pyx":142
+ /* "pywrapfst.pyx":144
*
*
* class FstError(Exception): # <<<<<<<<<<<<<<
*
* pass
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
__Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstError, __pyx_n_s_FstError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstError, __pyx_n_s_FstError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstError, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstError, __pyx_t_4) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":147
+ /* "pywrapfst.pyx":149
*
*
* class FstArgError(FstError, ValueError): # <<<<<<<<<<<<<<
*
* pass
*/
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_builtin_ValueError);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstArgError, __pyx_n_s_FstArgError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstArgError, __pyx_n_s_FstArgError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstArgError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstArgError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_4) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":152
+ /* "pywrapfst.pyx":154
*
*
* class FstBadWeightError(FstError, ValueError): # <<<<<<<<<<<<<<
*
* pass
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_builtin_ValueError);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_builtin_ValueError);
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstBadWeightError, __pyx_n_s_FstBadWeightError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstBadWeightError, __pyx_n_s_FstBadWeightError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstBadWeightError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstBadWeightError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_4) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_4) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":157
+ /* "pywrapfst.pyx":159
*
*
* class FstIndexError(FstError, IndexError): # <<<<<<<<<<<<<<
*
* pass
*/
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_builtin_IndexError);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_IndexError);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstIndexError, __pyx_n_s_FstIndexError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstIndexError, __pyx_n_s_FstIndexError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstIndexError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstIndexError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_4) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_4) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":162
+ /* "pywrapfst.pyx":164
*
*
* class FstIOError(FstError, IOError): # <<<<<<<<<<<<<<
*
* pass
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_builtin_IOError);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_builtin_IOError);
__pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstIOError, __pyx_n_s_FstIOError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_FstIOError, __pyx_n_s_FstIOError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstIOError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstIOError, __pyx_t_1, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_4) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_4) < 0) __PYX_ERR(0, 164, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":167
+ /* "pywrapfst.pyx":169
*
*
* class FstOpError(FstError, RuntimeError): # <<<<<<<<<<<<<<
*
* pass
*/
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_builtin_RuntimeError);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_RuntimeError);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstOpError, __pyx_n_s_FstOpError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstOpError, __pyx_n_s_FstOpError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstOpError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstOpError, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_4) < 0) __PYX_ERR(0, 167, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_4) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":461
+ /* "pywrapfst.pyx":463
*
* @classmethod
* def zero(cls, weight_type): # <<<<<<<<<<<<<<
* """
* Weight.zero(weight_type)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_zero); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_zero); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":460
+ /* "pywrapfst.pyx":462
* # C++ part out-of-class and then call it from within.
*
* @classmethod # <<<<<<<<<<<<<<
* def zero(cls, weight_type):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_zero, __pyx_t_1) < 0) __PYX_ERR(0, 461, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_zero, __pyx_t_1) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_Weight);
- /* "pywrapfst.pyx":470
+ /* "pywrapfst.pyx":472
*
* @classmethod
* def one(cls, weight_type): # <<<<<<<<<<<<<<
* """
* Weight.one(weight_type)
*/
- __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_one); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_one); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "pywrapfst.pyx":469
+ /* "pywrapfst.pyx":471
* return _zero(weight_type)
*
* @classmethod # <<<<<<<<<<<<<<
* def one(cls, weight_type):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_one, __pyx_t_2) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_one, __pyx_t_2) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_Weight);
- /* "pywrapfst.pyx":479
+ /* "pywrapfst.pyx":481
*
* @classmethod
* def no_weight(cls, weight_type): # <<<<<<<<<<<<<<
* """
* Weight.no_weight(weight_type)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_no_weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Weight, __pyx_n_s_no_weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":478
+ /* "pywrapfst.pyx":480
* return _one(weight_type)
*
* @classmethod # <<<<<<<<<<<<<<
* def no_weight(cls, weight_type):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_no_weight, __pyx_t_1) < 0) __PYX_ERR(0, 479, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Weight->tp_dict, __pyx_n_s_no_weight, __pyx_t_1) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_Weight);
- /* "pywrapfst.pyx":514
+ /* "pywrapfst.pyx":516
*
*
* def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* plus(lhs, rhs)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_1plus, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_1plus, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_1) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_1) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":546
+ /* "pywrapfst.pyx":548
*
*
* def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* times(lhs, rhs)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_3times, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_3times, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_1) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_1) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":578
+ /* "pywrapfst.pyx":580
*
*
* def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<<
* """
* divide(lhs, rhs)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_5divide, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_5divide, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_1) < 0) __PYX_ERR(0, 578, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_1) < 0) __PYX_ERR(0, 580, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":611
+ /* "pywrapfst.pyx":613
*
*
* def power(Weight w, size_t n): # <<<<<<<<<<<<<<
* """
* power(lhs, rhs)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_7power, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_7power, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_1) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_1) < 0) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":1010
+ /* "pywrapfst.pyx":1012
* return mutable_raw
*
* cpdef int64 add_symbol(self, symbol, int64 key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<<
__pyx_k__6 = fst::kNoSymbol;
__pyx_k__6 = fst::kNoSymbol;
- /* "pywrapfst.pyx":1095
+ /* "pywrapfst.pyx":1097
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
* """
* SymbolTable.read(source)
*/
- __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "pywrapfst.pyx":1094
+ /* "pywrapfst.pyx":1096
* return self._smart_table.get()
*
* @classmethod # <<<<<<<<<<<<<<
* def read(cls, source):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1097, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable);
- /* "pywrapfst.pyx":1116
+ /* "pywrapfst.pyx":1118
*
* @classmethod
* def read_text(cls, source, bool allow_negative_labels=False): # <<<<<<<<<<<<<<
* """
* SymbolTable.read_text(source)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":1115
+ /* "pywrapfst.pyx":1117
* return _init_SymbolTable(move(_symbols))
*
* @classmethod # <<<<<<<<<<<<<<
* def read_text(cls, source, bool allow_negative_labels=False):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_text, __pyx_t_1) < 0) __PYX_ERR(0, 1116, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_text, __pyx_t_1) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable);
- /* "pywrapfst.pyx":1142
+ /* "pywrapfst.pyx":1144
*
* @classmethod
* def read_fst(cls, source, bool input_table): # <<<<<<<<<<<<<<
* """
* SymbolTable.read_fst(source, input_table)
*/
- __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "pywrapfst.pyx":1141
+ /* "pywrapfst.pyx":1143
* return _init_SymbolTable(move(_symbols))
*
* @classmethod # <<<<<<<<<<<<<<
* def read_fst(cls, source, bool input_table):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_fst, __pyx_t_2) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_SymbolTable->tp_dict, __pyx_n_s_read_fst, __pyx_t_2) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable);
- /* "pywrapfst.pyx":1399
+ /* "pywrapfst.pyx":1401
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
* """
* EncodeMapper.read(source)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":1398
+ /* "pywrapfst.pyx":1400
* return FstProperties(self._mapper.get().Properties(mask.value))
*
* @classmethod # <<<<<<<<<<<<<<
* def read(cls, source):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 1399, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 1401, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_EncodeMapper);
- /* "pywrapfst.pyx":1421
+ /* "pywrapfst.pyx":1423
*
* @staticmethod
* def read_from_string(state): # <<<<<<<<<<<<<<
* """
* read_from_string(state)
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_12EncodeMapper_19read_from_string, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_12EncodeMapper_19read_from_string, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read_from_string, __pyx_t_1) < 0) __PYX_ERR(0, 1421, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read_from_string, __pyx_t_1) < 0) __PYX_ERR(0, 1423, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_EncodeMapper);
- /* "pywrapfst.pyx":1420
+ /* "pywrapfst.pyx":1422
* return _init_EncodeMapper(_mapper.release())
*
* @staticmethod # <<<<<<<<<<<<<<
* def read_from_string(state):
* """
*/
- __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1421, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_EncodeMapper->tp_dict, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1423, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_EncodeMapper);
- /* "pywrapfst.pyx":1917
+ /* "pywrapfst.pyx":1919
*
* @classmethod
* def read(cls, source): # <<<<<<<<<<<<<<
* """
* read(source)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":1916
+ /* "pywrapfst.pyx":1918
* return FstProperties(self._fst.get().Properties(mask.value, test))
*
* @classmethod # <<<<<<<<<<<<<<
* def read(cls, source):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Fst->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 1917, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Fst->tp_dict, __pyx_n_s_read, __pyx_t_1) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_Fst);
- /* "pywrapfst.pyx":1935
+ /* "pywrapfst.pyx":1937
*
* @classmethod
* def read_from_string(cls, state): # <<<<<<<<<<<<<<
* """
* read_from_string(state)
*/
- __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Fst, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_9pywrapfst_Fst, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "pywrapfst.pyx":1934
+ /* "pywrapfst.pyx":1936
* return _read_Fst(source)
*
* @classmethod # <<<<<<<<<<<<<<
* def read_from_string(cls, state):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Fst->tp_dict, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1935, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_Fst->tp_dict, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1937, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_Fst);
- /* "pywrapfst.pyx":2308
+ /* "pywrapfst.pyx":2310
*
* cdef void _minimize(self,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__12 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2314
+ /* "pywrapfst.pyx":2316
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<<
*/
__pyx_k__13 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2409
+ /* "pywrapfst.pyx":2411
*
* cdef void _prune(self,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__14 = fst::kDelta;
- /* "pywrapfst.pyx":2410
+ /* "pywrapfst.pyx":2412
* cdef void _prune(self,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__15 = fst::kNoStateId;
- /* "pywrapfst.pyx":2419
+ /* "pywrapfst.pyx":2421
*
* def prune(self,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__16 = fst::kDelta;
- /* "pywrapfst.pyx":2420
+ /* "pywrapfst.pyx":2422
* def prune(self,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__17 = fst::kNoStateId;
- /* "pywrapfst.pyx":2445
+ /* "pywrapfst.pyx":2447
*
* cdef void _push(self,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__18 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2454
+ /* "pywrapfst.pyx":2456
*
* def push(self,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__19 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2685
+ /* "pywrapfst.pyx":2687
* bool connect=True,
* weight=None,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__20 = fst::kNoStateId;
- /* "pywrapfst.pyx":2686
+ /* "pywrapfst.pyx":2688
* weight=None,
* int64 nstate=fst.kNoStateId,
* float delta=fst.kShortestDelta) except *: # <<<<<<<<<<<<<<
*/
__pyx_k__21 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2703
+ /* "pywrapfst.pyx":2705
* bool connect=True,
* weight=None,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__22 = fst::kNoStateId;
- /* "pywrapfst.pyx":2704
+ /* "pywrapfst.pyx":2706
* weight=None,
* int64 nstate=fst.kNoStateId,
* float delta=fst.kShortestDelta): # <<<<<<<<<<<<<<
*/
__pyx_k__23 = fst::kShortestDelta;
- /* "pywrapfst.pyx":2976
+ /* "pywrapfst.pyx":2978
*
*
* NO_LABEL = fst.kNoLabel # <<<<<<<<<<<<<<
* NO_STATE_ID = fst.kNoStateId
* NO_SYMBOL = fst.kNoSymbol
*/
- __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_2) < 0) __PYX_ERR(0, 2976, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_2) < 0) __PYX_ERR(0, 2978, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2977
+ /* "pywrapfst.pyx":2979
*
* NO_LABEL = fst.kNoLabel
* NO_STATE_ID = fst.kNoStateId # <<<<<<<<<<<<<<
* NO_SYMBOL = fst.kNoSymbol
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2979, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_2) < 0) __PYX_ERR(0, 2977, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_2) < 0) __PYX_ERR(0, 2979, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2978
+ /* "pywrapfst.pyx":2980
* NO_LABEL = fst.kNoLabel
* NO_STATE_ID = fst.kNoStateId
* NO_SYMBOL = fst.kNoSymbol # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2980, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_2) < 0) __PYX_ERR(0, 2978, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_2) < 0) __PYX_ERR(0, 2980, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2983
+ /* "pywrapfst.pyx":2985
* ## FST properties.
*
* class FstProperties(enum.Flag): # <<<<<<<<<<<<<<
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable
*/
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstProperties, __pyx_n_s_FstProperties, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FstProperties, __pyx_n_s_FstProperties, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "pywrapfst.pyx":2984
+ /* "pywrapfst.pyx":2986
*
* class FstProperties(enum.Flag):
* EXPANDED = fst.kExpanded # <<<<<<<<<<<<<<
* MUTABLE = fst.kMutable
* ERROR = fst.kError
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2984, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2986, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EXPANDED, __pyx_t_4) < 0) __PYX_ERR(0, 2984, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EXPANDED, __pyx_t_4) < 0) __PYX_ERR(0, 2986, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2985
+ /* "pywrapfst.pyx":2987
* class FstProperties(enum.Flag):
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable # <<<<<<<<<<<<<<
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2987, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2985, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2987, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2986
+ /* "pywrapfst.pyx":2988
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable
* ERROR = fst.kError # <<<<<<<<<<<<<<
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2986, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2988, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2987
+ /* "pywrapfst.pyx":2989
* MUTABLE = fst.kMutable
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor # <<<<<<<<<<<<<<
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2987, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2989, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2987, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2988
+ /* "pywrapfst.pyx":2990
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor # <<<<<<<<<<<<<<
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2988, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2988, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2990, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2989
+ /* "pywrapfst.pyx":2991
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic # <<<<<<<<<<<<<<
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2989, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2991, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2990
+ /* "pywrapfst.pyx":2992
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic # <<<<<<<<<<<<<<
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2992, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2990, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2992, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2991
+ /* "pywrapfst.pyx":2993
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic # <<<<<<<<<<<<<<
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2991, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2993, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2991, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2993, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2992
+ /* "pywrapfst.pyx":2994
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic # <<<<<<<<<<<<<<
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2994, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2992, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2994, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2993
+ /* "pywrapfst.pyx":2995
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons # <<<<<<<<<<<<<<
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2993, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2993, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2995, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2994
+ /* "pywrapfst.pyx":2996
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons # <<<<<<<<<<<<<<
* I_EPSILONS = fst.kIEpsilons
* NO_I_EPSILONS = fst.kNoIEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2996, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2994, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2996, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2995
+ /* "pywrapfst.pyx":2997
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons # <<<<<<<<<<<<<<
* NO_I_EPSILONS = fst.kNoIEpsilons
* O_EPSILONS = fst.kOEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2997, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2995, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2997, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2996
+ /* "pywrapfst.pyx":2998
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons
* NO_I_EPSILONS = fst.kNoIEpsilons # <<<<<<<<<<<<<<
* O_EPSILONS = fst.kOEpsilons
* NO_O_EPSILONS = fst.kNoOEpsilons
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2998, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2996, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2998, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2997
+ /* "pywrapfst.pyx":2999
* I_EPSILONS = fst.kIEpsilons
* NO_I_EPSILONS = fst.kNoIEpsilons
* O_EPSILONS = fst.kOEpsilons # <<<<<<<<<<<<<<
* NO_O_EPSILONS = fst.kNoOEpsilons
* I_LABEL_SORTED = fst.kILabelSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2997, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2999, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2997, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2999, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2998
+ /* "pywrapfst.pyx":3000
* NO_I_EPSILONS = fst.kNoIEpsilons
* O_EPSILONS = fst.kOEpsilons
* NO_O_EPSILONS = fst.kNoOEpsilons # <<<<<<<<<<<<<<
* I_LABEL_SORTED = fst.kILabelSorted
* NOT_I_LABEL_SORTED = fst.kNotILabelSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2998, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2998, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NO_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2999
+ /* "pywrapfst.pyx":3001
* O_EPSILONS = fst.kOEpsilons
* NO_O_EPSILONS = fst.kNoOEpsilons
* I_LABEL_SORTED = fst.kILabelSorted # <<<<<<<<<<<<<<
* NOT_I_LABEL_SORTED = fst.kNotILabelSorted
* O_LABEL_SORTED = fst.kOLabelSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2999, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3001, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2999, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3001, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3000
+ /* "pywrapfst.pyx":3002
* NO_O_EPSILONS = fst.kNoOEpsilons
* I_LABEL_SORTED = fst.kILabelSorted
* NOT_I_LABEL_SORTED = fst.kNotILabelSorted # <<<<<<<<<<<<<<
* O_LABEL_SORTED = fst.kOLabelSorted
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3002, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3002, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3001
+ /* "pywrapfst.pyx":3003
* I_LABEL_SORTED = fst.kILabelSorted
* NOT_I_LABEL_SORTED = fst.kNotILabelSorted
* O_LABEL_SORTED = fst.kOLabelSorted # <<<<<<<<<<<<<<
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
* WEIGHTED = fst.kWeighted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3001, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3003, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3001, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3002
+ /* "pywrapfst.pyx":3004
* NOT_I_LABEL_SORTED = fst.kNotILabelSorted
* O_LABEL_SORTED = fst.kOLabelSorted
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted # <<<<<<<<<<<<<<
* WEIGHTED = fst.kWeighted
* UNWEIGHTED = fst.kUnweighted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3002, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3004, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3002, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3004, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3003
+ /* "pywrapfst.pyx":3005
* O_LABEL_SORTED = fst.kOLabelSorted
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
* WEIGHTED = fst.kWeighted # <<<<<<<<<<<<<<
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3003, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3003, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3005, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3004
+ /* "pywrapfst.pyx":3006
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
* WEIGHTED = fst.kWeighted
* UNWEIGHTED = fst.kUnweighted # <<<<<<<<<<<<<<
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3004, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3006, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3004, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3006, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3005
+ /* "pywrapfst.pyx":3007
* WEIGHTED = fst.kWeighted
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic # <<<<<<<<<<<<<<
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3007, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3005, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3007, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3006
+ /* "pywrapfst.pyx":3008
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic # <<<<<<<<<<<<<<
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3006, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3008, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3006, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3008, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3007
+ /* "pywrapfst.pyx":3009
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic # <<<<<<<<<<<<<<
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3007, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3009, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3007, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3009, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3008
+ /* "pywrapfst.pyx":3010
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic # <<<<<<<<<<<<<<
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3008, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3008, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3010, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3009
+ /* "pywrapfst.pyx":3011
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted # <<<<<<<<<<<<<<
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3009, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3009, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3011, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3010
+ /* "pywrapfst.pyx":3012
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted # <<<<<<<<<<<<<<
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3010, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3011
+ /* "pywrapfst.pyx":3013
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible # <<<<<<<<<<<<<<
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3011, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3013, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3011, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3013, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3012
+ /* "pywrapfst.pyx":3014
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible # <<<<<<<<<<<<<<
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3012, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3014, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3013
+ /* "pywrapfst.pyx":3015
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible # <<<<<<<<<<<<<<
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3013, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3013, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3015, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3014
+ /* "pywrapfst.pyx":3016
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible # <<<<<<<<<<<<<<
* STRING = fst.kString
* NOT_STRING = fst.kNotString
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3014, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3015
+ /* "pywrapfst.pyx":3017
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString # <<<<<<<<<<<<<<
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3017, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3015, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3016
+ /* "pywrapfst.pyx":3018
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString
* NOT_STRING = fst.kNotString # <<<<<<<<<<<<<<
* WEIGHTED_CYCLES = fst.kWeightedCycles
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3016, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3016, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NOT_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3017
+ /* "pywrapfst.pyx":3019
* STRING = fst.kString
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles # <<<<<<<<<<<<<<
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
* # TODO(wolfsonkin): Figure out how to keep the composite properties (all the
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3017, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3019, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3017, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3018
+ /* "pywrapfst.pyx":3020
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles # <<<<<<<<<<<<<<
* # TODO(wolfsonkin): Figure out how to keep the composite properties (all the
* # below properties) out of the `repr`, but still available as an attribute on
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3020, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3018, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3020, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3022
+ /* "pywrapfst.pyx":3024
* # below properties) out of the `repr`, but still available as an attribute on
* # the class. I think this could be done with `property`.
* NULL_PROPERTIES = fst.kNullProperties # <<<<<<<<<<<<<<
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3022, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3024, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3022, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3024, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3023
+ /* "pywrapfst.pyx":3025
* # the class. I think this could be done with `property`.
* NULL_PROPERTIES = fst.kNullProperties
* COPY_PROPERTIES = fst.kCopyProperties # <<<<<<<<<<<<<<
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3023, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COPY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3023, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_COPY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3025, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3024
+ /* "pywrapfst.pyx":3026
* NULL_PROPERTIES = fst.kNullProperties
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties # <<<<<<<<<<<<<<
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
* SET_START_PROPERTIES = fst.kSetStartProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3024, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3026, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3024, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3025
+ /* "pywrapfst.pyx":3027
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties # <<<<<<<<<<<<<<
* SET_START_PROPERTIES = fst.kSetStartProperties
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3027, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3025, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3027, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3026
+ /* "pywrapfst.pyx":3028
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
* SET_START_PROPERTIES = fst.kSetStartProperties # <<<<<<<<<<<<<<
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties
* ADD_STATE_PROPERTIES = fst.kAddStateProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3028, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3026, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3028, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3027
+ /* "pywrapfst.pyx":3029
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
* SET_START_PROPERTIES = fst.kSetStartProperties
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties # <<<<<<<<<<<<<<
* ADD_STATE_PROPERTIES = fst.kAddStateProperties
* ADD_ARC_PROPERTIES = fst.kAddArcProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3027, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3029, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3027, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3029, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3028
+ /* "pywrapfst.pyx":3030
* SET_START_PROPERTIES = fst.kSetStartProperties
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties
* ADD_STATE_PROPERTIES = fst.kAddStateProperties # <<<<<<<<<<<<<<
* ADD_ARC_PROPERTIES = fst.kAddArcProperties
* SET_ARC_PROPERTIES = fst.kSetArcProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3028, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3030, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3029
+ /* "pywrapfst.pyx":3031
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties
* ADD_STATE_PROPERTIES = fst.kAddStateProperties
* ADD_ARC_PROPERTIES = fst.kAddArcProperties # <<<<<<<<<<<<<<
* SET_ARC_PROPERTIES = fst.kSetArcProperties
* DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3031, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3029, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3031, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3030
+ /* "pywrapfst.pyx":3032
* ADD_STATE_PROPERTIES = fst.kAddStateProperties
* ADD_ARC_PROPERTIES = fst.kAddArcProperties
* SET_ARC_PROPERTIES = fst.kSetArcProperties # <<<<<<<<<<<<<<
* DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties
* DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3032, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3030, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3032, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3031
+ /* "pywrapfst.pyx":3033
* ADD_ARC_PROPERTIES = fst.kAddArcProperties
* SET_ARC_PROPERTIES = fst.kSetArcProperties
* DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties # <<<<<<<<<<<<<<
* DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties
* STATE_SORT_PROPERTIES = fst.kStateSortProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3033, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3031, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3033, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3032
+ /* "pywrapfst.pyx":3034
* SET_ARC_PROPERTIES = fst.kSetArcProperties
* DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties
* DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties # <<<<<<<<<<<<<<
* STATE_SORT_PROPERTIES = fst.kStateSortProperties
* ARC_SORT_PROPERTIES = fst.kArcSortProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3032, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3032, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3034, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3033
+ /* "pywrapfst.pyx":3035
* DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties
* DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties
* STATE_SORT_PROPERTIES = fst.kStateSortProperties # <<<<<<<<<<<<<<
* ARC_SORT_PROPERTIES = fst.kArcSortProperties
* I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3033, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3033, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3035, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3034
+ /* "pywrapfst.pyx":3036
* DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties
* STATE_SORT_PROPERTIES = fst.kStateSortProperties
* ARC_SORT_PROPERTIES = fst.kArcSortProperties # <<<<<<<<<<<<<<
* I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties
* O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3034, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3036, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3035
+ /* "pywrapfst.pyx":3037
* STATE_SORT_PROPERTIES = fst.kStateSortProperties
* ARC_SORT_PROPERTIES = fst.kArcSortProperties
* I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties # <<<<<<<<<<<<<<
* O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties
* WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3037, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3035, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3037, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3036
+ /* "pywrapfst.pyx":3038
* ARC_SORT_PROPERTIES = fst.kArcSortProperties
* I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties
* O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties # <<<<<<<<<<<<<<
* WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties
* ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3038, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3036, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3038, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3037
+ /* "pywrapfst.pyx":3039
* I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties
* O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties
* WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties # <<<<<<<<<<<<<<
* ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties
* RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3037, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3037, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3039, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3038
+ /* "pywrapfst.pyx":3040
* O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties
* WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties
* ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties # <<<<<<<<<<<<<<
* RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties
* BINARY_PROPERTIES = fst.kBinaryProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3038, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3038, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3040, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3039
+ /* "pywrapfst.pyx":3041
* WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties
* ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties
* RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties # <<<<<<<<<<<<<<
* BINARY_PROPERTIES = fst.kBinaryProperties
* TRINARY_PROPERTIES = fst.kTrinaryProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3039, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3039, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3041, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3040
+ /* "pywrapfst.pyx":3042
* ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties
* RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties
* BINARY_PROPERTIES = fst.kBinaryProperties # <<<<<<<<<<<<<<
* TRINARY_PROPERTIES = fst.kTrinaryProperties
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3042, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3040, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3042, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3041
+ /* "pywrapfst.pyx":3043
* RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties
* BINARY_PROPERTIES = fst.kBinaryProperties
* TRINARY_PROPERTIES = fst.kTrinaryProperties # <<<<<<<<<<<<<<
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3043, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3041, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3043, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3042
+ /* "pywrapfst.pyx":3044
* BINARY_PROPERTIES = fst.kBinaryProperties
* TRINARY_PROPERTIES = fst.kTrinaryProperties
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties # <<<<<<<<<<<<<<
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties
* FST_PROPERTIES = fst.kFstProperties
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3042, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3042, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3044, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3043
+ /* "pywrapfst.pyx":3045
* TRINARY_PROPERTIES = fst.kTrinaryProperties
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties # <<<<<<<<<<<<<<
* FST_PROPERTIES = fst.kFstProperties
*
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3043, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3043, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3045, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":3044
+ /* "pywrapfst.pyx":3046
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties
* FST_PROPERTIES = fst.kFstProperties # <<<<<<<<<<<<<<
*
* for name, member in FstProperties.__members__.items():
*/
- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_FST_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3044, __pyx_L1_error)
+ if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_FST_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3046, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2983
+ /* "pywrapfst.pyx":2985
* ## FST properties.
*
* class FstProperties(enum.Flag): # <<<<<<<<<<<<<<
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable
*/
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstProperties, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FstProperties, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 2983, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 2985, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3046
+ /* "pywrapfst.pyx":3048
* FST_PROPERTIES = fst.kFstProperties
*
* for name, member in FstProperties.__members__.items(): # <<<<<<<<<<<<<<
*
*/
__pyx_t_5 = 0;
- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_members); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_members); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(__pyx_t_3 == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
- __PYX_ERR(0, 3046, __pyx_L1_error)
+ __PYX_ERR(0, 3048, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_2);
while (1) {
__pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_6, &__pyx_t_5, &__pyx_t_1, &__pyx_t_3, NULL, __pyx_t_7);
if (unlikely(__pyx_t_8 == 0)) break;
- if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_2, __pyx_t_1) < 0) __PYX_ERR(0, 3046, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_2, __pyx_t_1) < 0) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_member, __pyx_t_3) < 0) __PYX_ERR(0, 3046, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_member, __pyx_t_3) < 0) __PYX_ERR(0, 3048, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pywrapfst.pyx":3047
+ /* "pywrapfst.pyx":3049
*
* for name, member in FstProperties.__members__.items():
* globals()[name] = member # <<<<<<<<<<<<<<
*
*
*/
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_member); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3047, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_member); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3049, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (unlikely(__pyx_t_1 == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 3047, __pyx_L1_error)
+ __PYX_ERR(0, 3049, __pyx_L1_error)
}
- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3047, __pyx_L1_error)
+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(0, 3047, __pyx_L1_error)
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(0, 3049, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3053
+ /* "pywrapfst.pyx":3055
*
*
* ARC_I_LABEL_VALUE = fst.kArcILabelValue # <<<<<<<<<<<<<<
* ARC_O_LABEL_VALUE = fst.kArcOLabelValue
* ARC_WEIGHT_VALUE = fst.kArcWeightValue
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3055, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3053, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3054
+ /* "pywrapfst.pyx":3056
*
* ARC_I_LABEL_VALUE = fst.kArcILabelValue
* ARC_O_LABEL_VALUE = fst.kArcOLabelValue # <<<<<<<<<<<<<<
* ARC_WEIGHT_VALUE = fst.kArcWeightValue
* ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3054, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3056, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3055
+ /* "pywrapfst.pyx":3057
* ARC_I_LABEL_VALUE = fst.kArcILabelValue
* ARC_O_LABEL_VALUE = fst.kArcOLabelValue
* ARC_WEIGHT_VALUE = fst.kArcWeightValue # <<<<<<<<<<<<<<
* ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue
* ARC_NO_CACHE = fst.kArcNoCache
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3055, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3055, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3056
+ /* "pywrapfst.pyx":3058
* ARC_O_LABEL_VALUE = fst.kArcOLabelValue
* ARC_WEIGHT_VALUE = fst.kArcWeightValue
* ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue # <<<<<<<<<<<<<<
* ARC_NO_CACHE = fst.kArcNoCache
* ARC_VALUE_FLAGS = fst.kArcValueFlags
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3058, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3056, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_2) < 0) __PYX_ERR(0, 3058, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3057
+ /* "pywrapfst.pyx":3059
* ARC_WEIGHT_VALUE = fst.kArcWeightValue
* ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue
* ARC_NO_CACHE = fst.kArcNoCache # <<<<<<<<<<<<<<
* ARC_VALUE_FLAGS = fst.kArcValueFlags
* ARC_FLAGS = fst.kArcFlags
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcNoCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3057, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcNoCache); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3059, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_2) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_2) < 0) __PYX_ERR(0, 3059, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3058
+ /* "pywrapfst.pyx":3060
* ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue
* ARC_NO_CACHE = fst.kArcNoCache
* ARC_VALUE_FLAGS = fst.kArcValueFlags # <<<<<<<<<<<<<<
* ARC_FLAGS = fst.kArcFlags
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3058, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3060, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3058, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3060, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3059
+ /* "pywrapfst.pyx":3061
* ARC_NO_CACHE = fst.kArcNoCache
* ARC_VALUE_FLAGS = fst.kArcValueFlags
* ARC_FLAGS = fst.kArcFlags # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3059, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kArcFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3059, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3061, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3065
+ /* "pywrapfst.pyx":3067
*
*
* ENCODE_LABELS = fst.kEncodeLabels # <<<<<<<<<<<<<<
* ENCODE_WEIGHTS = fst.kEncodeWeights
* ENCODE_FLAGS = fst.kEncodeFlags
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3067, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_2) < 0) __PYX_ERR(0, 3065, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_2) < 0) __PYX_ERR(0, 3067, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3066
+ /* "pywrapfst.pyx":3068
*
* ENCODE_LABELS = fst.kEncodeLabels
* ENCODE_WEIGHTS = fst.kEncodeWeights # <<<<<<<<<<<<<<
* ENCODE_FLAGS = fst.kEncodeFlags
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_2) < 0) __PYX_ERR(0, 3066, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_2) < 0) __PYX_ERR(0, 3068, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3067
+ /* "pywrapfst.pyx":3069
* ENCODE_LABELS = fst.kEncodeLabels
* ENCODE_WEIGHTS = fst.kEncodeWeights
* ENCODE_FLAGS = fst.kEncodeFlags # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3067, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint8_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3069, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3067, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_2) < 0) __PYX_ERR(0, 3069, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3439
+ /* "pywrapfst.pyx":3452
*
* cdef Fst _map(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__32 = fst::kDelta;
- /* "pywrapfst.pyx":3455
+ /* "pywrapfst.pyx":3469
*
* cpdef Fst arcmap(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__33 = fst::kDelta;
- /* "pywrapfst.pyx":3454
+ /* "pywrapfst.pyx":3468
*
*
* cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__33 = fst::kDelta;
- /* "pywrapfst.pyx":3564
+ /* "pywrapfst.pyx":3578
*
* cpdef MutableFst determinize(Fst ifst,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__34 = fst::kShortestDelta;
- /* "pywrapfst.pyx":3566
+ /* "pywrapfst.pyx":3580
* float delta=fst.kShortestDelta,
* det_type="functional",
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__35 = fst::kNoStateId;
- /* "pywrapfst.pyx":3564
+ /* "pywrapfst.pyx":3578
*
* cpdef MutableFst determinize(Fst ifst,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__34 = fst::kShortestDelta;
- /* "pywrapfst.pyx":3566
+ /* "pywrapfst.pyx":3580
* float delta=fst.kShortestDelta,
* det_type="functional",
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__35 = fst::kNoStateId;
- /* "pywrapfst.pyx":3663
+ /* "pywrapfst.pyx":3677
*
* cpdef MutableFst disambiguate(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__36 = fst::kDelta;
- /* "pywrapfst.pyx":3664
+ /* "pywrapfst.pyx":3678
* cpdef MutableFst disambiguate(Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__37 = fst::kNoStateId;
- /* "pywrapfst.pyx":3663
+ /* "pywrapfst.pyx":3677
*
* cpdef MutableFst disambiguate(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__36 = fst::kDelta;
- /* "pywrapfst.pyx":3664
+ /* "pywrapfst.pyx":3678
* cpdef MutableFst disambiguate(Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__37 = fst::kNoStateId;
- /* "pywrapfst.pyx":3734
+ /* "pywrapfst.pyx":3748
*
*
* cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
__pyx_k__38 = fst::kDelta;
__pyx_k__38 = fst::kDelta;
- /* "pywrapfst.pyx":3755
+ /* "pywrapfst.pyx":3769
*
*
* cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
__pyx_k__39 = fst::kDelta;
__pyx_k__39 = fst::kDelta;
- /* "pywrapfst.pyx":3811
+ /* "pywrapfst.pyx":3825
*
*
* cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
__pyx_k__40 = fst::kDelta;
__pyx_k__40 = fst::kDelta;
- /* "pywrapfst.pyx":3836
+ /* "pywrapfst.pyx":3850
*
* cpdef MutableFst prune(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__41 = fst::kDelta;
- /* "pywrapfst.pyx":3837
+ /* "pywrapfst.pyx":3851
* cpdef MutableFst prune(Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__42 = fst::kNoStateId;
- /* "pywrapfst.pyx":3836
+ /* "pywrapfst.pyx":3850
*
* cpdef MutableFst prune(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__41 = fst::kDelta;
- /* "pywrapfst.pyx":3837
+ /* "pywrapfst.pyx":3851
* cpdef MutableFst prune(Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__42 = fst::kNoStateId;
- /* "pywrapfst.pyx":3868
+ /* "pywrapfst.pyx":3882
*
* cpdef MutableFst push(Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__43 = fst::kDelta;
- /* "pywrapfst.pyx":3867
+ /* "pywrapfst.pyx":3881
*
*
* cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__43 = fst::kDelta;
- /* "pywrapfst.pyx":3926
+ /* "pywrapfst.pyx":3940
* Fst ifst2,
* int32 npath=1,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__44 = fst::kDelta;
- /* "pywrapfst.pyx":3928
+ /* "pywrapfst.pyx":3942
* float delta=fst.kDelta,
* select="uniform",
* int32 max_length=INT32_MAX, # <<<<<<<<<<<<<<
*/
__pyx_k__45 = INT32_MAX;
- /* "pywrapfst.pyx":3926
+ /* "pywrapfst.pyx":3940
* Fst ifst2,
* int32 npath=1,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__44 = fst::kDelta;
- /* "pywrapfst.pyx":3928
+ /* "pywrapfst.pyx":3942
* float delta=fst.kDelta,
* select="uniform",
* int32 max_length=INT32_MAX, # <<<<<<<<<<<<<<
*/
__pyx_k__45 = INT32_MAX;
- /* "pywrapfst.pyx":3978
+ /* "pywrapfst.pyx":3992
* int32 npath=1,
* select="uniform",
* int32 max_length=INT32_MAX, # <<<<<<<<<<<<<<
*/
__pyx_k__46 = INT32_MAX;
- /* "pywrapfst.pyx":3975
+ /* "pywrapfst.pyx":3989
*
*
* cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__46 = INT32_MAX;
- /* "pywrapfst.pyx":4117
+ /* "pywrapfst.pyx":4131
* cdef void _shortestdistance(Fst ifst,
* vector[fst.WeightClass] *distance,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__47 = fst::kShortestDelta;
- /* "pywrapfst.pyx":4118
+ /* "pywrapfst.pyx":4132
* vector[fst.WeightClass] *distance,
* float delta=fst.kShortestDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__48 = fst::kNoStateId;
- /* "pywrapfst.pyx":4136
+ /* "pywrapfst.pyx":4150
*
* def shortestdistance(Fst ifst,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__49 = fst::kShortestDelta;
- /* "pywrapfst.pyx":4137
+ /* "pywrapfst.pyx":4151
* def shortestdistance(Fst ifst,
* float delta=fst.kShortestDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__50 = fst::kNoStateId;
- /* "pywrapfst.pyx":4135
+ /* "pywrapfst.pyx":4149
*
*
* def shortestdistance(Fst ifst, # <<<<<<<<<<<<<<
* float delta=fst.kShortestDelta,
* int64 nstate=fst.kNoStateId,
*/
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_55shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_55shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4149, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_2) < 0) __PYX_ERR(0, 4135, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_2) < 0) __PYX_ERR(0, 4149, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":4173
+ /* "pywrapfst.pyx":4187
*
* cpdef MutableFst shortestpath(Fst ifst,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__51 = fst::kShortestDelta;
- /* "pywrapfst.pyx":4175
+ /* "pywrapfst.pyx":4189
* float delta=fst.kShortestDelta,
* int32 nshortest=1,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__52 = fst::kNoStateId;
- /* "pywrapfst.pyx":4173
+ /* "pywrapfst.pyx":4187
*
* cpdef MutableFst shortestpath(Fst ifst,
* float delta=fst.kShortestDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__51 = fst::kShortestDelta;
- /* "pywrapfst.pyx":4175
+ /* "pywrapfst.pyx":4189
* float delta=fst.kShortestDelta,
* int32 nshortest=1,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__52 = fst::kNoStateId;
- /* "pywrapfst.pyx":4440
+ /* "pywrapfst.pyx":4454
*
* @classmethod
* def open(cls, *sources): # <<<<<<<<<<<<<<
* """
* FarReader.open(*sources)
*/
- __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4440, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4454, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":4439
+ /* "pywrapfst.pyx":4453
* return f"<{self.far_type()} FarReader at 0x{id(self):x}>"
*
* @classmethod # <<<<<<<<<<<<<<
* def open(cls, *sources):
* """
*/
- __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4439, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4453, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarReader->tp_dict, __pyx_n_s_open, __pyx_t_3) < 0) __PYX_ERR(0, 4440, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarReader->tp_dict, __pyx_n_s_open, __pyx_t_3) < 0) __PYX_ERR(0, 4454, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_FarReader);
- /* "pywrapfst.pyx":4599
+ /* "pywrapfst.pyx":4613
*
* @classmethod
* def create(cls, source, arc_type="standard", far_type="default"): # <<<<<<<<<<<<<<
* """
* FarWriter.
*/
- __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4599, __pyx_L1_error)
+ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "pywrapfst.pyx":4598
+ /* "pywrapfst.pyx":4612
* return f"<{self.far_type()} FarWriter at 0x{id(self):x}>"
*
* @classmethod # <<<<<<<<<<<<<<
* def create(cls, source, arc_type="standard", far_type="default"):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4598, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4612, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 4599, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 4613, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_FarWriter);
- /* "pywrapfst.pyx":4690
+ /* "pywrapfst.pyx":4704
*
* # Masks fst_error_fatal in-module.
* fst.FLAGS_fst_error_fatal = False # <<<<<<<<<<<<<<
/* "pywrapfst.pyx":1
* #cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, nonecheck=True # <<<<<<<<<<<<<<
- * # Licensed under the Apache License, Version 2.0 (the "License");
- * # you may not use this file except in compliance with the License.
+ * # Copyright 2016-2020 Google LLC
+ * #
*/
__pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);