double nodesep;
__pyx_t_10basictypes_int32 fontsize;
__pyx_t_10basictypes_int32 precision;
+ PyObject *float_format;
bool show_weight_one;
};
-/* "pywrapfst.pxd":254
+/* "pywrapfst.pxd":255
* cpdef StateIterator states(self)
*
* cpdef string text(self, _SymbolTable isymbols=?, _SymbolTable osymbols=?, # <<<<<<<<<<<<<<
PyObject *missing_sym;
};
-/* "pywrapfst.pxd":277
+/* "pywrapfst.pxd":278
* cpdef int64 add_state(self) except *
*
* cdef void _arcsort(self, st=?) except * # <<<<<<<<<<<<<<
PyObject *st;
};
-/* "pywrapfst.pxd":279
+/* "pywrapfst.pxd":280
* cdef void _arcsort(self, st=?) except *
*
* cdef void _closure(self, bool closure_plus=?) except * # <<<<<<<<<<<<<<
bool closure_plus;
};
-/* "pywrapfst.pxd":287
+/* "pywrapfst.pxd":288
* cdef void _decode(self, EncodeMapper) except *
*
* cdef void _delete_arcs(self, int64 state, size_t n=?) except * # <<<<<<<<<<<<<<
size_t n;
};
-/* "pywrapfst.pxd":289
+/* "pywrapfst.pxd":290
* cdef void _delete_arcs(self, int64 state, size_t n=?) except *
*
* cdef void _delete_states(self, states=?) except * # <<<<<<<<<<<<<<
PyObject *states;
};
-/* "pywrapfst.pxd":295
+/* "pywrapfst.pxd":296
* cdef void _invert(self) except *
*
* cdef void _minimize(self, float delta=?, bool allow_nondet=?) except * # <<<<<<<<<<<<<<
bool allow_nondet;
};
-/* "pywrapfst.pxd":301
+/* "pywrapfst.pxd":302
* cpdef int64 num_states(self)
*
* cdef void _project(self, bool project_output=?) except * # <<<<<<<<<<<<<<
bool project_output;
};
-/* "pywrapfst.pxd":303
+/* "pywrapfst.pxd":304
* cdef void _project(self, bool project_output=?) except *
*
* cdef void _prune(self, float delta=?, int64 nstate=?, weight=?) except * # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":305
+/* "pywrapfst.pxd":306
* cdef void _prune(self, float delta=?, int64 nstate=?, weight=?) except *
*
* cdef void _push(self, float delta=?, bool remove_total_weight=?, # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":308
+/* "pywrapfst.pxd":309
* bool to_final=?) except *
*
* cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * # <<<<<<<<<<<<<<
PyObject *opairs;
};
-/* "pywrapfst.pxd":310
+/* "pywrapfst.pxd":311
* cdef void _relabel_pairs(self, ipairs=?, opairs=?) except *
*
* cdef void _relabel_tables(self, _SymbolTable old_isymbols=?, # <<<<<<<<<<<<<<
- * _SymbolTable new_isymbols=?, bool attach_new_isymbols=?,
- * _SymbolTable old_osymbols=?, _SymbolTable new_osymbols=?,
+ * _SymbolTable new_isymbols=?, unknown_isymbol=?,
+ * bool attach_new_isymbols=?,
*/
struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_tables {
int __pyx_n;
struct __pyx_obj_9pywrapfst__SymbolTable *old_isymbols;
struct __pyx_obj_9pywrapfst__SymbolTable *new_isymbols;
+ PyObject *unknown_isymbol;
bool attach_new_isymbols;
struct __pyx_obj_9pywrapfst__SymbolTable *old_osymbols;
struct __pyx_obj_9pywrapfst__SymbolTable *new_osymbols;
+ PyObject *unknown_osymbol;
bool attach_new_osymbols;
};
-/* "pywrapfst.pxd":319
+/* "pywrapfst.pxd":321
* cdef void _reserve_states(self, int64 n) except *
*
* cdef void _reweight(self, potentials, bool to_final=?) except * # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":321
+/* "pywrapfst.pxd":323
* cdef void _reweight(self, potentials, bool to_final=?) except *
*
* cdef void _rmepsilon(self, bool connect=?, float delta=?, int64 nstate=?, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":324
+/* "pywrapfst.pxd":326
* weight=?) except *
*
* cdef void _set_final(self, int64 state, weight=?) except * # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":348
+/* "pywrapfst.pxd":350
* cdef _Fst _init_XFst(FstClass_ptr tfst)
*
* cdef _MutableFst _create_Fst(arc_type=?) # <<<<<<<<<<<<<<
PyObject *arc_type;
};
-/* "pywrapfst.pxd":350
+/* "pywrapfst.pxd":352
* cdef _MutableFst _create_Fst(arc_type=?)
*
* cdef _Fst _read_Fst(filename, fst_type=?) # <<<<<<<<<<<<<<
PyObject *fst_type;
};
-/* "pywrapfst.pxd":352
+/* "pywrapfst.pxd":354
* cdef _Fst _read_Fst(filename, fst_type=?)
*
* cdef _Fst _deserialize_Fst(fst_string, fst_type=?) # <<<<<<<<<<<<<<
PyObject *fst_type;
};
-/* "pywrapfst.pxd":431
+/* "pywrapfst.pxd":433
*
*
* cdef _Fst _map(_Fst ifst, float delta=?, mt=?, weight=?) # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":433
+/* "pywrapfst.pxd":435
* cdef _Fst _map(_Fst ifst, float delta=?, mt=?, weight=?)
*
* cpdef _Fst arcmap(_Fst ifst, float delta=?, mt=?, weight=?) # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":435
+/* "pywrapfst.pxd":437
* cpdef _Fst arcmap(_Fst ifst, float delta=?, mt=?, weight=?)
*
* cpdef _MutableFst compose(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?) # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":437
+/* "pywrapfst.pxd":439
* cpdef _MutableFst compose(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?)
*
* cpdef _Fst convert(_Fst ifst, fst_type=?) # <<<<<<<<<<<<<<
PyObject *fst_type;
};
-/* "pywrapfst.pxd":439
+/* "pywrapfst.pxd":441
* cpdef _Fst convert(_Fst ifst, fst_type=?)
*
* cpdef _MutableFst determinize(_Fst ifst, float delta=?, dt=?, # <<<<<<<<<<<<<<
bool increment_subsequential_label;
};
-/* "pywrapfst.pxd":443
+/* "pywrapfst.pxd":445
* weight=?, bool increment_subsequential_label=?)
*
* cpdef _MutableFst difference(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?) # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":445
+/* "pywrapfst.pxd":447
* cpdef _MutableFst difference(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?)
*
* cpdef _MutableFst disambiguate(_Fst ifst, float delta=?, int64 nstate=?, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":448
+/* "pywrapfst.pxd":450
* int64 subsequential_label=?, weight=?)
*
* cpdef _MutableFst epsnormalize(_Fst ifst, bool eps_norm_output=?) # <<<<<<<<<<<<<<
bool eps_norm_output;
};
-/* "pywrapfst.pxd":450
+/* "pywrapfst.pxd":452
* cpdef _MutableFst epsnormalize(_Fst ifst, bool eps_norm_output=?)
*
* cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=?) # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":452
+/* "pywrapfst.pxd":454
* cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=?)
*
* cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=?) except * # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":454
+/* "pywrapfst.pxd":456
* cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=?) except *
*
* cpdef _MutableFst intersect(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?) # <<<<<<<<<<<<<<
bool connect;
};
-/* "pywrapfst.pxd":456
+/* "pywrapfst.pxd":458
* cpdef _MutableFst intersect(_Fst ifst1, _Fst ifst2, cf=?, bool connect=?)
*
* cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=?) # <<<<<<<<<<<<<<
float delta;
};
-/* "pywrapfst.pxd":458
+/* "pywrapfst.pxd":460
* cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=?)
*
* cpdef _MutableFst prune(_Fst ifst, float delta=?, int64 nstate=?, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":461
+/* "pywrapfst.pxd":463
* weight=?)
*
* cpdef _MutableFst push(_Fst ifst, float delta=?, bool push_weights=?, # <<<<<<<<<<<<<<
bool to_final;
};
-/* "pywrapfst.pxd":465
+/* "pywrapfst.pxd":467
* bool remove_total_weight=?, bool to_final=?)
*
* cpdef bool randequivalent(_Fst ifst1, _Fst ifst2, int32 npath=?, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int32 max_length;
};
-/* "pywrapfst.pxd":469
+/* "pywrapfst.pxd":471
* int32 max_length=?) except *
*
* cpdef _MutableFst randgen(_Fst ifst, int32 npath=?, time_t seed=?, # <<<<<<<<<<<<<<
bool weighted;
};
-/* "pywrapfst.pxd":476
+/* "pywrapfst.pxd":478
* bool epsilon_on_replace) except *
*
* cpdef _MutableFst replace(pairs, call_arc_labeling=?, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 return_label;
};
-/* "pywrapfst.pxd":480
+/* "pywrapfst.pxd":482
* int64 return_label=?)
*
* cpdef _MutableFst reverse(_Fst ifst, bool require_superinitial=?) # <<<<<<<<<<<<<<
bool require_superinitial;
};
-/* "pywrapfst.pxd":482
+/* "pywrapfst.pxd":484
* cpdef _MutableFst reverse(_Fst ifst, bool require_superinitial=?)
*
* cpdef _MutableFst rmepsilon(_Fst ifst, bool connect=?, float delta=?, # <<<<<<<<<<<<<<
PyObject *weight;
};
-/* "pywrapfst.pxd":486
+/* "pywrapfst.pxd":488
* weight=?)
*
* cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, float delta=?, # <<<<<<<<<<<<<<
bool reverse;
};
-/* "pywrapfst.pxd":490
+/* "pywrapfst.pxd":492
* bool reverse=?) except *
*
* cpdef _MutableFst shortestpath(_Fst ifst, float delta=?, int32 nshortest=?, # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":267
+/* "pywrapfst.pxd":268
*
*
* cdef class _MutableFst(_Fst): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":358
+/* "pywrapfst.pxd":360
*
*
* cdef class Arc(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":368
+/* "pywrapfst.pxd":370
*
*
* cdef class ArcIterator(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":390
+/* "pywrapfst.pxd":392
*
*
* cdef class MutableArcIterator(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":414
+/* "pywrapfst.pxd":416
*
*
* cdef class StateIterator(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":502
+/* "pywrapfst.pxd":504
*
*
* cdef class Compiler(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":523
+/* "pywrapfst.pxd":525
* # FarReader.
*
* cdef class FarReader(object): # <<<<<<<<<<<<<<
};
-/* "pywrapfst.pxd":548
+/* "pywrapfst.pxd":550
* # FarWriter.
*
* cdef class FarWriter(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__Fst *__pyx_vtabptr_9pywrapfst__Fst;
-/* "pywrapfst.pyx":1711
+/* "pywrapfst.pyx":1714
*
*
* cdef class _MutableFst(_Fst): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst__MutableFst *__pyx_vtabptr_9pywrapfst__MutableFst;
-/* "pywrapfst.pyx":2779
+/* "pywrapfst.pyx":2795
*
*
* cdef class Arc(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_Arc *__pyx_vtabptr_9pywrapfst_Arc;
-/* "pywrapfst.pyx":2847
+/* "pywrapfst.pyx":2863
*
*
* cdef class ArcIterator(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_ArcIterator *__pyx_vtabptr_9pywrapfst_ArcIterator;
-/* "pywrapfst.pyx":2984
+/* "pywrapfst.pyx":3000
*
*
* cdef class MutableArcIterator(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *__pyx_vtabptr_9pywrapfst_MutableArcIterator;
-/* "pywrapfst.pyx":3136
+/* "pywrapfst.pyx":3152
*
*
* cdef class StateIterator(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_StateIterator *__pyx_vtabptr_9pywrapfst_StateIterator;
-/* "pywrapfst.pyx":4083
+/* "pywrapfst.pyx":4099
*
*
* cdef class Compiler(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_Compiler *__pyx_vtabptr_9pywrapfst_Compiler;
-/* "pywrapfst.pyx":4209
+/* "pywrapfst.pyx":4225
*
*
* cdef class FarReader(object): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_9pywrapfst_FarReader *__pyx_vtabptr_9pywrapfst_FarReader;
-/* "pywrapfst.pyx":4383
+/* "pywrapfst.pyx":4399
*
*
* cdef class FarWriter(object): # <<<<<<<<<<<<<<
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_StopIteration;
static const char __pyx_k_[] = "";
+static const char __pyx_k_g[] = "g";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_cf[] = "cf";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_allow_nondet[] = "allow_nondet";
static const char __pyx_k_closure_plus[] = "closure_plus";
+static const char __pyx_k_float_format[] = "float_format";
static const char __pyx_k_mutable_arcs[] = "mutable_arcs";
static const char __pyx_k_new_isymbols[] = "new_isymbols";
static const char __pyx_k_new_osymbols[] = "new_osymbols";
static const char __pyx_k_WEIGHTED_CYCLES[] = "WEIGHTED_CYCLES";
static const char __pyx_k_eps_norm_output[] = "eps_norm_output";
static const char __pyx_k_show_weight_one[] = "show_weight_one";
+static const char __pyx_k_unknown_isymbol[] = "unknown_isymbol";
+static const char __pyx_k_unknown_osymbol[] = "unknown_osymbol";
static const char __pyx_k_Cannot_construct[] = "Cannot construct {}";
static const char __pyx_k_Key_out_of_order[] = "Key out of order";
static const char __pyx_k_NOT_COACCESSIBLE[] = "NOT_COACCESSIBLE";
static const char __pyx_k_No_relabeling_pairs_specified[] = "No relabeling pairs specified.";
static const char __pyx_k_Unknown_compose_filter_type_r[] = "Unknown compose filter type: {!r}";
static const char __pyx_k_increment_subsequential_label[] = "increment_subsequential_label";
+static const char __pyx_k_Incompatible_or_invalid_weight[] = "Incompatible or invalid weight";
static const char __pyx_k_Unknown_determinization_type_r[] = "Unknown determinization type: {!r}";
static const char __pyx_k_const_EncodeMapper_SymbolTable[] = "<const EncodeMapper SymbolTable {!r} at 0x{:x}>";
-static const char __pyx_k_incompatible_or_invalid_weight[] = "incompatible or invalid weight";
static const char __pyx_k_Fst_arc_type_standard_Construct[] = "\n Fst(arc_type=\"standard\")\n\n Constructs an empty FST.\n\n Args:\n arc_type: A string indicating the arc type.\n\n Raises:\n FstError: Unknown arc type.\n\n Raises:\n FstOpError: operation failed.\n ";
static const char __pyx_k_const_Fst_SymbolTable_r_at_0x_x[] = "<const Fst SymbolTable {!r} at 0x{:x}>";
static const char __pyx_k_usr_local_google_home_kbg_scrat[] = "/usr/local/google/home/kbg/scratch/pynini/src/pywrapfst.pyx";
static PyObject *__pyx_n_s_I_LABEL_INVARIANT_PROPERTIES;
static PyObject *__pyx_n_s_I_LABEL_SORTED;
static PyObject *__pyx_kp_s_Incompatible_or_invalid_arc_type;
+static PyObject *__pyx_kp_s_Incompatible_or_invalid_weight;
static PyObject *__pyx_kp_s_Incompatible_or_invalid_weight_t;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_Invalid_operator_r;
static PyObject *__pyx_n_s_final;
static PyObject *__pyx_n_s_find;
static PyObject *__pyx_n_s_flags;
+static PyObject *__pyx_n_s_float_format;
static PyObject *__pyx_n_s_fontsize;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fst_error_fatal_old;
static PyObject *__pyx_n_s_fst_string;
static PyObject *__pyx_n_s_fst_type;
static PyObject *__pyx_n_b_functional;
+static PyObject *__pyx_n_b_g;
static PyObject *__pyx_n_s_get_fst;
static PyObject *__pyx_n_s_get_key;
static PyObject *__pyx_n_s_get_nth_key;
static PyObject *__pyx_n_b_ilabel;
static PyObject *__pyx_n_s_ilabel;
static PyObject *__pyx_n_s_import;
-static PyObject *__pyx_kp_s_incompatible_or_invalid_weight;
static PyObject *__pyx_n_s_increment_subsequential_label;
static PyObject *__pyx_n_b_input;
static PyObject *__pyx_n_s_input_symbols;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_b_uniform;
static PyObject *__pyx_n_s_unique;
+static PyObject *__pyx_n_s_unknown_isymbol;
+static PyObject *__pyx_n_s_unknown_osymbol;
static PyObject *__pyx_kp_b_unspecified;
static PyObject *__pyx_kp_s_usr_local_google_home_kbg_scrat;
static PyObject *__pyx_n_s_utf8;
static PyObject *__pyx_pf_9pywrapfst_4_Fst_8arc_type(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9pywrapfst_4_Fst_10arcs(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, __pyx_t_10basictypes_int64 __pyx_v_state); /* proto */
static PyObject *__pyx_pf_9pywrapfst_4_Fst_12copy(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_4_Fst_14draw(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, PyObject *__pyx_v_filename, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols, struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, PyObject *__pyx_v_title, double __pyx_v_width, double __pyx_v_height, bool __pyx_v_portrait, bool __pyx_v_vertical, double __pyx_v_ranksep, double __pyx_v_nodesep, __pyx_t_10basictypes_int32 __pyx_v_fontsize, __pyx_t_10basictypes_int32 __pyx_v_precision, bool __pyx_v_show_weight_one); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_4_Fst_14draw(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, PyObject *__pyx_v_filename, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols, struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, PyObject *__pyx_v_title, double __pyx_v_width, double __pyx_v_height, bool __pyx_v_portrait, bool __pyx_v_vertical, double __pyx_v_ranksep, double __pyx_v_nodesep, __pyx_t_10basictypes_int32 __pyx_v_fontsize, __pyx_t_10basictypes_int32 __pyx_v_precision, PyObject *__pyx_v_float_format, bool __pyx_v_show_weight_one); /* proto */
static PyObject *__pyx_pf_9pywrapfst_4_Fst_16final(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, __pyx_t_10basictypes_int64 __pyx_v_state); /* proto */
static PyObject *__pyx_pf_9pywrapfst_4_Fst_18fst_type(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9pywrapfst_4_Fst_20input_symbols(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_34prune(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, float __pyx_v_delta, __pyx_t_10basictypes_int64 __pyx_v_nstate, PyObject *__pyx_v_weight); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_36push(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, float __pyx_v_delta, bool __pyx_v_remove_total_weight, bool __pyx_v_to_final); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_38relabel_pairs(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, PyObject *__pyx_v_ipairs, PyObject *__pyx_v_opairs); /* proto */
-static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols, bool __pyx_v_attach_new_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols, bool __pyx_v_attach_new_osymbols); /* proto */
+static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols, PyObject *__pyx_v_unknown_isymbol, bool __pyx_v_attach_new_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols, PyObject *__pyx_v_unknown_osymbol, bool __pyx_v_attach_new_osymbols); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_42reserve_arcs(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, __pyx_t_10basictypes_int64 __pyx_v_state, size_t __pyx_v_n); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_44reserve_states(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, __pyx_t_10basictypes_int64 __pyx_v_n); /* proto */
static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_46reweight(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, PyObject *__pyx_v_potentials, bool __pyx_v_to_final); /* proto */
PyObject *__pyx_t_5 = NULL;
std::string __pyx_t_6;
std::string __pyx_t_7;
- PyObject *(*__pyx_t_8)(PyObject *);
- int __pyx_t_9;
+ std::string __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
int __pyx_t_10;
- PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
__Pyx_RefNannySetupContext("_repr_svg_", 0);
/* "pywrapfst.pyx":1374
* self._fst.get().OutputSymbols(), NULL,
* self._fst.get().Properties(fst.kAcceptor, True) == # <<<<<<<<<<<<<<
* fst.kAcceptor,
- * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, False,
+ * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
/* "pywrapfst.pyx":1381
* self._fst.get().Properties(fst.kAcceptor, True) ==
* fst.kAcceptor,
- * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, False, # <<<<<<<<<<<<<<
+ * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False, # <<<<<<<<<<<<<<
* addr(sstrm), b"_repr_svg")
* (sout, serr) = proc.communicate(sstrm.str())
*/
__pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error)
+ __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_g); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error)
/* "pywrapfst.pyx":1382
* fst.kAcceptor,
- * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, False,
+ * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False,
* addr(sstrm), b"_repr_svg") # <<<<<<<<<<<<<<
* (sout, serr) = proc.communicate(sstrm.str())
* if proc.returncode != 0: # Just to be explicit.
*/
- __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_repr_svg); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1382, __pyx_L1_error)
+ __pyx_t_8 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_repr_svg); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1382, __pyx_L1_error)
/* "pywrapfst.pyx":1377
* stdout=subprocess.PIPE, stderr=subprocess.PIPE)
* self._fst.get().OutputSymbols(), NULL,
* self._fst.get().Properties(fst.kAcceptor, True) ==
*/
- fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor), __pyx_t_6, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, 0, (&__pyx_v_sstrm), __pyx_t_7);
+ fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor), __pyx_t_6, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_t_7, 0, (&__pyx_v_sstrm), __pyx_t_8);
/* "pywrapfst.pyx":1383
- * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, False,
+ * b"", 8.5, 11, True, False, 0.4, 0.25, 14, 5, b"g", False,
* addr(sstrm), b"_repr_svg")
* (sout, serr) = proc.communicate(sstrm.str()) # <<<<<<<<<<<<<<
* if proc.returncode != 0: # Just to be explicit.
__pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1383, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext;
- index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
__Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+ index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1383, __pyx_L1_error)
- __pyx_t_8 = NULL;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1383, __pyx_L1_error)
+ __pyx_t_9 = NULL;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L4_unpacking_done;
__pyx_L3_unpacking_failed:;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_8 = NULL;
+ __pyx_t_9 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
__PYX_ERR(0, 1383, __pyx_L1_error)
__pyx_L4_unpacking_done:;
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (__pyx_t_9) {
+ if (__pyx_t_10) {
/* "pywrapfst.pyx":1385
* (sout, serr) = proc.communicate(sstrm.str())
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DOT_TSVG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = NULL;
- __pyx_t_10 = 0;
+ __pyx_t_11 = 0;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
if (likely(__pyx_t_2)) {
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_1, function);
- __pyx_t_10 = 1;
+ __pyx_t_11 = 1;
}
}
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_1)) {
PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_3};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_t_3};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
if (__pyx_t_2) {
- __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
}
__Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_3);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_3);
__pyx_t_5 = 0;
__pyx_t_3 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
__Pyx_AddTraceback("pywrapfst._Fst._repr_svg_", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
double __pyx_v_nodesep = ((double)0.25);
__pyx_t_10basictypes_int32 __pyx_v_fontsize = ((__pyx_t_10basictypes_int32)14);
__pyx_t_10basictypes_int32 __pyx_v_precision = ((__pyx_t_10basictypes_int32)5);
+ PyObject *__pyx_v_float_format = ((PyObject *)__pyx_n_b_g);
- /* "pywrapfst.pyx":1445
- * int32 fontsize=14,
+ /* "pywrapfst.pyx":1446
* int32 precision=5,
+ * float_format=b"g",
* bool show_weight_one=False): # <<<<<<<<<<<<<<
* """
* draw(self, filename, isymbols=None, osymbols=None, ssymbols=None,
fst::SymbolTable *__pyx_t_20;
fst::SymbolTable const *__pyx_t_21;
fst::SymbolTable const *__pyx_t_22;
+ std::string __pyx_t_23;
__Pyx_RefNannySetupContext("draw", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
if (__pyx_optional_args->__pyx_n > 12) {
__pyx_v_precision = __pyx_optional_args->precision;
if (__pyx_optional_args->__pyx_n > 13) {
- __pyx_v_show_weight_one = __pyx_optional_args->show_weight_one;
+ __pyx_v_float_format = __pyx_optional_args->float_format;
+ if (__pyx_optional_args->__pyx_n > 14) {
+ __pyx_v_show_weight_one = __pyx_optional_args->show_weight_one;
+ }
}
}
}
}
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_13)) {
- PyObject *__pyx_temp[16] = {__pyx_t_14, __pyx_v_filename, ((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_t_12};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 15+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
+ PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_filename, ((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, 1430, __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;
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
- PyObject *__pyx_temp[16] = {__pyx_t_14, __pyx_v_filename, ((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_t_12};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_15, 15+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
+ PyObject *__pyx_temp[17] = {__pyx_t_14, __pyx_v_filename, ((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, 1430, __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(15+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1430, __pyx_L1_error)
+ __pyx_t_16 = PyTuple_New(16+__pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1430, __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;
PyTuple_SET_ITEM(__pyx_t_16, 12+__pyx_t_15, __pyx_t_10);
__Pyx_GIVEREF(__pyx_t_11);
PyTuple_SET_ITEM(__pyx_t_16, 13+__pyx_t_15, __pyx_t_11);
+ __Pyx_INCREF(__pyx_v_float_format);
+ __Pyx_GIVEREF(__pyx_v_float_format);
+ PyTuple_SET_ITEM(__pyx_t_16, 14+__pyx_t_15, __pyx_v_float_format);
__Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_16, 14+__pyx_t_15, __pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_16, 15+__pyx_t_15, __pyx_t_12);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1480
+ /* "pywrapfst.pyx":1482
* See also: `text`.
* """
* cdef string filename_string = tostring(filename) # <<<<<<<<<<<<<<
* cdef unique_ptr[ofstream] ostrm
* ostrm.reset(new ofstream(filename_string.c_str()))
*/
- __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1480, __pyx_L1_error)
+ __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1482, __pyx_L1_error)
__pyx_v_filename_string = __pyx_t_17;
- /* "pywrapfst.pyx":1482
+ /* "pywrapfst.pyx":1484
* cdef string filename_string = tostring(filename)
* cdef unique_ptr[ofstream] ostrm
* ostrm.reset(new ofstream(filename_string.c_str())) # <<<<<<<<<<<<<<
*/
__pyx_v_ostrm.reset(new std::ofstream(__pyx_v_filename_string.c_str()));
- /* "pywrapfst.pyx":1483
+ /* "pywrapfst.pyx":1485
* cdef unique_ptr[ofstream] ostrm
* ostrm.reset(new ofstream(filename_string.c_str()))
* cdef fst.SymbolTable *ssymbols_ptr = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_ssymbols_ptr = NULL;
- /* "pywrapfst.pyx":1484
+ /* "pywrapfst.pyx":1486
* ostrm.reset(new ofstream(filename_string.c_str()))
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_19 = (__pyx_t_18 != 0);
if (__pyx_t_19) {
- /* "pywrapfst.pyx":1485
+ /* "pywrapfst.pyx":1487
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None:
* ssymbols_ptr = ssymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1485, __pyx_L1_error)
+ __PYX_ERR(0, 1487, __pyx_L1_error)
}
__pyx_t_20 = __pyx_v_ssymbols->__pyx_base.__pyx_base._table;
__pyx_v_ssymbols_ptr = __pyx_t_20;
- /* "pywrapfst.pyx":1484
+ /* "pywrapfst.pyx":1486
* ostrm.reset(new ofstream(filename_string.c_str()))
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1486
+ /* "pywrapfst.pyx":1488
* if ssymbols is not None:
* ssymbols_ptr = ssymbols._table
* fst.DrawFst(deref(self._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1486, __pyx_L1_error)
+ __PYX_ERR(0, 1488, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1487
+ /* "pywrapfst.pyx":1489
* ssymbols_ptr = ssymbols._table
* fst.DrawFst(deref(self._fst),
* self._fst.get().InputSymbols() if isymbols is None # <<<<<<<<<<<<<<
if ((__pyx_t_19 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1487, __pyx_L1_error)
+ __PYX_ERR(0, 1489, __pyx_L1_error)
}
__pyx_t_21 = __pyx_v_self->_fst.get()->InputSymbols();
} else {
- /* "pywrapfst.pyx":1488
+ /* "pywrapfst.pyx":1490
* fst.DrawFst(deref(self._fst),
* self._fst.get().InputSymbols() if isymbols is None
* else isymbols._table, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1488, __pyx_L1_error)
+ __PYX_ERR(0, 1490, __pyx_L1_error)
}
__pyx_t_21 = __pyx_v_isymbols->_table;
}
- /* "pywrapfst.pyx":1489
+ /* "pywrapfst.pyx":1491
* self._fst.get().InputSymbols() if isymbols is None
* else isymbols._table,
* self._fst.get().OutputSymbols() if osymbols is None # <<<<<<<<<<<<<<
if ((__pyx_t_19 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1489, __pyx_L1_error)
+ __PYX_ERR(0, 1491, __pyx_L1_error)
}
__pyx_t_22 = __pyx_v_self->_fst.get()->OutputSymbols();
} else {
- /* "pywrapfst.pyx":1490
+ /* "pywrapfst.pyx":1492
* else isymbols._table,
* self._fst.get().OutputSymbols() if osymbols is None
* else osymbols._table, # <<<<<<<<<<<<<<
* ssymbols_ptr, acceptor, tostring(title), width, height, portrait,
- * vertical, ranksep, nodesep, fontsize, precision, show_weight_one,
+ * vertical, ranksep, nodesep, fontsize, precision,
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1490, __pyx_L1_error)
+ __PYX_ERR(0, 1492, __pyx_L1_error)
}
__pyx_t_22 = __pyx_v_osymbols->_table;
}
- /* "pywrapfst.pyx":1491
+ /* "pywrapfst.pyx":1493
* self._fst.get().OutputSymbols() if osymbols is None
* else osymbols._table,
* ssymbols_ptr, acceptor, tostring(title), width, height, portrait, # <<<<<<<<<<<<<<
- * vertical, ranksep, nodesep, fontsize, precision, show_weight_one,
- * ostrm.get(), filename_string)
+ * vertical, ranksep, nodesep, fontsize, precision,
+ * tostring(float_format), show_weight_one, ostrm.get(),
*/
- __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L1_error)
+ __pyx_t_17 = __pyx_f_9pywrapfst_tostring(__pyx_v_title, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1493, __pyx_L1_error)
- /* "pywrapfst.pyx":1486
+ /* "pywrapfst.pyx":1495
+ * ssymbols_ptr, acceptor, tostring(title), width, height, portrait,
+ * vertical, ranksep, nodesep, fontsize, precision,
+ * tostring(float_format), show_weight_one, ostrm.get(), # <<<<<<<<<<<<<<
+ * filename_string)
+ *
+ */
+ __pyx_t_23 = __pyx_f_9pywrapfst_tostring(__pyx_v_float_format, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error)
+
+ /* "pywrapfst.pyx":1488
* if ssymbols is not None:
* ssymbols_ptr = ssymbols._table
* fst.DrawFst(deref(self._fst), # <<<<<<<<<<<<<<
* self._fst.get().InputSymbols() if isymbols is None
* else isymbols._table,
*/
- fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_t_21, __pyx_t_22, __pyx_v_ssymbols_ptr, __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_v_show_weight_one, __pyx_v_ostrm.get(), __pyx_v_filename_string);
+ fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_t_21, __pyx_t_22, __pyx_v_ssymbols_ptr, __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_23, __pyx_v_show_weight_one, __pyx_v_ostrm.get(), __pyx_v_filename_string);
/* "pywrapfst.pyx":1430
* return _init_XFst(new fst.FstClass(deref(self._fst)))
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_4_Fst_15draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_9pywrapfst_4_Fst_14draw[] = "\n draw(self, filename, isymbols=None, osymbols=None, ssymbols=None,\n acceptor=False, title=\"\", width=8.5, height=11, portrait=False,\n vertical=False, ranksep=0.4, nodesep=0.25, fontsize=14,\n precision=5, show_weight_one=False):\n\n Writes out the FST in Graphviz text format.\n\n This method writes out the FST in the dot graph description language. The\n graph can be rendered using the `dot` executable provided by Graphviz.\n\n Args:\n filename: The string location of the output dot/Graphviz file.\n isymbols: An optional symbol table used to label input symbols.\n osymbols: An optional symbol table used to label output symbols.\n ssymbols: An optional symbol table used to label states.\n acceptor: Should the figure be rendered in acceptor format if possible?\n title: An optional string indicating the figure title.\n width: The figure width, in inches.\n height: The figure height, in inches.\n portrait: Should the figure be rendered in portrait rather than\n landscape?\n vertical: Should the figure be rendered bottom-to-top rather than\n left-to-right?\n ranksep: The minimum separation separation between ranks, in inches.\n nodesep: The minimum separation between nodes, in inches.\n fontsize: Font size, in points.\n precision: Numeric precision for floats, in number of chars.\n show_weight_one: Should weights equivalent to semiring One be printed?\n\n For more information about the rendering options, see `man dot`.\n\n See also: `text`.\n ";
+static char __pyx_doc_9pywrapfst_4_Fst_14draw[] = "\n draw(self, filename, isymbols=None, osymbols=None, ssymbols=None,\n acceptor=False, title=\"\", width=8.5, height=11, portrait=False,\n vertical=False, ranksep=0.4, nodesep=0.25, fontsize=14,\n precision=5, float_format=\"g\", show_weight_one=False):\n\n Writes out the FST in Graphviz text format.\n\n This method writes out the FST in the dot graph description language. The\n graph can be rendered using the `dot` executable provided by Graphviz.\n\n Args:\n filename: The string location of the output dot/Graphviz file.\n isymbols: An optional symbol table used to label input symbols.\n osymbols: An optional symbol table used to label output symbols.\n ssymbols: An optional symbol table used to label states.\n acceptor: Should the figure be rendered in acceptor format if possible?\n title: An optional string indicating the figure title.\n width: The figure width, in inches.\n height: The figure height, in inches.\n portrait: Should the figure be rendered in portrait rather than\n landscape?\n vertical: Should the figure be rendered bottom-to-top rather than\n left-to-right?\n ranksep: The minimum separation separation between ranks, in inches.\n nodesep: The minimum separation between nodes, in inches.\n fontsize: Font size, in points.\n precision: Numeric precision for floats, in number of chars.\n float_format: One of: 'e', 'f' or 'g'.\n show_weight_one: Should weights equivalent to semiring One be printed?\n\n For more information about the rendering options, see `man dot`.\n\n See also: `text`.\n ";
static PyObject *__pyx_pw_9pywrapfst_4_Fst_15draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_filename = 0;
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols = 0;
double __pyx_v_nodesep;
__pyx_t_10basictypes_int32 __pyx_v_fontsize;
__pyx_t_10basictypes_int32 __pyx_v_precision;
+ PyObject *__pyx_v_float_format = 0;
bool __pyx_v_show_weight_one;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("draw (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__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_show_weight_one,0};
- PyObject* values[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__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":1432
* cpdef void draw(self,
*/
values[3] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None);
values[5] = ((PyObject *)__pyx_kp_b_);
+ values[14] = ((PyObject *)__pyx_n_b_g);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
+ case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
}
case 14:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_show_weight_one);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_float_format);
if (value) { values[14] = value; kw_args--; }
}
+ case 15:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_show_weight_one);
+ if (value) { values[15] = value; kw_args--; }
+ }
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1430, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 16: values[15] = PyTuple_GET_ITEM(__pyx_args, 15);
case 15: values[14] = PyTuple_GET_ITEM(__pyx_args, 14);
case 14: values[13] = PyTuple_GET_ITEM(__pyx_args, 13);
case 13: values[12] = PyTuple_GET_ITEM(__pyx_args, 12);
} else {
__pyx_v_precision = ((__pyx_t_10basictypes_int32)5);
}
- if (values[14]) {
- __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[14]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1445, __pyx_L3_error)
+ __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, 1446, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1445
- * int32 fontsize=14,
+ /* "pywrapfst.pyx":1446
* int32 precision=5,
+ * float_format=b"g",
* bool show_weight_one=False): # <<<<<<<<<<<<<<
* """
* draw(self, filename, isymbols=None, osymbols=None, ssymbols=None,
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 15, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1430, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1430, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._Fst.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1432, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1433, __pyx_L1_error)
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1434, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_4_Fst_14draw(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), __pyx_v_filename, __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_show_weight_one);
+ __pyx_r = __pyx_pf_9pywrapfst_4_Fst_14draw(((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_self), __pyx_v_filename, __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":1430
* return _init_XFst(new fst.FstClass(deref(self._fst)))
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_4_Fst_14draw(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, PyObject *__pyx_v_filename, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols, struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, PyObject *__pyx_v_title, double __pyx_v_width, double __pyx_v_height, bool __pyx_v_portrait, bool __pyx_v_vertical, double __pyx_v_ranksep, double __pyx_v_nodesep, __pyx_t_10basictypes_int32 __pyx_v_fontsize, __pyx_t_10basictypes_int32 __pyx_v_precision, bool __pyx_v_show_weight_one) {
+static PyObject *__pyx_pf_9pywrapfst_4_Fst_14draw(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, PyObject *__pyx_v_filename, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols, struct __pyx_obj_9pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, PyObject *__pyx_v_title, double __pyx_v_width, double __pyx_v_height, bool __pyx_v_portrait, bool __pyx_v_vertical, double __pyx_v_ranksep, double __pyx_v_nodesep, __pyx_t_10basictypes_int32 __pyx_v_fontsize, __pyx_t_10basictypes_int32 __pyx_v_precision, PyObject *__pyx_v_float_format, bool __pyx_v_show_weight_one) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
struct __pyx_opt_args_9pywrapfst_4_Fst_draw __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("draw", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1.__pyx_n = 14;
+ __pyx_t_1.__pyx_n = 15;
__pyx_t_1.isymbols = __pyx_v_isymbols;
__pyx_t_1.osymbols = __pyx_v_osymbols;
__pyx_t_1.ssymbols = __pyx_v_ssymbols;
__pyx_t_1.nodesep = __pyx_v_nodesep;
__pyx_t_1.fontsize = __pyx_v_fontsize;
__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_filename, 1, &__pyx_t_1);
__pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error)
return __pyx_r;
}
-/* "pywrapfst.pyx":1495
- * ostrm.get(), filename_string)
+/* "pywrapfst.pyx":1498
+ * filename_string)
*
* cpdef Weight final(self, int64 state): # <<<<<<<<<<<<<<
* """
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __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, 1498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_17final)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
}
__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, 1495, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Weight))))) __PYX_ERR(0, 1498, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1510
+ /* "pywrapfst.pyx":1513
* FstIndexError: State index out of range.
* """
* cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* return weight
*/
- __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error)
+ __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 1510, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 1513, __pyx_L1_error)
__pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":1511
+ /* "pywrapfst.pyx":1514
* """
* 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 '%s'", "_weight");
- __PYX_ERR(0, 1511, __pyx_L1_error)
+ __PYX_ERR(0, 1514, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1511, __pyx_L1_error)
+ __PYX_ERR(0, 1514, __pyx_L1_error)
}
__pyx_v_weight->_weight.reset(new fst::script::WeightClass(__pyx_v_self->_fst.get()->Final(__pyx_v_state)));
- /* "pywrapfst.pyx":1512
+ /* "pywrapfst.pyx":1515
* cdef Weight weight = Weight.__new__(Weight)
* weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state)))
* return weight # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_weight;
goto __pyx_L0;
- /* "pywrapfst.pyx":1495
- * ostrm.get(), filename_string)
+ /* "pywrapfst.pyx":1498
+ * filename_string)
*
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1498, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("final", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1514
+/* "pywrapfst.pyx":1517
* return weight
*
* cpdef string fst_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __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, 1517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_19fst_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __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, 1514, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1517, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1515
+ /* "pywrapfst.pyx":1518
*
* cpdef string fst_type(self):
* return self._fst.get().FstType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1515, __pyx_L1_error)
+ __PYX_ERR(0, 1518, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->FstType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1514
+ /* "pywrapfst.pyx":1517
* return weight
*
* cpdef string fst_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("fst_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_fst_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1517
+/* "pywrapfst.pyx":1520
* return self._fst.get().FstType()
*
* cpdef _FstSymbolTable input_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __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, 1520, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_21input_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __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__FstSymbolTable))))) __PYX_ERR(0, 1517, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1520, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1518
+ /* "pywrapfst.pyx":1521
*
* cpdef _FstSymbolTable input_symbols(self):
* if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1518, __pyx_L1_error)
+ __PYX_ERR(0, 1521, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_fst.get()->InputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1519
+ /* "pywrapfst.pyx":1522
* cpdef _FstSymbolTable input_symbols(self):
* if self._fst.get().InputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1518
+ /* "pywrapfst.pyx":1521
*
* cpdef _FstSymbolTable input_symbols(self):
* if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1520
+ /* "pywrapfst.pyx":1523
* if self._fst.get().InputSymbols() == NULL:
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "pywrapfst.pyx":1521
+ /* "pywrapfst.pyx":1524
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr](
* self._fst.get().InputSymbols()), self._fst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1521, __pyx_L1_error)
+ __PYX_ERR(0, 1524, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1520
+ /* "pywrapfst.pyx":1523
* if self._fst.get().InputSymbols() == NULL:
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1521, __pyx_L1_error)
+ __PYX_ERR(0, 1524, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1521
+ /* "pywrapfst.pyx":1524
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr](
* self._fst.get().InputSymbols()), self._fst) # <<<<<<<<<<<<<<
*
* cpdef size_t num_arcs(self, int64 state) except *:
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->InputSymbols()), __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->InputSymbols()), __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1517
+ /* "pywrapfst.pyx":1520
* return self._fst.get().FstType()
*
* cpdef _FstSymbolTable input_symbols(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("input_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1523
+/* "pywrapfst.pyx":1526
* self._fst.get().InputSymbols()), self._fst)
*
* cpdef size_t num_arcs(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __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, 1526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_23num_arcs)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_7;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1540
+ /* "pywrapfst.pyx":1543
* See also: `num_states`.
* """
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1540, __pyx_L1_error)
+ __PYX_ERR(0, 1543, __pyx_L1_error)
}
__pyx_v_result = __pyx_v_self->_fst.get()->NumArcs(__pyx_v_state);
- /* "pywrapfst.pyx":1541
+ /* "pywrapfst.pyx":1544
* """
* cdef size_t result = self._fst.get().NumArcs(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_8 = ((__pyx_v_result == SIZE_MAX) != 0);
if (__pyx_t_8) {
- /* "pywrapfst.pyx":1542
+ /* "pywrapfst.pyx":1545
* cdef size_t result = self._fst.get().NumArcs(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 1542, __pyx_L1_error)
+ __PYX_ERR(0, 1545, __pyx_L1_error)
- /* "pywrapfst.pyx":1541
+ /* "pywrapfst.pyx":1544
* """
* cdef size_t result = self._fst.get().NumArcs(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1543
+ /* "pywrapfst.pyx":1546
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1523
+ /* "pywrapfst.pyx":1526
* self._fst.get().InputSymbols()), self._fst)
*
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1523, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("num_arcs", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1523, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1545
+/* "pywrapfst.pyx":1548
* return result
*
* cpdef size_t num_input_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __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, 1548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_25num_input_epsilons)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_7;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1562
+ /* "pywrapfst.pyx":1565
* See also: `num_output_epsilons`.
* """
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1562, __pyx_L1_error)
+ __PYX_ERR(0, 1565, __pyx_L1_error)
}
__pyx_v_result = __pyx_v_self->_fst.get()->NumInputEpsilons(__pyx_v_state);
- /* "pywrapfst.pyx":1563
+ /* "pywrapfst.pyx":1566
* """
* cdef size_t result = self._fst.get().NumInputEpsilons(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_8 = ((__pyx_v_result == SIZE_MAX) != 0);
if (__pyx_t_8) {
- /* "pywrapfst.pyx":1564
+ /* "pywrapfst.pyx":1567
* cdef size_t result = self._fst.get().NumInputEpsilons(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 1564, __pyx_L1_error)
+ __PYX_ERR(0, 1567, __pyx_L1_error)
- /* "pywrapfst.pyx":1563
+ /* "pywrapfst.pyx":1566
* """
* cdef size_t result = self._fst.get().NumInputEpsilons(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1565
+ /* "pywrapfst.pyx":1568
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1545
+ /* "pywrapfst.pyx":1548
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("num_input_epsilons", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1567
+/* "pywrapfst.pyx":1570
* return result
*
* cpdef size_t num_output_epsilons(self, int64 state) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __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, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_27num_output_epsilons)) {
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_7;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1584
+ /* "pywrapfst.pyx":1587
* See also: `num_input_epsilons`.
* """
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1584, __pyx_L1_error)
+ __PYX_ERR(0, 1587, __pyx_L1_error)
}
__pyx_v_result = __pyx_v_self->_fst.get()->NumOutputEpsilons(__pyx_v_state);
- /* "pywrapfst.pyx":1585
+ /* "pywrapfst.pyx":1588
* """
* cdef size_t result = self._fst.get().NumOutputEpsilons(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
__pyx_t_8 = ((__pyx_v_result == SIZE_MAX) != 0);
if (__pyx_t_8) {
- /* "pywrapfst.pyx":1586
+ /* "pywrapfst.pyx":1589
* cdef size_t result = self._fst.get().NumOutputEpsilons(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1586, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 1586, __pyx_L1_error)
+ __PYX_ERR(0, 1589, __pyx_L1_error)
- /* "pywrapfst.pyx":1585
+ /* "pywrapfst.pyx":1588
* """
* cdef size_t result = self._fst.get().NumOutputEpsilons(state)
* if result == SIZE_MAX: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1587
+ /* "pywrapfst.pyx":1590
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range")
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1567
+ /* "pywrapfst.pyx":1570
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("num_output_epsilons", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_4_Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1589
+/* "pywrapfst.pyx":1592
* return result
*
* cpdef _FstSymbolTable output_symbols(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __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, 1592, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_29output_symbols)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __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__FstSymbolTable))))) __PYX_ERR(0, 1589, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__FstSymbolTable))))) __PYX_ERR(0, 1592, __pyx_L1_error)
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_2);
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1590
+ /* "pywrapfst.pyx":1593
*
* cpdef _FstSymbolTable output_symbols(self):
* if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1590, __pyx_L1_error)
+ __PYX_ERR(0, 1593, __pyx_L1_error)
}
__pyx_t_5 = ((__pyx_v_self->_fst.get()->OutputSymbols() == NULL) != 0);
if (__pyx_t_5) {
- /* "pywrapfst.pyx":1591
+ /* "pywrapfst.pyx":1594
* cpdef _FstSymbolTable output_symbols(self):
* if self._fst.get().OutputSymbols() == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)Py_None); __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":1590
+ /* "pywrapfst.pyx":1593
*
* cpdef _FstSymbolTable output_symbols(self):
* if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1592
+ /* "pywrapfst.pyx":1595
* if self._fst.get().OutputSymbols() == NULL:
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- /* "pywrapfst.pyx":1593
+ /* "pywrapfst.pyx":1596
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr](
* self._fst.get().OutputSymbols()), self._fst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1593, __pyx_L1_error)
+ __PYX_ERR(0, 1596, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1592
+ /* "pywrapfst.pyx":1595
* if self._fst.get().OutputSymbols() == NULL:
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr]( # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1593, __pyx_L1_error)
+ __PYX_ERR(0, 1596, __pyx_L1_error)
}
- /* "pywrapfst.pyx":1593
+ /* "pywrapfst.pyx":1596
* return
* return _init_FstSymbolTable(const_cast[SymbolTable_ptr](
* self._fst.get().OutputSymbols()), self._fst) # <<<<<<<<<<<<<<
*
* cpdef uint64 properties(self, uint64 mask, bool test):
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->OutputSymbols()), __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_FstSymbolTable(const_cast<__pyx_t_9pywrapfst_SymbolTable_ptr>(__pyx_v_self->_fst.get()->OutputSymbols()), __pyx_v_self->_fst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = ((struct __pyx_obj_9pywrapfst__FstSymbolTable *)__pyx_t_1);
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1589
+ /* "pywrapfst.pyx":1592
* return result
*
* cpdef _FstSymbolTable output_symbols(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("output_symbols", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1595
+/* "pywrapfst.pyx":1598
* self._fst.get().OutputSymbols()), self._fst)
*
* cpdef uint64 properties(self, uint64 mask, bool test): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_properties); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_31properties)) {
- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_test); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_test); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1598, __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, 1595, __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, 1598, __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, 1595, __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, 1598, __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, 1595, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1598, __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, 1595, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __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_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1595, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_9 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1598, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1613
+ /* "pywrapfst.pyx":1616
* A 64-bit bitmask representing the requested properties.
* """
* return self._fst.get().Properties(mask, test) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1613, __pyx_L1_error)
+ __PYX_ERR(0, 1616, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->Properties(__pyx_v_mask, __pyx_v_test);
goto __pyx_L0;
- /* "pywrapfst.pyx":1595
+ /* "pywrapfst.pyx":1598
* self._fst.get().OutputSymbols()), self._fst)
*
* cpdef uint64 properties(self, uint64 mask, bool test): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_test)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1595, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1598, __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, 1595, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "properties") < 0)) __PYX_ERR(0, 1598, __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_mask = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1595, __pyx_L3_error)
- __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1595, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1598, __pyx_L3_error)
+ __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1598, __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, 1595, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1598, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._Fst.properties", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("properties", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_4_Fst_properties(__pyx_v_self, __pyx_v_mask, __pyx_v_test, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_f_9pywrapfst_4_Fst_properties(__pyx_v_self, __pyx_v_mask, __pyx_v_test, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1615
+/* "pywrapfst.pyx":1618
* return self._fst.get().Properties(mask, test)
*
* cpdef int64 start(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1615, __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, 1618, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_33start)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1618, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1616
+ /* "pywrapfst.pyx":1619
*
* cpdef int64 start(self):
* return self._fst.get().Start() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1616, __pyx_L1_error)
+ __PYX_ERR(0, 1619, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->Start();
goto __pyx_L0;
- /* "pywrapfst.pyx":1615
+ /* "pywrapfst.pyx":1618
* return self._fst.get().Properties(mask, test)
*
* cpdef int64 start(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("start", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_4_Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1615, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_4_Fst_start(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1618
+/* "pywrapfst.pyx":1621
* return self._fst.get().Start()
*
* cpdef StateIterator states(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __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, 1621, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_35states)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1618, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1621, __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, 1618, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_StateIterator))))) __PYX_ERR(0, 1621, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1629
+ /* "pywrapfst.pyx":1632
* See also: `arcs`, `mutable_arcs`.
* """
* return StateIterator(self) # <<<<<<<<<<<<<<
* cpdef string text(self, _SymbolTable isymbols=None,
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_StateIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_StateIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1632, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = ((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":1618
+ /* "pywrapfst.pyx":1621
* return self._fst.get().Start()
*
* cpdef StateIterator states(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("states", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_4_Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1631
+/* "pywrapfst.pyx":1634
* return StateIterator(self)
*
* cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<<
static std::string __pyx_f_9pywrapfst_4_Fst_text(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_4_Fst_text *__pyx_optional_args) {
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":1632
+ /* "pywrapfst.pyx":1635
*
* cpdef string text(self, _SymbolTable isymbols=None,
* _SymbolTable osymbols=None, _SymbolTable ssymbols=None, # <<<<<<<<<<<<<<
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":1633
+ /* "pywrapfst.pyx":1636
* cpdef string text(self, _SymbolTable isymbols=None,
* _SymbolTable osymbols=None, _SymbolTable ssymbols=None,
* bool acceptor=False, bool show_weight_one=False, missing_sym=b""): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1631
+ /* "pywrapfst.pyx":1634
* return StateIterator(self)
*
* cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); 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_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_37text)) {
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __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, 1631, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1634, __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, 1631, __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, 1634, __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, 1631, __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, 1634, __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, 1631, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1634, __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, 1631, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __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, 1631, __pyx_L1_error)
+ __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1634, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1656
+ /* "pywrapfst.pyx":1659
* """
* # Prints FST to stringstream, then returns resulting string.
* cdef fst.SymbolTable *ssymbols_ptr = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_ssymbols_ptr = NULL;
- /* "pywrapfst.pyx":1657
+ /* "pywrapfst.pyx":1660
* # Prints FST to stringstream, then returns resulting string.
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_11 = (__pyx_t_10 != 0);
if (__pyx_t_11) {
- /* "pywrapfst.pyx":1658
+ /* "pywrapfst.pyx":1661
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None:
* ssymbols_ptr = ssymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1658, __pyx_L1_error)
+ __PYX_ERR(0, 1661, __pyx_L1_error)
}
__pyx_t_12 = __pyx_v_ssymbols->_table;
__pyx_v_ssymbols_ptr = __pyx_t_12;
- /* "pywrapfst.pyx":1657
+ /* "pywrapfst.pyx":1660
* # Prints FST to stringstream, then returns resulting string.
* cdef fst.SymbolTable *ssymbols_ptr = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1660
+ /* "pywrapfst.pyx":1663
* ssymbols_ptr = ssymbols._table
* cdef stringstream sstrm
* fst.PrintFst(deref(self._fst), sstrm, "<pywrapfst>", # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1660, __pyx_L1_error)
+ __PYX_ERR(0, 1663, __pyx_L1_error)
}
- __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_pywrapfst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L1_error)
+ __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_pywrapfst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1663, __pyx_L1_error)
- /* "pywrapfst.pyx":1661
+ /* "pywrapfst.pyx":1664
* cdef stringstream sstrm
* fst.PrintFst(deref(self._fst), sstrm, "<pywrapfst>",
* self._fst.get().InputSymbols() if isymbols is None # <<<<<<<<<<<<<<
if ((__pyx_t_11 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1661, __pyx_L1_error)
+ __PYX_ERR(0, 1664, __pyx_L1_error)
}
__pyx_t_13 = __pyx_v_self->_fst.get()->InputSymbols();
} else {
- /* "pywrapfst.pyx":1662
+ /* "pywrapfst.pyx":1665
* fst.PrintFst(deref(self._fst), sstrm, "<pywrapfst>",
* self._fst.get().InputSymbols() if isymbols is None
* else isymbols._table, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1662, __pyx_L1_error)
+ __PYX_ERR(0, 1665, __pyx_L1_error)
}
__pyx_t_13 = __pyx_v_isymbols->_table;
}
- /* "pywrapfst.pyx":1663
+ /* "pywrapfst.pyx":1666
* self._fst.get().InputSymbols() if isymbols is None
* else isymbols._table,
* self._fst.get().OutputSymbols() if osymbols is None # <<<<<<<<<<<<<<
if ((__pyx_t_11 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1663, __pyx_L1_error)
+ __PYX_ERR(0, 1666, __pyx_L1_error)
}
__pyx_t_14 = __pyx_v_self->_fst.get()->OutputSymbols();
} else {
- /* "pywrapfst.pyx":1664
+ /* "pywrapfst.pyx":1667
* else isymbols._table,
* self._fst.get().OutputSymbols() if osymbols is None
* else osymbols._table, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 1664, __pyx_L1_error)
+ __PYX_ERR(0, 1667, __pyx_L1_error)
}
__pyx_t_14 = __pyx_v_osymbols->_table;
}
- /* "pywrapfst.pyx":1665
+ /* "pywrapfst.pyx":1668
* self._fst.get().OutputSymbols() if osymbols is None
* else osymbols._table,
* ssymbols_ptr, acceptor, show_weight_one, tostring(missing_sym)) # <<<<<<<<<<<<<<
* return sstrm.str()
*
*/
- __pyx_t_15 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1665, __pyx_L1_error)
+ __pyx_t_15 = __pyx_f_9pywrapfst_tostring(__pyx_v_missing_sym, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1668, __pyx_L1_error)
- /* "pywrapfst.pyx":1660
+ /* "pywrapfst.pyx":1663
* ssymbols_ptr = ssymbols._table
* cdef stringstream sstrm
* fst.PrintFst(deref(self._fst), sstrm, "<pywrapfst>", # <<<<<<<<<<<<<<
*/
fst::script::PrintFst((*__pyx_v_self->_fst), __pyx_v_sstrm, __pyx_t_9, __pyx_t_13, __pyx_t_14, __pyx_v_ssymbols_ptr, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_t_15);
- /* "pywrapfst.pyx":1666
+ /* "pywrapfst.pyx":1669
* else osymbols._table,
* ssymbols_ptr, acceptor, show_weight_one, tostring(missing_sym))
* return sstrm.str() # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_sstrm.str();
goto __pyx_L0;
- /* "pywrapfst.pyx":1631
+ /* "pywrapfst.pyx":1634
* return StateIterator(self)
*
* cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<<
PyObject* values[6] = {0,0,0,0,0,0};
values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":1632
+ /* "pywrapfst.pyx":1635
*
* cpdef string text(self, _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, "text") < 0)) __PYX_ERR(0, 1631, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "text") < 0)) __PYX_ERR(0, 1634, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[1]);
__pyx_v_ssymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)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, 1633, __pyx_L3_error)
+ __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1636, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":1633
+ /* "pywrapfst.pyx":1636
* cpdef string text(self, _SymbolTable isymbols=None,
* _SymbolTable osymbols=None, _SymbolTable ssymbols=None,
* bool acceptor=False, bool show_weight_one=False, missing_sym=b""): # <<<<<<<<<<<<<<
__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, 1633, __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, 1636, __pyx_L3_error)
} else {
__pyx_v_show_weight_one = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("text", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1631, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("text", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1634, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._Fst.text", __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__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1631, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1632, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1632, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 1634, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 1635, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 1635, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_4_Fst_36text(((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":1631
+ /* "pywrapfst.pyx":1634
* return StateIterator(self)
*
* cpdef string text(self, _SymbolTable isymbols=None, # <<<<<<<<<<<<<<
__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->text(__pyx_v_self, 1, &__pyx_t_2);
- __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1634, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1668
+/* "pywrapfst.pyx":1671
* return sstrm.str()
*
* cpdef bool verify(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __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, 1671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_39verify)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __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, 1668, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1671, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1677
+ /* "pywrapfst.pyx":1680
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1677, __pyx_L1_error)
+ __PYX_ERR(0, 1680, __pyx_L1_error)
}
__pyx_r = fst::script::Verify((*__pyx_v_self->_fst));
goto __pyx_L0;
- /* "pywrapfst.pyx":1668
+ /* "pywrapfst.pyx":1671
* return sstrm.str()
*
* cpdef bool verify(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("verify", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_4_Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_4_Fst_verify(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1679
+/* "pywrapfst.pyx":1682
* return fst.Verify(deref(self._fst))
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __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, 1682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_41weight_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __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, 1679, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1682, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1688
+ /* "pywrapfst.pyx":1691
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1688, __pyx_L1_error)
+ __PYX_ERR(0, 1691, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->WeightType();
goto __pyx_L0;
- /* "pywrapfst.pyx":1679
+ /* "pywrapfst.pyx":1682
* return fst.Verify(deref(self._fst))
*
* cpdef string weight_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("weight_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_weight_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1690
+/* "pywrapfst.pyx":1693
* return self._fst.get().WeightType()
*
* cpdef void write(self, filename) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __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, 1693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_43write)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (!__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_filename};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __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[2] = {__pyx_t_4, __pyx_v_filename};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_filename);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1704
+ /* "pywrapfst.pyx":1707
* FstIOError: Write failed.
* """
* if not self._fst.get().Write(tostring(filename)): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1704, __pyx_L1_error)
+ __PYX_ERR(0, 1707, __pyx_L1_error)
}
- __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L1_error)
__pyx_t_7 = ((!(__pyx_v_self->_fst.get()->Write(__pyx_t_6) != 0)) != 0);
if (__pyx_t_7) {
- /* "pywrapfst.pyx":1705
+ /* "pywrapfst.pyx":1708
* """
* if not self._fst.get().Write(tostring(filename)):
* raise FstIOError("Write failed: {!r}".format(filename)) # <<<<<<<<<<<<<<
*
* cpdef string WriteToString(self):
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Write_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
}
}
if (!__pyx_t_4) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_filename};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_filename};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_filename);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
}
if (!__pyx_t_5) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__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, 1705, __pyx_L1_error)
+ __PYX_ERR(0, 1708, __pyx_L1_error)
- /* "pywrapfst.pyx":1704
+ /* "pywrapfst.pyx":1707
* FstIOError: Write failed.
* """
* if not self._fst.get().Write(tostring(filename)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1690
+ /* "pywrapfst.pyx":1693
* return self._fst.get().WeightType()
*
* cpdef void write(self, filename) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("write", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_f_9pywrapfst_4_Fst_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __pyx_f_9pywrapfst_4_Fst_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1693, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1707
+/* "pywrapfst.pyx":1710
* raise FstIOError("Write failed: {!r}".format(filename))
*
* cpdef string WriteToString(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_WriteToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_WriteToString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_4_Fst_45WriteToString)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __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, 1707, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1710, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1708
+ /* "pywrapfst.pyx":1711
*
* cpdef string WriteToString(self):
* return self._fst.get().WriteToString() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1708, __pyx_L1_error)
+ __PYX_ERR(0, 1711, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_fst.get()->WriteToString();
goto __pyx_L0;
- /* "pywrapfst.pyx":1707
+ /* "pywrapfst.pyx":1710
* raise FstIOError("Write failed: {!r}".format(filename))
*
* cpdef string WriteToString(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("WriteToString", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_WriteToString(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_4_Fst_WriteToString(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1721
+/* "pywrapfst.pyx":1724
* """
*
* cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_check_mutating_imethod", 0);
- /* "pywrapfst.pyx":1726
+ /* "pywrapfst.pyx":1729
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1726, __pyx_L1_error)
+ __PYX_ERR(0, 1729, __pyx_L1_error)
}
__pyx_t_1 = ((__pyx_v_self->__pyx_base._fst.get()->Properties(fst::kError, 1) == fst::kError) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1727
+ /* "pywrapfst.pyx":1730
* """
* 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1730, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1727, __pyx_L1_error)
+ __PYX_ERR(0, 1730, __pyx_L1_error)
- /* "pywrapfst.pyx":1726
+ /* "pywrapfst.pyx":1729
* This function is not visible to Python users.
* """
* if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1721
+ /* "pywrapfst.pyx":1724
* """
*
* cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1729
+/* "pywrapfst.pyx":1732
* raise FstOpError("Operation failed")
*
* cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_add_arc", 0);
- /* "pywrapfst.pyx":1730
+ /* "pywrapfst.pyx":1733
*
* 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 '%s'", "_fst");
- __PYX_ERR(0, 1730, __pyx_L1_error)
+ __PYX_ERR(0, 1733, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1731
+ /* "pywrapfst.pyx":1734
* 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 1731, __pyx_L1_error)
+ __PYX_ERR(0, 1734, __pyx_L1_error)
- /* "pywrapfst.pyx":1730
+ /* "pywrapfst.pyx":1733
*
* cdef void _add_arc(self, int64 state, Arc arc) except *:
* if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1732
+ /* "pywrapfst.pyx":1735
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 1732, __pyx_L1_error)
+ __PYX_ERR(0, 1735, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc");
- __PYX_ERR(0, 1732, __pyx_L1_error)
+ __PYX_ERR(0, 1735, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->AddArc(__pyx_v_state, (*__pyx_v_arc->_arc)) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1733
+ /* "pywrapfst.pyx":1736
* raise FstIndexError("State index out of range")
* if not self._mfst.get().AddArc(state, deref(arc._arc)):
* raise FstOpError("Incompatible or invalid weight type") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1733, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1733, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __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, 1733, __pyx_L1_error)
+ __PYX_ERR(0, 1736, __pyx_L1_error)
- /* "pywrapfst.pyx":1732
+ /* "pywrapfst.pyx":1735
* 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":1734
+ /* "pywrapfst.pyx":1737
* if not self._mfst.get().AddArc(state, deref(arc._arc)):
* raise FstOpError("Incompatible or invalid weight type")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1734, __pyx_L1_error)
+ __PYX_ERR(0, 1737, __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, 1734, __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, 1737, __pyx_L1_error)
- /* "pywrapfst.pyx":1729
+ /* "pywrapfst.pyx":1732
* raise FstOpError("Operation failed")
*
* cdef void _add_arc(self, int64 state, Arc arc) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1736
+/* "pywrapfst.pyx":1739
* self._check_mutating_imethod()
*
* def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arc)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 1736, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 1739, __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, 1736, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc") < 0)) __PYX_ERR(0, 1739, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1736, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1739, __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, 1736, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1739, __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, 1736, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1739, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_add_arc(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_state, __pyx_v_arc);
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("add_arc", 0);
- /* "pywrapfst.pyx":1755
+ /* "pywrapfst.pyx":1758
* See also: `add_state`.
* """
* self._add_arc(state, arc) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_add_arc");
- __PYX_ERR(0, 1755, __pyx_L1_error)
+ __PYX_ERR(0, 1758, __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, 1755, __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, 1758, __pyx_L1_error)
- /* "pywrapfst.pyx":1756
+ /* "pywrapfst.pyx":1759
* """
* self._add_arc(state, arc)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1736
+ /* "pywrapfst.pyx":1739
* self._check_mutating_imethod()
*
* def add_arc(self, int64 state, Arc arc): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1758
+/* "pywrapfst.pyx":1761
* return self
*
* cpdef int64 add_state(self) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __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, 1761, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11_MutableFst_3add_state)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1761, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":1769
+ /* "pywrapfst.pyx":1772
* See also: `add_arc`, `set_start`, `set_final`.
* """
* cdef int64 result = self._mfst.get().AddState() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1769, __pyx_L1_error)
+ __PYX_ERR(0, 1772, __pyx_L1_error)
}
__pyx_v_result = __pyx_v_self->_mfst.get()->AddState();
- /* "pywrapfst.pyx":1770
+ /* "pywrapfst.pyx":1773
* """
* cdef int64 result = self._mfst.get().AddState()
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1770, __pyx_L1_error)
+ __PYX_ERR(0, 1773, __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, 1770, __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, 1773, __pyx_L1_error)
- /* "pywrapfst.pyx":1771
+ /* "pywrapfst.pyx":1774
* cdef int64 result = self._mfst.get().AddState()
* self._check_mutating_imethod()
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":1758
+ /* "pywrapfst.pyx":1761
* return self
*
* cpdef int64 add_state(self) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("add_state", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_f_9pywrapfst_11_MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1758, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_11_MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":1773
+/* "pywrapfst.pyx":1776
* return result
*
* cdef void _arcsort(self, st=b"ilabel") except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1775
+ /* "pywrapfst.pyx":1778
* cdef void _arcsort(self, st=b"ilabel") except *:
* cdef fst.ArcSortType sort_type
* if not fst.GetArcSortType(tostring(st), addr(sort_type)): # <<<<<<<<<<<<<<
* raise FstArgError("Unknown sort type {!r}".format(sort_type))
* fst.ArcSort(self._mfst.get(), sort_type)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_st, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_st, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1778, __pyx_L1_error)
__pyx_t_2 = ((!(fst::script::GetArcSortType(__pyx_t_1, (&__pyx_v_sort_type)) != 0)) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":1776
+ /* "pywrapfst.pyx":1779
* cdef fst.ArcSortType sort_type
* if not fst.GetArcSortType(tostring(st), addr(sort_type)):
* raise FstArgError("Unknown sort type {!r}".format(sort_type)) # <<<<<<<<<<<<<<
* fst.ArcSort(self._mfst.get(), sort_type)
* self._check_mutating_imethod()
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_sort_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_sort_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = __Pyx_PyInt_From_enum__fst_3a__3a_script_3a__3a_ArcSortType(__pyx_v_sort_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyInt_From_enum__fst_3a__3a_script_3a__3a_ArcSortType(__pyx_v_sort_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
}
}
if (!__pyx_t_8) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_7};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
__Pyx_GIVEREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
}
}
if (!__pyx_t_6) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__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, 1776, __pyx_L1_error)
+ __PYX_ERR(0, 1779, __pyx_L1_error)
- /* "pywrapfst.pyx":1775
+ /* "pywrapfst.pyx":1778
* cdef void _arcsort(self, st=b"ilabel") except *:
* cdef fst.ArcSortType sort_type
* if not fst.GetArcSortType(tostring(st), addr(sort_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1777
+ /* "pywrapfst.pyx":1780
* if not fst.GetArcSortType(tostring(st), addr(sort_type)):
* raise FstArgError("Unknown sort type {!r}".format(sort_type))
* fst.ArcSort(self._mfst.get(), sort_type) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1777, __pyx_L1_error)
+ __PYX_ERR(0, 1780, __pyx_L1_error)
}
fst::script::ArcSort(__pyx_v_self->_mfst.get(), __pyx_v_sort_type);
- /* "pywrapfst.pyx":1778
+ /* "pywrapfst.pyx":1781
* raise FstArgError("Unknown sort type {!r}".format(sort_type))
* fst.ArcSort(self._mfst.get(), sort_type)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1778, __pyx_L1_error)
+ __PYX_ERR(0, 1781, __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, 1778, __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, 1781, __pyx_L1_error)
- /* "pywrapfst.pyx":1773
+ /* "pywrapfst.pyx":1776
* return result
*
* cdef void _arcsort(self, st=b"ilabel") except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1780
+/* "pywrapfst.pyx":1783
* self._check_mutating_imethod()
*
* def arcsort(self, st=b"ilabel"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 1780, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcsort") < 0)) __PYX_ERR(0, 1783, __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, 1780, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1783, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.arcsort", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__arcsort __pyx_t_1;
__Pyx_RefNannySetupContext("arcsort", 0);
- /* "pywrapfst.pyx":1801
+ /* "pywrapfst.pyx":1804
* See also: `topsort`.
* """
* self._arcsort(st) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arcsort");
- __PYX_ERR(0, 1801, __pyx_L1_error)
+ __PYX_ERR(0, 1804, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.st = __pyx_v_st;
- ((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, 1801, __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, 1804, __pyx_L1_error)
- /* "pywrapfst.pyx":1802
+ /* "pywrapfst.pyx":1805
* """
* self._arcsort(st)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1780
+ /* "pywrapfst.pyx":1783
* self._check_mutating_imethod()
*
* def arcsort(self, st=b"ilabel"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1804
+/* "pywrapfst.pyx":1807
* return self
*
* cdef void _closure(self, bool closure_plus=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1805
+ /* "pywrapfst.pyx":1808
*
* cdef void _closure(self, bool closure_plus=False) except *:
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 1805, __pyx_L1_error)
+ __PYX_ERR(0, 1808, __pyx_L1_error)
}
fst::script::Closure(__pyx_v_self->_mfst.get(), fst::script::GetClosureType(__pyx_v_closure_plus));
- /* "pywrapfst.pyx":1806
+ /* "pywrapfst.pyx":1809
* cdef void _closure(self, bool closure_plus=False) except *:
* fst.Closure(self._mfst.get(), fst.GetClosureType(closure_plus))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1806, __pyx_L1_error)
+ __PYX_ERR(0, 1809, __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, 1806, __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, 1809, __pyx_L1_error)
- /* "pywrapfst.pyx":1804
+ /* "pywrapfst.pyx":1807
* return self
*
* cdef void _closure(self, bool closure_plus=False) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1808
+/* "pywrapfst.pyx":1811
* self._check_mutating_imethod()
*
* 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, 1808, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "closure") < 0)) __PYX_ERR(0, 1811, __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, 1808, __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, 1811, __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, 1808, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1811, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.closure", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__closure __pyx_t_1;
__Pyx_RefNannySetupContext("closure", 0);
- /* "pywrapfst.pyx":1826
+ /* "pywrapfst.pyx":1829
* self.
* """
* self._closure(closure_plus) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_closure");
- __PYX_ERR(0, 1826, __pyx_L1_error)
+ __PYX_ERR(0, 1829, __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); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1826, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1829, __pyx_L1_error)
- /* "pywrapfst.pyx":1827
+ /* "pywrapfst.pyx":1830
* """
* self._closure(closure_plus)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1808
+ /* "pywrapfst.pyx":1811
* self._check_mutating_imethod()
*
* def closure(self, bool closure_plus=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1829
+/* "pywrapfst.pyx":1832
* return self
*
* cdef void _concat(self, _Fst ifst) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_concat", 0);
- /* "pywrapfst.pyx":1830
+ /* "pywrapfst.pyx":1833
*
* cdef void _concat(self, _Fst ifst) except *:
* fst.Concat(self._mfst.get(), deref(ifst._fst)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1830, __pyx_L1_error)
+ __PYX_ERR(0, 1833, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 1830, __pyx_L1_error)
+ __PYX_ERR(0, 1833, __pyx_L1_error)
}
fst::script::Concat(__pyx_v_self->_mfst.get(), (*__pyx_v_ifst->_fst));
- /* "pywrapfst.pyx":1831
+ /* "pywrapfst.pyx":1834
* cdef void _concat(self, _Fst ifst) except *:
* fst.Concat(self._mfst.get(), deref(ifst._fst))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1831, __pyx_L1_error)
+ __PYX_ERR(0, 1834, __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, 1831, __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, 1834, __pyx_L1_error)
- /* "pywrapfst.pyx":1829
+ /* "pywrapfst.pyx":1832
* return self
*
* cdef void _concat(self, _Fst ifst) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1833
+/* "pywrapfst.pyx":1836
* self._check_mutating_imethod()
*
* def concat(self, _Fst ifst): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("concat (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 1833, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 1836, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_8concat(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("concat", 0);
- /* "pywrapfst.pyx":1850
+ /* "pywrapfst.pyx":1853
* self.
* """
* self._concat(ifst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_concat");
- __PYX_ERR(0, 1850, __pyx_L1_error)
+ __PYX_ERR(0, 1853, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1850, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L1_error)
- /* "pywrapfst.pyx":1851
+ /* "pywrapfst.pyx":1854
* """
* self._concat(ifst)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1833
+ /* "pywrapfst.pyx":1836
* self._check_mutating_imethod()
*
* def concat(self, _Fst ifst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1853
+/* "pywrapfst.pyx":1856
* return self
*
* cdef void _connect(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_connect", 0);
- /* "pywrapfst.pyx":1854
+ /* "pywrapfst.pyx":1857
*
* cdef void _connect(self) except *:
* fst.Connect(self._mfst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1854, __pyx_L1_error)
+ __PYX_ERR(0, 1857, __pyx_L1_error)
}
fst::script::Connect(__pyx_v_self->_mfst.get());
- /* "pywrapfst.pyx":1855
+ /* "pywrapfst.pyx":1858
* cdef void _connect(self) except *:
* fst.Connect(self._mfst.get())
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1855, __pyx_L1_error)
+ __PYX_ERR(0, 1858, __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, 1855, __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, 1858, __pyx_L1_error)
- /* "pywrapfst.pyx":1853
+ /* "pywrapfst.pyx":1856
* return self
*
* cdef void _connect(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1857
+/* "pywrapfst.pyx":1860
* self._check_mutating_imethod()
*
* def connect(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("connect", 0);
- /* "pywrapfst.pyx":1869
+ /* "pywrapfst.pyx":1872
* self.
* """
* self._connect() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_connect");
- __PYX_ERR(0, 1869, __pyx_L1_error)
+ __PYX_ERR(0, 1872, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1872, __pyx_L1_error)
- /* "pywrapfst.pyx":1870
+ /* "pywrapfst.pyx":1873
* """
* self._connect()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1857
+ /* "pywrapfst.pyx":1860
* self._check_mutating_imethod()
*
* def connect(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1872
+/* "pywrapfst.pyx":1875
* return self
*
* cdef void _decode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_decode", 0);
- /* "pywrapfst.pyx":1873
+ /* "pywrapfst.pyx":1876
*
* cdef void _decode(self, EncodeMapper encoder) except *:
* fst.Decode(self._mfst.get(), deref(encoder._encoder)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1873, __pyx_L1_error)
+ __PYX_ERR(0, 1876, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_encoder) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_encoder");
- __PYX_ERR(0, 1873, __pyx_L1_error)
+ __PYX_ERR(0, 1876, __pyx_L1_error)
}
fst::script::Decode(__pyx_v_self->_mfst.get(), (*__pyx_v_encoder->_encoder));
- /* "pywrapfst.pyx":1874
+ /* "pywrapfst.pyx":1877
* cdef void _decode(self, EncodeMapper encoder) except *:
* fst.Decode(self._mfst.get(), deref(encoder._encoder))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1874, __pyx_L1_error)
+ __PYX_ERR(0, 1877, __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, 1874, __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, 1877, __pyx_L1_error)
- /* "pywrapfst.pyx":1872
+ /* "pywrapfst.pyx":1875
* return self
*
* cdef void _decode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1876
+/* "pywrapfst.pyx":1879
* self._check_mutating_imethod()
*
* def decode(self, EncodeMapper encoder): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("decode (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1876, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1879, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_12decode(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_encoder));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("decode", 0);
- /* "pywrapfst.pyx":1892
+ /* "pywrapfst.pyx":1895
* See also: `encode`.
* """
* self._decode(encoder) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_decode");
- __PYX_ERR(0, 1892, __pyx_L1_error)
+ __PYX_ERR(0, 1895, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1895, __pyx_L1_error)
- /* "pywrapfst.pyx":1893
+ /* "pywrapfst.pyx":1896
* """
* self._decode(encoder)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1876
+ /* "pywrapfst.pyx":1879
* self._check_mutating_imethod()
*
* def decode(self, EncodeMapper encoder): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1895
+/* "pywrapfst.pyx":1898
* return self
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1896
+ /* "pywrapfst.pyx":1899
*
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 1896, __pyx_L1_error)
+ __PYX_ERR(0, 1899, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state, __pyx_v_n);
} else {
- /* "pywrapfst.pyx":1897
+ /* "pywrapfst.pyx":1900
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 1897, __pyx_L1_error)
+ __PYX_ERR(0, 1900, __pyx_L1_error)
}
__pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state);
}
- /* "pywrapfst.pyx":1896
+ /* "pywrapfst.pyx":1899
*
* 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 (__pyx_t_2) {
- /* "pywrapfst.pyx":1898
+ /* "pywrapfst.pyx":1901
* 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_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1898, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 1898, __pyx_L1_error)
+ __PYX_ERR(0, 1901, __pyx_L1_error)
- /* "pywrapfst.pyx":1896
+ /* "pywrapfst.pyx":1899
*
* 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":1899
+ /* "pywrapfst.pyx":1902
* 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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1899, __pyx_L1_error)
+ __PYX_ERR(0, 1902, __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, 1899, __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, 1902, __pyx_L1_error)
- /* "pywrapfst.pyx":1895
+ /* "pywrapfst.pyx":1898
* return self
*
* cdef void _delete_arcs(self, int64 state, size_t n=0) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1901
+/* "pywrapfst.pyx":1904
* 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, 1901, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 1904, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1901, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1904, __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, 1901, __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, 1904, __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, 1901, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1904, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.delete_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__delete_arcs __pyx_t_1;
__Pyx_RefNannySetupContext("delete_arcs", 0);
- /* "pywrapfst.pyx":1921
+ /* "pywrapfst.pyx":1924
* See also: `delete_states`.
* """
* self._delete_arcs(state, n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_delete_arcs");
- __PYX_ERR(0, 1921, __pyx_L1_error)
+ __PYX_ERR(0, 1924, __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, 1921, __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, 1924, __pyx_L1_error)
- /* "pywrapfst.pyx":1922
+ /* "pywrapfst.pyx":1925
* """
* self._delete_arcs(state, n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1901
+ /* "pywrapfst.pyx":1904
* self._check_mutating_imethod()
*
* def delete_arcs(self, int64 state, size_t n=0): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1924
+/* "pywrapfst.pyx":1927
* return self
*
* cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":1926
+ /* "pywrapfst.pyx":1929
* 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, 1926, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1929, __pyx_L1_error)
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1927
+ /* "pywrapfst.pyx":1930
* # 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 '%s'", "_mfst");
- __PYX_ERR(0, 1927, __pyx_L1_error)
+ __PYX_ERR(0, 1930, __pyx_L1_error)
}
- __pyx_t_2 = __pyx_convert_vector_from_py___pyx_t_10basictypes_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_vector_from_py___pyx_t_10basictypes_int64(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1930, __pyx_L1_error)
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->DeleteStates(((std::vector<__pyx_t_10basictypes_int64> const )__pyx_t_2)) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":1928
+ /* "pywrapfst.pyx":1931
* 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_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1931, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1928, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1931, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __PYX_ERR(0, 1928, __pyx_L1_error)
+ __PYX_ERR(0, 1931, __pyx_L1_error)
- /* "pywrapfst.pyx":1927
+ /* "pywrapfst.pyx":1930
* # Only the former signature has a possible indexing failure.
* if states:
* if not self._mfst.get().DeleteStates(<const vector[int64]> states): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":1926
+ /* "pywrapfst.pyx":1929
* cdef void _delete_states(self, states=None) except *:
* # Only the former signature has a possible indexing failure.
* if states: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":1930
+ /* "pywrapfst.pyx":1933
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 1930, __pyx_L1_error)
+ __PYX_ERR(0, 1933, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->DeleteStates();
}
__pyx_L3:;
- /* "pywrapfst.pyx":1931
+ /* "pywrapfst.pyx":1934
* 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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1931, __pyx_L1_error)
+ __PYX_ERR(0, 1934, __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, 1931, __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, 1934, __pyx_L1_error)
- /* "pywrapfst.pyx":1924
+ /* "pywrapfst.pyx":1927
* return self
*
* cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1933
+/* "pywrapfst.pyx":1936
* 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, 1933, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "delete_states") < 0)) __PYX_ERR(0, 1936, __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, 1933, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1936, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.delete_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__delete_states __pyx_t_1;
__Pyx_RefNannySetupContext("delete_states", 0);
- /* "pywrapfst.pyx":1951
+ /* "pywrapfst.pyx":1954
* See also: `delete_arcs`.
* """
* self._delete_states(states) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_delete_states");
- __PYX_ERR(0, 1951, __pyx_L1_error)
+ __PYX_ERR(0, 1954, __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, 1951, __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, 1954, __pyx_L1_error)
- /* "pywrapfst.pyx":1952
+ /* "pywrapfst.pyx":1955
* """
* self._delete_states(states)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1933
+ /* "pywrapfst.pyx":1936
* self._check_mutating_imethod()
*
* def delete_states(self, states=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1954
+/* "pywrapfst.pyx":1957
* return self
*
* cdef void _encode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_encode", 0);
- /* "pywrapfst.pyx":1955
+ /* "pywrapfst.pyx":1958
*
* cdef void _encode(self, EncodeMapper encoder) except *:
* fst.Encode(self._mfst.get(), encoder._encoder.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1955, __pyx_L1_error)
+ __PYX_ERR(0, 1958, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_encoder) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_encoder");
- __PYX_ERR(0, 1955, __pyx_L1_error)
+ __PYX_ERR(0, 1958, __pyx_L1_error)
}
fst::script::Encode(__pyx_v_self->_mfst.get(), __pyx_v_encoder->_encoder.get());
- /* "pywrapfst.pyx":1956
+ /* "pywrapfst.pyx":1959
* cdef void _encode(self, EncodeMapper encoder) except *:
* fst.Encode(self._mfst.get(), encoder._encoder.get())
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1956, __pyx_L1_error)
+ __PYX_ERR(0, 1959, __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, 1956, __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, 1959, __pyx_L1_error)
- /* "pywrapfst.pyx":1954
+ /* "pywrapfst.pyx":1957
* return self
*
* cdef void _encode(self, EncodeMapper encoder) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1958
+/* "pywrapfst.pyx":1961
* self._check_mutating_imethod()
*
* def encode(self, EncodeMapper encoder): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("encode (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1958, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoder), __pyx_ptype_9pywrapfst_EncodeMapper, 1, "encoder", 0))) __PYX_ERR(0, 1961, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_18encode(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_EncodeMapper *)__pyx_v_encoder));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("encode", 0);
- /* "pywrapfst.pyx":1979
+ /* "pywrapfst.pyx":1982
* See also: `decode`.
* """
* self._encode(encoder) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_encode");
- __PYX_ERR(0, 1979, __pyx_L1_error)
+ __PYX_ERR(0, 1982, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1979, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_encoder); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1982, __pyx_L1_error)
- /* "pywrapfst.pyx":1980
+ /* "pywrapfst.pyx":1983
* """
* self._encode(encoder)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1958
+ /* "pywrapfst.pyx":1961
* self._check_mutating_imethod()
*
* def encode(self, EncodeMapper encoder): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":1982
+/* "pywrapfst.pyx":1985
* return self
*
* cdef void _invert(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_invert", 0);
- /* "pywrapfst.pyx":1983
+ /* "pywrapfst.pyx":1986
*
* cdef void _invert(self) except *:
* fst.Invert(self._mfst.get()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 1983, __pyx_L1_error)
+ __PYX_ERR(0, 1986, __pyx_L1_error)
}
fst::script::Invert(__pyx_v_self->_mfst.get());
- /* "pywrapfst.pyx":1984
+ /* "pywrapfst.pyx":1987
* cdef void _invert(self) except *:
* fst.Invert(self._mfst.get())
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 1984, __pyx_L1_error)
+ __PYX_ERR(0, 1987, __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, 1984, __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, 1987, __pyx_L1_error)
- /* "pywrapfst.pyx":1982
+ /* "pywrapfst.pyx":1985
* return self
*
* cdef void _invert(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":1986
+/* "pywrapfst.pyx":1989
* self._check_mutating_imethod()
*
* def invert(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("invert", 0);
- /* "pywrapfst.pyx":1998
+ /* "pywrapfst.pyx":2001
* self.
* """
* self._invert() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_invert");
- __PYX_ERR(0, 1998, __pyx_L1_error)
+ __PYX_ERR(0, 2001, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1998, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2001, __pyx_L1_error)
- /* "pywrapfst.pyx":1999
+ /* "pywrapfst.pyx":2002
* """
* self._invert()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":1986
+ /* "pywrapfst.pyx":1989
* self._check_mutating_imethod()
*
* def invert(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2001
+/* "pywrapfst.pyx":2004
* return self
*
* cdef void _minimize(self, float delta=fst.kDelta, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_11_MutableFst__minimize(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__minimize *__pyx_optional_args) {
float __pyx_v_delta = __pyx_k__11;
- /* "pywrapfst.pyx":2002
+ /* "pywrapfst.pyx":2005
*
* cdef void _minimize(self, float delta=fst.kDelta,
* bool allow_nondet=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2004
+ /* "pywrapfst.pyx":2007
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 2004, __pyx_L1_error)
+ __PYX_ERR(0, 2007, __pyx_L1_error)
}
fst::script::Minimize(__pyx_v_self->_mfst.get(), NULL, __pyx_v_delta, __pyx_v_allow_nondet);
- /* "pywrapfst.pyx":2005
+ /* "pywrapfst.pyx":2008
* # 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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2005, __pyx_L1_error)
+ __PYX_ERR(0, 2008, __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, 2005, __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, 2008, __pyx_L1_error)
- /* "pywrapfst.pyx":2001
+ /* "pywrapfst.pyx":2004
* return self
*
* cdef void _minimize(self, float delta=fst.kDelta, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2007
+/* "pywrapfst.pyx":2010
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kDelta, 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, 2007, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "minimize") < 0)) __PYX_ERR(0, 2010, __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, 2007, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2010, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__12;
}
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, 2007, __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, 2010, __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, 2007, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2010, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.minimize", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__minimize __pyx_t_1;
__Pyx_RefNannySetupContext("minimize", 0);
- /* "pywrapfst.pyx":2033
+ /* "pywrapfst.pyx":2036
* self.
* """
* self._minimize(delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_minimize");
- __PYX_ERR(0, 2033, __pyx_L1_error)
+ __PYX_ERR(0, 2036, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.delta = __pyx_v_delta;
- ((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, 2033, __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, 2036, __pyx_L1_error)
- /* "pywrapfst.pyx":2034
+ /* "pywrapfst.pyx":2037
* """
* self._minimize(delta)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2007
+ /* "pywrapfst.pyx":2010
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kDelta, bool allow_nondet=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2036
+/* "pywrapfst.pyx":2039
* return self
*
* cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __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, 2039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11_MutableFst_25mutable_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, 2036, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
}
__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, 2036, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_MutableArcIterator))))) __PYX_ERR(0, 2039, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2051
+ /* "pywrapfst.pyx":2054
* See also: `arcs`, `states`.
* """
* 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, 2051, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __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, 2051, __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, 2054, __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_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2036
+ /* "pywrapfst.pyx":2039
* return self
*
* cpdef MutableArcIterator mutable_arcs(self, int64 state): # <<<<<<<<<<<<<<
__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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2036, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("mutable_arcs", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_11_MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_11_MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2039, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2053
+/* "pywrapfst.pyx":2056
* return MutableArcIterator(self, state)
*
* def mutable_input_symbols(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("mutable_input_symbols", 0);
- /* "pywrapfst.pyx":2054
+ /* "pywrapfst.pyx":2057
*
* def mutable_input_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableInputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2054, __pyx_L1_error)
+ __PYX_ERR(0, 2057, __pyx_L1_error)
}
__pyx_v_tst = __pyx_v_self->_mfst.get()->MutableInputSymbols();
- /* "pywrapfst.pyx":2055
+ /* "pywrapfst.pyx":2058
* def mutable_input_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableInputSymbols()
* if tst == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_tst == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2056
+ /* "pywrapfst.pyx":2059
* cdef fst.SymbolTable *tst = self._mfst.get().MutableInputSymbols()
* if tst == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":2055
+ /* "pywrapfst.pyx":2058
* def mutable_input_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableInputSymbols()
* if tst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2057
+ /* "pywrapfst.pyx":2060
* if tst == NULL:
* return
* return _init_MutableFstSymbolTable(tst, self._mfst) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2057, __pyx_L1_error)
+ __PYX_ERR(0, 2060, __pyx_L1_error)
}
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_tst, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2057, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_tst, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2053
+ /* "pywrapfst.pyx":2056
* return MutableArcIterator(self, state)
*
* def mutable_input_symbols(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2059
+/* "pywrapfst.pyx":2062
* return _init_MutableFstSymbolTable(tst, self._mfst)
*
* def mutable_output_symbols(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("mutable_output_symbols", 0);
- /* "pywrapfst.pyx":2060
+ /* "pywrapfst.pyx":2063
*
* def mutable_output_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableOutputSymbols() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2060, __pyx_L1_error)
+ __PYX_ERR(0, 2063, __pyx_L1_error)
}
__pyx_v_tst = __pyx_v_self->_mfst.get()->MutableOutputSymbols();
- /* "pywrapfst.pyx":2061
+ /* "pywrapfst.pyx":2064
* def mutable_output_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableOutputSymbols()
* if tst == NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_tst == NULL) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2062
+ /* "pywrapfst.pyx":2065
* cdef fst.SymbolTable *tst = self._mfst.get().MutableOutputSymbols()
* if tst == NULL:
* return # <<<<<<<<<<<<<<
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "pywrapfst.pyx":2061
+ /* "pywrapfst.pyx":2064
* def mutable_output_symbols(self):
* cdef fst.SymbolTable *tst = self._mfst.get().MutableOutputSymbols()
* if tst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2063
+ /* "pywrapfst.pyx":2066
* if tst == NULL:
* return
* return _init_MutableFstSymbolTable(tst, self._mfst) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2063, __pyx_L1_error)
+ __PYX_ERR(0, 2066, __pyx_L1_error)
}
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_tst, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFstSymbolTable(__pyx_v_tst, __pyx_v_self->_mfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2066, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2059
+ /* "pywrapfst.pyx":2062
* return _init_MutableFstSymbolTable(tst, self._mfst)
*
* def mutable_output_symbols(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2065
+/* "pywrapfst.pyx":2068
* return _init_MutableFstSymbolTable(tst, self._mfst)
*
* cpdef int64 num_states(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2065, __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, 2068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11_MutableFst_31num_states)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2068, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2066
+ /* "pywrapfst.pyx":2069
*
* cpdef int64 num_states(self):
* return self._mfst.get().NumStates() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2066, __pyx_L1_error)
+ __PYX_ERR(0, 2069, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_mfst.get()->NumStates();
goto __pyx_L0;
- /* "pywrapfst.pyx":2065
+ /* "pywrapfst.pyx":2068
* return _init_MutableFstSymbolTable(tst, self._mfst)
*
* cpdef int64 num_states(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("num_states", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_11_MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2065, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_f_9pywrapfst_11_MutableFst_num_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2068, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2068
+/* "pywrapfst.pyx":2071
* return self._mfst.get().NumStates()
*
* cdef void _project(self, bool project_output=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2069
+ /* "pywrapfst.pyx":2072
*
* cdef void _project(self, bool project_output=False) except *:
* fst.Project(self._mfst.get(), fst.GetProjectType(project_output)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2069, __pyx_L1_error)
+ __PYX_ERR(0, 2072, __pyx_L1_error)
}
fst::script::Project(__pyx_v_self->_mfst.get(), fst::script::GetProjectType(__pyx_v_project_output));
- /* "pywrapfst.pyx":2070
+ /* "pywrapfst.pyx":2073
* cdef void _project(self, bool project_output=False) except *:
* fst.Project(self._mfst.get(), fst.GetProjectType(project_output))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2070, __pyx_L1_error)
+ __PYX_ERR(0, 2073, __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, 2070, __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, 2073, __pyx_L1_error)
- /* "pywrapfst.pyx":2068
+ /* "pywrapfst.pyx":2071
* return self._mfst.get().NumStates()
*
* cdef void _project(self, bool project_output=False) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2072
+/* "pywrapfst.pyx":2075
* self._check_mutating_imethod()
*
* def project(self, bool project_output=False): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "project") < 0)) __PYX_ERR(0, 2072, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "project") < 0)) __PYX_ERR(0, 2075, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_project_output = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_project_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2072, __pyx_L3_error)
+ __pyx_v_project_output = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_project_output == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2075, __pyx_L3_error)
} else {
__pyx_v_project_output = ((bool)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("project", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2072, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("project", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2075, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.project", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__project __pyx_t_1;
__Pyx_RefNannySetupContext("project", 0);
- /* "pywrapfst.pyx":2090
+ /* "pywrapfst.pyx":2093
* See also: `decode`, `encode`, `relabel_pairs`, `relabel_symbols`.
* """
* self._project(project_output) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_project");
- __PYX_ERR(0, 2090, __pyx_L1_error)
+ __PYX_ERR(0, 2093, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 1;
__pyx_t_1.project_output = __pyx_v_project_output;
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2090, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L1_error)
- /* "pywrapfst.pyx":2091
+ /* "pywrapfst.pyx":2094
* """
* self._project(project_output)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2072
+ /* "pywrapfst.pyx":2075
* self._check_mutating_imethod()
*
* def project(self, bool project_output=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2093
+/* "pywrapfst.pyx":2096
* return self
*
* cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__13;
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__14;
- /* "pywrapfst.pyx":2094
+ /* "pywrapfst.pyx":2097
*
* cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId,
* weight=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2096
+ /* "pywrapfst.pyx":2099
* weight=None) except *:
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 2096, __pyx_L1_error)
+ __PYX_ERR(0, 2099, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2097
+ /* "pywrapfst.pyx":2100
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* fst.Prune(self._mfst.get(), wc, 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, 2096, __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, 2099, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":2098
+ /* "pywrapfst.pyx":2101
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(),
* weight)
* fst.Prune(self._mfst.get(), wc, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2098, __pyx_L1_error)
+ __PYX_ERR(0, 2101, __pyx_L1_error)
}
fst::script::Prune(__pyx_v_self->_mfst.get(), __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":2099
+ /* "pywrapfst.pyx":2102
* weight)
* fst.Prune(self._mfst.get(), wc, nstate, delta)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2099, __pyx_L1_error)
+ __PYX_ERR(0, 2102, __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, 2099, __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, 2102, __pyx_L1_error)
- /* "pywrapfst.pyx":2093
+ /* "pywrapfst.pyx":2096
* return self
*
* cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2101
+/* "pywrapfst.pyx":2104
* 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":2104
+ /* "pywrapfst.pyx":2107
* 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, 2101, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 2104, __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, 2102, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2105, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__15;
}
if (values[1]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2103, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2106, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__16;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2101, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2104, __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_11_MutableFst_34prune(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight);
- /* "pywrapfst.pyx":2101
+ /* "pywrapfst.pyx":2104
* self._check_mutating_imethod()
*
* def prune(self, # <<<<<<<<<<<<<<
struct __pyx_opt_args_9pywrapfst_11_MutableFst__prune __pyx_t_1;
__Pyx_RefNannySetupContext("prune", 0);
- /* "pywrapfst.pyx":2126
+ /* "pywrapfst.pyx":2129
* See also: The constructive variant.
* """
* self._prune(delta, nstate, weight) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_prune");
- __PYX_ERR(0, 2126, __pyx_L1_error)
+ __PYX_ERR(0, 2129, __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, 2126, __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, 2129, __pyx_L1_error)
- /* "pywrapfst.pyx":2127
+ /* "pywrapfst.pyx":2130
* """
* self._prune(delta, nstate, weight)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2101
+ /* "pywrapfst.pyx":2104
* self._check_mutating_imethod()
*
* def prune(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2129
+/* "pywrapfst.pyx":2132
* return self
*
* cdef void _push(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_11_MutableFst__push(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__push *__pyx_optional_args) {
float __pyx_v_delta = __pyx_k__17;
- /* "pywrapfst.pyx":2131
+ /* "pywrapfst.pyx":2134
* cdef void _push(self,
* float delta=fst.kDelta,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_total_weight = ((bool)0);
- /* "pywrapfst.pyx":2132
+ /* "pywrapfst.pyx":2135
* float delta=fst.kDelta,
* bool remove_total_weight=False,
* bool to_final=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2133
+ /* "pywrapfst.pyx":2136
* bool remove_total_weight=False,
* bool to_final=False) except *:
* fst.Push(self._mfst.get(), fst.GetReweightType(to_final), delta, # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2133, __pyx_L1_error)
+ __PYX_ERR(0, 2136, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2134
+ /* "pywrapfst.pyx":2137
* bool to_final=False) except *:
* fst.Push(self._mfst.get(), 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":2135
+ /* "pywrapfst.pyx":2138
* fst.Push(self._mfst.get(), fst.GetReweightType(to_final), delta,
* remove_total_weight)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2135, __pyx_L1_error)
+ __PYX_ERR(0, 2138, __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, 2135, __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, 2138, __pyx_L1_error)
- /* "pywrapfst.pyx":2129
+ /* "pywrapfst.pyx":2132
* return self
*
* cdef void _push(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2137
+/* "pywrapfst.pyx":2140
* self._check_mutating_imethod()
*
* 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, 2137, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 2140, __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, 2138, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2141, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__18;
}
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, 2139, __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, 2142, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2139
+ /* "pywrapfst.pyx":2142
* def push(self,
* float delta=fst.kDelta,
* 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, 2140, __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, 2143, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2140
+ /* "pywrapfst.pyx":2143
* float delta=fst.kDelta,
* 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, 2137, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2140, __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_11_MutableFst_36push(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_remove_total_weight, __pyx_v_to_final);
- /* "pywrapfst.pyx":2137
+ /* "pywrapfst.pyx":2140
* self._check_mutating_imethod()
*
* def push(self, # <<<<<<<<<<<<<<
struct __pyx_opt_args_9pywrapfst_11_MutableFst__push __pyx_t_1;
__Pyx_RefNannySetupContext("push", 0);
- /* "pywrapfst.pyx":2166
+ /* "pywrapfst.pyx":2169
* See also: The constructive variant, which also supports label pushing.
* """
* 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 '%s'", "_push");
- __PYX_ERR(0, 2166, __pyx_L1_error)
+ __PYX_ERR(0, 2169, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 3;
__pyx_t_1.delta = __pyx_v_delta;
__pyx_t_1.remove_total_weight = __pyx_v_remove_total_weight;
__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); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2166, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L1_error)
- /* "pywrapfst.pyx":2167
+ /* "pywrapfst.pyx":2170
* """
* self._push(delta, remove_total_weight, to_final)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2137
+ /* "pywrapfst.pyx":2140
* self._check_mutating_imethod()
*
* def push(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2169
+/* "pywrapfst.pyx":2172
* return self
*
* cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2171
+ /* "pywrapfst.pyx":2174
* cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *:
* cdef unique_ptr[vector[fst.LabelPair]] _ipairs
* _ipairs.reset(new vector[fst.LabelPair]()) # <<<<<<<<<<<<<<
__pyx_t_1 = new std::vector<__pyx_t_3fst_LabelPair> ();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2171, __pyx_L1_error)
+ __PYX_ERR(0, 2174, __pyx_L1_error)
}
__pyx_v__ipairs.reset(__pyx_t_1);
- /* "pywrapfst.pyx":2173
+ /* "pywrapfst.pyx":2176
* _ipairs.reset(new vector[fst.LabelPair]())
* cdef unique_ptr[vector[fst.LabelPair]] _opairs
* _opairs.reset(new vector[fst.LabelPair]()) # <<<<<<<<<<<<<<
__pyx_t_1 = new std::vector<__pyx_t_3fst_LabelPair> ();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2173, __pyx_L1_error)
+ __PYX_ERR(0, 2176, __pyx_L1_error)
}
__pyx_v__opairs.reset(__pyx_t_1);
- /* "pywrapfst.pyx":2176
+ /* "pywrapfst.pyx":2179
* cdef int64 before
* cdef int64 after
* if ipairs: # <<<<<<<<<<<<<<
* for (before, after) in ipairs:
* _ipairs.get().push_back(fst.LabelPair(before, after))
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2176, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2179, __pyx_L1_error)
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2177
+ /* "pywrapfst.pyx":2180
* cdef int64 after
* if ipairs:
* for (before, after) in ipairs: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_ipairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2180, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2180, __pyx_L1_error)
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2180, __pyx_L1_error)
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2177, __pyx_L1_error)
+ else __PYX_ERR(0, 2180, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2177, __pyx_L1_error)
+ __PYX_ERR(0, 2180, __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_8);
#else
- __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
__Pyx_GOTREF(__pyx_t_7);
index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
__Pyx_GOTREF(__pyx_t_8);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2177, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2180, __pyx_L1_error)
__pyx_t_10 = NULL;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L7_unpacking_done;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2177, __pyx_L1_error)
+ __PYX_ERR(0, 2180, __pyx_L1_error)
__pyx_L7_unpacking_done:;
}
- __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2177, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_v_before = __pyx_t_11;
__pyx_v_after = __pyx_t_12;
- /* "pywrapfst.pyx":2178
+ /* "pywrapfst.pyx":2181
* if ipairs:
* for (before, after) in ipairs:
* _ipairs.get().push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<<
__pyx_t_13 = __pyx_t_3fst_LabelPair(__pyx_v_before, __pyx_v_after);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2178, __pyx_L1_error)
+ __PYX_ERR(0, 2181, __pyx_L1_error)
}
try {
__pyx_v__ipairs.get()->push_back(__pyx_t_13);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2178, __pyx_L1_error)
+ __PYX_ERR(0, 2181, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2177
+ /* "pywrapfst.pyx":2180
* cdef int64 after
* if ipairs:
* for (before, after) in ipairs: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pywrapfst.pyx":2176
+ /* "pywrapfst.pyx":2179
* cdef int64 before
* cdef int64 after
* if ipairs: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2179
+ /* "pywrapfst.pyx":2182
* for (before, after) in ipairs:
* _ipairs.get().push_back(fst.LabelPair(before, after))
* if opairs: # <<<<<<<<<<<<<<
* for (before, after) in opairs:
* _opairs.get().push_back(fst.LabelPair(before, after))
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2179, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2182, __pyx_L1_error)
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2180
+ /* "pywrapfst.pyx":2183
* _ipairs.get().push_back(fst.LabelPair(before, after))
* if opairs:
* for (before, after) in opairs: # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_opairs; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
- __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2183, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_5)) {
if (likely(PyList_CheckExact(__pyx_t_3))) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2183, __pyx_L1_error)
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
} else {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2183, __pyx_L1_error)
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2180, __pyx_L1_error)
+ else __PYX_ERR(0, 2183, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 2180, __pyx_L1_error)
+ __PYX_ERR(0, 2183, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_8);
__Pyx_INCREF(__pyx_t_7);
#else
- __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
#endif
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
__Pyx_GOTREF(__pyx_t_8);
index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed;
__Pyx_GOTREF(__pyx_t_7);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2180, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2183, __pyx_L1_error)
__pyx_t_10 = NULL;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L12_unpacking_done;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 2180, __pyx_L1_error)
+ __PYX_ERR(0, 2183, __pyx_L1_error)
__pyx_L12_unpacking_done:;
}
- __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_8); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_t_7); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2183, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_before = __pyx_t_12;
__pyx_v_after = __pyx_t_11;
- /* "pywrapfst.pyx":2181
+ /* "pywrapfst.pyx":2184
* if opairs:
* for (before, after) in opairs:
* _opairs.get().push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<<
__pyx_t_13 = __pyx_t_3fst_LabelPair(__pyx_v_before, __pyx_v_after);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2181, __pyx_L1_error)
+ __PYX_ERR(0, 2184, __pyx_L1_error)
}
try {
__pyx_v__opairs.get()->push_back(__pyx_t_13);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2181, __pyx_L1_error)
+ __PYX_ERR(0, 2184, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2180
+ /* "pywrapfst.pyx":2183
* _ipairs.get().push_back(fst.LabelPair(before, after))
* if opairs:
* for (before, after) in opairs: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "pywrapfst.pyx":2179
+ /* "pywrapfst.pyx":2182
* for (before, after) in ipairs:
* _ipairs.get().push_back(fst.LabelPair(before, after))
* if opairs: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2182
+ /* "pywrapfst.pyx":2185
* for (before, after) in opairs:
* _opairs.get().push_back(fst.LabelPair(before, after))
* if _ipairs.get().empty() and _opairs.get().empty(): # <<<<<<<<<<<<<<
__pyx_L14_bool_binop_done:;
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2183
+ /* "pywrapfst.pyx":2186
* _opairs.get().push_back(fst.LabelPair(before, after))
* if _ipairs.get().empty() and _opairs.get().empty():
* raise FstArgError("No relabeling pairs specified.") # <<<<<<<<<<<<<<
* fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs))
* self._check_mutating_imethod()
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2183, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __PYX_ERR(0, 2183, __pyx_L1_error)
+ __PYX_ERR(0, 2186, __pyx_L1_error)
- /* "pywrapfst.pyx":2182
+ /* "pywrapfst.pyx":2185
* for (before, after) in opairs:
* _opairs.get().push_back(fst.LabelPair(before, after))
* if _ipairs.get().empty() and _opairs.get().empty(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2184
+ /* "pywrapfst.pyx":2187
* if _ipairs.get().empty() and _opairs.get().empty():
* raise FstArgError("No relabeling pairs specified.")
* fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2184, __pyx_L1_error)
+ __PYX_ERR(0, 2187, __pyx_L1_error)
}
fst::script::Relabel(__pyx_v_self->_mfst.get(), (*__pyx_v__ipairs), (*__pyx_v__opairs));
- /* "pywrapfst.pyx":2185
+ /* "pywrapfst.pyx":2188
* raise FstArgError("No relabeling pairs specified.")
* fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2185, __pyx_L1_error)
+ __PYX_ERR(0, 2188, __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, 2185, __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, 2188, __pyx_L1_error)
- /* "pywrapfst.pyx":2169
+ /* "pywrapfst.pyx":2172
* return self
*
* cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2187
+/* "pywrapfst.pyx":2190
* 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, 2187, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2190, __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, 2187, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2190, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.relabel_pairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_pairs __pyx_t_1;
__Pyx_RefNannySetupContext("relabel_pairs", 0);
- /* "pywrapfst.pyx":2209
+ /* "pywrapfst.pyx":2212
* See also: `decode`, `encode`, `project`, `relabel_tables`.
* """
* self._relabel_pairs(ipairs, opairs) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_relabel_pairs");
- __PYX_ERR(0, 2209, __pyx_L1_error)
+ __PYX_ERR(0, 2212, __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, 2209, __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, 2212, __pyx_L1_error)
- /* "pywrapfst.pyx":2210
+ /* "pywrapfst.pyx":2213
* """
* self._relabel_pairs(ipairs, opairs)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2187
+ /* "pywrapfst.pyx":2190
* self._check_mutating_imethod()
*
* def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2212
+/* "pywrapfst.pyx":2215
* return self
*
* cdef void _relabel_tables(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_11_MutableFst__relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_tables *__pyx_optional_args) {
- /* "pywrapfst.pyx":2213
+ /* "pywrapfst.pyx":2216
*
* cdef void _relabel_tables(self,
* _SymbolTable old_isymbols=None, # <<<<<<<<<<<<<<
* _SymbolTable new_isymbols=None,
- * bool attach_new_isymbols=True,
+ * unknown_isymbol=b"",
*/
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":2214
+ /* "pywrapfst.pyx":2217
* cdef void _relabel_tables(self,
* _SymbolTable old_isymbols=None,
* _SymbolTable new_isymbols=None, # <<<<<<<<<<<<<<
+ * unknown_isymbol=b"",
* bool attach_new_isymbols=True,
- * _SymbolTable old_osymbols=None,
*/
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ PyObject *__pyx_v_unknown_isymbol = ((PyObject *)__pyx_kp_b_);
- /* "pywrapfst.pyx":2215
- * _SymbolTable old_isymbols=None,
+ /* "pywrapfst.pyx":2219
* _SymbolTable new_isymbols=None,
+ * unknown_isymbol=b"",
* bool attach_new_isymbols=True, # <<<<<<<<<<<<<<
* _SymbolTable old_osymbols=None,
* _SymbolTable new_osymbols=None,
*/
bool __pyx_v_attach_new_isymbols = ((bool)1);
- /* "pywrapfst.pyx":2216
- * _SymbolTable new_isymbols=None,
+ /* "pywrapfst.pyx":2220
+ * unknown_isymbol=b"",
* bool attach_new_isymbols=True,
* _SymbolTable old_osymbols=None, # <<<<<<<<<<<<<<
* _SymbolTable new_osymbols=None,
- * bool attach_new_osymbols=True) except *:
+ * unknown_osymbol=b"",
*/
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":2217
+ /* "pywrapfst.pyx":2221
* bool attach_new_isymbols=True,
* _SymbolTable old_osymbols=None,
* _SymbolTable new_osymbols=None, # <<<<<<<<<<<<<<
+ * unknown_osymbol=b"",
* bool attach_new_osymbols=True) except *:
- * if new_isymbols is None and new_osymbols is None:
*/
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ PyObject *__pyx_v_unknown_osymbol = ((PyObject *)__pyx_kp_b_);
- /* "pywrapfst.pyx":2218
- * _SymbolTable old_osymbols=None,
+ /* "pywrapfst.pyx":2223
* _SymbolTable new_osymbols=None,
+ * unknown_osymbol=b"",
* bool attach_new_osymbols=True) except *: # <<<<<<<<<<<<<<
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified")
PyObject *__pyx_t_5 = NULL;
fst::SymbolTable *__pyx_t_6;
fst::SymbolTable const *__pyx_t_7;
- fst::SymbolTable const *__pyx_t_8;
+ std::string __pyx_t_8;
+ fst::SymbolTable const *__pyx_t_9;
+ std::string __pyx_t_10;
__Pyx_RefNannySetupContext("_relabel_tables", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
if (__pyx_optional_args->__pyx_n > 1) {
__pyx_v_new_isymbols = __pyx_optional_args->new_isymbols;
if (__pyx_optional_args->__pyx_n > 2) {
- __pyx_v_attach_new_isymbols = __pyx_optional_args->attach_new_isymbols;
+ __pyx_v_unknown_isymbol = __pyx_optional_args->unknown_isymbol;
if (__pyx_optional_args->__pyx_n > 3) {
- __pyx_v_old_osymbols = __pyx_optional_args->old_osymbols;
+ __pyx_v_attach_new_isymbols = __pyx_optional_args->attach_new_isymbols;
if (__pyx_optional_args->__pyx_n > 4) {
- __pyx_v_new_osymbols = __pyx_optional_args->new_osymbols;
+ __pyx_v_old_osymbols = __pyx_optional_args->old_osymbols;
if (__pyx_optional_args->__pyx_n > 5) {
- __pyx_v_attach_new_osymbols = __pyx_optional_args->attach_new_osymbols;
+ __pyx_v_new_osymbols = __pyx_optional_args->new_osymbols;
+ if (__pyx_optional_args->__pyx_n > 6) {
+ __pyx_v_unknown_osymbol = __pyx_optional_args->unknown_osymbol;
+ if (__pyx_optional_args->__pyx_n > 7) {
+ __pyx_v_attach_new_osymbols = __pyx_optional_args->attach_new_osymbols;
+ }
+ }
}
}
}
}
}
- /* "pywrapfst.pyx":2219
- * _SymbolTable new_osymbols=None,
+ /* "pywrapfst.pyx":2224
+ * unknown_osymbol=b"",
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<<
* raise FstArgError("No new SymbolTables specified")
__pyx_L4_bool_binop_done:;
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2220
+ /* "pywrapfst.pyx":2225
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified") # <<<<<<<<<<<<<<
* cdef fst.SymbolTable *new_isymbols_ptr = NULL
* if new_isymbols is not None:
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2220, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2220, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2225, __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, 2220, __pyx_L1_error)
+ __PYX_ERR(0, 2225, __pyx_L1_error)
- /* "pywrapfst.pyx":2219
- * _SymbolTable new_osymbols=None,
+ /* "pywrapfst.pyx":2224
+ * unknown_osymbol=b"",
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<<
* raise FstArgError("No new SymbolTables specified")
*/
}
- /* "pywrapfst.pyx":2221
+ /* "pywrapfst.pyx":2226
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified")
* cdef fst.SymbolTable *new_isymbols_ptr = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_new_isymbols_ptr = NULL;
- /* "pywrapfst.pyx":2222
+ /* "pywrapfst.pyx":2227
* raise FstArgError("No new SymbolTables specified")
* cdef fst.SymbolTable *new_isymbols_ptr = NULL
* if new_isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2223
+ /* "pywrapfst.pyx":2228
* cdef fst.SymbolTable *new_isymbols_ptr = NULL
* if new_isymbols is not None:
* new_isymbols_ptr = new_isymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_new_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2223, __pyx_L1_error)
+ __PYX_ERR(0, 2228, __pyx_L1_error)
}
__pyx_t_6 = __pyx_v_new_isymbols->_table;
__pyx_v_new_isymbols_ptr = __pyx_t_6;
- /* "pywrapfst.pyx":2222
+ /* "pywrapfst.pyx":2227
* raise FstArgError("No new SymbolTables specified")
* cdef fst.SymbolTable *new_isymbols_ptr = NULL
* if new_isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2224
+ /* "pywrapfst.pyx":2229
* if new_isymbols is not None:
* new_isymbols_ptr = new_isymbols._table
* cdef fst.SymbolTable *new_osymbols_ptr = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_new_osymbols_ptr = NULL;
- /* "pywrapfst.pyx":2225
+ /* "pywrapfst.pyx":2230
* new_isymbols_ptr = new_isymbols._table
* cdef fst.SymbolTable *new_osymbols_ptr = NULL
* if new_osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2226
+ /* "pywrapfst.pyx":2231
* cdef fst.SymbolTable *new_osymbols_ptr = NULL
* if new_osymbols is not None:
* new_osymbols_ptr = new_osymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_new_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2226, __pyx_L1_error)
+ __PYX_ERR(0, 2231, __pyx_L1_error)
}
__pyx_t_6 = __pyx_v_new_osymbols->_table;
__pyx_v_new_osymbols_ptr = __pyx_t_6;
- /* "pywrapfst.pyx":2225
+ /* "pywrapfst.pyx":2230
* new_isymbols_ptr = new_isymbols._table
* cdef fst.SymbolTable *new_osymbols_ptr = NULL
* if new_osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2227
+ /* "pywrapfst.pyx":2232
* if new_osymbols is not None:
* new_osymbols_ptr = new_osymbols._table
* fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<<
* self._fst.get().InputSymbols() if old_isymbols is None else
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols,
+ * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol),
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2227, __pyx_L1_error)
+ __PYX_ERR(0, 2232, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2228
+ /* "pywrapfst.pyx":2233
* new_osymbols_ptr = new_osymbols._table
* fst.Relabel(self._mfst.get(),
* self._fst.get().InputSymbols() if old_isymbols is None else # <<<<<<<<<<<<<<
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols,
- * self._fst.get().OutputSymbols() if old_osymbols is None else
+ * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol),
+ * attach_new_isymbols,
*/
__pyx_t_1 = (((PyObject *)__pyx_v_old_isymbols) == Py_None);
if ((__pyx_t_1 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2228, __pyx_L1_error)
+ __PYX_ERR(0, 2233, __pyx_L1_error)
}
__pyx_t_7 = __pyx_v_self->__pyx_base._fst.get()->InputSymbols();
} else {
- /* "pywrapfst.pyx":2229
+ /* "pywrapfst.pyx":2234
* fst.Relabel(self._mfst.get(),
* self._fst.get().InputSymbols() if old_isymbols is None else
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols, # <<<<<<<<<<<<<<
+ * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol), # <<<<<<<<<<<<<<
+ * attach_new_isymbols,
* self._fst.get().OutputSymbols() if old_osymbols is None else
- * old_osymbols._table, new_osymbols_ptr, attach_new_osymbols)
*/
if (unlikely(((PyObject *)__pyx_v_old_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2229, __pyx_L1_error)
+ __PYX_ERR(0, 2234, __pyx_L1_error)
}
__pyx_t_7 = __pyx_v_old_isymbols->_table;
}
+ __pyx_t_8 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_isymbol, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2234, __pyx_L1_error)
- /* "pywrapfst.pyx":2230
- * self._fst.get().InputSymbols() if old_isymbols is None else
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols,
+ /* "pywrapfst.pyx":2236
+ * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol),
+ * attach_new_isymbols,
* self._fst.get().OutputSymbols() if old_osymbols is None else # <<<<<<<<<<<<<<
- * old_osymbols._table, new_osymbols_ptr, attach_new_osymbols)
- * self._check_mutating_imethod()
+ * old_osymbols._table, new_osymbols_ptr, tostring(unknown_osymbol),
+ * attach_new_osymbols)
*/
__pyx_t_1 = (((PyObject *)__pyx_v_old_osymbols) == Py_None);
if ((__pyx_t_1 != 0)) {
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2230, __pyx_L1_error)
+ __PYX_ERR(0, 2236, __pyx_L1_error)
}
- __pyx_t_8 = __pyx_v_self->__pyx_base._fst.get()->OutputSymbols();
+ __pyx_t_9 = __pyx_v_self->__pyx_base._fst.get()->OutputSymbols();
} else {
- /* "pywrapfst.pyx":2231
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols,
+ /* "pywrapfst.pyx":2237
+ * attach_new_isymbols,
* self._fst.get().OutputSymbols() if old_osymbols is None else
- * old_osymbols._table, new_osymbols_ptr, attach_new_osymbols) # <<<<<<<<<<<<<<
+ * old_osymbols._table, new_osymbols_ptr, tostring(unknown_osymbol), # <<<<<<<<<<<<<<
+ * attach_new_osymbols)
* self._check_mutating_imethod()
- *
*/
if (unlikely(((PyObject *)__pyx_v_old_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2231, __pyx_L1_error)
+ __PYX_ERR(0, 2237, __pyx_L1_error)
}
- __pyx_t_8 = __pyx_v_old_osymbols->_table;
+ __pyx_t_9 = __pyx_v_old_osymbols->_table;
}
+ __pyx_t_10 = __pyx_f_9pywrapfst_tostring(__pyx_v_unknown_osymbol, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2237, __pyx_L1_error)
- /* "pywrapfst.pyx":2227
+ /* "pywrapfst.pyx":2232
* if new_osymbols is not None:
* new_osymbols_ptr = new_osymbols._table
* fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<<
* self._fst.get().InputSymbols() if old_isymbols is None else
- * old_isymbols._table, new_isymbols_ptr, attach_new_isymbols,
+ * old_isymbols._table, new_isymbols_ptr, tostring(unknown_isymbol),
*/
- fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_t_7, __pyx_v_new_isymbols_ptr, __pyx_v_attach_new_isymbols, __pyx_t_8, __pyx_v_new_osymbols_ptr, __pyx_v_attach_new_osymbols);
+ fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_t_7, __pyx_v_new_isymbols_ptr, __pyx_t_8, __pyx_v_attach_new_isymbols, __pyx_t_9, __pyx_v_new_osymbols_ptr, __pyx_t_10, __pyx_v_attach_new_osymbols);
- /* "pywrapfst.pyx":2232
- * self._fst.get().OutputSymbols() if old_osymbols is None else
- * old_osymbols._table, new_osymbols_ptr, attach_new_osymbols)
+ /* "pywrapfst.pyx":2239
+ * old_osymbols._table, new_osymbols_ptr, tostring(unknown_osymbol),
+ * attach_new_osymbols)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*
* def relabel_tables(self,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2232, __pyx_L1_error)
+ __PYX_ERR(0, 2239, __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, 2232, __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, 2239, __pyx_L1_error)
- /* "pywrapfst.pyx":2212
+ /* "pywrapfst.pyx":2215
* return self
*
* cdef void _relabel_tables(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2234
+/* "pywrapfst.pyx":2241
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
* _SymbolTable old_isymbols=None,
- * _SymbolTable new_isymbols=None,
+ * _SymbolTable new_isymbols=None,
*/
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_9pywrapfst_11_MutableFst_40relabel_tables[] = "\n relabel_tables(self, old_isymbols=None, new_isymbols=None,\n attach_new_isymbols=True, old_osymbols=None,\n new_osymbols=None, attach_new_osymbols=True)\n\n Replaces input and/or output labels using SymbolTables.\n\n This operation destructively relabels the input and/or output labels of the\n FST using user-specified symbol tables; omitted symbols are identity-mapped.\n\n Args:\n old_isymbols: The old SymbolTable for input labels, defaulting to the\n FST's input symbol table.\n new_isymbols: A SymbolTable used to relabel the input labels\n attach_new_isymbols: Should new_isymbols be made the FST's input symbol\n table?\n old_osymbols: The old SymbolTable for output labels, defaulting to the\n FST's output symbol table.\n new_osymbols: A SymbolTable used to relabel the output labels.\n attach_new_isymbols: Should new_osymbols be made the FST's output symbol\n table?\n\n Returns:\n self.\n\n Raises:\n FstArgError: No SymbolTable specified.\n\n See also: `decode`, `encode`, `project`, `relabel_pairs`.\n ";
+static char __pyx_doc_9pywrapfst_11_MutableFst_40relabel_tables[] = "\n relabel_tables(self, old_isymbols=None, new_isymbols=None,\n unknown_isymbol=\"\", attach_new_isymbols=True,\n old_osymbols=None, new_osymbols=None,\n unknown_osymbol=\"\", attach_new_osymbols=True)\n\n Replaces input and/or output labels using SymbolTables.\n\n This operation destructively relabels the input and/or output labels of the\n FST using user-specified symbol tables; omitted symbols are identity-mapped.\n\n Args:\n old_isymbols: The old SymbolTable for input labels, defaulting to the\n FST's input symbol table.\n new_isymbols: A SymbolTable used to relabel the input labels\n unknown_isymbol: Input symbol to use to relabel OOVs (if empty,\n OOVs raise an exception)\n attach_new_isymbols: Should new_isymbols be made the FST's input symbol\n table?\n old_osymbols: The old SymbolTable for output labels, defaulting to the\n FST's output symbol table.\n new_osymbols: A SymbolTable used to relabel the output labels.\n unknown_osymbol: Outnput symbol to use to relabel OOVs (if empty,\n OOVs raise an exception)\n attach_new_isymbols: Should new_osymbols be made the FST's output symbol\n table?\n\n Returns:\n self.\n\n Raises:\n FstArgError: No SymbolTable specified.\n\n See also: `decode`, `encode`, `project`, `relabel_pairs`.\n ";
static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_41relabel_tables(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols = 0;
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols = 0;
+ PyObject *__pyx_v_unknown_isymbol = 0;
bool __pyx_v_attach_new_isymbols;
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols = 0;
struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols = 0;
+ PyObject *__pyx_v_unknown_osymbol = 0;
bool __pyx_v_attach_new_osymbols;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("relabel_tables (wrapper)", 0);
{
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_old_isymbols,&__pyx_n_s_new_isymbols,&__pyx_n_s_attach_new_isymbols,&__pyx_n_s_old_osymbols,&__pyx_n_s_new_osymbols,&__pyx_n_s_attach_new_osymbols,0};
- PyObject* values[6] = {0,0,0,0,0,0};
+ 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":2235
+ /* "pywrapfst.pyx":2242
*
* def relabel_tables(self,
* _SymbolTable old_isymbols=None, # <<<<<<<<<<<<<<
- * _SymbolTable new_isymbols=None,
- * bool attach_new_isymbols=True,
+ * _SymbolTable new_isymbols=None,
+ * unknown_isymbol=b"",
*/
values[0] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":2236
+ /* "pywrapfst.pyx":2243
* def relabel_tables(self,
* _SymbolTable old_isymbols=None,
- * _SymbolTable new_isymbols=None, # <<<<<<<<<<<<<<
- * bool attach_new_isymbols=True,
- * _SymbolTable old_osymbols=None,
+ * _SymbolTable new_isymbols=None, # <<<<<<<<<<<<<<
+ * unknown_isymbol=b"",
+ * bool attach_new_isymbols=True,
*/
values[1] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ values[2] = ((PyObject *)__pyx_kp_b_);
- /* "pywrapfst.pyx":2238
- * _SymbolTable new_isymbols=None,
- * bool attach_new_isymbols=True,
- * _SymbolTable old_osymbols=None, # <<<<<<<<<<<<<<
- * _SymbolTable new_osymbols=None,
- * bool attach_new_osymbols=True):
+ /* "pywrapfst.pyx":2246
+ * unknown_isymbol=b"",
+ * bool attach_new_isymbols=True,
+ * _SymbolTable old_osymbols=None, # <<<<<<<<<<<<<<
+ * _SymbolTable new_osymbols=None,
+ * unknown_osymbol=b"",
*/
- values[3] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ values[4] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
- /* "pywrapfst.pyx":2239
- * bool attach_new_isymbols=True,
- * _SymbolTable old_osymbols=None,
- * _SymbolTable new_osymbols=None, # <<<<<<<<<<<<<<
- * bool attach_new_osymbols=True):
- * """
+ /* "pywrapfst.pyx":2247
+ * bool attach_new_isymbols=True,
+ * _SymbolTable old_osymbols=None,
+ * _SymbolTable new_osymbols=None, # <<<<<<<<<<<<<<
+ * unknown_osymbol=b"",
+ * bool attach_new_osymbols=True):
*/
- values[4] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ values[5] = (PyObject *)((struct __pyx_obj_9pywrapfst__SymbolTable *)Py_None);
+ values[6] = ((PyObject *)__pyx_kp_b_);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
}
case 2:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attach_new_isymbols);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unknown_isymbol);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old_osymbols);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attach_new_isymbols);
if (value) { values[3] = value; kw_args--; }
}
case 4:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_osymbols);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_old_osymbols);
if (value) { values[4] = value; kw_args--; }
}
case 5:
if (kw_args > 0) {
- PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attach_new_osymbols);
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_osymbols);
if (value) { values[5] = value; kw_args--; }
}
+ case 6:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_unknown_osymbol);
+ if (value) { values[6] = value; kw_args--; }
+ }
+ case 7:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attach_new_osymbols);
+ if (value) { values[7] = value; kw_args--; }
+ }
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2234, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2241, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
}
__pyx_v_old_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[0]);
__pyx_v_new_isymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[1]);
- if (values[2]) {
- __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2237, __pyx_L3_error)
+ __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, 2245, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2237
- * _SymbolTable old_isymbols=None,
- * _SymbolTable new_isymbols=None,
- * bool attach_new_isymbols=True, # <<<<<<<<<<<<<<
- * _SymbolTable old_osymbols=None,
- * _SymbolTable new_osymbols=None,
+ /* "pywrapfst.pyx":2245
+ * _SymbolTable new_isymbols=None,
+ * unknown_isymbol=b"",
+ * bool attach_new_isymbols=True, # <<<<<<<<<<<<<<
+ * _SymbolTable old_osymbols=None,
+ * _SymbolTable new_osymbols=None,
*/
__pyx_v_attach_new_isymbols = ((bool)1);
}
- __pyx_v_old_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[3]);
- __pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[4]);
- if (values[5]) {
- __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2240, __pyx_L3_error)
+ __pyx_v_old_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)values[4]);
+ __pyx_v_new_osymbols = ((struct __pyx_obj_9pywrapfst__SymbolTable *)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, 2249, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2240
- * _SymbolTable old_osymbols=None,
- * _SymbolTable new_osymbols=None,
- * bool attach_new_osymbols=True): # <<<<<<<<<<<<<<
+ /* "pywrapfst.pyx":2249
+ * _SymbolTable new_osymbols=None,
+ * unknown_osymbol=b"",
+ * bool attach_new_osymbols=True): # <<<<<<<<<<<<<<
* """
* relabel_tables(self, old_isymbols=None, new_isymbols=None,
*/
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2234, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2241, __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__SymbolTable, 1, "old_isymbols", 0))) __PYX_ERR(0, 2235, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_isymbols", 0))) __PYX_ERR(0, 2236, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_osymbols", 0))) __PYX_ERR(0, 2238, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_osymbols", 0))) __PYX_ERR(0, 2239, __pyx_L1_error)
- __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_old_isymbols, __pyx_v_new_isymbols, __pyx_v_attach_new_isymbols, __pyx_v_old_osymbols, __pyx_v_new_osymbols, __pyx_v_attach_new_osymbols);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_isymbols", 0))) __PYX_ERR(0, 2242, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_isymbols", 0))) __PYX_ERR(0, 2243, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "old_osymbols", 0))) __PYX_ERR(0, 2246, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_9pywrapfst__SymbolTable, 1, "new_osymbols", 0))) __PYX_ERR(0, 2247, __pyx_L1_error)
+ __pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_40relabel_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":2234
+ /* "pywrapfst.pyx":2241
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
* _SymbolTable old_isymbols=None,
- * _SymbolTable new_isymbols=None,
+ * _SymbolTable new_isymbols=None,
*/
/* function exit code */
return __pyx_r;
}
-static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols, bool __pyx_v_attach_new_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols, bool __pyx_v_attach_new_osymbols) {
+static PyObject *__pyx_pf_9pywrapfst_11_MutableFst_40relabel_tables(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_isymbols, PyObject *__pyx_v_unknown_isymbol, bool __pyx_v_attach_new_isymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_old_osymbols, struct __pyx_obj_9pywrapfst__SymbolTable *__pyx_v_new_osymbols, PyObject *__pyx_v_unknown_osymbol, bool __pyx_v_attach_new_osymbols) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
struct __pyx_opt_args_9pywrapfst_11_MutableFst__relabel_tables __pyx_t_1;
__Pyx_RefNannySetupContext("relabel_tables", 0);
- /* "pywrapfst.pyx":2271
+ /* "pywrapfst.pyx":2285
* See also: `decode`, `encode`, `project`, `relabel_pairs`.
* """
- * self._relabel_tables(old_isymbols, new_isymbols, attach_new_isymbols, # <<<<<<<<<<<<<<
- * old_osymbols, new_osymbols, attach_new_osymbols)
- * return self
+ * self._relabel_tables(old_isymbols, new_isymbols, # <<<<<<<<<<<<<<
+ * unknown_isymbol, attach_new_isymbols,
+ * old_osymbols, new_osymbols,
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_relabel_tables");
- __PYX_ERR(0, 2271, __pyx_L1_error)
+ __PYX_ERR(0, 2285, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2272
- * """
- * self._relabel_tables(old_isymbols, new_isymbols, attach_new_isymbols,
- * old_osymbols, new_osymbols, attach_new_osymbols) # <<<<<<<<<<<<<<
+ /* "pywrapfst.pyx":2288
+ * unknown_isymbol, attach_new_isymbols,
+ * old_osymbols, new_osymbols,
+ * unknown_osymbol, attach_new_osymbols) # <<<<<<<<<<<<<<
* return self
*
*/
- __pyx_t_1.__pyx_n = 6;
+ __pyx_t_1.__pyx_n = 8;
__pyx_t_1.old_isymbols = __pyx_v_old_isymbols;
__pyx_t_1.new_isymbols = __pyx_v_new_isymbols;
+ __pyx_t_1.unknown_isymbol = __pyx_v_unknown_isymbol;
__pyx_t_1.attach_new_isymbols = __pyx_v_attach_new_isymbols;
__pyx_t_1.old_osymbols = __pyx_v_old_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, 2271, __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, 2285, __pyx_L1_error)
- /* "pywrapfst.pyx":2273
- * self._relabel_tables(old_isymbols, new_isymbols, attach_new_isymbols,
- * old_osymbols, new_osymbols, attach_new_osymbols)
+ /* "pywrapfst.pyx":2289
+ * old_osymbols, new_osymbols,
+ * unknown_osymbol, attach_new_osymbols)
* return self # <<<<<<<<<<<<<<
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *:
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2234
+ /* "pywrapfst.pyx":2241
* self._check_mutating_imethod()
*
* def relabel_tables(self, # <<<<<<<<<<<<<<
* _SymbolTable old_isymbols=None,
- * _SymbolTable new_isymbols=None,
+ * _SymbolTable new_isymbols=None,
*/
/* function exit code */
return __pyx_r;
}
-/* "pywrapfst.pyx":2275
+/* "pywrapfst.pyx":2291
* return self
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_reserve_arcs", 0);
- /* "pywrapfst.pyx":2276
+ /* "pywrapfst.pyx":2292
*
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 2276, __pyx_L1_error)
+ __PYX_ERR(0, 2292, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ReserveArcs(__pyx_v_state, __pyx_v_n) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2277
+ /* "pywrapfst.pyx":2293
* 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2293, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2277, __pyx_L1_error)
+ __PYX_ERR(0, 2293, __pyx_L1_error)
- /* "pywrapfst.pyx":2276
+ /* "pywrapfst.pyx":2292
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *:
* if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2278
+ /* "pywrapfst.pyx":2294
* 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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2278, __pyx_L1_error)
+ __PYX_ERR(0, 2294, __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, 2278, __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, 2294, __pyx_L1_error)
- /* "pywrapfst.pyx":2275
+ /* "pywrapfst.pyx":2291
* return self
*
* cdef void _reserve_arcs(self, int64 state, size_t n) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2280
+/* "pywrapfst.pyx":2296
* self._check_mutating_imethod()
*
* def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2280, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2296, __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, 2280, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2296, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2280, __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, 2280, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2296, __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, 2296, __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, 2280, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2296, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.reserve_arcs", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reserve_arcs", 0);
- /* "pywrapfst.pyx":2298
+ /* "pywrapfst.pyx":2314
* See also: `reserve_states`.
* """
* self._reserve_arcs(state, n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reserve_arcs");
- __PYX_ERR(0, 2298, __pyx_L1_error)
+ __PYX_ERR(0, 2314, __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, 2298, __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, 2314, __pyx_L1_error)
- /* "pywrapfst.pyx":2299
+ /* "pywrapfst.pyx":2315
* """
* self._reserve_arcs(state, n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2280
+ /* "pywrapfst.pyx":2296
* self._check_mutating_imethod()
*
* def reserve_arcs(self, int64 state, size_t n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2301
+/* "pywrapfst.pyx":2317
* return self
*
* cdef void _reserve_states(self, int64 n) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_reserve_states", 0);
- /* "pywrapfst.pyx":2302
+ /* "pywrapfst.pyx":2318
*
* cdef void _reserve_states(self, int64 n) except *:
* self._mfst.get().ReserveStates(n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2302, __pyx_L1_error)
+ __PYX_ERR(0, 2318, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->ReserveStates(__pyx_v_n);
- /* "pywrapfst.pyx":2303
+ /* "pywrapfst.pyx":2319
* cdef void _reserve_states(self, int64 n) except *:
* self._mfst.get().ReserveStates(n)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2303, __pyx_L1_error)
+ __PYX_ERR(0, 2319, __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, 2303, __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, 2319, __pyx_L1_error)
- /* "pywrapfst.pyx":2301
+ /* "pywrapfst.pyx":2317
* return self
*
* cdef void _reserve_states(self, int64 n) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2305
+/* "pywrapfst.pyx":2321
* self._check_mutating_imethod()
*
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2305, __pyx_L3_error)
+ __pyx_v_n = __Pyx_PyInt_As_int64_t(__pyx_arg_n); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2321, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("reserve_states", 0);
- /* "pywrapfst.pyx":2319
+ /* "pywrapfst.pyx":2335
* See also: `reserve_arcs`.
* """
* self._reserve_states(n) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reserve_states");
- __PYX_ERR(0, 2319, __pyx_L1_error)
+ __PYX_ERR(0, 2335, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2319, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2335, __pyx_L1_error)
- /* "pywrapfst.pyx":2320
+ /* "pywrapfst.pyx":2336
* """
* self._reserve_states(n)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2305
+ /* "pywrapfst.pyx":2321
* self._check_mutating_imethod()
*
* def reserve_states(self, int64 n): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2322
+/* "pywrapfst.pyx":2338
* return self
*
* cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2324
+ /* "pywrapfst.pyx":2340
* cdef void _reweight(self, potentials, bool to_final=False) except *:
* cdef unique_ptr[vector[fst.WeightClass]] _potentials
* _potentials.reset(new vector[fst.WeightClass]()) # <<<<<<<<<<<<<<
__pyx_t_1 = new std::vector<fst::script::WeightClass> ();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2324, __pyx_L1_error)
+ __PYX_ERR(0, 2340, __pyx_L1_error)
}
__pyx_v__potentials.reset(__pyx_t_1);
- /* "pywrapfst.pyx":2325
+ /* "pywrapfst.pyx":2341
* cdef unique_ptr[vector[fst.WeightClass]] _potentials
* _potentials.reset(new vector[fst.WeightClass]())
* cdef string weight_type = self.weight_type() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 2325, __pyx_L1_error)
+ __PYX_ERR(0, 2341, __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":2326
+ /* "pywrapfst.pyx":2342
* _potentials.reset(new vector[fst.WeightClass]())
* cdef string weight_type = self.weight_type()
* for weight in potentials: # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_potentials; __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_potentials); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __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, 2326, __pyx_L1_error)
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2342, __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, 2326, __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, 2342, __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, 2326, __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, 2342, __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, 2326, __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, 2342, __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, 2326, __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, 2342, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 2326, __pyx_L1_error)
+ else __PYX_ERR(0, 2342, __pyx_L1_error)
}
break;
}
__Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_5);
__pyx_t_5 = 0;
- /* "pywrapfst.pyx":2327
+ /* "pywrapfst.pyx":2343
* cdef string weight_type = self.weight_type()
* for weight in potentials:
* _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 2327, __pyx_L1_error)
+ __PYX_ERR(0, 2343, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2328
+ /* "pywrapfst.pyx":2344
* for weight in potentials:
* _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(),
* weight)) # <<<<<<<<<<<<<<
* fst.Reweight(self._mfst.get(), deref(_potentials),
* fst.GetReweightType(to_final))
*/
- __pyx_t_6 = __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, 2327, __pyx_L1_error)
+ __pyx_t_6 = __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, 2343, __pyx_L1_error)
- /* "pywrapfst.pyx":2327
+ /* "pywrapfst.pyx":2343
* cdef string weight_type = self.weight_type()
* for weight in potentials:
* _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<<
__pyx_v__potentials.get()->push_back(__pyx_t_6);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 2327, __pyx_L1_error)
+ __PYX_ERR(0, 2343, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2326
+ /* "pywrapfst.pyx":2342
* _potentials.reset(new vector[fst.WeightClass]())
* cdef string weight_type = self.weight_type()
* for weight in potentials: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2329
+ /* "pywrapfst.pyx":2345
* _potentials.get().push_back(_get_WeightClass_or_One(self.weight_type(),
* weight))
* fst.Reweight(self._mfst.get(), deref(_potentials), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2329, __pyx_L1_error)
+ __PYX_ERR(0, 2345, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2330
+ /* "pywrapfst.pyx":2346
* weight))
* fst.Reweight(self._mfst.get(), deref(_potentials),
* fst.GetReweightType(to_final)) # <<<<<<<<<<<<<<
*/
fst::script::Reweight(__pyx_v_self->_mfst.get(), (*__pyx_v__potentials), fst::script::GetReweightType(__pyx_v_to_final));
- /* "pywrapfst.pyx":2331
+ /* "pywrapfst.pyx":2347
* fst.Reweight(self._mfst.get(), deref(_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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2331, __pyx_L1_error)
+ __PYX_ERR(0, 2347, __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, 2331, __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, 2347, __pyx_L1_error)
- /* "pywrapfst.pyx":2322
+ /* "pywrapfst.pyx":2338
* return self
*
* cdef void _reweight(self, potentials, bool to_final=False) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2333
+/* "pywrapfst.pyx":2349
* 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, 2333, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reweight") < 0)) __PYX_ERR(0, 2349, __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, 2333, __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, 2349, __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, 2333, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2349, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.reweight", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__reweight __pyx_t_1;
__Pyx_RefNannySetupContext("reweight", 0);
- /* "pywrapfst.pyx":2355
+ /* "pywrapfst.pyx":2371
* self.
* """
* self._reweight(potentials, to_final) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reweight");
- __PYX_ERR(0, 2355, __pyx_L1_error)
+ __PYX_ERR(0, 2371, __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, 2355, __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, 2371, __pyx_L1_error)
- /* "pywrapfst.pyx":2356
+ /* "pywrapfst.pyx":2372
* """
* self._reweight(potentials, to_final)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2333
+ /* "pywrapfst.pyx":2349
* self._check_mutating_imethod()
*
* def reweight(self, potentials, bool to_final=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2358
+/* "pywrapfst.pyx":2374
* return self
*
* cdef void _rmepsilon(self, # <<<<<<<<<<<<<<
static void __pyx_f_9pywrapfst_11_MutableFst__rmepsilon(struct __pyx_obj_9pywrapfst__MutableFst *__pyx_v_self, struct __pyx_opt_args_9pywrapfst_11_MutableFst__rmepsilon *__pyx_optional_args) {
- /* "pywrapfst.pyx":2359
+ /* "pywrapfst.pyx":2375
*
* cdef void _rmepsilon(self,
* bool connect=True, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__22;
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__23;
- /* "pywrapfst.pyx":2362
+ /* "pywrapfst.pyx":2378
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2364
+ /* "pywrapfst.pyx":2380
* weight=None) except *:
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 2364, __pyx_L1_error)
+ __PYX_ERR(0, 2380, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2365
+ /* "pywrapfst.pyx":2381
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* fst.RmEpsilon(self._mfst.get(), connect, wc, 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, 2364, __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, 2380, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":2366
+ /* "pywrapfst.pyx":2382
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(self.weight_type(),
* weight)
* fst.RmEpsilon(self._mfst.get(), connect, wc, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2366, __pyx_L1_error)
+ __PYX_ERR(0, 2382, __pyx_L1_error)
}
fst::script::RmEpsilon(__pyx_v_self->_mfst.get(), __pyx_v_connect, __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":2367
+ /* "pywrapfst.pyx":2383
* weight)
* fst.RmEpsilon(self._mfst.get(), connect, wc, nstate, delta)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2367, __pyx_L1_error)
+ __PYX_ERR(0, 2383, __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, 2367, __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, 2383, __pyx_L1_error)
- /* "pywrapfst.pyx":2358
+ /* "pywrapfst.pyx":2374
* return self
*
* cdef void _rmepsilon(self, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2369
+/* "pywrapfst.pyx":2385
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connect,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0};
PyObject* values[4] = {0,0,0,0};
- /* "pywrapfst.pyx":2373
+ /* "pywrapfst.pyx":2389
* 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, "rmepsilon") < 0)) __PYX_ERR(0, 2369, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2385, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_connect = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2370, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2386, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":2370
+ /* "pywrapfst.pyx":2386
*
* def rmepsilon(self,
* bool connect=True, # <<<<<<<<<<<<<<
__pyx_v_connect = ((bool)1);
}
if (values[1]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2371, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2387, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__24;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2372, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2388, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__25;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2369, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2385, __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_11_MutableFst_48rmepsilon(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), __pyx_v_connect, __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight);
- /* "pywrapfst.pyx":2369
+ /* "pywrapfst.pyx":2385
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
struct __pyx_opt_args_9pywrapfst_11_MutableFst__rmepsilon __pyx_t_1;
__Pyx_RefNannySetupContext("rmepsilon", 0);
- /* "pywrapfst.pyx":2395
+ /* "pywrapfst.pyx":2411
* reverse (and which may be more efficient).
* """
* self._rmepsilon(connect, delta, nstate, weight) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_rmepsilon");
- __PYX_ERR(0, 2395, __pyx_L1_error)
+ __PYX_ERR(0, 2411, __pyx_L1_error)
}
__pyx_t_1.__pyx_n = 4;
__pyx_t_1.connect = __pyx_v_connect;
__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)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2395, __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, 2411, __pyx_L1_error)
- /* "pywrapfst.pyx":2396
+ /* "pywrapfst.pyx":2412
* """
* self._rmepsilon(connect, delta, nstate, weight)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2369
+ /* "pywrapfst.pyx":2385
* self._check_mutating_imethod()
*
* def rmepsilon(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2398
+/* "pywrapfst.pyx":2414
* return self
*
* cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2399
+ /* "pywrapfst.pyx":2415
*
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 2399, __pyx_L1_error)
+ __PYX_ERR(0, 2415, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2400
+ /* "pywrapfst.pyx":2416
* 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 wc = _get_WeightClass_or_One(self.weight_type(),
* weight)
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2400, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2400, __pyx_L1_error)
+ __PYX_ERR(0, 2416, __pyx_L1_error)
- /* "pywrapfst.pyx":2399
+ /* "pywrapfst.pyx":2415
*
* cdef void _set_final(self, int64 state, weight=None) except *:
* if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2401
+ /* "pywrapfst.pyx":2417
* if not self._mfst.get().ValidStateId(state):
* raise FstIndexError("State index out of range")
* cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 2401, __pyx_L1_error)
+ __PYX_ERR(0, 2417, __pyx_L1_error)
}
- /* "pywrapfst.pyx":2402
+ /* "pywrapfst.pyx":2418
* raise FstIndexError("State index out of range")
* cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(),
* weight) # <<<<<<<<<<<<<<
* if not self._mfst.get().SetFinal(state, wc):
- * raise FstOpError("incompatible or invalid weight")
+ * raise FstOpError("Incompatible or invalid weight")
*/
- __pyx_t_4 = __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, 2401, __pyx_L1_error)
+ __pyx_t_4 = __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, 2417, __pyx_L1_error)
__pyx_v_wc = __pyx_t_4;
- /* "pywrapfst.pyx":2403
+ /* "pywrapfst.pyx":2419
* cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(),
* weight)
* if not self._mfst.get().SetFinal(state, wc): # <<<<<<<<<<<<<<
- * raise FstOpError("incompatible or invalid 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 '%s'", "_mfst");
- __PYX_ERR(0, 2403, __pyx_L1_error)
+ __PYX_ERR(0, 2419, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetFinal(__pyx_v_state, __pyx_v_wc) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2404
+ /* "pywrapfst.pyx":2420
* weight)
* if not self._mfst.get().SetFinal(state, wc):
- * raise FstOpError("incompatible or invalid weight") # <<<<<<<<<<<<<<
+ * raise FstOpError("Incompatible or invalid weight") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2404, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2404, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2420, __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, 2404, __pyx_L1_error)
+ __PYX_ERR(0, 2420, __pyx_L1_error)
- /* "pywrapfst.pyx":2403
+ /* "pywrapfst.pyx":2419
* cdef fst.WeightClass wc = _get_WeightClass_or_One(self.weight_type(),
* weight)
* if not self._mfst.get().SetFinal(state, wc): # <<<<<<<<<<<<<<
- * raise FstOpError("incompatible or invalid weight")
+ * raise FstOpError("Incompatible or invalid weight")
* self._check_mutating_imethod()
*/
}
- /* "pywrapfst.pyx":2405
+ /* "pywrapfst.pyx":2421
* if not self._mfst.get().SetFinal(state, wc):
- * raise FstOpError("incompatible or invalid weight")
+ * raise FstOpError("Incompatible or invalid weight")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*
* def set_final(self, int64 state, weight=None):
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2405, __pyx_L1_error)
+ __PYX_ERR(0, 2421, __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, 2405, __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, 2421, __pyx_L1_error)
- /* "pywrapfst.pyx":2398
+ /* "pywrapfst.pyx":2414
* return self
*
* cdef void _set_final(self, int64 state, weight=None) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2407
+/* "pywrapfst.pyx":2423
* self._check_mutating_imethod()
*
* def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<<
/* Python wrapper */
static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_51set_final(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static char __pyx_doc_9pywrapfst_11_MutableFst_50set_final[] = "\n set_final(self, state, weight)\n\n Sets a state to be final with a fixed cost.\n\n Args:\n state: The integer index of a state.\n weight: A Weight or weight string indicating the desired final weight; if\n omitted, it is set to semiring One.\n\n Raises:\n FstIndexError: State index out of range.\n FstOpError: incompatible or invalid weight.\n\n See also: `set_start`.\n ";
+static char __pyx_doc_9pywrapfst_11_MutableFst_50set_final[] = "\n set_final(self, state, weight)\n\n Sets a state to be final with a fixed cost.\n\n Args:\n state: The integer index of a state.\n weight: A Weight or weight string indicating the desired final weight; if\n omitted, it is set to semiring One.\n\n Raises:\n FstIndexError: State index out of range.\n FstOpError: Incompatible or invalid weight.\n\n See also: `set_start`.\n ";
static PyObject *__pyx_pw_9pywrapfst_11_MutableFst_51set_final(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__pyx_t_10basictypes_int64 __pyx_v_state;
PyObject *__pyx_v_weight = 0;
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2407, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_final") < 0)) __PYX_ERR(0, 2423, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2407, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2423, __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, 2407, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2423, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.set_final", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst_11_MutableFst__set_final __pyx_t_1;
__Pyx_RefNannySetupContext("set_final", 0);
- /* "pywrapfst.pyx":2424
+ /* "pywrapfst.pyx":2440
* See also: `set_start`.
* """
* self._set_final(state, weight) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_set_final");
- __PYX_ERR(0, 2424, __pyx_L1_error)
+ __PYX_ERR(0, 2440, __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, 2424, __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, 2440, __pyx_L1_error)
- /* "pywrapfst.pyx":2425
+ /* "pywrapfst.pyx":2441
* """
* self._set_final(state, weight)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2407
+ /* "pywrapfst.pyx":2423
* self._check_mutating_imethod()
*
* def set_final(self, int64 state, weight=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2427
+/* "pywrapfst.pyx":2443
* return self
*
* cdef void _set_properties(self, uint64 props, uint64 mask) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_set_properties", 0);
- /* "pywrapfst.pyx":2428
+ /* "pywrapfst.pyx":2444
*
* cdef void _set_properties(self, uint64 props, uint64 mask) except *:
* self._mfst.get().SetProperties(props, mask) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2428, __pyx_L1_error)
+ __PYX_ERR(0, 2444, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetProperties(__pyx_v_props, __pyx_v_mask);
- /* "pywrapfst.pyx":2427
+ /* "pywrapfst.pyx":2443
* return self
*
* cdef void _set_properties(self, uint64 props, uint64 mask) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2430
+/* "pywrapfst.pyx":2446
* self._mfst.get().SetProperties(props, mask)
*
* def set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2430, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2446, __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, 2430, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_properties") < 0)) __PYX_ERR(0, 2446, __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_props = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_props == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2430, __pyx_L3_error)
- __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2430, __pyx_L3_error)
+ __pyx_v_props = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_props == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2446, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_mask == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2446, __pyx_L3_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, 2430, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2446, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst._MutableFst.set_properties", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_properties", 0);
- /* "pywrapfst.pyx":2444
+ /* "pywrapfst.pyx":2460
* self.
* """
* self._set_properties(props, mask) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_set_properties");
- __PYX_ERR(0, 2444, __pyx_L1_error)
+ __PYX_ERR(0, 2460, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_properties(__pyx_v_self, __pyx_v_props, __pyx_v_mask); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_properties(__pyx_v_self, __pyx_v_props, __pyx_v_mask); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L1_error)
- /* "pywrapfst.pyx":2445
+ /* "pywrapfst.pyx":2461
* """
* self._set_properties(props, mask)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2430
+ /* "pywrapfst.pyx":2446
* self._mfst.get().SetProperties(props, mask)
*
* def set_properties(self, uint64 props, uint64 mask): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2447
+/* "pywrapfst.pyx":2463
* return self
*
* cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_set_start", 0);
- /* "pywrapfst.pyx":2448
+ /* "pywrapfst.pyx":2464
*
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 2448, __pyx_L1_error)
+ __PYX_ERR(0, 2464, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_self->_mfst.get()->SetStart(__pyx_v_state) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2449
+ /* "pywrapfst.pyx":2465
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2449, __pyx_L1_error)
+ __PYX_ERR(0, 2465, __pyx_L1_error)
- /* "pywrapfst.pyx":2448
+ /* "pywrapfst.pyx":2464
*
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2450
+ /* "pywrapfst.pyx":2466
* if not self._mfst.get().SetStart(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 '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2450, __pyx_L1_error)
+ __PYX_ERR(0, 2466, __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, 2450, __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, 2466, __pyx_L1_error)
- /* "pywrapfst.pyx":2447
+ /* "pywrapfst.pyx":2463
* return self
*
* cdef void _set_start(self, int64 state) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2452
+/* "pywrapfst.pyx":2468
* self._check_mutating_imethod()
*
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2452, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(__pyx_arg_state); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2468, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_start", 0);
- /* "pywrapfst.pyx":2469
+ /* "pywrapfst.pyx":2485
* See also: `set_final`.
* """
* self._set_start(state) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_set_start");
- __PYX_ERR(0, 2469, __pyx_L1_error)
+ __PYX_ERR(0, 2485, __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, 2469, __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, 2485, __pyx_L1_error)
- /* "pywrapfst.pyx":2470
+ /* "pywrapfst.pyx":2486
* """
* self._set_start(state)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2452
+ /* "pywrapfst.pyx":2468
* self._check_mutating_imethod()
*
* def set_start(self, int64 state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2472
+/* "pywrapfst.pyx":2488
* return self
*
* cdef void _set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("_set_input_symbols", 0);
- /* "pywrapfst.pyx":2473
+ /* "pywrapfst.pyx":2489
*
* cdef void _set_input_symbols(self, _SymbolTable syms) except *:
* if syms is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2474
+ /* "pywrapfst.pyx":2490
* cdef void _set_input_symbols(self, _SymbolTable syms) except *:
* if syms is None:
* self._mfst.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2474, __pyx_L1_error)
+ __PYX_ERR(0, 2490, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetInputSymbols(NULL);
- /* "pywrapfst.pyx":2475
+ /* "pywrapfst.pyx":2491
* if syms is None:
* self._mfst.get().SetInputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":2473
+ /* "pywrapfst.pyx":2489
*
* cdef void _set_input_symbols(self, _SymbolTable syms) except *:
* if syms is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2476
+ /* "pywrapfst.pyx":2492
* self._mfst.get().SetInputSymbols(NULL)
* return
* self._mfst.get().SetInputSymbols(syms._table) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2476, __pyx_L1_error)
+ __PYX_ERR(0, 2492, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2476, __pyx_L1_error)
+ __PYX_ERR(0, 2492, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetInputSymbols(__pyx_v_syms->_table);
- /* "pywrapfst.pyx":2477
+ /* "pywrapfst.pyx":2493
* return
* self._mfst.get().SetInputSymbols(syms._table)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2477, __pyx_L1_error)
+ __PYX_ERR(0, 2493, __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, 2477, __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, 2493, __pyx_L1_error)
- /* "pywrapfst.pyx":2472
+ /* "pywrapfst.pyx":2488
* return self
*
* cdef void _set_input_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2479
+/* "pywrapfst.pyx":2495
* self._check_mutating_imethod()
*
* def set_input_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_input_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2479, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2495, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_56set_input_symbols(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_input_symbols", 0);
- /* "pywrapfst.pyx":2495
+ /* "pywrapfst.pyx":2511
* See also: `set_output_symbols`.
* """
* self._set_input_symbols(syms) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_set_input_symbols");
- __PYX_ERR(0, 2495, __pyx_L1_error)
+ __PYX_ERR(0, 2511, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2495, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2511, __pyx_L1_error)
- /* "pywrapfst.pyx":2496
+ /* "pywrapfst.pyx":2512
* """
* self._set_input_symbols(syms)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2479
+ /* "pywrapfst.pyx":2495
* self._check_mutating_imethod()
*
* def set_input_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2498
+/* "pywrapfst.pyx":2514
* return self
*
* cdef void _set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("_set_output_symbols", 0);
- /* "pywrapfst.pyx":2499
+ /* "pywrapfst.pyx":2515
*
* cdef void _set_output_symbols(self, _SymbolTable syms) except *:
* if syms is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2500
+ /* "pywrapfst.pyx":2516
* cdef void _set_output_symbols(self, _SymbolTable syms) except *:
* if syms is None:
* self._mfst.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2500, __pyx_L1_error)
+ __PYX_ERR(0, 2516, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetOutputSymbols(NULL);
- /* "pywrapfst.pyx":2501
+ /* "pywrapfst.pyx":2517
* if syms is None:
* self._mfst.get().SetOutputSymbols(NULL)
* return # <<<<<<<<<<<<<<
*/
goto __pyx_L0;
- /* "pywrapfst.pyx":2499
+ /* "pywrapfst.pyx":2515
*
* cdef void _set_output_symbols(self, _SymbolTable syms) except *:
* if syms is None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2502
+ /* "pywrapfst.pyx":2518
* self._mfst.get().SetOutputSymbols(NULL)
* return
* self._mfst.get().SetOutputSymbols(syms._table) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2502, __pyx_L1_error)
+ __PYX_ERR(0, 2518, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_syms) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 2502, __pyx_L1_error)
+ __PYX_ERR(0, 2518, __pyx_L1_error)
}
__pyx_v_self->_mfst.get()->SetOutputSymbols(__pyx_v_syms->_table);
- /* "pywrapfst.pyx":2503
+ /* "pywrapfst.pyx":2519
* return
* self._mfst.get().SetOutputSymbols(syms._table)
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2503, __pyx_L1_error)
+ __PYX_ERR(0, 2519, __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, 2503, __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, 2519, __pyx_L1_error)
- /* "pywrapfst.pyx":2498
+ /* "pywrapfst.pyx":2514
* return self
*
* cdef void _set_output_symbols(self, _SymbolTable syms) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2505
+/* "pywrapfst.pyx":2521
* self._check_mutating_imethod()
*
* def set_output_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_output_symbols (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2505, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_syms), __pyx_ptype_9pywrapfst__SymbolTable, 1, "syms", 0))) __PYX_ERR(0, 2521, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_58set_output_symbols(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__SymbolTable *)__pyx_v_syms));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_output_symbols", 0);
- /* "pywrapfst.pyx":2521
+ /* "pywrapfst.pyx":2537
* See also: `set_input_symbols`.
* """
* self._set_output_symbols(syms) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_set_output_symbols");
- __PYX_ERR(0, 2521, __pyx_L1_error)
+ __PYX_ERR(0, 2537, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2521, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_syms); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2537, __pyx_L1_error)
- /* "pywrapfst.pyx":2522
+ /* "pywrapfst.pyx":2538
* """
* self._set_output_symbols(syms)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2505
+ /* "pywrapfst.pyx":2521
* self._check_mutating_imethod()
*
* def set_output_symbols(self, _SymbolTable syms): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2524
+/* "pywrapfst.pyx":2540
* return self
*
* cdef void _topsort(self) except *: # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_topsort", 0);
- /* "pywrapfst.pyx":2526
+ /* "pywrapfst.pyx":2542
* cdef void _topsort(self) except *:
* # 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 '%s'", "_mfst");
- __PYX_ERR(0, 2526, __pyx_L1_error)
+ __PYX_ERR(0, 2542, __pyx_L1_error)
}
__pyx_t_1 = ((!(fst::script::TopSort(__pyx_v_self->_mfst.get()) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2527
+ /* "pywrapfst.pyx":2543
* # 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.") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2543, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2527, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2543, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2527, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2543, __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;
- /* "pywrapfst.pyx":2526
+ /* "pywrapfst.pyx":2542
* cdef void _topsort(self) except *:
* # TopSort returns False if the FST is cyclic, and thus can't be TopSorted.
* if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2528
+ /* "pywrapfst.pyx":2544
* if not fst.TopSort(self._mfst.get()):
* logging.warning("Cannot topsort cyclic FST.")
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2528, __pyx_L1_error)
+ __PYX_ERR(0, 2544, __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, 2528, __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, 2544, __pyx_L1_error)
- /* "pywrapfst.pyx":2524
+ /* "pywrapfst.pyx":2540
* return self
*
* cdef void _topsort(self) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2530
+/* "pywrapfst.pyx":2546
* self._check_mutating_imethod()
*
* def topsort(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("topsort", 0);
- /* "pywrapfst.pyx":2545
+ /* "pywrapfst.pyx":2561
* See also: `arcsort`.
* """
* self._topsort() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_topsort");
- __PYX_ERR(0, 2545, __pyx_L1_error)
+ __PYX_ERR(0, 2561, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2545, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2561, __pyx_L1_error)
- /* "pywrapfst.pyx":2546
+ /* "pywrapfst.pyx":2562
* """
* self._topsort()
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2530
+ /* "pywrapfst.pyx":2546
* self._check_mutating_imethod()
*
* def topsort(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2548
+/* "pywrapfst.pyx":2564
* return self
*
* cdef void _union(self, _Fst ifst) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_union", 0);
- /* "pywrapfst.pyx":2549
+ /* "pywrapfst.pyx":2565
*
* cdef void _union(self, _Fst ifst) except *:
* fst.Union(self._mfst.get(), deref(ifst._fst)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2549, __pyx_L1_error)
+ __PYX_ERR(0, 2565, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2549, __pyx_L1_error)
+ __PYX_ERR(0, 2565, __pyx_L1_error)
}
fst::script::Union(__pyx_v_self->_mfst.get(), (*__pyx_v_ifst->_fst));
- /* "pywrapfst.pyx":2550
+ /* "pywrapfst.pyx":2566
* cdef void _union(self, _Fst ifst) except *:
* fst.Union(self._mfst.get(), deref(ifst._fst))
* self._check_mutating_imethod() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_check_mutating_imethod");
- __PYX_ERR(0, 2550, __pyx_L1_error)
+ __PYX_ERR(0, 2566, __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, 2550, __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, 2566, __pyx_L1_error)
- /* "pywrapfst.pyx":2548
+ /* "pywrapfst.pyx":2564
* return self
*
* cdef void _union(self, _Fst ifst) except *: # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "pywrapfst.pyx":2552
+/* "pywrapfst.pyx":2568
* self._check_mutating_imethod()
*
* def union(self, _Fst ifst): # <<<<<<<<<<<<<<
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("union (wrapper)", 0);
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2552, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2568, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_11_MutableFst_62union(((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst));
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("union", 0);
- /* "pywrapfst.pyx":2568
+ /* "pywrapfst.pyx":2584
* self.
* """
* self._union(ifst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_union");
- __PYX_ERR(0, 2568, __pyx_L1_error)
+ __PYX_ERR(0, 2584, __pyx_L1_error)
}
- ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_union(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2568, __pyx_L1_error)
+ ((struct __pyx_vtabstruct_9pywrapfst__MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_union(__pyx_v_self, __pyx_v_ifst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2584, __pyx_L1_error)
- /* "pywrapfst.pyx":2569
+ /* "pywrapfst.pyx":2585
* """
* self._union(ifst)
* return self # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self);
goto __pyx_L0;
- /* "pywrapfst.pyx":2552
+ /* "pywrapfst.pyx":2568
* self._check_mutating_imethod()
*
* def union(self, _Fst ifst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2594
+/* "pywrapfst.pyx":2610
*
*
* cdef _Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_init_Fst", 0);
- /* "pywrapfst.pyx":2595
+ /* "pywrapfst.pyx":2611
*
* cdef _Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_tfst->Properties(fst::kError, 1) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2596
+ /* "pywrapfst.pyx":2612
* cdef _Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef _Fst ofst = _Fst.__new__(_Fst)
* ofst._fst.reset(<FstClass_ptr> tfst)
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2612, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2596, __pyx_L1_error)
+ __PYX_ERR(0, 2612, __pyx_L1_error)
- /* "pywrapfst.pyx":2595
+ /* "pywrapfst.pyx":2611
*
* cdef _Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2597
+ /* "pywrapfst.pyx":2613
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed")
* cdef _Fst ofst = _Fst.__new__(_Fst) # <<<<<<<<<<<<<<
* ofst._fst.reset(<FstClass_ptr> tfst)
* return ofst
*/
- __pyx_t_3 = __pyx_tp_new_9pywrapfst__Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst__Fst), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __pyx_t_3 = __pyx_tp_new_9pywrapfst__Fst(((PyTypeObject *)__pyx_ptype_9pywrapfst__Fst), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst)))) __PYX_ERR(0, 2597, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst)))) __PYX_ERR(0, 2613, __pyx_L1_error)
__pyx_v_ofst = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":2598
+ /* "pywrapfst.pyx":2614
* raise FstOpError("Operation failed")
* cdef _Fst ofst = _Fst.__new__(_Fst)
* ofst._fst.reset(<FstClass_ptr> tfst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2598, __pyx_L1_error)
+ __PYX_ERR(0, 2614, __pyx_L1_error)
}
__pyx_v_ofst->_fst.reset(((__pyx_t_9pywrapfst_FstClass_ptr)__pyx_v_tfst));
- /* "pywrapfst.pyx":2599
+ /* "pywrapfst.pyx":2615
* cdef _Fst ofst = _Fst.__new__(_Fst)
* ofst._fst.reset(<FstClass_ptr> tfst)
* return ofst # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_ofst;
goto __pyx_L0;
- /* "pywrapfst.pyx":2594
+ /* "pywrapfst.pyx":2610
*
*
* cdef _Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2602
+/* "pywrapfst.pyx":2618
*
*
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("_init_MutableFst", 0);
- /* "pywrapfst.pyx":2603
+ /* "pywrapfst.pyx":2619
*
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_tfst->Properties(fst::kError, 1) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2604
+ /* "pywrapfst.pyx":2620
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst)
* ofst._fst.reset(<MutableFstClass_ptr> tfst)
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2604, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2604, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2604, __pyx_L1_error)
+ __PYX_ERR(0, 2620, __pyx_L1_error)
- /* "pywrapfst.pyx":2603
+ /* "pywrapfst.pyx":2619
*
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2605
+ /* "pywrapfst.pyx":2621
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed")
* cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst) # <<<<<<<<<<<<<<
* ofst._fst.reset(<MutableFstClass_ptr> tfst)
* # Makes a copy of it as the derived type! Cool.
*/
- __pyx_t_3 = __pyx_tp_new_9pywrapfst__MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFst), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __pyx_t_3 = __pyx_tp_new_9pywrapfst__MutableFst(((PyTypeObject *)__pyx_ptype_9pywrapfst__MutableFst), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2621, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__MutableFst)))) __PYX_ERR(0, 2605, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__MutableFst)))) __PYX_ERR(0, 2621, __pyx_L1_error)
__pyx_v_ofst = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":2606
+ /* "pywrapfst.pyx":2622
* raise FstOpError("Operation failed")
* cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst)
* ofst._fst.reset(<MutableFstClass_ptr> tfst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2606, __pyx_L1_error)
+ __PYX_ERR(0, 2622, __pyx_L1_error)
}
__pyx_v_ofst->__pyx_base._fst.reset(((__pyx_t_9pywrapfst_MutableFstClass_ptr)__pyx_v_tfst));
- /* "pywrapfst.pyx":2608
+ /* "pywrapfst.pyx":2624
* ofst._fst.reset(<MutableFstClass_ptr> tfst)
* # 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 '%s'", "_fst");
- __PYX_ERR(0, 2608, __pyx_L1_error)
+ __PYX_ERR(0, 2624, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ofst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 2608, __pyx_L1_error)
+ __PYX_ERR(0, 2624, __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":2609
+ /* "pywrapfst.pyx":2625
* # Makes a copy of it as the derived type! Cool.
* ofst._mfst = static_pointer_cast[fst.MutableFstClass, fst.FstClass](ofst._fst)
* return ofst # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_ofst;
goto __pyx_L0;
- /* "pywrapfst.pyx":2602
+ /* "pywrapfst.pyx":2618
*
*
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2612
+/* "pywrapfst.pyx":2628
*
*
* cdef _Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("_init_XFst", 0);
- /* "pywrapfst.pyx":2613
+ /* "pywrapfst.pyx":2629
*
* cdef _Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_tfst->Properties(fst::kMutable, 1) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2614
+ /* "pywrapfst.pyx":2630
* cdef _Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True):
* 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, 2614, __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, 2630, __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":2613
+ /* "pywrapfst.pyx":2629
*
* cdef _Fst _init_XFst(FstClass_ptr tfst):
* if tfst.Properties(fst.kMutable, True): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2616
+ /* "pywrapfst.pyx":2632
* 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, 2616, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2632, __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":2612
+ /* "pywrapfst.pyx":2628
*
*
* cdef _Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2619
+/* "pywrapfst.pyx":2635
*
*
* cdef _MutableFst _create_Fst(arc_type=b"standard"): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2621
+ /* "pywrapfst.pyx":2637
* cdef _MutableFst _create_Fst(arc_type=b"standard"):
* cdef fst.VectorFstClass *tfst = new fst.VectorFstClass(
* <string> tostring(arc_type)) # <<<<<<<<<<<<<<
* if tfst == NULL:
* raise FstOpError("Unknown arc type: {!r}".format(arc_type))
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2637, __pyx_L1_error)
- /* "pywrapfst.pyx":2620
+ /* "pywrapfst.pyx":2636
*
* cdef _MutableFst _create_Fst(arc_type=b"standard"):
* cdef fst.VectorFstClass *tfst = new fst.VectorFstClass( # <<<<<<<<<<<<<<
*/
__pyx_v_tfst = new fst::script::VectorFstClass(((std::string)__pyx_t_1));
- /* "pywrapfst.pyx":2622
+ /* "pywrapfst.pyx":2638
* cdef fst.VectorFstClass *tfst = new fst.VectorFstClass(
* <string> tostring(arc_type))
* if tfst == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_tfst == NULL) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2623
+ /* "pywrapfst.pyx":2639
* <string> tostring(arc_type))
* if tfst == NULL:
* raise FstOpError("Unknown arc type: {!r}".format(arc_type)) # <<<<<<<<<<<<<<
* return _init_MutableFst(tfst)
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_arc_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
}
}
if (!__pyx_t_7) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_arc_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_arc_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_arc_type};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_arc_type};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_INCREF(__pyx_v_arc_type);
__Pyx_GIVEREF(__pyx_v_arc_type);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_arc_type);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
}
if (!__pyx_t_6) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__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, 2623, __pyx_L1_error)
+ __PYX_ERR(0, 2639, __pyx_L1_error)
- /* "pywrapfst.pyx":2622
+ /* "pywrapfst.pyx":2638
* cdef fst.VectorFstClass *tfst = new fst.VectorFstClass(
* <string> tostring(arc_type))
* if tfst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2624
+ /* "pywrapfst.pyx":2640
* if tfst == NULL:
* raise FstOpError("Unknown arc type: {!r}".format(arc_type))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2624, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __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":2619
+ /* "pywrapfst.pyx":2635
*
*
* cdef _MutableFst _create_Fst(arc_type=b"standard"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2627
+/* "pywrapfst.pyx":2643
*
*
* cdef _Fst _read_Fst(filename, fst_type=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2628
+ /* "pywrapfst.pyx":2644
*
* cdef _Fst _read_Fst(filename, fst_type=None):
* cdef fst.FstClass *tfst = fst.FstClass.Read(tostring(filename)) # <<<<<<<<<<<<<<
* if tfst == NULL:
* raise FstIOError("Read failed: {!r}".format(filename))
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2628, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2644, __pyx_L1_error)
__pyx_v_tfst = fst::script::FstClass::Read(__pyx_t_1);
- /* "pywrapfst.pyx":2629
+ /* "pywrapfst.pyx":2645
* cdef _Fst _read_Fst(filename, fst_type=None):
* cdef fst.FstClass *tfst = fst.FstClass.Read(tostring(filename))
* if tfst == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_tfst == NULL) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2630
+ /* "pywrapfst.pyx":2646
* cdef fst.FstClass *tfst = fst.FstClass.Read(tostring(filename))
* if tfst == NULL:
* raise FstIOError("Read failed: {!r}".format(filename)) # <<<<<<<<<<<<<<
* # Converts if requested.
* cdef string fst_type_string
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
}
}
if (!__pyx_t_7) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_filename};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_filename};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_INCREF(__pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_filename);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
}
if (!__pyx_t_6) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2646, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__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, 2630, __pyx_L1_error)
+ __PYX_ERR(0, 2646, __pyx_L1_error)
- /* "pywrapfst.pyx":2629
+ /* "pywrapfst.pyx":2645
* cdef _Fst _read_Fst(filename, fst_type=None):
* cdef fst.FstClass *tfst = fst.FstClass.Read(tostring(filename))
* if tfst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2633
+ /* "pywrapfst.pyx":2649
* # Converts if requested.
* cdef string fst_type_string
* if fst_type: # <<<<<<<<<<<<<<
* fst_type_string = tostring(fst_type)
* if fst_type_string != tfst.FstType():
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fst_type); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2633, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fst_type); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2649, __pyx_L1_error)
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2634
+ /* "pywrapfst.pyx":2650
* cdef string fst_type_string
* if fst_type:
* fst_type_string = tostring(fst_type) # <<<<<<<<<<<<<<
* if fst_type_string != tfst.FstType():
* tfst = fst.Convert(deref(tfst), fst_type_string)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2634, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2650, __pyx_L1_error)
__pyx_v_fst_type_string = __pyx_t_1;
- /* "pywrapfst.pyx":2635
+ /* "pywrapfst.pyx":2651
* if fst_type:
* fst_type_string = tostring(fst_type)
* if fst_type_string != tfst.FstType(): # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_fst_type_string != __pyx_v_tfst->FstType()) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2636
+ /* "pywrapfst.pyx":2652
* fst_type_string = tostring(fst_type)
* if fst_type_string != tfst.FstType():
* tfst = fst.Convert(deref(tfst), fst_type_string) # <<<<<<<<<<<<<<
*/
__pyx_v_tfst = fst::script::Convert((*__pyx_v_tfst), __pyx_v_fst_type_string);
- /* "pywrapfst.pyx":2637
+ /* "pywrapfst.pyx":2653
* if fst_type_string != tfst.FstType():
* tfst = fst.Convert(deref(tfst), fst_type_string)
* if tfst == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_tfst == NULL) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":2638
+ /* "pywrapfst.pyx":2654
* tfst = fst.Convert(deref(tfst), fst_type_string)
* if tfst == NULL:
* raise FstOpError("Conversion to {!r} failed.".format(fst_type)) # <<<<<<<<<<<<<<
* return _init_XFst(tfst)
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
}
}
if (!__pyx_t_6) {
- __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fst_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_fst_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fst_type};
- __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_8);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_fst_type};
- __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_8);
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_INCREF(__pyx_v_fst_type);
__Pyx_GIVEREF(__pyx_v_fst_type);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_fst_type);
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
}
}
if (!__pyx_t_5) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__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, 2638, __pyx_L1_error)
+ __PYX_ERR(0, 2654, __pyx_L1_error)
- /* "pywrapfst.pyx":2637
+ /* "pywrapfst.pyx":2653
* if fst_type_string != tfst.FstType():
* tfst = fst.Convert(deref(tfst), fst_type_string)
* if tfst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2635
+ /* "pywrapfst.pyx":2651
* if fst_type:
* fst_type_string = tostring(fst_type)
* if fst_type_string != tfst.FstType(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2633
+ /* "pywrapfst.pyx":2649
* # Converts if requested.
* cdef string fst_type_string
* if fst_type: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2639
+ /* "pywrapfst.pyx":2655
* if tfst == NULL:
* raise FstOpError("Conversion to {!r} failed.".format(fst_type))
* return _init_XFst(tfst) # <<<<<<<<<<<<<<
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __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":2627
+ /* "pywrapfst.pyx":2643
*
*
* cdef _Fst _read_Fst(filename, fst_type=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2641
+/* "pywrapfst.pyx":2657
* return _init_XFst(tfst)
*
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":2642
+ /* "pywrapfst.pyx":2658
*
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None):
* ofst = fst.FstClass.ReadFromString(fst_string) # <<<<<<<<<<<<<<
* if fst_type is not None:
* fst_type_string = tostring(fst_type)
*/
- __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_fst_string); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_fst_string); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2658, __pyx_L1_error)
__pyx_v_ofst = fst::script::FstClass::ReadFromString(__pyx_t_1);
- /* "pywrapfst.pyx":2643
+ /* "pywrapfst.pyx":2659
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None):
* ofst = fst.FstClass.ReadFromString(fst_string)
* if fst_type is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":2644
+ /* "pywrapfst.pyx":2660
* ofst = fst.FstClass.ReadFromString(fst_string)
* if fst_type is not None:
* fst_type_string = tostring(fst_type) # <<<<<<<<<<<<<<
* if fst_type_string != ofst.FstType():
* ofst = fst.Convert(deref(ofst), fst_type_string)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2644, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2660, __pyx_L1_error)
__pyx_v_fst_type_string = __pyx_t_1;
- /* "pywrapfst.pyx":2645
+ /* "pywrapfst.pyx":2661
* if fst_type is not None:
* fst_type_string = tostring(fst_type)
* if fst_type_string != ofst.FstType(): # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_fst_type_string != __pyx_v_ofst->FstType()) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":2646
+ /* "pywrapfst.pyx":2662
* fst_type_string = tostring(fst_type)
* if fst_type_string != ofst.FstType():
* ofst = fst.Convert(deref(ofst), fst_type_string) # <<<<<<<<<<<<<<
*/
__pyx_v_ofst = fst::script::Convert((*__pyx_v_ofst), __pyx_v_fst_type_string);
- /* "pywrapfst.pyx":2647
+ /* "pywrapfst.pyx":2663
* if fst_type_string != ofst.FstType():
* ofst = fst.Convert(deref(ofst), fst_type_string)
* if ofst == NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_ofst == NULL) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":2648
+ /* "pywrapfst.pyx":2664
* ofst = fst.Convert(deref(ofst), fst_type_string)
* if ofst == NULL:
* raise FstOpError("Conversion to {!r} failed.".format(fst_type)) # <<<<<<<<<<<<<<
* return _init_XFst(ofst)
*
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
}
}
if (!__pyx_t_8) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_fst_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_fst_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fst_type};
- __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_fst_type};
- __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
__Pyx_INCREF(__pyx_v_fst_type);
__Pyx_GIVEREF(__pyx_v_fst_type);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_fst_type);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
}
}
if (!__pyx_t_7) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_GIVEREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__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, 2648, __pyx_L1_error)
+ __PYX_ERR(0, 2664, __pyx_L1_error)
- /* "pywrapfst.pyx":2647
+ /* "pywrapfst.pyx":2663
* if fst_type_string != ofst.FstType():
* ofst = fst.Convert(deref(ofst), fst_type_string)
* if ofst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2645
+ /* "pywrapfst.pyx":2661
* if fst_type is not None:
* fst_type_string = tostring(fst_type)
* if fst_type_string != ofst.FstType(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2643
+ /* "pywrapfst.pyx":2659
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None):
* ofst = fst.FstClass.ReadFromString(fst_string)
* if fst_type is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2649
+ /* "pywrapfst.pyx":2665
* if ofst == NULL:
* raise FstOpError("Conversion to {!r} failed.".format(fst_type))
* return _init_XFst(ofst) # <<<<<<<<<<<<<<
* class Fst(object):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_ofst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_ofst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2641
+ /* "pywrapfst.pyx":2657
* return _init_XFst(tfst)
*
* cdef _Fst _deserialize_Fst(fst_string, fst_type=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2668
+/* "pywrapfst.pyx":2684
* """
*
* def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 2668, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) __PYX_ERR(0, 2684, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2668, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__new__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2684, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst__create_Fst __pyx_t_2;
__Pyx_RefNannySetupContext("__new__", 0);
- /* "pywrapfst.pyx":2669
+ /* "pywrapfst.pyx":2685
*
* def __new__(cls, arc_type=b"standard"):
* return _create_Fst(arc_type) # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.arc_type = __pyx_v_arc_type;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__create_Fst(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2669, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__create_Fst(&__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2685, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2668
+ /* "pywrapfst.pyx":2684
* """
*
* def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2672
+/* "pywrapfst.pyx":2688
*
* @staticmethod
* def read(filename, fst_type=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 2672, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 2688, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2672, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2688, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst__read_Fst __pyx_t_2;
__Pyx_RefNannySetupContext("read", 0);
- /* "pywrapfst.pyx":2690
+ /* "pywrapfst.pyx":2706
* FstOpError: Read-time conversion failed.
* """
* return _read_Fst(filename, fst_type) # <<<<<<<<<<<<<<
__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__read_Fst(__pyx_v_filename, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2690, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__read_Fst(__pyx_v_filename, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2706, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2672
+ /* "pywrapfst.pyx":2688
*
* @staticmethod
* def read(filename, fst_type=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2693
+/* "pywrapfst.pyx":2709
*
* @staticmethod
* def read_from_string(fst_string, fst_type=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_from_string") < 0)) __PYX_ERR(0, 2693, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_from_string") < 0)) __PYX_ERR(0, 2709, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read_from_string", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2693, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("read_from_string", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2709, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Fst.read_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
struct __pyx_opt_args_9pywrapfst__deserialize_Fst __pyx_t_2;
__Pyx_RefNannySetupContext("read_from_string", 0);
- /* "pywrapfst.pyx":2711
+ /* "pywrapfst.pyx":2727
* FstOpError: Read-time conversion failed.
* """
* return _deserialize_Fst(fst_string, fst_type) # <<<<<<<<<<<<<<
__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__deserialize_Fst(__pyx_v_fst_string, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__deserialize_Fst(__pyx_v_fst_string, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2727, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2693
+ /* "pywrapfst.pyx":2709
*
* @staticmethod
* def read_from_string(fst_string, fst_type=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2795
+/* "pywrapfst.pyx":2811
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":2796
+ /* "pywrapfst.pyx":2812
*
* def __repr__(self):
* return "<Arc at 0x{:x}>".format(id(self)) # <<<<<<<<<<<<<<
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Arc_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Arc_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
}
}
if (!__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2812, __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_3 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2795
+ /* "pywrapfst.pyx":2811
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2798
+/* "pywrapfst.pyx":2814
* return "<Arc at 0x{:x}>".format(id(self))
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_olabel)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 2798, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 2814, __pyx_L3_error)
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_weight)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 2798, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 2814, __pyx_L3_error)
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nextstate)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 2798, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 2814, __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, 2798, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2814, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2798, __pyx_L3_error)
- __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2798, __pyx_L3_error)
+ __pyx_v_ilabel = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_ilabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2814, __pyx_L3_error)
+ __pyx_v_olabel = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_olabel == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2814, __pyx_L3_error)
__pyx_v_weight = values[2];
- __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2798, __pyx_L3_error)
+ __pyx_v_nextstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nextstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2814, __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, 2798, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2814, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.Arc.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
fst::script::WeightClass __pyx_t_2;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":2799
+ /* "pywrapfst.pyx":2815
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
* cdef fst.WeightClass wc = _get_WeightClass_or_One(b"tropical", weight) # <<<<<<<<<<<<<<
* self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate))
*
*/
- __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_tropical); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2799, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2799, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_tropical); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2815, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2815, __pyx_L1_error)
__pyx_v_wc = __pyx_t_2;
- /* "pywrapfst.pyx":2800
+ /* "pywrapfst.pyx":2816
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate):
* cdef fst.WeightClass wc = _get_WeightClass_or_One(b"tropical", weight)
* self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc");
- __PYX_ERR(0, 2800, __pyx_L1_error)
+ __PYX_ERR(0, 2816, __pyx_L1_error)
}
__pyx_v_self->_arc.reset(new fst::script::ArcClass(__pyx_v_ilabel, __pyx_v_olabel, __pyx_v_wc, __pyx_v_nextstate));
- /* "pywrapfst.pyx":2798
+ /* "pywrapfst.pyx":2814
* return "<Arc at 0x{:x}>".format(id(self))
*
* def __init__(self, int64 ilabel, int64 olabel, weight, int64 nextstate): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2802
+/* "pywrapfst.pyx":2818
* self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate))
*
* cpdef Arc copy(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __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, 2818, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_3Arc_5copy)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2802, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2818, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2802, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2818, __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, 2802, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst_Arc))))) __PYX_ERR(0, 2818, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2803
+ /* "pywrapfst.pyx":2819
*
* 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, 2803, __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, 2819, __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, 2803, __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, 2819, __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, 2803, __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, 2819, __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, 2803, __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, 2819, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2803, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2819, __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, 2803, __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, 2819, __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":2802
+ /* "pywrapfst.pyx":2818
* self._arc.reset(new fst.ArcClass(ilabel, olabel, wc, nextstate))
*
* cpdef Arc copy(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2802, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2818, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2807
+/* "pywrapfst.pyx":2823
* property ilabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":2808
+ /* "pywrapfst.pyx":2824
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2808, __pyx_L1_error)
+ __PYX_ERR(0, 2824, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2807
+ /* "pywrapfst.pyx":2823
* property ilabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2810
+/* "pywrapfst.pyx":2826
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2810, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2826, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":2811
+ /* "pywrapfst.pyx":2827
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2811, __pyx_L1_error)
+ __PYX_ERR(0, 2827, __pyx_L1_error)
}
(*__pyx_v_self->_arc).ilabel = __pyx_v_value;
- /* "pywrapfst.pyx":2810
+ /* "pywrapfst.pyx":2826
* return deref(self._arc).ilabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2815
+/* "pywrapfst.pyx":2831
* property olabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":2816
+ /* "pywrapfst.pyx":2832
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2816, __pyx_L1_error)
+ __PYX_ERR(0, 2832, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2832, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2815
+ /* "pywrapfst.pyx":2831
* property olabel:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2818
+/* "pywrapfst.pyx":2834
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2818, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2834, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":2819
+ /* "pywrapfst.pyx":2835
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2819, __pyx_L1_error)
+ __PYX_ERR(0, 2835, __pyx_L1_error)
}
(*__pyx_v_self->_arc).olabel = __pyx_v_value;
- /* "pywrapfst.pyx":2818
+ /* "pywrapfst.pyx":2834
* return deref(self._arc).olabel
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2823
+/* "pywrapfst.pyx":2839
* property weight:
*
* def __get__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":2824
+ /* "pywrapfst.pyx":2840
*
* def __get__(self):
* cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* weight._weight.reset(new fst.WeightClass(deref(self._arc).weight))
* return weight
*/
- __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __pyx_L1_error)
+ __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2840, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 2824, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 2840, __pyx_L1_error)
__pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":2825
+ /* "pywrapfst.pyx":2841
* 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 '%s'", "_weight");
- __PYX_ERR(0, 2825, __pyx_L1_error)
+ __PYX_ERR(0, 2841, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc");
- __PYX_ERR(0, 2825, __pyx_L1_error)
+ __PYX_ERR(0, 2841, __pyx_L1_error)
}
__pyx_v_weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_arc).weight));
- /* "pywrapfst.pyx":2826
+ /* "pywrapfst.pyx":2842
* 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":2823
+ /* "pywrapfst.pyx":2839
* property weight:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2828
+/* "pywrapfst.pyx":2844
* return weight
*
* def __set__(self, weight): # <<<<<<<<<<<<<<
fst::script::WeightClass __pyx_t_2;
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":2829
+ /* "pywrapfst.pyx":2845
*
* def __set__(self, weight):
* deref(self._arc).weight = _get_WeightClass_or_One(b"tropical", weight) # <<<<<<<<<<<<<<
*
* property nextstate:
*/
- __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_tropical); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2829, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2829, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_tropical); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2845, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_WeightClass_or_One(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2845, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc");
- __PYX_ERR(0, 2829, __pyx_L1_error)
+ __PYX_ERR(0, 2845, __pyx_L1_error)
}
(*__pyx_v_self->_arc).weight = __pyx_t_2;
- /* "pywrapfst.pyx":2828
+ /* "pywrapfst.pyx":2844
* return weight
*
* def __set__(self, weight): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2833
+/* "pywrapfst.pyx":2849
* property nextstate:
*
* def __get__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "pywrapfst.pyx":2834
+ /* "pywrapfst.pyx":2850
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2834, __pyx_L1_error)
+ __PYX_ERR(0, 2850, __pyx_L1_error)
}
- __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2833
+ /* "pywrapfst.pyx":2849
* property nextstate:
*
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2836
+/* "pywrapfst.pyx":2852
* 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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2836, __pyx_L3_error)
+ __pyx_v_value = __Pyx_PyInt_As_int64_t(__pyx_arg_value); if (unlikely((__pyx_v_value == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2852, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__set__", 0);
- /* "pywrapfst.pyx":2837
+ /* "pywrapfst.pyx":2853
*
* 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 '%s'", "_arc");
- __PYX_ERR(0, 2837, __pyx_L1_error)
+ __PYX_ERR(0, 2853, __pyx_L1_error)
}
(*__pyx_v_self->_arc).nextstate = __pyx_v_value;
- /* "pywrapfst.pyx":2836
+ /* "pywrapfst.pyx":2852
* return deref(self._arc).nextstate
*
* def __set__(self, int64 value): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2840
+/* "pywrapfst.pyx":2856
*
*
* cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<<
PyObject *__pyx_t_4 = NULL;
__Pyx_RefNannySetupContext("_init_Arc", 0);
- /* "pywrapfst.pyx":2841
+ /* "pywrapfst.pyx":2857
*
* cdef Arc _init_Arc(const fst.ArcClass &arc):
* cdef Weight weight = Weight.__new__(Weight) # <<<<<<<<<<<<<<
* weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(<int64> arc.ilabel, <int64> arc.olabel, weight,
*/
- __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error)
+ __pyx_t_1 = __pyx_tp_new_9pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 2841, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_Weight)))) __PYX_ERR(0, 2857, __pyx_L1_error)
__pyx_v_weight = ((struct __pyx_obj_9pywrapfst_Weight *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":2842
+ /* "pywrapfst.pyx":2858
* 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 '%s'", "_weight");
- __PYX_ERR(0, 2842, __pyx_L1_error)
+ __PYX_ERR(0, 2858, __pyx_L1_error)
}
__pyx_v_weight->_weight.reset(new fst::script::WeightClass(__pyx_v_arc.weight));
- /* "pywrapfst.pyx":2843
+ /* "pywrapfst.pyx":2859
* cdef Weight weight = Weight.__new__(Weight)
* weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(<int64> arc.ilabel, <int64> arc.olabel, weight, # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.ilabel)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2843, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.ilabel)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.olabel)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2843, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.olabel)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2859, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":2844
+ /* "pywrapfst.pyx":2860
* weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(<int64> arc.ilabel, <int64> arc.olabel, weight,
* <int64> arc.nextstate) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_3 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.nextstate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2844, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int64_t(((__pyx_t_10basictypes_int64)__pyx_v_arc.nextstate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2860, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "pywrapfst.pyx":2843
+ /* "pywrapfst.pyx":2859
* cdef Weight weight = Weight.__new__(Weight)
* weight._weight.reset(new fst.WeightClass(arc.weight))
* return Arc(<int64> arc.ilabel, <int64> arc.olabel, weight, # <<<<<<<<<<<<<<
* <int64> arc.nextstate)
*
*/
- __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2843, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2859, __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, 2843, __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, 2859, __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":2840
+ /* "pywrapfst.pyx":2856
*
*
* cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2857
+/* "pywrapfst.pyx":2873
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":2858
+ /* "pywrapfst.pyx":2874
*
* def __repr__(self):
* return "<ArcIterator at 0x{:x}>".format(id(self)) # <<<<<<<<<<<<<<
* def __init__(self, _Fst ifst, int64 state):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_ArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_ArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
}
}
if (!__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2874, __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_3 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2858, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2857
+ /* "pywrapfst.pyx":2873
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2860
+/* "pywrapfst.pyx":2876
* return "<ArcIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _Fst ifst, int64 state): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2860, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2876, __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, 2860, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2876, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2860, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2876, __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, 2860, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2876, __pyx_L3_error)
__pyx_L3_error:;
__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, 2860, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 2876, __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);
/* function exit code */
std::shared_ptr<fst::script::FstClass> __pyx_t_4;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":2861
+ /* "pywrapfst.pyx":2877
*
* 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 '%s'", "_fst");
- __PYX_ERR(0, 2861, __pyx_L1_error)
+ __PYX_ERR(0, 2877, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_ifst->_fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2862
+ /* "pywrapfst.pyx":2878
* 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 2862, __pyx_L1_error)
+ __PYX_ERR(0, 2878, __pyx_L1_error)
- /* "pywrapfst.pyx":2861
+ /* "pywrapfst.pyx":2877
*
* def __init__(self, _Fst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2864
+ /* "pywrapfst.pyx":2880
* 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 '%s'", "_fst");
- __PYX_ERR(0, 2864, __pyx_L1_error)
+ __PYX_ERR(0, 2880, __pyx_L1_error)
}
__pyx_t_4 = __pyx_v_ifst->_fst;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2864, __pyx_L1_error)
+ __PYX_ERR(0, 2880, __pyx_L1_error)
}
__pyx_v_self->_fst = __pyx_t_4;
- /* "pywrapfst.pyx":2865
+ /* "pywrapfst.pyx":2881
* # 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 '%s'", "_aiter");
- __PYX_ERR(0, 2865, __pyx_L1_error)
+ __PYX_ERR(0, 2881, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 2865, __pyx_L1_error)
+ __PYX_ERR(0, 2881, __pyx_L1_error)
}
__pyx_v_self->_aiter.reset(new fst::script::ArcIteratorClass((*__pyx_v_self->_fst), __pyx_v_state));
- /* "pywrapfst.pyx":2860
+ /* "pywrapfst.pyx":2876
* return "<ArcIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _Fst ifst, int64 state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2868
+/* "pywrapfst.pyx":2884
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":2869
+ /* "pywrapfst.pyx":2885
* # 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":2868
+ /* "pywrapfst.pyx":2884
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2872
+/* "pywrapfst.pyx":2888
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":2873
+ /* "pywrapfst.pyx":2889
* # 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 '%s'", "done");
- __PYX_ERR(0, 2873, __pyx_L1_error)
+ __PYX_ERR(0, 2889, __pyx_L1_error)
}
__pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":2874
+ /* "pywrapfst.pyx":2890
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* self.next()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 2874, __pyx_L1_error)
+ __PYX_ERR(0, 2890, __pyx_L1_error)
- /* "pywrapfst.pyx":2873
+ /* "pywrapfst.pyx":2889
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":2875
+ /* "pywrapfst.pyx":2891
* 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 '%s'", "value");
- __PYX_ERR(0, 2875, __pyx_L1_error)
+ __PYX_ERR(0, 2891, __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, 2875, __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, 2891, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":2876
+ /* "pywrapfst.pyx":2892
* raise StopIteration
* result = self.value()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "next");
- __PYX_ERR(0, 2876, __pyx_L1_error)
+ __PYX_ERR(0, 2892, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":2877
+ /* "pywrapfst.pyx":2893
* result = self.value()
* self.next()
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":2872
+ /* "pywrapfst.pyx":2888
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2879
+/* "pywrapfst.pyx":2895
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2879, __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, 2895, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_9done)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2879, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2895, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2879, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2895, __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, 2879, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2895, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2891
+ /* "pywrapfst.pyx":2907
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2891, __pyx_L1_error)
+ __PYX_ERR(0, 2907, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":2879
+ /* "pywrapfst.pyx":2895
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2879, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_11ArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2895, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2893
+/* "pywrapfst.pyx":2909
* return self._aiter.get().Done()
*
* cpdef uint32 flags(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __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, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_11flags)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2893, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2893, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2909, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2893, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2909, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2905
+ /* "pywrapfst.pyx":2921
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2905, __pyx_L1_error)
+ __PYX_ERR(0, 2921, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Flags();
goto __pyx_L0;
- /* "pywrapfst.pyx":2893
+ /* "pywrapfst.pyx":2909
* return self._aiter.get().Done()
*
* cpdef uint32 flags(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_11ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_11ArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2909, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2907
+/* "pywrapfst.pyx":2923
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2907, __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, 2923, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_13next)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2923, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2916
+ /* "pywrapfst.pyx":2932
* should use the Pythonic API.
* """
* self._aiter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_aiter");
- __PYX_ERR(0, 2916, __pyx_L1_error)
+ __PYX_ERR(0, 2932, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Next();
- /* "pywrapfst.pyx":2907
+ /* "pywrapfst.pyx":2923
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2907, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2923, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2918
+/* "pywrapfst.pyx":2934
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2918, __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, 2934, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_15position)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2918, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2918, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __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, 2918, __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, 2934, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2930
+ /* "pywrapfst.pyx":2946
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2930, __pyx_L1_error)
+ __PYX_ERR(0, 2946, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Position();
goto __pyx_L0;
- /* "pywrapfst.pyx":2918
+ /* "pywrapfst.pyx":2934
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2918, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_11ArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2932
+/* "pywrapfst.pyx":2948
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2932, __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, 2948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_17reset)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2948, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2948, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2941
+ /* "pywrapfst.pyx":2957
* should use the Pythonic API.
* """
* self._aiter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_aiter");
- __PYX_ERR(0, 2941, __pyx_L1_error)
+ __PYX_ERR(0, 2957, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Reset();
- /* "pywrapfst.pyx":2932
+ /* "pywrapfst.pyx":2948
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2932, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_11ArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2943
+/* "pywrapfst.pyx":2959
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __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, 2959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_19seek)) {
- __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2955
+ /* "pywrapfst.pyx":2971
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2955, __pyx_L1_error)
+ __PYX_ERR(0, 2971, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Seek(__pyx_v_a);
- /* "pywrapfst.pyx":2943
+ /* "pywrapfst.pyx":2959
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
__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, 2943, __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, 2959, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_1 = NULL;
__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, 2943, __pyx_L1_error)
+ __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, 2959, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2957
+/* "pywrapfst.pyx":2973
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2957, __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, 2973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_21set_flags)) {
- __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2957, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2957, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2973, __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, 2957, __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, 2973, __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, 2957, __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, 2973, __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, 2957, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2973, __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, 2957, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2970
+ /* "pywrapfst.pyx":2986
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2970, __pyx_L1_error)
+ __PYX_ERR(0, 2986, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask);
- /* "pywrapfst.pyx":2957
+ /* "pywrapfst.pyx":2973
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 2957, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 2973, __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, 2957, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 2973, __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_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2957, __pyx_L3_error)
- __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2957, __pyx_L3_error)
+ __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2973, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2973, __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, 2957, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2973, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.ArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
PyObject *__pyx_t_1 = NULL;
__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, 2957, __pyx_L1_error)
+ __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, 2973, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2972
+/* "pywrapfst.pyx":2988
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef object value(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2972, __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, 2988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_11ArcIterator_23value)) {
__Pyx_XDECREF(__pyx_r);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2988, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2988, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":2981
+ /* "pywrapfst.pyx":2997
* should use the Pythonic API.
* """
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 2981, __pyx_L1_error)
+ __PYX_ERR(0, 2997, __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, 2981, __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, 2997, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2972
+ /* "pywrapfst.pyx":2988
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef object value(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 2972, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_11ArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":2995
+/* "pywrapfst.pyx":3011
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":2996
+ /* "pywrapfst.pyx":3012
*
* def __repr__(self):
* return "<MutableArcIterator at 0x{:x}>".format(id(self)) # <<<<<<<<<<<<<<
* def __init__(self, _MutableFst ifst, int64 state):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_MutableArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_MutableArcIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
}
}
if (!__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3012, __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_3 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3012, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":2995
+ /* "pywrapfst.pyx":3011
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":2998
+/* "pywrapfst.pyx":3014
* return "<MutableArcIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _MutableFst ifst, int64 state): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2998, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3014, __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, 2998, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3014, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2998, __pyx_L3_error)
+ __pyx_v_state = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3014, __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, 2998, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3014, __pyx_L3_error)
__pyx_L3_error:;
__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, 2998, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3014, __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);
/* function exit code */
std::shared_ptr<fst::script::MutableFstClass> __pyx_t_4;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":2999
+ /* "pywrapfst.pyx":3015
*
* 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 '%s'", "_fst");
- __PYX_ERR(0, 2999, __pyx_L1_error)
+ __PYX_ERR(0, 3015, __pyx_L1_error)
}
__pyx_t_1 = ((!(__pyx_v_ifst->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":3000
+ /* "pywrapfst.pyx":3016
* 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3000, __pyx_L1_error)
+ __PYX_ERR(0, 3016, __pyx_L1_error)
- /* "pywrapfst.pyx":2999
+ /* "pywrapfst.pyx":3015
*
* def __init__(self, _MutableFst ifst, int64 state):
* if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3002
+ /* "pywrapfst.pyx":3018
* 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 '%s'", "_mfst");
- __PYX_ERR(0, 3002, __pyx_L1_error)
+ __PYX_ERR(0, 3018, __pyx_L1_error)
}
__pyx_t_4 = __pyx_v_ifst->_mfst;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 3002, __pyx_L1_error)
+ __PYX_ERR(0, 3018, __pyx_L1_error)
}
__pyx_v_self->_mfst = __pyx_t_4;
- /* "pywrapfst.pyx":3003
+ /* "pywrapfst.pyx":3019
* # 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 '%s'", "_aiter");
- __PYX_ERR(0, 3003, __pyx_L1_error)
+ __PYX_ERR(0, 3019, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_mfst");
- __PYX_ERR(0, 3003, __pyx_L1_error)
+ __PYX_ERR(0, 3019, __pyx_L1_error)
}
__pyx_v_self->_aiter.reset(new fst::script::MutableArcIteratorClass(__pyx_v_ifst->_mfst.get(), __pyx_v_state));
- /* "pywrapfst.pyx":2998
+ /* "pywrapfst.pyx":3014
* return "<MutableArcIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _MutableFst ifst, int64 state): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3006
+/* "pywrapfst.pyx":3022
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":3007
+ /* "pywrapfst.pyx":3023
* # 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":3006
+ /* "pywrapfst.pyx":3022
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3010
+/* "pywrapfst.pyx":3026
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":3011
+ /* "pywrapfst.pyx":3027
* # 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 '%s'", "done");
- __PYX_ERR(0, 3011, __pyx_L1_error)
+ __PYX_ERR(0, 3027, __pyx_L1_error)
}
__pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":3012
+ /* "pywrapfst.pyx":3028
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* self.next()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 3012, __pyx_L1_error)
+ __PYX_ERR(0, 3028, __pyx_L1_error)
- /* "pywrapfst.pyx":3011
+ /* "pywrapfst.pyx":3027
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3013
+ /* "pywrapfst.pyx":3029
* 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 '%s'", "value");
- __PYX_ERR(0, 3013, __pyx_L1_error)
+ __PYX_ERR(0, 3029, __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, 3013, __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, 3029, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":3014
+ /* "pywrapfst.pyx":3030
* raise StopIteration
* result = self.value()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "next");
- __PYX_ERR(0, 3014, __pyx_L1_error)
+ __PYX_ERR(0, 3030, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_MutableArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3015
+ /* "pywrapfst.pyx":3031
* result = self.value()
* self.next()
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":3010
+ /* "pywrapfst.pyx":3026
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3017
+/* "pywrapfst.pyx":3033
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __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, 3033, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_9done)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3033, __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, 3017, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3033, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3029
+ /* "pywrapfst.pyx":3045
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3029, __pyx_L1_error)
+ __PYX_ERR(0, 3045, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":3017
+ /* "pywrapfst.pyx":3033
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3017, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_18MutableArcIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3033, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3031
+/* "pywrapfst.pyx":3047
* return self._aiter.get().Done()
*
* cpdef uint32 flags(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __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, 3047, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_11flags)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3047, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3043
+ /* "pywrapfst.pyx":3059
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3043, __pyx_L1_error)
+ __PYX_ERR(0, 3059, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Flags();
goto __pyx_L0;
- /* "pywrapfst.pyx":3031
+ /* "pywrapfst.pyx":3047
* return self._aiter.get().Done()
*
* cpdef uint32 flags(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("flags", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_18MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_f_9pywrapfst_18MutableArcIterator_flags(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3045
+/* "pywrapfst.pyx":3061
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3045, __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, 3061, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_13next)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3045, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3045, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3054
+ /* "pywrapfst.pyx":3070
* should use the Pythonic API.
* """
* self._aiter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_aiter");
- __PYX_ERR(0, 3054, __pyx_L1_error)
+ __PYX_ERR(0, 3070, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Next();
- /* "pywrapfst.pyx":3045
+ /* "pywrapfst.pyx":3061
* return self._aiter.get().Flags()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3045, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3056
+/* "pywrapfst.pyx":3072
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3056, __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, 3072, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_15position)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3072, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3072, __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, 3056, __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, 3072, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3068
+ /* "pywrapfst.pyx":3084
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3068, __pyx_L1_error)
+ __PYX_ERR(0, 3084, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_aiter.get()->Position();
goto __pyx_L0;
- /* "pywrapfst.pyx":3056
+ /* "pywrapfst.pyx":3072
* self._aiter.get().Next()
*
* cpdef size_t position(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3056, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_f_9pywrapfst_18MutableArcIterator_position(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3072, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3070
+/* "pywrapfst.pyx":3086
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3070, __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, 3086, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_17reset)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3086, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3086, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3079
+ /* "pywrapfst.pyx":3095
* should use the Pythonic API.
* """
* self._aiter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_aiter");
- __PYX_ERR(0, 3079, __pyx_L1_error)
+ __PYX_ERR(0, 3095, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Reset();
- /* "pywrapfst.pyx":3070
+ /* "pywrapfst.pyx":3086
* return self._aiter.get().Position()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3070, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_18MutableArcIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3086, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3081
+/* "pywrapfst.pyx":3097
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3081, __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, 3097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_19seek)) {
- __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_1);
__pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __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[2] = {__pyx_t_5, __pyx_t_3};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __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_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3093
+ /* "pywrapfst.pyx":3109
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3093, __pyx_L1_error)
+ __PYX_ERR(0, 3109, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->Seek(__pyx_v_a);
- /* "pywrapfst.pyx":3081
+ /* "pywrapfst.pyx":3097
* self._aiter.get().Reset()
*
* cpdef void seek(self, size_t a): # <<<<<<<<<<<<<<
__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, 3081, __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, 3097, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
PyObject *__pyx_t_1 = NULL;
__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, 3081, __pyx_L1_error)
+ __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, 3097, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3095
+/* "pywrapfst.pyx":3111
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __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, 3111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_21set_flags)) {
- __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3111, __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, 3095, __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, 3111, __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, 3095, __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, 3111, __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, 3095, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3111, __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, 3095, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3108
+ /* "pywrapfst.pyx":3124
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3108, __pyx_L1_error)
+ __PYX_ERR(0, 3124, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask);
- /* "pywrapfst.pyx":3095
+ /* "pywrapfst.pyx":3111
* self._aiter.get().Seek(a)
*
* cpdef void set_flags(self, uint32 flags, uint32 mask): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mask)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3095, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3111, __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, 3095, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_flags") < 0)) __PYX_ERR(0, 3111, __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_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L3_error)
- __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L3_error)
+ __pyx_v_flags = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_flags == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3111, __pyx_L3_error)
+ __pyx_v_mask = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_mask == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3111, __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, 3095, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3111, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.MutableArcIterator.set_flags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
PyObject *__pyx_t_1 = NULL;
__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, 3095, __pyx_L1_error)
+ __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, 3111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3110
+/* "pywrapfst.pyx":3126
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3110, __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, 3126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_23set_value)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (!__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_arc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_arc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_arc)};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __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[2] = {__pyx_t_4, ((PyObject *)__pyx_v_arc)};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(((PyObject *)__pyx_v_arc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_arc));
PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_arc));
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3110, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3119
+ /* "pywrapfst.pyx":3135
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3119, __pyx_L1_error)
+ __PYX_ERR(0, 3135, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc");
- __PYX_ERR(0, 3119, __pyx_L1_error)
+ __PYX_ERR(0, 3135, __pyx_L1_error)
}
__pyx_v_self->_aiter.get()->SetValue((*__pyx_v_arc->_arc));
- /* "pywrapfst.pyx":3110
+ /* "pywrapfst.pyx":3126
* self._aiter.get().SetFlags(flags, mask)
*
* cpdef void set_value(self, Arc arc): # <<<<<<<<<<<<<<
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, 3110, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_9pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3126, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_18MutableArcIterator_22set_value(((struct __pyx_obj_9pywrapfst_MutableArcIterator *)__pyx_v_self), ((struct __pyx_obj_9pywrapfst_Arc *)__pyx_v_arc));
/* function exit code */
PyObject *__pyx_t_1 = NULL;
__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, 3110, __pyx_L1_error)
+ __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, 3126, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3121
+/* "pywrapfst.pyx":3137
* self._aiter.get().SetValue(deref(arc._arc))
*
* cpdef object value(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3121, __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, 3137, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_18MutableArcIterator_25value)) {
__Pyx_XDECREF(__pyx_r);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3121, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3137, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3121, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3137, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3130
+ /* "pywrapfst.pyx":3146
* should use the Pythonic API.
* """
* 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 '%s'", "_aiter");
- __PYX_ERR(0, 3130, __pyx_L1_error)
+ __PYX_ERR(0, 3146, __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, 3130, __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, 3146, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3121
+ /* "pywrapfst.pyx":3137
* self._aiter.get().SetValue(deref(arc._arc))
*
* cpdef object value(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3121, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_18MutableArcIterator_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3137, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3146
+/* "pywrapfst.pyx":3162
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_5 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":3147
+ /* "pywrapfst.pyx":3163
*
* def __repr__(self):
* return "<StateIterator at 0x{:x}>".format(id(self)) # <<<<<<<<<<<<<<
* def __init__(self, _Fst ifst):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_StateIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_StateIterator_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = NULL;
}
}
if (!__pyx_t_3) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3163, __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_3 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3146
+ /* "pywrapfst.pyx":3162
* """
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3149
+/* "pywrapfst.pyx":3165
* return "<StateIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _Fst ifst): # <<<<<<<<<<<<<<
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, 3149, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3165, __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, 3149, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3165, __pyx_L3_error)
__pyx_L3_error:;
__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, 3149, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3165, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_13StateIterator_2__init__(((struct __pyx_obj_9pywrapfst_StateIterator *)__pyx_v_self), __pyx_v_ifst);
/* function exit code */
std::shared_ptr<fst::script::FstClass> __pyx_t_1;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":3151
+ /* "pywrapfst.pyx":3167
* 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 '%s'", "_fst");
- __PYX_ERR(0, 3151, __pyx_L1_error)
+ __PYX_ERR(0, 3167, __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 '%s'", "_fst");
- __PYX_ERR(0, 3151, __pyx_L1_error)
+ __PYX_ERR(0, 3167, __pyx_L1_error)
}
__pyx_v_self->_fst = __pyx_t_1;
- /* "pywrapfst.pyx":3152
+ /* "pywrapfst.pyx":3168
* # 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 '%s'", "_siter");
- __PYX_ERR(0, 3152, __pyx_L1_error)
+ __PYX_ERR(0, 3168, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3152, __pyx_L1_error)
+ __PYX_ERR(0, 3168, __pyx_L1_error)
}
__pyx_v_self->_siter.reset(new fst::script::StateIteratorClass((*__pyx_v_self->_fst)));
- /* "pywrapfst.pyx":3149
+ /* "pywrapfst.pyx":3165
* return "<StateIterator at 0x{:x}>".format(id(self))
*
* def __init__(self, _Fst ifst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3155
+/* "pywrapfst.pyx":3171
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":3156
+ /* "pywrapfst.pyx":3172
* # 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":3155
+ /* "pywrapfst.pyx":3171
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3159
+/* "pywrapfst.pyx":3175
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_2 = NULL;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":3160
+ /* "pywrapfst.pyx":3176
* # 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 '%s'", "done");
- __PYX_ERR(0, 3160, __pyx_L1_error)
+ __PYX_ERR(0, 3176, __pyx_L1_error)
}
__pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":3161
+ /* "pywrapfst.pyx":3177
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* self.next()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 3161, __pyx_L1_error)
+ __PYX_ERR(0, 3177, __pyx_L1_error)
- /* "pywrapfst.pyx":3160
+ /* "pywrapfst.pyx":3176
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3162
+ /* "pywrapfst.pyx":3178
* 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 '%s'", "value");
- __PYX_ERR(0, 3162, __pyx_L1_error)
+ __PYX_ERR(0, 3178, __pyx_L1_error)
}
__pyx_v_result = ((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->value(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3163
+ /* "pywrapfst.pyx":3179
* 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 '%s'", "next");
- __PYX_ERR(0, 3163, __pyx_L1_error)
+ __PYX_ERR(0, 3179, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":3164
+ /* "pywrapfst.pyx":3180
* 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, 3164, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3159
+ /* "pywrapfst.pyx":3175
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3166
+/* "pywrapfst.pyx":3182
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3166, __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, 3182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_9done)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3166, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3182, __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, 3166, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3182, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3178
+ /* "pywrapfst.pyx":3194
* 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 '%s'", "_siter");
- __PYX_ERR(0, 3178, __pyx_L1_error)
+ __PYX_ERR(0, 3194, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_siter.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":3166
+ /* "pywrapfst.pyx":3182
* return result
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3166, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_9pywrapfst_13StateIterator_done(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3182, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3180
+/* "pywrapfst.pyx":3196
* return self._siter.get().Done()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3180, __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, 3196, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_11next)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3196, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3196, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3189
+ /* "pywrapfst.pyx":3205
* should use the Pythonic API.
* """
* self._siter.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_siter");
- __PYX_ERR(0, 3189, __pyx_L1_error)
+ __PYX_ERR(0, 3205, __pyx_L1_error)
}
__pyx_v_self->_siter.get()->Next();
- /* "pywrapfst.pyx":3180
+ /* "pywrapfst.pyx":3196
* return self._siter.get().Done()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3180, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_next(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3196, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3191
+/* "pywrapfst.pyx":3207
* self._siter.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3191, __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, 3207, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_13reset)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3191, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3207, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3191, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3207, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3200
+ /* "pywrapfst.pyx":3216
* should use the Pythonic API.
* """
* self._siter.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_siter");
- __PYX_ERR(0, 3200, __pyx_L1_error)
+ __PYX_ERR(0, 3216, __pyx_L1_error)
}
__pyx_v_self->_siter.get()->Reset();
- /* "pywrapfst.pyx":3191
+ /* "pywrapfst.pyx":3207
* self._siter.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3191, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_f_9pywrapfst_13StateIterator_reset(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3207, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3202
+/* "pywrapfst.pyx":3218
* self._siter.get().Reset()
*
* cpdef int64 value(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3202, __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, 3218, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_13StateIterator_15value)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3218, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3218, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3218, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":3211
+ /* "pywrapfst.pyx":3227
* should use the Pythonic API.
* """
* return self._siter.get().Value() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_siter");
- __PYX_ERR(0, 3211, __pyx_L1_error)
+ __PYX_ERR(0, 3227, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_siter.get()->Value();
goto __pyx_L0;
- /* "pywrapfst.pyx":3202
+ /* "pywrapfst.pyx":3218
* self._siter.get().Reset()
*
* cpdef int64 value(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 3202, __pyx_L1_error)
+ __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, 3218, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3217
+/* "pywrapfst.pyx":3233
*
*
* cdef _Fst _map(_Fst ifst, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__34;
PyObject *__pyx_v_mt = ((PyObject *)__pyx_n_b_identity);
- /* "pywrapfst.pyx":3220
+ /* "pywrapfst.pyx":3236
* float delta=fst.kDelta,
* mt=b"identity",
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3222
+ /* "pywrapfst.pyx":3238
* weight=None):
* cdef fst.MapType map_type
* if not fst.GetMapType(tostring(mt), addr(map_type)): # <<<<<<<<<<<<<<
* raise FstArgError("Unknown map type: {!r}".format(mt))
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(),
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_mt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3222, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_mt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3238, __pyx_L1_error)
__pyx_t_2 = ((!(fst::script::GetMapType(__pyx_t_1, (&__pyx_v_map_type)) != 0)) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":3223
+ /* "pywrapfst.pyx":3239
* cdef fst.MapType map_type
* if not fst.GetMapType(tostring(mt), addr(map_type)):
* raise FstArgError("Unknown map type: {!r}".format(mt)) # <<<<<<<<<<<<<<
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(),
* weight) if mt == fst.TIMES_MAPPER else
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_map_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_map_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
}
}
if (!__pyx_t_7) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_mt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_mt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_mt};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_mt};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_INCREF(__pyx_v_mt);
__Pyx_GIVEREF(__pyx_v_mt);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_mt);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
}
if (!__pyx_t_6) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3223, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__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, 3223, __pyx_L1_error)
+ __PYX_ERR(0, 3239, __pyx_L1_error)
- /* "pywrapfst.pyx":3222
+ /* "pywrapfst.pyx":3238
* weight=None):
* cdef fst.MapType map_type
* if not fst.GetMapType(tostring(mt), addr(map_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3225
+ /* "pywrapfst.pyx":3241
* raise FstArgError("Unknown map type: {!r}".format(mt))
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(),
* weight) if mt == fst.TIMES_MAPPER else # <<<<<<<<<<<<<<
* _get_WeightClass_or_Zero(ifst.weight_type(), weight))
* return _init_XFst(fst.Map(deref(ifst._fst), map_type, delta, wc))
*/
- __pyx_t_3 = __Pyx_PyInt_From_enum__fst_3a__3a_script_3a__3a_MapType(fst::script::TIMES_MAPPER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_enum__fst_3a__3a_script_3a__3a_MapType(fst::script::TIMES_MAPPER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3241, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_RichCompare(__pyx_v_mt, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3225, __pyx_L1_error)
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_mt, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3241, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3225, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3241, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_2) {
- /* "pywrapfst.pyx":3224
+ /* "pywrapfst.pyx":3240
* if not fst.GetMapType(tostring(mt), addr(map_type)):
* raise FstArgError("Unknown map type: {!r}".format(mt))
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 3224, __pyx_L1_error)
+ __PYX_ERR(0, 3240, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3225
+ /* "pywrapfst.pyx":3241
* raise FstArgError("Unknown map type: {!r}".format(mt))
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(),
* weight) if mt == fst.TIMES_MAPPER else # <<<<<<<<<<<<<<
* _get_WeightClass_or_Zero(ifst.weight_type(), weight))
* return _init_XFst(fst.Map(deref(ifst._fst), map_type, delta, wc))
*/
- __pyx_t_10 = __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, 3224, __pyx_L1_error)
+ __pyx_t_10 = __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, 3240, __pyx_L1_error)
__pyx_t_9 = __pyx_t_10;
} else {
- /* "pywrapfst.pyx":3226
+ /* "pywrapfst.pyx":3242
* cdef fst.WeightClass wc = (_get_WeightClass_or_One(ifst.weight_type(),
* weight) if mt == fst.TIMES_MAPPER else
* _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 '%s'", "weight_type");
- __PYX_ERR(0, 3226, __pyx_L1_error)
+ __PYX_ERR(0, 3242, __pyx_L1_error)
}
- __pyx_t_10 = __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, 3226, __pyx_L1_error)
+ __pyx_t_10 = __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, 3242, __pyx_L1_error)
__pyx_t_9 = __pyx_t_10;
}
__pyx_v_wc = __pyx_t_9;
- /* "pywrapfst.pyx":3227
+ /* "pywrapfst.pyx":3243
* weight) if mt == fst.TIMES_MAPPER else
* _get_WeightClass_or_Zero(ifst.weight_type(), weight))
* return _init_XFst(fst.Map(deref(ifst._fst), map_type, delta, wc)) # <<<<<<<<<<<<<<
__Pyx_XDECREF(((PyObject *)__pyx_r));
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3227, __pyx_L1_error)
+ __PYX_ERR(0, 3243, __pyx_L1_error)
}
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v_map_type, __pyx_v_delta, __pyx_v_wc))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3227, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v_map_type, __pyx_v_delta, __pyx_v_wc))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3243, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3217
+ /* "pywrapfst.pyx":3233
*
*
* cdef _Fst _map(_Fst ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3230
+/* "pywrapfst.pyx":3246
*
*
* cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__35;
PyObject *__pyx_v_mt = ((PyObject *)__pyx_n_b_identity);
- /* "pywrapfst.pyx":3233
+ /* "pywrapfst.pyx":3249
* float delta=fst.kDelta,
* mt=b"identity",
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3271
+ /* "pywrapfst.pyx":3287
* See also: `statemap`.
* """
* return _map(ifst, delta, mt, weight) # <<<<<<<<<<<<<<
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_2.mt = __pyx_v_mt;
__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, 3271, __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, 3287, __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":3230
+ /* "pywrapfst.pyx":3246
*
*
* cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[4] = {0,0,0,0};
values[2] = ((PyObject *)__pyx_n_b_identity);
- /* "pywrapfst.pyx":3233
+ /* "pywrapfst.pyx":3249
* float delta=fst.kDelta,
* mt=b"identity",
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3230, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arcmap") < 0)) __PYX_ERR(0, 3246, __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, 3231, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3247, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__35;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3230, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3246, __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, 3230, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3246, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_12arcmap(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_mt, __pyx_v_weight);
- /* "pywrapfst.pyx":3230
+ /* "pywrapfst.pyx":3246
*
*
* cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.delta = __pyx_v_delta;
__pyx_t_2.mt = __pyx_v_mt;
__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, 3230, __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, 3246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3274
+/* "pywrapfst.pyx":3290
*
*
* 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_cf = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3277
+ /* "pywrapfst.pyx":3293
* _Fst ifst2,
* cf=b"auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3301
+ /* "pywrapfst.pyx":3317
* See also: `arcsort`.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3301, __pyx_L1_error)
+ __PYX_ERR(0, 3317, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0));
- /* "pywrapfst.pyx":3303
+ /* "pywrapfst.pyx":3319
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type())
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf)))) # <<<<<<<<<<<<<<
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3303, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3303, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3319, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3319, __pyx_L1_error)
__pyx_v_opts.reset(new fst::script::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3304
+ /* "pywrapfst.pyx":3320
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3304, __pyx_L1_error)
+ __PYX_ERR(0, 3320, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3304, __pyx_L1_error)
+ __PYX_ERR(0, 3320, __pyx_L1_error)
}
fst::script::Compose((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3305
+ /* "pywrapfst.pyx":3321
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Compose(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3305, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3321, __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":3274
+ /* "pywrapfst.pyx":3290
*
*
* cpdef _MutableFst compose(_Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3274, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3290, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3274, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compose") < 0)) __PYX_ERR(0, 3290, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]);
__pyx_v_cf = 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, 3277, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3293, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3277
+ /* "pywrapfst.pyx":3293
* _Fst ifst2,
* cf=b"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, 3274, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3290, __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, 3274, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3275, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3290, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3291, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_14compose(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_cf, __pyx_v_connect);
- /* "pywrapfst.pyx":3274
+ /* "pywrapfst.pyx":3290
*
*
* cpdef _MutableFst compose(_Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.cf = __pyx_v_cf;
__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, 3274, __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, 3290, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3308
+/* "pywrapfst.pyx":3324
*
*
* cpdef _Fst convert(_Fst ifst, fst_type=b""): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3325
+ /* "pywrapfst.pyx":3341
* FstOpError: Conversion failed.
* """
* cdef FstClass_ptr tfst = new fst.FstClass(deref(ifst._fst)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3325, __pyx_L1_error)
+ __PYX_ERR(0, 3341, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::FstClass((*__pyx_v_ifst->_fst));
- /* "pywrapfst.pyx":3326
+ /* "pywrapfst.pyx":3342
* """
* cdef FstClass_ptr tfst = new fst.FstClass(deref(ifst._fst))
* tfst = fst.Convert(deref(ifst._fst), tostring(fst_type)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3326, __pyx_L1_error)
+ __PYX_ERR(0, 3342, __pyx_L1_error)
}
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3326, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_fst_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3342, __pyx_L1_error)
__pyx_v_tfst = fst::script::Convert((*__pyx_v_ifst->_fst), __pyx_t_1);
- /* "pywrapfst.pyx":3328
+ /* "pywrapfst.pyx":3344
* tfst = fst.Convert(deref(ifst._fst), tostring(fst_type))
* # Script-land Convert returns the null pointer to signal failure.
* if tfst == NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_tfst == NULL) != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":3329
+ /* "pywrapfst.pyx":3345
* # Script-land Convert returns the null pointer to signal failure.
* if tfst == NULL:
* raise FstOpError("Conversion to {!r} failed".format(fst_type)) # <<<<<<<<<<<<<<
* return _init_XFst(tfst)
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Conversion_to_r_failed_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
}
}
if (!__pyx_t_7) {
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fst_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_fst_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_fst_type};
- __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_fst_type};
- __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_5);
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_INCREF(__pyx_v_fst_type);
__Pyx_GIVEREF(__pyx_v_fst_type);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_fst_type);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
}
}
if (!__pyx_t_6) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else
#endif
{
- __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
__Pyx_GIVEREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3329, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
__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, 3329, __pyx_L1_error)
+ __PYX_ERR(0, 3345, __pyx_L1_error)
- /* "pywrapfst.pyx":3328
+ /* "pywrapfst.pyx":3344
* tfst = fst.Convert(deref(ifst._fst), tostring(fst_type))
* # Script-land Convert returns the null pointer to signal failure.
* if tfst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3330
+ /* "pywrapfst.pyx":3346
* if tfst == NULL:
* raise FstOpError("Conversion to {!r} failed".format(fst_type))
* return _init_XFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3330, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3346, __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":3308
+ /* "pywrapfst.pyx":3324
*
*
* cpdef _Fst convert(_Fst ifst, fst_type=b""): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3308, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "convert") < 0)) __PYX_ERR(0, 3324, __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, 3308, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3324, __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, 3308, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3324, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_16convert(__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, 3308, __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, 3324, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3333
+/* "pywrapfst.pyx":3349
*
*
* cpdef _MutableFst determinize(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__37;
__pyx_t_10basictypes_int64 __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0);
- /* "pywrapfst.pyx":3338
+ /* "pywrapfst.pyx":3354
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None, # <<<<<<<<<<<<<<
*/
PyObject *__pyx_v_weight = ((PyObject *)Py_None);
- /* "pywrapfst.pyx":3339
+ /* "pywrapfst.pyx":3355
* int64 subsequential_label=0,
* weight=None,
* bool increment_subsequential_label=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3374
+ /* "pywrapfst.pyx":3390
* See also: `disambiguate`, `rmepsilon`.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3374, __pyx_L1_error)
+ __PYX_ERR(0, 3390, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3376
+ /* "pywrapfst.pyx":3392
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 3376, __pyx_L1_error)
+ __PYX_ERR(0, 3392, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3377
+ /* "pywrapfst.pyx":3393
* # Threshold is set to semiring Zero (no pruning) if weight unspecified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef fst.DeterminizeType determinize_type
* if not fst.GetDeterminizeType(tostring(dt), addr(determinize_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, 3376, __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, 3392, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":3379
+ /* "pywrapfst.pyx":3395
* weight)
* cdef fst.DeterminizeType determinize_type
* if not fst.GetDeterminizeType(tostring(dt), addr(determinize_type)): # <<<<<<<<<<<<<<
* raise FstArgError("Unknown determinization type: {!r}".format(dt))
* cdef unique_ptr[fst.DeterminizeOptions] opts
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_dt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3379, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_dt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L1_error)
__pyx_t_3 = ((!(fst::script::GetDeterminizeType(__pyx_t_2, (&__pyx_v_determinize_type)) != 0)) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":3380
+ /* "pywrapfst.pyx":3396
* cdef fst.DeterminizeType determinize_type
* if not fst.GetDeterminizeType(tostring(dt), addr(determinize_type)):
* raise FstArgError("Unknown determinization type: {!r}".format(dt)) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.DeterminizeOptions] opts
* opts.reset(new fst.DeterminizeOptions(delta, wc, nstate, subsequential_label,
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unknown_determinization_type_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
}
}
if (!__pyx_t_8) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_dt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_dt); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_dt};
- __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_dt};
- __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
__Pyx_INCREF(__pyx_v_dt);
__Pyx_GIVEREF(__pyx_v_dt);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_dt);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
}
}
if (!__pyx_t_7) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_GIVEREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__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, 3380, __pyx_L1_error)
+ __PYX_ERR(0, 3396, __pyx_L1_error)
- /* "pywrapfst.pyx":3379
+ /* "pywrapfst.pyx":3395
* weight)
* cdef fst.DeterminizeType determinize_type
* if not fst.GetDeterminizeType(tostring(dt), addr(determinize_type)): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3382
+ /* "pywrapfst.pyx":3398
* raise FstArgError("Unknown determinization type: {!r}".format(dt))
* cdef unique_ptr[fst.DeterminizeOptions] opts
* opts.reset(new fst.DeterminizeOptions(delta, wc, nstate, subsequential_label, # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::DeterminizeOptions(__pyx_v_delta, __pyx_v_wc, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_determinize_type, __pyx_v_increment_subsequential_label));
- /* "pywrapfst.pyx":3385
+ /* "pywrapfst.pyx":3401
* determinize_type,
* increment_subsequential_label))
* fst.Determinize(deref(ifst._fst), tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3385, __pyx_L1_error)
+ __PYX_ERR(0, 3401, __pyx_L1_error)
}
fst::script::Determinize((*__pyx_v_ifst->_fst), __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3386
+ /* "pywrapfst.pyx":3402
* increment_subsequential_label))
* fst.Determinize(deref(ifst._fst), tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3386, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3402, __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":3333
+ /* "pywrapfst.pyx":3349
*
*
* cpdef _MutableFst determinize(_Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[7] = {0,0,0,0,0,0,0};
values[2] = ((PyObject *)__pyx_n_b_functional);
- /* "pywrapfst.pyx":3338
+ /* "pywrapfst.pyx":3354
* 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, 3333, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "determinize") < 0)) __PYX_ERR(0, 3349, __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, 3334, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3350, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__36;
}
__pyx_v_dt = values[2];
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3352, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__37;
}
if (values[4]) {
- __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3337, __pyx_L3_error)
+ __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3353, __pyx_L3_error)
} else {
__pyx_v_subsequential_label = ((__pyx_t_10basictypes_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, 3339, __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, 3355, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3339
+ /* "pywrapfst.pyx":3355
* 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, 3333, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3349, __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, 3333, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3349, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_18determinize(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_dt, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight, __pyx_v_increment_subsequential_label);
- /* "pywrapfst.pyx":3333
+ /* "pywrapfst.pyx":3349
*
*
* 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, 3333, __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, 3349, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3389
+/* "pywrapfst.pyx":3405
*
*
* 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_cf = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3392
+ /* "pywrapfst.pyx":3408
* _Fst ifst2,
* cf=b"auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3415
+ /* "pywrapfst.pyx":3431
* An FST representing the difference of the two input FSTs.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3415, __pyx_L1_error)
+ __PYX_ERR(0, 3431, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0));
- /* "pywrapfst.pyx":3417
+ /* "pywrapfst.pyx":3433
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type())
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf)))) # <<<<<<<<<<<<<<
* fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3417, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3433, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3433, __pyx_L1_error)
__pyx_v_opts.reset(new fst::script::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3418
+ /* "pywrapfst.pyx":3434
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3418, __pyx_L1_error)
+ __PYX_ERR(0, 3434, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3418, __pyx_L1_error)
+ __PYX_ERR(0, 3434, __pyx_L1_error)
}
fst::script::Difference((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3419
+ /* "pywrapfst.pyx":3435
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Difference(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3419, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __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":3389
+ /* "pywrapfst.pyx":3405
*
*
* cpdef _MutableFst difference(_Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3389, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3405, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3389, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) __PYX_ERR(0, 3405, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]);
__pyx_v_cf = 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, 3392, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3408, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3392
+ /* "pywrapfst.pyx":3408
* _Fst ifst2,
* cf=b"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, 3389, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3405, __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, 3389, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3390, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3405, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3406, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_20difference(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_cf, __pyx_v_connect);
- /* "pywrapfst.pyx":3389
+ /* "pywrapfst.pyx":3405
*
*
* cpdef _MutableFst difference(_Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.cf = __pyx_v_cf;
__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, 3389, __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, 3405, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3422
+/* "pywrapfst.pyx":3438
*
*
* cpdef _MutableFst disambiguate(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__39;
__pyx_t_10basictypes_int64 __pyx_v_subsequential_label = ((__pyx_t_10basictypes_int64)0);
- /* "pywrapfst.pyx":3426
+ /* "pywrapfst.pyx":3442
* int64 nstate=fst.kNoStateId,
* int64 subsequential_label=0,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3452
+ /* "pywrapfst.pyx":3468
* See also: `determinize`, `rmepsilon`.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3452, __pyx_L1_error)
+ __PYX_ERR(0, 3468, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3454
+ /* "pywrapfst.pyx":3470
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 3454, __pyx_L1_error)
+ __PYX_ERR(0, 3470, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3455
+ /* "pywrapfst.pyx":3471
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(),
* weight) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.DisambiguateOptions] opts
* opts.reset(new fst.DisambiguateOptions(delta, wc, nstate,
*/
- __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, 3454, __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, 3470, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":3457
+ /* "pywrapfst.pyx":3473
* weight)
* cdef unique_ptr[fst.DisambiguateOptions] opts
* opts.reset(new fst.DisambiguateOptions(delta, wc, nstate, # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::DisambiguateOptions(__pyx_v_delta, __pyx_v_wc, __pyx_v_nstate, __pyx_v_subsequential_label));
- /* "pywrapfst.pyx":3459
+ /* "pywrapfst.pyx":3475
* opts.reset(new fst.DisambiguateOptions(delta, wc, nstate,
* subsequential_label))
* fst.Disambiguate(deref(ifst._fst), tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3459, __pyx_L1_error)
+ __PYX_ERR(0, 3475, __pyx_L1_error)
}
fst::script::Disambiguate((*__pyx_v_ifst->_fst), __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3460
+ /* "pywrapfst.pyx":3476
* subsequential_label))
* fst.Disambiguate(deref(ifst._fst), tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3460, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3476, __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":3422
+ /* "pywrapfst.pyx":3438
*
*
* 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":3426
+ /* "pywrapfst.pyx":3442
* 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, 3422, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3438, __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, 3423, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3439, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__38;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3424, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3440, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__39;
}
if (values[3]) {
- __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3425, __pyx_L3_error)
+ __pyx_v_subsequential_label = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_subsequential_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3441, __pyx_L3_error)
} else {
__pyx_v_subsequential_label = ((__pyx_t_10basictypes_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, 3422, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3438, __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, 3422, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3438, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_22disambiguate(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight);
- /* "pywrapfst.pyx":3422
+ /* "pywrapfst.pyx":3438
*
*
* 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, 3422, __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, 3438, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3463
+/* "pywrapfst.pyx":3479
*
*
* cpdef _MutableFst epsnormalize(_Fst ifst, bool eps_norm_output=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3485
+ /* "pywrapfst.pyx":3501
* See also: `rmepsilon`.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3485, __pyx_L1_error)
+ __PYX_ERR(0, 3501, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3486
+ /* "pywrapfst.pyx":3502
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.EpsNormalize(deref(ifst._fst), tfst, fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3486, __pyx_L1_error)
+ __PYX_ERR(0, 3502, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3487
+ /* "pywrapfst.pyx":3503
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.EpsNormalize(deref(ifst._fst), tfst, fst.EPS_NORM_OUTPUT if
* eps_norm_output else # <<<<<<<<<<<<<<
*/
if ((__pyx_v_eps_norm_output != 0)) {
- /* "pywrapfst.pyx":3486
+ /* "pywrapfst.pyx":3502
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.EpsNormalize(deref(ifst._fst), tfst, fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<<
__pyx_t_1 = fst::EPS_NORM_OUTPUT;
} else {
- /* "pywrapfst.pyx":3488
+ /* "pywrapfst.pyx":3504
* fst.EpsNormalize(deref(ifst._fst), tfst, fst.EPS_NORM_OUTPUT if
* eps_norm_output else
* fst.EPS_NORM_INPUT) # <<<<<<<<<<<<<<
__pyx_t_1 = fst::EPS_NORM_INPUT;
}
- /* "pywrapfst.pyx":3486
+ /* "pywrapfst.pyx":3502
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.EpsNormalize(deref(ifst._fst), tfst, fst.EPS_NORM_OUTPUT if # <<<<<<<<<<<<<<
*/
fst::script::EpsNormalize((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_t_1);
- /* "pywrapfst.pyx":3489
+ /* "pywrapfst.pyx":3505
* eps_norm_output else
* fst.EPS_NORM_INPUT)
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3489, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3505, __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":3463
+ /* "pywrapfst.pyx":3479
*
*
* 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, 3463, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3479, __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, 3463, __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, 3479, __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, 3463, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3479, __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, 3463, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3479, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_24epsnormalize(__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, 3463, __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, 3479, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3492
+/* "pywrapfst.pyx":3508
*
*
* cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3512
+ /* "pywrapfst.pyx":3528
* See also: `equivalent`, `isomorphic`, `randequivalent`.
* """
* 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 '%s'", "_fst");
- __PYX_ERR(0, 3512, __pyx_L1_error)
+ __PYX_ERR(0, 3528, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3512, __pyx_L1_error)
+ __PYX_ERR(0, 3528, __pyx_L1_error)
}
__pyx_r = fst::script::Equal((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta);
goto __pyx_L0;
- /* "pywrapfst.pyx":3492
+ /* "pywrapfst.pyx":3508
*
*
* cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3492, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3508, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3492, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equal") < 0)) __PYX_ERR(0, 3508, __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, 3492, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3508, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__40;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3492, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3508, __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, 3492, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3492, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3508, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3508, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_26equal(__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, 3492, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3508, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3515
+/* "pywrapfst.pyx":3531
*
*
* cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3539
+ /* "pywrapfst.pyx":3555
* """
* cdef bool error
* cdef bool result = 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 '%s'", "_fst");
- __PYX_ERR(0, 3539, __pyx_L1_error)
+ __PYX_ERR(0, 3555, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3539, __pyx_L1_error)
+ __PYX_ERR(0, 3555, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3540
+ /* "pywrapfst.pyx":3556
* cdef bool error
* cdef bool result = fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta,
* addr(error)) # <<<<<<<<<<<<<<
*/
__pyx_v_result = fst::script::Equivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta, (&__pyx_v_error));
- /* "pywrapfst.pyx":3541
+ /* "pywrapfst.pyx":3557
* cdef bool result = fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta,
* addr(error))
* if error: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_error != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":3542
+ /* "pywrapfst.pyx":3558
* addr(error))
* if error:
* raise FstOpError("Equivalence test encountered error") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3542, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3558, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3542, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3558, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 3542, __pyx_L1_error)
+ __PYX_ERR(0, 3558, __pyx_L1_error)
- /* "pywrapfst.pyx":3541
+ /* "pywrapfst.pyx":3557
* cdef bool result = fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta,
* addr(error))
* if error: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3543
+ /* "pywrapfst.pyx":3559
* if error:
* raise FstOpError("Equivalence test encountered error")
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":3515
+ /* "pywrapfst.pyx":3531
*
*
* cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3515, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3531, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3515, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equivalent") < 0)) __PYX_ERR(0, 3531, __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, 3515, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3531, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__41;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3515, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3531, __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, 3515, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3515, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3531, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3531, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_28equivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta);
/* function exit code */
__Pyx_XDECREF(__pyx_r);
__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); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3515, __pyx_L1_error)
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3515, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3531, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3531, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3546
+/* "pywrapfst.pyx":3562
*
*
* 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_cf = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3549
+ /* "pywrapfst.pyx":3565
* _Fst ifst2,
* cf=b"auto",
* bool connect=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3570
+ /* "pywrapfst.pyx":3586
* An equivalent epsilon-normalized FST.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3570, __pyx_L1_error)
+ __PYX_ERR(0, 3586, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0));
- /* "pywrapfst.pyx":3572
+ /* "pywrapfst.pyx":3588
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst1.arc_type())
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf)))) # <<<<<<<<<<<<<<
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3572, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3572, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_cf, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3588, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3588, __pyx_L1_error)
__pyx_v_opts.reset(new fst::script::ComposeOptions(__pyx_v_connect, __pyx_t_2));
- /* "pywrapfst.pyx":3573
+ /* "pywrapfst.pyx":3589
* cdef unique_ptr[fst.ComposeOptions] opts
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3573, __pyx_L1_error)
+ __PYX_ERR(0, 3589, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3573, __pyx_L1_error)
+ __PYX_ERR(0, 3589, __pyx_L1_error)
}
fst::script::Intersect((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3574
+ /* "pywrapfst.pyx":3590
* opts.reset(new fst.ComposeOptions(connect, _get_compose_filter(tostring(cf))))
* fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3574, __pyx_L1_error)
+ __pyx_t_3 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3590, __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":3546
+ /* "pywrapfst.pyx":3562
*
*
* cpdef _MutableFst intersect(_Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3546, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3562, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3546, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersect") < 0)) __PYX_ERR(0, 3562, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_ifst2 = ((struct __pyx_obj_9pywrapfst__Fst *)values[1]);
__pyx_v_cf = 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, 3549, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3565, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3549
+ /* "pywrapfst.pyx":3565
* _Fst ifst2,
* cf=b"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, 3546, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3562, __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, 3546, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3547, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3562, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3563, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_30intersect(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_cf, __pyx_v_connect);
- /* "pywrapfst.pyx":3546
+ /* "pywrapfst.pyx":3562
*
*
* cpdef _MutableFst intersect(_Fst ifst1, # <<<<<<<<<<<<<<
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.cf = __pyx_v_cf;
__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, 3546, __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, 3562, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3577
+/* "pywrapfst.pyx":3593
*
*
* cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3600
+ /* "pywrapfst.pyx":3616
* See also: `equal`, `equivalent`, `randequivalent`.
* """
* 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 '%s'", "_fst");
- __PYX_ERR(0, 3600, __pyx_L1_error)
+ __PYX_ERR(0, 3616, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3600, __pyx_L1_error)
+ __PYX_ERR(0, 3616, __pyx_L1_error)
}
__pyx_r = fst::script::Isomorphic((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta);
goto __pyx_L0;
- /* "pywrapfst.pyx":3577
+ /* "pywrapfst.pyx":3593
*
*
* cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3577, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3593, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3577, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3593, __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, 3577, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3593, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__43;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3577, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3593, __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, 3577, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3577, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3593, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_32isomorphic(__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, 3577, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3593, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3603
+/* "pywrapfst.pyx":3619
*
*
* cpdef _MutableFst prune(_Fst ifst, # <<<<<<<<<<<<<<
float __pyx_v_delta = __pyx_k__44;
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__45;
- /* "pywrapfst.pyx":3606
+ /* "pywrapfst.pyx":3622
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3629
+ /* "pywrapfst.pyx":3645
* See also: The destructive variant.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3629, __pyx_L1_error)
+ __PYX_ERR(0, 3645, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3630
+ /* "pywrapfst.pyx":3646
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* cdef fst.WeightClass wc = _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 '%s'", "weight_type");
- __PYX_ERR(0, 3630, __pyx_L1_error)
+ __PYX_ERR(0, 3646, __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, 3630, __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, 3646, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":3631
+ /* "pywrapfst.pyx":3647
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight)
* fst.Prune(deref(ifst._fst), tfst, wc, nstate, delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3631, __pyx_L1_error)
+ __PYX_ERR(0, 3647, __pyx_L1_error)
}
fst::script::Prune((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_wc, __pyx_v_nstate, __pyx_v_delta);
- /* "pywrapfst.pyx":3632
+ /* "pywrapfst.pyx":3648
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight)
* fst.Prune(deref(ifst._fst), tfst, wc, nstate, delta)
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3632, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3648, __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":3603
+ /* "pywrapfst.pyx":3619
*
*
* 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":3606
+ /* "pywrapfst.pyx":3622
* 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, 3603, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prune") < 0)) __PYX_ERR(0, 3619, __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, 3604, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3620, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__44;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3605, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3621, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__45;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3603, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3619, __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, 3603, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3619, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_34prune(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight);
- /* "pywrapfst.pyx":3603
+ /* "pywrapfst.pyx":3619
*
*
* 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, 3603, __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, 3619, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3635
+/* "pywrapfst.pyx":3651
*
*
* 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__46;
- /* "pywrapfst.pyx":3637
+ /* "pywrapfst.pyx":3653
* cpdef _MutableFst push(_Fst ifst,
* float delta=fst.kDelta,
* bool push_weights=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_push_weights = ((bool)0);
- /* "pywrapfst.pyx":3638
+ /* "pywrapfst.pyx":3654
* float delta=fst.kDelta,
* bool push_weights=False,
* bool push_labels=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_push_labels = ((bool)0);
- /* "pywrapfst.pyx":3639
+ /* "pywrapfst.pyx":3655
* bool push_weights=False,
* bool push_labels=False,
* bool remove_common_affix=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_common_affix = ((bool)0);
- /* "pywrapfst.pyx":3640
+ /* "pywrapfst.pyx":3656
* bool push_labels=False,
* bool remove_common_affix=False,
* bool remove_total_weight=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_remove_total_weight = ((bool)0);
- /* "pywrapfst.pyx":3641
+ /* "pywrapfst.pyx":3657
* bool remove_common_affix=False,
* bool remove_total_weight=False,
* bool to_final=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3680
+ /* "pywrapfst.pyx":3696
* """
* # This is copied, almost verbatim, from nlp/fst/bin/fstpush.cc.
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3680, __pyx_L1_error)
+ __PYX_ERR(0, 3696, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3681
+ /* "pywrapfst.pyx":3697
* # This is copied, almost verbatim, from nlp/fst/bin/fstpush.cc.
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* cdef uint32 flags = fst.GetPushFlags(push_weights, push_labels, # <<<<<<<<<<<<<<
*/
__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":3683
+ /* "pywrapfst.pyx":3699
* cdef uint32 flags = fst.GetPushFlags(push_weights, push_labels,
* remove_common_affix, remove_total_weight)
* fst.Push(deref(ifst._fst), tfst, flags, fst.GetReweightType(to_final), delta) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3683, __pyx_L1_error)
+ __PYX_ERR(0, 3699, __pyx_L1_error)
}
fst::script::Push((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_flags, fst::script::GetReweightType(__pyx_v_to_final), __pyx_v_delta);
- /* "pywrapfst.pyx":3684
+ /* "pywrapfst.pyx":3700
* remove_common_affix, remove_total_weight)
* fst.Push(deref(ifst._fst), tfst, flags, fst.GetReweightType(to_final), delta)
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3684, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3700, __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":3635
+ /* "pywrapfst.pyx":3651
*
*
* 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, 3635, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) __PYX_ERR(0, 3651, __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, 3636, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3652, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__46;
}
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, 3637, __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, 3653, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3637
+ /* "pywrapfst.pyx":3653
* 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, 3638, __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, 3654, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3638
+ /* "pywrapfst.pyx":3654
* 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, 3639, __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, 3655, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3639
+ /* "pywrapfst.pyx":3655
* 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, 3640, __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, 3656, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3640
+ /* "pywrapfst.pyx":3656
* 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, 3641, __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, 3657, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3641
+ /* "pywrapfst.pyx":3657
* 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, 3635, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3651, __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, 3635, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3651, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_36push(__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":3635
+ /* "pywrapfst.pyx":3651
*
*
* 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, 3635, __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, 3651, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3687
+/* "pywrapfst.pyx":3703
*
*
* cpdef bool randequivalent(_Fst ifst1, # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3725
+ /* "pywrapfst.pyx":3741
* See also: `equal`, `equivalent`, `isomorphic`, `randgen`.
* """
* cdef fst.RandArcSelection ras = _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, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3725, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3725, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3741, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3741, __pyx_L1_error)
__pyx_v_ras = __pyx_t_2;
- /* "pywrapfst.pyx":3728
+ /* "pywrapfst.pyx":3744
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts
* # The three trailing options will be ignored by RandEquivalent.
* opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::RandGenOptions<enum fst::script::RandArcSelection> (__pyx_v_ras, __pyx_v_max_length, 1, 0, 0));
- /* "pywrapfst.pyx":3730
+ /* "pywrapfst.pyx":3746
* opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length,
* 1, False, False))
* if seed == 0: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_seed == 0) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":3731
+ /* "pywrapfst.pyx":3747
* 1, False, False))
* if seed == 0:
* seed = time(NULL) + getpid() # <<<<<<<<<<<<<<
*/
__pyx_v_seed = (time(NULL) + getpid());
- /* "pywrapfst.pyx":3730
+ /* "pywrapfst.pyx":3746
* opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length,
* 1, False, False))
* if seed == 0: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3733
+ /* "pywrapfst.pyx":3749
* seed = time(NULL) + getpid()
* cdef bool error
* cdef bool result = fst.RandEquivalent(deref(ifst1._fst), deref(ifst2._fst), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3733, __pyx_L1_error)
+ __PYX_ERR(0, 3749, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3733, __pyx_L1_error)
+ __PYX_ERR(0, 3749, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3735
+ /* "pywrapfst.pyx":3751
* cdef bool result = fst.RandEquivalent(deref(ifst1._fst), deref(ifst2._fst),
* npath, delta, seed, deref(opts),
* addr(error)) # <<<<<<<<<<<<<<
*/
__pyx_v_result = fst::script::RandEquivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_npath, __pyx_v_delta, __pyx_v_seed, (*__pyx_v_opts), (&__pyx_v_error));
- /* "pywrapfst.pyx":3736
+ /* "pywrapfst.pyx":3752
* npath, delta, seed, deref(opts),
* addr(error))
* if error: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_error != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":3737
+ /* "pywrapfst.pyx":3753
* addr(error))
* if error:
* raise FstOpError("Random equivalence test encountered error") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3737, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3753, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3737, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3753, __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, 3737, __pyx_L1_error)
+ __PYX_ERR(0, 3753, __pyx_L1_error)
- /* "pywrapfst.pyx":3736
+ /* "pywrapfst.pyx":3752
* npath, delta, seed, deref(opts),
* addr(error))
* if error: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3738
+ /* "pywrapfst.pyx":3754
* if error:
* raise FstOpError("Random equivalence test encountered error")
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":3687
+ /* "pywrapfst.pyx":3703
*
*
* cpdef bool randequivalent(_Fst ifst1, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3687, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 3703, __pyx_L3_error)
}
case 2:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3687, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randequivalent") < 0)) __PYX_ERR(0, 3703, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3689, __pyx_L3_error)
+ __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3705, __pyx_L3_error)
} else {
__pyx_v_npath = ((__pyx_t_10basictypes_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, 3690, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3706, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__47;
}
if (values[4]) {
- __pyx_v_seed = __Pyx_PyInt_As_time_t(values[4]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3691, __pyx_L3_error)
+ __pyx_v_seed = __Pyx_PyInt_As_time_t(values[4]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3707, __pyx_L3_error)
} else {
__pyx_v_seed = ((time_t)0);
}
__pyx_v_select = values[5];
if (values[6]) {
- __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[6]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3693, __pyx_L3_error)
+ __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[6]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3709, __pyx_L3_error)
} else {
__pyx_v_max_length = __pyx_k__48;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3687, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3703, __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, 3687, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3688, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_9pywrapfst__Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3703, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_9pywrapfst__Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3704, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_38randequivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_npath, __pyx_v_delta, __pyx_v_seed, __pyx_v_select, __pyx_v_max_length);
/* function exit code */
__pyx_t_2.seed = __pyx_v_seed;
__pyx_t_2.select = __pyx_v_select;
__pyx_t_2.max_length = __pyx_v_max_length;
- __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3687, __pyx_L1_error)
- __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3687, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3703, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3703, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3741
+/* "pywrapfst.pyx":3757
*
*
* cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<<
PyObject *__pyx_v_select = ((PyObject *)__pyx_n_b_uniform);
__pyx_t_10basictypes_int32 __pyx_v_max_length = __pyx_k__50;
- /* "pywrapfst.pyx":3746
+ /* "pywrapfst.pyx":3762
* select=b"uniform",
* int32 max_length=INT32_MAX,
* bool weighted=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_weighted = ((bool)0);
- /* "pywrapfst.pyx":3747
+ /* "pywrapfst.pyx":3763
* int32 max_length=INT32_MAX,
* bool weighted=False,
* bool remove_total_weight=False): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3779
+ /* "pywrapfst.pyx":3795
* See also: `randequivalent`.
* """
* cdef fst.RandArcSelection ras = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts
* opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length,
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3779, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3779, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_select, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3795, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3795, __pyx_L1_error)
__pyx_v_ras = __pyx_t_2;
- /* "pywrapfst.pyx":3781
+ /* "pywrapfst.pyx":3797
* cdef fst.RandArcSelection ras = _get_rand_arc_selection(tostring(select))
* cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] opts
* opts.reset(new fst.RandGenOptions[fst.RandArcSelection](ras, max_length, # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::RandGenOptions<enum fst::script::RandArcSelection> (__pyx_v_ras, __pyx_v_max_length, __pyx_v_npath, __pyx_v_weighted, __pyx_v_remove_total_weight));
- /* "pywrapfst.pyx":3784
+ /* "pywrapfst.pyx":3800
* npath, weighted,
* remove_total_weight))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3784, __pyx_L1_error)
+ __PYX_ERR(0, 3800, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3785
+ /* "pywrapfst.pyx":3801
* remove_total_weight))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* if seed == 0: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_seed == 0) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":3786
+ /* "pywrapfst.pyx":3802
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* if seed == 0:
* seed = time(NULL) + getpid() # <<<<<<<<<<<<<<
*/
__pyx_v_seed = (time(NULL) + getpid());
- /* "pywrapfst.pyx":3785
+ /* "pywrapfst.pyx":3801
* remove_total_weight))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* if seed == 0: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":3787
+ /* "pywrapfst.pyx":3803
* if seed == 0:
* seed = time(NULL) + getpid()
* fst.RandGen(deref(ifst._fst), tfst, seed, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3787, __pyx_L1_error)
+ __PYX_ERR(0, 3803, __pyx_L1_error)
}
fst::script::RandGen((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_seed, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3788
+ /* "pywrapfst.pyx":3804
* seed = time(NULL) + getpid()
* fst.RandGen(deref(ifst._fst), tfst, seed, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3804, __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":3741
+ /* "pywrapfst.pyx":3757
*
*
* 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, 3741, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randgen") < 0)) __PYX_ERR(0, 3757, __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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3742, __pyx_L3_error)
+ __pyx_v_npath = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_npath == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L3_error)
} else {
__pyx_v_npath = ((__pyx_t_10basictypes_int32)1);
}
if (values[2]) {
- __pyx_v_seed = __Pyx_PyInt_As_time_t(values[2]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3743, __pyx_L3_error)
+ __pyx_v_seed = __Pyx_PyInt_As_time_t(values[2]); if (unlikely((__pyx_v_seed == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3759, __pyx_L3_error)
} else {
__pyx_v_seed = ((time_t)0);
}
__pyx_v_select = values[3];
if (values[4]) {
- __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[4]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3745, __pyx_L3_error)
+ __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[4]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3761, __pyx_L3_error)
} else {
__pyx_v_max_length = __pyx_k__50;
}
if (values[5]) {
- __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3746, __pyx_L3_error)
+ __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3762, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3746
+ /* "pywrapfst.pyx":3762
* select=b"uniform",
* int32 max_length=INT32_MAX,
* bool weighted=False, # <<<<<<<<<<<<<<
__pyx_v_weighted = ((bool)0);
}
if (values[6]) {
- __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3747, __pyx_L3_error)
+ __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[6]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3763, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3747
+ /* "pywrapfst.pyx":3763
* int32 max_length=INT32_MAX,
* bool weighted=False,
* bool remove_total_weight=False): # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3741, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3757, __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, 3741, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3757, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_40randgen(__pyx_self, __pyx_v_ifst, __pyx_v_npath, __pyx_v_seed, __pyx_v_select, __pyx_v_max_length, __pyx_v_weighted, __pyx_v_remove_total_weight);
- /* "pywrapfst.pyx":3741
+ /* "pywrapfst.pyx":3757
*
*
* cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.max_length = __pyx_v_max_length;
__pyx_t_2.remove_total_weight = __pyx_v_weighted;
__pyx_t_2.weighted = __pyx_v_remove_total_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3741, __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, 3757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3791
+/* "pywrapfst.pyx":3807
*
*
* cpdef _MutableFst replace(pairs, # <<<<<<<<<<<<<<
PyObject *__pyx_v_call_arc_labeling = ((PyObject *)__pyx_n_b_input);
PyObject *__pyx_v_return_arc_labeling = ((PyObject *)__pyx_n_b_neither);
- /* "pywrapfst.pyx":3794
+ /* "pywrapfst.pyx":3810
* call_arc_labeling=b"input",
* return_arc_labeling=b"neither",
* bool epsilon_on_replace=False, # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3836
+ /* "pywrapfst.pyx":3852
* cdef int64 label
* cdef _Fst ifst
* it = iter(pairs) # <<<<<<<<<<<<<<
* (root_label, ifst) = next(it)
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get()))
*/
- __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3836, __pyx_L1_error)
+ __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3852, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_it = __pyx_t_1;
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":3837
+ /* "pywrapfst.pyx":3853
* cdef _Fst ifst
* it = iter(pairs)
* (root_label, ifst) = next(it) # <<<<<<<<<<<<<<
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get()))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
*/
- __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3837, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 3837, __pyx_L1_error)
+ __PYX_ERR(0, 3853, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_3);
#else
- __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3837, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3837, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3837, __pyx_L1_error)
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
__Pyx_GOTREF(__pyx_t_2);
index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3837, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3853, __pyx_L1_error)
__pyx_t_5 = NULL;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L4_unpacking_done;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 3837, __pyx_L1_error)
+ __PYX_ERR(0, 3853, __pyx_L1_error)
__pyx_L4_unpacking_done:;
}
- __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3837, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3853, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3837, __pyx_L1_error)
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3853, __pyx_L1_error)
__pyx_v_root_label = __pyx_t_6;
__pyx_v_ifst = ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":3838
+ /* "pywrapfst.pyx":3854
* it = iter(pairs)
* (root_label, ifst) = next(it)
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3838, __pyx_L1_error)
+ __PYX_ERR(0, 3854, __pyx_L1_error)
}
try {
__pyx_t_7 = __pyx_t_3fst_LabelFstClassPair(__pyx_v_root_label, __pyx_v_ifst->_fst.get());
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 3838, __pyx_L1_error)
+ __PYX_ERR(0, 3854, __pyx_L1_error)
}
try {
__pyx_v__pairs.push_back(__pyx_t_7);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 3838, __pyx_L1_error)
+ __PYX_ERR(0, 3854, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3839
+ /* "pywrapfst.pyx":3855
* (root_label, ifst) = next(it)
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get()))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3839, __pyx_L1_error)
+ __PYX_ERR(0, 3855, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3840
+ /* "pywrapfst.pyx":3856
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get()))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* for (label, ifst) in it: # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_it; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
- __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_it); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3856, __pyx_L1_error)
}
for (;;) {
if (likely(!__pyx_t_9)) {
if (likely(PyList_CheckExact(__pyx_t_1))) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3856, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
} else {
if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3856, __pyx_L1_error)
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
#endif
}
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 3840, __pyx_L1_error)
+ else __PYX_ERR(0, 3856, __pyx_L1_error)
}
break;
}
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 3840, __pyx_L1_error)
+ __PYX_ERR(0, 3856, __pyx_L1_error)
}
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_4);
#else
- __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = Py_TYPE(__pyx_t_10)->tp_iternext;
__Pyx_GOTREF(__pyx_t_2);
index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_10), 2) < 0) __PYX_ERR(0, 3840, __pyx_L1_error)
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_10), 2) < 0) __PYX_ERR(0, 3856, __pyx_L1_error)
__pyx_t_5 = NULL;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L8_unpacking_done;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_5 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 3840, __pyx_L1_error)
+ __PYX_ERR(0, 3856, __pyx_L1_error)
__pyx_L8_unpacking_done:;
}
- __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3840, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3856, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3840, __pyx_L1_error)
+ if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 3856, __pyx_L1_error)
__pyx_v_label = __pyx_t_6;
__Pyx_DECREF_SET(__pyx_v_ifst, ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_t_4));
__pyx_t_4 = 0;
- /* "pywrapfst.pyx":3841
+ /* "pywrapfst.pyx":3857
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* for (label, ifst) in it:
* _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3841, __pyx_L1_error)
+ __PYX_ERR(0, 3857, __pyx_L1_error)
}
try {
__pyx_t_7 = __pyx_t_3fst_LabelFstClassPair(__pyx_v_label, __pyx_v_ifst->_fst.get());
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 3841, __pyx_L1_error)
+ __PYX_ERR(0, 3857, __pyx_L1_error)
}
try {
__pyx_v__pairs.push_back(__pyx_t_7);
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 3841, __pyx_L1_error)
+ __PYX_ERR(0, 3857, __pyx_L1_error)
}
- /* "pywrapfst.pyx":3840
+ /* "pywrapfst.pyx":3856
* _pairs.push_back(fst.LabelFstClassPair(root_label, ifst._fst.get()))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* for (label, ifst) in it: # <<<<<<<<<<<<<<
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":3843
+ /* "pywrapfst.pyx":3859
* _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get()))
* cdef fst.ReplaceLabelType cal = _get_replace_label_type(
* tostring(call_arc_labeling), epsilon_on_replace) # <<<<<<<<<<<<<<
* cdef fst.ReplaceLabelType ral = _get_replace_label_type(
* tostring(return_arc_labeling), epsilon_on_replace)
*/
- __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3843, __pyx_L1_error)
+ __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_call_arc_labeling, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3859, __pyx_L1_error)
- /* "pywrapfst.pyx":3842
+ /* "pywrapfst.pyx":3858
* for (label, ifst) in it:
* _pairs.push_back(fst.LabelFstClassPair(label, ifst._fst.get()))
* 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_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3842, __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, 3858, __pyx_L1_error)
__pyx_v_cal = __pyx_t_12;
- /* "pywrapfst.pyx":3845
+ /* "pywrapfst.pyx":3861
* tostring(call_arc_labeling), epsilon_on_replace)
* cdef fst.ReplaceLabelType ral = _get_replace_label_type(
* tostring(return_arc_labeling), epsilon_on_replace) # <<<<<<<<<<<<<<
* cdef unique_ptr[fst.ReplaceOptions] opts
* opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label))
*/
- __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3845, __pyx_L1_error)
+ __pyx_t_11 = __pyx_f_9pywrapfst_tostring(__pyx_v_return_arc_labeling, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3861, __pyx_L1_error)
- /* "pywrapfst.pyx":3844
+ /* "pywrapfst.pyx":3860
* cdef fst.ReplaceLabelType cal = _get_replace_label_type(
* tostring(call_arc_labeling), 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_12 = __pyx_f_9pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3844, __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, 3860, __pyx_L1_error)
__pyx_v_ral = __pyx_t_12;
- /* "pywrapfst.pyx":3847
+ /* "pywrapfst.pyx":3863
* tostring(return_arc_labeling), epsilon_on_replace)
* cdef unique_ptr[fst.ReplaceOptions] opts
* opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label)) # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::ReplaceOptions(__pyx_v_root_label, __pyx_v_cal, __pyx_v_ral, __pyx_v_return_label));
- /* "pywrapfst.pyx":3848
+ /* "pywrapfst.pyx":3864
* cdef unique_ptr[fst.ReplaceOptions] opts
* opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label))
* fst.Replace(_pairs, tfst, deref(opts)) # <<<<<<<<<<<<<<
*/
fst::script::Replace(__pyx_v__pairs, __pyx_v_tfst, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3849
+ /* "pywrapfst.pyx":3865
* opts.reset(new fst.ReplaceOptions(root_label, cal, ral, return_label))
* fst.Replace(_pairs, tfst, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3849, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3865, __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":3791
+ /* "pywrapfst.pyx":3807
*
*
* 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, 3791, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "replace") < 0)) __PYX_ERR(0, 3807, __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, 3794, __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, 3810, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3794
+ /* "pywrapfst.pyx":3810
* call_arc_labeling=b"input",
* return_arc_labeling=b"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_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3795, __pyx_L3_error)
+ __pyx_v_return_label = __Pyx_PyInt_As_int64_t(values[4]); if (unlikely((__pyx_v_return_label == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3811, __pyx_L3_error)
} else {
__pyx_v_return_label = ((__pyx_t_10basictypes_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, 3791, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3807, __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_42replace(__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":3791
+ /* "pywrapfst.pyx":3807
*
*
* 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, 3791, __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, 3807, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3852
+/* "pywrapfst.pyx":3868
*
*
* cpdef _MutableFst reverse(_Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3871
+ /* "pywrapfst.pyx":3887
* A reversed FST.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3871, __pyx_L1_error)
+ __PYX_ERR(0, 3887, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":3872
+ /* "pywrapfst.pyx":3888
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.Reverse(deref(ifst._fst), tfst, require_superinitial) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3872, __pyx_L1_error)
+ __PYX_ERR(0, 3888, __pyx_L1_error)
}
fst::script::Reverse((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_require_superinitial);
- /* "pywrapfst.pyx":3873
+ /* "pywrapfst.pyx":3889
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.Reverse(deref(ifst._fst), tfst, require_superinitial)
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3873, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3889, __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":3852
+ /* "pywrapfst.pyx":3868
*
*
* 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, 3852, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reverse") < 0)) __PYX_ERR(0, 3868, __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, 3852, __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, 3868, __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, 3852, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3868, __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, 3852, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3868, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_44reverse(__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, 3852, __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, 3868, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3876
+/* "pywrapfst.pyx":3892
*
*
* cpdef _MutableFst rmepsilon(_Fst ifst, # <<<<<<<<<<<<<<
static PyObject *__pyx_pw_9pywrapfst_47rmepsilon(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_9pywrapfst__MutableFst *__pyx_f_9pywrapfst_rmepsilon(struct __pyx_obj_9pywrapfst__Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_9pywrapfst_rmepsilon *__pyx_optional_args) {
- /* "pywrapfst.pyx":3877
+ /* "pywrapfst.pyx":3893
*
* cpdef _MutableFst rmepsilon(_Fst ifst,
* bool connect=True, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__52;
PyObject *__pyx_v_qt = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3881
+ /* "pywrapfst.pyx":3897
* int64 nstate=fst.kNoStateId,
* qt=b"auto",
* bool reverse=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_reverse = ((bool)0);
- /* "pywrapfst.pyx":3882
+ /* "pywrapfst.pyx":3898
* qt=b"auto",
* bool reverse=False,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3906
+ /* "pywrapfst.pyx":3922
* An equivalent FST with no epsilon transitions.
* """
* cdef fst.WeightClass wc = _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 '%s'", "weight_type");
- __PYX_ERR(0, 3906, __pyx_L1_error)
+ __PYX_ERR(0, 3922, __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, 3906, __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, 3922, __pyx_L1_error)
__pyx_v_wc = __pyx_t_1;
- /* "pywrapfst.pyx":3908
+ /* "pywrapfst.pyx":3924
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight)
* cdef unique_ptr[fst.RmEpsilonOptions] opts
* opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(qt)), delta, # <<<<<<<<<<<<<<
* connect, wc, nstate))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
*/
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3908, __pyx_L1_error)
- __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3908, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3924, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3924, __pyx_L1_error)
- /* "pywrapfst.pyx":3909
+ /* "pywrapfst.pyx":3925
* cdef unique_ptr[fst.RmEpsilonOptions] opts
* opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(qt)), delta,
* connect, wc, nstate)) # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::RmEpsilonOptions(__pyx_t_3, __pyx_v_delta, __pyx_v_connect, __pyx_v_wc, __pyx_v_nstate));
- /* "pywrapfst.pyx":3910
+ /* "pywrapfst.pyx":3926
* opts.reset(new fst.RmEpsilonOptions(_get_queue_type(tostring(qt)), delta,
* connect, wc, nstate))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 3910, __pyx_L1_error)
+ __PYX_ERR(0, 3926, __pyx_L1_error)
}
__pyx_v_tfst = 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":3927
* connect, wc, nstate))
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.RmEpsilon(deref(ifst._fst), tfst, reverse, deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 3911, __pyx_L1_error)
+ __PYX_ERR(0, 3927, __pyx_L1_error)
}
fst::script::RmEpsilon((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_reverse, (*__pyx_v_opts));
- /* "pywrapfst.pyx":3912
+ /* "pywrapfst.pyx":3928
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.RmEpsilon(deref(ifst._fst), tfst, reverse, deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3912, __pyx_L1_error)
+ __pyx_t_4 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3928, __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":3876
+ /* "pywrapfst.pyx":3892
*
*
* cpdef _MutableFst rmepsilon(_Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[7] = {0,0,0,0,0,0,0};
values[4] = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3882
+ /* "pywrapfst.pyx":3898
* qt=b"auto",
* bool reverse=False,
* weight=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 3876, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 3892, __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_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3877, __pyx_L3_error)
+ __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3893, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3877
+ /* "pywrapfst.pyx":3893
*
* cpdef _MutableFst rmepsilon(_Fst ifst,
* bool connect=True, # <<<<<<<<<<<<<<
__pyx_v_connect = ((bool)1);
}
if (values[2]) {
- __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3878, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3894, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__51;
}
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3879, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__52;
}
__pyx_v_qt = values[4];
if (values[5]) {
- __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3881, __pyx_L3_error)
+ __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3897, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3881
+ /* "pywrapfst.pyx":3897
* int64 nstate=fst.kNoStateId,
* qt=b"auto",
* bool reverse=False, # <<<<<<<<<<<<<<
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3876, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3892, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.rmepsilon", __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, 3876, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3892, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_46rmepsilon(__pyx_self, __pyx_v_ifst, __pyx_v_connect, __pyx_v_delta, __pyx_v_nstate, __pyx_v_qt, __pyx_v_reverse, __pyx_v_weight);
- /* "pywrapfst.pyx":3876
+ /* "pywrapfst.pyx":3892
*
*
* cpdef _MutableFst rmepsilon(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.qt = __pyx_v_qt;
__pyx_t_2.reverse = __pyx_v_reverse;
__pyx_t_2.weight = __pyx_v_weight;
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_rmepsilon(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3876, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_rmepsilon(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3892, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":3918
+/* "pywrapfst.pyx":3934
*
*
* cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__54;
PyObject *__pyx_v_qt = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3920
+ /* "pywrapfst.pyx":3936
* cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst,
* float delta=fst.kDelta, int64 nstate=fst.kNoStateId, qt=b"auto",
* bool reverse=False) except *: # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":3921
+ /* "pywrapfst.pyx":3937
* float delta=fst.kDelta, int64 nstate=fst.kNoStateId, qt=b"auto",
* bool reverse=False) except *:
* cdef vector[fst.WeightClass] *distance = new vector[fst.WeightClass]() # <<<<<<<<<<<<<<
__pyx_t_1 = new std::vector<fst::script::WeightClass> ();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 3921, __pyx_L1_error)
+ __PYX_ERR(0, 3937, __pyx_L1_error)
}
__pyx_v_distance = __pyx_t_1;
- /* "pywrapfst.pyx":3925
+ /* "pywrapfst.pyx":3941
* # not be used in all cases.
* cdef unique_ptr[fst.ShortestDistanceOptions] opts
* if reverse: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_reverse != 0);
if (__pyx_t_2) {
- /* "pywrapfst.pyx":3928
+ /* "pywrapfst.pyx":3944
* # Only the simpler signature supports shortest distance to final states;
* # `nstate` and `qt` 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 '%s'", "_fst");
- __PYX_ERR(0, 3928, __pyx_L1_error)
+ __PYX_ERR(0, 3944, __pyx_L1_error)
}
fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, 1, __pyx_v_delta);
- /* "pywrapfst.pyx":3925
+ /* "pywrapfst.pyx":3941
* # not be used in all cases.
* cdef unique_ptr[fst.ShortestDistanceOptions] opts
* if reverse: # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "pywrapfst.pyx":3930
+ /* "pywrapfst.pyx":3946
* fst.ShortestDistance(deref(ifst._fst), distance, True, delta)
* else:
* opts.reset(new fst.ShortestDistanceOptions( # <<<<<<<<<<<<<<
*/
/*else*/ {
- /* "pywrapfst.pyx":3931
+ /* "pywrapfst.pyx":3947
* else:
* opts.reset(new fst.ShortestDistanceOptions(
* _get_queue_type(tostring(qt)), fst.ANY_ARC_FILTER, nstate, delta)) # <<<<<<<<<<<<<<
* fst.ShortestDistance(deref(ifst._fst), distance, deref(opts))
* return distance
*/
- __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3931, __pyx_L1_error)
- __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3931, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3947, __pyx_L1_error)
+ __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3947, __pyx_L1_error)
- /* "pywrapfst.pyx":3930
+ /* "pywrapfst.pyx":3946
* fst.ShortestDistance(deref(ifst._fst), distance, True, delta)
* else:
* opts.reset(new fst.ShortestDistanceOptions( # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::ShortestDistanceOptions(__pyx_t_4, fst::script::ANY_ARC_FILTER, __pyx_v_nstate, __pyx_v_delta));
- /* "pywrapfst.pyx":3932
+ /* "pywrapfst.pyx":3948
* opts.reset(new fst.ShortestDistanceOptions(
* _get_queue_type(tostring(qt)), fst.ANY_ARC_FILTER, 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 '%s'", "_fst");
- __PYX_ERR(0, 3932, __pyx_L1_error)
+ __PYX_ERR(0, 3948, __pyx_L1_error)
}
fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, (*__pyx_v_opts));
}
__pyx_L3:;
- /* "pywrapfst.pyx":3933
+ /* "pywrapfst.pyx":3949
* _get_queue_type(tostring(qt)), fst.ANY_ARC_FILTER, nstate, delta))
* fst.ShortestDistance(deref(ifst._fst), distance, deref(opts))
* return distance # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_distance;
goto __pyx_L0;
- /* "pywrapfst.pyx":3918
+ /* "pywrapfst.pyx":3934
*
*
* cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3936
+/* "pywrapfst.pyx":3952
*
*
* 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, 3936, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 3952, __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, 3937, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3953, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__55;
}
if (values[2]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3938, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3954, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__56;
}
__pyx_v_qt = 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, 3940, __pyx_L3_error)
+ __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3956, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3940
+ /* "pywrapfst.pyx":3956
* int64 nstate=fst.kNoStateId,
* qt=b"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, 3936, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3952, __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, 3936, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3952, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_48shortestdistance(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_qt, __pyx_v_reverse);
- /* "pywrapfst.pyx":3936
+ /* "pywrapfst.pyx":3952
*
*
* def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
int __pyx_t_7;
__Pyx_RefNannySetupContext("shortestdistance", 0);
- /* "pywrapfst.pyx":3968
+ /* "pywrapfst.pyx":3984
* """
* cdef unique_ptr[vector[fst.WeightClass]] distance
* distance.reset(_shortestdistance(ifst, delta, nstate, qt, reverse)) # <<<<<<<<<<<<<<
__pyx_t_2.nstate = __pyx_v_nstate;
__pyx_t_2.qt = __pyx_v_qt;
__pyx_t_2.reverse = __pyx_v_reverse;
- __pyx_t_1 = __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3968, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst__shortestdistance(__pyx_v_ifst, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3984, __pyx_L1_error)
__pyx_v_distance.reset(__pyx_t_1);
- /* "pywrapfst.pyx":3970
+ /* "pywrapfst.pyx":3986
* distance.reset(_shortestdistance(ifst, delta, nstate, qt, reverse))
* # Packs the distances, as strings, into a Python list.
* cdef string weight_type = ifst.weight_type() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "weight_type");
- __PYX_ERR(0, 3970, __pyx_L1_error)
+ __PYX_ERR(0, 3986, __pyx_L1_error)
}
__pyx_v_weight_type = ((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0);
- /* "pywrapfst.pyx":3971
+ /* "pywrapfst.pyx":3987
* # Packs the distances, as strings, into a Python list.
* cdef string weight_type = ifst.weight_type()
* result = [] # <<<<<<<<<<<<<<
* # This is just the Cython version of the normal vector iteration idiom.
* cdef vector[fst.WeightClass].iterator it = distance.get().begin()
*/
- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3971, __pyx_L1_error)
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3987, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
- /* "pywrapfst.pyx":3973
+ /* "pywrapfst.pyx":3989
* result = []
* # This is just the Cython version of the normal vector iteration idiom.
* cdef vector[fst.WeightClass].iterator it = distance.get().begin() # <<<<<<<<<<<<<<
*/
__pyx_v_it = __pyx_v_distance.get()->begin();
- /* "pywrapfst.pyx":3974
+ /* "pywrapfst.pyx":3990
* # This is just the Cython version of the normal vector iteration idiom.
* cdef vector[fst.WeightClass].iterator it = distance.get().begin()
* while it != distance.get().end(): # <<<<<<<<<<<<<<
__pyx_t_4 = ((__pyx_v_it != __pyx_v_distance.get()->end()) != 0);
if (!__pyx_t_4) break;
- /* "pywrapfst.pyx":3975
+ /* "pywrapfst.pyx":3991
* cdef vector[fst.WeightClass].iterator it = distance.get().begin()
* while it != distance.get().end():
* result.append(Weight(weight_type, deref(it).ToString())) # <<<<<<<<<<<<<<
* inc(it)
* return result
*/
- __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_weight_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_weight_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((*__pyx_v_it).ToString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string((*__pyx_v_it).ToString()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_5 = 0;
- __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_9pywrapfst_Weight), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3991, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3975, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 3991, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "pywrapfst.pyx":3976
+ /* "pywrapfst.pyx":3992
* while it != distance.get().end():
* result.append(Weight(weight_type, deref(it).ToString()))
* inc(it) # <<<<<<<<<<<<<<
(++__pyx_v_it);
}
- /* "pywrapfst.pyx":3977
+ /* "pywrapfst.pyx":3993
* result.append(Weight(weight_type, deref(it).ToString()))
* inc(it)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "pywrapfst.pyx":3936
+ /* "pywrapfst.pyx":3952
*
*
* def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":3980
+/* "pywrapfst.pyx":3996
*
*
* cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_10basictypes_int64 __pyx_v_nstate = __pyx_k__58;
PyObject *__pyx_v_qt = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3985
+ /* "pywrapfst.pyx":4001
* int64 nstate=fst.kNoStateId,
* qt=b"auto",
* bool unique=False, # <<<<<<<<<<<<<<
*/
bool __pyx_v_unique = ((bool)0);
- /* "pywrapfst.pyx":3986
+ /* "pywrapfst.pyx":4002
* qt=b"auto",
* bool unique=False,
* weight=None): # <<<<<<<<<<<<<<
}
}
- /* "pywrapfst.pyx":4017
+ /* "pywrapfst.pyx":4033
* An FST containing the n-shortest paths.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 4017, __pyx_L1_error)
+ __PYX_ERR(0, 4033, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":4019
+ /* "pywrapfst.pyx":4035
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* cdef unique_ptr[vector[fst.WeightClass]] distance
* distance.reset(new vector[fst.WeightClass]()) # <<<<<<<<<<<<<<
__pyx_t_1 = new std::vector<fst::script::WeightClass> ();
} catch(...) {
__Pyx_CppExn2PyErr();
- __PYX_ERR(0, 4019, __pyx_L1_error)
+ __PYX_ERR(0, 4035, __pyx_L1_error)
}
__pyx_v_distance.reset(__pyx_t_1);
- /* "pywrapfst.pyx":4021
+ /* "pywrapfst.pyx":4037
* distance.reset(new vector[fst.WeightClass]())
* # Threshold is set to semiring Zero (no pruning) if no weight is specified.
* cdef fst.WeightClass wc = _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 '%s'", "weight_type");
- __PYX_ERR(0, 4021, __pyx_L1_error)
+ __PYX_ERR(0, 4037, __pyx_L1_error)
}
- __pyx_t_2 = __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, 4021, __pyx_L1_error)
+ __pyx_t_2 = __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, 4037, __pyx_L1_error)
__pyx_v_wc = __pyx_t_2;
- /* "pywrapfst.pyx":4023
+ /* "pywrapfst.pyx":4039
* cdef fst.WeightClass wc = _get_WeightClass_or_Zero(ifst.weight_type(), weight)
* cdef unique_ptr[fst.ShortestPathOptions] opts
* opts.reset(new fst.ShortestPathOptions(_get_queue_type(tostring(qt)), # <<<<<<<<<<<<<<
* nshortest, unique, False, delta,
* False, wc, nstate))
*/
- __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L1_error)
- __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L1_error)
+ __pyx_t_3 = __pyx_f_9pywrapfst_tostring(__pyx_v_qt, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4039, __pyx_L1_error)
+ __pyx_t_4 = __pyx_f_9pywrapfst__get_queue_type(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4039, __pyx_L1_error)
- /* "pywrapfst.pyx":4025
+ /* "pywrapfst.pyx":4041
* opts.reset(new fst.ShortestPathOptions(_get_queue_type(tostring(qt)),
* nshortest, unique, False, delta,
* False, wc, nstate)) # <<<<<<<<<<<<<<
*/
__pyx_v_opts.reset(new fst::script::ShortestPathOptions(__pyx_t_4, __pyx_v_nshortest, __pyx_v_unique, 0, __pyx_v_delta, 0, __pyx_v_wc, __pyx_v_nstate));
- /* "pywrapfst.pyx":4026
+ /* "pywrapfst.pyx":4042
* nshortest, unique, False, delta,
* False, wc, nstate))
* fst.ShortestPath(deref(ifst._fst), tfst, distance.get(), deref(opts)) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 4026, __pyx_L1_error)
+ __PYX_ERR(0, 4042, __pyx_L1_error)
}
fst::script::ShortestPath((*__pyx_v_ifst->_fst), __pyx_v_tfst, __pyx_v_distance.get(), (*__pyx_v_opts));
- /* "pywrapfst.pyx":4027
+ /* "pywrapfst.pyx":4043
* False, wc, nstate))
* fst.ShortestPath(deref(ifst._fst), tfst, distance.get(), deref(opts))
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_5 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4027, __pyx_L1_error)
+ __pyx_t_5 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4043, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_5);
__pyx_t_5 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":3980
+ /* "pywrapfst.pyx":3996
*
*
* cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<<
PyObject* values[7] = {0,0,0,0,0,0,0};
values[4] = ((PyObject *)__pyx_n_b_auto);
- /* "pywrapfst.pyx":3986
+ /* "pywrapfst.pyx":4002
* qt=b"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, 3980, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortestpath") < 0)) __PYX_ERR(0, 3996, __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, 3981, __pyx_L3_error)
+ __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3997, __pyx_L3_error)
} else {
__pyx_v_delta = __pyx_k__57;
}
if (values[2]) {
- __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3982, __pyx_L3_error)
+ __pyx_v_nshortest = __Pyx_PyInt_As_int32_t(values[2]); if (unlikely((__pyx_v_nshortest == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3998, __pyx_L3_error)
} else {
__pyx_v_nshortest = ((__pyx_t_10basictypes_int32)1);
}
if (values[3]) {
- __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3983, __pyx_L3_error)
+ __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3999, __pyx_L3_error)
} else {
__pyx_v_nstate = __pyx_k__58;
}
__pyx_v_qt = 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, 3985, __pyx_L3_error)
+ __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4001, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":3985
+ /* "pywrapfst.pyx":4001
* int64 nstate=fst.kNoStateId,
* qt=b"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, 3980, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3996, __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, 3980, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 3996, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_50shortestpath(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nshortest, __pyx_v_nstate, __pyx_v_qt, __pyx_v_unique, __pyx_v_weight);
- /* "pywrapfst.pyx":3980
+ /* "pywrapfst.pyx":3996
*
*
* cpdef _MutableFst shortestpath(_Fst ifst, # <<<<<<<<<<<<<<
__pyx_t_2.qt = __pyx_v_qt;
__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, 3980, __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, 3996, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4030
+/* "pywrapfst.pyx":4046
*
*
* cpdef _Fst statemap(_Fst ifst, mt): # <<<<<<<<<<<<<<
struct __pyx_opt_args_9pywrapfst__map __pyx_t_2;
__Pyx_RefNannySetupContext("statemap", 0);
- /* "pywrapfst.pyx":4053
+ /* "pywrapfst.pyx":4069
* See also: `arcmap`.
* """
* return _map(ifst, fst.kDelta, mt, None) # <<<<<<<<<<<<<<
__pyx_t_2.delta = fst::kDelta;
__pyx_t_2.mt = __pyx_v_mt;
__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, 4053, __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, 4069, __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":4030
+ /* "pywrapfst.pyx":4046
*
*
* cpdef _Fst statemap(_Fst ifst, mt): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mt)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4030, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4046, __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, 4030, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "statemap") < 0)) __PYX_ERR(0, 4046, __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, 4030, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4046, __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, 4030, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4046, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_52statemap(__pyx_self, __pyx_v_ifst, __pyx_v_mt);
/* function exit code */
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("statemap", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_mt, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_statemap(__pyx_v_ifst, __pyx_v_mt, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4046, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4056
+/* "pywrapfst.pyx":4072
*
*
* cpdef _MutableFst synchronize(_Fst ifst): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("synchronize", 0);
- /* "pywrapfst.pyx":4075
+ /* "pywrapfst.pyx":4091
* An equivalent synchronized FST.
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "arc_type");
- __PYX_ERR(0, 4075, __pyx_L1_error)
+ __PYX_ERR(0, 4091, __pyx_L1_error)
}
__pyx_v_tfst = new fst::script::VectorFstClass(((struct __pyx_vtabstruct_9pywrapfst__Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0));
- /* "pywrapfst.pyx":4076
+ /* "pywrapfst.pyx":4092
* """
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.Synchronize(deref(ifst._fst), tfst) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 4076, __pyx_L1_error)
+ __PYX_ERR(0, 4092, __pyx_L1_error)
}
fst::script::Synchronize((*__pyx_v_ifst->_fst), __pyx_v_tfst);
- /* "pywrapfst.pyx":4077
+ /* "pywrapfst.pyx":4093
* cdef VectorFstClass_ptr tfst = new fst.VectorFstClass(ifst.arc_type())
* fst.Synchronize(deref(ifst._fst), tfst)
* return _init_MutableFst(tfst) # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4077, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_MutableFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __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":4056
+ /* "pywrapfst.pyx":4072
*
*
* 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, 4056, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4072, __pyx_L1_error)
__pyx_r = __pyx_pf_9pywrapfst_54synchronize(__pyx_self, ((struct __pyx_obj_9pywrapfst__Fst *)__pyx_v_ifst));
/* function exit code */
PyObject *__pyx_t_1 = NULL;
__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, 4056, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4072, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4134
+/* "pywrapfst.pyx":4150
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fst_type,&__pyx_n_s_arc_type,&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_keep_isymbols,&__pyx_n_s_keep_osymbols,&__pyx_n_s_keep_state_numbering,&__pyx_n_s_allow_negative_labels,0};
PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
- /* "pywrapfst.pyx":4137
+ /* "pywrapfst.pyx":4153
* string fst_type=b"vector",
* string arc_type=b"standard",
* SymbolTable isymbols=None, # <<<<<<<<<<<<<<
*/
values[2] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None);
- /* "pywrapfst.pyx":4138
+ /* "pywrapfst.pyx":4154
* string arc_type=b"standard",
* SymbolTable isymbols=None,
* SymbolTable osymbols=None, # <<<<<<<<<<<<<<
*/
values[3] = (PyObject *)((struct __pyx_obj_9pywrapfst_SymbolTable *)Py_None);
- /* "pywrapfst.pyx":4139
+ /* "pywrapfst.pyx":4155
* 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, 4134, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4150, __pyx_L3_error)
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
}
if (values[0]) {
- __pyx_v_fst_type = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4135, __pyx_L3_error)
+ __pyx_v_fst_type = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4151, __pyx_L3_error)
} else {
__pyx_v_fst_type = __pyx_k__59;
}
if (values[1]) {
- __pyx_v_arc_type = __pyx_convert_string_from_py_std__in_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4136, __pyx_L3_error)
+ __pyx_v_arc_type = __pyx_convert_string_from_py_std__in_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4152, __pyx_L3_error)
} else {
__pyx_v_arc_type = __pyx_k__60;
}
__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, 4140, __pyx_L3_error)
+ __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4156, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4140
+ /* "pywrapfst.pyx":4156
* 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, 4141, __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, 4157, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4141
+ /* "pywrapfst.pyx":4157
* 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, 4142, __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, 4158, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4142
+ /* "pywrapfst.pyx":4158
* 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, 4143, __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, 4159, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4143
+ /* "pywrapfst.pyx":4159
* 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, 4144, __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, 4160, __pyx_L3_error)
} else {
- /* "pywrapfst.pyx":4144
+ /* "pywrapfst.pyx":4160
* 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, 4134, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4150, __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_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4137, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4138, __pyx_L1_error)
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4139, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4153, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4154, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_9pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4155, __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":4134
+ /* "pywrapfst.pyx":4150
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
fst::SymbolTable *__pyx_t_5;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "pywrapfst.pyx":4145
+ /* "pywrapfst.pyx":4161
* 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 '%s'", "_sstrm");
- __PYX_ERR(0, 4145, __pyx_L1_error)
+ __PYX_ERR(0, 4161, __pyx_L1_error)
}
__pyx_v_self->_sstrm.reset(new std::stringstream());
- /* "pywrapfst.pyx":4146
+ /* "pywrapfst.pyx":4162
* 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_convert_PyBytes_string_to_py_std__in_string(__pyx_v_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4146, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4162, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4146, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4162, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst_type");
- __PYX_ERR(0, 4146, __pyx_L1_error)
+ __PYX_ERR(0, 4162, __pyx_L1_error)
}
__pyx_v_self->_fst_type = __pyx_t_2;
- /* "pywrapfst.pyx":4147
+ /* "pywrapfst.pyx":4163
* 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_convert_PyBytes_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4147, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4163, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4147, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_t_1, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4163, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc_type");
- __PYX_ERR(0, 4147, __pyx_L1_error)
+ __PYX_ERR(0, 4163, __pyx_L1_error)
}
__pyx_v_self->_arc_type = __pyx_t_2;
- /* "pywrapfst.pyx":4148
+ /* "pywrapfst.pyx":4164
* 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 '%s'", "_isymbols");
- __PYX_ERR(0, 4148, __pyx_L1_error)
+ __PYX_ERR(0, 4164, __pyx_L1_error)
}
__pyx_v_self->_isymbols = NULL;
- /* "pywrapfst.pyx":4149
+ /* "pywrapfst.pyx":4165
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL
* if isymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
- /* "pywrapfst.pyx":4150
+ /* "pywrapfst.pyx":4166
* self._isymbols = NULL
* if isymbols is not None:
* self._isymbols = isymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 4150, __pyx_L1_error)
+ __PYX_ERR(0, 4166, __pyx_L1_error)
}
__pyx_t_5 = __pyx_v_isymbols->__pyx_base.__pyx_base._table;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_isymbols");
- __PYX_ERR(0, 4150, __pyx_L1_error)
+ __PYX_ERR(0, 4166, __pyx_L1_error)
}
__pyx_v_self->_isymbols = __pyx_t_5;
- /* "pywrapfst.pyx":4149
+ /* "pywrapfst.pyx":4165
* self._arc_type = tostring(arc_type)
* self._isymbols = NULL
* if isymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4151
+ /* "pywrapfst.pyx":4167
* if isymbols is not None:
* self._isymbols = isymbols._table
* self._osymbols = NULL # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_osymbols");
- __PYX_ERR(0, 4151, __pyx_L1_error)
+ __PYX_ERR(0, 4167, __pyx_L1_error)
}
__pyx_v_self->_osymbols = NULL;
- /* "pywrapfst.pyx":4152
+ /* "pywrapfst.pyx":4168
* self._isymbols = isymbols._table
* self._osymbols = NULL
* if osymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_4 != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":4153
+ /* "pywrapfst.pyx":4169
* self._osymbols = NULL
* if osymbols is not None:
* self._osymbols = osymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 4153, __pyx_L1_error)
+ __PYX_ERR(0, 4169, __pyx_L1_error)
}
__pyx_t_5 = __pyx_v_osymbols->__pyx_base.__pyx_base._table;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_osymbols");
- __PYX_ERR(0, 4153, __pyx_L1_error)
+ __PYX_ERR(0, 4169, __pyx_L1_error)
}
__pyx_v_self->_osymbols = __pyx_t_5;
- /* "pywrapfst.pyx":4152
+ /* "pywrapfst.pyx":4168
* self._isymbols = isymbols._table
* self._osymbols = NULL
* if osymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4154
+ /* "pywrapfst.pyx":4170
* if osymbols is not None:
* self._osymbols = osymbols._table
* self._ssymbols = NULL # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_ssymbols");
- __PYX_ERR(0, 4154, __pyx_L1_error)
+ __PYX_ERR(0, 4170, __pyx_L1_error)
}
__pyx_v_self->_ssymbols = NULL;
- /* "pywrapfst.pyx":4155
+ /* "pywrapfst.pyx":4171
* self._osymbols = osymbols._table
* self._ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
- /* "pywrapfst.pyx":4156
+ /* "pywrapfst.pyx":4172
* self._ssymbols = NULL
* if ssymbols is not None:
* self._ssymbols = ssymbols._table # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_table");
- __PYX_ERR(0, 4156, __pyx_L1_error)
+ __PYX_ERR(0, 4172, __pyx_L1_error)
}
__pyx_t_5 = __pyx_v_ssymbols->__pyx_base.__pyx_base._table;
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_ssymbols");
- __PYX_ERR(0, 4156, __pyx_L1_error)
+ __PYX_ERR(0, 4172, __pyx_L1_error)
}
__pyx_v_self->_ssymbols = __pyx_t_5;
- /* "pywrapfst.pyx":4155
+ /* "pywrapfst.pyx":4171
* self._osymbols = osymbols._table
* self._ssymbols = NULL
* if ssymbols is not None: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4157
+ /* "pywrapfst.pyx":4173
* if ssymbols is not None:
* self._ssymbols = ssymbols._table
* self._acceptor = acceptor # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_acceptor");
- __PYX_ERR(0, 4157, __pyx_L1_error)
+ __PYX_ERR(0, 4173, __pyx_L1_error)
}
__pyx_v_self->_acceptor = __pyx_v_acceptor;
- /* "pywrapfst.pyx":4158
+ /* "pywrapfst.pyx":4174
* self._ssymbols = ssymbols._table
* 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 '%s'", "_keep_isymbols");
- __PYX_ERR(0, 4158, __pyx_L1_error)
+ __PYX_ERR(0, 4174, __pyx_L1_error)
}
__pyx_v_self->_keep_isymbols = __pyx_v_keep_isymbols;
- /* "pywrapfst.pyx":4159
+ /* "pywrapfst.pyx":4175
* 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 '%s'", "_keep_osymbols");
- __PYX_ERR(0, 4159, __pyx_L1_error)
+ __PYX_ERR(0, 4175, __pyx_L1_error)
}
__pyx_v_self->_keep_osymbols = __pyx_v_keep_osymbols;
- /* "pywrapfst.pyx":4160
+ /* "pywrapfst.pyx":4176
* 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 '%s'", "_keep_state_numbering");
- __PYX_ERR(0, 4160, __pyx_L1_error)
+ __PYX_ERR(0, 4176, __pyx_L1_error)
}
__pyx_v_self->_keep_state_numbering = __pyx_v_keep_state_numbering;
- /* "pywrapfst.pyx":4161
+ /* "pywrapfst.pyx":4177
* 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 '%s'", "_allow_negative_labels");
- __PYX_ERR(0, 4161, __pyx_L1_error)
+ __PYX_ERR(0, 4177, __pyx_L1_error)
}
__pyx_v_self->_allow_negative_labels = __pyx_v_allow_negative_labels;
- /* "pywrapfst.pyx":4134
+ /* "pywrapfst.pyx":4150
* """
*
* def __cinit__(self, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4163
+/* "pywrapfst.pyx":4179
* self._allow_negative_labels = allow_negative_labels
*
* cpdef _Fst compile(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4163, __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, 4179, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_8Compiler_3compile)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4163, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4179, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4163, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4179, __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, 4163, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4179, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4177
+ /* "pywrapfst.pyx":4193
* FstOpError: Compilation failed.
* """
* cdef fst.FstClass *tfst = fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_sstrm");
- __PYX_ERR(0, 4177, __pyx_L1_error)
+ __PYX_ERR(0, 4193, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4178
+ /* "pywrapfst.pyx":4194
* """
* cdef fst.FstClass *tfst = fst.CompileFstInternal(deref(self._sstrm),
* "<pywrapfst>", self._fst_type, self._arc_type, self._isymbols, # <<<<<<<<<<<<<<
* self._osymbols, self._ssymbols, self._acceptor, self._keep_isymbols,
* self._keep_osymbols, self._keep_state_numbering,
*/
- __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_pywrapfst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4178, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_pywrapfst); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4194, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst_type");
- __PYX_ERR(0, 4178, __pyx_L1_error)
+ __PYX_ERR(0, 4194, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_arc_type");
- __PYX_ERR(0, 4178, __pyx_L1_error)
+ __PYX_ERR(0, 4194, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_isymbols");
- __PYX_ERR(0, 4178, __pyx_L1_error)
+ __PYX_ERR(0, 4194, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4179
+ /* "pywrapfst.pyx":4195
* cdef fst.FstClass *tfst = fst.CompileFstInternal(deref(self._sstrm),
* "<pywrapfst>", self._fst_type, self._arc_type, 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 '%s'", "_osymbols");
- __PYX_ERR(0, 4179, __pyx_L1_error)
+ __PYX_ERR(0, 4195, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_ssymbols");
- __PYX_ERR(0, 4179, __pyx_L1_error)
+ __PYX_ERR(0, 4195, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_acceptor");
- __PYX_ERR(0, 4179, __pyx_L1_error)
+ __PYX_ERR(0, 4195, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_keep_isymbols");
- __PYX_ERR(0, 4179, __pyx_L1_error)
+ __PYX_ERR(0, 4195, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4180
+ /* "pywrapfst.pyx":4196
* "<pywrapfst>", self._fst_type, self._arc_type, self._isymbols,
* self._osymbols, 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 '%s'", "_keep_osymbols");
- __PYX_ERR(0, 4180, __pyx_L1_error)
+ __PYX_ERR(0, 4196, __pyx_L1_error)
}
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_keep_state_numbering");
- __PYX_ERR(0, 4180, __pyx_L1_error)
+ __PYX_ERR(0, 4196, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4181
+ /* "pywrapfst.pyx":4197
* self._osymbols, self._ssymbols, 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 '%s'", "_allow_negative_labels");
- __PYX_ERR(0, 4181, __pyx_L1_error)
+ __PYX_ERR(0, 4197, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4177
+ /* "pywrapfst.pyx":4193
* FstOpError: Compilation failed.
* """
* cdef fst.FstClass *tfst = fst.CompileFstInternal(deref(self._sstrm), # <<<<<<<<<<<<<<
*/
__pyx_v_tfst = fst::script::CompileFstInternal((*__pyx_v_self->_sstrm), __pyx_t_5, __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":4182
+ /* "pywrapfst.pyx":4198
* 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 '%s'", "_sstrm");
- __PYX_ERR(0, 4182, __pyx_L1_error)
+ __PYX_ERR(0, 4198, __pyx_L1_error)
}
__pyx_v_self->_sstrm.reset(new std::stringstream());
- /* "pywrapfst.pyx":4183
+ /* "pywrapfst.pyx":4199
* self._allow_negative_labels)
* self._sstrm.reset(new stringstream())
* if tfst == NULL: # <<<<<<<<<<<<<<
__pyx_t_6 = ((__pyx_v_tfst == NULL) != 0);
if (__pyx_t_6) {
- /* "pywrapfst.pyx":4184
+ /* "pywrapfst.pyx":4200
* self._sstrm.reset(new stringstream())
* if tfst == NULL:
* raise FstOpError("Compilation failed") # <<<<<<<<<<<<<<
* return _init_XFst(tfst)
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4184, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4184, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 4184, __pyx_L1_error)
+ __PYX_ERR(0, 4200, __pyx_L1_error)
- /* "pywrapfst.pyx":4183
+ /* "pywrapfst.pyx":4199
* self._allow_negative_labels)
* self._sstrm.reset(new stringstream())
* if tfst == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4185
+ /* "pywrapfst.pyx":4201
* if tfst == NULL:
* raise FstOpError("Compilation failed")
* return _init_XFst(tfst) # <<<<<<<<<<<<<<
* cpdef void write(self, expression):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4185, __pyx_L1_error)
+ __pyx_t_2 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4201, __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":4163
+ /* "pywrapfst.pyx":4179
* self._allow_negative_labels = allow_negative_labels
*
* cpdef _Fst compile(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4163, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4187
+/* "pywrapfst.pyx":4203
* return _init_XFst(tfst)
*
* cpdef void write(self, expression): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4187, __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, 4203, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_8Compiler_5write)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (!__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4187, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4203, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_expression};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4187, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4203, __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[2] = {__pyx_t_4, __pyx_v_expression};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4187, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4203, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4187, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4203, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_expression);
__Pyx_GIVEREF(__pyx_v_expression);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_expression);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4187, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4203, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4203
+ /* "pywrapfst.pyx":4219
* expression: A string expression to add to compiler string buffer.
* """
* deref(self._sstrm) << tostring(expression) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_sstrm");
- __PYX_ERR(0, 4203, __pyx_L1_error)
+ __PYX_ERR(0, 4219, __pyx_L1_error)
}
- __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4203, __pyx_L1_error)
+ __pyx_t_6 = __pyx_f_9pywrapfst_tostring(__pyx_v_expression, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4219, __pyx_L1_error)
((*__pyx_v_self->_sstrm) << __pyx_t_6);
- /* "pywrapfst.pyx":4187
+ /* "pywrapfst.pyx":4203
* return _init_XFst(tfst)
*
* cpdef void write(self, expression): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4187, __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, 4203, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4228
+/* "pywrapfst.pyx":4244
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":4229
+ /* "pywrapfst.pyx":4245
*
* def __init__(self):
* raise FstDeletedConstructorError( # <<<<<<<<<<<<<<
* "Cannot construct {}".format(self.__class__.__name__))
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":4230
+ /* "pywrapfst.pyx":4246
* def __init__(self):
* raise FstDeletedConstructorError(
* "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<<
*
* def __repr__(self):
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4230, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4246, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
}
}
if (!__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4229, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__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, 4229, __pyx_L1_error)
+ __PYX_ERR(0, 4245, __pyx_L1_error)
- /* "pywrapfst.pyx":4228
+ /* "pywrapfst.pyx":4244
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4232
+/* "pywrapfst.pyx":4248
* "Cannot construct {}".format(self.__class__.__name__))
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":4233
+ /* "pywrapfst.pyx":4249
*
* def __repr__(self):
* return "<{} FarReader at 0x{:x}>".format(self.far_type(), id(self)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FarReader_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FarReader_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4249, __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 '%s'", "far_type");
- __PYX_ERR(0, 4233, __pyx_L1_error)
+ __PYX_ERR(0, 4249, __pyx_L1_error)
}
- __pyx_t_3 = __pyx_convert_PyBytes_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_3)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_PyBytes_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_3)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__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, 4233, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
if (__pyx_t_4) {
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_5 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4233, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4249, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4232
+ /* "pywrapfst.pyx":4248
* "Cannot construct {}".format(self.__class__.__name__))
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4236
+/* "pywrapfst.pyx":4252
*
* @classmethod
* def open(cls, *filenames): # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("open", 0);
__Pyx_INCREF(__pyx_v_filenames);
- /* "pywrapfst.pyx":4254
+ /* "pywrapfst.pyx":4270
* FstIOError: Read failed.
* """
* filenames = [tostring(filename) for filename in filenames] # <<<<<<<<<<<<<<
* cdef fst.FarReaderClass *tfar = fst.FarReaderClass.Open(filenames)
* if tfar == NULL:
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4254, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4270, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __pyx_v_filenames; __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, 4254, __pyx_L1_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, 4270, __pyx_L1_error)
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4254, __pyx_L1_error)
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4270, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
#endif
__Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4254, __pyx_L1_error)
- __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4254, __pyx_L1_error)
+ __pyx_t_5 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4270, __pyx_L1_error)
+ __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4270, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4254, __pyx_L1_error)
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 4270, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_filenames, __pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":4255
+ /* "pywrapfst.pyx":4271
* """
* filenames = [tostring(filename) for filename in filenames]
* cdef fst.FarReaderClass *tfar = fst.FarReaderClass.Open(filenames) # <<<<<<<<<<<<<<
* if tfar == NULL:
* raise FstIOError("Read failed: {!r}".format(filenames))
*/
- __pyx_t_6 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_filenames); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4255, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_v_filenames); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4271, __pyx_L1_error)
__pyx_v_tfar = fst::script::FarReaderClass::Open(__pyx_t_6);
- /* "pywrapfst.pyx":4256
+ /* "pywrapfst.pyx":4272
* filenames = [tostring(filename) for filename in filenames]
* cdef fst.FarReaderClass *tfar = fst.FarReaderClass.Open(filenames)
* if tfar == NULL: # <<<<<<<<<<<<<<
__pyx_t_7 = ((__pyx_v_tfar == NULL) != 0);
if (__pyx_t_7) {
- /* "pywrapfst.pyx":4257
+ /* "pywrapfst.pyx":4273
* cdef fst.FarReaderClass *tfar = fst.FarReaderClass.Open(filenames)
* if tfar == NULL:
* raise FstIOError("Read failed: {!r}".format(filenames)) # <<<<<<<<<<<<<<
* cdef FarReader result = FarReader.__new__(FarReader)
* result._reader.reset(tfar)
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Read_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_9 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
}
}
if (!__pyx_t_9) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_filenames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_filenames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_8)) {
PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_filenames};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_filenames};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else
#endif
{
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
__Pyx_INCREF(__pyx_v_filenames);
__Pyx_GIVEREF(__pyx_v_filenames);
PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_filenames);
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
}
}
if (!__pyx_t_8) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else
#endif
{
- __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4257, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4273, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
}
__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, 4257, __pyx_L1_error)
+ __PYX_ERR(0, 4273, __pyx_L1_error)
- /* "pywrapfst.pyx":4256
+ /* "pywrapfst.pyx":4272
* filenames = [tostring(filename) for filename in filenames]
* cdef fst.FarReaderClass *tfar = fst.FarReaderClass.Open(filenames)
* if tfar == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4258
+ /* "pywrapfst.pyx":4274
* if tfar == NULL:
* raise FstIOError("Read failed: {!r}".format(filenames))
* cdef FarReader result = FarReader.__new__(FarReader) # <<<<<<<<<<<<<<
* result._reader.reset(tfar)
* return result
*/
- __pyx_t_1 = __pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4258, __pyx_L1_error)
+ __pyx_t_1 = __pyx_tp_new_9pywrapfst_FarReader(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarReader), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4274, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_FarReader)))) __PYX_ERR(0, 4258, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_9pywrapfst_FarReader)))) __PYX_ERR(0, 4274, __pyx_L1_error)
__pyx_v_result = ((struct __pyx_obj_9pywrapfst_FarReader *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "pywrapfst.pyx":4259
+ /* "pywrapfst.pyx":4275
* raise FstIOError("Read failed: {!r}".format(filenames))
* cdef FarReader result = FarReader.__new__(FarReader)
* result._reader.reset(tfar) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reader");
- __PYX_ERR(0, 4259, __pyx_L1_error)
+ __PYX_ERR(0, 4275, __pyx_L1_error)
}
__pyx_v_result->_reader.reset(__pyx_v_tfar);
- /* "pywrapfst.pyx":4260
+ /* "pywrapfst.pyx":4276
* cdef FarReader result = FarReader.__new__(FarReader)
* result._reader.reset(tfar)
* return result # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_result);
goto __pyx_L0;
- /* "pywrapfst.pyx":4236
+ /* "pywrapfst.pyx":4252
*
* @classmethod
* def open(cls, *filenames): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4263
+/* "pywrapfst.pyx":4279
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iter__", 0);
- /* "pywrapfst.pyx":4264
+ /* "pywrapfst.pyx":4280
* # 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":4263
+ /* "pywrapfst.pyx":4279
*
* # This just registers this class as a possible iterator.
* def __iter__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4267
+/* "pywrapfst.pyx":4283
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__next__", 0);
- /* "pywrapfst.pyx":4268
+ /* "pywrapfst.pyx":4284
* # 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 '%s'", "done");
- __PYX_ERR(0, 4268, __pyx_L1_error)
+ __PYX_ERR(0, 4284, __pyx_L1_error)
}
__pyx_t_1 = (((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":4269
+ /* "pywrapfst.pyx":4285
* def __next__(self):
* if self.done():
* raise StopIteration # <<<<<<<<<<<<<<
* cdef _MutableFst f = self.get_fst()
*/
__Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
- __PYX_ERR(0, 4269, __pyx_L1_error)
+ __PYX_ERR(0, 4285, __pyx_L1_error)
- /* "pywrapfst.pyx":4268
+ /* "pywrapfst.pyx":4284
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self):
* if self.done(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4270
+ /* "pywrapfst.pyx":4286
* if self.done():
* raise StopIteration
* cdef string k = self.get_key() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get_key");
- __PYX_ERR(0, 4270, __pyx_L1_error)
+ __PYX_ERR(0, 4286, __pyx_L1_error)
}
__pyx_v_k = ((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->get_key(__pyx_v_self, 0);
- /* "pywrapfst.pyx":4271
+ /* "pywrapfst.pyx":4287
* raise StopIteration
* cdef string k = self.get_key()
* cdef _MutableFst f = self.get_fst() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get_fst");
- __PYX_ERR(0, 4271, __pyx_L1_error)
+ __PYX_ERR(0, 4287, __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, 4271, __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, 4287, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__MutableFst))))) __PYX_ERR(0, 4271, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__MutableFst))))) __PYX_ERR(0, 4287, __pyx_L1_error)
__pyx_v_f = ((struct __pyx_obj_9pywrapfst__MutableFst *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "pywrapfst.pyx":4272
+ /* "pywrapfst.pyx":4288
* cdef string k = self.get_key()
* cdef _MutableFst f = self.get_fst()
* self.next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "next");
- __PYX_ERR(0, 4272, __pyx_L1_error)
+ __PYX_ERR(0, 4288, __pyx_L1_error)
}
((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0);
- /* "pywrapfst.pyx":4273
+ /* "pywrapfst.pyx":4289
* cdef _MutableFst f = self.get_fst()
* self.next()
* return (k, f) # <<<<<<<<<<<<<<
* cpdef string arc_type(self):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_k); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4273, __pyx_L1_error)
+ __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_k); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4289, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4273, __pyx_L1_error)
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4289, __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":4267
+ /* "pywrapfst.pyx":4283
*
* # Magic method used to get a Pythonic API out of the C++ API.
* def __next__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4275
+/* "pywrapfst.pyx":4291
* return (k, f)
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4275, __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, 4291, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_11arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4275, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4291, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4275, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4291, __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, 4275, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4291, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4276
+ /* "pywrapfst.pyx":4292
*
* cpdef string arc_type(self):
* return self._reader.get().ArcType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reader");
- __PYX_ERR(0, 4276, __pyx_L1_error)
+ __PYX_ERR(0, 4292, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":4275
+ /* "pywrapfst.pyx":4291
* return (k, f)
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4275, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4291, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4278
+/* "pywrapfst.pyx":4294
* return self._reader.get().ArcType()
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4278, __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, 4294, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_13done)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4278, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4294, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4278, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4294, __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, 4278, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4294, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4290
+ /* "pywrapfst.pyx":4306
* 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 '%s'", "_reader");
- __PYX_ERR(0, 4290, __pyx_L1_error)
+ __PYX_ERR(0, 4306, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->Done();
goto __pyx_L0;
- /* "pywrapfst.pyx":4278
+ /* "pywrapfst.pyx":4294
* return self._reader.get().ArcType()
*
* cpdef bool done(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4278, __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, 4294, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4292
+/* "pywrapfst.pyx":4308
* return self._reader.get().Done()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4292, __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, 4308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_15error)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4308, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4308, __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, 4292, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4308, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4301
+ /* "pywrapfst.pyx":4317
* 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 '%s'", "_reader");
- __PYX_ERR(0, 4301, __pyx_L1_error)
+ __PYX_ERR(0, 4317, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->Error();
goto __pyx_L0;
- /* "pywrapfst.pyx":4292
+ /* "pywrapfst.pyx":4308
* return self._reader.get().Done()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4292, __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, 4308, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4303
+/* "pywrapfst.pyx":4319
* return self._reader.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4303, __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, 4319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_17far_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4303, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4319, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4303, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4319, __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, 4303, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4319, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4304
+ /* "pywrapfst.pyx":4320
*
* 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 '%s'", "_reader");
- __PYX_ERR(0, 4304, __pyx_L1_error)
+ __PYX_ERR(0, 4320, __pyx_L1_error)
}
__pyx_r = fst::GetFarTypeString(__pyx_v_self->_reader.get()->Type());
goto __pyx_L0;
- /* "pywrapfst.pyx":4303
+ /* "pywrapfst.pyx":4319
* return self._reader.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("far_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4303, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4319, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4306
+/* "pywrapfst.pyx":4322
* return fst.GetFarTypeString(self._reader.get().Type())
*
* cpdef bool find(self, key): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4306, __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, 4322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_19find)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (!__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_key};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4322, __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[2] = {__pyx_t_4, __pyx_v_key};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4322, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_INCREF(__pyx_v_key);
__Pyx_GIVEREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4306, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4322, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4322
+ /* "pywrapfst.pyx":4338
* 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 '%s'", "_reader");
- __PYX_ERR(0, 4322, __pyx_L1_error)
+ __PYX_ERR(0, 4338, __pyx_L1_error)
}
- __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4322, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4338, __pyx_L1_error)
__pyx_r = __pyx_v_self->_reader.get()->Find(__pyx_t_7);
goto __pyx_L0;
- /* "pywrapfst.pyx":4306
+ /* "pywrapfst.pyx":4322
* return fst.GetFarTypeString(self._reader.get().Type())
*
* cpdef bool find(self, key): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4306, __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, 4322, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4324
+/* "pywrapfst.pyx":4340
* return self._reader.get().Find(tostring(key))
*
* cpdef _Fst get_fst(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4324, __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, 4340, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_21get_fst)) {
__Pyx_XDECREF(((PyObject *)__pyx_r));
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4324, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4324, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __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, 4324, __pyx_L1_error)
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9pywrapfst__Fst))))) __PYX_ERR(0, 4340, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4337
+ /* "pywrapfst.pyx":4353
* """
* cdef fst.FstClass *tfst = new fst.FstClass(
* deref(self._reader.get().GetFstClass())) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reader");
- __PYX_ERR(0, 4337, __pyx_L1_error)
+ __PYX_ERR(0, 4353, __pyx_L1_error)
}
- /* "pywrapfst.pyx":4336
+ /* "pywrapfst.pyx":4352
* A copy of the FST at the current position.
* """
* cdef fst.FstClass *tfst = new fst.FstClass( # <<<<<<<<<<<<<<
*/
__pyx_v_tfst = new fst::script::FstClass((*__pyx_v_self->_reader.get()->GetFstClass()));
- /* "pywrapfst.pyx":4338
+ /* "pywrapfst.pyx":4354
* cdef fst.FstClass *tfst = new fst.FstClass(
* deref(self._reader.get().GetFstClass()))
* return _init_XFst(tfst) # <<<<<<<<<<<<<<
* cpdef string get_key(self):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4338, __pyx_L1_error)
+ __pyx_t_1 = ((PyObject *)__pyx_f_9pywrapfst__init_XFst(__pyx_v_tfst)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4354, __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":4324
+ /* "pywrapfst.pyx":4340
* return self._reader.get().Find(tostring(key))
*
* cpdef _Fst get_fst(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4324, __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, 4340, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4340
+/* "pywrapfst.pyx":4356
* return _init_XFst(tfst)
*
* cpdef string get_key(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4340, __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, 4356, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_23get_key)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4356, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4340, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4356, __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, 4340, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4356, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4352
+ /* "pywrapfst.pyx":4368
* 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 '%s'", "_reader");
- __PYX_ERR(0, 4352, __pyx_L1_error)
+ __PYX_ERR(0, 4368, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_reader.get()->GetKey();
goto __pyx_L0;
- /* "pywrapfst.pyx":4340
+ /* "pywrapfst.pyx":4356
* return _init_XFst(tfst)
*
* cpdef string get_key(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("get_key", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4340, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarReader_get_key(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4356, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4354
+/* "pywrapfst.pyx":4370
* return self._reader.get().GetKey()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4354, __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, 4370, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_25next)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4354, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4370, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4354, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4370, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4363
+ /* "pywrapfst.pyx":4379
* should use the Pythonic API.
* """
* self._reader.get().Next() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reader");
- __PYX_ERR(0, 4363, __pyx_L1_error)
+ __PYX_ERR(0, 4379, __pyx_L1_error)
}
__pyx_v_self->_reader.get()->Next();
- /* "pywrapfst.pyx":4354
+ /* "pywrapfst.pyx":4370
* return self._reader.get().GetKey()
*
* cpdef void next(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4354, __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, 4370, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4365
+/* "pywrapfst.pyx":4381
* self._reader.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4365, __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, 4381, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarReader_27reset)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4365, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4381, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4365, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4381, __pyx_L1_error)
}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4374
+ /* "pywrapfst.pyx":4390
* should use the Pythonic API.
* """
* self._reader.get().Reset() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_reader");
- __PYX_ERR(0, 4374, __pyx_L1_error)
+ __PYX_ERR(0, 4390, __pyx_L1_error)
}
__pyx_v_self->_reader.get()->Reset();
- /* "pywrapfst.pyx":4365
+ /* "pywrapfst.pyx":4381
* self._reader.get().Next()
*
* cpdef void reset(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4365, __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, 4381, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4377
+/* "pywrapfst.pyx":4393
*
* # Dictionary-like access by combining `find` and `get_fst`.
* def __getitem__(self, key): # <<<<<<<<<<<<<<
PyObject *__pyx_t_3 = NULL;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "pywrapfst.pyx":4378
+ /* "pywrapfst.pyx":4394
* # Dictionary-like access by combining `find` and `get_fst`.
* def __getitem__(self, key):
* if not self.find(key): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "find");
- __PYX_ERR(0, 4378, __pyx_L1_error)
+ __PYX_ERR(0, 4394, __pyx_L1_error)
}
__pyx_t_1 = ((!(((struct __pyx_vtabstruct_9pywrapfst_FarReader *)__pyx_v_self->__pyx_vtab)->find(__pyx_v_self, __pyx_v_key, 0) != 0)) != 0);
if (__pyx_t_1) {
- /* "pywrapfst.pyx":4379
+ /* "pywrapfst.pyx":4395
* def __getitem__(self, key):
* if not self.find(key):
* raise KeyError(key) # <<<<<<<<<<<<<<
* return self.get_fst()
*
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4379, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4395, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_key);
__Pyx_GIVEREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4379, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4395, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __PYX_ERR(0, 4379, __pyx_L1_error)
+ __PYX_ERR(0, 4395, __pyx_L1_error)
- /* "pywrapfst.pyx":4378
+ /* "pywrapfst.pyx":4394
* # Dictionary-like access by combining `find` and `get_fst`.
* def __getitem__(self, key):
* if not self.find(key): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4380
+ /* "pywrapfst.pyx":4396
* if not self.find(key):
* raise KeyError(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 '%s'", "get_fst");
- __PYX_ERR(0, 4380, __pyx_L1_error)
+ __PYX_ERR(0, 4396, __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, 4380, __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, 4396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4377
+ /* "pywrapfst.pyx":4393
*
* # Dictionary-like access by combining `find` and `get_fst`.
* def __getitem__(self, key): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4403
+/* "pywrapfst.pyx":4419
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "pywrapfst.pyx":4404
+ /* "pywrapfst.pyx":4420
*
* def __init__(self):
* raise FstDeletedConstructorError( # <<<<<<<<<<<<<<
* "Cannot construct {}".format(self.__class__.__name__))
*
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstDeletedConstructorError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":4405
+ /* "pywrapfst.pyx":4421
* def __init__(self):
* raise FstDeletedConstructorError(
* "Cannot construct {}".format(self.__class__.__name__)) # <<<<<<<<<<<<<<
*
* def __repr__(self):
*/
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Cannot_construct, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = NULL;
}
}
if (!__pyx_t_5) {
- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_3);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
- __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
- __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
__Pyx_GIVEREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4405, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4421, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
}
}
if (!__pyx_t_4) {
- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
} else
#endif
{
- __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4404, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__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, 4404, __pyx_L1_error)
+ __PYX_ERR(0, 4420, __pyx_L1_error)
- /* "pywrapfst.pyx":4403
+ /* "pywrapfst.pyx":4419
* """
*
* def __init__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4407
+/* "pywrapfst.pyx":4423
* "Cannot construct {}".format(self.__class__.__name__))
*
* def __repr__(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_7 = NULL;
__Pyx_RefNannySetupContext("__repr__", 0);
- /* "pywrapfst.pyx":4408
+ /* "pywrapfst.pyx":4424
*
* def __repr__(self):
* return "<{} FarWriter at 0x{:x}>".format(self.far_type(), id(self)) # <<<<<<<<<<<<<<
* @classmethod
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FarWriter_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FarWriter_at_0x_x, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4424, __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 '%s'", "far_type");
- __PYX_ERR(0, 4408, __pyx_L1_error)
+ __PYX_ERR(0, 4424, __pyx_L1_error)
}
- __pyx_t_3 = __pyx_convert_PyBytes_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_3)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_3 = __pyx_convert_PyBytes_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_3)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = NULL;
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
__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, 4408, __pyx_L1_error)
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
if (__pyx_t_4) {
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_5 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4408, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4424, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "pywrapfst.pyx":4407
+ /* "pywrapfst.pyx":4423
* "Cannot construct {}".format(self.__class__.__name__))
*
* def __repr__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4411
+/* "pywrapfst.pyx":4427
*
* @classmethod
* def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4411, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 4427, __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, 4411, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("create", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4427, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("pywrapfst.FarWriter.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
PyObject *__pyx_t_9 = NULL;
__Pyx_RefNannySetupContext("create", 0);
- /* "pywrapfst.pyx":4432
+ /* "pywrapfst.pyx":4448
* FstIOError: Read failed.
* """
* cdef fst.FarType ft = fst.GetFarType(tostring(far_type)) # <<<<<<<<<<<<<<
* cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create(
* tostring(filename), tostring(arc_type), ft)
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4432, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_far_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4448, __pyx_L1_error)
__pyx_v_ft = fst::script::GetFarType(__pyx_t_1);
- /* "pywrapfst.pyx":4434
+ /* "pywrapfst.pyx":4450
* cdef fst.FarType ft = fst.GetFarType(tostring(far_type))
* cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create(
* tostring(filename), tostring(arc_type), ft) # <<<<<<<<<<<<<<
* if tfar == NULL:
* raise FstIOError("Open failed: {!r}".format(filename))
*/
- __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4434, __pyx_L1_error)
- __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4434, __pyx_L1_error)
+ __pyx_t_1 = __pyx_f_9pywrapfst_tostring(__pyx_v_filename, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4450, __pyx_L1_error)
+ __pyx_t_2 = __pyx_f_9pywrapfst_tostring(__pyx_v_arc_type, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4450, __pyx_L1_error)
- /* "pywrapfst.pyx":4433
+ /* "pywrapfst.pyx":4449
* """
* cdef fst.FarType ft = fst.GetFarType(tostring(far_type))
* cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create( # <<<<<<<<<<<<<<
*/
__pyx_v_tfar = fst::script::FarWriterClass::Create(__pyx_t_1, __pyx_t_2, __pyx_v_ft);
- /* "pywrapfst.pyx":4435
+ /* "pywrapfst.pyx":4451
* cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create(
* tostring(filename), tostring(arc_type), ft)
* if tfar == NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_tfar == NULL) != 0);
if (__pyx_t_3) {
- /* "pywrapfst.pyx":4436
+ /* "pywrapfst.pyx":4452
* tostring(filename), tostring(arc_type), ft)
* if tfar == NULL:
* raise FstIOError("Open failed: {!r}".format(filename)) # <<<<<<<<<<<<<<
* cdef FarWriter result = FarWriter.__new__(FarWriter)
* result._writer.reset(tfar)
*/
- __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstIOError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Open_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Open_failed_r, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = NULL;
if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
}
}
if (!__pyx_t_8) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_filename};
- __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_filename};
- __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_GOTREF(__pyx_t_6);
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
__Pyx_INCREF(__pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_filename);
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
}
}
if (!__pyx_t_7) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GOTREF(__pyx_t_4);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
} else
#endif
{
- __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
__Pyx_GIVEREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4436, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4452, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
}
__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, 4436, __pyx_L1_error)
+ __PYX_ERR(0, 4452, __pyx_L1_error)
- /* "pywrapfst.pyx":4435
+ /* "pywrapfst.pyx":4451
* cdef fst.FarWriterClass *tfar = fst.FarWriterClass.Create(
* tostring(filename), tostring(arc_type), ft)
* if tfar == NULL: # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4437
+ /* "pywrapfst.pyx":4453
* if tfar == NULL:
* raise FstIOError("Open failed: {!r}".format(filename))
* cdef FarWriter result = FarWriter.__new__(FarWriter) # <<<<<<<<<<<<<<
* result._writer.reset(tfar)
* return result
*/
- __pyx_t_4 = __pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4437, __pyx_L1_error)
+ __pyx_t_4 = __pyx_tp_new_9pywrapfst_FarWriter(((PyTypeObject *)__pyx_ptype_9pywrapfst_FarWriter), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4453, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst_FarWriter)))) __PYX_ERR(0, 4437, __pyx_L1_error)
+ if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_9pywrapfst_FarWriter)))) __PYX_ERR(0, 4453, __pyx_L1_error)
__pyx_v_result = ((struct __pyx_obj_9pywrapfst_FarWriter *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "pywrapfst.pyx":4438
+ /* "pywrapfst.pyx":4454
* raise FstIOError("Open failed: {!r}".format(filename))
* cdef FarWriter result = FarWriter.__new__(FarWriter)
* result._writer.reset(tfar) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_writer");
- __PYX_ERR(0, 4438, __pyx_L1_error)
+ __PYX_ERR(0, 4454, __pyx_L1_error)
}
__pyx_v_result->_writer.reset(__pyx_v_tfar);
- /* "pywrapfst.pyx":4439
+ /* "pywrapfst.pyx":4455
* cdef FarWriter result = FarWriter.__new__(FarWriter)
* result._writer.reset(tfar)
* return result # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_result);
goto __pyx_L0;
- /* "pywrapfst.pyx":4411
+ /* "pywrapfst.pyx":4427
*
* @classmethod
* def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4443
+/* "pywrapfst.pyx":4459
* # NB: Invoking this method is DANGEROUS: calling any other method on the
* # instance after this is invoked may result in a null dereference.
* cdef void _close(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_close", 0);
- /* "pywrapfst.pyx":4444
+ /* "pywrapfst.pyx":4460
* # 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 '%s'", "_writer");
- __PYX_ERR(0, 4444, __pyx_L1_error)
+ __PYX_ERR(0, 4460, __pyx_L1_error)
}
__pyx_v_self->_writer.reset();
- /* "pywrapfst.pyx":4443
+ /* "pywrapfst.pyx":4459
* # NB: Invoking this method is 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":4446
+/* "pywrapfst.pyx":4462
* self._writer.reset()
*
* cpdef void add(self, key, _Fst ifst) except *: # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4446, __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, 4462, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__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, 4446, __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, 4462, __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, 4446, __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, 4462, __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, 4446, __pyx_L1_error)
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4462, __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, 4446, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4462, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4468
+ /* "pywrapfst.pyx":4484
* # 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 '%s'", "_writer");
- __PYX_ERR(0, 4468, __pyx_L1_error)
+ __PYX_ERR(0, 4484, __pyx_L1_error)
}
- __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4468, __pyx_L1_error)
+ __pyx_t_7 = __pyx_f_9pywrapfst_tostring(__pyx_v_key, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4484, __pyx_L1_error)
if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_fst");
- __PYX_ERR(0, 4468, __pyx_L1_error)
+ __PYX_ERR(0, 4484, __pyx_L1_error)
}
__pyx_t_8 = ((!(__pyx_v_self->_writer.get()->Add(__pyx_t_7, (*__pyx_v_ifst->_fst)) != 0)) != 0);
if (__pyx_t_8) {
- /* "pywrapfst.pyx":4469
+ /* "pywrapfst.pyx":4485
* # 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") # <<<<<<<<<<<<<<
* # An error here usually indicates a key out of order.
* if self._writer.get().Error():
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4469, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4469, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __PYX_ERR(0, 4469, __pyx_L1_error)
+ __PYX_ERR(0, 4485, __pyx_L1_error)
- /* "pywrapfst.pyx":4468
+ /* "pywrapfst.pyx":4484
* # 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":4471
+ /* "pywrapfst.pyx":4487
* raise FstOpError("Incompatible or invalid arc type")
* # An error here usually indicates a key out of order.
* if self._writer.get().Error(): # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_writer");
- __PYX_ERR(0, 4471, __pyx_L1_error)
+ __PYX_ERR(0, 4487, __pyx_L1_error)
}
__pyx_t_8 = (__pyx_v_self->_writer.get()->Error() != 0);
if (__pyx_t_8) {
- /* "pywrapfst.pyx":4472
+ /* "pywrapfst.pyx":4488
* # An error here usually indicates a key out of order.
* if self._writer.get().Error():
* raise FstArgError("Key out of order") # <<<<<<<<<<<<<<
*
* cpdef string arc_type(self):
*/
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4472, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4488, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4472, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __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, 4472, __pyx_L1_error)
+ __PYX_ERR(0, 4488, __pyx_L1_error)
- /* "pywrapfst.pyx":4471
+ /* "pywrapfst.pyx":4487
* raise FstOpError("Incompatible or invalid arc type")
* # An error here usually indicates a key out of order.
* if self._writer.get().Error(): # <<<<<<<<<<<<<<
*/
}
- /* "pywrapfst.pyx":4446
+ /* "pywrapfst.pyx":4462
* self._writer.reset()
*
* cpdef void add(self, key, _Fst ifst) except *: # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifst)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4446, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 4462, __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, 4446, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 4462, __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, 4446, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4462, __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, 4446, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_9pywrapfst__Fst, 1, "ifst", 0))) __PYX_ERR(0, 4462, __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 */
PyObject *__pyx_t_1 = NULL;
__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, 4446, __pyx_L1_error)
- __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4446, __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, 4462, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4462, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4474
+/* "pywrapfst.pyx":4490
* raise FstArgError("Key out of order")
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4474, __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, 4490, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarWriter_9arc_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4474, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4490, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4474, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4490, __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, 4474, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4490, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4475
+ /* "pywrapfst.pyx":4491
*
* cpdef string arc_type(self):
* return self._writer.get().ArcType() # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_writer");
- __PYX_ERR(0, 4475, __pyx_L1_error)
+ __PYX_ERR(0, 4491, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_writer.get()->ArcType();
goto __pyx_L0;
- /* "pywrapfst.pyx":4474
+ /* "pywrapfst.pyx":4490
* raise FstArgError("Key out of order")
*
* cpdef string arc_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("arc_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4474, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_arc_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4490, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4477
+/* "pywrapfst.pyx":4493
* return self._writer.get().ArcType()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4477, __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, 4493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarWriter_11error)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4477, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4493, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4477, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4493, __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, 4477, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4493, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4486
+ /* "pywrapfst.pyx":4502
* 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 '%s'", "_writer");
- __PYX_ERR(0, 4486, __pyx_L1_error)
+ __PYX_ERR(0, 4502, __pyx_L1_error)
}
__pyx_r = __pyx_v_self->_writer.get()->Error();
goto __pyx_L0;
- /* "pywrapfst.pyx":4477
+ /* "pywrapfst.pyx":4493
* return self._writer.get().ArcType()
*
* cpdef bool error(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__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, 4477, __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, 4493, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4488
+/* "pywrapfst.pyx":4504
* return self._writer.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __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, 4504, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_9pywrapfst_9FarWriter_13far_type)) {
__Pyx_INCREF(__pyx_t_1);
}
}
if (__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4488, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4504, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4488, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4504, __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, 4488, __pyx_L1_error)
+ __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4504, __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;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "pywrapfst.pyx":4489
+ /* "pywrapfst.pyx":4505
*
* cpdef string far_type(self):
* return fst.GetFarTypeString(self._writer.get().Type()) # <<<<<<<<<<<<<<
*/
if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "_writer");
- __PYX_ERR(0, 4489, __pyx_L1_error)
+ __PYX_ERR(0, 4505, __pyx_L1_error)
}
__pyx_r = fst::GetFarTypeString(__pyx_v_self->_writer.get()->Type());
goto __pyx_L0;
- /* "pywrapfst.pyx":4488
+ /* "pywrapfst.pyx":4504
* return self._writer.get().Error()
*
* cpdef string far_type(self): # <<<<<<<<<<<<<<
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("far_type", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4488, __pyx_L1_error)
+ __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9pywrapfst_9FarWriter_far_type(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4504, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "pywrapfst.pyx":4492
+/* "pywrapfst.pyx":4508
*
* # 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, 4492, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_9pywrapfst__Fst, 1, "fst", 0))) __PYX_ERR(0, 4508, __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 */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__setitem__", 0);
- /* "pywrapfst.pyx":4493
+ /* "pywrapfst.pyx":4509
* # 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 '%s'", "add");
- __PYX_ERR(0, 4493, __pyx_L1_error)
+ __PYX_ERR(0, 4509, __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, 4493, __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, 4509, __pyx_L1_error)
- /* "pywrapfst.pyx":4492
+ /* "pywrapfst.pyx":4508
*
* # Dictionary-like assignment.
* def __setitem__(self, key, _Fst fst): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "pywrapfst.pyx":4508
+/* "pywrapfst.pyx":4524
*
* @atexit.register
* def _reset_fst_error_fatal(): # <<<<<<<<<<<<<<
bool __pyx_t_2;
__Pyx_RefNannySetupContext("_reset_fst_error_fatal", 0);
- /* "pywrapfst.pyx":4509
+ /* "pywrapfst.pyx":4525
* @atexit.register
* def _reset_fst_error_fatal():
* fst.FLAGS_fst_error_fatal = _fst_error_fatal_old # <<<<<<<<<<<<<<
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fst_error_fatal_old); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4509, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fst_error_fatal_old); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4525, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4509, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4525, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
FLAGS_fst_error_fatal = __pyx_t_2;
- /* "pywrapfst.pyx":4508
+ /* "pywrapfst.pyx":4524
*
* @atexit.register
* def _reset_fst_error_fatal(): # <<<<<<<<<<<<<<
{&__pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_k_I_LABEL_INVARIANT_PROPERTIES, sizeof(__pyx_k_I_LABEL_INVARIANT_PROPERTIES), 0, 0, 1, 1},
{&__pyx_n_s_I_LABEL_SORTED, __pyx_k_I_LABEL_SORTED, sizeof(__pyx_k_I_LABEL_SORTED), 0, 0, 1, 1},
{&__pyx_kp_s_Incompatible_or_invalid_arc_type, __pyx_k_Incompatible_or_invalid_arc_type, sizeof(__pyx_k_Incompatible_or_invalid_arc_type), 0, 0, 1, 0},
+ {&__pyx_kp_s_Incompatible_or_invalid_weight, __pyx_k_Incompatible_or_invalid_weight, sizeof(__pyx_k_Incompatible_or_invalid_weight), 0, 0, 1, 0},
{&__pyx_kp_s_Incompatible_or_invalid_weight_t, __pyx_k_Incompatible_or_invalid_weight_t, sizeof(__pyx_k_Incompatible_or_invalid_weight_t), 0, 0, 1, 0},
{&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
{&__pyx_kp_s_Invalid_operator_r, __pyx_k_Invalid_operator_r, sizeof(__pyx_k_Invalid_operator_r), 0, 0, 1, 0},
{&__pyx_n_s_final, __pyx_k_final, sizeof(__pyx_k_final), 0, 0, 1, 1},
{&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
{&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
+ {&__pyx_n_s_float_format, __pyx_k_float_format, sizeof(__pyx_k_float_format), 0, 0, 1, 1},
{&__pyx_n_s_fontsize, __pyx_k_fontsize, sizeof(__pyx_k_fontsize), 0, 0, 1, 1},
{&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
{&__pyx_n_s_fst_error_fatal_old, __pyx_k_fst_error_fatal_old, sizeof(__pyx_k_fst_error_fatal_old), 0, 0, 1, 1},
{&__pyx_n_s_fst_string, __pyx_k_fst_string, sizeof(__pyx_k_fst_string), 0, 0, 1, 1},
{&__pyx_n_s_fst_type, __pyx_k_fst_type, sizeof(__pyx_k_fst_type), 0, 0, 1, 1},
{&__pyx_n_b_functional, __pyx_k_functional, sizeof(__pyx_k_functional), 0, 0, 0, 1},
+ {&__pyx_n_b_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 0, 1},
{&__pyx_n_s_get_fst, __pyx_k_get_fst, sizeof(__pyx_k_get_fst), 0, 0, 1, 1},
{&__pyx_n_s_get_key, __pyx_k_get_key, sizeof(__pyx_k_get_key), 0, 0, 1, 1},
{&__pyx_n_s_get_nth_key, __pyx_k_get_nth_key, sizeof(__pyx_k_get_nth_key), 0, 0, 1, 1},
{&__pyx_n_b_ilabel, __pyx_k_ilabel, sizeof(__pyx_k_ilabel), 0, 0, 0, 1},
{&__pyx_n_s_ilabel, __pyx_k_ilabel, sizeof(__pyx_k_ilabel), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
- {&__pyx_kp_s_incompatible_or_invalid_weight, __pyx_k_incompatible_or_invalid_weight, sizeof(__pyx_k_incompatible_or_invalid_weight), 0, 0, 1, 0},
{&__pyx_n_s_increment_subsequential_label, __pyx_k_increment_subsequential_label, sizeof(__pyx_k_increment_subsequential_label), 0, 0, 1, 1},
{&__pyx_n_b_input, __pyx_k_input, sizeof(__pyx_k_input), 0, 0, 0, 1},
{&__pyx_n_s_input_symbols, __pyx_k_input_symbols, sizeof(__pyx_k_input_symbols), 0, 0, 1, 1},
{&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
{&__pyx_n_b_uniform, __pyx_k_uniform, sizeof(__pyx_k_uniform), 0, 0, 0, 1},
{&__pyx_n_s_unique, __pyx_k_unique, sizeof(__pyx_k_unique), 0, 0, 1, 1},
+ {&__pyx_n_s_unknown_isymbol, __pyx_k_unknown_isymbol, sizeof(__pyx_k_unknown_isymbol), 0, 0, 1, 1},
+ {&__pyx_n_s_unknown_osymbol, __pyx_k_unknown_osymbol, sizeof(__pyx_k_unknown_osymbol), 0, 0, 1, 1},
{&__pyx_kp_b_unspecified, __pyx_k_unspecified, sizeof(__pyx_k_unspecified), 0, 0, 0, 0},
{&__pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_k_usr_local_google_home_kbg_scrat, sizeof(__pyx_k_usr_local_google_home_kbg_scrat), 0, 0, 1, 0},
{&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
__pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 131, __pyx_L1_error)
__pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 136, __pyx_L1_error)
__pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 141, __pyx_L1_error)
- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 2651, __pyx_L1_error)
- __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2671, __pyx_L1_error)
+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 2667, __pyx_L1_error)
+ __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2687, __pyx_L1_error)
__pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 366, __pyx_L1_error)
__pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 430, __pyx_L1_error)
__pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 722, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__2);
__Pyx_GIVEREF(__pyx_tuple__2);
- /* "pywrapfst.pyx":1542
+ /* "pywrapfst.pyx":1545
* cdef size_t result = self._fst.get().NumArcs(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1542, __pyx_L1_error)
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 1545, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__3);
__Pyx_GIVEREF(__pyx_tuple__3);
- /* "pywrapfst.pyx":1564
+ /* "pywrapfst.pyx":1567
* cdef size_t result = self._fst.get().NumInputEpsilons(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1564, __pyx_L1_error)
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1567, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__4);
__Pyx_GIVEREF(__pyx_tuple__4);
- /* "pywrapfst.pyx":1586
+ /* "pywrapfst.pyx":1589
* cdef size_t result = self._fst.get().NumOutputEpsilons(state)
* if result == SIZE_MAX:
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1586, __pyx_L1_error)
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1589, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__5);
__Pyx_GIVEREF(__pyx_tuple__5);
- /* "pywrapfst.pyx":1727
+ /* "pywrapfst.pyx":1730
* """
* 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_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1730, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__6);
__Pyx_GIVEREF(__pyx_tuple__6);
- /* "pywrapfst.pyx":1731
+ /* "pywrapfst.pyx":1734
* 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_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
- /* "pywrapfst.pyx":1733
+ /* "pywrapfst.pyx":1736
* raise FstIndexError("State index out of range")
* if not self._mfst.get().AddArc(state, deref(arc._arc)):
* raise FstOpError("Incompatible or invalid weight type") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Incompatible_or_invalid_weight_t); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1733, __pyx_L1_error)
+ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Incompatible_or_invalid_weight_t); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1736, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- /* "pywrapfst.pyx":1898
+ /* "pywrapfst.pyx":1901
* 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_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1898, __pyx_L1_error)
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1901, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__9);
__Pyx_GIVEREF(__pyx_tuple__9);
- /* "pywrapfst.pyx":1928
+ /* "pywrapfst.pyx":1931
* 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_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1928, __pyx_L1_error)
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1931, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
- /* "pywrapfst.pyx":2183
+ /* "pywrapfst.pyx":2186
* _opairs.get().push_back(fst.LabelPair(before, after))
* if _ipairs.get().empty() and _opairs.get().empty():
* raise FstArgError("No relabeling pairs specified.") # <<<<<<<<<<<<<<
* fst.Relabel(self._mfst.get(), deref(_ipairs), deref(_opairs))
* self._check_mutating_imethod()
*/
- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_No_relabeling_pairs_specified); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2183, __pyx_L1_error)
+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_No_relabeling_pairs_specified); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2186, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__19);
__Pyx_GIVEREF(__pyx_tuple__19);
- /* "pywrapfst.pyx":2220
+ /* "pywrapfst.pyx":2225
* bool attach_new_osymbols=True) except *:
* if new_isymbols is None and new_osymbols is None:
* raise FstArgError("No new SymbolTables specified") # <<<<<<<<<<<<<<
* cdef fst.SymbolTable *new_isymbols_ptr = NULL
* if new_isymbols is not None:
*/
- __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_No_new_SymbolTables_specified); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2220, __pyx_L1_error)
+ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_No_new_SymbolTables_specified); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2225, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__20);
__Pyx_GIVEREF(__pyx_tuple__20);
- /* "pywrapfst.pyx":2277
+ /* "pywrapfst.pyx":2293
* 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_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 2293, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__21);
__Pyx_GIVEREF(__pyx_tuple__21);
- /* "pywrapfst.pyx":2400
+ /* "pywrapfst.pyx":2416
* 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 wc = _get_WeightClass_or_One(self.weight_type(),
* weight)
*/
- __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 2400, __pyx_L1_error)
+ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 2416, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__26);
__Pyx_GIVEREF(__pyx_tuple__26);
- /* "pywrapfst.pyx":2404
+ /* "pywrapfst.pyx":2420
* weight)
* if not self._mfst.get().SetFinal(state, wc):
- * raise FstOpError("incompatible or invalid weight") # <<<<<<<<<<<<<<
+ * raise FstOpError("Incompatible or invalid weight") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_incompatible_or_invalid_weight); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2404, __pyx_L1_error)
+ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Incompatible_or_invalid_weight); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 2420, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__27);
__Pyx_GIVEREF(__pyx_tuple__27);
- /* "pywrapfst.pyx":2449
+ /* "pywrapfst.pyx":2465
* cdef void _set_start(self, int64 state) except *:
* if not self._mfst.get().SetStart(state):
* raise FstIndexError("State index out of range") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 2465, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__28);
__Pyx_GIVEREF(__pyx_tuple__28);
- /* "pywrapfst.pyx":2527
+ /* "pywrapfst.pyx":2543
* # 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.") # <<<<<<<<<<<<<<
* self._check_mutating_imethod()
*
*/
- __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Cannot_topsort_cyclic_FST); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2527, __pyx_L1_error)
+ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Cannot_topsort_cyclic_FST); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2543, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__29);
__Pyx_GIVEREF(__pyx_tuple__29);
- /* "pywrapfst.pyx":2596
+ /* "pywrapfst.pyx":2612
* cdef _Fst _init_Fst(FstClass_ptr tfst):
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef _Fst ofst = _Fst.__new__(_Fst)
* ofst._fst.reset(<FstClass_ptr> tfst)
*/
- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 2612, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__30);
__Pyx_GIVEREF(__pyx_tuple__30);
- /* "pywrapfst.pyx":2604
+ /* "pywrapfst.pyx":2620
* cdef _MutableFst _init_MutableFst(MutableFstClass_ptr tfst):
* if tfst.Properties(fst.kError, True):
* raise FstOpError("Operation failed") # <<<<<<<<<<<<<<
* cdef _MutableFst ofst = _MutableFst.__new__(_MutableFst)
* ofst._fst.reset(<MutableFstClass_ptr> tfst)
*/
- __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2604, __pyx_L1_error)
+ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Operation_failed); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2620, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__31);
__Pyx_GIVEREF(__pyx_tuple__31);
- /* "pywrapfst.pyx":2862
+ /* "pywrapfst.pyx":2878
* 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_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2878, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__32);
__Pyx_GIVEREF(__pyx_tuple__32);
- /* "pywrapfst.pyx":3000
+ /* "pywrapfst.pyx":3016
* 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_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_State_index_out_of_range); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 3016, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__33);
__Pyx_GIVEREF(__pyx_tuple__33);
- /* "pywrapfst.pyx":3542
+ /* "pywrapfst.pyx":3558
* addr(error))
* if error:
* raise FstOpError("Equivalence test encountered error") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Equivalence_test_encountered_err); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3542, __pyx_L1_error)
+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Equivalence_test_encountered_err); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 3558, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__42);
__Pyx_GIVEREF(__pyx_tuple__42);
- /* "pywrapfst.pyx":3737
+ /* "pywrapfst.pyx":3753
* addr(error))
* if error:
* raise FstOpError("Random equivalence test encountered error") # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_Random_equivalence_test_encounte); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3737, __pyx_L1_error)
+ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_Random_equivalence_test_encounte); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 3753, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__49);
__Pyx_GIVEREF(__pyx_tuple__49);
- /* "pywrapfst.pyx":4184
+ /* "pywrapfst.pyx":4200
* self._sstrm.reset(new stringstream())
* if tfst == NULL:
* raise FstOpError("Compilation failed") # <<<<<<<<<<<<<<
* return _init_XFst(tfst)
*
*/
- __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Compilation_failed); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 4184, __pyx_L1_error)
+ __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Compilation_failed); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 4200, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__61);
__Pyx_GIVEREF(__pyx_tuple__61);
- /* "pywrapfst.pyx":4469
+ /* "pywrapfst.pyx":4485
* # 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") # <<<<<<<<<<<<<<
* # An error here usually indicates a key out of order.
* if self._writer.get().Error():
*/
- __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Incompatible_or_invalid_arc_type); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 4469, __pyx_L1_error)
+ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Incompatible_or_invalid_arc_type); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 4485, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__62);
__Pyx_GIVEREF(__pyx_tuple__62);
- /* "pywrapfst.pyx":4472
+ /* "pywrapfst.pyx":4488
* # An error here usually indicates a key out of order.
* if self._writer.get().Error():
* raise FstArgError("Key out of order") # <<<<<<<<<<<<<<
*
* cpdef string arc_type(self):
*/
- __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Key_out_of_order); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 4472, __pyx_L1_error)
+ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_Key_out_of_order); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 4488, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__63);
__Pyx_GIVEREF(__pyx_tuple__63);
__Pyx_GIVEREF(__pyx_tuple__70);
__pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_power, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 543, __pyx_L1_error)
- /* "pywrapfst.pyx":2668
+ /* "pywrapfst.pyx":2684
* """
*
* def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<<
* return _create_Fst(arc_type)
*
*/
- __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_arc_type); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 2668, __pyx_L1_error)
+ __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_arc_type); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 2684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__72);
__Pyx_GIVEREF(__pyx_tuple__72);
- __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_new, 2668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 2668, __pyx_L1_error)
- __pyx_tuple__74 = PyTuple_Pack(1, ((PyObject*)__pyx_n_b_standard)); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 2668, __pyx_L1_error)
+ __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_new, 2684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __pyx_tuple__74 = PyTuple_Pack(1, ((PyObject*)__pyx_n_b_standard)); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 2684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__74);
__Pyx_GIVEREF(__pyx_tuple__74);
- /* "pywrapfst.pyx":2672
+ /* "pywrapfst.pyx":2688
*
* @staticmethod
* def read(filename, fst_type=None): # <<<<<<<<<<<<<<
* """
* read(filename, fst_type=None)
*/
- __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 2672, __pyx_L1_error)
+ __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 2688, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__75);
__Pyx_GIVEREF(__pyx_tuple__75);
- __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_read, 2672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 2672, __pyx_L1_error)
- __pyx_tuple__77 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 2672, __pyx_L1_error)
+ __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_read, 2688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 2688, __pyx_L1_error)
+ __pyx_tuple__77 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 2688, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__77);
__Pyx_GIVEREF(__pyx_tuple__77);
- /* "pywrapfst.pyx":2693
+ /* "pywrapfst.pyx":2709
*
* @staticmethod
* def read_from_string(fst_string, fst_type=None): # <<<<<<<<<<<<<<
* """
* read_from_string(fst_string, fst_type=None)
*/
- __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_s_fst_string, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 2693, __pyx_L1_error)
+ __pyx_tuple__78 = PyTuple_Pack(2, __pyx_n_s_fst_string, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 2709, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__78);
__Pyx_GIVEREF(__pyx_tuple__78);
- __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_read_from_string, 2693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 2693, __pyx_L1_error)
- __pyx_tuple__80 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 2693, __pyx_L1_error)
+ __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_read_from_string, 2709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 2709, __pyx_L1_error)
+ __pyx_tuple__80 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 2709, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__80);
__Pyx_GIVEREF(__pyx_tuple__80);
- /* "pywrapfst.pyx":3936
+ /* "pywrapfst.pyx":3952
*
*
* def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
*/
- __pyx_tuple__81 = PyTuple_Pack(9, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_qt, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight_type, __pyx_n_s_result, __pyx_n_s_it); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 3936, __pyx_L1_error)
+ __pyx_tuple__81 = PyTuple_Pack(9, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_qt, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight_type, __pyx_n_s_result, __pyx_n_s_it); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 3952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple__81);
__Pyx_GIVEREF(__pyx_tuple__81);
- __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_shortestdistance, 3936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 3936, __pyx_L1_error)
+ __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_shortestdistance, 3952, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 3952, __pyx_L1_error)
- /* "pywrapfst.pyx":4508
+ /* "pywrapfst.pyx":4524
*
* @atexit.register
* def _reset_fst_error_fatal(): # <<<<<<<<<<<<<<
* fst.FLAGS_fst_error_fatal = _fst_error_fatal_old
*
*/
- __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_reset_fst_error_fatal, 4508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 4508, __pyx_L1_error)
+ __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr_local_google_home_kbg_scrat, __pyx_n_s_reset_fst_error_fatal, 4524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 4524, __pyx_L1_error)
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
__pyx_vtable_9pywrapfst__MutableFst._topsort = (void (*)(struct __pyx_obj_9pywrapfst__MutableFst *))__pyx_f_9pywrapfst_11_MutableFst__topsort;
__pyx_vtable_9pywrapfst__MutableFst._union = (void (*)(struct __pyx_obj_9pywrapfst__MutableFst *, struct __pyx_obj_9pywrapfst__Fst *))__pyx_f_9pywrapfst_11_MutableFst__union;
__pyx_type_9pywrapfst__MutableFst.tp_base = __pyx_ptype_9pywrapfst__Fst;
- if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1714, __pyx_L1_error)
__pyx_type_9pywrapfst__MutableFst.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "_MutableFst", (PyObject *)&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst__MutableFst.tp_dict, __pyx_vtabptr_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1714, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "_MutableFst", (PyObject *)&__pyx_type_9pywrapfst__MutableFst) < 0) __PYX_ERR(0, 1714, __pyx_L1_error)
__pyx_ptype_9pywrapfst__MutableFst = &__pyx_type_9pywrapfst__MutableFst;
__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, 2779, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2795, __pyx_L1_error)
__pyx_type_9pywrapfst_Arc.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "Arc", (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Arc.tp_dict, __pyx_vtabptr_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2795, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Arc", (PyObject *)&__pyx_type_9pywrapfst_Arc) < 0) __PYX_ERR(0, 2795, __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.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 *, __pyx_t_10basictypes_uint32, __pyx_t_10basictypes_uint32, 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, 2847, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2863, __pyx_L1_error)
__pyx_type_9pywrapfst_ArcIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2847, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "ArcIterator", (PyObject *)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2847, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_ArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2863, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "ArcIterator", (PyObject *)&__pyx_type_9pywrapfst_ArcIterator) < 0) __PYX_ERR(0, 2863, __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.set_flags = (void (*)(struct __pyx_obj_9pywrapfst_MutableArcIterator *, __pyx_t_10basictypes_uint32, __pyx_t_10basictypes_uint32, 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, 2984, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
__pyx_type_9pywrapfst_MutableArcIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 2984, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "MutableArcIterator", (PyObject *)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 2984, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_MutableArcIterator.tp_dict, __pyx_vtabptr_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "MutableArcIterator", (PyObject *)&__pyx_type_9pywrapfst_MutableArcIterator) < 0) __PYX_ERR(0, 3000, __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 = (__pyx_t_10basictypes_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, 3136, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3152, __pyx_L1_error)
__pyx_type_9pywrapfst_StateIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3136, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "StateIterator", (PyObject *)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3136, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_StateIterator.tp_dict, __pyx_vtabptr_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3152, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "StateIterator", (PyObject *)&__pyx_type_9pywrapfst_StateIterator) < 0) __PYX_ERR(0, 3152, __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, 4083, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4099, __pyx_L1_error)
__pyx_type_9pywrapfst_Compiler.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4083, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "Compiler", (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4083, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_Compiler.tp_dict, __pyx_vtabptr_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4099, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "Compiler", (PyObject *)&__pyx_type_9pywrapfst_Compiler) < 0) __PYX_ERR(0, 4099, __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, 4209, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4225, __pyx_L1_error)
__pyx_type_9pywrapfst_FarReader.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4209, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "FarReader", (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4209, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarReader.tp_dict, __pyx_vtabptr_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4225, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "FarReader", (PyObject *)&__pyx_type_9pywrapfst_FarReader) < 0) __PYX_ERR(0, 4225, __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, 4383, __pyx_L1_error)
+ if (PyType_Ready(&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4399, __pyx_L1_error)
__pyx_type_9pywrapfst_FarWriter.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4383, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "FarWriter", (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4383, __pyx_L1_error)
+ if (__Pyx_SetVtable(__pyx_type_9pywrapfst_FarWriter.tp_dict, __pyx_vtabptr_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4399, __pyx_L1_error)
+ if (PyObject_SetAttrString(__pyx_m, "FarWriter", (PyObject *)&__pyx_type_9pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4399, __pyx_L1_error)
__pyx_ptype_9pywrapfst_FarWriter = &__pyx_type_9pywrapfst_FarWriter;
/*--- Type import code ---*/
/*--- Variable import code ---*/
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_SymbolTable);
- /* "pywrapfst.pyx":2001
+ /* "pywrapfst.pyx":2004
* return self
*
* cdef void _minimize(self, float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__11 = fst::kDelta;
- /* "pywrapfst.pyx":2007
+ /* "pywrapfst.pyx":2010
* self._check_mutating_imethod()
*
* def minimize(self, float delta=fst.kDelta, bool allow_nondet=False): # <<<<<<<<<<<<<<
*/
__pyx_k__12 = fst::kDelta;
- /* "pywrapfst.pyx":2093
+ /* "pywrapfst.pyx":2096
* return self
*
* cdef void _prune(self, float delta=fst.kDelta, int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
__pyx_k__13 = fst::kDelta;
__pyx_k__14 = fst::kNoStateId;
- /* "pywrapfst.pyx":2102
+ /* "pywrapfst.pyx":2105
*
* def prune(self,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__15 = fst::kDelta;
- /* "pywrapfst.pyx":2103
+ /* "pywrapfst.pyx":2106
* def prune(self,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__16 = fst::kNoStateId;
- /* "pywrapfst.pyx":2130
+ /* "pywrapfst.pyx":2133
*
* cdef void _push(self,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__17 = fst::kDelta;
- /* "pywrapfst.pyx":2138
+ /* "pywrapfst.pyx":2141
*
* def push(self,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__18 = fst::kDelta;
- /* "pywrapfst.pyx":2360
+ /* "pywrapfst.pyx":2376
* cdef void _rmepsilon(self,
* bool connect=True,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__22 = fst::kDelta;
- /* "pywrapfst.pyx":2361
+ /* "pywrapfst.pyx":2377
* bool connect=True,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__23 = fst::kNoStateId;
- /* "pywrapfst.pyx":2371
+ /* "pywrapfst.pyx":2387
* def rmepsilon(self,
* bool connect=True,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__24 = fst::kDelta;
- /* "pywrapfst.pyx":2372
+ /* "pywrapfst.pyx":2388
* bool connect=True,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__25 = fst::kNoStateId;
- /* "pywrapfst.pyx":2651
+ /* "pywrapfst.pyx":2667
* return _init_XFst(ofst)
*
* class Fst(object): # <<<<<<<<<<<<<<
*
* """
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2667, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_builtin_object);
__Pyx_GIVEREF(__pyx_builtin_object);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
- __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2667, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Fst, __pyx_n_s_Fst, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, __pyx_kp_s_Fst_arc_type_standard_Construct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Fst, __pyx_n_s_Fst, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, __pyx_kp_s_Fst_arc_type_standard_Construct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2667, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
- /* "pywrapfst.pyx":2668
+ /* "pywrapfst.pyx":2684
* """
*
* def __new__(cls, arc_type=b"standard"): # <<<<<<<<<<<<<<
* return _create_Fst(arc_type)
*
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst___new, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2668, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst___new, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2684, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__74);
- if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_new, __pyx_t_4) < 0) __PYX_ERR(0, 2668, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_new, __pyx_t_4) < 0) __PYX_ERR(0, 2684, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2672
+ /* "pywrapfst.pyx":2688
*
* @staticmethod
* def read(filename, fst_type=None): # <<<<<<<<<<<<<<
* """
* read(filename, fst_type=None)
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_3read, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2672, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_3read, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__77);
- /* "pywrapfst.pyx":2671
+ /* "pywrapfst.pyx":2687
* return _create_Fst(arc_type)
*
* @staticmethod # <<<<<<<<<<<<<<
* def read(filename, fst_type=None):
* """
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2671, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2671, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2687, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 2672, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 2688, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2693
+ /* "pywrapfst.pyx":2709
*
* @staticmethod
* def read_from_string(fst_string, fst_type=None): # <<<<<<<<<<<<<<
* """
* read_from_string(fst_string, fst_type=None)
*/
- __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_5read_from_string, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_9pywrapfst_3Fst_5read_from_string, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2709, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__80);
- /* "pywrapfst.pyx":2692
+ /* "pywrapfst.pyx":2708
* return _read_Fst(filename, fst_type)
*
* @staticmethod # <<<<<<<<<<<<<<
* def read_from_string(fst_string, fst_type=None):
* """
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2692, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2692, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_from_string, __pyx_t_4) < 0) __PYX_ERR(0, 2693, __pyx_L1_error)
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_read_from_string, __pyx_t_4) < 0) __PYX_ERR(0, 2709, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "pywrapfst.pyx":2651
+ /* "pywrapfst.pyx":2667
* return _init_XFst(ofst)
*
* class Fst(object): # <<<<<<<<<<<<<<
*
* """
*/
- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Fst, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Fst, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Fst, __pyx_t_4) < 0) __PYX_ERR(0, 2651, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Fst, __pyx_t_4) < 0) __PYX_ERR(0, 2667, __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":2716
+ /* "pywrapfst.pyx":2732
*
*
* EXPANDED = fst.kExpanded # <<<<<<<<<<<<<<
* MUTABLE = fst.kMutable
* ERROR = fst.kError
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2716, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_2) < 0) __PYX_ERR(0, 2716, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_2) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2717
+ /* "pywrapfst.pyx":2733
*
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable # <<<<<<<<<<<<<<
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_2) < 0) __PYX_ERR(0, 2717, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_2) < 0) __PYX_ERR(0, 2733, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2718
+ /* "pywrapfst.pyx":2734
* EXPANDED = fst.kExpanded
* MUTABLE = fst.kMutable
* ERROR = fst.kError # <<<<<<<<<<<<<<
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2718, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_2) < 0) __PYX_ERR(0, 2718, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_2) < 0) __PYX_ERR(0, 2734, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2719
+ /* "pywrapfst.pyx":2735
* MUTABLE = fst.kMutable
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor # <<<<<<<<<<<<<<
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2719, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2735, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_2) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_2) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2720
+ /* "pywrapfst.pyx":2736
* ERROR = fst.kError
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor # <<<<<<<<<<<<<<
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2720, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_2) < 0) __PYX_ERR(0, 2720, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_2) < 0) __PYX_ERR(0, 2736, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2721
+ /* "pywrapfst.pyx":2737
* ACCEPTOR = fst.kAcceptor
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic # <<<<<<<<<<<<<<
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2721, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2721, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2737, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2722
+ /* "pywrapfst.pyx":2738
* NOT_ACCEPTOR = fst.kNotAcceptor
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic # <<<<<<<<<<<<<<
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2722, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2722, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2723
+ /* "pywrapfst.pyx":2739
* I_DETERMINISTIC = fst.kIDeterministic
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic # <<<<<<<<<<<<<<
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2739, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2723, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2739, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2724
+ /* "pywrapfst.pyx":2740
* NON_I_DETERMINISTIC = fst.kNonIDeterministic
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic # <<<<<<<<<<<<<<
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2724, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2740, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2724, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_2) < 0) __PYX_ERR(0, 2740, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2725
+ /* "pywrapfst.pyx":2741
* O_DETERMINISTIC = fst.kODeterministic
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons # <<<<<<<<<<<<<<
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2725, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2741, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2725, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2741, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2726
+ /* "pywrapfst.pyx":2742
* NON_O_DETERMINISTIC = fst.kNonODeterministic
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons # <<<<<<<<<<<<<<
* I_EPSILONS = fst.kIEpsilons
* NO_I_EPSILONS = fst.kNoIEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2742, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2726, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2742, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2727
+ /* "pywrapfst.pyx":2743
* EPSILONS = fst.kEpsilons
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons # <<<<<<<<<<<<<<
* NO_I_EPSILONS = fst.kNoIEpsilons
* O_EPSILONS = fst.kOEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2727, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2743, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2727, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2743, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2728
+ /* "pywrapfst.pyx":2744
* NO_EPSILONS = fst.kNoEpsilons
* I_EPSILONS = fst.kIEpsilons
* NO_I_EPSILONS = fst.kNoIEpsilons # <<<<<<<<<<<<<<
* O_EPSILONS = fst.kOEpsilons
* NO_O_EPSILONS = fst.kNoOEpsilons
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2728, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2744, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2728, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2744, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2729
+ /* "pywrapfst.pyx":2745
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2745, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2729, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2745, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2730
+ /* "pywrapfst.pyx":2746
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2730, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2746, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2730, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_2) < 0) __PYX_ERR(0, 2746, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2731
+ /* "pywrapfst.pyx":2747
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2747, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2731, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2747, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2732
+ /* "pywrapfst.pyx":2748
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2748, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2748, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2733
+ /* "pywrapfst.pyx":2749
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2749, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2733, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2749, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2734
+ /* "pywrapfst.pyx":2750
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2750, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2734, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2750, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2735
+ /* "pywrapfst.pyx":2751
* O_LABEL_SORTED = fst.kOLabelSorted
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
* WEIGHTED = fst.kWeighted # <<<<<<<<<<<<<<
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2735, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_2) < 0) __PYX_ERR(0, 2735, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_2) < 0) __PYX_ERR(0, 2751, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2736
+ /* "pywrapfst.pyx":2752
* NOT_O_LABEL_SORTED = fst.kNotOLabelSorted
* WEIGHTED = fst.kWeighted
* UNWEIGHTED = fst.kUnweighted # <<<<<<<<<<<<<<
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2736, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2752, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_2) < 0) __PYX_ERR(0, 2736, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_2) < 0) __PYX_ERR(0, 2752, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2737
+ /* "pywrapfst.pyx":2753
* WEIGHTED = fst.kWeighted
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic # <<<<<<<<<<<<<<
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2737, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2753, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2737, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2738
+ /* "pywrapfst.pyx":2754
* UNWEIGHTED = fst.kUnweighted
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic # <<<<<<<<<<<<<<
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2754, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2738, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2754, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2739
+ /* "pywrapfst.pyx":2755
* CYCLIC = fst.kCyclic
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic # <<<<<<<<<<<<<<
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2739, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2755, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2739, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2755, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2740
+ /* "pywrapfst.pyx":2756
* ACYCLIC = fst.kAcyclic
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic # <<<<<<<<<<<<<<
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2740, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2756, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2740, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_2) < 0) __PYX_ERR(0, 2756, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2741
+ /* "pywrapfst.pyx":2757
* INITIAL_CYCLIC = fst.kInitialCyclic
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted # <<<<<<<<<<<<<<
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2741, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2757, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2741, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2757, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2742
+ /* "pywrapfst.pyx":2758
* INITIAL_ACYCLIC = fst.kInitialAcyclic
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted # <<<<<<<<<<<<<<
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2758, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2742, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_2) < 0) __PYX_ERR(0, 2758, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2743
+ /* "pywrapfst.pyx":2759
* TOP_SORTED = fst.kTopSorted
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible # <<<<<<<<<<<<<<
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2743, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2759, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2743, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2759, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2744
+ /* "pywrapfst.pyx":2760
* NOT_TOP_SORTED = fst.kNotTopSorted
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible # <<<<<<<<<<<<<<
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2744, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2760, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2744, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2760, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2745
+ /* "pywrapfst.pyx":2761
* ACCESSIBLE = fst.kAccessible
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible # <<<<<<<<<<<<<<
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2745, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2745, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2761, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2746
+ /* "pywrapfst.pyx":2762
* NOT_ACCESSIBLE = fst.kNotAccessible
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible # <<<<<<<<<<<<<<
* STRING = fst.kString
* NOT_STRING = fst.kNotString
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2746, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2762, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2746, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_2) < 0) __PYX_ERR(0, 2762, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2747
+ /* "pywrapfst.pyx":2763
* COACCESSIBLE = fst.kCoAccessible
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString # <<<<<<<<<<<<<<
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2747, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2763, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_2) < 0) __PYX_ERR(0, 2747, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_2) < 0) __PYX_ERR(0, 2763, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2748
+ /* "pywrapfst.pyx":2764
* NOT_COACCESSIBLE = fst.kNotCoAccessible
* STRING = fst.kString
* NOT_STRING = fst.kNotString # <<<<<<<<<<<<<<
* WEIGHTED_CYCLES = fst.kWeightedCycles
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2748, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2764, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_2) < 0) __PYX_ERR(0, 2748, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_2) < 0) __PYX_ERR(0, 2764, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2749
+ /* "pywrapfst.pyx":2765
* STRING = fst.kString
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles # <<<<<<<<<<<<<<
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
* NULL_PROPERTIES = fst.kNullProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2749, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2765, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_2) < 0) __PYX_ERR(0, 2749, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_2) < 0) __PYX_ERR(0, 2765, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2750
+ /* "pywrapfst.pyx":2766
* NOT_STRING = fst.kNotString
* WEIGHTED_CYCLES = fst.kWeightedCycles
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles # <<<<<<<<<<<<<<
* NULL_PROPERTIES = fst.kNullProperties
* COPY_PROPERTIES = fst.kCopyProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2750, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2766, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_2) < 0) __PYX_ERR(0, 2750, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_2) < 0) __PYX_ERR(0, 2766, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2751
+ /* "pywrapfst.pyx":2767
* WEIGHTED_CYCLES = fst.kWeightedCycles
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
* NULL_PROPERTIES = fst.kNullProperties # <<<<<<<<<<<<<<
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2751, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2767, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2751, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2767, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2752
+ /* "pywrapfst.pyx":2768
* UNWEIGHTED_CYCLES = fst.kUnweightedCycles
* NULL_PROPERTIES = fst.kNullProperties
* COPY_PROPERTIES = fst.kCopyProperties # <<<<<<<<<<<<<<
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2752, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2768, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2752, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2768, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2753
+ /* "pywrapfst.pyx":2769
* NULL_PROPERTIES = fst.kNullProperties
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties # <<<<<<<<<<<<<<
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties
* SET_START_PROPERTIES = fst.kSetStartProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2753, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2769, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2753, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2769, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2754
+ /* "pywrapfst.pyx":2770
* COPY_PROPERTIES = fst.kCopyProperties
* INTRINSIC_PROPERTIES = fst.kIntrinsicProperties
* EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties # <<<<<<<<<<<<<<
* SET_START_PROPERTIES = fst.kSetStartProperties
* SET_FINAL_PROPERTIES = fst.kSetFinalProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2754, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2754, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2770, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2755
+ /* "pywrapfst.pyx":2771
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2755, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2771, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2755, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2771, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2756
+ /* "pywrapfst.pyx":2772
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2756, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2772, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2756, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2772, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2757
+ /* "pywrapfst.pyx":2773
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2757, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2773, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2757, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2773, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2758
+ /* "pywrapfst.pyx":2774
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2758, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2774, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2758, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2774, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2759
+ /* "pywrapfst.pyx":2775
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2759, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2775, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2759, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2760
+ /* "pywrapfst.pyx":2776
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2760, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2760, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2776, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2761
+ /* "pywrapfst.pyx":2777
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2761, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2777, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2761, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2777, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2762
+ /* "pywrapfst.pyx":2778
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2762, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2778, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2762, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2778, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2763
+ /* "pywrapfst.pyx":2779
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2763, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2779, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2763, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2779, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2764
+ /* "pywrapfst.pyx":2780
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2764, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2780, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2764, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2780, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2765
+ /* "pywrapfst.pyx":2781
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2765, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2765, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2766
+ /* "pywrapfst.pyx":2782
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2766, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2782, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2766, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2782, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2767
+ /* "pywrapfst.pyx":2783
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2767, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2783, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2767, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2783, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2768
+ /* "pywrapfst.pyx":2784
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2768, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2784, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2768, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2784, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2769
+ /* "pywrapfst.pyx":2785
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2769, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2785, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2769, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2785, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2770
+ /* "pywrapfst.pyx":2786
* 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_2 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2786, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2770, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2786, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2771
+ /* "pywrapfst.pyx":2787
* BINARY_PROPERTIES = fst.kBinaryProperties
* TRINARY_PROPERTIES = fst.kTrinaryProperties
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties # <<<<<<<<<<<<<<
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties
* FST_PROPERTIES = fst.kFstProperties
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2771, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2787, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2771, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2787, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2772
+ /* "pywrapfst.pyx":2788
* TRINARY_PROPERTIES = fst.kTrinaryProperties
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties # <<<<<<<<<<<<<<
* FST_PROPERTIES = fst.kFstProperties
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2772, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2788, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2772, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2788, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":2773
+ /* "pywrapfst.pyx":2789
* POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties
* NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties
* FST_PROPERTIES = fst.kFstProperties # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2773, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2789, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2773, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_2) < 0) __PYX_ERR(0, 2789, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3218
+ /* "pywrapfst.pyx":3234
*
* cdef _Fst _map(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__34 = fst::kDelta;
- /* "pywrapfst.pyx":3231
+ /* "pywrapfst.pyx":3247
*
* cpdef _Fst arcmap(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__35 = fst::kDelta;
- /* "pywrapfst.pyx":3230
+ /* "pywrapfst.pyx":3246
*
*
* cpdef _Fst arcmap(_Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__35 = fst::kDelta;
- /* "pywrapfst.pyx":3334
+ /* "pywrapfst.pyx":3350
*
* cpdef _MutableFst determinize(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__36 = fst::kDelta;
- /* "pywrapfst.pyx":3336
+ /* "pywrapfst.pyx":3352
* float delta=fst.kDelta,
* dt=b"functional",
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__37 = fst::kNoStateId;
- /* "pywrapfst.pyx":3334
+ /* "pywrapfst.pyx":3350
*
* cpdef _MutableFst determinize(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__36 = fst::kDelta;
- /* "pywrapfst.pyx":3336
+ /* "pywrapfst.pyx":3352
* float delta=fst.kDelta,
* dt=b"functional",
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__37 = fst::kNoStateId;
- /* "pywrapfst.pyx":3423
+ /* "pywrapfst.pyx":3439
*
* cpdef _MutableFst disambiguate(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__38 = fst::kDelta;
- /* "pywrapfst.pyx":3424
+ /* "pywrapfst.pyx":3440
* cpdef _MutableFst disambiguate(_Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__39 = fst::kNoStateId;
- /* "pywrapfst.pyx":3423
+ /* "pywrapfst.pyx":3439
*
* cpdef _MutableFst disambiguate(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__38 = fst::kDelta;
- /* "pywrapfst.pyx":3424
+ /* "pywrapfst.pyx":3440
* cpdef _MutableFst disambiguate(_Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__39 = fst::kNoStateId;
- /* "pywrapfst.pyx":3492
+ /* "pywrapfst.pyx":3508
*
*
* cpdef bool equal(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
__pyx_k__40 = fst::kDelta;
__pyx_k__40 = fst::kDelta;
- /* "pywrapfst.pyx":3515
+ /* "pywrapfst.pyx":3531
*
*
* cpdef bool equivalent(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<<
__pyx_k__41 = fst::kDelta;
__pyx_k__41 = fst::kDelta;
- /* "pywrapfst.pyx":3577
+ /* "pywrapfst.pyx":3593
*
*
* cpdef bool isomorphic(_Fst ifst1, _Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<<
__pyx_k__43 = fst::kDelta;
__pyx_k__43 = fst::kDelta;
- /* "pywrapfst.pyx":3604
+ /* "pywrapfst.pyx":3620
*
* cpdef _MutableFst prune(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__44 = fst::kDelta;
- /* "pywrapfst.pyx":3605
+ /* "pywrapfst.pyx":3621
* cpdef _MutableFst prune(_Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__45 = fst::kNoStateId;
- /* "pywrapfst.pyx":3604
+ /* "pywrapfst.pyx":3620
*
* cpdef _MutableFst prune(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__44 = fst::kDelta;
- /* "pywrapfst.pyx":3605
+ /* "pywrapfst.pyx":3621
* cpdef _MutableFst prune(_Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__45 = fst::kNoStateId;
- /* "pywrapfst.pyx":3636
+ /* "pywrapfst.pyx":3652
*
* cpdef _MutableFst push(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__46 = fst::kDelta;
- /* "pywrapfst.pyx":3635
+ /* "pywrapfst.pyx":3651
*
*
* cpdef _MutableFst push(_Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__46 = fst::kDelta;
- /* "pywrapfst.pyx":3690
+ /* "pywrapfst.pyx":3706
* _Fst ifst2,
* int32 npath=1,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__47 = fst::kDelta;
- /* "pywrapfst.pyx":3693
+ /* "pywrapfst.pyx":3709
* time_t seed=0,
* select=b"uniform",
* int32 max_length=INT32_MAX) except *: # <<<<<<<<<<<<<<
*/
__pyx_k__48 = INT32_MAX;
- /* "pywrapfst.pyx":3690
+ /* "pywrapfst.pyx":3706
* _Fst ifst2,
* int32 npath=1,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__47 = fst::kDelta;
- /* "pywrapfst.pyx":3693
+ /* "pywrapfst.pyx":3709
* time_t seed=0,
* select=b"uniform",
* int32 max_length=INT32_MAX) except *: # <<<<<<<<<<<<<<
*/
__pyx_k__48 = INT32_MAX;
- /* "pywrapfst.pyx":3745
+ /* "pywrapfst.pyx":3761
* time_t seed=0,
* select=b"uniform",
* int32 max_length=INT32_MAX, # <<<<<<<<<<<<<<
*/
__pyx_k__50 = INT32_MAX;
- /* "pywrapfst.pyx":3741
+ /* "pywrapfst.pyx":3757
*
*
* cpdef _MutableFst randgen(_Fst ifst, # <<<<<<<<<<<<<<
*/
__pyx_k__50 = INT32_MAX;
- /* "pywrapfst.pyx":3878
+ /* "pywrapfst.pyx":3894
* cpdef _MutableFst rmepsilon(_Fst ifst,
* bool connect=True,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__51 = fst::kDelta;
- /* "pywrapfst.pyx":3879
+ /* "pywrapfst.pyx":3895
* bool connect=True,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__52 = fst::kNoStateId;
- /* "pywrapfst.pyx":3878
+ /* "pywrapfst.pyx":3894
* cpdef _MutableFst rmepsilon(_Fst ifst,
* bool connect=True,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__51 = fst::kDelta;
- /* "pywrapfst.pyx":3879
+ /* "pywrapfst.pyx":3895
* bool connect=True,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__52 = fst::kNoStateId;
- /* "pywrapfst.pyx":3919
+ /* "pywrapfst.pyx":3935
*
* cdef vector[fst.WeightClass] *_shortestdistance(_Fst ifst,
* float delta=fst.kDelta, int64 nstate=fst.kNoStateId, qt=b"auto", # <<<<<<<<<<<<<<
__pyx_k__53 = fst::kDelta;
__pyx_k__54 = fst::kNoStateId;
- /* "pywrapfst.pyx":3937
+ /* "pywrapfst.pyx":3953
*
* def shortestdistance(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__55 = fst::kDelta;
- /* "pywrapfst.pyx":3938
+ /* "pywrapfst.pyx":3954
* def shortestdistance(_Fst ifst,
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__56 = fst::kNoStateId;
- /* "pywrapfst.pyx":3936
+ /* "pywrapfst.pyx":3952
*
*
* def shortestdistance(_Fst ifst, # <<<<<<<<<<<<<<
* float delta=fst.kDelta,
* int64 nstate=fst.kNoStateId,
*/
- __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_49shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3936, __pyx_L1_error)
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_49shortestdistance, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3952, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_2) < 0) __PYX_ERR(0, 3936, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_2) < 0) __PYX_ERR(0, 3952, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":3981
+ /* "pywrapfst.pyx":3997
*
* cpdef _MutableFst shortestpath(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__57 = fst::kDelta;
- /* "pywrapfst.pyx":3983
+ /* "pywrapfst.pyx":3999
* float delta=fst.kDelta,
* int32 nshortest=1,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__58 = fst::kNoStateId;
- /* "pywrapfst.pyx":3981
+ /* "pywrapfst.pyx":3997
*
* cpdef _MutableFst shortestpath(_Fst ifst,
* float delta=fst.kDelta, # <<<<<<<<<<<<<<
*/
__pyx_k__57 = fst::kDelta;
- /* "pywrapfst.pyx":3983
+ /* "pywrapfst.pyx":3999
* float delta=fst.kDelta,
* int32 nshortest=1,
* int64 nstate=fst.kNoStateId, # <<<<<<<<<<<<<<
*/
__pyx_k__58 = fst::kNoStateId;
- /* "pywrapfst.pyx":4135
+ /* "pywrapfst.pyx":4151
*
* def __cinit__(self,
* string fst_type=b"vector", # <<<<<<<<<<<<<<
* string arc_type=b"standard",
* SymbolTable isymbols=None,
*/
- __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_vector); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4135, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_vector); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4151, __pyx_L1_error)
__pyx_k__59 = __pyx_t_6;
- /* "pywrapfst.pyx":4136
+ /* "pywrapfst.pyx":4152
* def __cinit__(self,
* string fst_type=b"vector",
* string arc_type=b"standard", # <<<<<<<<<<<<<<
* SymbolTable isymbols=None,
* SymbolTable osymbols=None,
*/
- __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_standard); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4136, __pyx_L1_error)
+ __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_standard); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4152, __pyx_L1_error)
__pyx_k__60 = __pyx_t_6;
- /* "pywrapfst.pyx":4236
+ /* "pywrapfst.pyx":4252
*
* @classmethod
* def open(cls, *filenames): # <<<<<<<<<<<<<<
* """
* FarReader.open(*filenames)
*/
- __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4236, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_9pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4252, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- /* "pywrapfst.pyx":4235
+ /* "pywrapfst.pyx":4251
* return "<{} FarReader at 0x{:x}>".format(self.far_type(), id(self))
*
* @classmethod # <<<<<<<<<<<<<<
* def open(cls, *filenames):
* """
*/
- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4235, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4251, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__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_1) < 0) __PYX_ERR(0, 4236, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarReader->tp_dict, __pyx_n_s_open, __pyx_t_1) < 0) __PYX_ERR(0, 4252, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_FarReader);
- /* "pywrapfst.pyx":4411
+ /* "pywrapfst.pyx":4427
*
* @classmethod
* def create(cls, filename, arc_type=b"standard", far_type=b"default"): # <<<<<<<<<<<<<<
* """
* FarWriter.
*/
- __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4411, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_9pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4427, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- /* "pywrapfst.pyx":4410
+ /* "pywrapfst.pyx":4426
* return "<{} FarWriter at 0x{:x}>".format(self.far_type(), id(self))
*
* @classmethod # <<<<<<<<<<<<<<
* def create(cls, filename, arc_type=b"standard", far_type=b"default"):
* """
*/
- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4410, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4426, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 4411, __pyx_L1_error)
+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9pywrapfst_FarWriter->tp_dict, __pyx_n_s_create, __pyx_t_2) < 0) __PYX_ERR(0, 4427, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyType_Modified(__pyx_ptype_9pywrapfst_FarWriter);
- /* "pywrapfst.pyx":4503
+ /* "pywrapfst.pyx":4519
*
*
* _fst_error_fatal_old = fst.FLAGS_fst_error_fatal # <<<<<<<<<<<<<<
* fst.FLAGS_fst_error_fatal = False
*
*/
- __pyx_t_2 = __Pyx_PyBool_FromLong(FLAGS_fst_error_fatal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4503, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyBool_FromLong(FLAGS_fst_error_fatal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4519, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_fst_error_fatal_old, __pyx_t_2) < 0) __PYX_ERR(0, 4503, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_fst_error_fatal_old, __pyx_t_2) < 0) __PYX_ERR(0, 4519, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "pywrapfst.pyx":4504
+ /* "pywrapfst.pyx":4520
*
* _fst_error_fatal_old = fst.FLAGS_fst_error_fatal
* fst.FLAGS_fst_error_fatal = False # <<<<<<<<<<<<<<
*/
FLAGS_fst_error_fatal = 0;
- /* "pywrapfst.pyx":4507
+ /* "pywrapfst.pyx":4523
*
*
* @atexit.register # <<<<<<<<<<<<<<
* def _reset_fst_error_fatal():
* fst.FLAGS_fst_error_fatal = _fst_error_fatal_old
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_atexit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_atexit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "pywrapfst.pyx":4508
+ /* "pywrapfst.pyx":4524
*
* @atexit.register
* def _reset_fst_error_fatal(): # <<<<<<<<<<<<<<
* fst.FLAGS_fst_error_fatal = _fst_error_fatal_old
*
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_57_reset_fst_error_fatal, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4508, __pyx_L1_error)
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_9pywrapfst_57_reset_fst_error_fatal, NULL, __pyx_n_s_pywrapfst_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4524, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = NULL;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
}
}
if (!__pyx_t_4) {
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GOTREF(__pyx_t_2);
} else {
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_1};
- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else
#endif
{
- __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
__Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4507, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4523, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_reset_fst_error_fatal, __pyx_t_2) < 0) __PYX_ERR(0, 4508, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_reset_fst_error_fatal, __pyx_t_2) < 0) __PYX_ERR(0, 4524, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "pywrapfst.pyx":1