From 921da43578c40af104d6b959a9a718c6a2d9f8b1 Mon Sep 17 00:00:00 2001 From: Kyle Gorman Date: Sat, 20 Jan 2024 12:42:55 -0500 Subject: [PATCH] Pynini release v2.1.6 --- MANIFEST.in | 2 +- NEWS | 19 +- PKG-INFO | 8 +- README.md | 5 +- bazel/workspace.bzl | 4 +- extensions/_pynini.cpp | 9097 ++++++++------- extensions/_pynini.pyx | 78 +- extensions/_pywrapfst.cpp | 14184 ++++++++++++----------- extensions/_pywrapfst.pxd | 11 +- extensions/_pywrapfst.pyx | 100 +- extensions/cdrewrite.h | 179 +- extensions/cdrewritescript.cc | 7 +- extensions/cdrewritescript.h | 7 +- extensions/checkprops.h | 5 +- extensions/cios.pxd | 4 +- extensions/cmemory.pxd | 4 +- extensions/concatrange.h | 21 +- extensions/concatrangescript.cc | 5 +- extensions/concatrangescript.h | 5 +- extensions/cpynini.pxd | 27 +- extensions/cpywrapfst.pxd | 30 +- extensions/cross.h | 4 +- extensions/crossscript.cc | 5 +- extensions/crossscript.h | 6 +- extensions/defaults.cc | 8 +- extensions/defaults.h | 5 +- extensions/getters.cc | 17 +- extensions/getters.h | 4 +- extensions/lenientlycompose.h | 5 +- extensions/lenientlycomposescript.cc | 7 +- extensions/lenientlycomposescript.h | 7 +- extensions/optimize.h | 6 +- extensions/optimizescript.cc | 4 +- extensions/optimizescript.h | 5 +- extensions/paths.h | 7 +- extensions/pathsscript.cc | 6 +- extensions/pathsscript.h | 11 +- extensions/prefix_tree.h | 10 +- extensions/rewrite.h | 290 - extensions/string-view-fst.h | 62 +- extensions/stringcompile.cc | 7 +- extensions/stringcompile.h | 7 +- extensions/stringcompilescript.cc | 9 +- extensions/stringcompilescript.h | 9 +- extensions/stringfile.cc | 6 +- extensions/stringfile.h | 14 +- extensions/stringmap.h | 22 +- extensions/stringmapscript.cc | 10 +- extensions/stringmapscript.h | 8 +- extensions/stringprint.h | 26 +- extensions/stringprintscript.cc | 9 +- extensions/stringprintscript.h | 7 +- extensions/stringutil.cc | 9 +- extensions/stringutil.h | 4 +- pynini.egg-info/PKG-INFO | 8 +- pynini.egg-info/SOURCES.txt | 4 +- pynini/__init__.py | 2 +- pynini/__init__.pyi | 46 +- pynini/examples/case.py | 4 +- pynini/examples/chatspeak.py | 4 +- pynini/examples/chatspeak_model.py | 4 +- pynini/examples/dates.py | 4 +- pynini/examples/g2p.py | 4 +- pynini/examples/numbers.py | 4 +- pynini/examples/plurals.py | 4 +- pynini/examples/t9.py | 4 +- pynini/examples/weather.py | 4 +- pynini/export/export.py | 4 +- pynini/export/grm.py | 8 +- pynini/export/grm_example.py | 4 +- pynini/export/grm_py_build_defs.bzl | 29 +- pynini/export/multi_grm.py | 12 +- pynini/export/multi_grm_example.py | 4 +- pynini/lib/byte.py | 4 +- pynini/lib/edit_transducer.py | 55 +- pynini/lib/features.py | 4 +- pynini/lib/paradigms.py | 8 +- pynini/lib/pynutil.py | 30 +- pynini/lib/rewrite.py | 4 +- pynini/lib/rule_cascade.py | 4 +- pynini/lib/stringfile.py | 61 + pynini/lib/tagger.py | 4 +- pynini/lib/utf8.py | 4 +- pyproject.toml | 5 +- pywrapfst/__init__.pyi | 24 +- setup.py | 6 +- tests/byte_test.py | 4 +- tests/case_test.py | 4 +- tests/chatspeak_model_test.py | 4 +- tests/chatspeak_test.py | 4 +- tests/dates_test.py | 4 +- tests/edit_transducer_test.py | 4 +- tests/export_test.py | 4 +- tests/features_test.py | 4 +- tests/g2p_test.py | 4 +- tests/grm_test.py | 4 +- tests/multi_grm_test.py | 4 +- tests/numbers_test.py | 4 +- tests/paradigms_test.py | 4 +- tests/plurals_test.py | 4 +- tests/pynini_test.py | 630 +- tests/pynutil_test.py | 38 +- tests/rewrite_test.py | 4 +- tests/rule_cascade_test.py | 4 +- tests/stringfile_test.py | 119 + tests/t9_test.py | 4 +- tests/tagger_test.py | 4 +- tests/utf8_test.py | 4 +- tests/weather_test.py | 4 +- third_party/Dockerfile | 4 +- third_party/bazel/python_configure.bzl | 100 +- 111 files changed, 13230 insertions(+), 12529 deletions(-) delete mode 100644 extensions/rewrite.h create mode 100644 pynini/lib/stringfile.py create mode 100644 tests/stringfile_test.py diff --git a/MANIFEST.in b/MANIFEST.in index 85b2de4..afe139f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,9 @@ include AUTHORS include CHEATSHEET include CONTRIBUTING -include Dockerfile include LICENSE include NEWS +include README.md include requirements.txt include extensions/* include pynini/* diff --git a/NEWS b/NEWS index 73225e4..d061928 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,19 @@ -v. 2.1.5.post1 (compatible with OpenFst 1.8.2) +v. 2.1.6 (compatible with OpenFst 1.8.3) ======================================== +* Simplifies `SymbolTable.read_text` options +* Fixes reversion in MacOS version issue +* Fixes classifiers for Python support + +v. 2.1.5.post2 (compatible with OpenFst 1.8.2.post1) +==================================================== + +* Fixes Cython versioning issue +* Adds support through Python 3.12 + +v. 2.1.5.post1 (compatible with OpenFst 1.8.2) +============================================== + * Added `pyproject.toml` support * Sets minimum MacOS version to 10.12 @@ -14,7 +27,7 @@ v. 2.1.5 (compatible with OpenFst 1.8.2) boolean argument * Modifies `push` and `reweight` to take a string (`to_initial`, `to_final`) rather than a boolean argument -* Removes `int64` (etc.) type shims in place of +* Uses definitions in place of `int64` (etc.) type shims v. 2.1.4 (compatible with OpenFst 1.8.1) ======================================== @@ -242,7 +255,7 @@ v. 1.0 to compile the string, rather than assuming the string is a standard arc FST * Extensive low-level improvements to all string libraries * Adds traditional getter methods in place of Python properties in nearly all - ases + cases * Adds `containment` and `leniently_compose` methods * Adds `epsilon_machine` function * Adds `from_pywrapfst` method for downcasting pywrapfst FSTs diff --git a/PKG-INFO b/PKG-INFO index 90b206f..a53d72e 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pynini -Version: 2.1.5.post2 +Version: 2.1.6 Summary: Finite-state grammar compilation Home-page: http://pynini.opengrm.org Author: Kyle Gorman @@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Other Environment Classifier: Environment :: Console @@ -102,12 +103,13 @@ running `bazel build //:all` anywhere in the source tree. ## Testing To confirm successful installation, run `pip install -r requirements`, then -`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`. +`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`; +a successful run will log some errors to STDERR (this is working as expected). ## Python version support Pynini 2.0.0 and onward support Python 3. Pynini 2.1 versions (onward) drop -Python 2 support. +Python 2 support. The current release supports Python 3.6--3.12. # License diff --git a/README.md b/README.md index 348f57d..8576972 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,13 @@ running `bazel build //:all` anywhere in the source tree. ## Testing To confirm successful installation, run `pip install -r requirements`, then -`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`. +`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`; +a successful run will log some errors to STDERR (this is working as expected). ## Python version support Pynini 2.0.0 and onward support Python 3. Pynini 2.1 versions (onward) drop -Python 2 support. +Python 2 support. The current release supports Python 3.6--3.12. # License diff --git a/bazel/workspace.bzl b/bazel/workspace.bzl index e856f5c..63e0a56 100644 --- a/bazel/workspace.bzl +++ b/bazel/workspace.bzl @@ -115,12 +115,12 @@ def pynini_repositories(name = ""): # ------------------------------------------------------------------------- # Cython: # ------------------------------------------------------------------------- - cython_version = "0.29.24" + cython_version = "3.0.5" http_archive( name = "org_cython", build_file = _clean_dep("//bazel:cython.BUILD.bazel"), urls = ["https://github.com/cython/cython/archive/%s.tar.gz" % cython_version], - sha256 = "a5efb97612f0f97164e87c54cc295b2e2d06c539487670079963adeab872de80", + sha256 = "28eafb657bf3f2f8d78eb7948ebb089be31e51ec76119d84925347c4dea68b59", strip_prefix = "cython-%s" % cython_version, ) diff --git a/extensions/_pynini.cpp b/extensions/_pynini.cpp index d6b3453..e07bcfc 100644 --- a/extensions/_pynini.cpp +++ b/extensions/_pynini.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.3 */ +/* Generated by Cython 3.0.7 */ /* BEGIN: Cython Metadata { @@ -83,15 +83,15 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else -#if CYTHON_LIMITED_API +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_3" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_7" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030003F0 +#define CYTHON_HEX_VERSION 0x030007F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -305,7 +305,7 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif -#elif defined(PY_NOGIL) +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 @@ -650,8 +650,8 @@ class __Pyx_FakeReference { PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; // borrowed - #endif PyObject *py_minor_version = NULL; + #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); @@ -661,6 +661,7 @@ class __Pyx_FakeReference { if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; @@ -681,7 +682,6 @@ class __Pyx_FakeReference { Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); - Py_XDECREF(py_minor_version); if (type) { PyErr_Restore(type, value, traceback); } @@ -876,6 +876,8 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 @@ -951,7 +953,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { } #endif #endif -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() @@ -963,7 +965,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); @@ -1007,7 +1009,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ - PyTypeObject *type = Py_TYPE(obj);\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ @@ -1151,6 +1153,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif +#if PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type @@ -1271,7 +1282,6 @@ static CYTHON_INLINE float __PYX_NAN() { #include #include #include -#include #include #include #include @@ -1624,7 +1634,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_11_ostrings; struct __pyx_obj_7_pynini___pyx_scope_struct_12_weights; struct __pyx_obj_7_pynini___pyx_scope_struct_13__copy_patch; -/* "cpywrapfst.pxd":516 +/* "cpywrapfst.pxd":509 * * * ctypedef pair[int64_t, const FstClass *] LabelFstClassPair # <<<<<<<<<<<<<< @@ -1633,7 +1643,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_13__copy_patch; */ typedef std::pair __pyx_t_10cpywrapfst_LabelFstClassPair; -/* "cpywrapfst.pxd":518 +/* "cpywrapfst.pxd":511 * ctypedef pair[int64_t, const FstClass *] LabelFstClassPair * * ctypedef pair[int64_t, int64_t] LabelPair # <<<<<<<<<<<<<< @@ -1677,7 +1687,7 @@ struct __pyx_opt_args_10_pywrapfst_reverse; struct __pyx_opt_args_10_pywrapfst__shortestdistance; struct __pyx_opt_args_10_pywrapfst_shortestpath; -/* "_pywrapfst.pxd":104 +/* "_pywrapfst.pxd":102 * # SymbolTable. * * ctypedef fst.SymbolTable * SymbolTable_ptr # <<<<<<<<<<<<<< @@ -1686,7 +1696,7 @@ struct __pyx_opt_args_10_pywrapfst_shortestpath; */ typedef fst::SymbolTable *__pyx_t_10_pywrapfst_SymbolTable_ptr; -/* "_pywrapfst.pxd":105 +/* "_pywrapfst.pxd":103 * * ctypedef fst.SymbolTable * SymbolTable_ptr * ctypedef const fst.SymbolTable * const_SymbolTable_ptr # <<<<<<<<<<<<<< @@ -1695,7 +1705,7 @@ typedef fst::SymbolTable *__pyx_t_10_pywrapfst_SymbolTable_ptr; */ typedef fst::SymbolTable const *__pyx_t_10_pywrapfst_const_SymbolTable_ptr; -/* "_pywrapfst.pxd":161 +/* "_pywrapfst.pxd":157 * cdef fst.SymbolTable *_mutable_raw_ptr_or_raise(self) except * * * cpdef int64_t add_symbol(self, symbol, int64_t key=?) except * # <<<<<<<<<<<<<< @@ -1707,7 +1717,7 @@ struct __pyx_opt_args_10_pywrapfst_19_MutableSymbolTable_add_symbol { int64_t key; }; -/* "_pywrapfst.pxd":208 +/* "_pywrapfst.pxd":204 * * * ctypedef fst.EncodeMapperClass * EncodeMapperClass_ptr # <<<<<<<<<<<<<< @@ -1716,7 +1726,7 @@ struct __pyx_opt_args_10_pywrapfst_19_MutableSymbolTable_add_symbol { */ typedef fst::script::EncodeMapperClass *__pyx_t_10_pywrapfst_EncodeMapperClass_ptr; -/* "_pywrapfst.pxd":242 +/* "_pywrapfst.pxd":238 * * * ctypedef fst.FstClass * FstClass_ptr # <<<<<<<<<<<<<< @@ -1725,7 +1735,7 @@ typedef fst::script::EncodeMapperClass *__pyx_t_10_pywrapfst_EncodeMapperClass_p */ typedef fst::script::FstClass *__pyx_t_10_pywrapfst_FstClass_ptr; -/* "_pywrapfst.pxd":243 +/* "_pywrapfst.pxd":239 * * ctypedef fst.FstClass * FstClass_ptr * ctypedef const fst.FstClass * const_FstClass_ptr # <<<<<<<<<<<<<< @@ -1734,7 +1744,7 @@ typedef fst::script::FstClass *__pyx_t_10_pywrapfst_FstClass_ptr; */ typedef fst::script::FstClass const *__pyx_t_10_pywrapfst_const_FstClass_ptr; -/* "_pywrapfst.pxd":244 +/* "_pywrapfst.pxd":240 * ctypedef fst.FstClass * FstClass_ptr * ctypedef const fst.FstClass * const_FstClass_ptr * ctypedef fst.MutableFstClass * MutableFstClass_ptr # <<<<<<<<<<<<<< @@ -1743,7 +1753,7 @@ typedef fst::script::FstClass const *__pyx_t_10_pywrapfst_const_FstClass_ptr; */ typedef fst::script::MutableFstClass *__pyx_t_10_pywrapfst_MutableFstClass_ptr; -/* "_pywrapfst.pxd":245 +/* "_pywrapfst.pxd":241 * ctypedef const fst.FstClass * const_FstClass_ptr * ctypedef fst.MutableFstClass * MutableFstClass_ptr * ctypedef fst.VectorFstClass * VectorFstClass_ptr # <<<<<<<<<<<<<< @@ -1752,7 +1762,7 @@ typedef fst::script::MutableFstClass *__pyx_t_10_pywrapfst_MutableFstClass_ptr; */ typedef fst::script::VectorFstClass *__pyx_t_10_pywrapfst_VectorFstClass_ptr; -/* "_pywrapfst.pxd":261 +/* "_pywrapfst.pxd":257 * cpdef Fst copy(self) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -1778,7 +1788,7 @@ struct __pyx_opt_args_10_pywrapfst_3Fst_draw { bool show_weight_one; }; -/* "_pywrapfst.pxd":293 +/* "_pywrapfst.pxd":289 * cpdef _FstSymbolTableView output_symbols(self) * * cpdef string print(self, # <<<<<<<<<<<<<< @@ -1795,7 +1805,7 @@ struct __pyx_opt_args_10_pywrapfst_3Fst_print { PyObject *missing_sym; }; -/* "_pywrapfst.pxd":326 +/* "_pywrapfst.pxd":322 * cpdef void add_states(self, size_t) * * cdef void _arcsort(self, sort_type=?) except * # <<<<<<<<<<<<<< @@ -1807,7 +1817,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__arcsort { PyObject *sort_type; }; -/* "_pywrapfst.pxd":328 +/* "_pywrapfst.pxd":324 * cdef void _arcsort(self, sort_type=?) except * * * cdef void _closure(self, closure_type=?) # <<<<<<<<<<<<<< @@ -1819,7 +1829,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__closure { PyObject *closure_type; }; -/* "_pywrapfst.pxd":336 +/* "_pywrapfst.pxd":332 * cdef void _decode(self, EncodeMapper) except * * * cdef void _delete_arcs(self, int64_t state, size_t n=?) except * # <<<<<<<<<<<<<< @@ -1831,7 +1841,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__delete_arcs { size_t n; }; -/* "_pywrapfst.pxd":338 +/* "_pywrapfst.pxd":334 * cdef void _delete_arcs(self, int64_t state, size_t n=?) except * * * cdef void _delete_states(self, states=?) except * # <<<<<<<<<<<<<< @@ -1843,7 +1853,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__delete_states { PyObject *states; }; -/* "_pywrapfst.pxd":344 +/* "_pywrapfst.pxd":340 * cdef void _invert(self) * * cdef void _minimize(self, float delta=?, bool allow_nondet=?) except * # <<<<<<<<<<<<<< @@ -1856,7 +1866,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__minimize { bool allow_nondet; }; -/* "_pywrapfst.pxd":352 +/* "_pywrapfst.pxd":348 * cdef void _project(self, project_type) except * * * cdef void _prune(self, float delta=?, int64_t nstate=?, weight=?) except * # <<<<<<<<<<<<<< @@ -1870,7 +1880,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__prune { PyObject *weight; }; -/* "_pywrapfst.pxd":354 +/* "_pywrapfst.pxd":350 * cdef void _prune(self, float delta=?, int64_t nstate=?, weight=?) except * * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -1884,7 +1894,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__push { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":359 +/* "_pywrapfst.pxd":355 * reweight_type=?) * * cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * # <<<<<<<<<<<<<< @@ -1897,7 +1907,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__relabel_pairs { PyObject *opairs; }; -/* "_pywrapfst.pxd":361 +/* "_pywrapfst.pxd":357 * cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -1916,7 +1926,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__relabel_tables { bool attach_new_osymbols; }; -/* "_pywrapfst.pxd":375 +/* "_pywrapfst.pxd":371 * cdef void _reserve_states(self, int64_t n) * * cdef void _reweight(self, potentials, reweight_type=?) except * # <<<<<<<<<<<<<< @@ -1928,7 +1938,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__reweight { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":377 +/* "_pywrapfst.pxd":373 * cdef void _reweight(self, potentials, reweight_type=?) except * * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -1944,7 +1954,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__rmepsilon { float delta; }; -/* "_pywrapfst.pxd":384 +/* "_pywrapfst.pxd":380 * float delta=?) except * * * cdef void _set_final(self, int64_t state, weight=?) except * # <<<<<<<<<<<<<< @@ -1956,7 +1966,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__set_final { PyObject *weight; }; -/* "_pywrapfst.pxd":492 +/* "_pywrapfst.pxd":488 * * * cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<< @@ -1971,7 +1981,7 @@ struct __pyx_opt_args_10_pywrapfst__map { PyObject *weight; }; -/* "_pywrapfst.pxd":494 +/* "_pywrapfst.pxd":490 * cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) * * cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<< @@ -1986,7 +1996,7 @@ struct __pyx_opt_args_10_pywrapfst_arcmap { PyObject *weight; }; -/* "_pywrapfst.pxd":496 +/* "_pywrapfst.pxd":492 * cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< @@ -1999,7 +2009,7 @@ struct __pyx_opt_args_10_pywrapfst_compose { bool connect; }; -/* "_pywrapfst.pxd":501 +/* "_pywrapfst.pxd":497 * bool connect=?) * * cpdef Fst convert(Fst ifst, fst_type=?) # <<<<<<<<<<<<<< @@ -2011,7 +2021,7 @@ struct __pyx_opt_args_10_pywrapfst_convert { PyObject *fst_type; }; -/* "_pywrapfst.pxd":503 +/* "_pywrapfst.pxd":499 * cpdef Fst convert(Fst ifst, fst_type=?) * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< @@ -2028,7 +2038,7 @@ struct __pyx_opt_args_10_pywrapfst_determinize { bool increment_subsequential_label; }; -/* "_pywrapfst.pxd":511 +/* "_pywrapfst.pxd":507 * bool increment_subsequential_label=?) * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< @@ -2041,7 +2051,7 @@ struct __pyx_opt_args_10_pywrapfst_difference { bool connect; }; -/* "_pywrapfst.pxd":516 +/* "_pywrapfst.pxd":512 * bool connect=?) * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< @@ -2056,7 +2066,7 @@ struct __pyx_opt_args_10_pywrapfst_disambiguate { PyObject *weight; }; -/* "_pywrapfst.pxd":522 +/* "_pywrapfst.pxd":518 * weight=?) * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type=?) # <<<<<<<<<<<<<< @@ -2068,7 +2078,7 @@ struct __pyx_opt_args_10_pywrapfst_epsnormalize { PyObject *eps_norm_type; }; -/* "_pywrapfst.pxd":524 +/* "_pywrapfst.pxd":520 * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type=?) * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<< @@ -2080,7 +2090,7 @@ struct __pyx_opt_args_10_pywrapfst_equal { float delta; }; -/* "_pywrapfst.pxd":526 +/* "_pywrapfst.pxd":522 * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?) * * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except * # <<<<<<<<<<<<<< @@ -2092,7 +2102,7 @@ struct __pyx_opt_args_10_pywrapfst_equivalent { float delta; }; -/* "_pywrapfst.pxd":528 +/* "_pywrapfst.pxd":524 * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< @@ -2105,7 +2115,7 @@ struct __pyx_opt_args_10_pywrapfst_intersect { bool connect; }; -/* "_pywrapfst.pxd":533 +/* "_pywrapfst.pxd":529 * bool connect=?) * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<< @@ -2117,7 +2127,7 @@ struct __pyx_opt_args_10_pywrapfst_isomorphic { float delta; }; -/* "_pywrapfst.pxd":535 +/* "_pywrapfst.pxd":531 * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?) * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< @@ -2131,7 +2141,7 @@ struct __pyx_opt_args_10_pywrapfst_prune { PyObject *weight; }; -/* "_pywrapfst.pxd":540 +/* "_pywrapfst.pxd":536 * weight=?) * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< @@ -2148,7 +2158,7 @@ struct __pyx_opt_args_10_pywrapfst_push { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":548 +/* "_pywrapfst.pxd":544 * reweight_type=?) * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< @@ -2164,7 +2174,7 @@ struct __pyx_opt_args_10_pywrapfst_randequivalent { uint64_t seed; }; -/* "_pywrapfst.pxd":556 +/* "_pywrapfst.pxd":552 * uint64_t seed=?) except * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< @@ -2181,7 +2191,7 @@ struct __pyx_opt_args_10_pywrapfst_randgen { uint64_t seed; }; -/* "_pywrapfst.pxd":564 +/* "_pywrapfst.pxd":560 * uint64_t seed=?) * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -2196,7 +2206,7 @@ struct __pyx_opt_args_10_pywrapfst_replace { int64_t return_label; }; -/* "_pywrapfst.pxd":570 +/* "_pywrapfst.pxd":566 * int64_t return_label=?) * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?) # <<<<<<<<<<<<<< @@ -2208,7 +2218,7 @@ struct __pyx_opt_args_10_pywrapfst_reverse { bool require_superinitial; }; -/* "_pywrapfst.pxd":572 +/* "_pywrapfst.pxd":568 * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?) * * cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -2223,7 +2233,7 @@ struct __pyx_opt_args_10_pywrapfst__shortestdistance { bool reverse; }; -/* "_pywrapfst.pxd":579 +/* "_pywrapfst.pxd":575 * bool reverse=?) except * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< @@ -2240,7 +2250,7 @@ struct __pyx_opt_args_10_pywrapfst_shortestpath { PyObject *weight; }; -/* "cpynini.pxd":38 +/* "cpynini.pxd":36 * * * ctypedef pair[int64_t, const FstClass *] LabelFstClassPair # <<<<<<<<<<<<<< @@ -2265,7 +2275,7 @@ struct __pyx_opt_args_7_pynini_mpdt_expand; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; -/* "_pynini.pyx":424 +/* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< @@ -2278,7 +2288,7 @@ struct __pyx_opt_args_7_pynini_3Fst_paths { PyObject *output_token_type; }; -/* "_pynini.pyx":462 +/* "_pynini.pyx":463 * return _StringPathIterator(self, input_token_type, output_token_type) * * cpdef string string(self, token_type=None) except *: # <<<<<<<<<<<<<< @@ -2290,7 +2300,7 @@ struct __pyx_opt_args_7_pynini_3Fst_string { PyObject *token_type; }; -/* "_pynini.pyx":635 +/* "_pynini.pyx":636 * return super().concat(_fst2) * * cdef void _optimize(self, bool compute_props=False) except *: # <<<<<<<<<<<<<< @@ -2302,7 +2312,7 @@ struct __pyx_opt_args_7_pynini_3Fst__optimize { bool compute_props; }; -/* "_pynini.pyx":756 +/* "_pynini.pyx":774 * * * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): # <<<<<<<<<<<<<< @@ -2314,7 +2324,7 @@ struct __pyx_opt_args_7_pynini__compile_or_copy_Fst { PyObject *arc_type; }; -/* "_pynini.pyx":836 +/* "_pynini.pyx":854 * * * cpdef Fst accep(astring, weight=None, arc_type="standard", token_type=None): # <<<<<<<<<<<<<< @@ -2328,7 +2338,7 @@ struct __pyx_opt_args_7_pynini_accep { PyObject *token_type; }; -/* "_pynini.pyx":926 +/* "_pynini.pyx":944 * * * cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): # <<<<<<<<<<<<<< @@ -2341,7 +2351,7 @@ struct __pyx_opt_args_7_pynini_cdrewrite { PyObject *mode; }; -/* "_pynini.pyx":986 +/* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< @@ -2354,7 +2364,7 @@ struct __pyx_opt_args_7_pynini_leniently_compose { bool connect; }; -/* "_pynini.pyx":1033 +/* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< @@ -2368,7 +2378,7 @@ struct __pyx_opt_args_7_pynini_string_file { PyObject *output_token_type; }; -/* "_pynini.pyx":1113 +/* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< @@ -2382,7 +2392,7 @@ struct __pyx_opt_args_7_pynini_string_map { PyObject *output_token_type; }; -/* "_pynini.pyx":1333 +/* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< @@ -2397,7 +2407,7 @@ struct __pyx_opt_args_7_pynini_replace { int64_t return_label; }; -/* "_pynini.pyx":1604 +/* "_pynini.pyx":1621 * * * cdef object _pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -2412,7 +2422,7 @@ struct __pyx_opt_args_7_pynini__pdt_replace { PyObject *right_paren_prefix; }; -/* "_pynini.pyx":1704 +/* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< @@ -2426,7 +2436,7 @@ struct __pyx_opt_args_7_pynini_pdt_shortestpath { bool path_gc; }; -/* "_pynini.pyx":1858 +/* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< @@ -2439,7 +2449,7 @@ struct __pyx_opt_args_7_pynini_mpdt_compose { bool left_mpdt; }; -/* "_pynini.pyx":1908 +/* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< @@ -2455,7 +2465,7 @@ struct __pyx_defaults { int64_t __pyx_arg_start_paren_labels; }; -/* "_pywrapfst.pxd":72 +/* "_pywrapfst.pxd":70 * * * cdef class Weight: # <<<<<<<<<<<<<< @@ -2469,7 +2479,7 @@ struct __pyx_obj_10_pywrapfst_Weight { }; -/* "_pywrapfst.pxd":108 +/* "_pywrapfst.pxd":106 * * * cdef class SymbolTableView: # <<<<<<<<<<<<<< @@ -2482,7 +2492,7 @@ struct __pyx_obj_10_pywrapfst_SymbolTableView { }; -/* "_pywrapfst.pxd":139 +/* "_pywrapfst.pxd":135 * * * cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2496,7 +2506,7 @@ struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView { }; -/* "_pywrapfst.pxd":147 +/* "_pywrapfst.pxd":143 * * * cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2510,7 +2520,7 @@ struct __pyx_obj_10_pywrapfst__FstSymbolTableView { }; -/* "_pywrapfst.pxd":155 +/* "_pywrapfst.pxd":151 * * * cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<< @@ -2522,7 +2532,7 @@ struct __pyx_obj_10_pywrapfst__MutableSymbolTable { }; -/* "_pywrapfst.pxd":168 +/* "_pywrapfst.pxd":164 * * * cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2536,7 +2546,7 @@ struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView { }; -/* "_pywrapfst.pxd":176 +/* "_pywrapfst.pxd":172 * * * cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2549,7 +2559,7 @@ struct __pyx_obj_10_pywrapfst_SymbolTable { }; -/* "_pywrapfst.pxd":199 +/* "_pywrapfst.pxd":195 * * * cdef class _SymbolTableIterator: # <<<<<<<<<<<<<< @@ -2563,7 +2573,7 @@ struct __pyx_obj_10_pywrapfst__SymbolTableIterator { }; -/* "_pywrapfst.pxd":211 +/* "_pywrapfst.pxd":207 * * * cdef class EncodeMapper: # <<<<<<<<<<<<<< @@ -2577,7 +2587,7 @@ struct __pyx_obj_10_pywrapfst_EncodeMapper { }; -/* "_pywrapfst.pxd":248 +/* "_pywrapfst.pxd":244 * * * cdef class Fst: # <<<<<<<<<<<<<< @@ -2591,7 +2601,7 @@ struct __pyx_obj_10_pywrapfst_Fst { }; -/* "_pywrapfst.pxd":314 +/* "_pywrapfst.pxd":310 * * * cdef class MutableFst(Fst): # <<<<<<<<<<<<<< @@ -2604,7 +2614,7 @@ struct __pyx_obj_10_pywrapfst_MutableFst { }; -/* "_pywrapfst.pxd":395 +/* "_pywrapfst.pxd":391 * * * cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<< @@ -2616,7 +2626,7 @@ struct __pyx_obj_10_pywrapfst_VectorFst { }; -/* "_pywrapfst.pxd":417 +/* "_pywrapfst.pxd":413 * * * cdef class Arc: # <<<<<<<<<<<<<< @@ -2630,7 +2640,7 @@ struct __pyx_obj_10_pywrapfst_Arc { }; -/* "_pywrapfst.pxd":427 +/* "_pywrapfst.pxd":423 * * * cdef class _ArcIterator: # <<<<<<<<<<<<<< @@ -2645,7 +2655,7 @@ struct __pyx_obj_10_pywrapfst__ArcIterator { }; -/* "_pywrapfst.pxd":449 +/* "_pywrapfst.pxd":445 * * * cdef class _MutableArcIterator: # <<<<<<<<<<<<<< @@ -2660,7 +2670,7 @@ struct __pyx_obj_10_pywrapfst__MutableArcIterator { }; -/* "_pywrapfst.pxd":473 +/* "_pywrapfst.pxd":469 * * * cdef class _StateIterator: # <<<<<<<<<<<<<< @@ -2675,7 +2685,7 @@ struct __pyx_obj_10_pywrapfst__StateIterator { }; -/* "_pywrapfst.pxd":595 +/* "_pywrapfst.pxd":591 * * * cdef class Compiler: # <<<<<<<<<<<<<< @@ -2695,11 +2705,10 @@ struct __pyx_obj_10_pywrapfst_Compiler { bool _keep_isymbols; bool _keep_osymbols; bool _keep_state_numbering; - bool _allow_negative_labels; }; -/* "_pywrapfst.pxd":616 +/* "_pywrapfst.pxd":611 * # FarReader. * * cdef class FarReader: # <<<<<<<<<<<<<< @@ -2713,7 +2722,7 @@ struct __pyx_obj_10_pywrapfst_FarReader { }; -/* "_pywrapfst.pxd":641 +/* "_pywrapfst.pxd":636 * # FarWriter. * * cdef class FarWriter: # <<<<<<<<<<<<<< @@ -2727,7 +2736,7 @@ struct __pyx_obj_10_pywrapfst_FarWriter { }; -/* "_pynini.pyx":332 +/* "_pynini.pyx":333 * * * cdef class Fst(_VectorFst): # <<<<<<<<<<<<<< @@ -2739,7 +2748,7 @@ struct __pyx_obj_7_pynini_Fst { }; -/* "_pynini.pyx":1189 +/* "_pynini.pyx":1207 * * * cdef class _PointerSymbolTableView(_SymbolTableView): # <<<<<<<<<<<<<< @@ -2752,7 +2761,7 @@ struct __pyx_obj_7_pynini__PointerSymbolTableView { }; -/* "_pynini.pyx":1409 +/* "_pynini.pyx":1427 * * * cdef class PdtParentheses: # <<<<<<<<<<<<<< @@ -2766,7 +2775,7 @@ struct __pyx_obj_7_pynini_PdtParentheses { }; -/* "_pynini.pyx":1751 +/* "_pynini.pyx":1768 * * * cdef class MPdtParentheses: # <<<<<<<<<<<<<< @@ -2781,7 +2790,7 @@ struct __pyx_obj_7_pynini_MPdtParentheses { }; -/* "_pynini.pyx":1983 +/* "_pynini.pyx":1999 * * * cdef class _StringPathIterator: # <<<<<<<<<<<<<< @@ -2795,7 +2804,7 @@ struct __pyx_obj_7_pynini__StringPathIterator { }; -/* "_pynini.pyx":2218 +/* "_pynini.pyx":2234 * * * cdef class Far: # <<<<<<<<<<<<<< @@ -2812,7 +2821,7 @@ struct __pyx_obj_7_pynini_Far { }; -/* "_pynini.pyx":680 +/* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -2825,7 +2834,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct__union { }; -/* "_pynini.pyx":681 +/* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< @@ -2842,7 +2851,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_1_genexpr { }; -/* "_pynini.pyx":1223 +/* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< @@ -2855,7 +2864,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_2__1arg_patch { }; -/* "_pynini.pyx":1244 +/* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< @@ -2868,7 +2877,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_3__shortestdistance_patch { }; -/* "_pynini.pyx":1260 +/* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< @@ -2881,7 +2890,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_4__compose_patch { }; -/* "_pynini.pyx":1275 +/* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< @@ -2894,7 +2903,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_5__difference_patch { }; -/* "_pynini.pyx":1293 +/* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< @@ -2907,7 +2916,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_6__comp_patch { }; -/* "_pynini.pyx":1433 +/* "_pynini.pyx":1451 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -2924,7 +2933,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_7___iter__ { }; -/* "_pynini.pyx":1777 +/* "_pynini.pyx":1794 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -2941,7 +2950,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_8___iter__ { }; -/* "_pynini.pyx":2109 +/* "_pynini.pyx":2125 * return self._paths.get().IString() * * def istrings(self): # <<<<<<<<<<<<<< @@ -2954,7 +2963,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_9_istrings { }; -/* "_pynini.pyx":2125 +/* "_pynini.pyx":2141 * self._paths.get().Next() * * def items(self): # <<<<<<<<<<<<<< @@ -2967,7 +2976,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_10_items { }; -/* "_pynini.pyx":2169 +/* "_pynini.pyx":2185 * return self._paths.get().OString() * * def ostrings(self): # <<<<<<<<<<<<<< @@ -2980,7 +2989,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_11_ostrings { }; -/* "_pynini.pyx":2198 +/* "_pynini.pyx":2214 * return weight * * def weights(self): # <<<<<<<<<<<<<< @@ -2993,7 +3002,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_12_weights { }; -/* "_pynini.pyx":2621 +/* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< @@ -3007,7 +3016,7 @@ struct __pyx_obj_7_pynini___pyx_scope_struct_13__copy_patch { -/* "_pywrapfst.pxd":72 +/* "_pywrapfst.pxd":70 * * * cdef class Weight: # <<<<<<<<<<<<<< @@ -3025,7 +3034,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Weight { static struct __pyx_vtabstruct_10_pywrapfst_Weight *__pyx_vtabptr_10_pywrapfst_Weight; -/* "_pywrapfst.pxd":108 +/* "_pywrapfst.pxd":106 * * * cdef class SymbolTableView: # <<<<<<<<<<<<<< @@ -3046,13 +3055,12 @@ struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView { std::string (*name)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); size_t (*num_symbols)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); void (*write)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch); - void (*write_text)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch); PyObject *(*write_to_string)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *__pyx_vtabptr_10_pywrapfst_SymbolTableView; -/* "_pywrapfst.pxd":139 +/* "_pywrapfst.pxd":135 * * * cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -3066,7 +3074,7 @@ struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView; -/* "_pywrapfst.pxd":147 +/* "_pywrapfst.pxd":143 * * * cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -3080,7 +3088,7 @@ struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView *__pyx_vtabptr_10_pywrapfst__FstSymbolTableView; -/* "_pywrapfst.pxd":155 +/* "_pywrapfst.pxd":151 * * * cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<< @@ -3099,7 +3107,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable { static struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *__pyx_vtabptr_10_pywrapfst__MutableSymbolTable; -/* "_pywrapfst.pxd":168 +/* "_pywrapfst.pxd":164 * * * cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -3113,7 +3121,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView *__pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView; -/* "_pywrapfst.pxd":176 +/* "_pywrapfst.pxd":172 * * * cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -3127,7 +3135,7 @@ struct __pyx_vtabstruct_10_pywrapfst_SymbolTable { static struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *__pyx_vtabptr_10_pywrapfst_SymbolTable; -/* "_pywrapfst.pxd":211 +/* "_pywrapfst.pxd":207 * * * cdef class EncodeMapper: # <<<<<<<<<<<<<< @@ -3149,7 +3157,7 @@ struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper { static struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *__pyx_vtabptr_10_pywrapfst_EncodeMapper; -/* "_pywrapfst.pxd":248 +/* "_pywrapfst.pxd":244 * * * cdef class Fst: # <<<<<<<<<<<<<< @@ -3181,7 +3189,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Fst { static struct __pyx_vtabstruct_10_pywrapfst_Fst *__pyx_vtabptr_10_pywrapfst_Fst; -/* "_pywrapfst.pxd":314 +/* "_pywrapfst.pxd":310 * * * cdef class MutableFst(Fst): # <<<<<<<<<<<<<< @@ -3225,7 +3233,7 @@ struct __pyx_vtabstruct_10_pywrapfst_MutableFst { static struct __pyx_vtabstruct_10_pywrapfst_MutableFst *__pyx_vtabptr_10_pywrapfst_MutableFst; -/* "_pywrapfst.pxd":395 +/* "_pywrapfst.pxd":391 * * * cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<< @@ -3239,7 +3247,7 @@ struct __pyx_vtabstruct_10_pywrapfst_VectorFst { static struct __pyx_vtabstruct_10_pywrapfst_VectorFst *__pyx_vtabptr_10_pywrapfst_VectorFst; -/* "_pywrapfst.pxd":417 +/* "_pywrapfst.pxd":413 * * * cdef class Arc: # <<<<<<<<<<<<<< @@ -3253,7 +3261,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Arc { static struct __pyx_vtabstruct_10_pywrapfst_Arc *__pyx_vtabptr_10_pywrapfst_Arc; -/* "_pywrapfst.pxd":427 +/* "_pywrapfst.pxd":423 * * * cdef class _ArcIterator: # <<<<<<<<<<<<<< @@ -3274,7 +3282,7 @@ struct __pyx_vtabstruct_10_pywrapfst__ArcIterator { static struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *__pyx_vtabptr_10_pywrapfst__ArcIterator; -/* "_pywrapfst.pxd":449 +/* "_pywrapfst.pxd":445 * * * cdef class _MutableArcIterator: # <<<<<<<<<<<<<< @@ -3296,7 +3304,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator { static struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *__pyx_vtabptr_10_pywrapfst__MutableArcIterator; -/* "_pywrapfst.pxd":473 +/* "_pywrapfst.pxd":469 * * * cdef class _StateIterator: # <<<<<<<<<<<<<< @@ -3314,7 +3322,7 @@ struct __pyx_vtabstruct_10_pywrapfst__StateIterator { static struct __pyx_vtabstruct_10_pywrapfst__StateIterator *__pyx_vtabptr_10_pywrapfst__StateIterator; -/* "_pywrapfst.pxd":595 +/* "_pywrapfst.pxd":591 * * * cdef class Compiler: # <<<<<<<<<<<<<< @@ -3329,7 +3337,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Compiler { static struct __pyx_vtabstruct_10_pywrapfst_Compiler *__pyx_vtabptr_10_pywrapfst_Compiler; -/* "_pywrapfst.pxd":616 +/* "_pywrapfst.pxd":611 * # FarReader. * * cdef class FarReader: # <<<<<<<<<<<<<< @@ -3351,7 +3359,7 @@ struct __pyx_vtabstruct_10_pywrapfst_FarReader { static struct __pyx_vtabstruct_10_pywrapfst_FarReader *__pyx_vtabptr_10_pywrapfst_FarReader; -/* "_pywrapfst.pxd":641 +/* "_pywrapfst.pxd":636 * # FarWriter. * * cdef class FarWriter: # <<<<<<<<<<<<<< @@ -3369,7 +3377,7 @@ struct __pyx_vtabstruct_10_pywrapfst_FarWriter { static struct __pyx_vtabstruct_10_pywrapfst_FarWriter *__pyx_vtabptr_10_pywrapfst_FarWriter; -/* "_pynini.pyx":332 +/* "_pynini.pyx":333 * * * cdef class Fst(_VectorFst): # <<<<<<<<<<<<<< @@ -3388,7 +3396,7 @@ struct __pyx_vtabstruct_7_pynini_Fst { static struct __pyx_vtabstruct_7_pynini_Fst *__pyx_vtabptr_7_pynini_Fst; -/* "_pynini.pyx":1189 +/* "_pynini.pyx":1207 * * * cdef class _PointerSymbolTableView(_SymbolTableView): # <<<<<<<<<<<<<< @@ -3402,7 +3410,7 @@ struct __pyx_vtabstruct_7_pynini__PointerSymbolTableView { static struct __pyx_vtabstruct_7_pynini__PointerSymbolTableView *__pyx_vtabptr_7_pynini__PointerSymbolTableView; -/* "_pynini.pyx":1409 +/* "_pynini.pyx":1427 * * * cdef class PdtParentheses: # <<<<<<<<<<<<<< @@ -3418,7 +3426,7 @@ struct __pyx_vtabstruct_7_pynini_PdtParentheses { static struct __pyx_vtabstruct_7_pynini_PdtParentheses *__pyx_vtabptr_7_pynini_PdtParentheses; -/* "_pynini.pyx":1751 +/* "_pynini.pyx":1768 * * * cdef class MPdtParentheses: # <<<<<<<<<<<<<< @@ -3434,7 +3442,7 @@ struct __pyx_vtabstruct_7_pynini_MPdtParentheses { static struct __pyx_vtabstruct_7_pynini_MPdtParentheses *__pyx_vtabptr_7_pynini_MPdtParentheses; -/* "_pynini.pyx":1983 +/* "_pynini.pyx":1999 * * * cdef class _StringPathIterator: # <<<<<<<<<<<<<< @@ -3454,7 +3462,7 @@ struct __pyx_vtabstruct_7_pynini__StringPathIterator { static struct __pyx_vtabstruct_7_pynini__StringPathIterator *__pyx_vtabptr_7_pynini__StringPathIterator; -/* "_pynini.pyx":2218 +/* "_pynini.pyx":2234 * * * cdef class Far: # <<<<<<<<<<<<<< @@ -3779,7 +3787,11 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else @@ -3906,7 +3918,11 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else PyList_SET_ITEM(list, len, x); + #endif __Pyx_SET_SIZE(list, len + 1); return 0; } @@ -4135,25 +4151,29 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_3 -#define __PYX_HAVE_RT_ImportType_proto_3_0_3 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_7 +#define __PYX_HAVE_RT_ImportType_proto_3_0_7 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_7(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_3(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_7(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_3 { - __Pyx_ImportType_CheckSize_Error_3_0_3 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_3 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_3 = 2 +enum __Pyx_ImportType_CheckSize_3_0_7 { + __Pyx_ImportType_CheckSize_Error_3_0_7 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_7 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_7 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_7(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_7 check_size); #endif /* GetVTable.proto */ @@ -4232,7 +4252,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* SetNameInClass.proto */ -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON @@ -4473,11 +4493,11 @@ static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(PyObject *module); /* CheckBinaryVersion.proto */ -static unsigned long __Pyx_get_runtime_version(); +static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* FunctionImport.proto */ -static int __Pyx_ImportFunction_3_0_3(PyObject *module, const char *funcname, void (**f)(void), const char *sig); +static int __Pyx_ImportFunction_3_0_7(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); @@ -4534,8 +4554,6 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s /* Module declarations from "libcpp.vector" */ -/* Module declarations from "cmemory" */ - /* Module declarations from "cios" */ /* Module declarations from "cpywrapfst" */ @@ -4555,8 +4573,8 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *(*__pyx_f_10_pywrapfst_replace) /* Module declarations from "_pynini" */ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &); /*proto*/ -static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(std::string const &); /*proto*/ -static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string const &); /*proto*/ +static fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(std::string const &); /*proto*/ +static fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string const &); /*proto*/ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::string const &); /*proto*/ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string const &); /*proto*/ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *, fst::script::MutableFstClass *); /*proto*/ @@ -5115,15 +5133,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_5union_genexpr(PyObject *__pyx_self, PyO static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_fsts2); /* proto */ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_7_pynini_3Fst_26__ne__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_30__radd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_32__iadd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_34__sub__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_36__rsub__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_38__pow__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /* proto */ #if PY_VERSION_HEX >= 0x03050000 -static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_40__matmul__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ #endif -static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ -static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +#if PY_VERSION_HEX >= 0x03050000 +static PyObject *__pyx_pf_7_pynini_3Fst_42__rmatmul__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +#endif +static PyObject *__pyx_pf_7_pynini_3Fst_44__or__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_46__ror__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_7_pynini_3Fst_48__ior__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_7_pynini__from_pywrapfst(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_fst); /* proto */ static PyObject *__pyx_pf_7_pynini_2_read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename); /* proto */ static PyObject *__pyx_pf_7_pynini_4_read_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_state); /* proto */ @@ -5291,8 +5315,6 @@ typedef struct { #endif #if CYTHON_USE_MODULE_STATE #endif - #if CYTHON_USE_MODULE_STATE - #endif PyTypeObject *__pyx_ptype_10_pywrapfst_Weight; PyTypeObject *__pyx_ptype_10_pywrapfst_SymbolTableView; PyTypeObject *__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView; @@ -7538,8 +7560,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #endif #if CYTHON_USE_MODULE_STATE #endif -#if CYTHON_USE_MODULE_STATE -#endif #define __pyx_ptype_10_pywrapfst_Weight __pyx_mstate_global->__pyx_ptype_10_pywrapfst_Weight #define __pyx_ptype_10_pywrapfst_SymbolTableView __pyx_mstate_global->__pyx_ptype_10_pywrapfst_SymbolTableView #define __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView __pyx_mstate_global->__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView @@ -9478,7 +9498,7 @@ static std::vector __pyx_convert_vector_from_py_std_3a__3a_string( return __pyx_r; } -/* "_pynini.pyx":156 +/* "_pynini.pyx":157 * * * cdef _TokenType _get_token_type(const string &token_type) except *: # <<<<<<<<<<<<<< @@ -9501,7 +9521,7 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_token_type", 1); - /* "_pynini.pyx":174 + /* "_pynini.pyx":175 * """ * cdef _TokenType _token_type * if not GetTokenType(token_type, addr(_token_type)): # <<<<<<<<<<<<<< @@ -9511,18 +9531,18 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ __pyx_t_1 = (!(fst::script::GetTokenType(__pyx_v_token_type, (&__pyx_v__token_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":175 + /* "_pynini.pyx":176 * cdef _TokenType _token_type * if not GetTokenType(token_type, addr(_token_type)): * raise FstArgError(f"Unknown token type: {token_type}") # <<<<<<<<<<<<<< * return _token_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_token_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_token_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_token_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_token_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9544,15 +9564,15 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __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, 175, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) - /* "_pynini.pyx":174 + /* "_pynini.pyx":175 * """ * cdef _TokenType _token_type * if not GetTokenType(token_type, addr(_token_type)): # <<<<<<<<<<<<<< @@ -9561,7 +9581,7 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ */ } - /* "_pynini.pyx":176 + /* "_pynini.pyx":177 * if not GetTokenType(token_type, addr(_token_type)): * raise FstArgError(f"Unknown token type: {token_type}") * return _token_type # <<<<<<<<<<<<<< @@ -9571,7 +9591,7 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ __pyx_r = __pyx_v__token_type; goto __pyx_L0; - /* "_pynini.pyx":156 + /* "_pynini.pyx":157 * * * cdef _TokenType _get_token_type(const string &token_type) except *: # <<<<<<<<<<<<<< @@ -9592,7 +9612,7 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ return __pyx_r; } -/* "_pynini.pyx":179 +/* "_pynini.pyx":180 * * * cdef _CDRewriteDirection _get_cdrewrite_direction( # <<<<<<<<<<<<<< @@ -9600,9 +9620,9 @@ static fst::TokenType __pyx_f_7_pynini__get_token_type(std::string const &__pyx_ * """Matches string with the appropriate CDRewriteDirection enum value. */ -static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(std::string const &__pyx_v_direction) { - enum fst::CDRewriteDirection __pyx_v__direction; - enum fst::CDRewriteDirection __pyx_r; +static fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(std::string const &__pyx_v_direction) { + fst::CDRewriteDirection __pyx_v__direction; + fst::CDRewriteDirection __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -9615,7 +9635,7 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_cdrewrite_direction", 1); - /* "_pynini.pyx":198 + /* "_pynini.pyx":199 * """ * cdef _CDRewriteDirection _direction * if not GetCDRewriteDirection(direction, addr(_direction)): # <<<<<<<<<<<<<< @@ -9625,26 +9645,26 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st __pyx_t_1 = (!(fst::script::GetCDRewriteDirection(__pyx_v_direction, (&__pyx_v__direction)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":199 + /* "_pynini.pyx":200 * cdef _CDRewriteDirection _direction * if not GetCDRewriteDirection(direction, addr(_direction)): * raise FstArgError( # <<<<<<<<<<<<<< * f"Unknown context-dependent rewrite direction: {direction}") * return _direction */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pynini.pyx":200 + /* "_pynini.pyx":201 * if not GetCDRewriteDirection(direction, addr(_direction)): * raise FstArgError( * f"Unknown context-dependent rewrite direction: {direction}") # <<<<<<<<<<<<<< * return _direction * */ - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_direction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_direction); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_context_dependent_rewrit, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_context_dependent_rewrit, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9666,15 +9686,15 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __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, 199, __pyx_L1_error) + __PYX_ERR(0, 200, __pyx_L1_error) - /* "_pynini.pyx":198 + /* "_pynini.pyx":199 * """ * cdef _CDRewriteDirection _direction * if not GetCDRewriteDirection(direction, addr(_direction)): # <<<<<<<<<<<<<< @@ -9683,7 +9703,7 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st */ } - /* "_pynini.pyx":201 + /* "_pynini.pyx":202 * raise FstArgError( * f"Unknown context-dependent rewrite direction: {direction}") * return _direction # <<<<<<<<<<<<<< @@ -9693,7 +9713,7 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st __pyx_r = __pyx_v__direction; goto __pyx_L0; - /* "_pynini.pyx":179 + /* "_pynini.pyx":180 * * * cdef _CDRewriteDirection _get_cdrewrite_direction( # <<<<<<<<<<<<<< @@ -9708,13 +9728,13 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("_pynini._get_cdrewrite_direction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (enum fst::CDRewriteDirection) 0; + __pyx_r = (fst::CDRewriteDirection) 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_pynini.pyx":204 +/* "_pynini.pyx":205 * * * cdef _CDRewriteMode _get_cdrewrite_mode(const string &mode) except *: # <<<<<<<<<<<<<< @@ -9722,9 +9742,9 @@ static enum fst::CDRewriteDirection __pyx_f_7_pynini__get_cdrewrite_direction(st * */ -static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string const &__pyx_v_mode) { - enum fst::CDRewriteMode __pyx_v__mode; - enum fst::CDRewriteMode __pyx_r; +static fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string const &__pyx_v_mode) { + fst::CDRewriteMode __pyx_v__mode; + fst::CDRewriteMode __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; @@ -9737,7 +9757,7 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_cdrewrite_mode", 1); - /* "_pynini.pyx":222 + /* "_pynini.pyx":223 * """ * cdef _CDRewriteMode _mode * if not GetCDRewriteMode(mode, addr(_mode)): # <<<<<<<<<<<<<< @@ -9747,26 +9767,26 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string __pyx_t_1 = (!(fst::script::GetCDRewriteMode(__pyx_v_mode, (&__pyx_v__mode)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":223 + /* "_pynini.pyx":224 * cdef _CDRewriteMode _mode * if not GetCDRewriteMode(mode, addr(_mode)): * raise FstArgError( # <<<<<<<<<<<<<< * f"Unknown context-dependent rewrite mode: {mode}") * return _mode */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pynini.pyx":224 + /* "_pynini.pyx":225 * if not GetCDRewriteMode(mode, addr(_mode)): * raise FstArgError( * f"Unknown context-dependent rewrite mode: {mode}") # <<<<<<<<<<<<<< * return _mode * */ - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_context_dependent_rewrit_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_context_dependent_rewrit_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9788,15 +9808,15 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __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, 223, __pyx_L1_error) + __PYX_ERR(0, 224, __pyx_L1_error) - /* "_pynini.pyx":222 + /* "_pynini.pyx":223 * """ * cdef _CDRewriteMode _mode * if not GetCDRewriteMode(mode, addr(_mode)): # <<<<<<<<<<<<<< @@ -9805,7 +9825,7 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string */ } - /* "_pynini.pyx":225 + /* "_pynini.pyx":226 * raise FstArgError( * f"Unknown context-dependent rewrite mode: {mode}") * return _mode # <<<<<<<<<<<<<< @@ -9815,7 +9835,7 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string __pyx_r = __pyx_v__mode; goto __pyx_L0; - /* "_pynini.pyx":204 + /* "_pynini.pyx":205 * * * cdef _CDRewriteMode _get_cdrewrite_mode(const string &mode) except *: # <<<<<<<<<<<<<< @@ -9830,13 +9850,13 @@ static enum fst::CDRewriteMode __pyx_f_7_pynini__get_cdrewrite_mode(std::string __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("_pynini._get_cdrewrite_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (enum fst::CDRewriteMode) 0; + __pyx_r = (fst::CDRewriteMode) 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_pynini.pyx":228 +/* "_pynini.pyx":229 * * * cdef PdtComposeFilter _get_pdt_compose_filter( # <<<<<<<<<<<<<< @@ -9859,7 +9879,7 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_pdt_compose_filter", 1); - /* "_pynini.pyx":244 + /* "_pynini.pyx":245 * """ * cdef PdtComposeFilter _compose_filter * if not GetPdtComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<< @@ -9869,18 +9889,18 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin __pyx_t_1 = (!(fst::script::GetPdtComposeFilter(__pyx_v_compose_filter, (&__pyx_v__compose_filter)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":245 + /* "_pynini.pyx":246 * cdef PdtComposeFilter _compose_filter * if not GetPdtComposeFilter(compose_filter, addr(_compose_filter)): * raise FstArgError(f"Unknown PDT compose filter type: {compose_filter}") # <<<<<<<<<<<<<< * return _compose_filter * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_PDT_compose_filter_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_PDT_compose_filter_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -9902,15 +9922,15 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __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, 245, __pyx_L1_error) + __PYX_ERR(0, 246, __pyx_L1_error) - /* "_pynini.pyx":244 + /* "_pynini.pyx":245 * """ * cdef PdtComposeFilter _compose_filter * if not GetPdtComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<< @@ -9919,7 +9939,7 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin */ } - /* "_pynini.pyx":246 + /* "_pynini.pyx":247 * if not GetPdtComposeFilter(compose_filter, addr(_compose_filter)): * raise FstArgError(f"Unknown PDT compose filter type: {compose_filter}") * return _compose_filter # <<<<<<<<<<<<<< @@ -9929,7 +9949,7 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin __pyx_r = __pyx_v__compose_filter; goto __pyx_L0; - /* "_pynini.pyx":228 + /* "_pynini.pyx":229 * * * cdef PdtComposeFilter _get_pdt_compose_filter( # <<<<<<<<<<<<<< @@ -9950,7 +9970,7 @@ static fst::PdtComposeFilter __pyx_f_7_pynini__get_pdt_compose_filter(std::strin return __pyx_r; } -/* "_pynini.pyx":249 +/* "_pynini.pyx":250 * * * cdef PdtParserType _get_pdt_parser_type(const string &pdt_parser_type) except *: # <<<<<<<<<<<<<< @@ -9973,7 +9993,7 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_pdt_parser_type", 1); - /* "_pynini.pyx":267 + /* "_pynini.pyx":268 * """ * cdef PdtParserType _pdt_parser_type * if not GetPdtParserType(pdt_parser_type, addr(_pdt_parser_type)): # <<<<<<<<<<<<<< @@ -9983,18 +10003,18 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons __pyx_t_1 = (!(fst::script::GetPdtParserType(__pyx_v_pdt_parser_type, (&__pyx_v__pdt_parser_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":268 + /* "_pynini.pyx":269 * cdef PdtParserType _pdt_parser_type * if not GetPdtParserType(pdt_parser_type, addr(_pdt_parser_type)): * raise FstArgError(f"Unknown PDT parser type: {pdt_parser_type}") # <<<<<<<<<<<<<< * return _pdt_parser_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pdt_parser_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_pdt_parser_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_PDT_parser_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_PDT_parser_type, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -10016,15 +10036,15 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __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, 268, __pyx_L1_error) + __PYX_ERR(0, 269, __pyx_L1_error) - /* "_pynini.pyx":267 + /* "_pynini.pyx":268 * """ * cdef PdtParserType _pdt_parser_type * if not GetPdtParserType(pdt_parser_type, addr(_pdt_parser_type)): # <<<<<<<<<<<<<< @@ -10033,7 +10053,7 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons */ } - /* "_pynini.pyx":269 + /* "_pynini.pyx":270 * if not GetPdtParserType(pdt_parser_type, addr(_pdt_parser_type)): * raise FstArgError(f"Unknown PDT parser type: {pdt_parser_type}") * return _pdt_parser_type # <<<<<<<<<<<<<< @@ -10043,7 +10063,7 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons __pyx_r = __pyx_v__pdt_parser_type; goto __pyx_L0; - /* "_pynini.pyx":249 + /* "_pynini.pyx":250 * * * cdef PdtParserType _get_pdt_parser_type(const string &pdt_parser_type) except *: # <<<<<<<<<<<<<< @@ -10064,7 +10084,7 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons return __pyx_r; } -/* "_pynini.pyx":272 +/* "_pynini.pyx":273 * * * cdef void _maybe_arcsort(MutableFstClass *fst1, MutableFstClass *fst2): # <<<<<<<<<<<<<< @@ -10075,7 +10095,7 @@ static fst::PdtParserType __pyx_f_7_pynini__get_pdt_parser_type(std::string cons static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_v_fst1, fst::script::MutableFstClass *__pyx_v_fst2) { int __pyx_t_1; - /* "_pynini.pyx":283 + /* "_pynini.pyx":284 * # It is probably much quicker to force recomputation of the property (if * # necessary) to call the underlying sort on a vector of arcs. * if fst1.Properties(kOLabelSorted, True) != kOLabelSorted: # <<<<<<<<<<<<<< @@ -10085,7 +10105,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ __pyx_t_1 = (__pyx_v_fst1->Properties(fst::kOLabelSorted, 1) != fst::kOLabelSorted); if (__pyx_t_1) { - /* "_pynini.pyx":284 + /* "_pynini.pyx":285 * # necessary) to call the underlying sort on a vector of arcs. * if fst1.Properties(kOLabelSorted, True) != kOLabelSorted: * ArcSort(fst1, ArcSortType.OLABEL_SORT) # <<<<<<<<<<<<<< @@ -10094,7 +10114,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ */ fst::script::ArcSort(__pyx_v_fst1, fst::script::ArcSortType::OLABEL); - /* "_pynini.pyx":283 + /* "_pynini.pyx":284 * # It is probably much quicker to force recomputation of the property (if * # necessary) to call the underlying sort on a vector of arcs. * if fst1.Properties(kOLabelSorted, True) != kOLabelSorted: # <<<<<<<<<<<<<< @@ -10103,7 +10123,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ */ } - /* "_pynini.pyx":285 + /* "_pynini.pyx":286 * if fst1.Properties(kOLabelSorted, True) != kOLabelSorted: * ArcSort(fst1, ArcSortType.OLABEL_SORT) * if fst2.Properties(kILabelSorted, True) != kILabelSorted: # <<<<<<<<<<<<<< @@ -10113,7 +10133,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ __pyx_t_1 = (__pyx_v_fst2->Properties(fst::kILabelSorted, 1) != fst::kILabelSorted); if (__pyx_t_1) { - /* "_pynini.pyx":286 + /* "_pynini.pyx":287 * ArcSort(fst1, ArcSortType.OLABEL_SORT) * if fst2.Properties(kILabelSorted, True) != kILabelSorted: * ArcSort(fst2, ArcSortType.ILABEL_SORT) # <<<<<<<<<<<<<< @@ -10122,7 +10142,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ */ fst::script::ArcSort(__pyx_v_fst2, fst::script::ArcSortType::ILABEL); - /* "_pynini.pyx":285 + /* "_pynini.pyx":286 * if fst1.Properties(kOLabelSorted, True) != kOLabelSorted: * ArcSort(fst1, ArcSortType.OLABEL_SORT) * if fst2.Properties(kILabelSorted, True) != kILabelSorted: # <<<<<<<<<<<<<< @@ -10131,7 +10151,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ */ } - /* "_pynini.pyx":272 + /* "_pynini.pyx":273 * * * cdef void _maybe_arcsort(MutableFstClass *fst1, MutableFstClass *fst2): # <<<<<<<<<<<<<< @@ -10142,7 +10162,7 @@ static void __pyx_f_7_pynini__maybe_arcsort(fst::script::MutableFstClass *__pyx_ /* function exit code */ } -/* "_pynini.pyx":309 +/* "_pynini.pyx":310 * """ * * def __init__(self, token_type): # <<<<<<<<<<<<<< @@ -10206,7 +10226,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -10214,14 +10234,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 309, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 310, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 309, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 310, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -10234,7 +10254,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 309, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 310, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10269,16 +10289,16 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type___init__(CYTHON_UNUSED P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pynini.pyx":310 + /* "_pynini.pyx":311 * * def __init__(self, token_type): * self._token_type = token_type # <<<<<<<<<<<<<< * * def __enter__(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2, __pyx_v_token_type) < 0) __PYX_ERR(0, 310, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2, __pyx_v_token_type) < 0) __PYX_ERR(0, 311, __pyx_L1_error) - /* "_pynini.pyx":309 + /* "_pynini.pyx":310 * """ * * def __init__(self, token_type): # <<<<<<<<<<<<<< @@ -10298,7 +10318,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type___init__(CYTHON_UNUSED P return __pyx_r; } -/* "_pynini.pyx":312 +/* "_pynini.pyx":313 * self._token_type = token_type * * def __enter__(self): # <<<<<<<<<<<<<< @@ -10359,12 +10379,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 313, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__enter__") < 0)) __PYX_ERR(0, 312, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__enter__") < 0)) __PYX_ERR(0, 313, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -10375,7 +10395,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 312, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 313, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10419,7 +10439,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__enter__", 1); - /* "_pynini.pyx":314 + /* "_pynini.pyx":315 * def __enter__(self): * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL # <<<<<<<<<<<<<< @@ -10428,26 +10448,26 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED */ __pyx_v__symbols = NULL; - /* "_pynini.pyx":315 + /* "_pynini.pyx":316 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if isinstance(self._token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> self._token_type)._raw_ptr_or_raise() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "_pynini.pyx":316 + /* "_pynini.pyx":317 * cdef const_SymbolTable_ptr _symbols = NULL * if isinstance(self._token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -10456,24 +10476,24 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED */ __pyx_v__token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":317 + /* "_pynini.pyx":318 * if isinstance(self._token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> self._token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< * else: * _token_type = _get_token_type(tostring(self._token_type)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 317, __pyx_L1_error) + __PYX_ERR(0, 318, __pyx_L1_error) } - __pyx_t_5 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_t_3)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_t_3)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v__symbols = __pyx_t_5; - /* "_pynini.pyx":315 + /* "_pynini.pyx":316 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if isinstance(self._token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -10483,7 +10503,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED goto __pyx_L3; } - /* "_pynini.pyx":319 + /* "_pynini.pyx":320 * _symbols = (<_SymbolTableView> self._token_type)._raw_ptr_or_raise() * else: * _token_type = _get_token_type(tostring(self._token_type)) # <<<<<<<<<<<<<< @@ -10491,16 +10511,16 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_token_type_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __pyx_f_7_pynini__get_token_type(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7_pynini__get_token_type(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L1_error) __pyx_v__token_type = __pyx_t_7; } __pyx_L3:; - /* "_pynini.pyx":320 + /* "_pynini.pyx":321 * else: * _token_type = _get_token_type(tostring(self._token_type)) * PushDefaults(_token_type, _symbols) # <<<<<<<<<<<<<< @@ -10509,7 +10529,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED */ fst::PushDefaults(__pyx_v__token_type, __pyx_v__symbols); - /* "_pynini.pyx":312 + /* "_pynini.pyx":313 * self._token_type = token_type * * def __enter__(self): # <<<<<<<<<<<<<< @@ -10532,7 +10552,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_2__enter__(CYTHON_UNUSED return __pyx_r; } -/* "_pynini.pyx":322 +/* "_pynini.pyx":323 * PushDefaults(_token_type, _symbols) * * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<< @@ -10602,7 +10622,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -10610,9 +10630,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 1); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 1); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -10620,9 +10640,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 2); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 2); __PYX_ERR(0, 323, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -10630,14 +10650,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 3); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, 3); __PYX_ERR(0, 323, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 322, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 323, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -10654,7 +10674,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 322, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 323, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10686,7 +10706,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_4__exit__(CYTHON_UNUSED __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__", 1); - /* "_pynini.pyx":323 + /* "_pynini.pyx":324 * * def __exit__(self, exc_type, exc_value, traceback): * PopDefaults() # <<<<<<<<<<<<<< @@ -10695,7 +10715,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_4__exit__(CYTHON_UNUSED */ fst::PopDefaults(); - /* "_pynini.pyx":322 + /* "_pynini.pyx":323 * PushDefaults(_token_type, _symbols) * * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<< @@ -10710,7 +10730,7 @@ static PyObject *__pyx_pf_7_pynini_18default_token_type_4__exit__(CYTHON_UNUSED return __pyx_r; } -/* "_pynini.pyx":343 +/* "_pynini.pyx":344 * """ * * cdef void _from_MutableFstClass(self, MutableFstClass *tfst): # <<<<<<<<<<<<<< @@ -10723,7 +10743,7 @@ static void __pyx_f_7_pynini_3Fst__from_MutableFstClass(struct __pyx_obj_7_pynin const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":351 + /* "_pynini.pyx":352 * This method is not visible to Python users. * """ * self._fst.reset(tfst) # <<<<<<<<<<<<<< @@ -10732,11 +10752,11 @@ static void __pyx_f_7_pynini_3Fst__from_MutableFstClass(struct __pyx_obj_7_pynin */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 351, __pyx_L1_error) + __PYX_ERR(0, 352, __pyx_L1_error) } __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._fst.reset(__pyx_v_tfst); - /* "_pynini.pyx":352 + /* "_pynini.pyx":353 * """ * self._fst.reset(tfst) * self._mfst = static_pointer_cast[MutableFstClass, FstClass](self._fst) # <<<<<<<<<<<<<< @@ -10745,15 +10765,15 @@ static void __pyx_f_7_pynini_3Fst__from_MutableFstClass(struct __pyx_obj_7_pynin */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 352, __pyx_L1_error) + __PYX_ERR(0, 353, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 352, __pyx_L1_error) + __PYX_ERR(0, 353, __pyx_L1_error) } __pyx_v_self->__pyx_base.__pyx_base._mfst = std::static_pointer_cast(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._fst); - /* "_pynini.pyx":343 + /* "_pynini.pyx":344 * """ * * cdef void _from_MutableFstClass(self, MutableFstClass *tfst): # <<<<<<<<<<<<<< @@ -10768,7 +10788,7 @@ static void __pyx_f_7_pynini_3Fst__from_MutableFstClass(struct __pyx_obj_7_pynin __pyx_L0:; } -/* "_pynini.pyx":354 +/* "_pynini.pyx":355 * self._mfst = static_pointer_cast[MutableFstClass, FstClass](self._fst) * * def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<< @@ -10812,12 +10832,12 @@ static int __pyx_pw_7_pynini_3Fst_1__init__(PyObject *__pyx_v_self, PyObject *__ if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 354, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 354, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 355, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -10831,7 +10851,7 @@ static int __pyx_pw_7_pynini_3Fst_1__init__(PyObject *__pyx_v_self, PyObject *__ } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 354, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 355, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10874,17 +10894,17 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pynini.pyx":356 + /* "_pynini.pyx":357 * def __init__(self, arc_type="standard"): * cdef unique_ptr[VectorFstClass] _tfst * _tfst.reset(new VectorFstClass(tostring(arc_type))) # <<<<<<<<<<<<<< * if _tfst.get().Properties(kError, True) == kError: * raise FstArgError(f"Unknown arc type: {arc_type}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pynini.pyx":357 + /* "_pynini.pyx":358 * cdef unique_ptr[VectorFstClass] _tfst * _tfst.reset(new VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(kError, True) == kError: # <<<<<<<<<<<<<< @@ -10894,18 +10914,18 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ __pyx_t_2 = (__pyx_v__tfst.get()->Properties(fst::kError, 1) == fst::kError); if (unlikely(__pyx_t_2)) { - /* "_pynini.pyx":358 + /* "_pynini.pyx":359 * _tfst.reset(new VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(kError, True) == kError: * raise FstArgError(f"Unknown arc type: {arc_type}") # <<<<<<<<<<<<<< * self._from_MutableFstClass(_tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_arc_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_arc_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10927,15 +10947,15 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 358, __pyx_L1_error) + __PYX_ERR(0, 359, __pyx_L1_error) - /* "_pynini.pyx":357 + /* "_pynini.pyx":358 * cdef unique_ptr[VectorFstClass] _tfst * _tfst.reset(new VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(kError, True) == kError: # <<<<<<<<<<<<<< @@ -10944,7 +10964,7 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ */ } - /* "_pynini.pyx":359 + /* "_pynini.pyx":360 * if _tfst.get().Properties(kError, True) == kError: * raise FstArgError(f"Unknown arc type: {arc_type}") * self._from_MutableFstClass(_tfst.release()) # <<<<<<<<<<<<<< @@ -10953,11 +10973,11 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_from_MutableFstClass"); - __PYX_ERR(0, 359, __pyx_L1_error) + __PYX_ERR(0, 360, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_from_MutableFstClass(__pyx_v_self, __pyx_v__tfst.release()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_from_MutableFstClass(__pyx_v_self, __pyx_v__tfst.release()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 360, __pyx_L1_error) - /* "_pynini.pyx":354 + /* "_pynini.pyx":355 * self._mfst = static_pointer_cast[MutableFstClass, FstClass](self._fst) * * def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<< @@ -10980,7 +11000,7 @@ static int __pyx_pf_7_pynini_3Fst___init__(struct __pyx_obj_7_pynini_Fst *__pyx_ return __pyx_r; } -/* "_pynini.pyx":361 +/* "_pynini.pyx":362 * self._from_MutableFstClass(_tfst.release()) * * @classmethod # <<<<<<<<<<<<<< @@ -11042,12 +11062,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_pywrapfst") < 0)) __PYX_ERR(0, 361, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_pywrapfst") < 0)) __PYX_ERR(0, 362, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -11058,7 +11078,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pywrapfst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 361, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pywrapfst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 362, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11072,7 +11092,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_10_pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_10_pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 363, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_3Fst_2from_pywrapfst(((PyTypeObject*)__pyx_v_cls), __pyx_v_fst); /* function exit code */ @@ -11099,7 +11119,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_2from_pywrapfst(CYTHON_UNUSED PyTypeObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_pywrapfst", 1); - /* "_pynini.pyx":381 + /* "_pynini.pyx":382 * An FST of type Fst. * """ * return _from_pywrapfst(fst) # <<<<<<<<<<<<<< @@ -11107,13 +11127,13 @@ static PyObject *__pyx_pf_7_pynini_3Fst_2from_pywrapfst(CYTHON_UNUSED PyTypeObje * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(__pyx_v_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(__pyx_v_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":361 + /* "_pynini.pyx":362 * self._from_MutableFstClass(_tfst.release()) * * @classmethod # <<<<<<<<<<<<<< @@ -11132,7 +11152,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_2from_pywrapfst(CYTHON_UNUSED PyTypeObje return __pyx_r; } -/* "_pynini.pyx":383 +/* "_pynini.pyx":384 * return _from_pywrapfst(fst) * * @classmethod # <<<<<<<<<<<<<< @@ -11194,12 +11214,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 383, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 384, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 383, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 384, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -11210,7 +11230,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 383, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 384, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11246,7 +11266,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4read(CYTHON_UNUSED PyTypeObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pynini.pyx":399 + /* "_pynini.pyx":400 * FstIOError: Read failed. * """ * return _read(filename) # <<<<<<<<<<<<<< @@ -11254,13 +11274,13 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4read(CYTHON_UNUSED PyTypeObject *__pyx_ * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":383 + /* "_pynini.pyx":384 * return _from_pywrapfst(fst) * * @classmethod # <<<<<<<<<<<<<< @@ -11279,7 +11299,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4read(CYTHON_UNUSED PyTypeObject *__pyx_ return __pyx_r; } -/* "_pynini.pyx":401 +/* "_pynini.pyx":402 * return _read(filename) * * @classmethod # <<<<<<<<<<<<<< @@ -11341,12 +11361,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 401, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 402, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -11357,7 +11377,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 401, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 402, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11393,7 +11413,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_6read_from_string(CYTHON_UNUSED PyTypeOb int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_from_string", 1); - /* "_pynini.pyx":417 + /* "_pynini.pyx":418 * FstIOError: Read failed. * """ * return _read_from_string(state) # <<<<<<<<<<<<<< @@ -11401,13 +11421,13 @@ static PyObject *__pyx_pf_7_pynini_3Fst_6read_from_string(CYTHON_UNUSED PyTypeOb * # Registers the class for pickling. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":401 + /* "_pynini.pyx":402 * return _read(filename) * * @classmethod # <<<<<<<<<<<<<< @@ -11426,7 +11446,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_6read_from_string(CYTHON_UNUSED PyTypeOb return __pyx_r; } -/* "_pynini.pyx":421 +/* "_pynini.pyx":422 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -11486,7 +11506,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_8__reduce__(struct __pyx_obj_7_pynini_Fs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 1); - /* "_pynini.pyx":422 + /* "_pynini.pyx":423 * * def __reduce__(self): * return (_read_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -11494,32 +11514,32 @@ static PyObject *__pyx_pf_7_pynini_3Fst_8__reduce__(struct __pyx_obj_7_pynini_Fs * cpdef _StringPathIterator paths(self, input_token_type=None, */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 422, __pyx_L1_error) + __PYX_ERR(0, 423, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.write_to_string(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.write_to_string(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 423, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":421 + /* "_pynini.pyx":422 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -11540,7 +11560,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_8__reduce__(struct __pyx_obj_7_pynini_Fs return __pyx_r; } -/* "_pynini.pyx":424 +/* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< @@ -11558,7 +11578,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_paths(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_3Fst_paths *__pyx_optional_args) { PyObject *__pyx_v_input_token_type = ((PyObject *)Py_None); - /* "_pynini.pyx":425 + /* "_pynini.pyx":426 * * cpdef _StringPathIterator paths(self, input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -11586,7 +11606,7 @@ static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_path } } - /* "_pynini.pyx":424 + /* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< @@ -11602,7 +11622,7 @@ static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_path if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Fst_11paths)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -11625,11 +11645,11 @@ static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_path PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_input_token_type, __pyx_v_output_token_type}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __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_7_pynini__StringPathIterator))))) __PYX_ERR(0, 424, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini__StringPathIterator))))) __PYX_ERR(0, 425, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini__StringPathIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11648,7 +11668,7 @@ static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_path #endif } - /* "_pynini.pyx":460 + /* "_pynini.pyx":461 * FstOpError: Operation failed. * """ * return _StringPathIterator(self, input_token_type, output_token_type) # <<<<<<<<<<<<<< @@ -11656,25 +11676,25 @@ static struct __pyx_obj_7_pynini__StringPathIterator *__pyx_f_7_pynini_3Fst_path * cpdef string string(self, token_type=None) except *: */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 460, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 461, __pyx_L1_error); __Pyx_INCREF(__pyx_v_input_token_type); __Pyx_GIVEREF(__pyx_v_input_token_type); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_input_token_type)) __PYX_ERR(0, 460, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_input_token_type)) __PYX_ERR(0, 461, __pyx_L1_error); __Pyx_INCREF(__pyx_v_output_token_type); __Pyx_GIVEREF(__pyx_v_output_token_type); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_output_token_type)) __PYX_ERR(0, 460, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7_pynini__StringPathIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_output_token_type)) __PYX_ERR(0, 461, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7_pynini__StringPathIterator), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_7_pynini__StringPathIterator *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":424 + /* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< @@ -11738,7 +11758,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_input_token_type,&__pyx_n_s_output_token_type,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); - /* "_pynini.pyx":425 + /* "_pynini.pyx":426 * * cpdef _StringPathIterator paths(self, input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -11762,19 +11782,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_token_type); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output_token_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "paths") < 0)) __PYX_ERR(0, 424, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "paths") < 0)) __PYX_ERR(0, 425, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -11791,7 +11811,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("paths", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 424, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("paths", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 425, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11807,7 +11827,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7_pynini_3Fst_10paths(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), __pyx_v_input_token_type, __pyx_v_output_token_type); - /* "_pynini.pyx":424 + /* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< @@ -11839,7 +11859,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_10paths(struct __pyx_obj_7_pynini_Fst *_ __pyx_t_2.__pyx_n = 2; __pyx_t_2.input_token_type = __pyx_v_input_token_type; __pyx_t_2.output_token_type = __pyx_v_output_token_type; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7_pynini_Fst->paths(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_7_pynini_Fst->paths(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11856,7 +11876,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_10paths(struct __pyx_obj_7_pynini_Fst *_ return __pyx_r; } -/* "_pynini.pyx":462 +/* "_pynini.pyx":463 * return _StringPathIterator(self, input_token_type, output_token_type) * * cpdef string string(self, token_type=None) except *: # <<<<<<<<<<<<<< @@ -11905,7 +11925,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Fst_13string)) { __Pyx_INCREF(__pyx_t_1); @@ -11927,11 +11947,11 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_token_type}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 463, __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; @@ -11950,7 +11970,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ #endif } - /* "_pynini.pyx":496 + /* "_pynini.pyx":497 * """ * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL # <<<<<<<<<<<<<< @@ -11959,7 +11979,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ __pyx_v__symbols = NULL; - /* "_pynini.pyx":497 + /* "_pynini.pyx":498 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: # <<<<<<<<<<<<<< @@ -11969,7 +11989,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ __pyx_t_7 = (__pyx_v_token_type == Py_None); if (__pyx_t_7) { - /* "_pynini.pyx":498 + /* "_pynini.pyx":499 * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: * _token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -11978,7 +11998,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ __pyx_v__token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":499 + /* "_pynini.pyx":500 * if token_type is None: * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -11987,7 +12007,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ __pyx_v__symbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":497 + /* "_pynini.pyx":498 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: # <<<<<<<<<<<<<< @@ -11997,23 +12017,23 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ goto __pyx_L3; } - /* "_pynini.pyx":500 + /* "_pynini.pyx":501 * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = PyObject_IsInstance(__pyx_v_token_type, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_7 = PyObject_IsInstance(__pyx_v_token_type, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { - /* "_pynini.pyx":501 + /* "_pynini.pyx":502 * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -12022,7 +12042,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ __pyx_v__token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":502 + /* "_pynini.pyx":503 * elif isinstance(token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -12031,12 +12051,12 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ if (unlikely(__pyx_v_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 502, __pyx_L1_error) + __PYX_ERR(0, 503, __pyx_L1_error) } - __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_v__symbols = __pyx_t_8; - /* "_pynini.pyx":500 + /* "_pynini.pyx":501 * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -12046,7 +12066,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ goto __pyx_L3; } - /* "_pynini.pyx":504 + /* "_pynini.pyx":505 * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() * else: * _token_type = _get_token_type(tostring(token_type)) # <<<<<<<<<<<<<< @@ -12054,13 +12074,13 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ * if not StringPrint(deref(self._fst), addr(result), _token_type, _symbols): */ /*else*/ { - __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error) - __pyx_t_9 = __pyx_f_7_pynini__get_token_type(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_9 = __pyx_f_7_pynini__get_token_type(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) __pyx_v__token_type = __pyx_t_9; } __pyx_L3:; - /* "_pynini.pyx":506 + /* "_pynini.pyx":507 * _token_type = _get_token_type(tostring(token_type)) * cdef string result * if not StringPrint(deref(self._fst), addr(result), _token_type, _symbols): # <<<<<<<<<<<<<< @@ -12069,19 +12089,19 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 506, __pyx_L1_error) + __PYX_ERR(0, 507, __pyx_L1_error) } __pyx_t_7 = (!(fst::script::StringPrint((*__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._fst), (&__pyx_v_result), __pyx_v__token_type, __pyx_v__symbols) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pynini.pyx":507 + /* "_pynini.pyx":508 * cdef string result * if not StringPrint(deref(self._fst), addr(result), _token_type, _symbols): * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -12101,15 +12121,15 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Operation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __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, 507, __pyx_L1_error) + __PYX_ERR(0, 508, __pyx_L1_error) - /* "_pynini.pyx":506 + /* "_pynini.pyx":507 * _token_type = _get_token_type(tostring(token_type)) * cdef string result * if not StringPrint(deref(self._fst), addr(result), _token_type, _symbols): # <<<<<<<<<<<<<< @@ -12118,7 +12138,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ */ } - /* "_pynini.pyx":508 + /* "_pynini.pyx":509 * if not StringPrint(deref(self._fst), addr(result), _token_type, _symbols): * raise FstOpError("Operation failed") * return result # <<<<<<<<<<<<<< @@ -12128,7 +12148,7 @@ static std::string __pyx_f_7_pynini_3Fst_string(struct __pyx_obj_7_pynini_Fst *_ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":462 + /* "_pynini.pyx":463 * return _StringPathIterator(self, input_token_type, output_token_type) * * cpdef string string(self, token_type=None) except *: # <<<<<<<<<<<<<< @@ -12203,12 +12223,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_token_type); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string") < 0)) __PYX_ERR(0, 462, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string") < 0)) __PYX_ERR(0, 463, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -12222,7 +12242,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("string", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 462, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("string", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 463, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12262,8 +12282,8 @@ static PyObject *__pyx_pf_7_pynini_3Fst_12string(struct __pyx_obj_7_pynini_Fst * __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.token_type = __pyx_v_token_type; - __pyx_t_1 = __pyx_vtabptr_7_pynini_Fst->string(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_7_pynini_Fst->string(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -12280,7 +12300,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_12string(struct __pyx_obj_7_pynini_Fst * return __pyx_r; } -/* "_pynini.pyx":512 +/* "_pynini.pyx":513 * # The following all override their definition in MutableFst. * * cpdef Fst copy(self): # <<<<<<<<<<<<<< @@ -12316,7 +12336,7 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy(struct __pyx_obj_7_pyn if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __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, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Fst_15copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -12339,11 +12359,11 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy(struct __pyx_obj_7_pyn PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __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_7_pynini_Fst))))) __PYX_ERR(0, 512, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 513, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12362,7 +12382,7 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy(struct __pyx_obj_7_pyn #endif } - /* "_pynini.pyx":518 + /* "_pynini.pyx":519 * Makes a copy of the FST. * """ * return _init_Fst_from_MutableFst(super(_MutableFst, self).copy()) # <<<<<<<<<<<<<< @@ -12370,18 +12390,18 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy(struct __pyx_obj_7_pyn * def closure(self, int32_t lower=0, int32_t upper=0): */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst); __Pyx_GIVEREF((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst))) __PYX_ERR(0, 518, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst))) __PYX_ERR(0, 519, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 518, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 519, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -12402,19 +12422,19 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy(struct __pyx_obj_7_pyn PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 518, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":512 + /* "_pynini.pyx":513 * # The following all override their definition in MutableFst. * * cpdef Fst copy(self): # <<<<<<<<<<<<<< @@ -12487,7 +12507,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_14copy(struct __pyx_obj_7_pynini_Fst *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12508,7 +12528,7 @@ struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Fst_copy__pyx_wrap_1(struct __p return __pyx_f_7_pynini_3Fst_copy(__pyx_v_self, __pyx_skip_dispatch); } -/* "_pynini.pyx":520 +/* "_pynini.pyx":521 * return _init_Fst_from_MutableFst(super(_MutableFst, self).copy()) * * def closure(self, int32_t lower=0, int32_t upper=0): # <<<<<<<<<<<<<< @@ -12572,19 +12592,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lower); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_upper); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closure") < 0)) __PYX_ERR(0, 520, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closure") < 0)) __PYX_ERR(0, 521, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -12597,19 +12617,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_lower = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_lower == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) + __pyx_v_lower = __Pyx_PyInt_As_int32_t(values[0]); if (unlikely((__pyx_v_lower == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L3_error) } else { __pyx_v_lower = ((int32_t)0); } if (values[1]) { - __pyx_v_upper = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_upper == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) + __pyx_v_upper = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_upper == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L3_error) } else { __pyx_v_upper = ((int32_t)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 520, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 521, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12644,7 +12664,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_16closure(struct __pyx_obj_7_pynini_Fst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("closure", 1); - /* "_pynini.pyx":566 + /* "_pynini.pyx":567 * self. * """ * ConcatRange(self._mfst.get(), lower, upper) # <<<<<<<<<<<<<< @@ -12653,11 +12673,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_16closure(struct __pyx_obj_7_pynini_Fst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 566, __pyx_L1_error) + __PYX_ERR(0, 567, __pyx_L1_error) } fst::script::ConcatRange(__pyx_v_self->__pyx_base.__pyx_base._mfst.get(), __pyx_v_lower, __pyx_v_upper); - /* "_pynini.pyx":567 + /* "_pynini.pyx":568 * """ * ConcatRange(self._mfst.get(), lower, upper) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -12666,11 +12686,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_16closure(struct __pyx_obj_7_pynini_Fst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 567, __pyx_L1_error) + __PYX_ERR(0, 568, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 568, __pyx_L1_error) - /* "_pynini.pyx":568 + /* "_pynini.pyx":569 * ConcatRange(self._mfst.get(), lower, upper) * self._check_mutating_imethod() * return self # <<<<<<<<<<<<<< @@ -12682,7 +12702,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_16closure(struct __pyx_obj_7_pynini_Fst __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pynini.pyx":520 + /* "_pynini.pyx":521 * return _init_Fst_from_MutableFst(super(_MutableFst, self).copy()) * * def closure(self, int32_t lower=0, int32_t upper=0): # <<<<<<<<<<<<<< @@ -12700,7 +12720,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_16closure(struct __pyx_obj_7_pynini_Fst return __pyx_r; } -/* "_pynini.pyx":570 +/* "_pynini.pyx":571 * return self * * @property # <<<<<<<<<<<<<< @@ -12733,7 +12753,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pynini.pyx":580 + /* "_pynini.pyx":581 * An FST copy. * """ * cdef Fst result = self.copy() # <<<<<<<<<<<<<< @@ -12742,14 +12762,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); - __PYX_ERR(0, 580, __pyx_L1_error) + __PYX_ERR(0, 581, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":581 + /* "_pynini.pyx":582 * """ * cdef Fst result = self.copy() * Closure(result._mfst.get(), CLOSURE_PLUS) # <<<<<<<<<<<<<< @@ -12758,11 +12778,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 581, __pyx_L1_error) + __PYX_ERR(0, 582, __pyx_L1_error) } fst::script::Closure(__pyx_v_result->__pyx_base.__pyx_base._mfst.get(), fst::CLOSURE_PLUS); - /* "_pynini.pyx":582 + /* "_pynini.pyx":583 * cdef Fst result = self.copy() * Closure(result._mfst.get(), CLOSURE_PLUS) * result._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -12771,11 +12791,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 582, __pyx_L1_error) + __PYX_ERR(0, 583, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 582, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 583, __pyx_L1_error) - /* "_pynini.pyx":583 + /* "_pynini.pyx":584 * Closure(result._mfst.get(), CLOSURE_PLUS) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -12787,7 +12807,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":570 + /* "_pynini.pyx":571 * return self * * @property # <<<<<<<<<<<<<< @@ -12807,7 +12827,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4plus___get__(struct __pyx_obj_7_pynini_ return __pyx_r; } -/* "_pynini.pyx":585 +/* "_pynini.pyx":586 * return result * * @property # <<<<<<<<<<<<<< @@ -12840,7 +12860,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pynini.pyx":595 + /* "_pynini.pyx":596 * An FST copy. * """ * cdef Fst result = self.copy() # <<<<<<<<<<<<<< @@ -12849,14 +12869,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); - __PYX_ERR(0, 595, __pyx_L1_error) + __PYX_ERR(0, 596, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":596 + /* "_pynini.pyx":597 * """ * cdef Fst result = self.copy() * ConcatRange(result._mfst.get(), 0, 1) # <<<<<<<<<<<<<< @@ -12865,11 +12885,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 596, __pyx_L1_error) + __PYX_ERR(0, 597, __pyx_L1_error) } fst::script::ConcatRange(__pyx_v_result->__pyx_base.__pyx_base._mfst.get(), 0, 1); - /* "_pynini.pyx":597 + /* "_pynini.pyx":598 * cdef Fst result = self.copy() * ConcatRange(result._mfst.get(), 0, 1) * result._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -12878,11 +12898,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 597, __pyx_L1_error) + __PYX_ERR(0, 598, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L1_error) - /* "_pynini.pyx":598 + /* "_pynini.pyx":599 * ConcatRange(result._mfst.get(), 0, 1) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -12894,7 +12914,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":585 + /* "_pynini.pyx":586 * return result * * @property # <<<<<<<<<<<<<< @@ -12914,7 +12934,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4ques___get__(struct __pyx_obj_7_pynini_ return __pyx_r; } -/* "_pynini.pyx":600 +/* "_pynini.pyx":601 * return result * * @property # <<<<<<<<<<<<<< @@ -12947,7 +12967,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pynini.pyx":610 + /* "_pynini.pyx":611 * An FST copy. * """ * cdef Fst result = self.copy() # <<<<<<<<<<<<<< @@ -12956,14 +12976,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); - __PYX_ERR(0, 610, __pyx_L1_error) + __PYX_ERR(0, 611, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->copy(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":611 + /* "_pynini.pyx":612 * """ * cdef Fst result = self.copy() * Closure(result._mfst.get(), CLOSURE_STAR) # <<<<<<<<<<<<<< @@ -12972,11 +12992,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 611, __pyx_L1_error) + __PYX_ERR(0, 612, __pyx_L1_error) } fst::script::Closure(__pyx_v_result->__pyx_base.__pyx_base._mfst.get(), fst::CLOSURE_STAR); - /* "_pynini.pyx":612 + /* "_pynini.pyx":613 * cdef Fst result = self.copy() * Closure(result._mfst.get(), CLOSURE_STAR) * result._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -12985,11 +13005,11 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 612, __pyx_L1_error) + __PYX_ERR(0, 613, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error) - /* "_pynini.pyx":613 + /* "_pynini.pyx":614 * Closure(result._mfst.get(), CLOSURE_STAR) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -13001,7 +13021,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":600 + /* "_pynini.pyx":601 * return result * * @property # <<<<<<<<<<<<<< @@ -13021,7 +13041,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_4star___get__(struct __pyx_obj_7_pynini_ return __pyx_r; } -/* "_pynini.pyx":615 +/* "_pynini.pyx":616 * return result * * def concat(self, fst2): # <<<<<<<<<<<<<< @@ -13083,12 +13103,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 616, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 615, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 616, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -13099,7 +13119,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("concat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 615, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("concat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 616, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13141,7 +13161,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("concat", 1); - /* "_pynini.pyx":632 + /* "_pynini.pyx":633 * self. * """ * cdef Fst _fst2 = _compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< @@ -13150,20 +13170,20 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 632, __pyx_L1_error) + __PYX_ERR(0, 633, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4.__pyx_n = 1; __pyx_t_4.arc_type = __pyx_t_2; - __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst2, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst2, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":633 + /* "_pynini.pyx":634 * """ * cdef Fst _fst2 = _compile_or_copy_Fst(fst2, self.arc_type()) * return super().concat(_fst2) # <<<<<<<<<<<<<< @@ -13171,18 +13191,18 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * * cdef void _optimize(self, bool compute_props=False) except *: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_ptype_7_pynini_Fst); __Pyx_GIVEREF((PyObject *)__pyx_ptype_7_pynini_Fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_7_pynini_Fst))) __PYX_ERR(0, 633, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_7_pynini_Fst))) __PYX_ERR(0, 634, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 633, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 634, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -13203,7 +13223,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v__fst2)}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -13211,7 +13231,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * __pyx_t_3 = 0; goto __pyx_L0; - /* "_pynini.pyx":615 + /* "_pynini.pyx":616 * return result * * def concat(self, fst2): # <<<<<<<<<<<<<< @@ -13233,7 +13253,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_18concat(struct __pyx_obj_7_pynini_Fst * return __pyx_r; } -/* "_pynini.pyx":635 +/* "_pynini.pyx":636 * return super().concat(_fst2) * * cdef void _optimize(self, bool compute_props=False) except *: # <<<<<<<<<<<<<< @@ -13252,7 +13272,7 @@ static void __pyx_f_7_pynini_3Fst__optimize(struct __pyx_obj_7_pynini_Fst *__pyx } } - /* "_pynini.pyx":636 + /* "_pynini.pyx":637 * * cdef void _optimize(self, bool compute_props=False) except *: * Optimize(self._mfst.get(), compute_props) # <<<<<<<<<<<<<< @@ -13261,11 +13281,11 @@ static void __pyx_f_7_pynini_3Fst__optimize(struct __pyx_obj_7_pynini_Fst *__pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 637, __pyx_L1_error) } fst::script::Optimize(__pyx_v_self->__pyx_base.__pyx_base._mfst.get(), __pyx_v_compute_props); - /* "_pynini.pyx":637 + /* "_pynini.pyx":638 * cdef void _optimize(self, bool compute_props=False) except *: * Optimize(self._mfst.get(), compute_props) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -13274,11 +13294,11 @@ static void __pyx_f_7_pynini_3Fst__optimize(struct __pyx_obj_7_pynini_Fst *__pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 637, __pyx_L1_error) + __PYX_ERR(0, 638, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L1_error) - /* "_pynini.pyx":635 + /* "_pynini.pyx":636 * return super().concat(_fst2) * * cdef void _optimize(self, bool compute_props=False) except *: # <<<<<<<<<<<<<< @@ -13293,7 +13313,7 @@ static void __pyx_f_7_pynini_3Fst__optimize(struct __pyx_obj_7_pynini_Fst *__pyx __pyx_L0:; } -/* "_pynini.pyx":639 +/* "_pynini.pyx":640 * self._check_mutating_imethod() * * def optimize(self, bool compute_props=False): # <<<<<<<<<<<<<< @@ -13354,12 +13374,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compute_props); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "optimize") < 0)) __PYX_ERR(0, 639, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "optimize") < 0)) __PYX_ERR(0, 640, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -13370,14 +13390,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_compute_props = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_compute_props == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L3_error) + __pyx_v_compute_props = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_compute_props == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error) } else { __pyx_v_compute_props = ((bool)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("optimize", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 639, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("optimize", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 640, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13413,7 +13433,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_20optimize(struct __pyx_obj_7_pynini_Fst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("optimize", 1); - /* "_pynini.pyx":677 + /* "_pynini.pyx":678 * self. * """ * self._optimize(compute_props) # <<<<<<<<<<<<<< @@ -13422,13 +13442,13 @@ static PyObject *__pyx_pf_7_pynini_3Fst_20optimize(struct __pyx_obj_7_pynini_Fst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_optimize"); - __PYX_ERR(0, 677, __pyx_L1_error) + __PYX_ERR(0, 678, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.compute_props = __pyx_v_compute_props; - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_optimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_optimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error) - /* "_pynini.pyx":678 + /* "_pynini.pyx":679 * """ * self._optimize(compute_props) * return self # <<<<<<<<<<<<<< @@ -13440,7 +13460,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_20optimize(struct __pyx_obj_7_pynini_Fst __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pynini.pyx":639 + /* "_pynini.pyx":640 * self._check_mutating_imethod() * * def optimize(self, bool compute_props=False): # <<<<<<<<<<<<<< @@ -13458,7 +13478,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_20optimize(struct __pyx_obj_7_pynini_Fst return __pyx_r; } -/* "_pynini.pyx":680 +/* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -13494,7 +13514,7 @@ static PyObject *__pyx_pw_7_pynini_3Fst_23union(PyObject *__pyx_v_self, PyObject } static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":681 +/* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< @@ -13514,7 +13534,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_5union_genexpr(PyObject *__pyx_self, PyO if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 681, __pyx_L1_error) + __PYX_ERR(0, 682, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -13525,7 +13545,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_5union_genexpr(PyObject *__pyx_self, PyO __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_3Fst_5union_2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_union_locals_genexpr, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_3Fst_5union_2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_union_locals_genexpr, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13564,30 +13584,30 @@ static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 681, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 682, __pyx_L1_error) - /* "_pynini.pyx":682 + /* "_pynini.pyx":683 * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) * for fst2 in fsts2)) # <<<<<<<<<<<<<< * * # Operator overloads. */ - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 682, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 683, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 682, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 683, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 683, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fst2); @@ -13595,24 +13615,24 @@ static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":681 + /* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< * for fst2 in fsts2)) * */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 681, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 682, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 681, __pyx_L1_error) + __PYX_ERR(0, 682, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 681, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6.__pyx_n = 1; __pyx_t_6.arc_type = __pyx_t_3; - __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_cur_scope->__pyx_v_fst2, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_cur_scope->__pyx_v_fst2, &__pyx_t_6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; @@ -13631,9 +13651,9 @@ static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 681, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 682, __pyx_L1_error) - /* "_pynini.pyx":682 + /* "_pynini.pyx":683 * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) * for fst2 in fsts2)) # <<<<<<<<<<<<<< @@ -13644,7 +13664,7 @@ static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":681 + /* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< @@ -13672,7 +13692,7 @@ static PyObject *__pyx_gb_7_pynini_3Fst_5union_2generator6(__pyx_CoroutineObject return __pyx_r; } -/* "_pynini.pyx":680 +/* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -13696,7 +13716,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct__union *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 680, __pyx_L1_error) + __PYX_ERR(0, 681, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -13704,7 +13724,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "_pynini.pyx":681 + /* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< @@ -13712,42 +13732,42 @@ static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_ptype_7_pynini_Fst); __Pyx_GIVEREF((PyObject *)__pyx_ptype_7_pynini_Fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_7_pynini_Fst))) __PYX_ERR(0, 681, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_7_pynini_Fst))) __PYX_ERR(0, 682, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self))) __PYX_ERR(0, 681, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self))) __PYX_ERR(0, 682, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_union); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":682 + /* "_pynini.pyx":683 * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) * for fst2 in fsts2)) # <<<<<<<<<<<<<< * * # Operator overloads. */ - __pyx_t_2 = __pyx_pf_7_pynini_3Fst_5union_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_fsts2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_7_pynini_3Fst_5union_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_fsts2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pynini.pyx":681 + /* "_pynini.pyx":682 * * def union(self, *fsts2): * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) # <<<<<<<<<<<<<< * for fst2 in fsts2)) * */ - __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __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_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13755,7 +13775,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *_ __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":680 + /* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -13778,7 +13798,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_22union(struct __pyx_obj_7_pynini_Fst *_ return __pyx_r; } -/* "_pynini.pyx":686 +/* "_pynini.pyx":687 * # Operator overloads. * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -13817,14 +13837,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 1); - /* "_pynini.pyx":689 + /* "_pynini.pyx":690 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(self, other) # <<<<<<<<<<<<<< * return equal(_fst1, _fst2) * */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(((PyObject *)__pyx_v_self), __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(((PyObject *)__pyx_v_self), __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __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; @@ -13832,7 +13852,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 689, __pyx_L1_error) + __PYX_ERR(0, 690, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -13845,15 +13865,15 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * __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, 689, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __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, 689, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -13861,7 +13881,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * __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, 689, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 690, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -13869,17 +13889,17 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 689, __pyx_L1_error) + __PYX_ERR(0, 690, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 689, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 689, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 690, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 690, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":690 + /* "_pynini.pyx":691 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(self, other) * return equal(_fst1, _fst2) # <<<<<<<<<<<<<< @@ -13887,14 +13907,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * * def __ne__(self, other): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __pyx_f_10_pywrapfst_equal(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst2), 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_equal(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst2), 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":686 + /* "_pynini.pyx":687 * # Operator overloads. * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -13918,7 +13938,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_24__eq__(struct __pyx_obj_7_pynini_Fst * return __pyx_r; } -/* "_pynini.pyx":692 +/* "_pynini.pyx":693 * return equal(_fst1, _fst2) * * def __ne__(self, other): # <<<<<<<<<<<<<< @@ -13951,7 +13971,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_26__ne__(struct __pyx_obj_7_pynini_Fst * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ne__", 1); - /* "_pynini.pyx":693 + /* "_pynini.pyx":694 * * def __ne__(self, other): * return not self == other # <<<<<<<<<<<<<< @@ -13959,16 +13979,16 @@ static PyObject *__pyx_pf_7_pynini_3Fst_26__ne__(struct __pyx_obj_7_pynini_Fst * * def __add__(self, other): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 693, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_self), __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":692 + /* "_pynini.pyx":693 * return equal(_fst1, _fst2) * * def __ne__(self, other): # <<<<<<<<<<<<<< @@ -13987,7 +14007,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_26__ne__(struct __pyx_obj_7_pynini_Fst * return __pyx_r; } -/* "_pynini.pyx":695 +/* "_pynini.pyx":696 * return not self == other * * def __add__(self, other): # <<<<<<<<<<<<<< @@ -14003,14 +14023,14 @@ static PyObject *__pyx_pw_7_pynini_3Fst_29__add__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_28__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_28__add__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14019,21 +14039,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(PyObject *__pyx_v_self, PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 1); - /* "_pynini.pyx":696 + /* "_pynini.pyx":697 * * def __add__(self, other): * return concat(self, other) # <<<<<<<<<<<<<< * - * def __iadd__(self, other): + * def __radd__(self, other): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_concat(__pyx_v_self, __pyx_v_other, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_concat(((PyObject *)__pyx_v_self), __pyx_v_other, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":695 + /* "_pynini.pyx":696 * return not self == other * * def __add__(self, other): # <<<<<<<<<<<<<< @@ -14052,30 +14072,95 @@ static PyObject *__pyx_pf_7_pynini_3Fst_28__add__(PyObject *__pyx_v_self, PyObje return __pyx_r; } -/* "_pynini.pyx":698 +/* "_pynini.pyx":699 + * return concat(self, other) + * + * def __radd__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__radd__(string)` from the expression `string + fst`, + * # hence the change in order of arguments. + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_7_pynini_3Fst_31__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_31__radd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_7_pynini_3Fst_30__radd__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7_pynini_3Fst_30__radd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__radd__", 1); + + /* "_pynini.pyx":702 + * # Called as `fst.__radd__(string)` from the expression `string + fst`, + * # hence the change in order of arguments. + * return concat(other, self) # <<<<<<<<<<<<<< + * + * def __iadd__(self, other): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_concat(__pyx_v_other, ((PyObject *)__pyx_v_self), 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pynini.pyx":699 * return concat(self, other) * + * def __radd__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__radd__(string)` from the expression `string + fst`, + * # hence the change in order of arguments. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_pynini.Fst.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pynini.pyx":704 + * return concat(other, self) + * * def __iadd__(self, other): # <<<<<<<<<<<<<< * return self.concat(other) * */ /* Python wrapper */ -static PyObject *__pyx_pw_7_pynini_3Fst_31__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_7_pynini_3Fst_31__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_7_pynini_3Fst_33__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_33__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_30__iadd__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_32__iadd__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_32__iadd__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14087,7 +14172,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iadd__", 1); - /* "_pynini.pyx":699 + /* "_pynini.pyx":705 * * def __iadd__(self, other): * return self.concat(other) # <<<<<<<<<<<<<< @@ -14095,7 +14180,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst * def __sub__(self, other): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -14115,7 +14200,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14123,8 +14208,8 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":698 - * return concat(self, other) + /* "_pynini.pyx":704 + * return concat(other, self) * * def __iadd__(self, other): # <<<<<<<<<<<<<< * return self.concat(other) @@ -14144,7 +14229,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst return __pyx_r; } -/* "_pynini.pyx":701 +/* "_pynini.pyx":707 * return self.concat(other) * * def __sub__(self, other): # <<<<<<<<<<<<<< @@ -14153,21 +14238,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_30__iadd__(struct __pyx_obj_7_pynini_Fst */ /* Python wrapper */ -static PyObject *__pyx_pw_7_pynini_3Fst_33__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_7_pynini_3Fst_33__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_7_pynini_3Fst_35__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_35__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_32__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_34__sub__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_34__sub__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14179,15 +14264,15 @@ static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 1); - /* "_pynini.pyx":702 + /* "_pynini.pyx":708 * * def __sub__(self, other): * return difference(self, other) # <<<<<<<<<<<<<< * - * # __isub__ is not implemented separately because difference is not an + * def __rsub__(self, other): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_difference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_difference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -14204,10 +14289,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObje } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_other}; + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14215,7 +14300,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObje __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":701 + /* "_pynini.pyx":707 * return self.concat(other) * * def __sub__(self, other): # <<<<<<<<<<<<<< @@ -14236,7 +14321,99 @@ static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObje return __pyx_r; } -/* "_pynini.pyx":707 +/* "_pynini.pyx":710 + * return difference(self, other) + * + * def __rsub__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__rsub__(string)` in the (weird) expression + * # `string - fst`, hence the change in order of arguments. + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_7_pynini_3Fst_37__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_37__rsub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_7_pynini_3Fst_36__rsub__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7_pynini_3Fst_36__rsub__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__rsub__", 1); + + /* "_pynini.pyx":713 + * # Called as `fst.__rsub__(string)` in the (weird) expression + * # `string - fst`, hence the change in order of arguments. + * return difference(other, self) # <<<<<<<<<<<<<< + * + * # __isub__ is not implemented separately because difference is not an + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_difference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_other, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pynini.pyx":710 + * return difference(self, other) + * + * def __rsub__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__rsub__(string)` in the (weird) expression + * # `string - fst`, hence the change in order of arguments. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pynini.Fst.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pynini.pyx":718 * # in-place operation. * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< @@ -14245,25 +14422,25 @@ static PyObject *__pyx_pf_7_pynini_3Fst_32__sub__(PyObject *__pyx_v_self, PyObje */ /* Python wrapper */ -static PyObject *__pyx_pw_7_pynini_3Fst_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/ -PyDoc_STRVAR(__pyx_doc_7_pynini_3Fst_34__pow__, "Constructively generates the range-concatenation of the FST.\n\n For all natural numbers n, `f ** n` is the same as `f ** (n, n).\n Note that `f ** (0, ...)` is the same as `f.star`,\n `f ** (1, ...)` is `f.plus`,\n `f ** (0, 1)` is the same as `f.ques`.\n and `f ** (5, ...)` is the obvious generalization.\n "); +static PyObject *__pyx_pw_7_pynini_3Fst_39__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/ +PyDoc_STRVAR(__pyx_doc_7_pynini_3Fst_38__pow__, "Constructively generates the range-concatenation of the FST.\n\n For all natural numbers n, `f ** n` is the same as `f ** (n, n). Note that\n `f ** (0, ...)` is the same as `f.star`, `f ** (1, ...)` is `f.plus`,\n `f ** (0, 1)` is the same as `f.ques`, and `f ** (5, ...)` is the obvious\n generalization.\n "); #if CYTHON_UPDATE_DESCRIPTOR_DOC -struct wrapperbase __pyx_wrapperbase_7_pynini_3Fst_34__pow__; +struct wrapperbase __pyx_wrapperbase_7_pynini_3Fst_38__pow__; #endif -static PyObject *__pyx_pw_7_pynini_3Fst_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { +static PyObject *__pyx_pw_7_pynini_3Fst_39__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_34__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo)); + __pyx_r = __pyx_pf_7_pynini_3Fst_38__pow__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { +static PyObject *__pyx_pf_7_pynini_3Fst_38__pow__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) { PyObject *__pyx_v_lower = NULL; PyObject *__pyx_v_upper = NULL; PyObject *__pyx_r = NULL; @@ -14285,14 +14462,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pow__", 1); - /* "_pynini.pyx":716 - * and `f ** (5, ...)` is the obvious generalization. + /* "_pynini.pyx":726 + * generalization. * """ * if not isinstance(self, Fst) or modulo is not None: # <<<<<<<<<<<<<< * return NotImplemented * if isinstance(other, int): */ - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_7_pynini_Fst); + __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_7_pynini_Fst); __pyx_t_3 = (!__pyx_t_2); if (!__pyx_t_3) { } else { @@ -14304,7 +14481,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "_pynini.pyx":717 + /* "_pynini.pyx":727 * """ * if not isinstance(self, Fst) or modulo is not None: * return NotImplemented # <<<<<<<<<<<<<< @@ -14316,8 +14493,8 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; - /* "_pynini.pyx":716 - * and `f ** (5, ...)` is the obvious generalization. + /* "_pynini.pyx":726 + * generalization. * """ * if not isinstance(self, Fst) or modulo is not None: # <<<<<<<<<<<<<< * return NotImplemented @@ -14325,7 +14502,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ } - /* "_pynini.pyx":718 + /* "_pynini.pyx":728 * if not isinstance(self, Fst) or modulo is not None: * return NotImplemented * if isinstance(other, int): # <<<<<<<<<<<<<< @@ -14335,7 +14512,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_1 = PyInt_Check(__pyx_v_other); if (__pyx_t_1) { - /* "_pynini.pyx":719 + /* "_pynini.pyx":729 * return NotImplemented * if isinstance(other, int): * return closure(self, other, other) # <<<<<<<<<<<<<< @@ -14343,7 +14520,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje * try: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_closure); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_closure); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -14360,10 +14537,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje } #endif { - PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_self, __pyx_v_other, __pyx_v_other}; + PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_other}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -14371,7 +14548,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_4 = 0; goto __pyx_L0; - /* "_pynini.pyx":718 + /* "_pynini.pyx":728 * if not isinstance(self, Fst) or modulo is not None: * return NotImplemented * if isinstance(other, int): # <<<<<<<<<<<<<< @@ -14380,7 +14557,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ } - /* "_pynini.pyx":720 + /* "_pynini.pyx":730 * if isinstance(other, int): * return closure(self, other, other) * if isinstance(other, tuple): # <<<<<<<<<<<<<< @@ -14390,7 +14567,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_1 = PyTuple_Check(__pyx_v_other); if (__pyx_t_1) { - /* "_pynini.pyx":721 + /* "_pynini.pyx":731 * return closure(self, other, other) * if isinstance(other, tuple): * try: # <<<<<<<<<<<<<< @@ -14406,7 +14583,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "_pynini.pyx":722 + /* "_pynini.pyx":732 * if isinstance(other, tuple): * try: * (lower, upper) = other # <<<<<<<<<<<<<< @@ -14419,7 +14596,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 722, __pyx_L8_error) + __PYX_ERR(0, 732, __pyx_L8_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14432,21 +14609,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L8_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 732, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L8_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 732, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 722, __pyx_L8_error) + __pyx_t_6 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 732, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); index = 0; __pyx_t_4 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 722, __pyx_L8_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 732, __pyx_L8_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L15_unpacking_done; @@ -14454,7 +14631,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 722, __pyx_L8_error) + __PYX_ERR(0, 732, __pyx_L8_error) __pyx_L15_unpacking_done:; } __pyx_v_lower = __pyx_t_4; @@ -14462,7 +14639,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_v_upper = __pyx_t_5; __pyx_t_5 = 0; - /* "_pynini.pyx":721 + /* "_pynini.pyx":731 * return closure(self, other, other) * if isinstance(other, tuple): * try: # <<<<<<<<<<<<<< @@ -14479,7 +14656,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pynini.pyx":723 + /* "_pynini.pyx":733 * try: * (lower, upper) = other * except ValueError: # <<<<<<<<<<<<<< @@ -14489,27 +14666,27 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_7) { __Pyx_AddTraceback("_pynini.Fst.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 723, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 733, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); - /* "_pynini.pyx":724 + /* "_pynini.pyx":734 * (lower, upper) = other * except ValueError: * raise ValueError("Expected tuple of length two") # <<<<<<<<<<<<<< * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") */ - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 724, __pyx_L10_except_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 734, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_Raise(__pyx_t_12, 0, 0, 0); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __PYX_ERR(0, 724, __pyx_L10_except_error) + __PYX_ERR(0, 734, __pyx_L10_except_error) } goto __pyx_L10_except_error; - /* "_pynini.pyx":721 + /* "_pynini.pyx":731 * return closure(self, other, other) * if isinstance(other, tuple): * try: # <<<<<<<<<<<<<< @@ -14525,7 +14702,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_L13_try_end:; } - /* "_pynini.pyx":725 + /* "_pynini.pyx":735 * except ValueError: * raise ValueError("Expected tuple of length two") * if lower is Ellipsis: # <<<<<<<<<<<<<< @@ -14535,20 +14712,20 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_1 = (__pyx_v_lower == __pyx_builtin_Ellipsis); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":726 + /* "_pynini.pyx":736 * raise ValueError("Expected tuple of length two") * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") # <<<<<<<<<<<<<< * elif upper is Ellipsis: * return closure(self, lower) */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 726, __pyx_L1_error) + __PYX_ERR(0, 736, __pyx_L1_error) - /* "_pynini.pyx":725 + /* "_pynini.pyx":735 * except ValueError: * raise ValueError("Expected tuple of length two") * if lower is Ellipsis: # <<<<<<<<<<<<<< @@ -14557,7 +14734,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ } - /* "_pynini.pyx":727 + /* "_pynini.pyx":737 * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") * elif upper is Ellipsis: # <<<<<<<<<<<<<< @@ -14567,7 +14744,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_1 = (__pyx_v_upper == __pyx_builtin_Ellipsis); if (__pyx_t_1) { - /* "_pynini.pyx":728 + /* "_pynini.pyx":738 * raise TypeError("The lower bound must be an integer") * elif upper is Ellipsis: * return closure(self, lower) # <<<<<<<<<<<<<< @@ -14575,7 +14752,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje * return closure(self, lower, upper) */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -14592,10 +14769,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_self, __pyx_v_lower}; + PyObject *__pyx_callargs[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_lower}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -14603,7 +14780,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje __pyx_t_6 = 0; goto __pyx_L0; - /* "_pynini.pyx":727 + /* "_pynini.pyx":737 * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") * elif upper is Ellipsis: # <<<<<<<<<<<<<< @@ -14612,7 +14789,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ } - /* "_pynini.pyx":730 + /* "_pynini.pyx":740 * return closure(self, lower) * else: * return closure(self, lower, upper) # <<<<<<<<<<<<<< @@ -14621,7 +14798,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -14638,10 +14815,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje } #endif { - PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_self, __pyx_v_lower, __pyx_v_upper}; + PyObject *__pyx_callargs[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_lower, __pyx_v_upper}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -14650,7 +14827,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje goto __pyx_L0; } - /* "_pynini.pyx":720 + /* "_pynini.pyx":730 * if isinstance(other, int): * return closure(self, other, other) * if isinstance(other, tuple): # <<<<<<<<<<<<<< @@ -14659,19 +14836,19 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje */ } - /* "_pynini.pyx":731 + /* "_pynini.pyx":741 * else: * return closure(self, lower, upper) * return NotImplemented # <<<<<<<<<<<<<< * - * # TODO(kbg): Cython only has support for two-argument __ipow__; see: + * # TODO(kbg): Cython <3.0 only has support for two-argument __ipow__; see: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; - /* "_pynini.pyx":707 + /* "_pynini.pyx":718 * # in-place operation. * * def __pow__(self, other, modulo): # <<<<<<<<<<<<<< @@ -14695,8 +14872,8 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje return __pyx_r; } -/* "_pynini.pyx":739 - * # If this ever changes, implement __ipow__ in the obvious fashion. +/* "_pynini.pyx":749 + * # Implement __ipow__ once we move to Cython 3. * * def __matmul__(self, other): # <<<<<<<<<<<<<< * return compose(self, other) @@ -14705,14 +14882,14 @@ static PyObject *__pyx_pf_7_pynini_3Fst_34__pow__(PyObject *__pyx_v_self, PyObje /* Python wrapper */ #if PY_VERSION_HEX >= 0x03050000 -static PyObject *__pyx_pw_7_pynini_3Fst_37__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_7_pynini_3Fst_37__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_7_pynini_3Fst_41__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_41__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__matmul__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_36__matmul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_40__matmul__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); @@ -14721,7 +14898,7 @@ static PyObject *__pyx_pw_7_pynini_3Fst_37__matmul__(PyObject *__pyx_v_self, PyO #endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/ #if PY_VERSION_HEX >= 0x03050000 -static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_40__matmul__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14733,15 +14910,15 @@ static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__matmul__", 1); - /* "_pynini.pyx":740 + /* "_pynini.pyx":750 * * def __matmul__(self, other): * return compose(self, other) # <<<<<<<<<<<<<< * - * # __imatmul__ is not implemented separately because composition is not an + * def __rmatmul__(self, other): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_compose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_compose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -14758,10 +14935,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyO } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_other}; + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14769,8 +14946,8 @@ static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyO __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":739 - * # If this ever changes, implement __ipow__ in the obvious fashion. + /* "_pynini.pyx":749 + * # Implement __ipow__ once we move to Cython 3. * * def __matmul__(self, other): # <<<<<<<<<<<<<< * return compose(self, other) @@ -14791,7 +14968,103 @@ static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyO } #endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/ -/* "_pynini.pyx":745 +/* "_pynini.pyx":752 + * return compose(self, other) + * + * def __rmatmul__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__rmatmul__(string)` from the expression `string @ fst`, + * # hence the change in order of arguments. + */ + +/* Python wrapper */ +#if PY_VERSION_HEX >= 0x03050000 +static PyObject *__pyx_pw_7_pynini_3Fst_43__rmatmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_43__rmatmul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__rmatmul__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_7_pynini_3Fst_42__rmatmul__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/ + +#if PY_VERSION_HEX >= 0x03050000 +static PyObject *__pyx_pf_7_pynini_3Fst_42__rmatmul__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__rmatmul__", 1); + + /* "_pynini.pyx":755 + * # Called as `fst.__rmatmul__(string)` from the expression `string @ fst`, + * # hence the change in order of arguments. + * return compose(other, self) # <<<<<<<<<<<<<< + * + * # __imatmul__ is not implemented separately because composition is not an + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_compose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_other, ((PyObject *)__pyx_v_self)}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pynini.pyx":752 + * return compose(self, other) + * + * def __rmatmul__(self, other): # <<<<<<<<<<<<<< + * # Called as `fst.__rmatmul__(string)` from the expression `string @ fst`, + * # hence the change in order of arguments. + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pynini.Fst.__rmatmul__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if PY_VERSION_HEX >= 0x03050000)*/ + +/* "_pynini.pyx":760 * # in-place operation. * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -14800,21 +15073,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_36__matmul__(PyObject *__pyx_v_self, PyO */ /* Python wrapper */ -static PyObject *__pyx_pw_7_pynini_3Fst_39__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_7_pynini_3Fst_39__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_7_pynini_3Fst_45__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_45__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_38__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_44__or__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_44__or__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14826,15 +15099,15 @@ static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 1); - /* "_pynini.pyx":746 + /* "_pynini.pyx":761 * * def __or__(self, other): * return union(self, other) # <<<<<<<<<<<<<< * - * def __ior__(self, other): + * def __ror__(self, other): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -14851,10 +15124,10 @@ static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObjec } #endif { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_other}; + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14862,7 +15135,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObjec __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":745 + /* "_pynini.pyx":760 * # in-place operation. * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -14883,7 +15156,99 @@ static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObjec return __pyx_r; } -/* "_pynini.pyx":748 +/* "_pynini.pyx":763 + * return union(self, other) + * + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return union(self, other) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_7_pynini_3Fst_47__ror__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_47__ror__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__ror__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_7_pynini_3Fst_46__ror__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7_pynini_3Fst_46__ror__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__ror__", 1); + + /* "_pynini.pyx":764 + * + * def __ror__(self, other): + * return union(self, other) # <<<<<<<<<<<<<< + * + * def __ior__(self, other): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + __pyx_t_4 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_4 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_other}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_pynini.pyx":763 + * return union(self, other) + * + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return union(self, other) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("_pynini.Fst.__ror__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_pynini.pyx":766 * return union(self, other) * * def __ior__(self, other): # <<<<<<<<<<<<<< @@ -14892,21 +15257,21 @@ static PyObject *__pyx_pf_7_pynini_3Fst_38__or__(PyObject *__pyx_v_self, PyObjec */ /* Python wrapper */ -static PyObject *__pyx_pw_7_pynini_3Fst_41__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_7_pynini_3Fst_41__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_7_pynini_3Fst_49__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_7_pynini_3Fst_49__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __pyx_r = __pyx_pf_7_pynini_3Fst_40__ior__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_7_pynini_3Fst_48__ior__(((struct __pyx_obj_7_pynini_Fst *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_7_pynini_3Fst_48__ior__(struct __pyx_obj_7_pynini_Fst *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -14918,7 +15283,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ior__", 1); - /* "_pynini.pyx":749 + /* "_pynini.pyx":767 * * def __ior__(self, other): * return self.union(other) # <<<<<<<<<<<<<< @@ -14926,7 +15291,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -14946,7 +15311,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_other}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -14954,7 +15319,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":748 + /* "_pynini.pyx":766 * return union(self, other) * * def __ior__(self, other): # <<<<<<<<<<<<<< @@ -14975,7 +15340,7 @@ static PyObject *__pyx_pf_7_pynini_3Fst_40__ior__(struct __pyx_obj_7_pynini_Fst return __pyx_r; } -/* "_pynini.pyx":756 +/* "_pynini.pyx":774 * * * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): # <<<<<<<<<<<<<< @@ -15004,7 +15369,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb } } - /* "_pynini.pyx":757 + /* "_pynini.pyx":775 * * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): * if not isinstance(arg, Fst): # <<<<<<<<<<<<<< @@ -15015,7 +15380,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { - /* "_pynini.pyx":758 + /* "_pynini.pyx":776 * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): * if not isinstance(arg, Fst): * return accep(arg, arc_type=arc_type) # <<<<<<<<<<<<<< @@ -15023,27 +15388,27 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb * return arg.copy() */ __Pyx_XDECREF((PyObject *)__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_accep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_accep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arg)) __PYX_ERR(0, 758, __pyx_L1_error); - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_arg)) __PYX_ERR(0, 776, __pyx_L1_error); + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 758, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 758, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 776, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; - /* "_pynini.pyx":757 + /* "_pynini.pyx":775 * * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): * if not isinstance(arg, Fst): # <<<<<<<<<<<<<< @@ -15052,7 +15417,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb */ } - /* "_pynini.pyx":760 + /* "_pynini.pyx":778 * return accep(arg, arc_type=arc_type) * else: * return arg.copy() # <<<<<<<<<<<<<< @@ -15061,7 +15426,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb */ /*else*/ { __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_7 = 0; @@ -15081,17 +15446,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 760, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 778, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; } - /* "_pynini.pyx":756 + /* "_pynini.pyx":774 * * * cdef Fst _compile_or_copy_Fst(arg, arc_type="standard"): # <<<<<<<<<<<<<< @@ -15113,7 +15478,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__compile_or_copy_Fst(PyOb return __pyx_r; } -/* "_pynini.pyx":767 +/* "_pynini.pyx":785 * * * cdef object _compile_or_copy_two_Fsts(fst1, fst2): # <<<<<<<<<<<<<< @@ -15139,7 +15504,7 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compile_or_copy_two_Fsts", 1); - /* "_pynini.pyx":770 + /* "_pynini.pyx":788 * cdef Fst _fst1 * cdef Fst _fst2 * if isinstance(fst1, Fst): # <<<<<<<<<<<<<< @@ -15149,14 +15514,14 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_fst1, __pyx_ptype_7_pynini_Fst); if (__pyx_t_1) { - /* "_pynini.pyx":771 + /* "_pynini.pyx":789 * cdef Fst _fst2 * if isinstance(fst1, Fst): * _fst1 = fst1.copy() # <<<<<<<<<<<<<< * _fst2 = _compile_or_copy_Fst(fst2, _fst1.arc_type()) * elif isinstance(fst2, Fst): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fst1, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_fst1, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -15176,15 +15541,15 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __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_7_pynini_Fst))))) __PYX_ERR(0, 771, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 789, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":772 + /* "_pynini.pyx":790 * if isinstance(fst1, Fst): * _fst1 = fst1.copy() * _fst2 = _compile_or_copy_Fst(fst2, _fst1.arc_type()) # <<<<<<<<<<<<<< @@ -15193,20 +15558,20 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 772, __pyx_L1_error) + __PYX_ERR(0, 790, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7.__pyx_n = 1; __pyx_t_7.arc_type = __pyx_t_2; - __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst2, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst2, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":770 + /* "_pynini.pyx":788 * cdef Fst _fst1 * cdef Fst _fst2 * if isinstance(fst1, Fst): # <<<<<<<<<<<<<< @@ -15216,7 +15581,7 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs goto __pyx_L3; } - /* "_pynini.pyx":773 + /* "_pynini.pyx":791 * _fst1 = fst1.copy() * _fst2 = _compile_or_copy_Fst(fst2, _fst1.arc_type()) * elif isinstance(fst2, Fst): # <<<<<<<<<<<<<< @@ -15226,14 +15591,14 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_fst2, __pyx_ptype_7_pynini_Fst); if (__pyx_t_1) { - /* "_pynini.pyx":774 + /* "_pynini.pyx":792 * _fst2 = _compile_or_copy_Fst(fst2, _fst1.arc_type()) * elif isinstance(fst2, Fst): * _fst2 = fst2.copy() # <<<<<<<<<<<<<< * _fst1 = accep(fst1, arc_type=_fst2.arc_type()) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fst2, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fst2, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -15253,49 +15618,49 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 774, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 792, __pyx_L1_error) __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":775 + /* "_pynini.pyx":793 * elif isinstance(fst2, Fst): * _fst2 = fst2.copy() * _fst1 = accep(fst1, arc_type=_fst2.arc_type()) # <<<<<<<<<<<<<< * else: * _fst1 = accep(fst1) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_accep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_accep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fst1); __Pyx_GIVEREF(__pyx_v_fst1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fst1)) __PYX_ERR(0, 775, __pyx_L1_error); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fst1)) __PYX_ERR(0, 793, __pyx_L1_error); + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 775, __pyx_L1_error) + __PYX_ERR(0, 793, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst2->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst2), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error) - __pyx_t_8 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst2->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst2), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_8 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arc_type, __pyx_t_8) < 0) __PYX_ERR(0, 775, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arc_type, __pyx_t_8) < 0) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 775, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 793, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_8); __pyx_t_8 = 0; - /* "_pynini.pyx":773 + /* "_pynini.pyx":791 * _fst1 = fst1.copy() * _fst2 = _compile_or_copy_Fst(fst2, _fst1.arc_type()) * elif isinstance(fst2, Fst): # <<<<<<<<<<<<<< @@ -15305,7 +15670,7 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs goto __pyx_L3; } - /* "_pynini.pyx":777 + /* "_pynini.pyx":795 * _fst1 = accep(fst1, arc_type=_fst2.arc_type()) * else: * _fst1 = accep(fst1) # <<<<<<<<<<<<<< @@ -15313,26 +15678,26 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs * return (_fst1, _fst2) */ /*else*/ { - __pyx_t_8 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_fst1, 0, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_t_8 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_fst1, 0, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_8); __pyx_t_8 = 0; - /* "_pynini.pyx":778 + /* "_pynini.pyx":796 * else: * _fst1 = accep(fst1) * _fst2 = accep(fst2) # <<<<<<<<<<<<<< * return (_fst1, _fst2) * */ - __pyx_t_8 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_fst2, 0, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_8 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_fst2, 0, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_8); __pyx_t_8 = 0; } __pyx_L3:; - /* "_pynini.pyx":779 + /* "_pynini.pyx":797 * _fst1 = accep(fst1) * _fst2 = accep(fst2) * return (_fst1, _fst2) # <<<<<<<<<<<<<< @@ -15340,19 +15705,19 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF((PyObject *)__pyx_v__fst1); __Pyx_GIVEREF((PyObject *)__pyx_v__fst1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 779, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 797, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v__fst2); __Pyx_GIVEREF((PyObject *)__pyx_v__fst2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 779, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 797, __pyx_L1_error); __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "_pynini.pyx":767 + /* "_pynini.pyx":785 * * * cdef object _compile_or_copy_two_Fsts(fst1, fst2): # <<<<<<<<<<<<<< @@ -15376,7 +15741,7 @@ static PyObject *__pyx_f_7_pynini__compile_or_copy_two_Fsts(PyObject *__pyx_v_fs return __pyx_r; } -/* "_pynini.pyx":786 +/* "_pynini.pyx":804 * * * cdef Fst _init_Fst_from_MutableFst(_MutableFst fst): # <<<<<<<<<<<<<< @@ -15396,19 +15761,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__init_Fst_from_MutableFst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_Fst_from_MutableFst", 1); - /* "_pynini.pyx":787 + /* "_pynini.pyx":805 * * cdef Fst _init_Fst_from_MutableFst(_MutableFst fst): * cdef Fst result = Fst.__new__(Fst) # <<<<<<<<<<<<<< * result._fst = fst._fst * result._mfst = fst._mfst */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_Fst(((PyTypeObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_Fst(((PyTypeObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":788 + /* "_pynini.pyx":806 * cdef Fst _init_Fst_from_MutableFst(_MutableFst fst): * cdef Fst result = Fst.__new__(Fst) * result._fst = fst._fst # <<<<<<<<<<<<<< @@ -15417,16 +15782,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__init_Fst_from_MutableFst */ if (unlikely(((PyObject *)__pyx_v_fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 788, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } __pyx_t_2 = __pyx_v_fst->__pyx_base._fst; if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 788, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } __pyx_v_result->__pyx_base.__pyx_base.__pyx_base._fst = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pynini.pyx":789 + /* "_pynini.pyx":807 * cdef Fst result = Fst.__new__(Fst) * result._fst = fst._fst * result._mfst = fst._mfst # <<<<<<<<<<<<<< @@ -15435,16 +15800,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__init_Fst_from_MutableFst */ if (unlikely(((PyObject *)__pyx_v_fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 789, __pyx_L1_error) + __PYX_ERR(0, 807, __pyx_L1_error) } __pyx_t_3 = __pyx_v_fst->_mfst; if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 789, __pyx_L1_error) + __PYX_ERR(0, 807, __pyx_L1_error) } __pyx_v_result->__pyx_base.__pyx_base._mfst = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3); - /* "_pynini.pyx":790 + /* "_pynini.pyx":808 * result._fst = fst._fst * result._mfst = fst._mfst * return result # <<<<<<<<<<<<<< @@ -15456,7 +15821,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__init_Fst_from_MutableFst __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":786 + /* "_pynini.pyx":804 * * * cdef Fst _init_Fst_from_MutableFst(_MutableFst fst): # <<<<<<<<<<<<<< @@ -15476,7 +15841,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__init_Fst_from_MutableFst return __pyx_r; } -/* "_pynini.pyx":796 +/* "_pynini.pyx":814 * * * cpdef Fst _from_pywrapfst(_Fst fst): # <<<<<<<<<<<<<< @@ -15501,19 +15866,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__from_pywrapfst(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_pywrapfst", 1); - /* "_pynini.pyx":797 + /* "_pynini.pyx":815 * * cpdef Fst _from_pywrapfst(_Fst fst): * cdef Fst result = Fst.__new__(Fst) # <<<<<<<<<<<<<< * result._from_MutableFstClass(new VectorFstClass(deref(fst._fst))) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_Fst(((PyTypeObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_Fst(((PyTypeObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":798 + /* "_pynini.pyx":816 * cpdef Fst _from_pywrapfst(_Fst fst): * cdef Fst result = Fst.__new__(Fst) * result._from_MutableFstClass(new VectorFstClass(deref(fst._fst))) # <<<<<<<<<<<<<< @@ -15522,15 +15887,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__from_pywrapfst(struct __ */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_from_MutableFstClass"); - __PYX_ERR(0, 798, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 798, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_from_MutableFstClass(__pyx_v_result, new fst::script::VectorFstClass((*__pyx_v_fst->_fst))); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_from_MutableFstClass(__pyx_v_result, new fst::script::VectorFstClass((*__pyx_v_fst->_fst))); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error) - /* "_pynini.pyx":799 + /* "_pynini.pyx":817 * cdef Fst result = Fst.__new__(Fst) * result._from_MutableFstClass(new VectorFstClass(deref(fst._fst))) * return result # <<<<<<<<<<<<<< @@ -15542,7 +15907,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__from_pywrapfst(struct __ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":796 + /* "_pynini.pyx":814 * * * cpdef Fst _from_pywrapfst(_Fst fst): # <<<<<<<<<<<<<< @@ -15615,12 +15980,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 814, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_from_pywrapfst") < 0)) __PYX_ERR(0, 796, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_from_pywrapfst") < 0)) __PYX_ERR(0, 814, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -15631,7 +15996,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_from_pywrapfst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_from_pywrapfst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 814, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15645,7 +16010,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_10_pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 796, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_10_pywrapfst_Fst, 1, "fst", 0))) __PYX_ERR(0, 814, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini__from_pywrapfst(__pyx_self, __pyx_v_fst); /* function exit code */ @@ -15672,7 +16037,7 @@ static PyObject *__pyx_pf_7_pynini__from_pywrapfst(CYTHON_UNUSED PyObject *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_pywrapfst", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(__pyx_v_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(__pyx_v_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15689,7 +16054,7 @@ static PyObject *__pyx_pf_7_pynini__from_pywrapfst(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "_pynini.pyx":802 +/* "_pynini.pyx":820 * * * cpdef Fst _read(filename): # <<<<<<<<<<<<<< @@ -15716,7 +16081,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read(PyObject *__pyx_v_f int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read", 1); - /* "_pynini.pyx":803 + /* "_pynini.pyx":821 * * cpdef Fst _read(filename): * return _from_pywrapfst(_pywrapfst.Fst.read(filename)) # <<<<<<<<<<<<<< @@ -15724,12 +16089,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read(PyObject *__pyx_v_f * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Fst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Fst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -15750,19 +16115,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read(PyObject *__pyx_v_f PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 803, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":802 + /* "_pynini.pyx":820 * * * cpdef Fst _read(filename): # <<<<<<<<<<<<<< @@ -15836,12 +16201,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read") < 0)) __PYX_ERR(0, 802, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read") < 0)) __PYX_ERR(0, 820, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -15852,7 +16217,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 802, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 820, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15888,7 +16253,7 @@ static PyObject *__pyx_pf_7_pynini_2_read(CYTHON_UNUSED PyObject *__pyx_self, Py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read(__pyx_v_filename, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15905,7 +16270,7 @@ static PyObject *__pyx_pf_7_pynini_2_read(CYTHON_UNUSED PyObject *__pyx_self, Py return __pyx_r; } -/* "_pynini.pyx":806 +/* "_pynini.pyx":824 * * * cpdef Fst _read_from_string(state): # <<<<<<<<<<<<<< @@ -15932,7 +16297,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read_from_string(PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_from_string", 1); - /* "_pynini.pyx":807 + /* "_pynini.pyx":825 * * cpdef Fst _read_from_string(state): * return _from_pywrapfst(_pywrapfst.Fst.read_from_string(state)) # <<<<<<<<<<<<<< @@ -15940,12 +16305,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read_from_string(PyObjec * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Fst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Fst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read_from_string_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read_from_string_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -15966,19 +16331,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini__read_from_string(PyObjec PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_state}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 807, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__from_pywrapfst(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":806 + /* "_pynini.pyx":824 * * * cpdef Fst _read_from_string(state): # <<<<<<<<<<<<<< @@ -16052,12 +16417,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_from_string") < 0)) __PYX_ERR(0, 806, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_from_string") < 0)) __PYX_ERR(0, 824, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -16068,7 +16433,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 806, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 824, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16104,7 +16469,7 @@ static PyObject *__pyx_pf_7_pynini_4_read_from_string(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_from_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__read_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16121,7 +16486,7 @@ static PyObject *__pyx_pf_7_pynini_4_read_from_string(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_pynini.pyx":813 +/* "_pynini.pyx":831 * * * cpdef string escape(data): # <<<<<<<<<<<<<< @@ -16143,18 +16508,18 @@ static std::string __pyx_f_7_pynini_escape(PyObject *__pyx_v_data, CYTHON_UNUSED const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":830 + /* "_pynini.pyx":848 * An escaped string. * """ * return Escape(tostring(data)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) __pyx_r = fst::Escape(__pyx_t_1); goto __pyx_L0; - /* "_pynini.pyx":813 + /* "_pynini.pyx":831 * * * cpdef string escape(data): # <<<<<<<<<<<<<< @@ -16224,12 +16589,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "escape") < 0)) __PYX_ERR(0, 813, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "escape") < 0)) __PYX_ERR(0, 831, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -16240,7 +16605,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("escape", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 813, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("escape", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 831, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16277,8 +16642,8 @@ static PyObject *__pyx_pf_7_pynini_6escape(CYTHON_UNUSED PyObject *__pyx_self, P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_escape(__pyx_v_data, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_escape(__pyx_v_data, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -16295,7 +16660,7 @@ static PyObject *__pyx_pf_7_pynini_6escape(CYTHON_UNUSED PyObject *__pyx_self, P return __pyx_r; } -/* "_pynini.pyx":836 +/* "_pynini.pyx":854 * * * cpdef Fst accep(astring, weight=None, arc_type="standard", token_type=None): # <<<<<<<<<<<<<< @@ -16346,38 +16711,38 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a } } - /* "_pynini.pyx":869 + /* "_pynini.pyx":887 * FstStringCompilationError: String compilation failed. * """ * cdef Fst result = Fst(arc_type) # <<<<<<<<<<<<<< * cdef WeightClass _weight = _get_WeightClass_or_one(result.weight_type(), * weight) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":870 + /* "_pynini.pyx":888 * """ * cdef Fst result = Fst(arc_type) * cdef WeightClass _weight = _get_WeightClass_or_one(result.weight_type(), # <<<<<<<<<<<<<< * weight) * cdef _TokenType _token_type */ - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_result), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_result), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 888, __pyx_L1_error) - /* "_pynini.pyx":871 + /* "_pynini.pyx":889 * cdef Fst result = Fst(arc_type) * cdef WeightClass _weight = _get_WeightClass_or_one(result.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL */ - __pyx_t_3 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_2, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 870, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_2, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 888, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_3); - /* "_pynini.pyx":873 + /* "_pynini.pyx":891 * weight) * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL # <<<<<<<<<<<<<< @@ -16386,7 +16751,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ __pyx_v__symbols = NULL; - /* "_pynini.pyx":874 + /* "_pynini.pyx":892 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: # <<<<<<<<<<<<<< @@ -16396,7 +16761,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a __pyx_t_4 = (__pyx_v_token_type == Py_None); if (__pyx_t_4) { - /* "_pynini.pyx":875 + /* "_pynini.pyx":893 * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: * _token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -16405,7 +16770,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ __pyx_v__token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":876 + /* "_pynini.pyx":894 * if token_type is None: * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -16414,7 +16779,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ __pyx_v__symbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":874 + /* "_pynini.pyx":892 * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL * if token_type is None: # <<<<<<<<<<<<<< @@ -16424,23 +16789,23 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a goto __pyx_L3; } - /* "_pynini.pyx":877 + /* "_pynini.pyx":895 * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = PyObject_IsInstance(__pyx_v_token_type, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_4 = PyObject_IsInstance(__pyx_v_token_type, __pyx_t_5); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "_pynini.pyx":878 + /* "_pynini.pyx":896 * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -16449,7 +16814,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ __pyx_v__token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":879 + /* "_pynini.pyx":897 * elif isinstance(token_type, _pywrapfst.SymbolTableView): * _token_type = _TokenType.SYMBOL * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -16458,12 +16823,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ if (unlikely(__pyx_v_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 879, __pyx_L1_error) + __PYX_ERR(0, 897, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) __pyx_v__symbols = __pyx_t_6; - /* "_pynini.pyx":877 + /* "_pynini.pyx":895 * _token_type = GetDefaultTokenType() * _symbols = GetDefaultSymbols() * elif isinstance(token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -16473,7 +16838,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a goto __pyx_L3; } - /* "_pynini.pyx":881 + /* "_pynini.pyx":899 * _symbols = (<_SymbolTableView> token_type)._raw_ptr_or_raise() * else: * _token_type = _get_token_type(tostring(token_type)) # <<<<<<<<<<<<<< @@ -16481,22 +16846,22 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a * tostring(astring), */ /*else*/ { - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L1_error) - __pyx_t_7 = __pyx_f_7_pynini__get_token_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7_pynini__get_token_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error) __pyx_v__token_type = __pyx_t_7; } __pyx_L3:; - /* "_pynini.pyx":883 + /* "_pynini.pyx":901 * _token_type = _get_token_type(tostring(token_type)) * cdef bool success = StringCompile( * tostring(astring), # <<<<<<<<<<<<<< * result._mfst.get(), * _token_type, */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_astring); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_astring); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) - /* "_pynini.pyx":882 + /* "_pynini.pyx":900 * else: * _token_type = _get_token_type(tostring(token_type)) * cdef bool success = StringCompile( # <<<<<<<<<<<<<< @@ -16505,16 +16870,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ __pyx_v_success = fst::script::StringCompile(__pyx_t_2, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), __pyx_v__token_type, __pyx_v__symbols, __pyx_v__weight); - /* "_pynini.pyx":890 + /* "_pynini.pyx":908 * # First we check whether there were problems with arc or weight type, then * # for string compilation issues. * result._check_mutating_imethod() # <<<<<<<<<<<<<< * if not success: * raise FstStringCompilationError("String compilation failed") */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 890, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error) - /* "_pynini.pyx":891 + /* "_pynini.pyx":909 * # for string compilation issues. * result._check_mutating_imethod() * if not success: # <<<<<<<<<<<<<< @@ -16524,14 +16889,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a __pyx_t_4 = (!(__pyx_v_success != 0)); if (unlikely(__pyx_t_4)) { - /* "_pynini.pyx":892 + /* "_pynini.pyx":910 * result._check_mutating_imethod() * if not success: * raise FstStringCompilationError("String compilation failed") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstStringCompilationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FstStringCompilationError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; __pyx_t_9 = 0; @@ -16551,15 +16916,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_String_compilation_failed}; __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 892, __pyx_L1_error) + __PYX_ERR(0, 910, __pyx_L1_error) - /* "_pynini.pyx":891 + /* "_pynini.pyx":909 * # for string compilation issues. * result._check_mutating_imethod() * if not success: # <<<<<<<<<<<<<< @@ -16568,7 +16933,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a */ } - /* "_pynini.pyx":893 + /* "_pynini.pyx":911 * if not success: * raise FstStringCompilationError("String compilation failed") * return result # <<<<<<<<<<<<<< @@ -16580,7 +16945,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_accep(PyObject *__pyx_v_a __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":836 + /* "_pynini.pyx":854 * * * cpdef Fst accep(astring, weight=None, arc_type="standard", token_type=None): # <<<<<<<<<<<<<< @@ -16668,33 +17033,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_token_type); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "accep") < 0)) __PYX_ERR(0, 836, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "accep") < 0)) __PYX_ERR(0, 854, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -16716,7 +17081,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("accep", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 836, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accep", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 854, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16757,7 +17122,7 @@ static PyObject *__pyx_pf_7_pynini_8accep(CYTHON_UNUSED PyObject *__pyx_self, Py __pyx_t_2.weight = __pyx_v_weight; __pyx_t_2.arc_type = __pyx_v_arc_type; __pyx_t_2.token_type = __pyx_v_token_type; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_astring, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_accep(__pyx_v_astring, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16774,7 +17139,7 @@ static PyObject *__pyx_pf_7_pynini_8accep(CYTHON_UNUSED PyObject *__pyx_self, Py return __pyx_r; } -/* "_pynini.pyx":896 +/* "_pynini.pyx":914 * * * cpdef Fst cross(fst1, fst2): # <<<<<<<<<<<<<< @@ -16806,14 +17171,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cross", 1); - /* "_pynini.pyx":919 + /* "_pynini.pyx":937 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_fst1.arc_type()) * Cross(deref(_fst1._fst), deref(_fst2._fst), result._mfst.get()) */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __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; @@ -16821,7 +17186,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 919, __pyx_L1_error) + __PYX_ERR(0, 937, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -16834,15 +17199,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f __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, 919, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __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, 919, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -16850,7 +17215,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f __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, 919, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 937, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -16858,17 +17223,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 919, __pyx_L1_error) + __PYX_ERR(0, 937, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 919, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 919, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 937, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 937, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":920 + /* "_pynini.pyx":938 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * cdef Fst result = Fst(_fst1.arc_type()) # <<<<<<<<<<<<<< @@ -16877,18 +17242,18 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 920, __pyx_L1_error) + __PYX_ERR(0, 938, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":921 + /* "_pynini.pyx":939 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * cdef Fst result = Fst(_fst1.arc_type()) * Cross(deref(_fst1._fst), deref(_fst2._fst), result._mfst.get()) # <<<<<<<<<<<<<< @@ -16897,24 +17262,24 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 921, __pyx_L1_error) + __PYX_ERR(0, 939, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 921, __pyx_L1_error) + __PYX_ERR(0, 939, __pyx_L1_error) } fst::script::Cross((*__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__fst2->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_result->__pyx_base.__pyx_base._mfst.get()); - /* "_pynini.pyx":922 + /* "_pynini.pyx":940 * cdef Fst result = Fst(_fst1.arc_type()) * Cross(deref(_fst1._fst), deref(_fst2._fst), result._mfst.get()) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 940, __pyx_L1_error) - /* "_pynini.pyx":923 + /* "_pynini.pyx":941 * Cross(deref(_fst1._fst), deref(_fst2._fst), result._mfst.get()) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -16926,7 +17291,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cross(PyObject *__pyx_v_f __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":896 + /* "_pynini.pyx":914 * * * cpdef Fst cross(fst1, fst2): # <<<<<<<<<<<<<< @@ -17008,7 +17373,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 914, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -17016,14 +17381,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 914, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("cross", 1, 2, 2, 1); __PYX_ERR(0, 896, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cross", 1, 2, 2, 1); __PYX_ERR(0, 914, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cross") < 0)) __PYX_ERR(0, 896, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cross") < 0)) __PYX_ERR(0, 914, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -17036,7 +17401,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cross", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 896, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cross", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 914, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17072,7 +17437,7 @@ static PyObject *__pyx_pf_7_pynini_10cross(CYTHON_UNUSED PyObject *__pyx_self, P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cross", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_cross(__pyx_v_fst1, __pyx_v_fst2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_cross(__pyx_v_fst1, __pyx_v_fst2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17089,7 +17454,7 @@ static PyObject *__pyx_pf_7_pynini_10cross(CYTHON_UNUSED PyObject *__pyx_self, P return __pyx_r; } -/* "_pynini.pyx":926 +/* "_pynini.pyx":944 * * * cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): # <<<<<<<<<<<<<< @@ -17113,16 +17478,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx struct __pyx_obj_7_pynini_Fst *__pyx_v__l = 0; struct __pyx_obj_7_pynini_Fst *__pyx_v__r = 0; struct __pyx_obj_7_pynini_Fst *__pyx_v_result = 0; - enum fst::CDRewriteDirection __pyx_v__direction; - enum fst::CDRewriteMode __pyx_v__mode; + fst::CDRewriteDirection __pyx_v__direction; + fst::CDRewriteMode __pyx_v__mode; struct __pyx_obj_7_pynini_Fst *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; std::string __pyx_t_2; PyObject *__pyx_t_3 = NULL; struct __pyx_opt_args_7_pynini__compile_or_copy_Fst __pyx_t_4; - enum fst::CDRewriteDirection __pyx_t_5; - enum fst::CDRewriteMode __pyx_t_6; + fst::CDRewriteDirection __pyx_t_5; + fst::CDRewriteMode __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -17136,19 +17501,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx } } - /* "_pynini.pyx":964 + /* "_pynini.pyx":982 * FstOpError: Operation failed. * """ * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star) # <<<<<<<<<<<<<< * cdef string arc_type = _sigma_star.arc_type() * cdef Fst _tau = _compile_or_copy_Fst(tau, arc_type) */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_sigma_star, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_sigma_star, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__sigma_star = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":965 + /* "_pynini.pyx":983 * """ * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star) * cdef string arc_type = _sigma_star.arc_type() # <<<<<<<<<<<<<< @@ -17157,100 +17522,100 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ if (unlikely(((PyObject *)__pyx_v__sigma_star) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 965, __pyx_L1_error) + __PYX_ERR(0, 983, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__sigma_star->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__sigma_star), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__sigma_star->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__sigma_star), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L1_error) __pyx_v_arc_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pynini.pyx":966 + /* "_pynini.pyx":984 * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star) * cdef string arc_type = _sigma_star.arc_type() * cdef Fst _tau = _compile_or_copy_Fst(tau, arc_type) # <<<<<<<<<<<<<< * cdef Fst _l = _compile_or_copy_Fst(l, arc_type) * cdef Fst _r = _compile_or_copy_Fst(r, arc_type) */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4.__pyx_n = 1; __pyx_t_4.arc_type = __pyx_t_1; - __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_tau, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_tau, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__tau = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":967 + /* "_pynini.pyx":985 * cdef string arc_type = _sigma_star.arc_type() * cdef Fst _tau = _compile_or_copy_Fst(tau, arc_type) * cdef Fst _l = _compile_or_copy_Fst(l, arc_type) # <<<<<<<<<<<<<< * cdef Fst _r = _compile_or_copy_Fst(r, arc_type) * cdef Fst result = Fst(arc_type) */ - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4.__pyx_n = 1; __pyx_t_4.arc_type = __pyx_t_3; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_l, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_l, &__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v__l = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":968 + /* "_pynini.pyx":986 * cdef Fst _tau = _compile_or_copy_Fst(tau, arc_type) * cdef Fst _l = _compile_or_copy_Fst(l, arc_type) * cdef Fst _r = _compile_or_copy_Fst(r, arc_type) # <<<<<<<<<<<<<< * cdef Fst result = Fst(arc_type) * cdef _CDRewriteDirection _direction = _get_cdrewrite_direction(tostring( */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4.__pyx_n = 1; __pyx_t_4.arc_type = __pyx_t_1; - __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_r, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_r, &__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":969 + /* "_pynini.pyx":987 * cdef Fst _l = _compile_or_copy_Fst(l, arc_type) * cdef Fst _r = _compile_or_copy_Fst(r, arc_type) * cdef Fst result = Fst(arc_type) # <<<<<<<<<<<<<< * cdef _CDRewriteDirection _direction = _get_cdrewrite_direction(tostring( * direction)) */ - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_arc_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":970 + /* "_pynini.pyx":988 * cdef Fst _r = _compile_or_copy_Fst(r, arc_type) * cdef Fst result = Fst(arc_type) * cdef _CDRewriteDirection _direction = _get_cdrewrite_direction(tostring( # <<<<<<<<<<<<<< * direction)) * cdef _CDRewriteMode _mode = _get_cdrewrite_mode(tostring(mode)) */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_direction); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L1_error) - __pyx_t_5 = __pyx_f_7_pynini__get_cdrewrite_direction(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_direction); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_5 = __pyx_f_7_pynini__get_cdrewrite_direction(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) __pyx_v__direction = __pyx_t_5; - /* "_pynini.pyx":972 + /* "_pynini.pyx":990 * cdef _CDRewriteDirection _direction = _get_cdrewrite_direction(tostring( * direction)) * cdef _CDRewriteMode _mode = _get_cdrewrite_mode(tostring(mode)) # <<<<<<<<<<<<<< * CDRewriteCompile(deref(_tau._fst), * deref(_l._fst), */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_mode); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_cdrewrite_mode(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_mode); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_cdrewrite_mode(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L1_error) __pyx_v__mode = __pyx_t_6; - /* "_pynini.pyx":973 + /* "_pynini.pyx":991 * direction)) * cdef _CDRewriteMode _mode = _get_cdrewrite_mode(tostring(mode)) * CDRewriteCompile(deref(_tau._fst), # <<<<<<<<<<<<<< @@ -17259,10 +17624,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ if (unlikely(((PyObject *)__pyx_v__tau) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 973, __pyx_L1_error) + __PYX_ERR(0, 991, __pyx_L1_error) } - /* "_pynini.pyx":974 + /* "_pynini.pyx":992 * cdef _CDRewriteMode _mode = _get_cdrewrite_mode(tostring(mode)) * CDRewriteCompile(deref(_tau._fst), * deref(_l._fst), # <<<<<<<<<<<<<< @@ -17271,10 +17636,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ if (unlikely(((PyObject *)__pyx_v__l) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 974, __pyx_L1_error) + __PYX_ERR(0, 992, __pyx_L1_error) } - /* "_pynini.pyx":975 + /* "_pynini.pyx":993 * CDRewriteCompile(deref(_tau._fst), * deref(_l._fst), * deref(_r._fst), # <<<<<<<<<<<<<< @@ -17283,10 +17648,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ if (unlikely(((PyObject *)__pyx_v__r) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 975, __pyx_L1_error) + __PYX_ERR(0, 993, __pyx_L1_error) } - /* "_pynini.pyx":976 + /* "_pynini.pyx":994 * deref(_l._fst), * deref(_r._fst), * deref(_sigma_star._fst), # <<<<<<<<<<<<<< @@ -17295,10 +17660,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ if (unlikely(((PyObject *)__pyx_v__sigma_star) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 976, __pyx_L1_error) + __PYX_ERR(0, 994, __pyx_L1_error) } - /* "_pynini.pyx":973 + /* "_pynini.pyx":991 * direction)) * cdef _CDRewriteMode _mode = _get_cdrewrite_mode(tostring(mode)) * CDRewriteCompile(deref(_tau._fst), # <<<<<<<<<<<<<< @@ -17307,16 +17672,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx */ fst::script::CDRewriteCompile((*__pyx_v__tau->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__l->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__r->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__sigma_star->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), __pyx_v__direction, __pyx_v__mode, fst::kBosIndex, fst::kEosIndex); - /* "_pynini.pyx":982 + /* "_pynini.pyx":1000 * kBosIndex, * kEosIndex) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 982, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error) - /* "_pynini.pyx":983 + /* "_pynini.pyx":1001 * kEosIndex) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -17328,7 +17693,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_cdrewrite(PyObject *__pyx __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":926 + /* "_pynini.pyx":944 * * * cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): # <<<<<<<<<<<<<< @@ -17361,7 +17726,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_7_pynini_12cdrewrite, "\n cdrewrite(tau, l, r, sigma_star, direction=\"ltr\", mode=\"obl\")\n\n Compiles a transducer expressing a context-dependent rewrite rule.\n\n This operation compiles a transducer representing a context-dependent\n rewrite rule of the form\n\n tau / L __ R\n\n over a finite vocabulary.\n\n There are two reserved symbols: \"[BOS]\" denotes the left edge of a string\n within L, and \"[EOS]\" (end of string) denotes the right edge of a string\n within R. Note that these reserved symbols do not have any special\n interpretation anywhere else within this library.\n \n Args:\n tau: A transducer representing the desired transduction tau.\n l: An unweighted acceptor representing the left context L.\n r: An unweighted acceptor representing the right context R.\n sigma_star: A cyclic, unweighted acceptor representing the closure over the\n alphabet.\n direction: A string specifying the direction of rule application; one of:\n \"ltr\" (left-to-right application), \"rtl\" (right-to-left application),\n or \"sim\" (simultaneous application).\n mode: A string specifying the mode of rule application; one of: \"obl\"\n (obligatory application), \"opt\" (optional application).\n\n Returns:\n An FST.\n\n Raises:\n FstArgError: Unknown cdrewrite direction type.\n FstArgError: Unknown cdrewrite mode type.\n FstOpError: Operation failed.\n "); +PyDoc_STRVAR(__pyx_doc_7_pynini_12cdrewrite, "\n cdrewrite(tau, l, r, sigma_star, direction=\"ltr\", mode=\"obl\")\n\n Compiles a transducer expressing a context-dependent rewrite rule.\n\n This operation compiles a transducer representing a context-dependent\n rewrite rule of the form\n\n tau / L __ R\n\n over a finite vocabulary.\n\n There are two reserved symbols: \"[BOS]\" denotes the left edge of a string\n within L, and \"[EOS]\" (end of string) denotes the right edge of a string\n within R. Note that these reserved symbols do not have any special\n interpretation anywhere else within this library.\n\n Args:\n tau: A transducer representing the desired transduction tau.\n l: An unweighted acceptor representing the left context L.\n r: An unweighted acceptor representing the right context R.\n sigma_star: A cyclic, unweighted acceptor representing the closure over the\n alphabet.\n direction: A string specifying the direction of rule application; one of:\n \"ltr\" (left-to-right application), \"rtl\" (right-to-left application),\n or \"sim\" (simultaneous application).\n mode: A string specifying the mode of rule application; one of: \"obl\"\n (obligatory application), \"opt\" (optional application).\n\n Returns:\n An FST.\n\n Raises:\n FstArgError: Unknown cdrewrite direction type.\n FstArgError: Unknown cdrewrite mode type.\n FstOpError: Operation failed.\n "); static PyMethodDef __pyx_mdef_7_pynini_13cdrewrite = {"cdrewrite", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7_pynini_13cdrewrite, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7_pynini_12cdrewrite}; static PyObject *__pyx_pw_7_pynini_13cdrewrite(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -17424,7 +17789,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -17432,9 +17797,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 1); __PYX_ERR(0, 926, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 1); __PYX_ERR(0, 944, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -17442,9 +17807,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 2); __PYX_ERR(0, 926, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 2); __PYX_ERR(0, 944, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -17452,28 +17817,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 3); __PYX_ERR(0, 926, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, 3); __PYX_ERR(0, 944, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 926, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cdrewrite") < 0)) __PYX_ERR(0, 926, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cdrewrite") < 0)) __PYX_ERR(0, 944, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -17498,7 +17863,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 926, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cdrewrite", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 944, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17538,7 +17903,7 @@ static PyObject *__pyx_pf_7_pynini_12cdrewrite(CYTHON_UNUSED PyObject *__pyx_sel __pyx_t_2.__pyx_n = 2; __pyx_t_2.direction = __pyx_v_direction; __pyx_t_2.mode = __pyx_v_mode; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_cdrewrite(__pyx_v_tau, __pyx_v_l, __pyx_v_r, __pyx_v_sigma_star, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_cdrewrite(__pyx_v_tau, __pyx_v_l, __pyx_v_r, __pyx_v_sigma_star, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17555,7 +17920,7 @@ static PyObject *__pyx_pf_7_pynini_12cdrewrite(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "_pynini.pyx":986 +/* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< @@ -17573,7 +17938,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObject *__pyx_v_mu, PyObject *__pyx_v_nu, PyObject *__pyx_v_sigma_star, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_leniently_compose *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto); - /* "_pynini.pyx":987 + /* "_pynini.pyx":1005 * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -17609,14 +17974,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec } } - /* "_pynini.pyx":1017 + /* "_pynini.pyx":1035 * cdef Fst _mu * cdef Fst _nu * (_mu, _nu) = _compile_or_copy_two_Fsts(mu, nu) # <<<<<<<<<<<<<< * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star, _mu.arc_type()) * cdef unique_ptr[ComposeOptions] _opts */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_mu, __pyx_v_nu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_mu, __pyx_v_nu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __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; @@ -17624,7 +17989,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1017, __pyx_L1_error) + __PYX_ERR(0, 1035, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17637,15 +18002,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec __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, 1017, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __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, 1017, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -17653,7 +18018,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec __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, 1017, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1035, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -17661,17 +18026,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1017, __pyx_L1_error) + __PYX_ERR(0, 1035, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1017, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1017, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1035, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1035, __pyx_L1_error) __pyx_v__mu = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__nu = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1018 + /* "_pynini.pyx":1036 * cdef Fst _nu * (_mu, _nu) = _compile_or_copy_two_Fsts(mu, nu) * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star, _mu.arc_type()) # <<<<<<<<<<<<<< @@ -17680,30 +18045,30 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ if (unlikely(((PyObject *)__pyx_v__mu) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1018, __pyx_L1_error) + __PYX_ERR(0, 1036, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__mu->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__mu), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__mu->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__mu), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7.__pyx_n = 1; __pyx_t_7.arc_type = __pyx_t_1; - __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_sigma_star, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_sigma_star, &__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v__sigma_star = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1022 + /* "_pynini.pyx":1040 * _opts.reset( * new ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_mu.arc_type()) * LenientlyCompose(deref(_mu._fst), */ - __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) - __pyx_t_8 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_t_8 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error) - /* "_pynini.pyx":1020 + /* "_pynini.pyx":1038 * cdef Fst _sigma_star = _compile_or_copy_Fst(sigma_star, _mu.arc_type()) * cdef unique_ptr[ComposeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -17712,7 +18077,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ __pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_8)); - /* "_pynini.pyx":1023 + /* "_pynini.pyx":1041 * new ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * cdef Fst result = Fst(_mu.arc_type()) # <<<<<<<<<<<<<< @@ -17721,18 +18086,18 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ if (unlikely(((PyObject *)__pyx_v__mu) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1023, __pyx_L1_error) + __PYX_ERR(0, 1041, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__mu->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__mu), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__mu->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__mu), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1041, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1024 + /* "_pynini.pyx":1042 * _get_compose_filter(tostring(compose_filter)))) * cdef Fst result = Fst(_mu.arc_type()) * LenientlyCompose(deref(_mu._fst), # <<<<<<<<<<<<<< @@ -17741,10 +18106,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ if (unlikely(((PyObject *)__pyx_v__mu) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1024, __pyx_L1_error) + __PYX_ERR(0, 1042, __pyx_L1_error) } - /* "_pynini.pyx":1025 + /* "_pynini.pyx":1043 * cdef Fst result = Fst(_mu.arc_type()) * LenientlyCompose(deref(_mu._fst), * deref(_nu._fst), # <<<<<<<<<<<<<< @@ -17753,10 +18118,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ if (unlikely(((PyObject *)__pyx_v__nu) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1025, __pyx_L1_error) + __PYX_ERR(0, 1043, __pyx_L1_error) } - /* "_pynini.pyx":1026 + /* "_pynini.pyx":1044 * LenientlyCompose(deref(_mu._fst), * deref(_nu._fst), * deref(_sigma_star._fst), # <<<<<<<<<<<<<< @@ -17765,10 +18130,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ if (unlikely(((PyObject *)__pyx_v__sigma_star) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1026, __pyx_L1_error) + __PYX_ERR(0, 1044, __pyx_L1_error) } - /* "_pynini.pyx":1024 + /* "_pynini.pyx":1042 * _get_compose_filter(tostring(compose_filter)))) * cdef Fst result = Fst(_mu.arc_type()) * LenientlyCompose(deref(_mu._fst), # <<<<<<<<<<<<<< @@ -17777,16 +18142,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec */ fst::script::LenientlyCompose((*__pyx_v__mu->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__nu->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__sigma_star->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts)); - /* "_pynini.pyx":1029 + /* "_pynini.pyx":1047 * result._mfst.get(), * deref(_opts)) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1047, __pyx_L1_error) - /* "_pynini.pyx":1030 + /* "_pynini.pyx":1048 * deref(_opts)) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -17798,7 +18163,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_leniently_compose(PyObjec __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":986 + /* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< @@ -17891,7 +18256,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -17899,9 +18264,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, 1); __PYX_ERR(0, 986, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, 1); __PYX_ERR(0, 1004, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -17909,28 +18274,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, 2); __PYX_ERR(0, 986, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, 2); __PYX_ERR(0, 1004, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1004, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leniently_compose") < 0)) __PYX_ERR(0, 986, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "leniently_compose") < 0)) __PYX_ERR(0, 1004, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -17950,10 +18315,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_sigma_star = values[2]; __pyx_v_compose_filter = values[3]; if (values[4]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L3_error) } else { - /* "_pynini.pyx":987 + /* "_pynini.pyx":1005 * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -17965,7 +18330,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 986, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("leniently_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1004, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17981,7 +18346,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7_pynini_14leniently_compose(__pyx_self, __pyx_v_mu, __pyx_v_nu, __pyx_v_sigma_star, __pyx_v_compose_filter, __pyx_v_connect); - /* "_pynini.pyx":986 + /* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< @@ -18013,7 +18378,7 @@ static PyObject *__pyx_pf_7_pynini_14leniently_compose(CYTHON_UNUSED PyObject *_ __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_leniently_compose(__pyx_v_mu, __pyx_v_nu, __pyx_v_sigma_star, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_leniently_compose(__pyx_v_mu, __pyx_v_nu, __pyx_v_sigma_star, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18030,7 +18395,7 @@ static PyObject *__pyx_pf_7_pynini_14leniently_compose(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "_pynini.pyx":1033 +/* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< @@ -18048,7 +18413,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_string_file *__pyx_optional_args) { PyObject *__pyx_v_arc_type = ((PyObject *)__pyx_n_u_standard); - /* "_pynini.pyx":1035 + /* "_pynini.pyx":1053 * cpdef Fst string_file(filename, * arc_type="standard", * input_token_type=None, # <<<<<<<<<<<<<< @@ -18057,7 +18422,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ PyObject *__pyx_v_input_token_type = ((PyObject *)Py_None); - /* "_pynini.pyx":1036 + /* "_pynini.pyx":1054 * arc_type="standard", * input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -18096,7 +18461,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p } } - /* "_pynini.pyx":1083 + /* "_pynini.pyx":1101 * """ * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL # <<<<<<<<<<<<<< @@ -18105,7 +18470,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__isymbols = NULL; - /* "_pynini.pyx":1084 + /* "_pynini.pyx":1102 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -18115,7 +18480,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p __pyx_t_1 = (__pyx_v_input_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":1085 + /* "_pynini.pyx":1103 * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: * _input_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -18124,7 +18489,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__input_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":1086 + /* "_pynini.pyx":1104 * if input_token_type is None: * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -18133,7 +18498,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__isymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":1084 + /* "_pynini.pyx":1102 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -18143,23 +18508,23 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p goto __pyx_L3; } - /* "_pynini.pyx":1087 + /* "_pynini.pyx":1105 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":1088 + /* "_pynini.pyx":1106 * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -18168,7 +18533,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__input_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":1089 + /* "_pynini.pyx":1107 * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -18177,12 +18542,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ if (unlikely(__pyx_v_input_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1089, __pyx_L1_error) + __PYX_ERR(0, 1107, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error) __pyx_v__isymbols = __pyx_t_4; - /* "_pynini.pyx":1087 + /* "_pynini.pyx":1105 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -18192,7 +18557,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p goto __pyx_L3; } - /* "_pynini.pyx":1091 + /* "_pynini.pyx":1109 * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() * else: * _input_token_type = _get_token_type(tostring(input_token_type)) # <<<<<<<<<<<<<< @@ -18200,13 +18565,13 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p * cdef const_SymbolTable_ptr _osymbols = NULL */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) __pyx_v__input_token_type = __pyx_t_6; } __pyx_L3:; - /* "_pynini.pyx":1093 + /* "_pynini.pyx":1111 * _input_token_type = _get_token_type(tostring(input_token_type)) * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL # <<<<<<<<<<<<<< @@ -18215,7 +18580,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__osymbols = NULL; - /* "_pynini.pyx":1094 + /* "_pynini.pyx":1112 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -18225,7 +18590,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p __pyx_t_1 = (__pyx_v_output_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":1095 + /* "_pynini.pyx":1113 * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: * _output_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -18234,7 +18599,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__output_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":1096 + /* "_pynini.pyx":1114 * if output_token_type is None: * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -18243,7 +18608,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__osymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":1094 + /* "_pynini.pyx":1112 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -18253,23 +18618,23 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p goto __pyx_L4; } - /* "_pynini.pyx":1097 + /* "_pynini.pyx":1115 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":1098 + /* "_pynini.pyx":1116 * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -18278,7 +18643,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_v__output_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":1099 + /* "_pynini.pyx":1117 * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -18287,12 +18652,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ if (unlikely(__pyx_v_output_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1099, __pyx_L1_error) + __PYX_ERR(0, 1117, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L1_error) __pyx_v__osymbols = __pyx_t_4; - /* "_pynini.pyx":1097 + /* "_pynini.pyx":1115 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -18302,7 +18667,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p goto __pyx_L4; } - /* "_pynini.pyx":1101 + /* "_pynini.pyx":1119 * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() * else: * _output_token_type = _get_token_type(tostring(output_token_type)) # <<<<<<<<<<<<<< @@ -18310,38 +18675,38 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p * if not StringFileCompile(path_tostring(filename), */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L1_error) __pyx_v__output_token_type = __pyx_t_6; } __pyx_L4:; - /* "_pynini.pyx":1102 + /* "_pynini.pyx":1120 * else: * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst result = Fst(arc_type=arc_type) # <<<<<<<<<<<<<< * if not StringFileCompile(path_tostring(filename), * result._mfst.get(), */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 1102, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 1120, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1103 + /* "_pynini.pyx":1121 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst result = Fst(arc_type=arc_type) * if not StringFileCompile(path_tostring(filename), # <<<<<<<<<<<<<< * result._mfst.get(), * _input_token_type, */ - __pyx_t_5 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1121, __pyx_L1_error) - /* "_pynini.pyx":1108 + /* "_pynini.pyx":1126 * _output_token_type, * _isymbols, * _osymbols): # <<<<<<<<<<<<<< @@ -18350,7 +18715,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ __pyx_t_1 = (!(fst::script::StringFileCompile(__pyx_t_5, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), __pyx_v__input_token_type, __pyx_v__output_token_type, __pyx_v__isymbols, __pyx_v__osymbols) != 0)); - /* "_pynini.pyx":1103 + /* "_pynini.pyx":1121 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst result = Fst(arc_type=arc_type) * if not StringFileCompile(path_tostring(filename), # <<<<<<<<<<<<<< @@ -18359,14 +18724,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":1109 + /* "_pynini.pyx":1127 * _isymbols, * _osymbols): * raise FstIOError("Read failed") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -18386,15 +18751,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u_Read_failed}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1109, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __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, 1109, __pyx_L1_error) + __PYX_ERR(0, 1127, __pyx_L1_error) - /* "_pynini.pyx":1103 + /* "_pynini.pyx":1121 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst result = Fst(arc_type=arc_type) * if not StringFileCompile(path_tostring(filename), # <<<<<<<<<<<<<< @@ -18403,7 +18768,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p */ } - /* "_pynini.pyx":1110 + /* "_pynini.pyx":1128 * _osymbols): * raise FstIOError("Read failed") * return result # <<<<<<<<<<<<<< @@ -18415,7 +18780,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_file(PyObject *__p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1033 + /* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< @@ -18481,7 +18846,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_arc_type,&__pyx_n_s_input_token_type,&__pyx_n_s_output_token_type,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_standard)); - /* "_pynini.pyx":1035 + /* "_pynini.pyx":1053 * cpdef Fst string_file(filename, * arc_type="standard", * input_token_type=None, # <<<<<<<<<<<<<< @@ -18490,7 +18855,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); - /* "_pynini.pyx":1036 + /* "_pynini.pyx":1054 * arc_type="standard", * input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -18519,33 +18884,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_token_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output_token_type); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string_file") < 0)) __PYX_ERR(0, 1033, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string_file") < 0)) __PYX_ERR(0, 1051, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -18567,7 +18932,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("string_file", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1033, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("string_file", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1051, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18583,7 +18948,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7_pynini_16string_file(__pyx_self, __pyx_v_filename, __pyx_v_arc_type, __pyx_v_input_token_type, __pyx_v_output_token_type); - /* "_pynini.pyx":1033 + /* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< @@ -18616,7 +18981,7 @@ static PyObject *__pyx_pf_7_pynini_16string_file(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2.arc_type = __pyx_v_arc_type; __pyx_t_2.input_token_type = __pyx_v_input_token_type; __pyx_t_2.output_token_type = __pyx_v_output_token_type; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_string_file(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_string_file(__pyx_v_filename, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18633,7 +18998,7 @@ static PyObject *__pyx_pf_7_pynini_16string_file(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1113 +/* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< @@ -18651,7 +19016,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__pyx_v_lines, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_string_map *__pyx_optional_args) { PyObject *__pyx_v_arc_type = ((PyObject *)__pyx_n_u_standard); - /* "_pynini.pyx":1115 + /* "_pynini.pyx":1133 * cpdef Fst string_map(lines, * arc_type="standard", * input_token_type=None, # <<<<<<<<<<<<<< @@ -18660,7 +19025,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ PyObject *__pyx_v_input_token_type = ((PyObject *)Py_None); - /* "_pynini.pyx":1116 + /* "_pynini.pyx":1134 * arc_type="standard", * input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -18708,7 +19073,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py } } - /* "_pynini.pyx":1152 + /* "_pynini.pyx":1170 * """ * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL # <<<<<<<<<<<<<< @@ -18717,7 +19082,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__isymbols = NULL; - /* "_pynini.pyx":1153 + /* "_pynini.pyx":1171 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -18727,7 +19092,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_t_1 = (__pyx_v_input_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":1154 + /* "_pynini.pyx":1172 * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: * _input_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -18736,7 +19101,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__input_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":1155 + /* "_pynini.pyx":1173 * if input_token_type is None: * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -18745,7 +19110,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__isymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":1153 + /* "_pynini.pyx":1171 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -18755,23 +19120,23 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L3; } - /* "_pynini.pyx":1156 + /* "_pynini.pyx":1174 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":1157 + /* "_pynini.pyx":1175 * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -18780,7 +19145,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__input_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":1158 + /* "_pynini.pyx":1176 * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -18789,12 +19154,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ if (unlikely(__pyx_v_input_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1176, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1176, __pyx_L1_error) __pyx_v__isymbols = __pyx_t_4; - /* "_pynini.pyx":1156 + /* "_pynini.pyx":1174 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -18804,7 +19169,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L3; } - /* "_pynini.pyx":1160 + /* "_pynini.pyx":1178 * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() * else: * _input_token_type = _get_token_type(tostring(input_token_type)) # <<<<<<<<<<<<<< @@ -18812,13 +19177,13 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py * cdef const_SymbolTable_ptr _osymbols = NULL */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L1_error) __pyx_v__input_token_type = __pyx_t_6; } __pyx_L3:; - /* "_pynini.pyx":1162 + /* "_pynini.pyx":1180 * _input_token_type = _get_token_type(tostring(input_token_type)) * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL # <<<<<<<<<<<<<< @@ -18827,7 +19192,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__osymbols = NULL; - /* "_pynini.pyx":1163 + /* "_pynini.pyx":1181 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -18837,7 +19202,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_t_1 = (__pyx_v_output_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":1164 + /* "_pynini.pyx":1182 * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: * _output_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -18846,7 +19211,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__output_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":1165 + /* "_pynini.pyx":1183 * if output_token_type is None: * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -18855,7 +19220,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__osymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":1163 + /* "_pynini.pyx":1181 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -18865,23 +19230,23 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L4; } - /* "_pynini.pyx":1166 + /* "_pynini.pyx":1184 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":1167 + /* "_pynini.pyx":1185 * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -18890,7 +19255,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ __pyx_v__output_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":1168 + /* "_pynini.pyx":1186 * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -18899,12 +19264,12 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ if (unlikely(__pyx_v_output_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1168, __pyx_L1_error) + __PYX_ERR(0, 1186, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error) __pyx_v__osymbols = __pyx_t_4; - /* "_pynini.pyx":1166 + /* "_pynini.pyx":1184 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -18914,7 +19279,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L4; } - /* "_pynini.pyx":1170 + /* "_pynini.pyx":1188 * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() * else: * _output_token_type = _get_token_type(tostring(output_token_type)) # <<<<<<<<<<<<<< @@ -18922,13 +19287,13 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py * for line in lines: */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1170, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1188, __pyx_L1_error) __pyx_v__output_token_type = __pyx_t_6; } __pyx_L4:; - /* "_pynini.pyx":1172 + /* "_pynini.pyx":1190 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef vector[vector[string]] _lines * for line in lines: # <<<<<<<<<<<<<< @@ -18940,9 +19305,9 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_lines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_lines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1190, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { @@ -18950,28 +19315,28 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -18981,7 +19346,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1172, __pyx_L1_error) + else __PYX_ERR(0, 1190, __pyx_L1_error) } break; } @@ -18990,7 +19355,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1173 + /* "_pynini.pyx":1191 * cdef vector[vector[string]] _lines * for line in lines: * if isinstance(line, str): # <<<<<<<<<<<<<< @@ -19000,31 +19365,31 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_t_1 = PyUnicode_Check(__pyx_v_line); if (__pyx_t_1) { - /* "_pynini.pyx":1174 + /* "_pynini.pyx":1192 * for line in lines: * if isinstance(line, str): * _lines.push_back([tostring(line)]) # <<<<<<<<<<<<<< * else: * _lines.push_back([tostring(elem) for elem in line]) */ - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_line); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1174, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_line); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_10 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_10 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; try { __pyx_v__lines.push_back(__pyx_t_10); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1174, __pyx_L1_error) + __PYX_ERR(0, 1192, __pyx_L1_error) } - /* "_pynini.pyx":1173 + /* "_pynini.pyx":1191 * cdef vector[vector[string]] _lines * for line in lines: * if isinstance(line, str): # <<<<<<<<<<<<<< @@ -19034,7 +19399,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L7; } - /* "_pynini.pyx":1176 + /* "_pynini.pyx":1194 * _lines.push_back([tostring(line)]) * else: * _lines.push_back([tostring(elem) for elem in line]) # <<<<<<<<<<<<<< @@ -19043,16 +19408,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ /*else*/ { { /* enter inner scope */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_9); if (likely(PyList_CheckExact(__pyx_v_line)) || PyTuple_CheckExact(__pyx_v_line)) { __pyx_t_3 = __pyx_v_line; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1194, __pyx_L10_error) } for (;;) { if (likely(!__pyx_t_12)) { @@ -19060,28 +19425,28 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1176, __pyx_L10_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1194, __pyx_L10_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_13 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_13 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1194, __pyx_L10_error) #else - __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_13); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1176, __pyx_L10_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1194, __pyx_L10_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_13); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1194, __pyx_L10_error) #else - __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_13); #endif } @@ -19091,7 +19456,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1176, __pyx_L10_error) + else __PYX_ERR(0, 1194, __pyx_L10_error) } break; } @@ -19099,10 +19464,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_elem, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_8genexpr1__pyx_v_elem); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1176, __pyx_L10_error) - __pyx_t_13 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1176, __pyx_L10_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_8genexpr1__pyx_v_elem); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L10_error) + __pyx_t_13 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_13); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1176, __pyx_L10_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1194, __pyx_L10_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -19113,18 +19478,18 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py goto __pyx_L1_error; __pyx_L14_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_10 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; try { __pyx_v__lines.push_back(__pyx_t_10); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1176, __pyx_L1_error) + __PYX_ERR(0, 1194, __pyx_L1_error) } } __pyx_L7:; - /* "_pynini.pyx":1172 + /* "_pynini.pyx":1190 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef vector[vector[string]] _lines * for line in lines: # <<<<<<<<<<<<<< @@ -19134,19 +19499,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1177 + /* "_pynini.pyx":1195 * else: * _lines.push_back([tostring(elem) for elem in line]) * cdef Fst result = Fst(arc_type) # <<<<<<<<<<<<<< * if not StringMapCompile(_lines, * result._mfst.get(), */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_v_arc_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_v_arc_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1178 + /* "_pynini.pyx":1196 * _lines.push_back([tostring(elem) for elem in line]) * cdef Fst result = Fst(arc_type) * if not StringMapCompile(_lines, # <<<<<<<<<<<<<< @@ -19156,14 +19521,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_t_1 = (!(fst::script::StringMapCompile(__pyx_v__lines, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), __pyx_v__input_token_type, __pyx_v__output_token_type, __pyx_v__isymbols, __pyx_v__osymbols) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":1184 + /* "_pynini.pyx":1202 * _isymbols, * _osymbols): * raise FstArgError("String map compilation failed") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1184, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = NULL; __pyx_t_14 = 0; @@ -19183,15 +19548,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_String_map_compilation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1184, __pyx_L1_error) + __PYX_ERR(0, 1202, __pyx_L1_error) - /* "_pynini.pyx":1178 + /* "_pynini.pyx":1196 * _lines.push_back([tostring(elem) for elem in line]) * cdef Fst result = Fst(arc_type) * if not StringMapCompile(_lines, # <<<<<<<<<<<<<< @@ -19200,7 +19565,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py */ } - /* "_pynini.pyx":1185 + /* "_pynini.pyx":1203 * _osymbols): * raise FstArgError("String map compilation failed") * return result # <<<<<<<<<<<<<< @@ -19212,7 +19577,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_string_map(PyObject *__py __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1113 + /* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< @@ -19281,7 +19646,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lines,&__pyx_n_s_arc_type,&__pyx_n_s_input_token_type,&__pyx_n_s_output_token_type,0}; values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_standard)); - /* "_pynini.pyx":1115 + /* "_pynini.pyx":1133 * cpdef Fst string_map(lines, * arc_type="standard", * input_token_type=None, # <<<<<<<<<<<<<< @@ -19290,7 +19655,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None)); - /* "_pynini.pyx":1116 + /* "_pynini.pyx":1134 * arc_type="standard", * input_token_type=None, * output_token_type=None): # <<<<<<<<<<<<<< @@ -19319,33 +19684,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_token_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output_token_type); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string_map") < 0)) __PYX_ERR(0, 1113, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "string_map") < 0)) __PYX_ERR(0, 1131, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -19367,7 +19732,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("string_map", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("string_map", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1131, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19383,7 +19748,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7_pynini_18string_map(__pyx_self, __pyx_v_lines, __pyx_v_arc_type, __pyx_v_input_token_type, __pyx_v_output_token_type); - /* "_pynini.pyx":1113 + /* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< @@ -19416,7 +19781,7 @@ static PyObject *__pyx_pf_7_pynini_18string_map(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2.arc_type = __pyx_v_arc_type; __pyx_t_2.input_token_type = __pyx_v_input_token_type; __pyx_t_2.output_token_type = __pyx_v_output_token_type; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_string_map(__pyx_v_lines, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_string_map(__pyx_v_lines, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19433,7 +19798,7 @@ static PyObject *__pyx_pf_7_pynini_18string_map(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "_pynini.pyx":1205 +/* "_pynini.pyx":1223 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -19470,7 +19835,7 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pynini.pyx":1206 + /* "_pynini.pyx":1224 * * def __repr__(self): * return f"" # <<<<<<<<<<<<<< @@ -19478,7 +19843,7 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p * cdef const_SymbolTable_ptr _raw(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -19488,12 +19853,12 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_const_pointer_SymbolTableView); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 1206, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini__PointerSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1206, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini__PointerSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -19505,9 +19870,9 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -19519,14 +19884,14 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pynini.pyx":1205 + /* "_pynini.pyx":1223 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -19547,7 +19912,7 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView___repr__(struct __p return __pyx_r; } -/* "_pynini.pyx":1208 +/* "_pynini.pyx":1226 * return f"" * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19561,7 +19926,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_7_pynini_23_PointerSym const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":1209 + /* "_pynini.pyx":1227 * * cdef const_SymbolTable_ptr _raw(self): * return self._symbols # <<<<<<<<<<<<<< @@ -19570,12 +19935,12 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_7_pynini_23_PointerSym */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_symbols"); - __PYX_ERR(0, 1209, __pyx_L1_error) + __PYX_ERR(0, 1227, __pyx_L1_error) } __pyx_r = __pyx_v_self->_symbols; goto __pyx_L0; - /* "_pynini.pyx":1208 + /* "_pynini.pyx":1226 * return f"" * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19805,7 +20170,7 @@ static PyObject *__pyx_pf_7_pynini_23_PointerSymbolTableView_4__setstate_cython_ return __pyx_r; } -/* "_pynini.pyx":1212 +/* "_pynini.pyx":1230 * * * cpdef _PointerSymbolTableView generated_symbols(): # <<<<<<<<<<<<<< @@ -19824,19 +20189,19 @@ static struct __pyx_obj_7_pynini__PointerSymbolTableView *__pyx_f_7_pynini_gener int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generated_symbols", 1); - /* "_pynini.pyx":1215 + /* "_pynini.pyx":1233 * """Returns a view of a symbol table containing generated symbols.""" * cdef _PointerSymbolTableView _symbols = ( * _PointerSymbolTableView.__new__(_PointerSymbolTableView)) # <<<<<<<<<<<<<< * _symbols._symbols = addr(GeneratedSymbols()) * return _symbols */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini__PointerSymbolTableView(((PyTypeObject *)__pyx_ptype_7_pynini__PointerSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini__PointerSymbolTableView(((PyTypeObject *)__pyx_ptype_7_pynini__PointerSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__symbols = ((struct __pyx_obj_7_pynini__PointerSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1216 + /* "_pynini.pyx":1234 * cdef _PointerSymbolTableView _symbols = ( * _PointerSymbolTableView.__new__(_PointerSymbolTableView)) * _symbols._symbols = addr(GeneratedSymbols()) # <<<<<<<<<<<<<< @@ -19845,11 +20210,11 @@ static struct __pyx_obj_7_pynini__PointerSymbolTableView *__pyx_f_7_pynini_gener */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_symbols"); - __PYX_ERR(0, 1216, __pyx_L1_error) + __PYX_ERR(0, 1234, __pyx_L1_error) } __pyx_v__symbols->_symbols = (&fst::GeneratedSymbols()); - /* "_pynini.pyx":1217 + /* "_pynini.pyx":1235 * _PointerSymbolTableView.__new__(_PointerSymbolTableView)) * _symbols._symbols = addr(GeneratedSymbols()) * return _symbols # <<<<<<<<<<<<<< @@ -19861,7 +20226,7 @@ static struct __pyx_obj_7_pynini__PointerSymbolTableView *__pyx_f_7_pynini_gener __pyx_r = __pyx_v__symbols; goto __pyx_L0; - /* "_pynini.pyx":1212 + /* "_pynini.pyx":1230 * * * cpdef _PointerSymbolTableView generated_symbols(): # <<<<<<<<<<<<<< @@ -19907,7 +20272,7 @@ static PyObject *__pyx_pf_7_pynini_20generated_symbols(CYTHON_UNUSED PyObject *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("generated_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_generated_symbols(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_generated_symbols(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19924,7 +20289,7 @@ static PyObject *__pyx_pf_7_pynini_20generated_symbols(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "_pynini.pyx":1223 +/* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< @@ -19985,12 +20350,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1241, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_1arg_patch") < 0)) __PYX_ERR(0, 1223, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_1arg_patch") < 0)) __PYX_ERR(0, 1241, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -20001,7 +20366,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_1arg_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1223, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_1arg_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1241, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20028,7 +20393,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":1224 +/* "_pynini.pyx":1242 * * def _1arg_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -20100,13 +20465,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1242, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1224, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1242, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; @@ -20117,7 +20482,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1242, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20164,19 +20529,19 @@ static PyObject *__pyx_pf_7_pynini_11_1arg_patch_patch(PyObject *__pyx_self, PyO __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_2__1arg_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":1226 + /* "_pynini.pyx":1244 * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * return _init_Fst_from_MutableFst(fnc(_fst, *args, **kwargs)) * return patch */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1227 + /* "_pynini.pyx":1245 * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) * return _init_Fst_from_MutableFst(fnc(_fst, *args, **kwargs)) # <<<<<<<<<<<<<< @@ -20184,30 +20549,30 @@ static PyObject *__pyx_pf_7_pynini_11_1arg_patch_patch(PyObject *__pyx_self, PyO * */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1227, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1245, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v__fst); __Pyx_GIVEREF((PyObject *)__pyx_v__fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst))) __PYX_ERR(0, 1227, __pyx_L1_error); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst))) __PYX_ERR(0, 1245, __pyx_L1_error); + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1227, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1224 + /* "_pynini.pyx":1242 * * def _1arg_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -20229,7 +20594,7 @@ static PyObject *__pyx_pf_7_pynini_11_1arg_patch_patch(PyObject *__pyx_self, PyO return __pyx_r; } -/* "_pynini.pyx":1223 +/* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< @@ -20255,7 +20620,7 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_2__1arg_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1223, __pyx_L1_error) + __PYX_ERR(0, 1241, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20263,16 +20628,16 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":1224 + /* "_pynini.pyx":1242 * * def _1arg_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -20293,11 +20658,11 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_1arg_patch_1patch, 0, __pyx_n_s_1arg_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_1arg_patch_1patch, 0, __pyx_n_s_1arg_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -20318,14 +20683,14 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":1228 + /* "_pynini.pyx":1246 * cdef Fst _fst = _compile_or_copy_Fst(fst) * return _init_Fst_from_MutableFst(fnc(_fst, *args, **kwargs)) * return patch # <<<<<<<<<<<<<< @@ -20337,7 +20702,7 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":1223 + /* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< @@ -20361,7 +20726,7 @@ static PyObject *__pyx_pf_7_pynini_22_1arg_patch(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1244 +/* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< @@ -20422,12 +20787,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1244, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_shortestdistance_patch") < 0)) __PYX_ERR(0, 1244, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_shortestdistance_patch") < 0)) __PYX_ERR(0, 1262, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -20438,7 +20803,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_shortestdistance_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1244, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_shortestdistance_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1262, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20465,7 +20830,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":1245 +/* "_pynini.pyx":1263 * * def _shortestdistance_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -20537,13 +20902,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1245, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1245, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1263, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; @@ -20554,7 +20919,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1245, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1263, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20601,19 +20966,19 @@ static PyObject *__pyx_pf_7_pynini_23_shortestdistance_patch_patch(PyObject *__p __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_3__shortestdistance_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":1247 + /* "_pynini.pyx":1265 * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * return fnc(_fst, *args, **kwargs) * return patch */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1248 + /* "_pynini.pyx":1266 * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) * return fnc(_fst, *args, **kwargs) # <<<<<<<<<<<<<< @@ -20621,18 +20986,18 @@ static PyObject *__pyx_pf_7_pynini_23_shortestdistance_patch_patch(PyObject *__p * */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1248, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1266, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v__fst); __Pyx_GIVEREF((PyObject *)__pyx_v__fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst))) __PYX_ERR(0, 1248, __pyx_L1_error); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst))) __PYX_ERR(0, 1266, __pyx_L1_error); + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20640,7 +21005,7 @@ static PyObject *__pyx_pf_7_pynini_23_shortestdistance_patch_patch(PyObject *__p __pyx_t_3 = 0; goto __pyx_L0; - /* "_pynini.pyx":1245 + /* "_pynini.pyx":1263 * * def _shortestdistance_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -20662,7 +21027,7 @@ static PyObject *__pyx_pf_7_pynini_23_shortestdistance_patch_patch(PyObject *__p return __pyx_r; } -/* "_pynini.pyx":1244 +/* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< @@ -20688,7 +21053,7 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_3__shortestdistance_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1244, __pyx_L1_error) + __PYX_ERR(0, 1262, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20696,16 +21061,16 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":1245 + /* "_pynini.pyx":1263 * * def _shortestdistance_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -20726,11 +21091,11 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_23_shortestdistance_patch_1patch, 0, __pyx_n_s_shortestdistance_patch_locals_p, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_23_shortestdistance_patch_1patch, 0, __pyx_n_s_shortestdistance_patch_locals_p, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -20751,14 +21116,14 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":1249 + /* "_pynini.pyx":1267 * cdef Fst _fst = _compile_or_copy_Fst(fst) * return fnc(_fst, *args, **kwargs) * return patch # <<<<<<<<<<<<<< @@ -20770,7 +21135,7 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":1244 + /* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< @@ -20794,7 +21159,7 @@ static PyObject *__pyx_pf_7_pynini_24_shortestdistance_patch(CYTHON_UNUSED PyObj return __pyx_r; } -/* "_pynini.pyx":1260 +/* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< @@ -20855,12 +21220,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1278, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_compose_patch") < 0)) __PYX_ERR(0, 1260, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_compose_patch") < 0)) __PYX_ERR(0, 1278, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -20871,7 +21236,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_compose_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1260, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_compose_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1278, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20898,7 +21263,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":1261 +/* "_pynini.pyx":1279 * * def _compose_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -20973,7 +21338,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -20981,15 +21346,15 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1261, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1279, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1261, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1279, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; @@ -21002,7 +21367,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1261, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1279, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21052,14 +21417,14 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_4__compose_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":1265 + /* "_pynini.pyx":1283 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * return _init_Fst_from_MutableFst(fnc(_fst1, _fst2, *args, **kwargs)) */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __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; @@ -21067,7 +21432,7 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1265, __pyx_L1_error) + __PYX_ERR(0, 1283, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -21080,15 +21445,15 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, __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, 1265, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __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, 1265, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -21096,7 +21461,7 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, __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, 1265, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1283, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -21104,17 +21469,17 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1265, __pyx_L1_error) + __PYX_ERR(0, 1283, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1265, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1265, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1283, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1283, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1266 + /* "_pynini.pyx":1284 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) # <<<<<<<<<<<<<< @@ -21123,15 +21488,15 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1266, __pyx_L1_error) + __PYX_ERR(0, 1284, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1266, __pyx_L1_error) + __PYX_ERR(0, 1284, __pyx_L1_error) } - __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L1_error) - /* "_pynini.pyx":1267 + /* "_pynini.pyx":1285 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * return _init_Fst_from_MutableFst(fnc(_fst1, _fst2, *args, **kwargs)) # <<<<<<<<<<<<<< @@ -21139,33 +21504,33 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, * */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1267, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1285, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v__fst1); __Pyx_GIVEREF((PyObject *)__pyx_v__fst1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1267, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1285, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v__fst2); __Pyx_GIVEREF((PyObject *)__pyx_v__fst2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1267, __pyx_L1_error); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1285, __pyx_L1_error); + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __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; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1267, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1261 + /* "_pynini.pyx":1279 * * def _compose_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -21189,7 +21554,7 @@ static PyObject *__pyx_pf_7_pynini_14_compose_patch_patch(PyObject *__pyx_self, return __pyx_r; } -/* "_pynini.pyx":1260 +/* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< @@ -21215,7 +21580,7 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_4__compose_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1260, __pyx_L1_error) + __PYX_ERR(0, 1278, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -21223,16 +21588,16 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":1261 + /* "_pynini.pyx":1279 * * def _compose_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -21253,11 +21618,11 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1261, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14_compose_patch_1patch, 0, __pyx_n_s_compose_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14_compose_patch_1patch, 0, __pyx_n_s_compose_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -21278,14 +21643,14 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":1268 + /* "_pynini.pyx":1286 * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * return _init_Fst_from_MutableFst(fnc(_fst1, _fst2, *args, **kwargs)) * return patch # <<<<<<<<<<<<<< @@ -21297,7 +21662,7 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":1260 + /* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< @@ -21321,7 +21686,7 @@ static PyObject *__pyx_pf_7_pynini_26_compose_patch(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "_pynini.pyx":1275 +/* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< @@ -21382,12 +21747,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1275, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_difference_patch") < 0)) __PYX_ERR(0, 1275, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_difference_patch") < 0)) __PYX_ERR(0, 1293, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -21398,7 +21763,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_difference_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1275, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_difference_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1293, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21425,7 +21790,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":1276 +/* "_pynini.pyx":1294 * * def _difference_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -21500,7 +21865,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21508,15 +21873,15 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1276, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1294, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1276, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1294, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; @@ -21529,7 +21894,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1276, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1294, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21579,14 +21944,14 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_5__difference_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":1280 + /* "_pynini.pyx":1298 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * # Makes RHS epsilon-free and deterministic. * OptimizeDifferenceRhs(_fst2._mfst.get(), True) */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __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; @@ -21594,7 +21959,7 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1280, __pyx_L1_error) + __PYX_ERR(0, 1298, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -21607,15 +21972,15 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel __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, 1280, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __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, 1280, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -21623,7 +21988,7 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel __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, 1280, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -21631,17 +21996,17 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1280, __pyx_L1_error) + __PYX_ERR(0, 1298, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1280, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1280, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1298, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1298, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1282 + /* "_pynini.pyx":1300 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * # Makes RHS epsilon-free and deterministic. * OptimizeDifferenceRhs(_fst2._mfst.get(), True) # <<<<<<<<<<<<<< @@ -21650,11 +22015,11 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel */ if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1282, __pyx_L1_error) + __PYX_ERR(0, 1300, __pyx_L1_error) } fst::script::OptimizeDifferenceRhs(__pyx_v__fst2->__pyx_base.__pyx_base._mfst.get(), 1); - /* "_pynini.pyx":1283 + /* "_pynini.pyx":1301 * # Makes RHS epsilon-free and deterministic. * OptimizeDifferenceRhs(_fst2._mfst.get(), True) * return _init_Fst_from_MutableFst(fnc(_fst1, _fst2, *args, **kwargs)) # <<<<<<<<<<<<<< @@ -21662,33 +22027,33 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel * */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1283, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1301, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v__fst1); __Pyx_GIVEREF((PyObject *)__pyx_v__fst1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1283, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1301, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v__fst2); __Pyx_GIVEREF((PyObject *)__pyx_v__fst2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1283, __pyx_L1_error); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1301, __pyx_L1_error); + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __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; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1283, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_MutableFst))))) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__init_Fst_from_MutableFst(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1276 + /* "_pynini.pyx":1294 * * def _difference_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -21712,7 +22077,7 @@ static PyObject *__pyx_pf_7_pynini_17_difference_patch_patch(PyObject *__pyx_sel return __pyx_r; } -/* "_pynini.pyx":1275 +/* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< @@ -21738,7 +22103,7 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_5__difference_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1275, __pyx_L1_error) + __PYX_ERR(0, 1293, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -21746,16 +22111,16 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":1276 + /* "_pynini.pyx":1294 * * def _difference_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -21776,11 +22141,11 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_17_difference_patch_1patch, 0, __pyx_n_s_difference_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_17_difference_patch_1patch, 0, __pyx_n_s_difference_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -21801,14 +22166,14 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":1284 + /* "_pynini.pyx":1302 * OptimizeDifferenceRhs(_fst2._mfst.get(), True) * return _init_Fst_from_MutableFst(fnc(_fst1, _fst2, *args, **kwargs)) * return patch # <<<<<<<<<<<<<< @@ -21820,7 +22185,7 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":1275 + /* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< @@ -21844,7 +22209,7 @@ static PyObject *__pyx_pf_7_pynini_28_difference_patch(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "_pynini.pyx":1293 +/* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< @@ -21905,12 +22270,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_comp_patch") < 0)) __PYX_ERR(0, 1293, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_comp_patch") < 0)) __PYX_ERR(0, 1311, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -21921,7 +22286,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_comp_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1293, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_comp_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1311, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21948,7 +22313,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":1294 +/* "_pynini.pyx":1312 * * def _comp_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -22023,7 +22388,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -22031,15 +22396,15 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, 1); __PYX_ERR(0, 1312, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1294, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 1312, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; @@ -22052,7 +22417,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1312, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22102,14 +22467,14 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_6__comp_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":1298 + /* "_pynini.pyx":1316 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * return fnc(_fst1, _fst2, *args, **kwargs) * return patch */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __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; @@ -22117,7 +22482,7 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1298, __pyx_L1_error) + __PYX_ERR(0, 1316, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22130,15 +22495,15 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO __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, 1298, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1316, __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, 1298, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -22146,7 +22511,7 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO __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, 1298, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -22154,17 +22519,17 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1298, __pyx_L1_error) + __PYX_ERR(0, 1316, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1298, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1298, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1316, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1316, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1299 + /* "_pynini.pyx":1317 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * return fnc(_fst1, _fst2, *args, **kwargs) # <<<<<<<<<<<<<< @@ -22172,21 +22537,21 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO * */ __Pyx_XDECREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1299, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 1317, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v__fst1); __Pyx_GIVEREF((PyObject *)__pyx_v__fst1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1299, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v__fst1))) __PYX_ERR(0, 1317, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v__fst2); __Pyx_GIVEREF((PyObject *)__pyx_v__fst2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1299, __pyx_L1_error); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v__fst2))) __PYX_ERR(0, 1317, __pyx_L1_error); + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __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; @@ -22194,7 +22559,7 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":1294 + /* "_pynini.pyx":1312 * * def _comp_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -22218,7 +22583,7 @@ static PyObject *__pyx_pf_7_pynini_11_comp_patch_patch(PyObject *__pyx_self, PyO return __pyx_r; } -/* "_pynini.pyx":1293 +/* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< @@ -22244,7 +22609,7 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_6__comp_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1293, __pyx_L1_error) + __PYX_ERR(0, 1311, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -22252,16 +22617,16 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":1294 + /* "_pynini.pyx":1312 * * def _comp_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -22282,11 +22647,11 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_comp_patch_1patch, 0, __pyx_n_s_comp_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_comp_patch_1patch, 0, __pyx_n_s_comp_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -22307,14 +22672,14 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":1300 + /* "_pynini.pyx":1318 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * return fnc(_fst1, _fst2, *args, **kwargs) * return patch # <<<<<<<<<<<<<< @@ -22326,7 +22691,7 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":1293 + /* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< @@ -22350,7 +22715,7 @@ static PyObject *__pyx_pf_7_pynini_30_comp_patch(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1309 +/* "_pynini.pyx":1327 * * * cpdef Fst concat(fst1, fst2): # <<<<<<<<<<<<<< @@ -22381,14 +22746,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("concat", 1); - /* "_pynini.pyx":1329 + /* "_pynini.pyx":1347 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * return _fst1.concat(_fst2) * */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __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; @@ -22396,7 +22761,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1329, __pyx_L1_error) + __PYX_ERR(0, 1347, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22409,15 +22774,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ __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, 1329, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __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, 1329, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -22425,7 +22790,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ __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, 1329, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -22433,17 +22798,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1329, __pyx_L1_error) + __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1329, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1329, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1347, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1330 + /* "_pynini.pyx":1348 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * return _fst1.concat(_fst2) # <<<<<<<<<<<<<< @@ -22451,7 +22816,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__fst1), __pyx_n_s_concat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__fst1), __pyx_n_s_concat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_6 = 0; @@ -22471,16 +22836,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_concat(PyObject *__pyx_v_ PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v__fst2)}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1330, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1348, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1309 + /* "_pynini.pyx":1327 * * * cpdef Fst concat(fst1, fst2): # <<<<<<<<<<<<<< @@ -22561,7 +22926,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1309, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -22569,14 +22934,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1309, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("concat", 1, 2, 2, 1); __PYX_ERR(0, 1309, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("concat", 1, 2, 2, 1); __PYX_ERR(0, 1327, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 1309, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 1327, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -22589,7 +22954,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("concat", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1309, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("concat", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1327, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22625,7 +22990,7 @@ static PyObject *__pyx_pf_7_pynini_32concat(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_clineno = 0; __Pyx_RefNannySetupContext("concat", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_concat(__pyx_v_fst1, __pyx_v_fst2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_concat(__pyx_v_fst1, __pyx_v_fst2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22642,7 +23007,7 @@ static PyObject *__pyx_pf_7_pynini_32concat(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "_pynini.pyx":1333 +/* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< @@ -22661,7 +23026,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v PyObject *__pyx_v_call_arc_labeling = ((PyObject *)__pyx_n_u_input); PyObject *__pyx_v_return_arc_labeling = ((PyObject *)__pyx_n_u_neither); - /* "_pynini.pyx":1336 + /* "_pynini.pyx":1354 * call_arc_labeling="input", * return_arc_labeling="neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -22705,7 +23070,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v } __Pyx_INCREF(__pyx_v_pairs); - /* "_pynini.pyx":1374 + /* "_pynini.pyx":1392 * """ * # Keeps these in memory so they're not garbage-collected. * pairs = [(label, _compile_or_copy_Fst(fst)) for (label, fst) in pairs] # <<<<<<<<<<<<<< @@ -22713,16 +23078,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v * call_arc_labeling, */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_pairs)) || PyTuple_CheckExact(__pyx_v_pairs)) { __pyx_t_2 = __pyx_v_pairs; __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_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { @@ -22730,28 +23095,28 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1374, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1392, __pyx_L5_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 1374, __pyx_L5_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, 1392, __pyx_L5_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1374, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1392, __pyx_L5_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 1374, __pyx_L5_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, 1392, __pyx_L5_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -22761,7 +23126,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1374, __pyx_L5_error) + else __PYX_ERR(0, 1392, __pyx_L5_error) } break; } @@ -22773,7 +23138,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1374, __pyx_L5_error) + __PYX_ERR(0, 1392, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22786,15 +23151,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -22802,7 +23167,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1374, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1392, __pyx_L5_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -22810,24 +23175,24 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1374, __pyx_L5_error) + __PYX_ERR(0, 1392, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_label, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_fst, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_8genexpr2__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_8genexpr2__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L5_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_8genexpr2__pyx_v_label); __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_label); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_8genexpr2__pyx_v_label)) __PYX_ERR(0, 1374, __pyx_L5_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_8genexpr2__pyx_v_label)) __PYX_ERR(0, 1392, __pyx_L5_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L5_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L5_error); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1374, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1392, __pyx_L5_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -22843,7 +23208,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __Pyx_DECREF_SET(__pyx_v_pairs, __pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1375 + /* "_pynini.pyx":1393 * # Keeps these in memory so they're not garbage-collected. * pairs = [(label, _compile_or_copy_Fst(fst)) for (label, fst) in pairs] * return Fst.from_pywrapfst(_replace(pairs, # <<<<<<<<<<<<<< @@ -22851,10 +23216,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v * return_arc_labeling, */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pynini.pyx":1379 + /* "_pynini.pyx":1397 * return_arc_labeling, * epsilon_on_replace, * return_label)) # <<<<<<<<<<<<<< @@ -22866,7 +23231,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __pyx_t_10.return_arc_labeling = __pyx_v_return_arc_labeling; __pyx_t_10.epsilon_on_replace = __pyx_v_epsilon_on_replace; __pyx_t_10.return_label = __pyx_v_return_label; - __pyx_t_7 = ((PyObject *)__pyx_f_10_pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1375, __pyx_L1_error) + __pyx_t_7 = ((PyObject *)__pyx_f_10_pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -22887,24 +23252,24 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_replace(PyObject *__pyx_v __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "_pynini.pyx":1375 + /* "_pynini.pyx":1393 * # Keeps these in memory so they're not garbage-collected. * pairs = [(label, _compile_or_copy_Fst(fst)) for (label, fst) in pairs] * return Fst.from_pywrapfst(_replace(pairs, # <<<<<<<<<<<<<< * call_arc_labeling, * return_arc_labeling, */ - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1375, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1393, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1333 + /* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< @@ -22939,7 +23304,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_7_pynini_34replace, "\n replace(pairs, call_arc_labeling=\"input\", return_arc_labeling=\"neither\",\n epsilon_on_replace=False, return_label=0)\n\n Recursively replaces arcs in the FST with other FST(s).\n\n This operation performs the dynamic replacement of arcs in one FST with\n another FST, allowing the definition of FSTs analogous to RTNs. It takes as\n input a set of pairs of a set of pairs formed by a non-terminal label and\n its corresponding FST, and a label identifying the root FST in that set.\n The resulting FST is obtained by taking the root FST and recursively replacing\n each arc having a nonterminal as output label by its corresponding FST. More\n precisely, an arc from state s to state d with (nonterminal) output label n in\n this FST is replaced by redirecting this \"call\" arc to the initial state of a\n copy F of the FST for n, and adding \"return\" arcs from each final state of F\n to d. Optional arguments control how the call and return arcs are labeled; by\n default, the only non-epsilon label is placed on the call arc.\n\n Args:\n pairs: An iterable of (nonterminal label, FST) pairs, where the former is an\n unsigned integer and the latter is an Fst instance. \n call_arc_labeling: A string indicating which call arc labels should be\n non-epsilon. One of: \"input\" (default), \"output\", \"both\", \"neither\".\n This value is set to \"neither\" if epsilon_on_replace is True.\n return_arc_labeling: A string indicating which return arc labels should be\n non-epsilon. One of: \"input\", \"output\", \"both\", \"neither\" (default).\n This value is set to \"neither\" if epsilon_on_replace is True.\n epsilon_on_replace: Should call and return arcs be epsilon arcs? If True,\n this effectively overrides call_arc_labeling and return_arc_labeling,\n setting both to \"neither\".\n return_label: The integer label for return arcs.\n\n Returns:\n An FST.\n "); +PyDoc_STRVAR(__pyx_doc_7_pynini_34replace, "\n replace(pairs, call_arc_labeling=\"input\", return_arc_labeling=\"neither\",\n epsilon_on_replace=False, return_label=0)\n\n Recursively replaces arcs in the FST with other FST(s).\n\n This operation performs the dynamic replacement of arcs in one FST with\n another FST, allowing the definition of FSTs analogous to RTNs. It takes as\n input a set of pairs of a set of pairs formed by a non-terminal label and\n its corresponding FST, and a label identifying the root FST in that set.\n The resulting FST is obtained by taking the root FST and recursively replacing\n each arc having a nonterminal as output label by its corresponding FST. More\n precisely, an arc from state s to state d with (nonterminal) output label n in\n this FST is replaced by redirecting this \"call\" arc to the initial state of a\n copy F of the FST for n, and adding \"return\" arcs from each final state of F\n to d. Optional arguments control how the call and return arcs are labeled; by\n default, the only non-epsilon label is placed on the call arc.\n\n Args:\n pairs: An iterable of (nonterminal label, FST) pairs, where the former is an\n unsigned integer and the latter is an Fst instance.\n call_arc_labeling: A string indicating which call arc labels should be\n non-epsilon. One of: \"input\" (default), \"output\", \"both\", \"neither\".\n This value is set to \"neither\" if epsilon_on_replace is True.\n return_arc_labeling: A string indicating which return arc labels should be\n non-epsilon. One of: \"input\", \"output\", \"both\", \"neither\" (default).\n This value is set to \"neither\" if epsilon_on_replace is True.\n epsilon_on_replace: Should call and return arcs be epsilon arcs? If True,\n this effectively overrides call_arc_labeling and return_arc_labeling,\n setting both to \"neither\".\n return_label: The integer label for return arcs.\n\n Returns:\n An FST.\n "); static PyMethodDef __pyx_mdef_7_pynini_35replace = {"replace", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7_pynini_35replace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7_pynini_34replace}; static PyObject *__pyx_pw_7_pynini_35replace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -22999,40 +23364,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_call_arc_labeling); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_arc_labeling); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_epsilon_on_replace); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_label); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "replace") < 0)) __PYX_ERR(0, 1333, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "replace") < 0)) __PYX_ERR(0, 1351, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -23053,10 +23418,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 1336, __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, 1354, __pyx_L3_error) } else { - /* "_pynini.pyx":1336 + /* "_pynini.pyx":1354 * call_arc_labeling="input", * return_arc_labeling="neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -23066,14 +23431,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 1337, __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, 1355, __pyx_L3_error) } else { __pyx_v_return_label = ((int64_t)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1351, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23089,7 +23454,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7_pynini_34replace(__pyx_self, __pyx_v_pairs, __pyx_v_call_arc_labeling, __pyx_v_return_arc_labeling, __pyx_v_epsilon_on_replace, __pyx_v_return_label); - /* "_pynini.pyx":1333 + /* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< @@ -23123,7 +23488,7 @@ static PyObject *__pyx_pf_7_pynini_34replace(CYTHON_UNUSED PyObject *__pyx_self, __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_7_pynini_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23140,7 +23505,7 @@ static PyObject *__pyx_pf_7_pynini_34replace(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "_pynini.pyx":1385 +/* "_pynini.pyx":1403 * * * def union(*fsts): # <<<<<<<<<<<<<< @@ -23191,7 +23556,7 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P int __pyx_clineno = 0; __Pyx_RefNannySetupContext("union", 1); - /* "_pynini.pyx":1401 + /* "_pynini.pyx":1419 * An FST. * """ * (fst1, *fsts2) = fsts # <<<<<<<<<<<<<< @@ -23201,7 +23566,7 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P { Py_ssize_t index = -1; PyObject** temps[2] = {&__pyx_t_1}; - __pyx_t_2 = PyObject_GetIter(__pyx_v_fsts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_v_fsts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); for (index=0; index < 1; index++) { @@ -23214,10 +23579,10 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1401, __pyx_L1_error) + __PYX_ERR(0, 1419, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fst1 = __pyx_t_1; @@ -23225,19 +23590,19 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P __pyx_v_fsts2 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1402 + /* "_pynini.pyx":1420 * """ * (fst1, *fsts2) = fsts * cdef Fst _fst1 = _compile_or_copy_Fst(fst1) # <<<<<<<<<<<<<< * return _fst1.union(*fsts2) * */ - __pyx_t_4 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst1, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1403 + /* "_pynini.pyx":1421 * (fst1, *fsts2) = fsts * cdef Fst _fst1 = _compile_or_copy_Fst(fst1) * return _fst1.union(*fsts2) # <<<<<<<<<<<<<< @@ -23245,11 +23610,11 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__fst1), __pyx_n_s_union); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v__fst1), __pyx_n_s_union); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PySequence_Tuple(__pyx_v_fsts2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_fsts2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23257,7 +23622,7 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P __pyx_t_2 = 0; goto __pyx_L0; - /* "_pynini.pyx":1385 + /* "_pynini.pyx":1403 * * * def union(*fsts): # <<<<<<<<<<<<<< @@ -23281,7 +23646,7 @@ static PyObject *__pyx_pf_7_pynini_36union(CYTHON_UNUSED PyObject *__pyx_self, P return __pyx_r; } -/* "_pynini.pyx":1427 +/* "_pynini.pyx":1445 * cdef vector[pair[int64_t, int64_t]] _parens * * def __repr__(self): # <<<<<<<<<<<<<< @@ -23317,7 +23682,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pynini.pyx":1428 + /* "_pynini.pyx":1446 * * def __repr__(self): * return f"<{self.__class__.__name__} at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -23325,7 +23690,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ * def __len__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -23333,12 +23698,12 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__11); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -23350,9 +23715,9 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -23364,14 +23729,14 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pynini.pyx":1427 + /* "_pynini.pyx":1445 * cdef vector[pair[int64_t, int64_t]] _parens * * def __repr__(self): # <<<<<<<<<<<<<< @@ -23392,7 +23757,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses___repr__(struct __pyx_obj_7_ return __pyx_r; } -/* "_pynini.pyx":1430 +/* "_pynini.pyx":1448 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __len__(self): # <<<<<<<<<<<<<< @@ -23421,7 +23786,7 @@ static Py_ssize_t __pyx_pf_7_pynini_14PdtParentheses_2__len__(struct __pyx_obj_7 const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":1431 + /* "_pynini.pyx":1449 * * def __len__(self): * return self._parens.size() # <<<<<<<<<<<<<< @@ -23430,12 +23795,12 @@ static Py_ssize_t __pyx_pf_7_pynini_14PdtParentheses_2__len__(struct __pyx_obj_7 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1431, __pyx_L1_error) + __PYX_ERR(0, 1449, __pyx_L1_error) } __pyx_r = __pyx_v_self->_parens.size(); goto __pyx_L0; - /* "_pynini.pyx":1430 + /* "_pynini.pyx":1448 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __len__(self): # <<<<<<<<<<<<<< @@ -23452,7 +23817,7 @@ static Py_ssize_t __pyx_pf_7_pynini_14PdtParentheses_2__len__(struct __pyx_obj_7 } static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":1433 +/* "_pynini.pyx":1451 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -23487,7 +23852,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_4__iter__(struct __pyx_obj_7 if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_7___iter__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1433, __pyx_L1_error) + __PYX_ERR(0, 1451, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -23495,7 +23860,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_4__iter__(struct __pyx_obj_7 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_14PdtParentheses_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_PdtParentheses___iter, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_14PdtParentheses_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_PdtParentheses___iter, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 1451, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -23534,9 +23899,9 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1433, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1451, __pyx_L1_error) - /* "_pynini.pyx":1434 + /* "_pynini.pyx":1452 * * def __iter__(self): * cdef size_t _i = 0 # <<<<<<<<<<<<<< @@ -23545,7 +23910,7 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb */ __pyx_cur_scope->__pyx_v__i = 0; - /* "_pynini.pyx":1435 + /* "_pynini.pyx":1453 * def __iter__(self): * cdef size_t _i = 0 * for _i in range(self._parens.size()): # <<<<<<<<<<<<<< @@ -23554,14 +23919,14 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1435, __pyx_L1_error) + __PYX_ERR(0, 1453, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->_parens.size(); __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v__i = __pyx_t_3; - /* "_pynini.pyx":1436 + /* "_pynini.pyx":1454 * cdef size_t _i = 0 * for _i in range(self._parens.size()): * yield (self._parens[_i].first, self._parens[_i].second) # <<<<<<<<<<<<<< @@ -23570,22 +23935,22 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1436, __pyx_L1_error) + __PYX_ERR(0, 1454, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1436, __pyx_L1_error) + __PYX_ERR(0, 1454, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1454, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5)) __PYX_ERR(0, 1436, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5)) __PYX_ERR(0, 1454, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; @@ -23603,11 +23968,11 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1436, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1454, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":1433 + /* "_pynini.pyx":1451 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -23635,7 +24000,7 @@ static PyObject *__pyx_gb_7_pynini_14PdtParentheses_6generator(__pyx_CoroutineOb return __pyx_r; } -/* "_pynini.pyx":1438 +/* "_pynini.pyx":1456 * yield (self._parens[_i].first, self._parens[_i].second) * * cpdef PdtParentheses copy(self): # <<<<<<<<<<<<<< @@ -23673,7 +24038,7 @@ static struct __pyx_obj_7_pynini_PdtParentheses *__pyx_f_7_pynini_14PdtParenthes if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __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, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_14PdtParentheses_8copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -23696,11 +24061,11 @@ static struct __pyx_obj_7_pynini_PdtParentheses *__pyx_f_7_pynini_14PdtParenthes PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __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_7_pynini_PdtParentheses))))) __PYX_ERR(0, 1438, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_PdtParentheses))))) __PYX_ERR(0, 1456, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_PdtParentheses *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23719,19 +24084,19 @@ static struct __pyx_obj_7_pynini_PdtParentheses *__pyx_f_7_pynini_14PdtParenthes #endif } - /* "_pynini.pyx":1447 + /* "_pynini.pyx":1465 * A deep copy of the PdtParentheses object. * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) # <<<<<<<<<<<<<< * result._parens = self._parens * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_PdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_PdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_PdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_PdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_PdtParentheses *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1448 + /* "_pynini.pyx":1466 * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * result._parens = self._parens # <<<<<<<<<<<<<< @@ -23740,16 +24105,16 @@ static struct __pyx_obj_7_pynini_PdtParentheses *__pyx_f_7_pynini_14PdtParenthes */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1448, __pyx_L1_error) + __PYX_ERR(0, 1466, __pyx_L1_error) } __pyx_t_6 = __pyx_v_self->_parens; if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1448, __pyx_L1_error) + __PYX_ERR(0, 1466, __pyx_L1_error) } __pyx_v_result->_parens = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6); - /* "_pynini.pyx":1449 + /* "_pynini.pyx":1467 * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * result._parens = self._parens * return result # <<<<<<<<<<<<<< @@ -23761,7 +24126,7 @@ static struct __pyx_obj_7_pynini_PdtParentheses *__pyx_f_7_pynini_14PdtParenthes __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1438 + /* "_pynini.pyx":1456 * yield (self._parens[_i].first, self._parens[_i].second) * * cpdef PdtParentheses copy(self): # <<<<<<<<<<<<<< @@ -23835,7 +24200,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_7copy(struct __pyx_obj_7_pyn int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_14PdtParentheses_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_14PdtParentheses_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23852,7 +24217,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_7copy(struct __pyx_obj_7_pyn return __pyx_r; } -/* "_pynini.pyx":1451 +/* "_pynini.pyx":1469 * return result * * cpdef void add_pair(self, int64_t push, int64_t pop): # <<<<<<<<<<<<<< @@ -23890,12 +24255,12 @@ static void __pyx_f_7_pynini_14PdtParentheses_add_pair(struct __pyx_obj_7_pynini if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_pair); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_pair); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_14PdtParentheses_10add_pair)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_push); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_push); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -23918,7 +24283,7 @@ static void __pyx_f_7_pynini_14PdtParentheses_add_pair(struct __pyx_obj_7_pynini __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -23939,7 +24304,7 @@ static void __pyx_f_7_pynini_14PdtParentheses_add_pair(struct __pyx_obj_7_pynini #endif } - /* "_pynini.pyx":1461 + /* "_pynini.pyx":1479 * pop: An arc label to be interpreted as a "pop" operation. * """ * self._parens.push_back(pair[int64_t, int64_t](push, pop)) # <<<<<<<<<<<<<< @@ -23948,22 +24313,22 @@ static void __pyx_f_7_pynini_14PdtParentheses_add_pair(struct __pyx_obj_7_pynini */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1461, __pyx_L1_error) + __PYX_ERR(0, 1479, __pyx_L1_error) } try { __pyx_t_8 = std::pair (__pyx_v_push, __pyx_v_pop); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1461, __pyx_L1_error) + __PYX_ERR(0, 1479, __pyx_L1_error) } try { __pyx_v_self->_parens.push_back(__pyx_t_8); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1461, __pyx_L1_error) + __PYX_ERR(0, 1479, __pyx_L1_error) } - /* "_pynini.pyx":1451 + /* "_pynini.pyx":1469 * return result * * cpdef void add_pair(self, int64_t push, int64_t pop): # <<<<<<<<<<<<<< @@ -24042,7 +24407,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -24050,14 +24415,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("add_pair", 1, 2, 2, 1); __PYX_ERR(0, 1451, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_pair", 1, 2, 2, 1); __PYX_ERR(0, 1469, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_pair") < 0)) __PYX_ERR(0, 1451, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_pair") < 0)) __PYX_ERR(0, 1469, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -24065,12 +24430,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_push = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_push == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L3_error) - __pyx_v_pop = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_pop == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L3_error) + __pyx_v_push = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_push == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) + __pyx_v_pop = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_pop == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_pair", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1451, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_pair", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1469, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24106,8 +24471,8 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_9add_pair(struct __pyx_obj_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_pair", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_14PdtParentheses_add_pair(__pyx_v_self, __pyx_v_push, __pyx_v_pop, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_f_7_pynini_14PdtParentheses_add_pair(__pyx_v_self, __pyx_v_push, __pyx_v_pop, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -24124,7 +24489,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_9add_pair(struct __pyx_obj_7 return __pyx_r; } -/* "_pynini.pyx":1463 +/* "_pynini.pyx":1481 * self._parens.push_back(pair[int64_t, int64_t](push, pop)) * * @classmethod # <<<<<<<<<<<<<< @@ -24186,12 +24551,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1463, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1463, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1481, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -24202,7 +24567,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1463, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1481, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24245,61 +24610,61 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_11read(CYTHON_UNUSED PyTypeO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pynini.pyx":1482 + /* "_pynini.pyx":1500 * FstIOError: Read failed. * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) # <<<<<<<<<<<<<< * if not ReadLabelPairs[int64_t](path_tostring(filename), - * addr(result._parens), + * addr(result._parens)): */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_PdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_PdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_PdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_PdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_PdtParentheses *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1483 + /* "_pynini.pyx":1501 * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * if not ReadLabelPairs[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< - * addr(result._parens), - * False): + * addr(result._parens)): + * raise FstIOError(f"Read failed: {filename}") */ - __pyx_t_2 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error) - /* "_pynini.pyx":1484 + /* "_pynini.pyx":1502 * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * if not ReadLabelPairs[int64_t](path_tostring(filename), - * addr(result._parens), # <<<<<<<<<<<<<< - * False): + * addr(result._parens)): # <<<<<<<<<<<<<< * raise FstIOError(f"Read failed: {filename}") + * return result */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1484, __pyx_L1_error) + __PYX_ERR(0, 1502, __pyx_L1_error) } - /* "_pynini.pyx":1483 + /* "_pynini.pyx":1501 * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * if not ReadLabelPairs[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< - * addr(result._parens), - * False): + * addr(result._parens)): + * raise FstIOError(f"Read failed: {filename}") */ - __pyx_t_3 = (!(fst::ReadLabelPairs(__pyx_t_2, (&__pyx_v_result->_parens), 0) != 0)); + __pyx_t_3 = (!(fst::ReadLabelPairs(__pyx_t_2, (&__pyx_v_result->_parens)) != 0)); if (unlikely(__pyx_t_3)) { - /* "_pynini.pyx":1486 - * addr(result._parens), - * False): + /* "_pynini.pyx":1503 + * if not ReadLabelPairs[int64_t](path_tostring(filename), + * addr(result._parens)): * raise FstIOError(f"Read failed: {filename}") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -24321,25 +24686,25 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_11read(CYTHON_UNUSED PyTypeO __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1486, __pyx_L1_error) + __PYX_ERR(0, 1503, __pyx_L1_error) - /* "_pynini.pyx":1483 + /* "_pynini.pyx":1501 * """ * cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) * if not ReadLabelPairs[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< - * addr(result._parens), - * False): + * addr(result._parens)): + * raise FstIOError(f"Read failed: {filename}") */ } - /* "_pynini.pyx":1487 - * False): + /* "_pynini.pyx":1504 + * addr(result._parens)): * raise FstIOError(f"Read failed: {filename}") * return result # <<<<<<<<<<<<<< * @@ -24350,7 +24715,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_11read(CYTHON_UNUSED PyTypeO __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":1463 + /* "_pynini.pyx":1481 * self._parens.push_back(pair[int64_t, int64_t](push, pop)) * * @classmethod # <<<<<<<<<<<<<< @@ -24373,7 +24738,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_11read(CYTHON_UNUSED PyTypeO return __pyx_r; } -/* "_pynini.pyx":1489 +/* "_pynini.pyx":1506 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -24410,7 +24775,7 @@ static void __pyx_f_7_pynini_14PdtParentheses_write(struct __pyx_obj_7_pynini_Pd if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __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, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_14PdtParentheses_14write)) { __Pyx_INCREF(__pyx_t_1); @@ -24432,7 +24797,7 @@ static void __pyx_f_7_pynini_14PdtParentheses_write(struct __pyx_obj_7_pynini_Pd PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -24453,33 +24818,33 @@ static void __pyx_f_7_pynini_14PdtParentheses_write(struct __pyx_obj_7_pynini_Pd #endif } - /* "_pynini.pyx":1503 + /* "_pynini.pyx":1520 * FstIOError: Write failed. * """ * if not WriteLabelPairs[int64_t](path_tostring(filename), self._parens): # <<<<<<<<<<<<<< * raise FstIOError(f"Write failed: {filename}") * */ - __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1520, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1503, __pyx_L1_error) + __PYX_ERR(0, 1520, __pyx_L1_error) } __pyx_t_7 = (!(fst::WriteLabelPairs(__pyx_t_6, __pyx_v_self->_parens) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pynini.pyx":1504 + /* "_pynini.pyx":1521 * """ * if not WriteLabelPairs[int64_t](path_tostring(filename), self._parens): * raise FstIOError(f"Write failed: {filename}") # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -24501,15 +24866,15 @@ static void __pyx_f_7_pynini_14PdtParentheses_write(struct __pyx_obj_7_pynini_Pd __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __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, 1504, __pyx_L1_error) + __PYX_ERR(0, 1521, __pyx_L1_error) - /* "_pynini.pyx":1503 + /* "_pynini.pyx":1520 * FstIOError: Write failed. * """ * if not WriteLabelPairs[int64_t](path_tostring(filename), self._parens): # <<<<<<<<<<<<<< @@ -24518,7 +24883,7 @@ static void __pyx_f_7_pynini_14PdtParentheses_write(struct __pyx_obj_7_pynini_Pd */ } - /* "_pynini.pyx":1489 + /* "_pynini.pyx":1506 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -24592,12 +24957,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1489, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1506, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -24608,7 +24973,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1489, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1506, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24644,8 +25009,8 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_13write(struct __pyx_obj_7_p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_14PdtParentheses_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_f_7_pynini_14PdtParentheses_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25068,7 +25433,7 @@ static PyObject *__pyx_pf_7_pynini_14PdtParentheses_17__setstate_cython__(struct return __pyx_r; } -/* "_pynini.pyx":1507 +/* "_pynini.pyx":1524 * * * def pdt_compose(fst1, # <<<<<<<<<<<<<< @@ -25143,7 +25508,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -25151,9 +25516,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, 1); __PYX_ERR(0, 1507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, 1); __PYX_ERR(0, 1524, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -25161,28 +25526,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, 2); __PYX_ERR(0, 1507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, 2); __PYX_ERR(0, 1524, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left_pdt); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1524, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_compose") < 0)) __PYX_ERR(0, 1507, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_compose") < 0)) __PYX_ERR(0, 1524, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -25202,10 +25567,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_parens = ((struct __pyx_obj_7_pynini_PdtParentheses *)values[2]); __pyx_v_compose_filter = values[3]; if (values[4]) { - __pyx_v_left_pdt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_left_pdt == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error) + __pyx_v_left_pdt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_left_pdt == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1528, __pyx_L3_error) } else { - /* "_pynini.pyx":1511 + /* "_pynini.pyx":1528 * PdtParentheses parens, * compose_filter="paren", * bool left_pdt=True): # <<<<<<<<<<<<<< @@ -25217,7 +25582,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1524, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25231,10 +25596,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1509, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1526, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_38pdt_compose(__pyx_self, __pyx_v_fst1, __pyx_v_fst2, __pyx_v_parens, __pyx_v_compose_filter, __pyx_v_left_pdt); - /* "_pynini.pyx":1507 + /* "_pynini.pyx":1524 * * * def pdt_compose(fst1, # <<<<<<<<<<<<<< @@ -25277,14 +25642,14 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pdt_compose", 1); - /* "_pynini.pyx":1542 + /* "_pynini.pyx":1559 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * cdef Fst result = Fst(_fst1.arc_type()) */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __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; @@ -25292,7 +25657,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1542, __pyx_L1_error) + __PYX_ERR(0, 1559, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25305,15 +25670,15 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s __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, 1542, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __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, 1542, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -25321,7 +25686,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s __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, 1542, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1559, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -25329,17 +25694,17 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1542, __pyx_L1_error) + __PYX_ERR(0, 1559, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1542, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1542, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1559, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1559, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1543 + /* "_pynini.pyx":1560 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) # <<<<<<<<<<<<<< @@ -25348,15 +25713,15 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1543, __pyx_L1_error) + __PYX_ERR(0, 1560, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1543, __pyx_L1_error) + __PYX_ERR(0, 1560, __pyx_L1_error) } - __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error) + __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L1_error) - /* "_pynini.pyx":1544 + /* "_pynini.pyx":1561 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * cdef Fst result = Fst(_fst1.arc_type()) # <<<<<<<<<<<<<< @@ -25365,37 +25730,37 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1544, __pyx_L1_error) + __PYX_ERR(0, 1561, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1544, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1546 + /* "_pynini.pyx":1563 * cdef Fst result = Fst(_fst1.arc_type()) * cdef PdtComposeFilter _compose_filter = _get_pdt_compose_filter( * tostring(compose_filter)) # <<<<<<<<<<<<<< * cdef unique_ptr[PdtComposeOptions] _opts * _opts.reset(new PdtComposeOptions(True, _compose_filter)) */ - __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1563, __pyx_L1_error) - /* "_pynini.pyx":1545 + /* "_pynini.pyx":1562 * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * cdef Fst result = Fst(_fst1.arc_type()) * cdef PdtComposeFilter _compose_filter = _get_pdt_compose_filter( # <<<<<<<<<<<<<< * tostring(compose_filter)) * cdef unique_ptr[PdtComposeOptions] _opts */ - __pyx_t_7 = __pyx_f_7_pynini__get_pdt_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7_pynini__get_pdt_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1562, __pyx_L1_error) __pyx_v__compose_filter = __pyx_t_7; - /* "_pynini.pyx":1548 + /* "_pynini.pyx":1565 * tostring(compose_filter)) * cdef unique_ptr[PdtComposeOptions] _opts * _opts.reset(new PdtComposeOptions(True, _compose_filter)) # <<<<<<<<<<<<<< @@ -25404,7 +25769,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ __pyx_v__opts.reset(new fst::PdtComposeOptions(1, __pyx_v__compose_filter)); - /* "_pynini.pyx":1549 + /* "_pynini.pyx":1566 * cdef unique_ptr[PdtComposeOptions] _opts * _opts.reset(new PdtComposeOptions(True, _compose_filter)) * Compose(deref(_fst1._fst), # <<<<<<<<<<<<<< @@ -25413,10 +25778,10 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1549, __pyx_L1_error) + __PYX_ERR(0, 1566, __pyx_L1_error) } - /* "_pynini.pyx":1550 + /* "_pynini.pyx":1567 * _opts.reset(new PdtComposeOptions(True, _compose_filter)) * Compose(deref(_fst1._fst), * deref(_fst2._fst), # <<<<<<<<<<<<<< @@ -25425,10 +25790,10 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1550, __pyx_L1_error) + __PYX_ERR(0, 1567, __pyx_L1_error) } - /* "_pynini.pyx":1551 + /* "_pynini.pyx":1568 * Compose(deref(_fst1._fst), * deref(_fst2._fst), * parens._parens, # <<<<<<<<<<<<<< @@ -25437,10 +25802,10 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1551, __pyx_L1_error) + __PYX_ERR(0, 1568, __pyx_L1_error) } - /* "_pynini.pyx":1549 + /* "_pynini.pyx":1566 * cdef unique_ptr[PdtComposeOptions] _opts * _opts.reset(new PdtComposeOptions(True, _compose_filter)) * Compose(deref(_fst1._fst), # <<<<<<<<<<<<<< @@ -25449,7 +25814,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s */ fst::script::Compose((*__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__fst2->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts), __pyx_v_left_pdt); - /* "_pynini.pyx":1555 + /* "_pynini.pyx":1572 * deref(_opts), * left_pdt) * return result # <<<<<<<<<<<<<< @@ -25461,7 +25826,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":1507 + /* "_pynini.pyx":1524 * * * def pdt_compose(fst1, # <<<<<<<<<<<<<< @@ -25486,7 +25851,7 @@ static PyObject *__pyx_pf_7_pynini_38pdt_compose(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1558 +/* "_pynini.pyx":1575 * * * def pdt_expand(fst, # <<<<<<<<<<<<<< @@ -25538,7 +25903,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fst,&__pyx_n_s_parens,&__pyx_n_s_connect,&__pyx_n_s_keep_parentheses,&__pyx_n_s_weight,0}; - /* "_pynini.pyx":1562 + /* "_pynini.pyx":1579 * bool connect=True, * bool keep_parentheses=False, * weight=None): # <<<<<<<<<<<<<< @@ -25569,7 +25934,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -25577,35 +25942,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("pdt_expand", 0, 2, 5, 1); __PYX_ERR(0, 1558, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_expand", 0, 2, 5, 1); __PYX_ERR(0, 1575, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_parentheses); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_expand") < 0)) __PYX_ERR(0, 1558, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_expand") < 0)) __PYX_ERR(0, 1575, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -25624,10 +25989,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_fst = values[0]; __pyx_v_parens = ((struct __pyx_obj_7_pynini_PdtParentheses *)values[1]); if (values[2]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L3_error) } else { - /* "_pynini.pyx":1560 + /* "_pynini.pyx":1577 * def pdt_expand(fst, * PdtParentheses parens, * bool connect=True, # <<<<<<<<<<<<<< @@ -25637,10 +26002,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_connect = ((bool)((int)1)); } if (values[3]) { - __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L3_error) + __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L3_error) } else { - /* "_pynini.pyx":1561 + /* "_pynini.pyx":1578 * PdtParentheses parens, * bool connect=True, * bool keep_parentheses=False, # <<<<<<<<<<<<<< @@ -25653,7 +26018,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pdt_expand", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1558, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_expand", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1575, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25667,10 +26032,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1559, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1576, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_40pdt_expand(__pyx_self, __pyx_v_fst, __pyx_v_parens, __pyx_v_connect, __pyx_v_keep_parentheses, __pyx_v_weight); - /* "_pynini.pyx":1558 + /* "_pynini.pyx":1575 * * * def pdt_expand(fst, # <<<<<<<<<<<<<< @@ -25709,19 +26074,19 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pdt_expand", 1); - /* "_pynini.pyx":1590 + /* "_pynini.pyx":1607 * FstOpError: Operation failed. * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_fst.arc_type()) * cdef WeightClass _weight = _get_WeightClass_or_zero(result.weight_type(), */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1591 + /* "_pynini.pyx":1608 * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) # <<<<<<<<<<<<<< @@ -25730,37 +26095,37 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1591, __pyx_L1_error) + __PYX_ERR(0, 1608, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1608, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1592 + /* "_pynini.pyx":1609 * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) * cdef WeightClass _weight = _get_WeightClass_or_zero(result.weight_type(), # <<<<<<<<<<<<<< * weight) * cdef unique_ptr[PdtExpandOptions] _opts */ - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_result), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_result), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L1_error) - /* "_pynini.pyx":1593 + /* "_pynini.pyx":1610 * cdef Fst result = Fst(_fst.arc_type()) * cdef WeightClass _weight = _get_WeightClass_or_zero(result.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[PdtExpandOptions] _opts * _opts.reset(new PdtExpandOptions(connect, keep_parentheses, _weight)) */ - __pyx_t_4 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_2, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_4 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_2, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4); - /* "_pynini.pyx":1595 + /* "_pynini.pyx":1612 * weight) * cdef unique_ptr[PdtExpandOptions] _opts * _opts.reset(new PdtExpandOptions(connect, keep_parentheses, _weight)) # <<<<<<<<<<<<<< @@ -25769,7 +26134,7 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v__opts.reset(new fst::script::PdtExpandOptions(__pyx_v_connect, __pyx_v_keep_parentheses, __pyx_v__weight)); - /* "_pynini.pyx":1596 + /* "_pynini.pyx":1613 * cdef unique_ptr[PdtExpandOptions] _opts * _opts.reset(new PdtExpandOptions(connect, keep_parentheses, _weight)) * Expand(deref(_fst._fst), parens._parens, result._mfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -25778,24 +26143,24 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1596, __pyx_L1_error) + __PYX_ERR(0, 1613, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1596, __pyx_L1_error) + __PYX_ERR(0, 1613, __pyx_L1_error) } fst::script::Expand((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts)); - /* "_pynini.pyx":1597 + /* "_pynini.pyx":1614 * _opts.reset(new PdtExpandOptions(connect, keep_parentheses, _weight)) * Expand(deref(_fst._fst), parens._parens, result._mfst.get(), deref(_opts)) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L1_error) - /* "_pynini.pyx":1598 + /* "_pynini.pyx":1615 * Expand(deref(_fst._fst), parens._parens, result._mfst.get(), deref(_opts)) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -25807,7 +26172,7 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":1558 + /* "_pynini.pyx":1575 * * * def pdt_expand(fst, # <<<<<<<<<<<<<< @@ -25829,7 +26194,7 @@ static PyObject *__pyx_pf_7_pynini_40pdt_expand(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "_pynini.pyx":1604 +/* "_pynini.pyx":1621 * * * cdef object _pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -25881,7 +26246,7 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ } } - /* "_pynini.pyx":1612 + /* "_pynini.pyx":1629 * cdef int64_t _label * cdef _Fst _fst * for (_label, _fst) in pairs: # <<<<<<<<<<<<<< @@ -25893,9 +26258,9 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1629, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -25903,28 +26268,28 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1612, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1629, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1629, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1612, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1629, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1629, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -25934,7 +26299,7 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1612, __pyx_L1_error) + else __PYX_ERR(0, 1629, __pyx_L1_error) } break; } @@ -25946,7 +26311,7 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1612, __pyx_L1_error) + __PYX_ERR(0, 1629, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25959,15 +26324,15 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -25975,7 +26340,7 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1612, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1629, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -25983,17 +26348,17 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1612, __pyx_L1_error) + __PYX_ERR(0, 1629, __pyx_L1_error) __pyx_L6_unpacking_done:; } - __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1612, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 1612, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 1629, __pyx_L1_error) __pyx_v__label = __pyx_t_9; __Pyx_XDECREF_SET(__pyx_v__fst, ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_6)); __pyx_t_6 = 0; - /* "_pynini.pyx":1613 + /* "_pynini.pyx":1630 * cdef _Fst _fst * for (_label, _fst) in pairs: * _pairs.push_back(LabelFstClassPair(_label, _fst._fst.get())) # <<<<<<<<<<<<<< @@ -26002,22 +26367,22 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1613, __pyx_L1_error) + __PYX_ERR(0, 1630, __pyx_L1_error) } try { __pyx_t_10 = __pyx_t_10cpywrapfst_LabelFstClassPair(__pyx_v__label, __pyx_v__fst->_fst.get()); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1613, __pyx_L1_error) + __PYX_ERR(0, 1630, __pyx_L1_error) } try { __pyx_v__pairs.push_back(__pyx_t_10); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1613, __pyx_L1_error) + __PYX_ERR(0, 1630, __pyx_L1_error) } - /* "_pynini.pyx":1612 + /* "_pynini.pyx":1629 * cdef int64_t _label * cdef _Fst _fst * for (_label, _fst) in pairs: # <<<<<<<<<<<<<< @@ -26027,62 +26392,62 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1614 + /* "_pynini.pyx":1631 * for (_label, _fst) in pairs: * _pairs.push_back(LabelFstClassPair(_label, _fst._fst.get())) * cdef Fst result_fst = Fst(_pairs[0].second.ArcType()) # <<<<<<<<<<<<<< * cdef PdtParentheses result_parens = PdtParentheses() * Replace(_pairs, */ - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v__pairs[0]).second->ArcType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string((__pyx_v__pairs[0]).second->ArcType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1614, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result_fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1615 + /* "_pynini.pyx":1632 * _pairs.push_back(LabelFstClassPair(_label, _fst._fst.get())) * cdef Fst result_fst = Fst(_pairs[0].second.ArcType()) * cdef PdtParentheses result_parens = PdtParentheses() # <<<<<<<<<<<<<< * Replace(_pairs, * result_fst._mfst.get(), */ - __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7_pynini_PdtParentheses)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1615, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7_pynini_PdtParentheses)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_result_parens = ((struct __pyx_obj_7_pynini_PdtParentheses *)__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1620 + /* "_pynini.pyx":1637 * addr(result_parens._parens), * _pairs[0].first, * _get_pdt_parser_type(tostring(pdt_parser_type)), # <<<<<<<<<<<<<< * start_paren_labels, * tostring(left_paren_prefix), */ - __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_pdt_parser_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1620, __pyx_L1_error) - __pyx_t_12 = __pyx_f_7_pynini__get_pdt_parser_type(__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_pdt_parser_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L1_error) + __pyx_t_12 = __pyx_f_7_pynini__get_pdt_parser_type(__pyx_t_11); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L1_error) - /* "_pynini.pyx":1622 + /* "_pynini.pyx":1639 * _get_pdt_parser_type(tostring(pdt_parser_type)), * start_paren_labels, * tostring(left_paren_prefix), # <<<<<<<<<<<<<< * tostring(right_paren_prefix)) * result_fst._check_mutating_imethod() */ - __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_left_paren_prefix); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_left_paren_prefix); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1639, __pyx_L1_error) - /* "_pynini.pyx":1623 + /* "_pynini.pyx":1640 * start_paren_labels, * tostring(left_paren_prefix), * tostring(right_paren_prefix)) # <<<<<<<<<<<<<< * result_fst._check_mutating_imethod() * return (result_fst, result_parens) */ - __pyx_t_13 = __pyx_f_10_pywrapfst_tostring(__pyx_v_right_paren_prefix); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L1_error) + __pyx_t_13 = __pyx_f_10_pywrapfst_tostring(__pyx_v_right_paren_prefix); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1640, __pyx_L1_error) - /* "_pynini.pyx":1616 + /* "_pynini.pyx":1633 * cdef Fst result_fst = Fst(_pairs[0].second.ArcType()) * cdef PdtParentheses result_parens = PdtParentheses() * Replace(_pairs, # <<<<<<<<<<<<<< @@ -26091,16 +26456,16 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ */ fst::script::Replace(__pyx_v__pairs, __pyx_v_result_fst->__pyx_base.__pyx_base._mfst.get(), (&__pyx_v_result_parens->_parens), (__pyx_v__pairs[0]).first, __pyx_t_12, __pyx_v_start_paren_labels, __pyx_t_11, __pyx_t_13); - /* "_pynini.pyx":1624 + /* "_pynini.pyx":1641 * tostring(left_paren_prefix), * tostring(right_paren_prefix)) * result_fst._check_mutating_imethod() # <<<<<<<<<<<<<< * return (result_fst, result_parens) * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result_fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result_fst)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1624, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result_fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result_fst)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L1_error) - /* "_pynini.pyx":1625 + /* "_pynini.pyx":1642 * tostring(right_paren_prefix)) * result_fst._check_mutating_imethod() * return (result_fst, result_parens) # <<<<<<<<<<<<<< @@ -26108,19 +26473,19 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF((PyObject *)__pyx_v_result_fst); __Pyx_GIVEREF((PyObject *)__pyx_v_result_fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_result_fst))) __PYX_ERR(0, 1625, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_result_fst))) __PYX_ERR(0, 1642, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_result_parens); __Pyx_GIVEREF((PyObject *)__pyx_v_result_parens); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_result_parens))) __PYX_ERR(0, 1625, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_result_parens))) __PYX_ERR(0, 1642, __pyx_L1_error); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "_pynini.pyx":1604 + /* "_pynini.pyx":1621 * * * cdef object _pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -26146,7 +26511,7 @@ static PyObject *__pyx_f_7_pynini__pdt_replace(PyObject *__pyx_v_pairs, struct _ return __pyx_r; } -/* "_pynini.pyx":1628 +/* "_pynini.pyx":1645 * * * def pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -26164,29 +26529,29 @@ static PyObject *__pyx_pf_7_pynini_62__defaults__(CYTHON_UNUSED PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_start_paren_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_start_paren_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject*)__pyx_n_u_left)); __Pyx_GIVEREF(((PyObject*)__pyx_n_u_left)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)__pyx_n_u_left))) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject*)__pyx_n_u_left))) __PYX_ERR(0, 1645, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_kp_u__13)); __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__13)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject*)__pyx_kp_u__13))) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject*)__pyx_kp_u__13))) __PYX_ERR(0, 1645, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_kp_u__14)); __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__14)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject*)__pyx_kp_u__14))) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject*)__pyx_kp_u__14))) __PYX_ERR(0, 1645, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None)) __PYX_ERR(0, 1628, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None)) __PYX_ERR(0, 1645, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26274,40 +26639,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pdt_parser_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_paren_labels); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left_paren_prefix); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_right_paren_prefix); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1628, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_replace") < 0)) __PYX_ERR(0, 1628, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_replace") < 0)) __PYX_ERR(0, 1645, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -26327,7 +26692,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_pairs = values[0]; __pyx_v_pdt_parser_type = values[1]; if (values[2]) { - __pyx_v_start_paren_labels = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_start_paren_labels == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1630, __pyx_L3_error) + __pyx_v_start_paren_labels = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_start_paren_labels == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L3_error) } else { __pyx_v_start_paren_labels = __pyx_dynamic_args->__pyx_arg_start_paren_labels; } @@ -26336,7 +26701,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pdt_replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1628, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 1645, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26384,7 +26749,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __Pyx_RefNannySetupContext("pdt_replace", 0); __Pyx_INCREF(__pyx_v_pairs); - /* "_pynini.pyx":1673 + /* "_pynini.pyx":1690 * """ * # Keeps these in memory so they're not garbage-collected. * pairs = [(label, _compile_or_copy_Fst(fst)) for (label, fst) in pairs] # <<<<<<<<<<<<<< @@ -26392,16 +26757,16 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s * pdt_parser_type, */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_pairs)) || PyTuple_CheckExact(__pyx_v_pairs)) { __pyx_t_2 = __pyx_v_pairs; __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_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { @@ -26409,28 +26774,28 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1673, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1690, __pyx_L5_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 1673, __pyx_L5_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, 1690, __pyx_L5_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1673, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1690, __pyx_L5_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 1673, __pyx_L5_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, 1690, __pyx_L5_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -26440,7 +26805,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1673, __pyx_L5_error) + else __PYX_ERR(0, 1690, __pyx_L5_error) } break; } @@ -26452,7 +26817,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1673, __pyx_L5_error) + __PYX_ERR(0, 1690, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -26465,15 +26830,15 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -26481,7 +26846,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1673, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1690, __pyx_L5_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -26489,24 +26854,24 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1673, __pyx_L5_error) + __PYX_ERR(0, 1690, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_label, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_fst, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_8genexpr3__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_5 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_8genexpr3__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1673, __pyx_L5_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_8genexpr3__pyx_v_label); __Pyx_GIVEREF(__pyx_8genexpr3__pyx_v_label); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_8genexpr3__pyx_v_label)) __PYX_ERR(0, 1673, __pyx_L5_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_8genexpr3__pyx_v_label)) __PYX_ERR(0, 1690, __pyx_L5_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L5_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L5_error); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1673, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1690, __pyx_L5_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -26522,7 +26887,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __Pyx_DECREF_SET(__pyx_v_pairs, __pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1674 + /* "_pynini.pyx":1691 * # Keeps these in memory so they're not garbage-collected. * pairs = [(label, _compile_or_copy_Fst(fst)) for (label, fst) in pairs] * return _pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -26531,7 +26896,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s */ __Pyx_XDECREF(__pyx_r); - /* "_pynini.pyx":1678 + /* "_pynini.pyx":1695 * start_paren_labels, * left_paren_prefix, * right_paren_prefix) # <<<<<<<<<<<<<< @@ -26543,13 +26908,13 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_10.start_paren_labels = __pyx_v_start_paren_labels; __pyx_t_10.left_paren_prefix = __pyx_v_left_paren_prefix; __pyx_t_10.right_paren_prefix = __pyx_v_right_paren_prefix; - __pyx_t_1 = __pyx_f_7_pynini__pdt_replace(__pyx_v_pairs, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__pdt_replace(__pyx_v_pairs, &__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":1628 + /* "_pynini.pyx":1645 * * * def pdt_replace(pairs, # <<<<<<<<<<<<<< @@ -26576,7 +26941,7 @@ static PyObject *__pyx_pf_7_pynini_42pdt_replace(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1681 +/* "_pynini.pyx":1698 * * * cpdef Fst pdt_reverse(fst, PdtParentheses parens): # <<<<<<<<<<<<<< @@ -26604,19 +26969,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_pdt_reverse(PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pdt_reverse", 1); - /* "_pynini.pyx":1697 + /* "_pynini.pyx":1714 * An FST. * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_fst.arc_type()) * Reverse(deref(_fst._fst), parens._parens, result._mfst.get()) */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1698 + /* "_pynini.pyx":1715 * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) # <<<<<<<<<<<<<< @@ -26625,18 +26990,18 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_pdt_reverse(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1698, __pyx_L1_error) + __PYX_ERR(0, 1715, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1715, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1699 + /* "_pynini.pyx":1716 * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) * Reverse(deref(_fst._fst), parens._parens, result._mfst.get()) # <<<<<<<<<<<<<< @@ -26645,24 +27010,24 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_pdt_reverse(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1699, __pyx_L1_error) + __PYX_ERR(0, 1716, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1699, __pyx_L1_error) + __PYX_ERR(0, 1716, __pyx_L1_error) } fst::script::Reverse((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_result->__pyx_base.__pyx_base._mfst.get()); - /* "_pynini.pyx":1700 + /* "_pynini.pyx":1717 * cdef Fst result = Fst(_fst.arc_type()) * Reverse(deref(_fst._fst), parens._parens, result._mfst.get()) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1700, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L1_error) - /* "_pynini.pyx":1701 + /* "_pynini.pyx":1718 * Reverse(deref(_fst._fst), parens._parens, result._mfst.get()) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -26674,7 +27039,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_pdt_reverse(PyObject *__p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1681 + /* "_pynini.pyx":1698 * * * cpdef Fst pdt_reverse(fst, PdtParentheses parens): # <<<<<<<<<<<<<< @@ -26753,7 +27118,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -26761,14 +27126,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("pdt_reverse", 1, 2, 2, 1); __PYX_ERR(0, 1681, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_reverse", 1, 2, 2, 1); __PYX_ERR(0, 1698, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_reverse") < 0)) __PYX_ERR(0, 1681, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_reverse") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -26781,7 +27146,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pdt_reverse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1681, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_reverse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1698, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26795,7 +27160,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1681, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1698, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_44pdt_reverse(__pyx_self, __pyx_v_fst, __pyx_v_parens); /* function exit code */ @@ -26822,7 +27187,7 @@ static PyObject *__pyx_pf_7_pynini_44pdt_reverse(CYTHON_UNUSED PyObject *__pyx_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pdt_reverse", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_pdt_reverse(__pyx_v_fst, __pyx_v_parens, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_pdt_reverse(__pyx_v_fst, __pyx_v_parens, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26839,7 +27204,7 @@ static PyObject *__pyx_pf_7_pynini_44pdt_reverse(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1704 +/* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< @@ -26857,7 +27222,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct __pyx_obj_7_pynini_PdtParentheses *__pyx_v_parens, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_pdt_shortestpath *__pyx_optional_args) { PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_fifo); - /* "_pynini.pyx":1707 + /* "_pynini.pyx":1724 * PdtParentheses parens, * queue_type="fifo", * bool keep_parentheses=False, # <<<<<<<<<<<<<< @@ -26866,7 +27231,7 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ bool __pyx_v_keep_parentheses = ((bool)0); - /* "_pynini.pyx":1708 + /* "_pynini.pyx":1725 * queue_type="fifo", * bool keep_parentheses=False, * bool path_gc=True): # <<<<<<<<<<<<<< @@ -26899,19 +27264,19 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct } } - /* "_pynini.pyx":1733 + /* "_pynini.pyx":1750 * FstOpError: Operation failed. * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_fst.arc_type()) * cdef unique_ptr[PdtShortestPathOptions] _opts */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1734 + /* "_pynini.pyx":1751 * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) # <<<<<<<<<<<<<< @@ -26920,28 +27285,28 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1734, __pyx_L1_error) + __PYX_ERR(0, 1751, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1734, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1751, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1734, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1737 + /* "_pynini.pyx":1754 * cdef unique_ptr[PdtShortestPathOptions] _opts * _opts.reset( * new PdtShortestPathOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * keep_parentheses, * path_gc)) */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L1_error) - __pyx_t_4 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1754, __pyx_L1_error) + __pyx_t_4 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1754, __pyx_L1_error) - /* "_pynini.pyx":1736 + /* "_pynini.pyx":1753 * cdef Fst result = Fst(_fst.arc_type()) * cdef unique_ptr[PdtShortestPathOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -26950,7 +27315,7 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ __pyx_v__opts.reset(new fst::script::PdtShortestPathOptions(__pyx_t_4, __pyx_v_keep_parentheses, __pyx_v_path_gc)); - /* "_pynini.pyx":1740 + /* "_pynini.pyx":1757 * keep_parentheses, * path_gc)) * ShortestPath(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -26959,10 +27324,10 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1740, __pyx_L1_error) + __PYX_ERR(0, 1757, __pyx_L1_error) } - /* "_pynini.pyx":1741 + /* "_pynini.pyx":1758 * path_gc)) * ShortestPath(deref(_fst._fst), * parens._parens, # <<<<<<<<<<<<<< @@ -26971,10 +27336,10 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1741, __pyx_L1_error) + __PYX_ERR(0, 1758, __pyx_L1_error) } - /* "_pynini.pyx":1740 + /* "_pynini.pyx":1757 * keep_parentheses, * path_gc)) * ShortestPath(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -26983,16 +27348,16 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct */ fst::script::ShortestPath((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts)); - /* "_pynini.pyx":1744 + /* "_pynini.pyx":1761 * result._mfst.get(), * deref(_opts)) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1744, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1761, __pyx_L1_error) - /* "_pynini.pyx":1745 + /* "_pynini.pyx":1762 * deref(_opts)) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -27004,7 +27369,7 @@ static PyObject *__pyx_f_7_pynini_pdt_shortestpath(PyObject *__pyx_v_fst, struct __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":1704 + /* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< @@ -27093,7 +27458,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -27101,35 +27466,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("pdt_shortestpath", 0, 2, 5, 1); __PYX_ERR(0, 1704, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_shortestpath", 0, 2, 5, 1); __PYX_ERR(0, 1721, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_parentheses); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path_gc); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_shortestpath") < 0)) __PYX_ERR(0, 1704, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pdt_shortestpath") < 0)) __PYX_ERR(0, 1721, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -27149,10 +27514,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_parens = ((struct __pyx_obj_7_pynini_PdtParentheses *)values[1]); __pyx_v_queue_type = values[2]; if (values[3]) { - __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1707, __pyx_L3_error) + __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1724, __pyx_L3_error) } else { - /* "_pynini.pyx":1707 + /* "_pynini.pyx":1724 * PdtParentheses parens, * queue_type="fifo", * bool keep_parentheses=False, # <<<<<<<<<<<<<< @@ -27162,10 +27527,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_keep_parentheses = ((bool)0); } if (values[4]) { - __pyx_v_path_gc = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_path_gc == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1708, __pyx_L3_error) + __pyx_v_path_gc = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_path_gc == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1725, __pyx_L3_error) } else { - /* "_pynini.pyx":1708 + /* "_pynini.pyx":1725 * queue_type="fifo", * bool keep_parentheses=False, * bool path_gc=True): # <<<<<<<<<<<<<< @@ -27177,7 +27542,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pdt_shortestpath", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1704, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pdt_shortestpath", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 1721, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27191,10 +27556,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1705, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_PdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1722, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_46pdt_shortestpath(__pyx_self, __pyx_v_fst, __pyx_v_parens, __pyx_v_queue_type, __pyx_v_keep_parentheses, __pyx_v_path_gc); - /* "_pynini.pyx":1704 + /* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< @@ -27231,7 +27596,7 @@ static PyObject *__pyx_pf_7_pynini_46pdt_shortestpath(CYTHON_UNUSED PyObject *__ __pyx_t_2.queue_type = __pyx_v_queue_type; __pyx_t_2.keep_parentheses = __pyx_v_keep_parentheses; __pyx_t_2.path_gc = __pyx_v_path_gc; - __pyx_t_1 = __pyx_f_7_pynini_pdt_shortestpath(__pyx_v_fst, __pyx_v_parens, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_pdt_shortestpath(__pyx_v_fst, __pyx_v_parens, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27248,7 +27613,7 @@ static PyObject *__pyx_pf_7_pynini_46pdt_shortestpath(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_pynini.pyx":1771 +/* "_pynini.pyx":1788 * cdef vector[int64_t] _assign * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27284,7 +27649,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pynini.pyx":1772 + /* "_pynini.pyx":1789 * * def __repr__(self): * return f"<{self.__class__.__name__} at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -27292,7 +27657,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 * def __len__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -27300,12 +27665,12 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__11); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -27317,9 +27682,9 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -27331,14 +27696,14 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pynini.pyx":1771 + /* "_pynini.pyx":1788 * cdef vector[int64_t] _assign * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27359,7 +27724,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses___repr__(struct __pyx_obj_7 return __pyx_r; } -/* "_pynini.pyx":1774 +/* "_pynini.pyx":1791 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __len__(self): # <<<<<<<<<<<<<< @@ -27388,7 +27753,7 @@ static Py_ssize_t __pyx_pf_7_pynini_15MPdtParentheses_2__len__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":1775 + /* "_pynini.pyx":1792 * * def __len__(self): * return self._parens.size() # <<<<<<<<<<<<<< @@ -27397,12 +27762,12 @@ static Py_ssize_t __pyx_pf_7_pynini_15MPdtParentheses_2__len__(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1775, __pyx_L1_error) + __PYX_ERR(0, 1792, __pyx_L1_error) } __pyx_r = __pyx_v_self->_parens.size(); goto __pyx_L0; - /* "_pynini.pyx":1774 + /* "_pynini.pyx":1791 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __len__(self): # <<<<<<<<<<<<<< @@ -27419,7 +27784,7 @@ static Py_ssize_t __pyx_pf_7_pynini_15MPdtParentheses_2__len__(struct __pyx_obj_ } static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":1777 +/* "_pynini.pyx":1794 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -27454,7 +27819,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_4__iter__(struct __pyx_obj_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_8___iter__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1777, __pyx_L1_error) + __PYX_ERR(0, 1794, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -27462,7 +27827,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_4__iter__(struct __pyx_obj_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_15MPdtParentheses_6generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MPdtParentheses___iter, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_15MPdtParentheses_6generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MPdtParentheses___iter, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 1794, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -27502,9 +27867,9 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1777, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1794, __pyx_L1_error) - /* "_pynini.pyx":1778 + /* "_pynini.pyx":1795 * * def __iter__(self): * cdef size_t _i = 0 # <<<<<<<<<<<<<< @@ -27513,7 +27878,7 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine */ __pyx_cur_scope->__pyx_v__i = 0; - /* "_pynini.pyx":1779 + /* "_pynini.pyx":1796 * def __iter__(self): * cdef size_t _i = 0 * for _i in range(self._parens.size()): # <<<<<<<<<<<<<< @@ -27522,14 +27887,14 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1779, __pyx_L1_error) + __PYX_ERR(0, 1796, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->_parens.size(); __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v__i = __pyx_t_3; - /* "_pynini.pyx":1780 + /* "_pynini.pyx":1797 * cdef size_t _i = 0 * for _i in range(self._parens.size()): * yield (self._parens[_i].first, self._parens[_i].second, self._assign[_i]) # <<<<<<<<<<<<<< @@ -27538,30 +27903,30 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1780, __pyx_L1_error) + __PYX_ERR(0, 1797, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).first); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1780, __pyx_L1_error) + __PYX_ERR(0, 1797, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_parens[__pyx_cur_scope->__pyx_v__i]).second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1780, __pyx_L1_error) + __PYX_ERR(0, 1797, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_assign[__pyx_cur_scope->__pyx_v__i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1780, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_assign[__pyx_cur_scope->__pyx_v__i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 1797, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1797, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)) __PYX_ERR(0, 1780, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)) __PYX_ERR(0, 1797, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; @@ -27580,11 +27945,11 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1780, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1797, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":1777 + /* "_pynini.pyx":1794 * return self._parens.size() * * def __iter__(self): # <<<<<<<<<<<<<< @@ -27613,7 +27978,7 @@ static PyObject *__pyx_gb_7_pynini_15MPdtParentheses_6generator1(__pyx_Coroutine return __pyx_r; } -/* "_pynini.pyx":1782 +/* "_pynini.pyx":1799 * yield (self._parens[_i].first, self._parens[_i].second, self._assign[_i]) * * cpdef MPdtParentheses copy(self): # <<<<<<<<<<<<<< @@ -27652,7 +28017,7 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __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, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_15MPdtParentheses_8copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -27675,11 +28040,11 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1782, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __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_7_pynini_MPdtParentheses))))) __PYX_ERR(0, 1782, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_MPdtParentheses))))) __PYX_ERR(0, 1799, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_MPdtParentheses *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -27698,19 +28063,19 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth #endif } - /* "_pynini.pyx":1791 + /* "_pynini.pyx":1808 * A deep copy of the MPdtParentheses object. * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) # <<<<<<<<<<<<<< * result._parens = self._parens * result._assign = self._assign */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_MPdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_MPdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1791, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_MPdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_MPdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_MPdtParentheses *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1792 + /* "_pynini.pyx":1809 * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * result._parens = self._parens # <<<<<<<<<<<<<< @@ -27719,16 +28084,16 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1792, __pyx_L1_error) + __PYX_ERR(0, 1809, __pyx_L1_error) } __pyx_t_6 = __pyx_v_self->_parens; if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1792, __pyx_L1_error) + __PYX_ERR(0, 1809, __pyx_L1_error) } __pyx_v_result->_parens = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6); - /* "_pynini.pyx":1793 + /* "_pynini.pyx":1810 * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * result._parens = self._parens * result._assign = self._assign # <<<<<<<<<<<<<< @@ -27737,16 +28102,16 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1793, __pyx_L1_error) + __PYX_ERR(0, 1810, __pyx_L1_error) } __pyx_t_7 = __pyx_v_self->_assign; if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1793, __pyx_L1_error) + __PYX_ERR(0, 1810, __pyx_L1_error) } __pyx_v_result->_assign = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7); - /* "_pynini.pyx":1794 + /* "_pynini.pyx":1811 * result._parens = self._parens * result._assign = self._assign * return result # <<<<<<<<<<<<<< @@ -27758,7 +28123,7 @@ static struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_f_7_pynini_15MPdtParenth __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1782 + /* "_pynini.pyx":1799 * yield (self._parens[_i].first, self._parens[_i].second, self._assign[_i]) * * cpdef MPdtParentheses copy(self): # <<<<<<<<<<<<<< @@ -27832,7 +28197,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_7copy(struct __pyx_obj_7_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_15MPdtParentheses_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_15MPdtParentheses_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27849,7 +28214,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_7copy(struct __pyx_obj_7_py return __pyx_r; } -/* "_pynini.pyx":1796 +/* "_pynini.pyx":1813 * return result * * cpdef void add_triple(self, int64_t push, int64_t pop, int64_t assignment): # <<<<<<<<<<<<<< @@ -27888,14 +28253,14 @@ static void __pyx_f_7_pynini_15MPdtParentheses_add_triple(struct __pyx_obj_7_pyn if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_triple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_triple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_15MPdtParentheses_10add_triple)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_push); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_push); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_assignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int64_t(__pyx_v_assignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_7 = NULL; @@ -27919,7 +28284,7 @@ static void __pyx_f_7_pynini_15MPdtParentheses_add_triple(struct __pyx_obj_7_pyn __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -27940,7 +28305,7 @@ static void __pyx_f_7_pynini_15MPdtParentheses_add_triple(struct __pyx_obj_7_pyn #endif } - /* "_pynini.pyx":1809 + /* "_pynini.pyx":1826 * assigned to. * """ * self._parens.push_back(pair[int64_t, int64_t](push, pop)) # <<<<<<<<<<<<<< @@ -27949,22 +28314,22 @@ static void __pyx_f_7_pynini_15MPdtParentheses_add_triple(struct __pyx_obj_7_pyn */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1809, __pyx_L1_error) + __PYX_ERR(0, 1826, __pyx_L1_error) } try { __pyx_t_9 = std::pair (__pyx_v_push, __pyx_v_pop); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1809, __pyx_L1_error) + __PYX_ERR(0, 1826, __pyx_L1_error) } try { __pyx_v_self->_parens.push_back(__pyx_t_9); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1809, __pyx_L1_error) + __PYX_ERR(0, 1826, __pyx_L1_error) } - /* "_pynini.pyx":1810 + /* "_pynini.pyx":1827 * """ * self._parens.push_back(pair[int64_t, int64_t](push, pop)) * self._assign.push_back(assignment) # <<<<<<<<<<<<<< @@ -27973,16 +28338,16 @@ static void __pyx_f_7_pynini_15MPdtParentheses_add_triple(struct __pyx_obj_7_pyn */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1810, __pyx_L1_error) + __PYX_ERR(0, 1827, __pyx_L1_error) } try { __pyx_v_self->_assign.push_back(__pyx_v_assignment); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1810, __pyx_L1_error) + __PYX_ERR(0, 1827, __pyx_L1_error) } - /* "_pynini.pyx":1796 + /* "_pynini.pyx":1813 * return result * * cpdef void add_triple(self, int64_t push, int64_t pop, int64_t assignment): # <<<<<<<<<<<<<< @@ -28065,7 +28430,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -28073,9 +28438,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, 1); __PYX_ERR(0, 1796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, 1); __PYX_ERR(0, 1813, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -28083,14 +28448,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, 2); __PYX_ERR(0, 1796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, 2); __PYX_ERR(0, 1813, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_triple") < 0)) __PYX_ERR(0, 1796, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_triple") < 0)) __PYX_ERR(0, 1813, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -28099,13 +28464,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } - __pyx_v_push = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_push == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) - __pyx_v_pop = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_pop == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) - __pyx_v_assignment = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_assignment == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L3_error) + __pyx_v_push = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_push == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) + __pyx_v_pop = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_pop == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) + __pyx_v_assignment = __Pyx_PyInt_As_int64_t(values[2]); if (unlikely((__pyx_v_assignment == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_triple", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1813, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28141,8 +28506,8 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_9add_triple(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_triple", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_15MPdtParentheses_add_triple(__pyx_v_self, __pyx_v_push, __pyx_v_pop, __pyx_v_assignment, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_f_7_pynini_15MPdtParentheses_add_triple(__pyx_v_self, __pyx_v_push, __pyx_v_pop, __pyx_v_assignment, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28159,7 +28524,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_9add_triple(struct __pyx_ob return __pyx_r; } -/* "_pynini.pyx":1812 +/* "_pynini.pyx":1829 * self._assign.push_back(assignment) * * @classmethod # <<<<<<<<<<<<<< @@ -28221,12 +28586,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1812, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1829, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1812, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1829, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -28237,7 +28602,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1812, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1829, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28280,73 +28645,73 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_11read(CYTHON_UNUSED PyType int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pynini.pyx":1831 + /* "_pynini.pyx":1848 * FstIOError: Read failed. * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) # <<<<<<<<<<<<<< * if not ReadLabelTriples[int64_t](path_tostring(filename), * addr(result._parens), */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_MPdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_MPdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_7_pynini_MPdtParentheses(((PyTypeObject *)__pyx_ptype_7_pynini_MPdtParentheses), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_MPdtParentheses *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1832 + /* "_pynini.pyx":1849 * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * if not ReadLabelTriples[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< * addr(result._parens), - * addr(result._assign), + * addr(result._assign)): */ - __pyx_t_2 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1832, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1849, __pyx_L1_error) - /* "_pynini.pyx":1833 + /* "_pynini.pyx":1850 * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * if not ReadLabelTriples[int64_t](path_tostring(filename), * addr(result._parens), # <<<<<<<<<<<<<< - * addr(result._assign), - * False): + * addr(result._assign)): + * raise FstIOError(f"Read failed: {filename}") */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1833, __pyx_L1_error) + __PYX_ERR(0, 1850, __pyx_L1_error) } - /* "_pynini.pyx":1834 + /* "_pynini.pyx":1851 * if not ReadLabelTriples[int64_t](path_tostring(filename), * addr(result._parens), - * addr(result._assign), # <<<<<<<<<<<<<< - * False): + * addr(result._assign)): # <<<<<<<<<<<<<< * raise FstIOError(f"Read failed: {filename}") + * return result */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1834, __pyx_L1_error) + __PYX_ERR(0, 1851, __pyx_L1_error) } - /* "_pynini.pyx":1832 + /* "_pynini.pyx":1849 * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * if not ReadLabelTriples[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< * addr(result._parens), - * addr(result._assign), + * addr(result._assign)): */ - __pyx_t_3 = (!(fst::ReadLabelTriples(__pyx_t_2, (&__pyx_v_result->_parens), ((std::vector *)(&__pyx_v_result->_assign)), 0) != 0)); + __pyx_t_3 = (!(fst::ReadLabelTriples(__pyx_t_2, (&__pyx_v_result->_parens), ((std::vector *)(&__pyx_v_result->_assign))) != 0)); if (unlikely(__pyx_t_3)) { - /* "_pynini.pyx":1836 - * addr(result._assign), - * False): + /* "_pynini.pyx":1852 + * addr(result._parens), + * addr(result._assign)): * raise FstIOError(f"Read failed: {filename}") # <<<<<<<<<<<<<< * return result * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1836, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -28368,25 +28733,25 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_11read(CYTHON_UNUSED PyType __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1836, __pyx_L1_error) + __PYX_ERR(0, 1852, __pyx_L1_error) - /* "_pynini.pyx":1832 + /* "_pynini.pyx":1849 * """ * cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) * if not ReadLabelTriples[int64_t](path_tostring(filename), # <<<<<<<<<<<<<< * addr(result._parens), - * addr(result._assign), + * addr(result._assign)): */ } - /* "_pynini.pyx":1837 - * False): + /* "_pynini.pyx":1853 + * addr(result._assign)): * raise FstIOError(f"Read failed: {filename}") * return result # <<<<<<<<<<<<<< * @@ -28397,7 +28762,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_11read(CYTHON_UNUSED PyType __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":1812 + /* "_pynini.pyx":1829 * self._assign.push_back(assignment) * * @classmethod # <<<<<<<<<<<<<< @@ -28420,7 +28785,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_11read(CYTHON_UNUSED PyType return __pyx_r; } -/* "_pynini.pyx":1839 +/* "_pynini.pyx":1855 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -28457,7 +28822,7 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __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, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_15MPdtParentheses_14write)) { __Pyx_INCREF(__pyx_t_1); @@ -28479,7 +28844,7 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -28500,20 +28865,20 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M #endif } - /* "_pynini.pyx":1853 + /* "_pynini.pyx":1869 * FstIOError: Write failed. * """ * if not WriteLabelTriples[int64_t](path_tostring(filename), self._parens, # <<<<<<<<<<<<<< * self._assign): * raise FstIOError(f"Write failed: {filename}") */ - __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1853, __pyx_L1_error) + __PYX_ERR(0, 1869, __pyx_L1_error) } - /* "_pynini.pyx":1854 + /* "_pynini.pyx":1870 * """ * if not WriteLabelTriples[int64_t](path_tostring(filename), self._parens, * self._assign): # <<<<<<<<<<<<<< @@ -28522,10 +28887,10 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1854, __pyx_L1_error) + __PYX_ERR(0, 1870, __pyx_L1_error) } - /* "_pynini.pyx":1853 + /* "_pynini.pyx":1869 * FstIOError: Write failed. * """ * if not WriteLabelTriples[int64_t](path_tostring(filename), self._parens, # <<<<<<<<<<<<<< @@ -28535,18 +28900,18 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M __pyx_t_7 = (!(fst::WriteLabelTriples(__pyx_t_6, __pyx_v_self->_parens, ((std::vector &)__pyx_v_self->_assign)) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pynini.pyx":1855 + /* "_pynini.pyx":1871 * if not WriteLabelTriples[int64_t](path_tostring(filename), self._parens, * self._assign): * raise FstIOError(f"Write failed: {filename}") # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_filename, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -28568,15 +28933,15 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __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, 1855, __pyx_L1_error) + __PYX_ERR(0, 1871, __pyx_L1_error) - /* "_pynini.pyx":1853 + /* "_pynini.pyx":1869 * FstIOError: Write failed. * """ * if not WriteLabelTriples[int64_t](path_tostring(filename), self._parens, # <<<<<<<<<<<<<< @@ -28585,7 +28950,7 @@ static void __pyx_f_7_pynini_15MPdtParentheses_write(struct __pyx_obj_7_pynini_M */ } - /* "_pynini.pyx":1839 + /* "_pynini.pyx":1855 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< @@ -28659,12 +29024,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1839, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1855, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1839, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1855, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -28675,7 +29040,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1839, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1855, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28711,8 +29076,8 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_13write(struct __pyx_obj_7_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_15MPdtParentheses_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1839, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_f_7_pynini_15MPdtParentheses_write(__pyx_v_self, __pyx_v_filename, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29144,7 +29509,7 @@ static PyObject *__pyx_pf_7_pynini_15MPdtParentheses_17__setstate_cython__(struc return __pyx_r; } -/* "_pynini.pyx":1858 +/* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< @@ -29162,7 +29527,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__pyx_v_fst1, PyObject *__pyx_v_fst2, struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_v_parens, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_mpdt_compose *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_paren); - /* "_pynini.pyx":1859 + /* "_pynini.pyx":1875 * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, * compose_filter="paren", bool left_mpdt=True): # <<<<<<<<<<<<<< @@ -29196,14 +29561,14 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ } } - /* "_pynini.pyx":1891 + /* "_pynini.pyx":1907 * cdef Fst _fst1 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) # <<<<<<<<<<<<<< * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * cdef Fst result = Fst(_fst1.arc_type()) */ - __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini__compile_or_copy_two_Fsts(__pyx_v_fst1, __pyx_v_fst2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __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; @@ -29211,7 +29576,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1891, __pyx_L1_error) + __PYX_ERR(0, 1907, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29224,15 +29589,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ __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, 1891, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1891, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __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, 1891, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -29240,7 +29605,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ __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, 1891, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1907, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -29248,17 +29613,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1891, __pyx_L1_error) + __PYX_ERR(0, 1907, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1891, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1891, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1907, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 1907, __pyx_L1_error) __pyx_v__fst1 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __pyx_v__fst2 = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1892 + /* "_pynini.pyx":1908 * cdef Fst _fst2 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) # <<<<<<<<<<<<<< @@ -29267,15 +29632,15 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1892, __pyx_L1_error) + __PYX_ERR(0, 1908, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1892, __pyx_L1_error) + __PYX_ERR(0, 1908, __pyx_L1_error) } - __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_f_7_pynini__maybe_arcsort(__pyx_v__fst1->__pyx_base.__pyx_base._mfst.get(), __pyx_v__fst2->__pyx_base.__pyx_base._mfst.get()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L1_error) - /* "_pynini.pyx":1893 + /* "_pynini.pyx":1909 * (_fst1, _fst2) = _compile_or_copy_two_Fsts(fst1, fst2) * _maybe_arcsort(_fst1._mfst.get(), _fst2._mfst.get()) * cdef Fst result = Fst(_fst1.arc_type()) # <<<<<<<<<<<<<< @@ -29284,28 +29649,28 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1893, __pyx_L1_error) + __PYX_ERR(0, 1909, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1893, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst1), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1909, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1893, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1897 + /* "_pynini.pyx":1913 * _opts.reset( * new MPdtComposeOptions(True, * _get_pdt_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * Compose(deref(_fst1._fst), * deref(_fst2._fst), */ - __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1897, __pyx_L1_error) - __pyx_t_7 = __pyx_f_7_pynini__get_pdt_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1913, __pyx_L1_error) + __pyx_t_7 = __pyx_f_7_pynini__get_pdt_compose_filter(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1913, __pyx_L1_error) - /* "_pynini.pyx":1895 + /* "_pynini.pyx":1911 * cdef Fst result = Fst(_fst1.arc_type()) * cdef unique_ptr[MPdtComposeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -29314,7 +29679,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ __pyx_v__opts.reset(new fst::MPdtComposeOptions(1, __pyx_t_7)); - /* "_pynini.pyx":1898 + /* "_pynini.pyx":1914 * new MPdtComposeOptions(True, * _get_pdt_compose_filter(tostring(compose_filter)))) * Compose(deref(_fst1._fst), # <<<<<<<<<<<<<< @@ -29323,10 +29688,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v__fst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1898, __pyx_L1_error) + __PYX_ERR(0, 1914, __pyx_L1_error) } - /* "_pynini.pyx":1899 + /* "_pynini.pyx":1915 * _get_pdt_compose_filter(tostring(compose_filter)))) * Compose(deref(_fst1._fst), * deref(_fst2._fst), # <<<<<<<<<<<<<< @@ -29335,10 +29700,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1899, __pyx_L1_error) + __PYX_ERR(0, 1915, __pyx_L1_error) } - /* "_pynini.pyx":1900 + /* "_pynini.pyx":1916 * Compose(deref(_fst1._fst), * deref(_fst2._fst), * parens._parens, # <<<<<<<<<<<<<< @@ -29347,10 +29712,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1900, __pyx_L1_error) + __PYX_ERR(0, 1916, __pyx_L1_error) } - /* "_pynini.pyx":1901 + /* "_pynini.pyx":1917 * deref(_fst2._fst), * parens._parens, * parens._assign, # <<<<<<<<<<<<<< @@ -29359,10 +29724,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1901, __pyx_L1_error) + __PYX_ERR(0, 1917, __pyx_L1_error) } - /* "_pynini.pyx":1898 + /* "_pynini.pyx":1914 * new MPdtComposeOptions(True, * _get_pdt_compose_filter(tostring(compose_filter)))) * Compose(deref(_fst1._fst), # <<<<<<<<<<<<<< @@ -29371,7 +29736,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ */ fst::script::Compose((*__pyx_v__fst1->__pyx_base.__pyx_base.__pyx_base._fst), (*__pyx_v__fst2->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_parens->_assign, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts), __pyx_v_left_mpdt); - /* "_pynini.pyx":1905 + /* "_pynini.pyx":1921 * deref(_opts), * left_mpdt) * return result # <<<<<<<<<<<<<< @@ -29383,7 +29748,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_compose(PyObject *__ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1858 + /* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< @@ -29475,7 +29840,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29483,9 +29848,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, 1); __PYX_ERR(0, 1858, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, 1); __PYX_ERR(0, 1874, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -29493,28 +29858,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, 2); __PYX_ERR(0, 1858, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, 2); __PYX_ERR(0, 1874, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_left_mpdt); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1858, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_compose") < 0)) __PYX_ERR(0, 1858, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_compose") < 0)) __PYX_ERR(0, 1874, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -29534,10 +29899,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_parens = ((struct __pyx_obj_7_pynini_MPdtParentheses *)values[2]); __pyx_v_compose_filter = values[3]; if (values[4]) { - __pyx_v_left_mpdt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_left_mpdt == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1859, __pyx_L3_error) + __pyx_v_left_mpdt = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_left_mpdt == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1875, __pyx_L3_error) } else { - /* "_pynini.pyx":1859 + /* "_pynini.pyx":1875 * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, * compose_filter="paren", bool left_mpdt=True): # <<<<<<<<<<<<<< @@ -29549,7 +29914,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1858, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_compose", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 1874, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29563,10 +29928,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1858, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1874, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_48mpdt_compose(__pyx_self, __pyx_v_fst1, __pyx_v_fst2, __pyx_v_parens, __pyx_v_compose_filter, __pyx_v_left_mpdt); - /* "_pynini.pyx":1858 + /* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< @@ -29602,7 +29967,7 @@ static PyObject *__pyx_pf_7_pynini_48mpdt_compose(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.left_mpdt = __pyx_v_left_mpdt; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_mpdt_compose(__pyx_v_fst1, __pyx_v_fst2, __pyx_v_parens, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_mpdt_compose(__pyx_v_fst1, __pyx_v_fst2, __pyx_v_parens, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29619,7 +29984,7 @@ static PyObject *__pyx_pf_7_pynini_48mpdt_compose(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "_pynini.pyx":1908 +/* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< @@ -29636,7 +30001,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds ); /*proto*/ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__pyx_v_fst, struct __pyx_obj_7_pynini_MPdtParentheses *__pyx_v_parens, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7_pynini_mpdt_expand *__pyx_optional_args) { - /* "_pynini.pyx":1910 + /* "_pynini.pyx":1926 * cpdef Fst mpdt_expand(fst, * MPdtParentheses parens, * bool connect=True, # <<<<<<<<<<<<<< @@ -29645,7 +30010,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ bool __pyx_v_connect = ((bool)1); - /* "_pynini.pyx":1911 + /* "_pynini.pyx":1927 * MPdtParentheses parens, * bool connect=True, * bool keep_parentheses=False): # <<<<<<<<<<<<<< @@ -29674,19 +30039,19 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p } } - /* "_pynini.pyx":1937 + /* "_pynini.pyx":1953 * FstOpError: Operation failed. * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * cdef Fst result = Fst(_fst.arc_type()) * cdef unique_ptr[MPdtExpandOptions] _opts */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1938 + /* "_pynini.pyx":1954 * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result = Fst(_fst.arc_type()) # <<<<<<<<<<<<<< @@ -29695,18 +30060,18 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1938, __pyx_L1_error) + __PYX_ERR(0, 1954, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1938, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1954, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1938, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1940 + /* "_pynini.pyx":1956 * cdef Fst result = Fst(_fst.arc_type()) * cdef unique_ptr[MPdtExpandOptions] _opts * _opts.reset(new MPdtExpandOptions(connect, keep_parentheses)) # <<<<<<<<<<<<<< @@ -29715,7 +30080,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ __pyx_v__opts.reset(new fst::MPdtExpandOptions(__pyx_v_connect, __pyx_v_keep_parentheses)); - /* "_pynini.pyx":1941 + /* "_pynini.pyx":1957 * cdef unique_ptr[MPdtExpandOptions] _opts * _opts.reset(new MPdtExpandOptions(connect, keep_parentheses)) * Expand(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -29724,10 +30089,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1941, __pyx_L1_error) + __PYX_ERR(0, 1957, __pyx_L1_error) } - /* "_pynini.pyx":1942 + /* "_pynini.pyx":1958 * _opts.reset(new MPdtExpandOptions(connect, keep_parentheses)) * Expand(deref(_fst._fst), * parens._parens, # <<<<<<<<<<<<<< @@ -29736,10 +30101,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1942, __pyx_L1_error) + __PYX_ERR(0, 1958, __pyx_L1_error) } - /* "_pynini.pyx":1943 + /* "_pynini.pyx":1959 * Expand(deref(_fst._fst), * parens._parens, * parens._assign, # <<<<<<<<<<<<<< @@ -29748,10 +30113,10 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1943, __pyx_L1_error) + __PYX_ERR(0, 1959, __pyx_L1_error) } - /* "_pynini.pyx":1941 + /* "_pynini.pyx":1957 * cdef unique_ptr[MPdtExpandOptions] _opts * _opts.reset(new MPdtExpandOptions(connect, keep_parentheses)) * Expand(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -29760,16 +30125,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p */ fst::script::Expand((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_parens->_parens, __pyx_v_parens->_assign, __pyx_v_result->__pyx_base.__pyx_base._mfst.get(), (*__pyx_v__opts)); - /* "_pynini.pyx":1946 + /* "_pynini.pyx":1962 * result._mfst.get(), * deref(_opts)) * result._check_mutating_imethod() # <<<<<<<<<<<<<< * return result * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1946, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1962, __pyx_L1_error) - /* "_pynini.pyx":1947 + /* "_pynini.pyx":1963 * deref(_opts)) * result._check_mutating_imethod() * return result # <<<<<<<<<<<<<< @@ -29781,7 +30146,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_mpdt_expand(PyObject *__p __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pynini.pyx":1908 + /* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< @@ -29866,7 +30231,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -29874,28 +30239,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("mpdt_expand", 0, 2, 4, 1); __PYX_ERR(0, 1908, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_expand", 0, 2, 4, 1); __PYX_ERR(0, 1924, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_parentheses); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_expand") < 0)) __PYX_ERR(0, 1908, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_expand") < 0)) __PYX_ERR(0, 1924, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -29912,10 +30277,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_fst = values[0]; __pyx_v_parens = ((struct __pyx_obj_7_pynini_MPdtParentheses *)values[1]); if (values[2]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1910, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1926, __pyx_L3_error) } else { - /* "_pynini.pyx":1910 + /* "_pynini.pyx":1926 * cpdef Fst mpdt_expand(fst, * MPdtParentheses parens, * bool connect=True, # <<<<<<<<<<<<<< @@ -29925,10 +30290,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_connect = ((bool)1); } if (values[3]) { - __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) + __pyx_v_keep_parentheses = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_keep_parentheses == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1927, __pyx_L3_error) } else { - /* "_pynini.pyx":1911 + /* "_pynini.pyx":1927 * MPdtParentheses parens, * bool connect=True, * bool keep_parentheses=False): # <<<<<<<<<<<<<< @@ -29940,7 +30305,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("mpdt_expand", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1908, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_expand", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1924, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29954,10 +30319,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1909, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1925, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_50mpdt_expand(__pyx_self, __pyx_v_fst, __pyx_v_parens, __pyx_v_connect, __pyx_v_keep_parentheses); - /* "_pynini.pyx":1908 + /* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< @@ -29993,7 +30358,7 @@ static PyObject *__pyx_pf_7_pynini_50mpdt_expand(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2.__pyx_n = 2; __pyx_t_2.connect = __pyx_v_connect; __pyx_t_2.keep_parentheses = __pyx_v_keep_parentheses; - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_mpdt_expand(__pyx_v_fst, __pyx_v_parens, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_mpdt_expand(__pyx_v_fst, __pyx_v_parens, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -30010,7 +30375,7 @@ static PyObject *__pyx_pf_7_pynini_50mpdt_expand(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pynini.pyx":1950 +/* "_pynini.pyx":1966 * * * def mpdt_reverse(fst, MPdtParentheses parens): # <<<<<<<<<<<<<< @@ -30075,7 +30440,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1950, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1966, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -30083,14 +30448,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1950, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1966, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("mpdt_reverse", 1, 2, 2, 1); __PYX_ERR(0, 1950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_reverse", 1, 2, 2, 1); __PYX_ERR(0, 1966, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_reverse") < 0)) __PYX_ERR(0, 1950, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mpdt_reverse") < 0)) __PYX_ERR(0, 1966, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -30103,7 +30468,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("mpdt_reverse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mpdt_reverse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1966, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30117,7 +30482,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1950, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parens), __pyx_ptype_7_pynini_MPdtParentheses, 1, "parens", 0))) __PYX_ERR(0, 1966, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_52mpdt_reverse(__pyx_self, __pyx_v_fst, __pyx_v_parens); /* function exit code */ @@ -30149,19 +30514,19 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mpdt_reverse", 1); - /* "_pynini.pyx":1969 + /* "_pynini.pyx":1985 * A (Fst, MPdtParentheses) pair. * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * cdef Fst result_fst = Fst(_fst.arc_type()) * cdef MPdtParentheses result_parens = parens.copy() */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":1970 + /* "_pynini.pyx":1986 * """ * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result_fst = Fst(_fst.arc_type()) # <<<<<<<<<<<<<< @@ -30170,18 +30535,18 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 1970, __pyx_L1_error) + __PYX_ERR(0, 1986, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1970, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base.arc_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v__fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1986, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1970, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result_fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1971 + /* "_pynini.pyx":1987 * cdef Fst _fst = _compile_or_copy_Fst(fst) * cdef Fst result_fst = Fst(_fst.arc_type()) * cdef MPdtParentheses result_parens = parens.copy() # <<<<<<<<<<<<<< @@ -30190,14 +30555,14 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "copy"); - __PYX_ERR(0, 1971, __pyx_L1_error) + __PYX_ERR(0, 1987, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_MPdtParentheses *)__pyx_v_parens->__pyx_vtab)->copy(__pyx_v_parens, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_MPdtParentheses *)__pyx_v_parens->__pyx_vtab)->copy(__pyx_v_parens, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_result_parens = ((struct __pyx_obj_7_pynini_MPdtParentheses *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":1972 + /* "_pynini.pyx":1988 * cdef Fst result_fst = Fst(_fst.arc_type()) * cdef MPdtParentheses result_parens = parens.copy() * Reverse(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -30206,10 +30571,10 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1972, __pyx_L1_error) + __PYX_ERR(0, 1988, __pyx_L1_error) } - /* "_pynini.pyx":1973 + /* "_pynini.pyx":1989 * cdef MPdtParentheses result_parens = parens.copy() * Reverse(deref(_fst._fst), * result_parens._parens, # <<<<<<<<<<<<<< @@ -30218,10 +30583,10 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_result_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_parens"); - __PYX_ERR(0, 1973, __pyx_L1_error) + __PYX_ERR(0, 1989, __pyx_L1_error) } - /* "_pynini.pyx":1974 + /* "_pynini.pyx":1990 * Reverse(deref(_fst._fst), * result_parens._parens, * addr(result_parens._assign), # <<<<<<<<<<<<<< @@ -30230,10 +30595,10 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_result_parens) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_assign"); - __PYX_ERR(0, 1974, __pyx_L1_error) + __PYX_ERR(0, 1990, __pyx_L1_error) } - /* "_pynini.pyx":1972 + /* "_pynini.pyx":1988 * cdef Fst result_fst = Fst(_fst.arc_type()) * cdef MPdtParentheses result_parens = parens.copy() * Reverse(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -30242,16 +30607,16 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ */ fst::script::Reverse((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v_result_parens->_parens, (&__pyx_v_result_parens->_assign), __pyx_v_result_fst->__pyx_base.__pyx_base._mfst.get()); - /* "_pynini.pyx":1976 + /* "_pynini.pyx":1992 * addr(result_parens._assign), * result_fst._mfst.get()) * result_fst._check_mutating_imethod() # <<<<<<<<<<<<<< * return (result_fst, result_parens) * */ - ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result_fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result_fst)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1976, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Fst *)__pyx_v_result_fst->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._check_mutating_imethod(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_result_fst)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L1_error) - /* "_pynini.pyx":1977 + /* "_pynini.pyx":1993 * result_fst._mfst.get()) * result_fst._check_mutating_imethod() * return (result_fst, result_parens) # <<<<<<<<<<<<<< @@ -30259,19 +30624,19 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1977, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF((PyObject *)__pyx_v_result_fst); __Pyx_GIVEREF((PyObject *)__pyx_v_result_fst); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_result_fst))) __PYX_ERR(0, 1977, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_result_fst))) __PYX_ERR(0, 1993, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_result_parens); __Pyx_GIVEREF((PyObject *)__pyx_v_result_parens); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_result_parens))) __PYX_ERR(0, 1977, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_result_parens))) __PYX_ERR(0, 1993, __pyx_L1_error); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pynini.pyx":1950 + /* "_pynini.pyx":1966 * * * def mpdt_reverse(fst, MPdtParentheses parens): # <<<<<<<<<<<<<< @@ -30294,7 +30659,7 @@ static PyObject *__pyx_pf_7_pynini_52mpdt_reverse(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "_pynini.pyx":2020 +/* "_pynini.pyx":2036 * cdef unique_ptr[StringPathIteratorClass] _paths * * def __repr__(self): # <<<<<<<<<<<<<< @@ -30330,7 +30695,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pynini.pyx":2021 + /* "_pynini.pyx":2037 * * def __repr__(self): * return f"<{self.__class__.__name__} at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -30338,7 +30703,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o * def __init__(self, fst, input_token_type=None, output_token_type=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -30346,12 +30711,12 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__11); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__11); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -30363,9 +30728,9 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -30377,14 +30742,14 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pynini.pyx":2020 + /* "_pynini.pyx":2036 * cdef unique_ptr[StringPathIteratorClass] _paths * * def __repr__(self): # <<<<<<<<<<<<<< @@ -30405,7 +30770,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator___repr__(struct __pyx_o return __pyx_r; } -/* "_pynini.pyx":2023 +/* "_pynini.pyx":2039 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __init__(self, fst, input_token_type=None, output_token_type=None): # <<<<<<<<<<<<<< @@ -30457,26 +30822,26 @@ static int __pyx_pw_7_pynini_19_StringPathIterator_3__init__(PyObject *__pyx_v_s (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_token_type); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_output_token_type); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2023, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2039, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -30495,7 +30860,7 @@ static int __pyx_pw_7_pynini_19_StringPathIterator_3__init__(PyObject *__pyx_v_s } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2023, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2039, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30543,7 +30908,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pynini.pyx":2025 + /* "_pynini.pyx":2041 * def __init__(self, fst, input_token_type=None, output_token_type=None): * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL # <<<<<<<<<<<<<< @@ -30552,7 +30917,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__isymbols = NULL; - /* "_pynini.pyx":2026 + /* "_pynini.pyx":2042 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -30562,7 +30927,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ __pyx_t_1 = (__pyx_v_input_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":2027 + /* "_pynini.pyx":2043 * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: * _input_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -30571,7 +30936,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__input_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":2028 + /* "_pynini.pyx":2044 * if input_token_type is None: * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -30580,7 +30945,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__isymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":2026 + /* "_pynini.pyx":2042 * cdef _TokenType _input_token_type * cdef const_SymbolTable_ptr _isymbols = NULL * if input_token_type is None: # <<<<<<<<<<<<<< @@ -30590,23 +30955,23 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ goto __pyx_L3; } - /* "_pynini.pyx":2029 + /* "_pynini.pyx":2045 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2029, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_input_token_type, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":2030 + /* "_pynini.pyx":2046 * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -30615,7 +30980,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__input_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":2031 + /* "_pynini.pyx":2047 * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): * _input_token_type = _TokenType.SYMBOL * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -30624,12 +30989,12 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ if (unlikely(__pyx_v_input_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2031, __pyx_L1_error) + __PYX_ERR(0, 2047, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2031, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_input_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2047, __pyx_L1_error) __pyx_v__isymbols = __pyx_t_4; - /* "_pynini.pyx":2029 + /* "_pynini.pyx":2045 * _input_token_type = GetDefaultTokenType() * _isymbols = GetDefaultSymbols() * elif isinstance(input_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -30639,7 +31004,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ goto __pyx_L3; } - /* "_pynini.pyx":2033 + /* "_pynini.pyx":2049 * _isymbols = (<_SymbolTableView> input_token_type)._raw_ptr_or_raise() * else: * _input_token_type = _get_token_type(tostring(input_token_type)) # <<<<<<<<<<<<<< @@ -30647,13 +31012,13 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ * cdef const_SymbolTable_ptr _osymbols = NULL */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2033, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2033, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_input_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) __pyx_v__input_token_type = __pyx_t_6; } __pyx_L3:; - /* "_pynini.pyx":2035 + /* "_pynini.pyx":2051 * _input_token_type = _get_token_type(tostring(input_token_type)) * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL # <<<<<<<<<<<<<< @@ -30662,7 +31027,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__osymbols = NULL; - /* "_pynini.pyx":2036 + /* "_pynini.pyx":2052 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -30672,7 +31037,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ __pyx_t_1 = (__pyx_v_output_token_type == Py_None); if (__pyx_t_1) { - /* "_pynini.pyx":2037 + /* "_pynini.pyx":2053 * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: * _output_token_type = GetDefaultTokenType() # <<<<<<<<<<<<<< @@ -30681,7 +31046,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__output_token_type = fst::GetDefaultTokenType(); - /* "_pynini.pyx":2038 + /* "_pynini.pyx":2054 * if output_token_type is None: * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() # <<<<<<<<<<<<<< @@ -30690,7 +31055,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__osymbols = fst::GetDefaultSymbols(); - /* "_pynini.pyx":2036 + /* "_pynini.pyx":2052 * cdef _TokenType _output_token_type * cdef const_SymbolTable_ptr _osymbols = NULL * if output_token_type is None: # <<<<<<<<<<<<<< @@ -30700,23 +31065,23 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ goto __pyx_L4; } - /* "_pynini.pyx":2039 + /* "_pynini.pyx":2055 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2039, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_output_token_type, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "_pynini.pyx":2040 + /* "_pynini.pyx":2056 * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL # <<<<<<<<<<<<<< @@ -30725,7 +31090,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v__output_token_type = fst::TokenType::SYMBOL; - /* "_pynini.pyx":2041 + /* "_pynini.pyx":2057 * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): * _output_token_type = _TokenType.SYMBOL * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -30734,12 +31099,12 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ if (unlikely(__pyx_v_output_token_type == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2041, __pyx_L1_error) + __PYX_ERR(0, 2057, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2041, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)->__pyx_vtab)->_raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_output_token_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2057, __pyx_L1_error) __pyx_v__osymbols = __pyx_t_4; - /* "_pynini.pyx":2039 + /* "_pynini.pyx":2055 * _output_token_type = GetDefaultTokenType() * _osymbols = GetDefaultSymbols() * elif isinstance(output_token_type, _pywrapfst.SymbolTableView): # <<<<<<<<<<<<<< @@ -30749,7 +31114,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ goto __pyx_L4; } - /* "_pynini.pyx":2043 + /* "_pynini.pyx":2059 * _osymbols = (<_SymbolTableView> output_token_type)._raw_ptr_or_raise() * else: * _output_token_type = _get_token_type(tostring(output_token_type)) # <<<<<<<<<<<<<< @@ -30757,25 +31122,25 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ * self._paths.reset( */ /*else*/ { - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2043, __pyx_L1_error) - __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2043, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_output_token_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L1_error) + __pyx_t_6 = __pyx_f_7_pynini__get_token_type(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L1_error) __pyx_v__output_token_type = __pyx_t_6; } __pyx_L4:; - /* "_pynini.pyx":2044 + /* "_pynini.pyx":2060 * else: * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst _fst = _compile_or_copy_Fst(fst) # <<<<<<<<<<<<<< * self._paths.reset( * new StringPathIteratorClass(deref(_fst._fst), */ - __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_fst, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v__fst = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2045 + /* "_pynini.pyx":2061 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst _fst = _compile_or_copy_Fst(fst) * self._paths.reset( # <<<<<<<<<<<<<< @@ -30784,10 +31149,10 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2045, __pyx_L1_error) + __PYX_ERR(0, 2061, __pyx_L1_error) } - /* "_pynini.pyx":2046 + /* "_pynini.pyx":2062 * cdef Fst _fst = _compile_or_copy_Fst(fst) * self._paths.reset( * new StringPathIteratorClass(deref(_fst._fst), # <<<<<<<<<<<<<< @@ -30796,10 +31161,10 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ if (unlikely(((PyObject *)__pyx_v__fst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2046, __pyx_L1_error) + __PYX_ERR(0, 2062, __pyx_L1_error) } - /* "_pynini.pyx":2045 + /* "_pynini.pyx":2061 * _output_token_type = _get_token_type(tostring(output_token_type)) * cdef Fst _fst = _compile_or_copy_Fst(fst) * self._paths.reset( # <<<<<<<<<<<<<< @@ -30808,7 +31173,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ __pyx_v_self->_paths.reset(new fst::script::StringPathIteratorClass((*__pyx_v__fst->__pyx_base.__pyx_base.__pyx_base._fst), __pyx_v__input_token_type, __pyx_v__output_token_type, __pyx_v__isymbols, __pyx_v__osymbols)); - /* "_pynini.pyx":2051 + /* "_pynini.pyx":2067 * _isymbols, * _osymbols)) * if self._paths.get().Error(): # <<<<<<<<<<<<<< @@ -30817,19 +31182,19 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2051, __pyx_L1_error) + __PYX_ERR(0, 2067, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_paths.get()->Error() != 0); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":2052 + /* "_pynini.pyx":2068 * _osymbols)) * if self._paths.get().Error(): * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * * cpdef bool done(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -30849,15 +31214,15 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_kp_u_Operation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error) + 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_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2052, __pyx_L1_error) + __PYX_ERR(0, 2068, __pyx_L1_error) - /* "_pynini.pyx":2051 + /* "_pynini.pyx":2067 * _isymbols, * _osymbols)) * if self._paths.get().Error(): # <<<<<<<<<<<<<< @@ -30866,7 +31231,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ */ } - /* "_pynini.pyx":2023 + /* "_pynini.pyx":2039 * return f"<{self.__class__.__name__} at 0x{id(self):x}>" * * def __init__(self, fst, input_token_type=None, output_token_type=None): # <<<<<<<<<<<<<< @@ -30889,7 +31254,7 @@ static int __pyx_pf_7_pynini_19_StringPathIterator_2__init__(struct __pyx_obj_7_ return __pyx_r; } -/* "_pynini.pyx":2054 +/* "_pynini.pyx":2070 * raise FstOpError("Operation failed") * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -30926,7 +31291,7 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_done(struct __pyx_obj_7_pynin if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __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, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_5done)) { __Pyx_INCREF(__pyx_t_1); @@ -30948,11 +31313,11 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_done(struct __pyx_obj_7_pynin PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2054, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2070, __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; @@ -30971,7 +31336,7 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_done(struct __pyx_obj_7_pynin #endif } - /* "_pynini.pyx":2063 + /* "_pynini.pyx":2079 * True if the iterator is exhausted, False otherwise. * """ * return self._paths.get().Done() # <<<<<<<<<<<<<< @@ -30980,12 +31345,12 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_done(struct __pyx_obj_7_pynin */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2063, __pyx_L1_error) + __PYX_ERR(0, 2079, __pyx_L1_error) } __pyx_r = __pyx_v_self->_paths.get()->Done(); goto __pyx_L0; - /* "_pynini.pyx":2054 + /* "_pynini.pyx":2070 * raise FstOpError("Operation failed") * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -31058,8 +31423,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_4done(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("done", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2054, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2070, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -31076,7 +31441,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_4done(struct __pyx_obj_ return __pyx_r; } -/* "_pynini.pyx":2065 +/* "_pynini.pyx":2081 * return self._paths.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -31113,7 +31478,7 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_error(struct __pyx_obj_7_pyni if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2065, __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, 2081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_7error)) { __Pyx_INCREF(__pyx_t_1); @@ -31135,11 +31500,11 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_error(struct __pyx_obj_7_pyni PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2065, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2081, __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; @@ -31158,7 +31523,7 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_error(struct __pyx_obj_7_pyni #endif } - /* "_pynini.pyx":2074 + /* "_pynini.pyx":2090 * True if the _StringPathIterator is in an errorful state, False otherwise. * """ * return self._paths.get().Error() # <<<<<<<<<<<<<< @@ -31167,12 +31532,12 @@ static bool __pyx_f_7_pynini_19_StringPathIterator_error(struct __pyx_obj_7_pyni */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2074, __pyx_L1_error) + __PYX_ERR(0, 2090, __pyx_L1_error) } __pyx_r = __pyx_v_self->_paths.get()->Error(); goto __pyx_L0; - /* "_pynini.pyx":2065 + /* "_pynini.pyx":2081 * return self._paths.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< @@ -31245,8 +31610,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_6error(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("error", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_error(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_error(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2081, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -31263,7 +31628,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_6error(struct __pyx_obj return __pyx_r; } -/* "_pynini.pyx":2076 +/* "_pynini.pyx":2092 * return self._paths.get().Error() * * def ilabels(self): # <<<<<<<<<<<<<< @@ -31322,7 +31687,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_8ilabels(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ilabels", 1); - /* "_pynini.pyx":2085 + /* "_pynini.pyx":2101 * A list of input labels for the current path. * """ * return self._paths.get().ILabels() # <<<<<<<<<<<<<< @@ -31332,15 +31697,15 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_8ilabels(struct __pyx_o __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2085, __pyx_L1_error) + __PYX_ERR(0, 2101, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->_paths.get()->ILabels()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->_paths.get()->ILabels()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":2076 + /* "_pynini.pyx":2092 * return self._paths.get().Error() * * def ilabels(self): # <<<<<<<<<<<<<< @@ -31359,7 +31724,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_8ilabels(struct __pyx_o return __pyx_r; } -/* "_pynini.pyx":2087 +/* "_pynini.pyx":2103 * return self._paths.get().ILabels() * * def olabels(self): # <<<<<<<<<<<<<< @@ -31418,7 +31783,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_10olabels(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("olabels", 1); - /* "_pynini.pyx":2096 + /* "_pynini.pyx":2112 * A list of output labels for the current path. * """ * return self._paths.get().OLabels() # <<<<<<<<<<<<<< @@ -31428,15 +31793,15 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_10olabels(struct __pyx_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2096, __pyx_L1_error) + __PYX_ERR(0, 2112, __pyx_L1_error) } - __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->_paths.get()->OLabels()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_vector_to_py_int64_t(__pyx_v_self->_paths.get()->OLabels()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":2087 + /* "_pynini.pyx":2103 * return self._paths.get().ILabels() * * def olabels(self): # <<<<<<<<<<<<<< @@ -31455,7 +31820,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_10olabels(struct __pyx_ return __pyx_r; } -/* "_pynini.pyx":2098 +/* "_pynini.pyx":2114 * return self._paths.get().OLabels() * * cpdef string istring(self): # <<<<<<<<<<<<<< @@ -31492,7 +31857,7 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_istring(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_istring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_istring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_13istring)) { __Pyx_INCREF(__pyx_t_1); @@ -31514,11 +31879,11 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_istring(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2098, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2114, __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; @@ -31537,7 +31902,7 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_istring(struct __pyx_o #endif } - /* "_pynini.pyx":2107 + /* "_pynini.pyx":2123 * The path's input string. * """ * return self._paths.get().IString() # <<<<<<<<<<<<<< @@ -31546,12 +31911,12 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_istring(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2107, __pyx_L1_error) + __PYX_ERR(0, 2123, __pyx_L1_error) } __pyx_r = __pyx_v_self->_paths.get()->IString(); goto __pyx_L0; - /* "_pynini.pyx":2098 + /* "_pynini.pyx":2114 * return self._paths.get().OLabels() * * cpdef string istring(self): # <<<<<<<<<<<<<< @@ -31624,8 +31989,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_12istring(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("istring", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_istring(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2098, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_istring(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2114, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -31643,7 +32008,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_12istring(struct __pyx_ } static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":2109 +/* "_pynini.pyx":2125 * return self._paths.get().IString() * * def istrings(self): # <<<<<<<<<<<<<< @@ -31705,7 +32070,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_14istrings(struct __pyx if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_9_istrings *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2109, __pyx_L1_error) + __PYX_ERR(0, 2125, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -31713,7 +32078,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_14istrings(struct __pyx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_16generator2, __pyx_codeobj__15, (PyObject *) __pyx_cur_scope, __pyx_n_s_istrings, __pyx_n_s_StringPathIterator_istrings, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2109, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_16generator2, __pyx_codeobj__15, (PyObject *) __pyx_cur_scope, __pyx_n_s_istrings, __pyx_n_s_StringPathIterator_istrings, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -31749,9 +32114,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2109, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2125, __pyx_L1_error) - /* "_pynini.pyx":2121 + /* "_pynini.pyx":2137 * All input strings. * """ * while not self._paths.get().Done(): # <<<<<<<<<<<<<< @@ -31761,12 +32126,12 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2121, __pyx_L1_error) + __PYX_ERR(0, 2137, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_cur_scope->__pyx_v_self->_paths.get()->Done() != 0)); if (!__pyx_t_1) break; - /* "_pynini.pyx":2122 + /* "_pynini.pyx":2138 * """ * while not self._paths.get().Done(): * yield self.istring() # <<<<<<<<<<<<<< @@ -31775,10 +32140,10 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "istring"); - __PYX_ERR(0, 2122, __pyx_L1_error) + __PYX_ERR(0, 2138, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->istring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2122, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->istring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2138, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -31789,9 +32154,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2122, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2138, __pyx_L1_error) - /* "_pynini.pyx":2123 + /* "_pynini.pyx":2139 * while not self._paths.get().Done(): * yield self.istring() * self._paths.get().Next() # <<<<<<<<<<<<<< @@ -31800,13 +32165,13 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2123, __pyx_L1_error) + __PYX_ERR(0, 2139, __pyx_L1_error) } __pyx_cur_scope->__pyx_v_self->_paths.get()->Next(); } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":2109 + /* "_pynini.pyx":2125 * return self._paths.get().IString() * * def istrings(self): # <<<<<<<<<<<<<< @@ -31833,7 +32198,7 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_16generator2(__pyx_Coro } static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":2125 +/* "_pynini.pyx":2141 * self._paths.get().Next() * * def items(self): # <<<<<<<<<<<<<< @@ -31849,7 +32214,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_7_pynini_19_StringPathIterator_17items, "\n items(self)\n\n Generates all (istring, ostring, weight) triples in the FST.\n\n This method returns a generator over all triples of input strings, \n output strings, and path weights. The caller is responsible for resetting\n the iterator if desired.\n\n Yields:\n All (istring, ostring, weight) triples.\n "); +PyDoc_STRVAR(__pyx_doc_7_pynini_19_StringPathIterator_17items, "\n items(self)\n\n Generates all (istring, ostring, weight) triples in the FST.\n\n This method returns a generator over all triples of input strings,\n output strings, and path weights. The caller is responsible for resetting\n the iterator if desired.\n\n Yields:\n All (istring, ostring, weight) triples.\n "); static PyMethodDef __pyx_mdef_7_pynini_19_StringPathIterator_18items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7_pynini_19_StringPathIterator_18items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7_pynini_19_StringPathIterator_17items}; static PyObject *__pyx_pw_7_pynini_19_StringPathIterator_18items(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL @@ -31895,7 +32260,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_17items(struct __pyx_ob if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_10_items *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2125, __pyx_L1_error) + __PYX_ERR(0, 2141, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -31903,7 +32268,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_17items(struct __pyx_ob __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_19generator3, __pyx_codeobj__16, (PyObject *) __pyx_cur_scope, __pyx_n_s_items, __pyx_n_s_StringPathIterator_items, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_19generator3, __pyx_codeobj__16, (PyObject *) __pyx_cur_scope, __pyx_n_s_items, __pyx_n_s_StringPathIterator_items, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -31942,9 +32307,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2125, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2141, __pyx_L1_error) - /* "_pynini.pyx":2138 + /* "_pynini.pyx":2154 * All (istring, ostring, weight) triples. * """ * while not self._paths.get().Done(): # <<<<<<<<<<<<<< @@ -31954,12 +32319,12 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2138, __pyx_L1_error) + __PYX_ERR(0, 2154, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_cur_scope->__pyx_v_self->_paths.get()->Done() != 0)); if (!__pyx_t_1) break; - /* "_pynini.pyx":2139 + /* "_pynini.pyx":2155 * """ * while not self._paths.get().Done(): * yield (self.istring(), self.ostring(), self.weight()) # <<<<<<<<<<<<<< @@ -31968,32 +32333,32 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "istring"); - __PYX_ERR(0, 2139, __pyx_L1_error) + __PYX_ERR(0, 2155, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->istring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2139, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->istring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2155, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ostring"); - __PYX_ERR(0, 2139, __pyx_L1_error) + __PYX_ERR(0, 2155, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->ostring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2139, __pyx_L1_error) - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->ostring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2155, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight"); - __PYX_ERR(0, 2139, __pyx_L1_error) + __PYX_ERR(0, 2155, __pyx_L1_error) } - __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->weight(__pyx_cur_scope->__pyx_v_self, 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2139, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->weight(__pyx_cur_scope->__pyx_v_self, 0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2139, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 2155, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 2155, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5)) __PYX_ERR(0, 2139, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5)) __PYX_ERR(0, 2155, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; @@ -32006,9 +32371,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2139, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2155, __pyx_L1_error) - /* "_pynini.pyx":2140 + /* "_pynini.pyx":2156 * while not self._paths.get().Done(): * yield (self.istring(), self.ostring(), self.weight()) * self._paths.get().Next() # <<<<<<<<<<<<<< @@ -32017,13 +32382,13 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2140, __pyx_L1_error) + __PYX_ERR(0, 2156, __pyx_L1_error) } __pyx_cur_scope->__pyx_v_self->_paths.get()->Next(); } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":2125 + /* "_pynini.pyx":2141 * self._paths.get().Next() * * def items(self): # <<<<<<<<<<<<<< @@ -32052,7 +32417,7 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_19generator3(__pyx_Coro return __pyx_r; } -/* "_pynini.pyx":2142 +/* "_pynini.pyx":2158 * self._paths.get().Next() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -32087,7 +32452,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_next(struct __pyx_obj_7_pynin if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2142, __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, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_21next)) { __Pyx_INCREF(__pyx_t_1); @@ -32109,7 +32474,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_next(struct __pyx_obj_7_pynin PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2142, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -32130,7 +32495,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_next(struct __pyx_obj_7_pynin #endif } - /* "_pynini.pyx":2148 + /* "_pynini.pyx":2164 * Advances the iterator. * """ * self._paths.get().Next() # <<<<<<<<<<<<<< @@ -32139,11 +32504,11 @@ static void __pyx_f_7_pynini_19_StringPathIterator_next(struct __pyx_obj_7_pynin */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2148, __pyx_L1_error) + __PYX_ERR(0, 2164, __pyx_L1_error) } __pyx_v_self->_paths.get()->Next(); - /* "_pynini.pyx":2142 + /* "_pynini.pyx":2158 * self._paths.get().Next() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -32214,8 +32579,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_20next(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_19_StringPathIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2142, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2142, __pyx_L1_error) + __pyx_f_7_pynini_19_StringPathIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32232,7 +32597,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_20next(struct __pyx_obj return __pyx_r; } -/* "_pynini.pyx":2150 +/* "_pynini.pyx":2166 * self._paths.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -32267,7 +32632,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_reset(struct __pyx_obj_7_pyni if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2150, __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, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_23reset)) { __Pyx_INCREF(__pyx_t_1); @@ -32289,7 +32654,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_reset(struct __pyx_obj_7_pyni PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2150, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -32310,7 +32675,7 @@ static void __pyx_f_7_pynini_19_StringPathIterator_reset(struct __pyx_obj_7_pyni #endif } - /* "_pynini.pyx":2156 + /* "_pynini.pyx":2172 * Resets the iterator to the initial position. * """ * self._paths.get().Reset() # <<<<<<<<<<<<<< @@ -32319,11 +32684,11 @@ static void __pyx_f_7_pynini_19_StringPathIterator_reset(struct __pyx_obj_7_pyni */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2156, __pyx_L1_error) + __PYX_ERR(0, 2172, __pyx_L1_error) } __pyx_v_self->_paths.get()->Reset(); - /* "_pynini.pyx":2150 + /* "_pynini.pyx":2166 * self._paths.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -32394,8 +32759,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_22reset(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_19_StringPathIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_f_7_pynini_19_StringPathIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2166, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32412,7 +32777,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_22reset(struct __pyx_ob return __pyx_r; } -/* "_pynini.pyx":2158 +/* "_pynini.pyx":2174 * self._paths.get().Reset() * * cpdef string ostring(self): # <<<<<<<<<<<<<< @@ -32449,7 +32814,7 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_ostring(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_25ostring)) { __Pyx_INCREF(__pyx_t_1); @@ -32471,11 +32836,11 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_ostring(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2174, __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; @@ -32494,7 +32859,7 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_ostring(struct __pyx_o #endif } - /* "_pynini.pyx":2167 + /* "_pynini.pyx":2183 * The path's output string. * """ * return self._paths.get().OString() # <<<<<<<<<<<<<< @@ -32503,12 +32868,12 @@ static std::string __pyx_f_7_pynini_19_StringPathIterator_ostring(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2167, __pyx_L1_error) + __PYX_ERR(0, 2183, __pyx_L1_error) } __pyx_r = __pyx_v_self->_paths.get()->OString(); goto __pyx_L0; - /* "_pynini.pyx":2158 + /* "_pynini.pyx":2174 * self._paths.get().Reset() * * cpdef string ostring(self): # <<<<<<<<<<<<<< @@ -32581,8 +32946,8 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_24ostring(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ostring", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_ostring(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2158, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_19_StringPathIterator_ostring(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -32600,7 +32965,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_24ostring(struct __pyx_ } static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":2169 +/* "_pynini.pyx":2185 * return self._paths.get().OString() * * def ostrings(self): # <<<<<<<<<<<<<< @@ -32662,7 +33027,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_26ostrings(struct __pyx if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_11_ostrings *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2169, __pyx_L1_error) + __PYX_ERR(0, 2185, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -32670,7 +33035,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_26ostrings(struct __pyx __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_28generator4, __pyx_codeobj__17, (PyObject *) __pyx_cur_scope, __pyx_n_s_ostrings, __pyx_n_s_StringPathIterator_ostrings, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2169, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_28generator4, __pyx_codeobj__17, (PyObject *) __pyx_cur_scope, __pyx_n_s_ostrings, __pyx_n_s_StringPathIterator_ostrings, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2185, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -32706,9 +33071,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2169, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2185, __pyx_L1_error) - /* "_pynini.pyx":2181 + /* "_pynini.pyx":2197 * All output strings. * """ * while not self._paths.get().Done(): # <<<<<<<<<<<<<< @@ -32718,12 +33083,12 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2181, __pyx_L1_error) + __PYX_ERR(0, 2197, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_cur_scope->__pyx_v_self->_paths.get()->Done() != 0)); if (!__pyx_t_1) break; - /* "_pynini.pyx":2182 + /* "_pynini.pyx":2198 * """ * while not self._paths.get().Done(): * yield self.ostring() # <<<<<<<<<<<<<< @@ -32732,10 +33097,10 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "ostring"); - __PYX_ERR(0, 2182, __pyx_L1_error) + __PYX_ERR(0, 2198, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->ostring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2182, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2182, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->ostring(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -32746,9 +33111,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2182, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2198, __pyx_L1_error) - /* "_pynini.pyx":2183 + /* "_pynini.pyx":2199 * while not self._paths.get().Done(): * yield self.ostring() * self._paths.get().Next() # <<<<<<<<<<<<<< @@ -32757,13 +33122,13 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2183, __pyx_L1_error) + __PYX_ERR(0, 2199, __pyx_L1_error) } __pyx_cur_scope->__pyx_v_self->_paths.get()->Next(); } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":2169 + /* "_pynini.pyx":2185 * return self._paths.get().OString() * * def ostrings(self): # <<<<<<<<<<<<<< @@ -32789,7 +33154,7 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_28generator4(__pyx_Coro return __pyx_r; } -/* "_pynini.pyx":2185 +/* "_pynini.pyx":2201 * self._paths.get().Next() * * cpdef _Weight weight(self): # <<<<<<<<<<<<<< @@ -32826,7 +33191,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_7_pynini_19_StringPathItera if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_19_StringPathIterator_30weight)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -32849,11 +33214,11 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_7_pynini_19_StringPathItera PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2201, __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_10_pywrapfst_Weight))))) __PYX_ERR(0, 2185, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Weight))))) __PYX_ERR(0, 2201, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -32872,20 +33237,20 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_7_pynini_19_StringPathItera #endif } - /* "_pynini.pyx":2194 + /* "_pynini.pyx":2210 * The path's Weight. * """ * cdef _Weight weight = _Weight.__new__(_Weight) # <<<<<<<<<<<<<< * weight._weight.reset(new WeightClass(self._paths.get().Weight())) * return weight */ - __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2194, __pyx_L1_error) + __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Weight)))) __PYX_ERR(0, 2194, __pyx_L1_error) + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_10_pywrapfst_Weight)))) __PYX_ERR(0, 2210, __pyx_L1_error) __pyx_v_weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":2195 + /* "_pynini.pyx":2211 * """ * cdef _Weight weight = _Weight.__new__(_Weight) * weight._weight.reset(new WeightClass(self._paths.get().Weight())) # <<<<<<<<<<<<<< @@ -32894,15 +33259,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_7_pynini_19_StringPathItera */ if (unlikely(((PyObject *)__pyx_v_weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 2195, __pyx_L1_error) + __PYX_ERR(0, 2211, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2195, __pyx_L1_error) + __PYX_ERR(0, 2211, __pyx_L1_error) } __pyx_v_weight->_weight.reset(new fst::script::WeightClass(__pyx_v_self->_paths.get()->Weight())); - /* "_pynini.pyx":2196 + /* "_pynini.pyx":2212 * cdef _Weight weight = _Weight.__new__(_Weight) * weight._weight.reset(new WeightClass(self._paths.get().Weight())) * return weight # <<<<<<<<<<<<<< @@ -32914,7 +33279,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_7_pynini_19_StringPathItera __pyx_r = __pyx_v_weight; goto __pyx_L0; - /* "_pynini.pyx":2185 + /* "_pynini.pyx":2201 * self._paths.get().Next() * * cpdef _Weight weight(self): # <<<<<<<<<<<<<< @@ -32988,7 +33353,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_29weight(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("weight", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_19_StringPathIterator_weight(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_19_StringPathIterator_weight(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33006,7 +33371,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_29weight(struct __pyx_o } static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pynini.pyx":2198 +/* "_pynini.pyx":2214 * return weight * * def weights(self): # <<<<<<<<<<<<<< @@ -33068,7 +33433,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_31weights(struct __pyx_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_12_weights *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2198, __pyx_L1_error) + __PYX_ERR(0, 2214, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -33076,7 +33441,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_31weights(struct __pyx_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_33generator5, __pyx_codeobj__18, (PyObject *) __pyx_cur_scope, __pyx_n_s_weights, __pyx_n_s_StringPathIterator_weights, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7_pynini_19_StringPathIterator_33generator5, __pyx_codeobj__18, (PyObject *) __pyx_cur_scope, __pyx_n_s_weights, __pyx_n_s_StringPathIterator_weights, __pyx_n_s_pynini); if (unlikely(!gen)) __PYX_ERR(0, 2214, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -33111,9 +33476,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_Coro return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2198, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2214, __pyx_L1_error) - /* "_pynini.pyx":2210 + /* "_pynini.pyx":2226 * All weights. * """ * while not self._paths.get().Done(): # <<<<<<<<<<<<<< @@ -33123,12 +33488,12 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_Coro while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2210, __pyx_L1_error) + __PYX_ERR(0, 2226, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_cur_scope->__pyx_v_self->_paths.get()->Done() != 0)); if (!__pyx_t_1) break; - /* "_pynini.pyx":2211 + /* "_pynini.pyx":2227 * """ * while not self._paths.get().Done(): * yield self.weight() # <<<<<<<<<<<<<< @@ -33137,9 +33502,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight"); - __PYX_ERR(0, 2211, __pyx_L1_error) + __PYX_ERR(0, 2227, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->weight(__pyx_cur_scope->__pyx_v_self, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini__StringPathIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->weight(__pyx_cur_scope->__pyx_v_self, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -33150,9 +33515,9 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_Coro __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2211, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2227, __pyx_L1_error) - /* "_pynini.pyx":2212 + /* "_pynini.pyx":2228 * while not self._paths.get().Done(): * yield self.weight() * self._paths.get().Next() # <<<<<<<<<<<<<< @@ -33161,13 +33526,13 @@ static PyObject *__pyx_gb_7_pynini_19_StringPathIterator_33generator5(__pyx_Coro */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_paths"); - __PYX_ERR(0, 2212, __pyx_L1_error) + __PYX_ERR(0, 2228, __pyx_L1_error) } __pyx_cur_scope->__pyx_v_self->_paths.get()->Next(); } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pynini.pyx":2198 + /* "_pynini.pyx":2214 * return weight * * def weights(self): # <<<<<<<<<<<<<< @@ -33407,7 +33772,7 @@ static PyObject *__pyx_pf_7_pynini_19_StringPathIterator_36__setstate_cython__(C return __pyx_r; } -/* "_pynini.pyx":2243 +/* "_pynini.pyx":2259 * # Instances holds either a FarReader or a FarWriter. * * def __init__(self, # <<<<<<<<<<<<<< @@ -33463,33 +33828,33 @@ static int __pyx_pw_7_pynini_3Far_1__init__(PyObject *__pyx_v_self, PyObject *__ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2259, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2259, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2259, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_far_type); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2243, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2259, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2243, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2259, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -33511,7 +33876,7 @@ static int __pyx_pw_7_pynini_3Far_1__init__(PyObject *__pyx_v_self, PyObject *__ } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2243, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 2259, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33553,35 +33918,35 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pynini.pyx":2248 + /* "_pynini.pyx":2264 * arc_type="standard", * far_type="default"): * self._name = path_tostring(filename) # <<<<<<<<<<<<<< * self._mode = tostring(mode)[0] * if self._mode == b"r": */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2248, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_filename); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2264, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name"); - __PYX_ERR(0, 2248, __pyx_L1_error) + __PYX_ERR(0, 2264, __pyx_L1_error) } __pyx_v_self->_name = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pynini.pyx":2249 + /* "_pynini.pyx":2265 * far_type="default"): * self._name = path_tostring(filename) * self._mode = tostring(mode)[0] # <<<<<<<<<<<<<< * if self._mode == b"r": * self._reader = FarReader.open(self._name) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_mode); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2249, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_mode); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2265, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2249, __pyx_L1_error) + __PYX_ERR(0, 2265, __pyx_L1_error) } __pyx_v_self->_mode = (__pyx_t_1[0]); - /* "_pynini.pyx":2250 + /* "_pynini.pyx":2266 * self._name = path_tostring(filename) * self._mode = tostring(mode)[0] * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -33590,25 +33955,25 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2250, __pyx_L1_error) + __PYX_ERR(0, 2266, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_mode == 'r'); if (__pyx_t_2) { - /* "_pynini.pyx":2251 + /* "_pynini.pyx":2267 * self._mode = tostring(mode)[0] * if self._mode == b"r": * self._reader = FarReader.open(self._name) # <<<<<<<<<<<<<< * elif self._mode == b"w": * self._writer = FarWriter.create(self._name, */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10_pywrapfst_FarReader), __pyx_n_s_open); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10_pywrapfst_FarReader), __pyx_n_s_open); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name"); - __PYX_ERR(0, 2251, __pyx_L1_error) + __PYX_ERR(0, 2267, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -33629,14 +33994,14 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2251, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_FarReader))))) __PYX_ERR(0, 2251, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_FarReader))))) __PYX_ERR(0, 2267, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2251, __pyx_L1_error) + __PYX_ERR(0, 2267, __pyx_L1_error) } __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF((PyObject *)__pyx_v_self->_reader); @@ -33644,7 +34009,7 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ __pyx_v_self->_reader = ((struct __pyx_obj_10_pywrapfst_FarReader *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":2250 + /* "_pynini.pyx":2266 * self._name = path_tostring(filename) * self._mode = tostring(mode)[0] * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -33654,7 +34019,7 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ goto __pyx_L3; } - /* "_pynini.pyx":2252 + /* "_pynini.pyx":2268 * if self._mode == b"r": * self._reader = FarReader.open(self._name) * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -33663,68 +34028,68 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2252, __pyx_L1_error) + __PYX_ERR(0, 2268, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_mode == 'w'); if (likely(__pyx_t_2)) { - /* "_pynini.pyx":2253 + /* "_pynini.pyx":2269 * self._reader = FarReader.open(self._name) * elif self._mode == b"w": * self._writer = FarWriter.create(self._name, # <<<<<<<<<<<<<< * arc_type=arc_type, * far_type=far_type) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter), __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter), __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name"); - __PYX_ERR(0, 2253, __pyx_L1_error) + __PYX_ERR(0, 2269, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 2253, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 2269, __pyx_L1_error); __pyx_t_4 = 0; - /* "_pynini.pyx":2254 + /* "_pynini.pyx":2270 * elif self._mode == b"w": * self._writer = FarWriter.create(self._name, * arc_type=arc_type, # <<<<<<<<<<<<<< * far_type=far_type) * else: */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2254, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 2254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_arc_type, __pyx_v_arc_type) < 0) __PYX_ERR(0, 2270, __pyx_L1_error) - /* "_pynini.pyx":2255 + /* "_pynini.pyx":2271 * self._writer = FarWriter.create(self._name, * arc_type=arc_type, * far_type=far_type) # <<<<<<<<<<<<<< * else: * raise FstArgError(f"Unknown mode: {mode}") */ - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_far_type, __pyx_v_far_type) < 0) __PYX_ERR(0, 2254, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_far_type, __pyx_v_far_type) < 0) __PYX_ERR(0, 2270, __pyx_L1_error) - /* "_pynini.pyx":2253 + /* "_pynini.pyx":2269 * self._reader = FarReader.open(self._name) * elif self._mode == b"w": * self._writer = FarWriter.create(self._name, # <<<<<<<<<<<<<< * arc_type=arc_type, * far_type=far_type) */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_FarWriter))))) __PYX_ERR(0, 2253, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_FarWriter))))) __PYX_ERR(0, 2269, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2253, __pyx_L1_error) + __PYX_ERR(0, 2269, __pyx_L1_error) } __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF((PyObject *)__pyx_v_self->_writer); @@ -33732,7 +34097,7 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ __pyx_v_self->_writer = ((struct __pyx_obj_10_pywrapfst_FarWriter *)__pyx_t_6); __pyx_t_6 = 0; - /* "_pynini.pyx":2252 + /* "_pynini.pyx":2268 * if self._mode == b"r": * self._reader = FarReader.open(self._name) * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -33742,7 +34107,7 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ goto __pyx_L3; } - /* "_pynini.pyx":2257 + /* "_pynini.pyx":2273 * far_type=far_type) * else: * raise FstArgError(f"Unknown mode: {mode}") # <<<<<<<<<<<<<< @@ -33750,11 +34115,11 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ * def __repr__(self): */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2257, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2257, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_mode, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2257, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_mode, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -33776,17 +34141,17 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2257, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 2257, __pyx_L1_error) + __PYX_ERR(0, 2273, __pyx_L1_error) } __pyx_L3:; - /* "_pynini.pyx":2243 + /* "_pynini.pyx":2259 * # Instances holds either a FarReader or a FarWriter. * * def __init__(self, # <<<<<<<<<<<<<< @@ -33809,7 +34174,7 @@ static int __pyx_pf_7_pynini_3Far___init__(struct __pyx_obj_7_pynini_Far *__pyx_ return __pyx_r; } -/* "_pynini.pyx":2259 +/* "_pynini.pyx":2275 * raise FstArgError(f"Unknown mode: {mode}") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -33846,7 +34211,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pynini.pyx":2260 + /* "_pynini.pyx":2276 * * def __repr__(self): * return (f"<{self.far_type()} Far {self._name}, " # <<<<<<<<<<<<<< @@ -33854,7 +34219,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2260, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -33864,10 +34229,10 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__11); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type"); - __PYX_ERR(0, 2260, __pyx_L1_error) + __PYX_ERR(0, 2276, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2260, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->far_type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2276, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -33880,9 +34245,9 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Far); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name"); - __PYX_ERR(0, 2260, __pyx_L1_error) + __PYX_ERR(0, 2276, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_self->_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -33894,7 +34259,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far __Pyx_GIVEREF(__pyx_kp_u_mode_2); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_mode_2); - /* "_pynini.pyx":2261 + /* "_pynini.pyx":2277 * def __repr__(self): * return (f"<{self.far_type()} Far {self._name}, " * f"mode '{self._mode:c}' at 0x{id(self):x}>") # <<<<<<<<<<<<<< @@ -33903,11 +34268,11 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2261, __pyx_L1_error) + __PYX_ERR(0, 2277, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_From_char(__pyx_v_self->_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_char(__pyx_v_self->_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -33919,9 +34284,9 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far __pyx_t_2 += 7; __Pyx_GIVEREF(__pyx_kp_u_at_0x_2); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_at_0x_2); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2261, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -33934,21 +34299,21 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__3); - /* "_pynini.pyx":2260 + /* "_pynini.pyx":2276 * * def __repr__(self): * return (f"<{self.far_type()} Far {self._name}, " # <<<<<<<<<<<<<< * f"mode '{self._mode:c}' at 0x{id(self):x}>") * */ - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pynini.pyx":2259 + /* "_pynini.pyx":2275 * raise FstArgError(f"Unknown mode: {mode}") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -33969,7 +34334,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_2__repr__(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2263 +/* "_pynini.pyx":2279 * f"mode '{self._mode:c}' at 0x{id(self):x}>") * * cdef void _check_open(self) except *: # <<<<<<<<<<<<<< @@ -33987,7 +34352,7 @@ static void __pyx_f_7_pynini_3Far__check_open(struct __pyx_obj_7_pynini_Far *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_open", 1); - /* "_pynini.pyx":2264 + /* "_pynini.pyx":2280 * * cdef void _check_open(self) except *: * if self.closed(): # <<<<<<<<<<<<<< @@ -33996,26 +34361,26 @@ static void __pyx_f_7_pynini_3Far__check_open(struct __pyx_obj_7_pynini_Far *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "closed"); - __PYX_ERR(0, 2264, __pyx_L1_error) + __PYX_ERR(0, 2280, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->closed(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2264, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->closed(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "_pynini.pyx":2265 + /* "_pynini.pyx":2281 * cdef void _check_open(self) except *: * if self.closed(): * raise ValueError("I/O operation on closed FAR") # <<<<<<<<<<<<<< * * cdef void _check_mode(self, char mode) except *: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2265, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2265, __pyx_L1_error) + __PYX_ERR(0, 2281, __pyx_L1_error) - /* "_pynini.pyx":2264 + /* "_pynini.pyx":2280 * * cdef void _check_open(self) except *: * if self.closed(): # <<<<<<<<<<<<<< @@ -34024,7 +34389,7 @@ static void __pyx_f_7_pynini_3Far__check_open(struct __pyx_obj_7_pynini_Far *__p */ } - /* "_pynini.pyx":2263 + /* "_pynini.pyx":2279 * f"mode '{self._mode:c}' at 0x{id(self):x}>") * * cdef void _check_open(self) except *: # <<<<<<<<<<<<<< @@ -34041,7 +34406,7 @@ static void __pyx_f_7_pynini_3Far__check_open(struct __pyx_obj_7_pynini_Far *__p __Pyx_RefNannyFinishContext(); } -/* "_pynini.pyx":2267 +/* "_pynini.pyx":2283 * raise ValueError("I/O operation on closed FAR") * * cdef void _check_mode(self, char mode) except *: # <<<<<<<<<<<<<< @@ -34062,7 +34427,7 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_mode", 1); - /* "_pynini.pyx":2268 + /* "_pynini.pyx":2284 * * cdef void _check_mode(self, char mode) except *: * self._check_open() # <<<<<<<<<<<<<< @@ -34071,11 +34436,11 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_open"); - __PYX_ERR(0, 2268, __pyx_L1_error) + __PYX_ERR(0, 2284, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2284, __pyx_L1_error) - /* "_pynini.pyx":2269 + /* "_pynini.pyx":2285 * cdef void _check_mode(self, char mode) except *: * self._check_open() * if not self._mode == mode: # <<<<<<<<<<<<<< @@ -34084,25 +34449,25 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2269, __pyx_L1_error) + __PYX_ERR(0, 2285, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mode == __pyx_v_mode)); if (unlikely(__pyx_t_1)) { - /* "_pynini.pyx":2270 + /* "_pynini.pyx":2286 * self._check_open() * if not self._mode == mode: * raise io.UnsupportedOperation( # <<<<<<<<<<<<<< * f"not {'readable' if mode == b'r' else 'writable'}") * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_io); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2270, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_io); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":2271 + /* "_pynini.pyx":2287 * if not self._mode == mode: * raise io.UnsupportedOperation( * f"not {'readable' if mode == b'r' else 'writable'}") # <<<<<<<<<<<<<< @@ -34117,10 +34482,10 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p __Pyx_INCREF(__pyx_n_u_writable); __pyx_t_3 = __pyx_n_u_writable; } - __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2271, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2271, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -34142,15 +34507,15 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2270, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2270, __pyx_L1_error) + __PYX_ERR(0, 2286, __pyx_L1_error) - /* "_pynini.pyx":2269 + /* "_pynini.pyx":2285 * cdef void _check_mode(self, char mode) except *: * self._check_open() * if not self._mode == mode: # <<<<<<<<<<<<<< @@ -34159,7 +34524,7 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p */ } - /* "_pynini.pyx":2267 + /* "_pynini.pyx":2283 * raise ValueError("I/O operation on closed FAR") * * cdef void _check_mode(self, char mode) except *: # <<<<<<<<<<<<<< @@ -34179,7 +34544,7 @@ static void __pyx_f_7_pynini_3Far__check_mode(struct __pyx_obj_7_pynini_Far *__p __Pyx_RefNannyFinishContext(); } -/* "_pynini.pyx":2275 +/* "_pynini.pyx":2291 * # API shared between FarReader and FarWriter. * * cpdef bool error(self) except *: # <<<<<<<<<<<<<< @@ -34217,7 +34582,7 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2275, __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, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_5error)) { __Pyx_INCREF(__pyx_t_1); @@ -34239,11 +34604,11 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2275, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2291, __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; @@ -34262,7 +34627,7 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s #endif } - /* "_pynini.pyx":2284 + /* "_pynini.pyx":2300 * True if the FAR is in an errorful state, False otherwise. * """ * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -34271,12 +34636,12 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2284, __pyx_L1_error) + __PYX_ERR(0, 2300, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'r'); if (__pyx_t_7) { - /* "_pynini.pyx":2285 + /* "_pynini.pyx":2301 * """ * if self._mode == b"r": * return self._reader.error() # <<<<<<<<<<<<<< @@ -34285,17 +34650,17 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2285, __pyx_L1_error) + __PYX_ERR(0, 2301, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "error"); - __PYX_ERR(0, 2285, __pyx_L1_error) + __PYX_ERR(0, 2301, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->error(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2285, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->error(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2301, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2284 + /* "_pynini.pyx":2300 * True if the FAR is in an errorful state, False otherwise. * """ * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -34304,7 +34669,7 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ } - /* "_pynini.pyx":2286 + /* "_pynini.pyx":2302 * if self._mode == b"r": * return self._reader.error() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -34313,12 +34678,12 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2286, __pyx_L1_error) + __PYX_ERR(0, 2302, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'w'); if (__pyx_t_7) { - /* "_pynini.pyx":2287 + /* "_pynini.pyx":2303 * return self._reader.error() * elif self._mode == b"w": * return self._writer.error() # <<<<<<<<<<<<<< @@ -34327,17 +34692,17 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2287, __pyx_L1_error) + __PYX_ERR(0, 2303, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "error"); - __PYX_ERR(0, 2287, __pyx_L1_error) + __PYX_ERR(0, 2303, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->error(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2287, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->error(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2303, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2286 + /* "_pynini.pyx":2302 * if self._mode == b"r": * return self._reader.error() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -34346,7 +34711,7 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ } - /* "_pynini.pyx":2289 + /* "_pynini.pyx":2305 * return self._writer.error() * else: * return False # <<<<<<<<<<<<<< @@ -34358,7 +34723,7 @@ static bool __pyx_f_7_pynini_3Far_error(struct __pyx_obj_7_pynini_Far *__pyx_v_s goto __pyx_L0; } - /* "_pynini.pyx":2275 + /* "_pynini.pyx":2291 * # API shared between FarReader and FarWriter. * * cpdef bool error(self) except *: # <<<<<<<<<<<<<< @@ -34431,8 +34796,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_4error(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("error", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_error(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2275, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2275, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_error(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -34449,7 +34814,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_4error(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2291 +/* "_pynini.pyx":2307 * return False * * cpdef string arc_type(self) except *: # <<<<<<<<<<<<<< @@ -34487,7 +34852,7 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __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, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_7arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -34509,11 +34874,11 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2291, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2307, __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; @@ -34532,7 +34897,7 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far #endif } - /* "_pynini.pyx":2300 + /* "_pynini.pyx":2316 * ValueError: FAR is closed. * """ * self._check_open() # <<<<<<<<<<<<<< @@ -34541,11 +34906,11 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_open"); - __PYX_ERR(0, 2300, __pyx_L1_error) + __PYX_ERR(0, 2316, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2300, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2316, __pyx_L1_error) - /* "_pynini.pyx":2301 + /* "_pynini.pyx":2317 * """ * self._check_open() * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -34554,12 +34919,12 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2301, __pyx_L1_error) + __PYX_ERR(0, 2317, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'r'); if (__pyx_t_7) { - /* "_pynini.pyx":2302 + /* "_pynini.pyx":2318 * self._check_open() * if self._mode == b"r": * return self._reader.arc_type() # <<<<<<<<<<<<<< @@ -34568,17 +34933,17 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2302, __pyx_L1_error) + __PYX_ERR(0, 2318, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 2302, __pyx_L1_error) + __PYX_ERR(0, 2318, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->arc_type(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2302, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->arc_type(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2318, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2301 + /* "_pynini.pyx":2317 * """ * self._check_open() * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -34587,7 +34952,7 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ } - /* "_pynini.pyx":2303 + /* "_pynini.pyx":2319 * if self._mode == b"r": * return self._reader.arc_type() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -34596,12 +34961,12 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2303, __pyx_L1_error) + __PYX_ERR(0, 2319, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'w'); if (__pyx_t_7) { - /* "_pynini.pyx":2304 + /* "_pynini.pyx":2320 * return self._reader.arc_type() * elif self._mode == b"w": * return self._writer.arc_type() # <<<<<<<<<<<<<< @@ -34610,17 +34975,17 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2304, __pyx_L1_error) + __PYX_ERR(0, 2320, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 2304, __pyx_L1_error) + __PYX_ERR(0, 2320, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->arc_type(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2304, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->arc_type(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2320, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2303 + /* "_pynini.pyx":2319 * if self._mode == b"r": * return self._reader.arc_type() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -34629,7 +34994,7 @@ static std::string __pyx_f_7_pynini_3Far_arc_type(struct __pyx_obj_7_pynini_Far */ } - /* "_pynini.pyx":2291 + /* "_pynini.pyx":2307 * return False * * cpdef string arc_type(self) except *: # <<<<<<<<<<<<<< @@ -34704,8 +35069,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_6arc_type(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arc_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2291, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2307, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -34722,7 +35087,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_6arc_type(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2306 +/* "_pynini.pyx":2322 * return self._writer.arc_type() * * cpdef bool closed(self): # <<<<<<<<<<<<<< @@ -34759,7 +35124,7 @@ static bool __pyx_f_7_pynini_3Far_closed(struct __pyx_obj_7_pynini_Far *__pyx_v_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_9closed)) { __Pyx_INCREF(__pyx_t_1); @@ -34781,11 +35146,11 @@ static bool __pyx_f_7_pynini_3Far_closed(struct __pyx_obj_7_pynini_Far *__pyx_v_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2306, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2322, __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; @@ -34804,7 +35169,7 @@ static bool __pyx_f_7_pynini_3Far_closed(struct __pyx_obj_7_pynini_Far *__pyx_v_ #endif } - /* "_pynini.pyx":2312 + /* "_pynini.pyx":2328 * Indicates whether the FAR is closed for IO. * """ * return self._mode == b"c" # <<<<<<<<<<<<<< @@ -34813,12 +35178,12 @@ static bool __pyx_f_7_pynini_3Far_closed(struct __pyx_obj_7_pynini_Far *__pyx_v_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2312, __pyx_L1_error) + __PYX_ERR(0, 2328, __pyx_L1_error) } __pyx_r = (__pyx_v_self->_mode == 'c'); goto __pyx_L0; - /* "_pynini.pyx":2306 + /* "_pynini.pyx":2322 * return self._writer.arc_type() * * cpdef bool closed(self): # <<<<<<<<<<<<<< @@ -34891,8 +35256,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_8closed(struct __pyx_obj_7_pynini_Far *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("closed", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_closed(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2306, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_closed(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2322, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -34909,7 +35274,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_8closed(struct __pyx_obj_7_pynini_Far *_ return __pyx_r; } -/* "_pynini.pyx":2314 +/* "_pynini.pyx":2330 * return self._mode == b"c" * * cpdef string far_type(self) except *: # <<<<<<<<<<<<<< @@ -34947,7 +35312,7 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_far_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2314, __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, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_11far_type)) { __Pyx_INCREF(__pyx_t_1); @@ -34969,11 +35334,11 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2330, __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; @@ -34992,7 +35357,7 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far #endif } - /* "_pynini.pyx":2322 + /* "_pynini.pyx":2338 * ValueError: FAR is closed. * """ * self._check_open() # <<<<<<<<<<<<<< @@ -35001,11 +35366,11 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_open"); - __PYX_ERR(0, 2322, __pyx_L1_error) + __PYX_ERR(0, 2338, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2322, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_open(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2338, __pyx_L1_error) - /* "_pynini.pyx":2323 + /* "_pynini.pyx":2339 * """ * self._check_open() * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -35014,12 +35379,12 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2323, __pyx_L1_error) + __PYX_ERR(0, 2339, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'r'); if (__pyx_t_7) { - /* "_pynini.pyx":2324 + /* "_pynini.pyx":2340 * self._check_open() * if self._mode == b"r": * return self._reader.far_type() # <<<<<<<<<<<<<< @@ -35028,17 +35393,17 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2324, __pyx_L1_error) + __PYX_ERR(0, 2340, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type"); - __PYX_ERR(0, 2324, __pyx_L1_error) + __PYX_ERR(0, 2340, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->far_type(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2324, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->far_type(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2323 + /* "_pynini.pyx":2339 * """ * self._check_open() * if self._mode == b"r": # <<<<<<<<<<<<<< @@ -35047,7 +35412,7 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ } - /* "_pynini.pyx":2325 + /* "_pynini.pyx":2341 * if self._mode == b"r": * return self._reader.far_type() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -35056,12 +35421,12 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2325, __pyx_L1_error) + __PYX_ERR(0, 2341, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_mode == 'w'); if (__pyx_t_7) { - /* "_pynini.pyx":2326 + /* "_pynini.pyx":2342 * return self._reader.far_type() * elif self._mode == b"w": * return self._writer.far_type() # <<<<<<<<<<<<<< @@ -35070,17 +35435,17 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2326, __pyx_L1_error) + __PYX_ERR(0, 2342, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "far_type"); - __PYX_ERR(0, 2326, __pyx_L1_error) + __PYX_ERR(0, 2342, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->far_type(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2326, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->far_type(__pyx_v_self->_writer, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2342, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2325 + /* "_pynini.pyx":2341 * if self._mode == b"r": * return self._reader.far_type() * elif self._mode == b"w": # <<<<<<<<<<<<<< @@ -35089,7 +35454,7 @@ static std::string __pyx_f_7_pynini_3Far_far_type(struct __pyx_obj_7_pynini_Far */ } - /* "_pynini.pyx":2314 + /* "_pynini.pyx":2330 * return self._mode == b"c" * * cpdef string far_type(self) except *: # <<<<<<<<<<<<<< @@ -35164,8 +35529,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_10far_type(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("far_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_far_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2314, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_far_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2330, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -35182,7 +35547,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_10far_type(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2328 +/* "_pynini.pyx":2344 * return self._writer.far_type() * * cpdef string mode(self): # <<<<<<<<<<<<<< @@ -35219,7 +35584,7 @@ static std::string __pyx_f_7_pynini_3Far_mode(struct __pyx_obj_7_pynini_Far *__p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_13mode)) { __Pyx_INCREF(__pyx_t_1); @@ -35241,11 +35606,11 @@ static std::string __pyx_f_7_pynini_3Far_mode(struct __pyx_obj_7_pynini_Far *__p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2328, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2344, __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; @@ -35264,7 +35629,7 @@ static std::string __pyx_f_7_pynini_3Far_mode(struct __pyx_obj_7_pynini_Far *__p #endif } - /* "_pynini.pyx":2334 + /* "_pynini.pyx":2350 * Returns a char indicating the FAR's current mode. * """ * return f"{self._mode:c}" # <<<<<<<<<<<<<< @@ -35273,19 +35638,19 @@ static std::string __pyx_f_7_pynini_3Far_mode(struct __pyx_obj_7_pynini_Far *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2334, __pyx_L1_error) + __PYX_ERR(0, 2350, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_n_u_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_n_u_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2328 + /* "_pynini.pyx":2344 * return self._writer.far_type() * * cpdef string mode(self): # <<<<<<<<<<<<<< @@ -35358,8 +35723,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_12mode(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mode", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_mode(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2328, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_mode(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2344, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -35376,7 +35741,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_12mode(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2336 +/* "_pynini.pyx":2352 * return f"{self._mode:c}" * * cpdef string name(self): # <<<<<<<<<<<<<< @@ -35413,7 +35778,7 @@ static std::string __pyx_f_7_pynini_3Far_name(struct __pyx_obj_7_pynini_Far *__p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_15name)) { __Pyx_INCREF(__pyx_t_1); @@ -35435,11 +35800,11 @@ static std::string __pyx_f_7_pynini_3Far_name(struct __pyx_obj_7_pynini_Far *__p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2352, __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; @@ -35458,7 +35823,7 @@ static std::string __pyx_f_7_pynini_3Far_name(struct __pyx_obj_7_pynini_Far *__p #endif } - /* "_pynini.pyx":2342 + /* "_pynini.pyx":2358 * Returns the FAR's filename. * """ * return self._name # <<<<<<<<<<<<<< @@ -35467,12 +35832,12 @@ static std::string __pyx_f_7_pynini_3Far_name(struct __pyx_obj_7_pynini_Far *__p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_name"); - __PYX_ERR(0, 2342, __pyx_L1_error) + __PYX_ERR(0, 2358, __pyx_L1_error) } __pyx_r = __pyx_v_self->_name; goto __pyx_L0; - /* "_pynini.pyx":2336 + /* "_pynini.pyx":2352 * return f"{self._mode:c}" * * cpdef string name(self): # <<<<<<<<<<<<<< @@ -35545,8 +35910,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_14name(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("name", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2336, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2352, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -35563,7 +35928,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_14name(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2346 +/* "_pynini.pyx":2362 * # FarReader API. * * cpdef bool done(self) except *: # <<<<<<<<<<<<<< @@ -35600,7 +35965,7 @@ static bool __pyx_f_7_pynini_3Far_done(struct __pyx_obj_7_pynini_Far *__pyx_v_se if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2346, __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, 2362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_17done)) { __Pyx_INCREF(__pyx_t_1); @@ -35622,11 +35987,11 @@ static bool __pyx_f_7_pynini_3Far_done(struct __pyx_obj_7_pynini_Far *__pyx_v_se PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2346, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2346, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2362, __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; @@ -35645,7 +36010,7 @@ static bool __pyx_f_7_pynini_3Far_done(struct __pyx_obj_7_pynini_Far *__pyx_v_se #endif } - /* "_pynini.pyx":2359 + /* "_pynini.pyx":2375 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -35654,11 +36019,11 @@ static bool __pyx_f_7_pynini_3Far_done(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2359, __pyx_L1_error) + __PYX_ERR(0, 2375, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2359, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2375, __pyx_L1_error) - /* "_pynini.pyx":2360 + /* "_pynini.pyx":2376 * """ * self._check_mode(b"r") * return self._reader.done() # <<<<<<<<<<<<<< @@ -35667,17 +36032,17 @@ static bool __pyx_f_7_pynini_3Far_done(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2360, __pyx_L1_error) + __PYX_ERR(0, 2376, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 2360, __pyx_L1_error) + __PYX_ERR(0, 2376, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->done(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2360, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->done(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2376, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2346 + /* "_pynini.pyx":2362 * # FarReader API. * * cpdef bool done(self) except *: # <<<<<<<<<<<<<< @@ -35750,8 +36115,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_16done(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("done", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2346, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2346, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -35768,7 +36133,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_16done(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2362 +/* "_pynini.pyx":2378 * return self._reader.done() * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< @@ -35805,7 +36170,7 @@ static bool __pyx_f_7_pynini_3Far_find(struct __pyx_obj_7_pynini_Far *__pyx_v_se if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2362, __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, 2378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_19find)) { __Pyx_INCREF(__pyx_t_1); @@ -35827,11 +36192,11 @@ static bool __pyx_f_7_pynini_3Far_find(struct __pyx_obj_7_pynini_Far *__pyx_v_se PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2362, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2378, __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; @@ -35850,7 +36215,7 @@ static bool __pyx_f_7_pynini_3Far_find(struct __pyx_obj_7_pynini_Far *__pyx_v_se #endif } - /* "_pynini.pyx":2379 + /* "_pynini.pyx":2395 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -35859,11 +36224,11 @@ static bool __pyx_f_7_pynini_3Far_find(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2379, __pyx_L1_error) + __PYX_ERR(0, 2395, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2379, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2395, __pyx_L1_error) - /* "_pynini.pyx":2380 + /* "_pynini.pyx":2396 * """ * self._check_mode(b"r") * return self._reader.find(key) # <<<<<<<<<<<<<< @@ -35872,17 +36237,17 @@ static bool __pyx_f_7_pynini_3Far_find(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2380, __pyx_L1_error) + __PYX_ERR(0, 2396, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "find"); - __PYX_ERR(0, 2380, __pyx_L1_error) + __PYX_ERR(0, 2396, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->find(__pyx_v_self->_reader, __pyx_v_key, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->find(__pyx_v_self->_reader, __pyx_v_key, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2396, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2362 + /* "_pynini.pyx":2378 * return self._reader.done() * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< @@ -35957,12 +36322,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2362, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2378, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "find") < 0)) __PYX_ERR(0, 2362, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "find") < 0)) __PYX_ERR(0, 2378, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -35973,7 +36338,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2362, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2378, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36010,8 +36375,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_18find(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("find", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_find(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2362, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2362, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_find(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -36028,7 +36393,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_18find(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2382 +/* "_pynini.pyx":2398 * return self._reader.find(key) * * cpdef Fst get_fst(self): # <<<<<<<<<<<<<< @@ -36064,7 +36429,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __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, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_21get_fst)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -36087,11 +36452,11 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2382, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __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_7_pynini_Fst))))) __PYX_ERR(0, 2382, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 2398, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -36110,7 +36475,7 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx #endif } - /* "_pynini.pyx":2396 + /* "_pynini.pyx":2412 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -36119,11 +36484,11 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2396, __pyx_L1_error) + __PYX_ERR(0, 2412, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2396, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2412, __pyx_L1_error) - /* "_pynini.pyx":2397 + /* "_pynini.pyx":2413 * """ * self._check_mode(b"r") * return Fst.from_pywrapfst(self._reader.get_fst()) # <<<<<<<<<<<<<< @@ -36131,17 +36496,17 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx * cpdef string get_key(self) except *: */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2397, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2397, __pyx_L1_error) + __PYX_ERR(0, 2413, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_fst"); - __PYX_ERR(0, 2397, __pyx_L1_error) + __PYX_ERR(0, 2413, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->get_fst(__pyx_v_self->_reader, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2397, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->get_fst(__pyx_v_self->_reader, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -36162,16 +36527,16 @@ static struct __pyx_obj_7_pynini_Fst *__pyx_f_7_pynini_3Far_get_fst(struct __pyx __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2397, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 2397, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7_pynini_Fst))))) __PYX_ERR(0, 2413, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pynini.pyx":2382 + /* "_pynini.pyx":2398 * return self._reader.find(key) * * cpdef Fst get_fst(self): # <<<<<<<<<<<<<< @@ -36244,7 +36609,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_20get_fst(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_fst", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_3Far_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini_3Far_get_fst(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36261,7 +36626,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_20get_fst(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2399 +/* "_pynini.pyx":2415 * return Fst.from_pywrapfst(self._reader.get_fst()) * * cpdef string get_key(self) except *: # <<<<<<<<<<<<<< @@ -36298,7 +36663,7 @@ static std::string __pyx_f_7_pynini_3Far_get_key(struct __pyx_obj_7_pynini_Far * if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2399, __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, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_23get_key)) { __Pyx_INCREF(__pyx_t_1); @@ -36320,11 +36685,11 @@ static std::string __pyx_f_7_pynini_3Far_get_key(struct __pyx_obj_7_pynini_Far * PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2399, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2399, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2415, __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; @@ -36343,7 +36708,7 @@ static std::string __pyx_f_7_pynini_3Far_get_key(struct __pyx_obj_7_pynini_Far * #endif } - /* "_pynini.pyx":2412 + /* "_pynini.pyx":2428 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -36352,11 +36717,11 @@ static std::string __pyx_f_7_pynini_3Far_get_key(struct __pyx_obj_7_pynini_Far * */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2412, __pyx_L1_error) + __PYX_ERR(0, 2428, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2412, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2428, __pyx_L1_error) - /* "_pynini.pyx":2413 + /* "_pynini.pyx":2429 * """ * self._check_mode(b"r") * return self._reader.get_key() # <<<<<<<<<<<<<< @@ -36365,17 +36730,17 @@ static std::string __pyx_f_7_pynini_3Far_get_key(struct __pyx_obj_7_pynini_Far * */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2413, __pyx_L1_error) + __PYX_ERR(0, 2429, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_key"); - __PYX_ERR(0, 2413, __pyx_L1_error) + __PYX_ERR(0, 2429, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->get_key(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2413, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->get_key(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2429, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pynini.pyx":2399 + /* "_pynini.pyx":2415 * return Fst.from_pywrapfst(self._reader.get_fst()) * * cpdef string get_key(self) except *: # <<<<<<<<<<<<<< @@ -36448,8 +36813,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_22get_key(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_key", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_7_pynini_3Far_get_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2399, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2399, __pyx_L1_error) + __pyx_t_1 = __pyx_f_7_pynini_3Far_get_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2415, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -36466,7 +36831,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_22get_key(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2415 +/* "_pynini.pyx":2431 * return self._reader.get_key() * * cpdef void next(self) except *: # <<<<<<<<<<<<<< @@ -36501,7 +36866,7 @@ static void __pyx_f_7_pynini_3Far_next(struct __pyx_obj_7_pynini_Far *__pyx_v_se if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __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, 2431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_25next)) { __Pyx_INCREF(__pyx_t_1); @@ -36523,7 +36888,7 @@ static void __pyx_f_7_pynini_3Far_next(struct __pyx_obj_7_pynini_Far *__pyx_v_se PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -36544,7 +36909,7 @@ static void __pyx_f_7_pynini_3Far_next(struct __pyx_obj_7_pynini_Far *__pyx_v_se #endif } - /* "_pynini.pyx":2425 + /* "_pynini.pyx":2441 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -36553,11 +36918,11 @@ static void __pyx_f_7_pynini_3Far_next(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2425, __pyx_L1_error) + __PYX_ERR(0, 2441, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2425, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2441, __pyx_L1_error) - /* "_pynini.pyx":2426 + /* "_pynini.pyx":2442 * """ * self._check_mode(b"r") * self._reader.next() # <<<<<<<<<<<<<< @@ -36566,15 +36931,15 @@ static void __pyx_f_7_pynini_3Far_next(struct __pyx_obj_7_pynini_Far *__pyx_v_se */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2426, __pyx_L1_error) + __PYX_ERR(0, 2442, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 2426, __pyx_L1_error) + __PYX_ERR(0, 2442, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->next(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2426, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->next(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error) - /* "_pynini.pyx":2415 + /* "_pynini.pyx":2431 * return self._reader.get_key() * * cpdef void next(self) except *: # <<<<<<<<<<<<<< @@ -36645,8 +37010,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_24next(struct __pyx_obj_7_pynini_Far *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_3Far_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2415, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error) + __pyx_f_7_pynini_3Far_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2431, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36663,7 +37028,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_24next(struct __pyx_obj_7_pynini_Far *__ return __pyx_r; } -/* "_pynini.pyx":2428 +/* "_pynini.pyx":2444 * self._reader.next() * * cpdef void reset(self) except *: # <<<<<<<<<<<<<< @@ -36698,7 +37063,7 @@ static void __pyx_f_7_pynini_3Far_reset(struct __pyx_obj_7_pynini_Far *__pyx_v_s if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2428, __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, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_27reset)) { __Pyx_INCREF(__pyx_t_1); @@ -36720,7 +37085,7 @@ static void __pyx_f_7_pynini_3Far_reset(struct __pyx_obj_7_pynini_Far *__pyx_v_s PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2428, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -36741,7 +37106,7 @@ static void __pyx_f_7_pynini_3Far_reset(struct __pyx_obj_7_pynini_Far *__pyx_v_s #endif } - /* "_pynini.pyx":2438 + /* "_pynini.pyx":2454 * io.UnsupportedOperation: Cannot invoke method in current mode. * """ * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -36750,11 +37115,11 @@ static void __pyx_f_7_pynini_3Far_reset(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2438, __pyx_L1_error) + __PYX_ERR(0, 2454, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2438, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2454, __pyx_L1_error) - /* "_pynini.pyx":2439 + /* "_pynini.pyx":2455 * """ * self._check_mode(b"r") * self._reader.reset() # <<<<<<<<<<<<<< @@ -36763,15 +37128,15 @@ static void __pyx_f_7_pynini_3Far_reset(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2455, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reset"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2455, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->reset(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2439, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->reset(__pyx_v_self->_reader, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2455, __pyx_L1_error) - /* "_pynini.pyx":2428 + /* "_pynini.pyx":2444 * self._reader.next() * * cpdef void reset(self) except *: # <<<<<<<<<<<<<< @@ -36842,8 +37207,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_26reset(struct __pyx_obj_7_pynini_Far *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_3Far_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2428, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2428, __pyx_L1_error) + __pyx_f_7_pynini_3Far_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36860,7 +37225,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_26reset(struct __pyx_obj_7_pynini_Far *_ return __pyx_r; } -/* "_pynini.pyx":2441 +/* "_pynini.pyx":2457 * self._reader.reset() * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -36897,7 +37262,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 1); - /* "_pynini.pyx":2442 + /* "_pynini.pyx":2458 * * def __getitem__(self, key): * if self.get_key() == tostring(key) or self._reader.find(key): # <<<<<<<<<<<<<< @@ -36906,10 +37271,10 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_key"); - __PYX_ERR(0, 2442, __pyx_L1_error) + __PYX_ERR(0, 2458, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->get_key(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error) - __pyx_t_3 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->get_key(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 == __pyx_t_3); if (!__pyx_t_4) { } else { @@ -36918,19 +37283,19 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2442, __pyx_L1_error) + __PYX_ERR(0, 2458, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_reader) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "find"); - __PYX_ERR(0, 2442, __pyx_L1_error) + __PYX_ERR(0, 2458, __pyx_L1_error) } - __pyx_t_5 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->find(__pyx_v_self->_reader, __pyx_v_key, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2442, __pyx_L1_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_10_pywrapfst_FarReader *)__pyx_v_self->_reader->__pyx_vtab)->find(__pyx_v_self->_reader, __pyx_v_key, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (likely(__pyx_t_1)) { - /* "_pynini.pyx":2443 + /* "_pynini.pyx":2459 * def __getitem__(self, key): * if self.get_key() == tostring(key) or self._reader.find(key): * return self.get_fst() # <<<<<<<<<<<<<< @@ -36940,15 +37305,15 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get_fst"); - __PYX_ERR(0, 2443, __pyx_L1_error) + __PYX_ERR(0, 2459, __pyx_L1_error) } - __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->get_fst(__pyx_v_self, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "_pynini.pyx":2442 + /* "_pynini.pyx":2458 * * def __getitem__(self, key): * if self.get_key() == tostring(key) or self._reader.find(key): # <<<<<<<<<<<<<< @@ -36957,7 +37322,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ */ } - /* "_pynini.pyx":2445 + /* "_pynini.pyx":2461 * return self.get_fst() * else: * raise KeyError(key) # <<<<<<<<<<<<<< @@ -36965,14 +37330,14 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ * def __next__(self): */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2445, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 2445, __pyx_L1_error) + __PYX_ERR(0, 2461, __pyx_L1_error) } - /* "_pynini.pyx":2441 + /* "_pynini.pyx":2457 * self._reader.reset() * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -36991,7 +37356,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_28__getitem__(struct __pyx_obj_7_pynini_ return __pyx_r; } -/* "_pynini.pyx":2447 +/* "_pynini.pyx":2463 * raise KeyError(key) * * def __next__(self): # <<<<<<<<<<<<<< @@ -37030,7 +37395,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 1); - /* "_pynini.pyx":2448 + /* "_pynini.pyx":2464 * * def __next__(self): * self._check_mode(b"r") # <<<<<<<<<<<<<< @@ -37039,11 +37404,11 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2448, __pyx_L1_error) + __PYX_ERR(0, 2464, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2448, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'r'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2464, __pyx_L1_error) - /* "_pynini.pyx":2449 + /* "_pynini.pyx":2465 * def __next__(self): * self._check_mode(b"r") * key, fst = self._reader.__next__() # <<<<<<<<<<<<<< @@ -37052,9 +37417,9 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reader"); - __PYX_ERR(0, 2449, __pyx_L1_error) + __PYX_ERR(0, 2465, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_reader), __pyx_n_s_next_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_reader), __pyx_n_s_next_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -37074,7 +37439,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -37084,7 +37449,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2449, __pyx_L1_error) + __PYX_ERR(0, 2465, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -37097,15 +37462,15 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far __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, 2449, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __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_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); @@ -37113,7 +37478,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 2449, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 2465, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_unpacking_done; @@ -37121,7 +37486,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2449, __pyx_L1_error) + __PYX_ERR(0, 2465, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_key = __pyx_t_2; @@ -37129,7 +37494,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far __pyx_v_fst = __pyx_t_3; __pyx_t_3 = 0; - /* "_pynini.pyx":2450 + /* "_pynini.pyx":2466 * self._check_mode(b"r") * key, fst = self._reader.__next__() * return (key, Fst.from_pywrapfst(fst)) # <<<<<<<<<<<<<< @@ -37137,7 +37502,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far * # This just registers this class as a possible iterator. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_4 = 0; @@ -37157,23 +37522,23 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_fst}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2450, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key)) __PYX_ERR(0, 2450, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key)) __PYX_ERR(0, 2466, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 2450, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 2466, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pynini.pyx":2447 + /* "_pynini.pyx":2463 * raise KeyError(key) * * def __next__(self): # <<<<<<<<<<<<<< @@ -37197,7 +37562,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_30__next__(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2453 +/* "_pynini.pyx":2469 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -37225,7 +37590,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_32__iter__(struct __pyx_obj_7_pynini_Far __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 1); - /* "_pynini.pyx":2454 + /* "_pynini.pyx":2470 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -37237,7 +37602,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_32__iter__(struct __pyx_obj_7_pynini_Far __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pynini.pyx":2453 + /* "_pynini.pyx":2469 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -37252,7 +37617,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_32__iter__(struct __pyx_obj_7_pynini_Far return __pyx_r; } -/* "_pynini.pyx":2458 +/* "_pynini.pyx":2474 * # FarWriter API. * * cpdef void add(self, key, Fst fst): # <<<<<<<<<<<<<< @@ -37287,7 +37652,7 @@ static void __pyx_f_7_pynini_3Far_add(struct __pyx_obj_7_pynini_Far *__pyx_v_sel if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2458, __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, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_35add)) { __Pyx_INCREF(__pyx_t_1); @@ -37309,7 +37674,7 @@ static void __pyx_f_7_pynini_3Far_add(struct __pyx_obj_7_pynini_Far *__pyx_v_sel PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_key, ((PyObject *)__pyx_v_fst)}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -37330,7 +37695,7 @@ static void __pyx_f_7_pynini_3Far_add(struct __pyx_obj_7_pynini_Far *__pyx_v_sel #endif } - /* "_pynini.pyx":2476 + /* "_pynini.pyx":2492 * FstOpError: Incompatible or invalid arc type. * """ * self._check_mode(b"w") # <<<<<<<<<<<<<< @@ -37339,11 +37704,11 @@ static void __pyx_f_7_pynini_3Far_add(struct __pyx_obj_7_pynini_Far *__pyx_v_sel */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2476, __pyx_L1_error) + __PYX_ERR(0, 2492, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'w'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'w'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2492, __pyx_L1_error) - /* "_pynini.pyx":2477 + /* "_pynini.pyx":2493 * """ * self._check_mode(b"w") * self._writer.add(key, fst) # <<<<<<<<<<<<<< @@ -37352,15 +37717,15 @@ static void __pyx_f_7_pynini_3Far_add(struct __pyx_obj_7_pynini_Far *__pyx_v_sel */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2477, __pyx_L1_error) + __PYX_ERR(0, 2493, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 2477, __pyx_L1_error) + __PYX_ERR(0, 2493, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->add(__pyx_v_self->_writer, __pyx_v_key, ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2477, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->add(__pyx_v_self->_writer, __pyx_v_key, ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_fst), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2493, __pyx_L1_error) - /* "_pynini.pyx":2458 + /* "_pynini.pyx":2474 * # FarWriter API. * * cpdef void add(self, key, Fst fst): # <<<<<<<<<<<<<< @@ -37437,7 +37802,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -37445,14 +37810,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 2458, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 2474, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 2458, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add") < 0)) __PYX_ERR(0, 2474, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -37465,7 +37830,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2458, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2474, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37479,7 +37844,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_7_pynini_Fst, 1, "fst", 0))) __PYX_ERR(0, 2458, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_7_pynini_Fst, 1, "fst", 0))) __PYX_ERR(0, 2474, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_3Far_34add(((struct __pyx_obj_7_pynini_Far *)__pyx_v_self), __pyx_v_key, __pyx_v_fst); /* function exit code */ @@ -37506,8 +37871,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_34add(struct __pyx_obj_7_pynini_Far *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_3Far_add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2458, __pyx_L1_error) + __pyx_f_7_pynini_3Far_add(__pyx_v_self, __pyx_v_key, __pyx_v_fst, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2474, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37524,7 +37889,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_34add(struct __pyx_obj_7_pynini_Far *__p return __pyx_r; } -/* "_pynini.pyx":2479 +/* "_pynini.pyx":2495 * self._writer.add(key, fst) * * def __setitem__(self, key, Fst fst): # <<<<<<<<<<<<<< @@ -37543,7 +37908,7 @@ static int __pyx_pw_7_pynini_3Far_37__setitem__(PyObject *__pyx_v_self, PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_7_pynini_Fst, 1, "fst", 0))) __PYX_ERR(0, 2479, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst), __pyx_ptype_7_pynini_Fst, 1, "fst", 0))) __PYX_ERR(0, 2495, __pyx_L1_error) __pyx_r = __pyx_pf_7_pynini_3Far_36__setitem__(((struct __pyx_obj_7_pynini_Far *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((struct __pyx_obj_7_pynini_Fst *)__pyx_v_fst)); /* function exit code */ @@ -37561,7 +37926,7 @@ static int __pyx_pf_7_pynini_3Far_36__setitem__(struct __pyx_obj_7_pynini_Far *_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pynini.pyx":2480 + /* "_pynini.pyx":2496 * * def __setitem__(self, key, Fst fst): * self._check_mode(b"w") # <<<<<<<<<<<<<< @@ -37570,11 +37935,11 @@ static int __pyx_pf_7_pynini_3Far_36__setitem__(struct __pyx_obj_7_pynini_Far *_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mode"); - __PYX_ERR(0, 2480, __pyx_L1_error) + __PYX_ERR(0, 2496, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'w'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->_check_mode(__pyx_v_self, 'w'); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L1_error) - /* "_pynini.pyx":2481 + /* "_pynini.pyx":2497 * def __setitem__(self, key, Fst fst): * self._check_mode(b"w") * self._writer[key] = fst # <<<<<<<<<<<<<< @@ -37583,15 +37948,15 @@ static int __pyx_pf_7_pynini_3Far_36__setitem__(struct __pyx_obj_7_pynini_Far *_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2481, __pyx_L1_error) + __PYX_ERR(0, 2497, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2481, __pyx_L1_error) + __PYX_ERR(0, 2497, __pyx_L1_error) } - if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self->_writer), __pyx_v_key, ((PyObject *)__pyx_v_fst)) < 0))) __PYX_ERR(0, 2481, __pyx_L1_error) + if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self->_writer), __pyx_v_key, ((PyObject *)__pyx_v_fst)) < 0))) __PYX_ERR(0, 2497, __pyx_L1_error) - /* "_pynini.pyx":2479 + /* "_pynini.pyx":2495 * self._writer.add(key, fst) * * def __setitem__(self, key, Fst fst): # <<<<<<<<<<<<<< @@ -37609,7 +37974,7 @@ static int __pyx_pf_7_pynini_3Far_36__setitem__(struct __pyx_obj_7_pynini_Far *_ return __pyx_r; } -/* "_pynini.pyx":2483 +/* "_pynini.pyx":2499 * self._writer[key] = fst * * cpdef void close(self): # <<<<<<<<<<<<<< @@ -37647,7 +38012,7 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7_pynini_3Far_39close)) { __Pyx_INCREF(__pyx_t_1); @@ -37669,7 +38034,7 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2483, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -37690,7 +38055,7 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s #endif } - /* "_pynini.pyx":2489 + /* "_pynini.pyx":2505 * Closes the FAR and flushes to disk (when open for writing). * """ * if not self.closed() and self._mode == b"w": # <<<<<<<<<<<<<< @@ -37699,9 +38064,9 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "closed"); - __PYX_ERR(0, 2489, __pyx_L1_error) + __PYX_ERR(0, 2505, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->closed(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->closed(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2505, __pyx_L1_error) __pyx_t_8 = (!(__pyx_t_7 != 0)); if (__pyx_t_8) { } else { @@ -37710,14 +38075,14 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2489, __pyx_L1_error) + __PYX_ERR(0, 2505, __pyx_L1_error) } __pyx_t_8 = (__pyx_v_self->_mode == 'w'); __pyx_t_6 = __pyx_t_8; __pyx_L4_bool_binop_done:; if (__pyx_t_6) { - /* "_pynini.pyx":2490 + /* "_pynini.pyx":2506 * """ * if not self.closed() and self._mode == b"w": * self._writer.close() # <<<<<<<<<<<<<< @@ -37726,15 +38091,15 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_writer"); - __PYX_ERR(0, 2490, __pyx_L1_error) + __PYX_ERR(0, 2506, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_writer) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "close"); - __PYX_ERR(0, 2490, __pyx_L1_error) + __PYX_ERR(0, 2506, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->close(__pyx_v_self->_writer); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_FarWriter *)__pyx_v_self->_writer->__pyx_vtab)->close(__pyx_v_self->_writer); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2506, __pyx_L1_error) - /* "_pynini.pyx":2489 + /* "_pynini.pyx":2505 * Closes the FAR and flushes to disk (when open for writing). * """ * if not self.closed() and self._mode == b"w": # <<<<<<<<<<<<<< @@ -37743,7 +38108,7 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ } - /* "_pynini.pyx":2491 + /* "_pynini.pyx":2507 * if not self.closed() and self._mode == b"w": * self._writer.close() * self._mode = b"c" # <<<<<<<<<<<<<< @@ -37752,11 +38117,11 @@ static void __pyx_f_7_pynini_3Far_close(struct __pyx_obj_7_pynini_Far *__pyx_v_s */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mode"); - __PYX_ERR(0, 2491, __pyx_L1_error) + __PYX_ERR(0, 2507, __pyx_L1_error) } __pyx_v_self->_mode = 'c'; - /* "_pynini.pyx":2483 + /* "_pynini.pyx":2499 * self._writer[key] = fst * * cpdef void close(self): # <<<<<<<<<<<<<< @@ -37827,8 +38192,8 @@ static PyObject *__pyx_pf_7_pynini_3Far_38close(struct __pyx_obj_7_pynini_Far *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_7_pynini_3Far_close(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2483, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_f_7_pynini_3Far_close(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37845,7 +38210,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_38close(struct __pyx_obj_7_pynini_Far *_ return __pyx_r; } -/* "_pynini.pyx":2495 +/* "_pynini.pyx":2511 * # Adds support for use as a PEP-343 context manager. * * def __enter__(self): # <<<<<<<<<<<<<< @@ -37899,7 +38264,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_40__enter__(struct __pyx_obj_7_pynini_Fa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 1); - /* "_pynini.pyx":2496 + /* "_pynini.pyx":2512 * * def __enter__(self): * return self # <<<<<<<<<<<<<< @@ -37911,7 +38276,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_40__enter__(struct __pyx_obj_7_pynini_Fa __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pynini.pyx":2495 + /* "_pynini.pyx":2511 * # Adds support for use as a PEP-343 context manager. * * def __enter__(self): # <<<<<<<<<<<<<< @@ -37926,7 +38291,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_40__enter__(struct __pyx_obj_7_pynini_Fa return __pyx_r; } -/* "_pynini.pyx":2498 +/* "_pynini.pyx":2514 * return self * * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< @@ -37993,7 +38358,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2498, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2514, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -38001,9 +38366,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2498, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2514, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 2498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 2514, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -38011,14 +38376,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2498, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2514, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 2498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 2514, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 2498, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 2514, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -38033,7 +38398,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2498, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2514, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38068,7 +38433,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_42__exit__(struct __pyx_obj_7_pynini_Far int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 1); - /* "_pynini.pyx":2499 + /* "_pynini.pyx":2515 * * def __exit__(self, exc, value, tb): * self.close() # <<<<<<<<<<<<<< @@ -38077,11 +38442,11 @@ static PyObject *__pyx_pf_7_pynini_3Far_42__exit__(struct __pyx_obj_7_pynini_Far */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "close"); - __PYX_ERR(0, 2499, __pyx_L1_error) + __PYX_ERR(0, 2515, __pyx_L1_error) } - ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2499, __pyx_L1_error) + ((struct __pyx_vtabstruct_7_pynini_Far *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2515, __pyx_L1_error) - /* "_pynini.pyx":2498 + /* "_pynini.pyx":2514 * return self * * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< @@ -38548,7 +38913,7 @@ static PyObject *__pyx_pf_7_pynini_3Far_46__setstate_cython__(struct __pyx_obj_7 return __pyx_r; } -/* "_pynini.pyx":2621 +/* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< @@ -38609,12 +38974,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2641, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_copy_patch") < 0)) __PYX_ERR(0, 2621, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_copy_patch") < 0)) __PYX_ERR(0, 2641, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -38625,7 +38990,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_copy_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2621, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_copy_patch", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2641, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38652,7 +39017,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "_pynini.pyx":2622 +/* "_pynini.pyx":2642 * * def _copy_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -38724,13 +39089,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2622, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 2622, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "patch") < 0)) __PYX_ERR(0, 2642, __pyx_L3_error) } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; @@ -38741,7 +39106,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2622, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("patch", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 2642, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38788,43 +39153,43 @@ static PyObject *__pyx_pf_7_pynini_11_copy_patch_patch(PyObject *__pyx_self, PyO __pyx_outer_scope = (struct __pyx_obj_7_pynini___pyx_scope_struct_13__copy_patch *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "_pynini.pyx":2624 + /* "_pynini.pyx":2644 * @functools.wraps(fnc) * def patch(arg1, *args, **kwargs): * cdef Fst result = _compile_or_copy_Fst(arg1) # <<<<<<<<<<<<<< * fnc(result, *args, **kwargs) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_arg1, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2624, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_7_pynini__compile_or_copy_Fst(__pyx_v_arg1, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_7_pynini_Fst *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pynini.pyx":2625 + /* "_pynini.pyx":2645 * def patch(arg1, *args, **kwargs): * cdef Fst result = _compile_or_copy_Fst(arg1) * fnc(result, *args, **kwargs) # <<<<<<<<<<<<<< * return result * return patch */ - if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 2625, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_fnc)) { __Pyx_RaiseClosureNameError("fnc"); __PYX_ERR(0, 2645, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_result); __Pyx_GIVEREF((PyObject *)__pyx_v_result); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result))) __PYX_ERR(0, 2625, __pyx_L1_error); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2625, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result))) __PYX_ERR(0, 2645, __pyx_L1_error); + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error) + __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fnc, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":2626 + /* "_pynini.pyx":2646 * cdef Fst result = _compile_or_copy_Fst(arg1) * fnc(result, *args, **kwargs) * return result # <<<<<<<<<<<<<< @@ -38836,7 +39201,7 @@ static PyObject *__pyx_pf_7_pynini_11_copy_patch_patch(PyObject *__pyx_self, PyO __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pynini.pyx":2622 + /* "_pynini.pyx":2642 * * def _copy_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< @@ -38858,7 +39223,7 @@ static PyObject *__pyx_pf_7_pynini_11_copy_patch_patch(PyObject *__pyx_self, PyO return __pyx_r; } -/* "_pynini.pyx":2621 +/* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< @@ -38884,7 +39249,7 @@ static PyObject *__pyx_pf_7_pynini_54_copy_patch(CYTHON_UNUSED PyObject *__pyx_s if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_7_pynini___pyx_scope_struct_13__copy_patch *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2621, __pyx_L1_error) + __PYX_ERR(0, 2641, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -38892,16 +39257,16 @@ static PyObject *__pyx_pf_7_pynini_54_copy_patch(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fnc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fnc); - /* "_pynini.pyx":2622 + /* "_pynini.pyx":2642 * * def _copy_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(arg1, *args, **kwargs): * cdef Fst result = _compile_or_copy_Fst(arg1) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2622, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_functools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_wraps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -38922,11 +39287,11 @@ static PyObject *__pyx_pf_7_pynini_54_copy_patch(CYTHON_UNUSED PyObject *__pyx_s PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_fnc}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2622, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_copy_patch_1patch, 0, __pyx_n_s_copy_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11_copy_patch_1patch, 0, __pyx_n_s_copy_patch_locals_patch, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -38947,14 +39312,14 @@ static PyObject *__pyx_pf_7_pynini_54_copy_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_v_patch = __pyx_t_1; __pyx_t_1 = 0; - /* "_pynini.pyx":2627 + /* "_pynini.pyx":2647 * fnc(result, *args, **kwargs) * return result * return patch # <<<<<<<<<<<<<< @@ -38966,7 +39331,7 @@ static PyObject *__pyx_pf_7_pynini_54_copy_patch(CYTHON_UNUSED PyObject *__pyx_s __pyx_r = __pyx_v_patch; goto __pyx_L0; - /* "_pynini.pyx":2621 + /* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< @@ -40411,11 +40776,183 @@ static PyObject *__pyx_tp_richcompare_7_pynini_Fst(PyObject *o1, PyObject *o2, i } } } -#define __pyx_nb_add_7_pynini_Fst __pyx_pw_7_pynini_3Fst_29__add__ -#define __pyx_nb_subtract_7_pynini_Fst __pyx_pw_7_pynini_3Fst_33__sub__ -#define __pyx_nb_power_7_pynini_Fst __pyx_pw_7_pynini_3Fst_35__pow__ -#define __pyx_nb_or_7_pynini_Fst __pyx_pw_7_pynini_3Fst_39__or__ -#define __pyx_nb_matrix_multiply_7_pynini_Fst __pyx_pw_7_pynini_3Fst_37__matmul__ + +static CYTHON_INLINE PyObject *__pyx_nb_add_7_pynini_Fst_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) { + binaryfunc slot; +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY + slot = type->tp_as_number ? type->tp_as_number->nb_add : NULL; +#else + slot = (binaryfunc) PyType_GetSlot(type, Py_nb_add); +#endif + return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented); +} +static PyObject *__pyx_nb_add_7_pynini_Fst(PyObject *left, PyObject *right ) { + int maybe_self_is_left, maybe_self_is_right = 0; + maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_add == &__pyx_nb_add_7_pynini_Fst) +#endif + || __Pyx_TypeCheck(left, __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_left) { + PyObject *res; + res = __pyx_pw_7_pynini_3Fst_29__add__(left, right); + if (res != Py_NotImplemented) return res; + Py_DECREF(res); + } + maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_add == &__pyx_nb_add_7_pynini_Fst) +#endif + || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_right) { + return __pyx_pw_7_pynini_3Fst_31__radd__(right, left); + } + return __Pyx_NewRef(Py_NotImplemented); +} + + + +static CYTHON_INLINE PyObject *__pyx_nb_subtract_7_pynini_Fst_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) { + binaryfunc slot; +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY + slot = type->tp_as_number ? type->tp_as_number->nb_subtract : NULL; +#else + slot = (binaryfunc) PyType_GetSlot(type, Py_nb_subtract); +#endif + return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented); +} +static PyObject *__pyx_nb_subtract_7_pynini_Fst(PyObject *left, PyObject *right ) { + int maybe_self_is_left, maybe_self_is_right = 0; + maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_subtract == &__pyx_nb_subtract_7_pynini_Fst) +#endif + || __Pyx_TypeCheck(left, __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_left) { + PyObject *res; + res = __pyx_pw_7_pynini_3Fst_35__sub__(left, right); + if (res != Py_NotImplemented) return res; + Py_DECREF(res); + } + maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_subtract == &__pyx_nb_subtract_7_pynini_Fst) +#endif + || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_right) { + return __pyx_pw_7_pynini_3Fst_37__rsub__(right, left); + } + return __Pyx_NewRef(Py_NotImplemented); +} + + + +static CYTHON_INLINE PyObject *__pyx_nb_power_7_pynini_Fst_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right , PyObject* extra_arg) { + ternaryfunc slot; +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY + slot = type->tp_as_number ? type->tp_as_number->nb_power : NULL; +#else + slot = (ternaryfunc) PyType_GetSlot(type, Py_nb_power); +#endif + return slot ? slot(left, right , extra_arg) : __Pyx_NewRef(Py_NotImplemented); +} +static PyObject *__pyx_nb_power_7_pynini_Fst(PyObject *left, PyObject *right , PyObject* extra_arg) { + int maybe_self_is_left, maybe_self_is_right = 0; + maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_power == &__pyx_nb_power_7_pynini_Fst) +#endif + || __Pyx_TypeCheck(left, __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_left) { + PyObject *res; + res = __pyx_pw_7_pynini_3Fst_39__pow__(left, right, extra_arg); + if (res != Py_NotImplemented) return res; + Py_DECREF(res); + } + maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_power == &__pyx_nb_power_7_pynini_Fst) +#endif + || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_right) { + return __pyx_nb_power_7_pynini_Fst_maybe_call_slot(__Pyx_PyType_GetSlot(__pyx_ptype_7_pynini_Fst, tp_base, PyTypeObject*), left, right , extra_arg); + } + return __Pyx_NewRef(Py_NotImplemented); +} + + + +static CYTHON_INLINE PyObject *__pyx_nb_or_7_pynini_Fst_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) { + binaryfunc slot; +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY + slot = type->tp_as_number ? type->tp_as_number->nb_or : NULL; +#else + slot = (binaryfunc) PyType_GetSlot(type, Py_nb_or); +#endif + return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented); +} +static PyObject *__pyx_nb_or_7_pynini_Fst(PyObject *left, PyObject *right ) { + int maybe_self_is_left, maybe_self_is_right = 0; + maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_or == &__pyx_nb_or_7_pynini_Fst) +#endif + || __Pyx_TypeCheck(left, __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_left) { + PyObject *res; + res = __pyx_pw_7_pynini_3Fst_45__or__(left, right); + if (res != Py_NotImplemented) return res; + Py_DECREF(res); + } + maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_or == &__pyx_nb_or_7_pynini_Fst) +#endif + || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_right) { + return __pyx_pw_7_pynini_3Fst_47__ror__(right, left); + } + return __Pyx_NewRef(Py_NotImplemented); +} + + + +#if PY_VERSION_HEX >= 0x03050000 +static CYTHON_INLINE PyObject *__pyx_nb_matrix_multiply_7_pynini_Fst_maybe_call_slot(PyTypeObject* type, PyObject *left, PyObject *right ) { + binaryfunc slot; +#if CYTHON_USE_TYPE_SLOTS || PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY + slot = type->tp_as_number ? type->tp_as_number->nb_matrix_multiply : NULL; +#else + slot = (binaryfunc) PyType_GetSlot(type, Py_nb_matrix_multiply); +#endif + return slot ? slot(left, right ) : __Pyx_NewRef(Py_NotImplemented); +} +static PyObject *__pyx_nb_matrix_multiply_7_pynini_Fst(PyObject *left, PyObject *right ) { + int maybe_self_is_left, maybe_self_is_right = 0; + maybe_self_is_left = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(left)->tp_as_number && Py_TYPE(left)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_7_pynini_Fst) +#endif + || __Pyx_TypeCheck(left, __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_left) { + PyObject *res; + res = __pyx_pw_7_pynini_3Fst_41__matmul__(left, right); + if (res != Py_NotImplemented) return res; + Py_DECREF(res); + } + maybe_self_is_right = Py_TYPE(left) == Py_TYPE(right) +#if CYTHON_USE_TYPE_SLOTS + || (Py_TYPE(right)->tp_as_number && Py_TYPE(right)->tp_as_number->nb_matrix_multiply == &__pyx_nb_matrix_multiply_7_pynini_Fst) +#endif + || PyType_IsSubtype(Py_TYPE(right), __pyx_ptype_7_pynini_Fst); + if (maybe_self_is_right) { + return __pyx_pw_7_pynini_3Fst_43__rmatmul__(right, left); + } + return __Pyx_NewRef(Py_NotImplemented); +} + + +#endif static PyObject *__pyx_getprop_7_pynini_3Fst_plus(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_7_pynini_3Fst_4plus_1__get__(o); @@ -40438,6 +40975,12 @@ static PyMethodDef __pyx_methods_7_pynini_Fst[] = { {"concat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7_pynini_3Fst_19concat, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7_pynini_3Fst_18concat}, {"optimize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7_pynini_3Fst_21optimize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7_pynini_3Fst_20optimize}, {"union", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7_pynini_3Fst_23union, METH_VARARGS|METH_KEYWORDS, 0}, + {"__radd__", (PyCFunction)__pyx_pw_7_pynini_3Fst_31__radd__, METH_O|METH_COEXIST, 0}, + {"__rsub__", (PyCFunction)__pyx_pw_7_pynini_3Fst_37__rsub__, METH_O|METH_COEXIST, 0}, + #if PY_VERSION_HEX >= 0x03050000 + {"__rmatmul__", (PyCFunction)__pyx_pw_7_pynini_3Fst_43__rmatmul__, METH_O|METH_COEXIST, 0}, + #endif + {"__ror__", (PyCFunction)__pyx_pw_7_pynini_3Fst_47__ror__, METH_O|METH_COEXIST, 0}, {0, 0, 0, 0} }; @@ -40453,8 +40996,8 @@ static PyType_Slot __pyx_type_7_pynini_Fst_slots[] = { {Py_nb_subtract, (void *)__pyx_nb_subtract_7_pynini_Fst}, {Py_nb_power, (void *)__pyx_nb_power_7_pynini_Fst}, {Py_nb_or, (void *)__pyx_nb_or_7_pynini_Fst}, - {Py_nb_inplace_add, (void *)__pyx_pw_7_pynini_3Fst_31__iadd__}, - {Py_nb_inplace_or, (void *)__pyx_pw_7_pynini_3Fst_41__ior__}, + {Py_nb_inplace_add, (void *)__pyx_pw_7_pynini_3Fst_33__iadd__}, + {Py_nb_inplace_or, (void *)__pyx_pw_7_pynini_3Fst_49__ior__}, #if PY_VERSION_HEX >= 0x03050000 {Py_nb_matrix_multiply, (void *)__pyx_nb_matrix_multiply_7_pynini_Fst}, #endif @@ -40511,7 +41054,7 @@ static PyNumberMethods __pyx_tp_as_number_Fst = { #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif - __pyx_pw_7_pynini_3Fst_31__iadd__, /*nb_inplace_add*/ + __pyx_pw_7_pynini_3Fst_33__iadd__, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) @@ -40523,7 +41066,7 @@ static PyNumberMethods __pyx_tp_as_number_Fst = { 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ - __pyx_pw_7_pynini_3Fst_41__ior__, /*nb_inplace_or*/ + __pyx_pw_7_pynini_3Fst_49__ior__, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ @@ -44290,14 +44833,14 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 148, __pyx_L1_error) - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 518, __pyx_L1_error) - __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 717, __pyx_L1_error) - __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 725, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 726, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 1206, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1435, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 2445, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1453, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 2461, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 68, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -44309,101 +44852,101 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "_pynini.pyx":724 + /* "_pynini.pyx":734 * (lower, upper) = other * except ValueError: * raise ValueError("Expected tuple of length two") # <<<<<<<<<<<<<< * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Expected_tuple_of_length_two); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Expected_tuple_of_length_two); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "_pynini.pyx":726 + /* "_pynini.pyx":736 * raise ValueError("Expected tuple of length two") * if lower is Ellipsis: * raise TypeError("The lower bound must be an integer") # <<<<<<<<<<<<<< * elif upper is Ellipsis: * return closure(self, lower) */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_The_lower_bound_must_be_an_integ); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_The_lower_bound_must_be_an_integ); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "_pynini.pyx":1224 + /* "_pynini.pyx":1242 * * def _1arg_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) */ - __pyx_tuple__4 = PyTuple_Pack(4, __pyx_n_s_fst, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_fst_2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(4, __pyx_n_s_fst, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_fst_2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 1242, __pyx_L1_error) - /* "_pynini.pyx":1245 + /* "_pynini.pyx":1263 * * def _shortestdistance_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst, *args, **kwargs): * cdef Fst _fst = _compile_or_copy_Fst(fst) */ - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1245, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 1263, __pyx_L1_error) - /* "_pynini.pyx":1261 + /* "_pynini.pyx":1279 * * def _compose_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __pyx_tuple__7 = PyTuple_Pack(6, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_fst1_2, __pyx_n_s_fst2_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(6, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_fst1_2, __pyx_n_s_fst2_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 1279, __pyx_L1_error) - /* "_pynini.pyx":1276 + /* "_pynini.pyx":1294 * * def _difference_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 1294, __pyx_L1_error) - /* "_pynini.pyx":1294 + /* "_pynini.pyx":1312 * * def _comp_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(fst1, fst2, *args, **kwargs): * cdef Fst _fst1 */ - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 1312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 1312, __pyx_L1_error) - /* "_pynini.pyx":2265 + /* "_pynini.pyx":2281 * cdef void _check_open(self) except *: * if self.closed(): * raise ValueError("I/O operation on closed FAR") # <<<<<<<<<<<<<< * * cdef void _check_mode(self, char mode) except *: */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_FAR); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2265, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_FAR); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2281, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "_pynini.pyx":2622 + /* "_pynini.pyx":2642 * * def _copy_patch(fnc): * @functools.wraps(fnc) # <<<<<<<<<<<<<< * def patch(arg1, *args, **kwargs): * cdef Fst result = _compile_or_copy_Fst(arg1) */ - __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_arg1, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2622, __pyx_L1_error) + __pyx_tuple__20 = PyTuple_Pack(4, __pyx_n_s_arg1, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_result); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 2622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 2622, __pyx_L1_error) + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_patch, 2642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 2642, __pyx_L1_error) /* "(tree fragment)":4 * cdef object __pyx_PickleError @@ -44422,312 +44965,312 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "_pynini.pyx":309 + /* "_pynini.pyx":310 * """ * * def __init__(self, token_type): # <<<<<<<<<<<<<< * self._token_type = token_type * */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_token_type); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_token_type); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_init, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_init, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 310, __pyx_L1_error) - /* "_pynini.pyx":312 + /* "_pynini.pyx":313 * self._token_type = token_type * * def __enter__(self): # <<<<<<<<<<<<<< * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL */ - __pyx_tuple__29 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_token_type_2, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_token_type_2, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_enter, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_enter, 313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 313, __pyx_L1_error) - /* "_pynini.pyx":322 + /* "_pynini.pyx":323 * PushDefaults(_token_type, _symbols) * * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<< * PopDefaults() * */ - __pyx_tuple__31 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_tuple__31 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); - __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_exit, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_exit, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 323, __pyx_L1_error) - /* "_pynini.pyx":361 + /* "_pynini.pyx":362 * self._from_MutableFstClass(_tfst.release()) * * @classmethod # <<<<<<<<<<<<<< * def from_pywrapfst(cls, _Fst fst): * """ */ - __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_from_pywrapfst, 361, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_from_pywrapfst, 362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 362, __pyx_L1_error) - /* "_pynini.pyx":383 + /* "_pynini.pyx":384 * return _from_pywrapfst(fst) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 384, __pyx_L1_error) - /* "_pynini.pyx":401 + /* "_pynini.pyx":402 * return _read(filename) * * @classmethod # <<<<<<<<<<<<<< * def read_from_string(cls, state): * """ */ - __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_state); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_state); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); - __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_from_string_2, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_from_string_2, 402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 402, __pyx_L1_error) - /* "_pynini.pyx":421 + /* "_pynini.pyx":422 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_from_string, (self.write_to_string(),)) * */ - __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reduce, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reduce, 422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 422, __pyx_L1_error) - /* "_pynini.pyx":424 + /* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< * output_token_type=None): * """ */ - __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_paths, 424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 424, __pyx_L1_error) - __pyx_tuple__43 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_paths, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - /* "_pynini.pyx":462 + /* "_pynini.pyx":463 * return _StringPathIterator(self, input_token_type, output_token_type) * * cpdef string string(self, token_type=None) except *: # <<<<<<<<<<<<<< * """ * string(self, token_type=None) */ - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string, 462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 462, __pyx_L1_error) - __pyx_tuple__45 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 463, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); - /* "_pynini.pyx":512 + /* "_pynini.pyx":513 * # The following all override their definition in MutableFst. * * cpdef Fst copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 513, __pyx_L1_error) - /* "_pynini.pyx":520 + /* "_pynini.pyx":521 * return _init_Fst_from_MutableFst(super(_MutableFst, self).copy()) * * def closure(self, int32_t lower=0, int32_t upper=0): # <<<<<<<<<<<<<< * """ * closure(self, lower) */ - __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_lower, __pyx_n_s_upper); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_lower, __pyx_n_s_upper); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_closure, 520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 520, __pyx_L1_error) - __pyx_tuple__49 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_closure, 521, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); - /* "_pynini.pyx":615 + /* "_pynini.pyx":616 * return result * * def concat(self, fst2): # <<<<<<<<<<<<<< * """ * concat(self, fst2) */ - __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fst2, __pyx_n_s_fst2_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fst2, __pyx_n_s_fst2_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_concat, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_concat, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 616, __pyx_L1_error) - /* "_pynini.pyx":639 + /* "_pynini.pyx":640 * self._check_mutating_imethod() * * def optimize(self, bool compute_props=False): # <<<<<<<<<<<<<< * """ * optimize(self, compute_props=False) */ - __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_compute_props); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_compute_props); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_optimize, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 639, __pyx_L1_error) - __pyx_tuple__54 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_optimize, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - /* "_pynini.pyx":680 + /* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) * for fst2 in fsts2)) */ - __pyx_tuple__55 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_fsts2, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_tuple__55 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_fsts2, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_union, 680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_union, 681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 681, __pyx_L1_error) - /* "_pynini.pyx":796 + /* "_pynini.pyx":814 * * * cpdef Fst _from_pywrapfst(_Fst fst): # <<<<<<<<<<<<<< * cdef Fst result = Fst.__new__(Fst) * result._from_MutableFstClass(new VectorFstClass(deref(fst._fst))) */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(1, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_from_pywrapfst_2, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_from_pywrapfst_2, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 814, __pyx_L1_error) - /* "_pynini.pyx":802 + /* "_pynini.pyx":820 * * * cpdef Fst _read(filename): # <<<<<<<<<<<<<< * return _from_pywrapfst(_pywrapfst.Fst.read(filename)) * */ - __pyx_tuple__59 = PyTuple_Pack(1, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_2, 802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_2, 820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 820, __pyx_L1_error) - /* "_pynini.pyx":806 + /* "_pynini.pyx":824 * * * cpdef Fst _read_from_string(state): # <<<<<<<<<<<<<< * return _from_pywrapfst(_pywrapfst.Fst.read_from_string(state)) * */ - __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_from_string, 806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read_from_string, 824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 824, __pyx_L1_error) - /* "_pynini.pyx":813 + /* "_pynini.pyx":831 * * * cpdef string escape(data): # <<<<<<<<<<<<<< * """ * escape(data) */ - __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_escape, 813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_escape, 831, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 831, __pyx_L1_error) - /* "_pynini.pyx":836 + /* "_pynini.pyx":854 * * * cpdef Fst accep(astring, weight=None, arc_type="standard", token_type=None): # <<<<<<<<<<<<<< * """ * accep(astring, weight=None, arc_type=None, token_type=None) */ - __pyx_tuple__65 = PyTuple_Pack(4, __pyx_n_s_astring, __pyx_n_s_weight, __pyx_n_s_arc_type, __pyx_n_s_token_type); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(4, __pyx_n_s_astring, __pyx_n_s_weight, __pyx_n_s_arc_type, __pyx_n_s_token_type); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_accep, 836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 836, __pyx_L1_error) - __pyx_tuple__67 = PyTuple_Pack(3, Py_None, __pyx_n_u_standard, Py_None); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_accep, 854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_tuple__67 = PyTuple_Pack(3, Py_None, __pyx_n_u_standard, Py_None); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); - /* "_pynini.pyx":896 + /* "_pynini.pyx":914 * * * cpdef Fst cross(fst1, fst2): # <<<<<<<<<<<<<< * """ * cross(fst1, fst2) */ - __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_fst1, __pyx_n_s_fst2); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_fst1, __pyx_n_s_fst2); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_cross, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_cross, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 914, __pyx_L1_error) - /* "_pynini.pyx":926 + /* "_pynini.pyx":944 * * * cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): # <<<<<<<<<<<<<< * """ * cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl") */ - __pyx_tuple__70 = PyTuple_Pack(6, __pyx_n_s_tau, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_sigma_star, __pyx_n_s_direction, __pyx_n_s_mode); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_tuple__70 = PyTuple_Pack(6, __pyx_n_s_tau, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_sigma_star, __pyx_n_s_direction, __pyx_n_s_mode); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_cdrewrite, 926, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 926, __pyx_L1_error) - __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_u_ltr, __pyx_n_u_obl); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_cdrewrite, 944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_u_ltr, __pyx_n_u_obl); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); - /* "_pynini.pyx":986 + /* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< * bool connect=True): * """ */ - __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_mu, __pyx_n_s_nu, __pyx_n_s_sigma_star, __pyx_n_s_compose_filter, __pyx_n_s_connect); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_mu, __pyx_n_s_nu, __pyx_n_s_sigma_star, __pyx_n_s_compose_filter, __pyx_n_s_connect); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_leniently_compose, 986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 986, __pyx_L1_error) - __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_leniently_compose, 1004, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1004, __pyx_L1_error) + __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); - /* "_pynini.pyx":1033 + /* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< * arc_type="standard", * input_token_type=None, */ - __pyx_tuple__76 = PyTuple_Pack(4, __pyx_n_s_filename, __pyx_n_s_arc_type, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_tuple__76 = PyTuple_Pack(4, __pyx_n_s_filename, __pyx_n_s_arc_type, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__76); __Pyx_GIVEREF(__pyx_tuple__76); - __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string_file, 1033, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1033, __pyx_L1_error) - __pyx_tuple__78 = PyTuple_Pack(3, __pyx_n_u_standard, Py_None, Py_None); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string_file, 1051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_tuple__78 = PyTuple_Pack(3, __pyx_n_u_standard, Py_None, Py_None); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__78); __Pyx_GIVEREF(__pyx_tuple__78); - /* "_pynini.pyx":1113 + /* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< * arc_type="standard", * input_token_type=None, */ - __pyx_tuple__79 = PyTuple_Pack(4, __pyx_n_s_lines, __pyx_n_s_arc_type, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(4, __pyx_n_s_lines, __pyx_n_s_arc_type, __pyx_n_s_input_token_type, __pyx_n_s_output_token_type); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string_map, 1113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1113, __pyx_L1_error) - __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_u_standard, Py_None, Py_None); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_string_map, 1131, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_u_standard, Py_None, Py_None); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); @@ -44749,143 +45292,143 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__83); __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pynini.pyx":1212 + /* "_pynini.pyx":1230 * * * cpdef _PointerSymbolTableView generated_symbols(): # <<<<<<<<<<<<<< * """Returns a view of a symbol table containing generated symbols.""" * cdef _PointerSymbolTableView _symbols = ( */ - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_generated_symbols, 1212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_generated_symbols, 1230, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1230, __pyx_L1_error) - /* "_pynini.pyx":1223 + /* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): */ - __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_fnc, __pyx_n_s_patch, __pyx_n_s_patch); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_fnc, __pyx_n_s_patch, __pyx_n_s_patch); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_1arg_patch, 1223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_1arg_patch, 1241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1241, __pyx_L1_error) - /* "_pynini.pyx":1244 + /* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): */ - __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_shortestdistance_patch, 1244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_shortestdistance_patch, 1262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1262, __pyx_L1_error) - /* "_pynini.pyx":1260 + /* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_compose_patch, 1260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_compose_patch, 1278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1278, __pyx_L1_error) - /* "_pynini.pyx":1275 + /* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_difference_patch, 1275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1275, __pyx_L1_error) + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_difference_patch, 1293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1293, __pyx_L1_error) - /* "_pynini.pyx":1293 + /* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_comp_patch, 1293, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_comp_patch, 1311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1311, __pyx_L1_error) - /* "_pynini.pyx":1309 + /* "_pynini.pyx":1327 * * * cpdef Fst concat(fst1, fst2): # <<<<<<<<<<<<<< * """ * concat(fst1, fst2) */ - __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_concat, 1309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_concat, 1327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1327, __pyx_L1_error) - /* "_pynini.pyx":1333 + /* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< * call_arc_labeling="input", * return_arc_labeling="neither", */ - __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_pairs, __pyx_n_s_call_arc_labeling, __pyx_n_s_return_arc_labeling, __pyx_n_s_epsilon_on_replace, __pyx_n_s_return_label); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_pairs, __pyx_n_s_call_arc_labeling, __pyx_n_s_return_arc_labeling, __pyx_n_s_epsilon_on_replace, __pyx_n_s_return_label); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); - __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_replace, 1333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1333, __pyx_L1_error) - __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_u_input, __pyx_n_u_neither, Py_False, __pyx_int_0); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_replace, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_u_input, __pyx_n_u_neither, Py_False, __pyx_int_0); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); - /* "_pynini.pyx":1385 + /* "_pynini.pyx":1403 * * * def union(*fsts): # <<<<<<<<<<<<<< * """ * union(*fsts) */ - __pyx_tuple__96 = PyTuple_Pack(4, __pyx_n_s_fsts, __pyx_n_s_fst1, __pyx_n_s_fsts2, __pyx_n_s_fst1_2); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_tuple__96 = PyTuple_Pack(4, __pyx_n_s_fsts, __pyx_n_s_fst1, __pyx_n_s_fsts2, __pyx_n_s_fst1_2); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_union, 1385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_union, 1403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1403, __pyx_L1_error) - /* "_pynini.pyx":1438 + /* "_pynini.pyx":1456 * yield (self._parens[_i].first, self._parens[_i].second) * * cpdef PdtParentheses copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 1438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 1456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1456, __pyx_L1_error) - /* "_pynini.pyx":1451 + /* "_pynini.pyx":1469 * return result * * cpdef void add_pair(self, int64_t push, int64_t pop): # <<<<<<<<<<<<<< * """ * add_pair(self, push, pop) */ - __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_push, __pyx_n_s_pop); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_push, __pyx_n_s_pop); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); - __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add_pair, 1451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add_pair, 1469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1469, __pyx_L1_error) - /* "_pynini.pyx":1463 + /* "_pynini.pyx":1481 * self._parens.push_back(pair[int64_t, int64_t](push, pop)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_tuple__101 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_filename, __pyx_n_s_result); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_filename, __pyx_n_s_result); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); - __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 1463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 1481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1481, __pyx_L1_error) - /* "_pynini.pyx":1489 + /* "_pynini.pyx":1506 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< * """ * write(self, filename) */ - __pyx_tuple__103 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__103); __Pyx_GIVEREF(__pyx_tuple__103); - __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_write, 1489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_write, 1506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1506, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -44905,107 +45448,107 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "_pynini.pyx":1507 + /* "_pynini.pyx":1524 * * * def pdt_compose(fst1, # <<<<<<<<<<<<<< * fst2, * PdtParentheses parens, */ - __pyx_tuple__108 = PyTuple_Pack(10, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_parens, __pyx_n_s_compose_filter, __pyx_n_s_left_pdt, __pyx_n_s_fst1_2, __pyx_n_s_fst2_2, __pyx_n_s_result, __pyx_n_s_compose_filter_2, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_tuple__108 = PyTuple_Pack(10, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_parens, __pyx_n_s_compose_filter, __pyx_n_s_left_pdt, __pyx_n_s_fst1_2, __pyx_n_s_fst2_2, __pyx_n_s_result, __pyx_n_s_compose_filter_2, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__108); __Pyx_GIVEREF(__pyx_tuple__108); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_compose, 1507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_compose, 1524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1524, __pyx_L1_error) - /* "_pynini.pyx":1558 + /* "_pynini.pyx":1575 * * * def pdt_expand(fst, # <<<<<<<<<<<<<< * PdtParentheses parens, * bool connect=True, */ - __pyx_tuple__110 = PyTuple_Pack(9, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_connect, __pyx_n_s_keep_parentheses, __pyx_n_s_weight, __pyx_n_s_fst_2, __pyx_n_s_result, __pyx_n_s_weight_2, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_tuple__110 = PyTuple_Pack(9, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_connect, __pyx_n_s_keep_parentheses, __pyx_n_s_weight, __pyx_n_s_fst_2, __pyx_n_s_result, __pyx_n_s_weight_2, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__110); __Pyx_GIVEREF(__pyx_tuple__110); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_expand, 1558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_expand, 1575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1575, __pyx_L1_error) - /* "_pynini.pyx":1628 + /* "_pynini.pyx":1645 * * * def pdt_replace(pairs, # <<<<<<<<<<<<<< * pdt_parser_type="left", * int64_t start_paren_labels=kNoLabel, */ - __pyx_tuple__112 = PyTuple_Pack(7, __pyx_n_s_pairs, __pyx_n_s_pdt_parser_type, __pyx_n_s_start_paren_labels, __pyx_n_s_left_paren_prefix, __pyx_n_s_right_paren_prefix, __pyx_n_s_label, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_tuple__112 = PyTuple_Pack(7, __pyx_n_s_pairs, __pyx_n_s_pdt_parser_type, __pyx_n_s_start_paren_labels, __pyx_n_s_left_paren_prefix, __pyx_n_s_right_paren_prefix, __pyx_n_s_label, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__112); __Pyx_GIVEREF(__pyx_tuple__112); - __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_replace, 1628, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_replace, 1645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1645, __pyx_L1_error) - /* "_pynini.pyx":1681 + /* "_pynini.pyx":1698 * * * cpdef Fst pdt_reverse(fst, PdtParentheses parens): # <<<<<<<<<<<<<< * """ * pdt_reverse(fst, parens) */ - __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_fst, __pyx_n_s_parens); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_fst, __pyx_n_s_parens); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__114); __Pyx_GIVEREF(__pyx_tuple__114); - __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_reverse, 1681, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_reverse, 1698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1698, __pyx_L1_error) - /* "_pynini.pyx":1704 + /* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< * PdtParentheses parens, * queue_type="fifo", */ - __pyx_tuple__116 = PyTuple_Pack(5, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_queue_type, __pyx_n_s_keep_parentheses, __pyx_n_s_path_gc); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_tuple__116 = PyTuple_Pack(5, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_queue_type, __pyx_n_s_keep_parentheses, __pyx_n_s_path_gc); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__116); __Pyx_GIVEREF(__pyx_tuple__116); - __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_shortestpath, 1704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1704, __pyx_L1_error) - __pyx_tuple__118 = PyTuple_Pack(3, __pyx_n_u_fifo, Py_False, Py_True); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_pdt_shortestpath, 1721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_tuple__118 = PyTuple_Pack(3, __pyx_n_u_fifo, Py_False, Py_True); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__118); __Pyx_GIVEREF(__pyx_tuple__118); - /* "_pynini.pyx":1782 + /* "_pynini.pyx":1799 * yield (self._parens[_i].first, self._parens[_i].second, self._assign[_i]) * * cpdef MPdtParentheses copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 1782, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1782, __pyx_L1_error) + __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy, 1799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1799, __pyx_L1_error) - /* "_pynini.pyx":1796 + /* "_pynini.pyx":1813 * return result * * cpdef void add_triple(self, int64_t push, int64_t pop, int64_t assignment): # <<<<<<<<<<<<<< * """ * add_triple(self, push, pop, assignment) */ - __pyx_tuple__120 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_push, __pyx_n_s_pop, __pyx_n_s_assignment); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_tuple__120 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_push, __pyx_n_s_pop, __pyx_n_s_assignment); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__120); __Pyx_GIVEREF(__pyx_tuple__120); - __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add_triple, 1796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add_triple, 1813, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1813, __pyx_L1_error) - /* "_pynini.pyx":1812 + /* "_pynini.pyx":1829 * self._assign.push_back(assignment) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 1812, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_read, 1829, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1829, __pyx_L1_error) - /* "_pynini.pyx":1839 + /* "_pynini.pyx":1855 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< * """ * write(self, filename) */ - __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_write, 1839, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_write, 1855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1855, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -45022,164 +45565,164 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "_pynini.pyx":1858 + /* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< * compose_filter="paren", bool left_mpdt=True): * """ */ - __pyx_tuple__126 = PyTuple_Pack(5, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_parens, __pyx_n_s_compose_filter, __pyx_n_s_left_mpdt); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 1858, __pyx_L1_error) + __pyx_tuple__126 = PyTuple_Pack(5, __pyx_n_s_fst1, __pyx_n_s_fst2, __pyx_n_s_parens, __pyx_n_s_compose_filter, __pyx_n_s_left_mpdt); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__126); __Pyx_GIVEREF(__pyx_tuple__126); - __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_compose, 1858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1858, __pyx_L1_error) - __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_u_paren, Py_True); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 1858, __pyx_L1_error) + __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_compose, 1874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1874, __pyx_L1_error) + __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_u_paren, Py_True); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); - /* "_pynini.pyx":1908 + /* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< * MPdtParentheses parens, * bool connect=True, */ - __pyx_tuple__129 = PyTuple_Pack(4, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_connect, __pyx_n_s_keep_parentheses); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1908, __pyx_L1_error) + __pyx_tuple__129 = PyTuple_Pack(4, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_connect, __pyx_n_s_keep_parentheses); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); - __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_expand, 1908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1908, __pyx_L1_error) - __pyx_tuple__131 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 1908, __pyx_L1_error) + __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_expand, 1924, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1924, __pyx_L1_error) + __pyx_tuple__131 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); - /* "_pynini.pyx":1950 + /* "_pynini.pyx":1966 * * * def mpdt_reverse(fst, MPdtParentheses parens): # <<<<<<<<<<<<<< * """ * mpdt_reverse(fst, parens) */ - __pyx_tuple__132 = PyTuple_Pack(5, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_fst_2, __pyx_n_s_result_fst, __pyx_n_s_result_parens); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_tuple__132 = PyTuple_Pack(5, __pyx_n_s_fst, __pyx_n_s_parens, __pyx_n_s_fst_2, __pyx_n_s_result_fst, __pyx_n_s_result_parens); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__132); __Pyx_GIVEREF(__pyx_tuple__132); - __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_reverse, 1950, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mpdt_reverse, 1966, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1966, __pyx_L1_error) - /* "_pynini.pyx":2054 + /* "_pynini.pyx":2070 * raise FstOpError("Operation failed") * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_done, 2054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 2054, __pyx_L1_error) + __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_done, 2070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 2070, __pyx_L1_error) - /* "_pynini.pyx":2065 + /* "_pynini.pyx":2081 * return self._paths.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< * """ * error(self) */ - __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_error, 2065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_error, 2081, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2081, __pyx_L1_error) - /* "_pynini.pyx":2076 + /* "_pynini.pyx":2092 * return self._paths.get().Error() * * def ilabels(self): # <<<<<<<<<<<<<< * """ * ilabels(self) */ - __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ilabels, 2076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ilabels, 2092, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 2092, __pyx_L1_error) - /* "_pynini.pyx":2087 + /* "_pynini.pyx":2103 * return self._paths.get().ILabels() * * def olabels(self): # <<<<<<<<<<<<<< * """ * olabels(self) */ - __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_olabels, 2087, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2087, __pyx_L1_error) + __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_olabels, 2103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2103, __pyx_L1_error) - /* "_pynini.pyx":2098 + /* "_pynini.pyx":2114 * return self._paths.get().OLabels() * * cpdef string istring(self): # <<<<<<<<<<<<<< * """ * istring(self) */ - __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_istring, 2098, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_istring, 2114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 2114, __pyx_L1_error) - /* "_pynini.pyx":2109 + /* "_pynini.pyx":2125 * return self._paths.get().IString() * * def istrings(self): # <<<<<<<<<<<<<< * """ * istrings(self) */ - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_istrings, 2109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 2109, __pyx_L1_error) + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_istrings, 2125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 2125, __pyx_L1_error) - /* "_pynini.pyx":2125 + /* "_pynini.pyx":2141 * self._paths.get().Next() * * def items(self): # <<<<<<<<<<<<<< * """ * items(self) */ - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_items, 2125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_items, 2141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 2141, __pyx_L1_error) - /* "_pynini.pyx":2142 + /* "_pynini.pyx":2158 * self._paths.get().Next() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_next, 2142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2142, __pyx_L1_error) + __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_next, 2158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2158, __pyx_L1_error) - /* "_pynini.pyx":2150 + /* "_pynini.pyx":2166 * self._paths.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reset, 2150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reset, 2166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2166, __pyx_L1_error) - /* "_pynini.pyx":2158 + /* "_pynini.pyx":2174 * self._paths.get().Reset() * * cpdef string ostring(self): # <<<<<<<<<<<<<< * """ * ostring(self) */ - __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ostring, 2158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ostring, 2174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2174, __pyx_L1_error) - /* "_pynini.pyx":2169 + /* "_pynini.pyx":2185 * return self._paths.get().OString() * * def ostrings(self): # <<<<<<<<<<<<<< * """ * ostrings(self) */ - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ostrings, 2169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 2169, __pyx_L1_error) + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_ostrings, 2185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 2185, __pyx_L1_error) - /* "_pynini.pyx":2185 + /* "_pynini.pyx":2201 * self._paths.get().Next() * * cpdef _Weight weight(self): # <<<<<<<<<<<<<< * """ * weight(self) */ - __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_weight, 2185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_weight, 2201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2201, __pyx_L1_error) - /* "_pynini.pyx":2198 + /* "_pynini.pyx":2214 * return weight * * def weights(self): # <<<<<<<<<<<<<< * """ * weights(self) */ - __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_weights, 2198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_weights, 2214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 2214, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -45196,158 +45739,158 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pynini.pyx":2275 + /* "_pynini.pyx":2291 * # API shared between FarReader and FarWriter. * * cpdef bool error(self) except *: # <<<<<<<<<<<<<< * """ * error(self) */ - __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_error, 2275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 2275, __pyx_L1_error) + __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_error, 2291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 2291, __pyx_L1_error) - /* "_pynini.pyx":2291 + /* "_pynini.pyx":2307 * return False * * cpdef string arc_type(self) except *: # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_arc_type, 2291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 2291, __pyx_L1_error) + __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_arc_type, 2307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 2307, __pyx_L1_error) - /* "_pynini.pyx":2306 + /* "_pynini.pyx":2322 * return self._writer.arc_type() * * cpdef bool closed(self): # <<<<<<<<<<<<<< * """ * closed(self) */ - __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_closed, 2306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 2306, __pyx_L1_error) + __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_closed, 2322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 2322, __pyx_L1_error) - /* "_pynini.pyx":2314 + /* "_pynini.pyx":2330 * return self._mode == b"c" * * cpdef string far_type(self) except *: # <<<<<<<<<<<<<< * """far_type(self) * */ - __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_far_type, 2314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2314, __pyx_L1_error) + __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_far_type, 2330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2330, __pyx_L1_error) - /* "_pynini.pyx":2328 + /* "_pynini.pyx":2344 * return self._writer.far_type() * * cpdef string mode(self): # <<<<<<<<<<<<<< * """ * mode(self) */ - __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mode, 2328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2328, __pyx_L1_error) + __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_mode, 2344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2344, __pyx_L1_error) - /* "_pynini.pyx":2336 + /* "_pynini.pyx":2352 * return f"{self._mode:c}" * * cpdef string name(self): # <<<<<<<<<<<<<< * """ * name(self) */ - __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_name_2, 2336, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_name_2, 2352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 2352, __pyx_L1_error) - /* "_pynini.pyx":2346 + /* "_pynini.pyx":2362 * # FarReader API. * * cpdef bool done(self) except *: # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_done, 2346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2346, __pyx_L1_error) + __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_done, 2362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2362, __pyx_L1_error) - /* "_pynini.pyx":2362 + /* "_pynini.pyx":2378 * return self._reader.done() * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< * """ * find(self, key) */ - __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 2362, __pyx_L1_error) + __pyx_tuple__152 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 2378, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__152); __Pyx_GIVEREF(__pyx_tuple__152); - __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_find, 2362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 2362, __pyx_L1_error) + __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_find, 2378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 2378, __pyx_L1_error) - /* "_pynini.pyx":2382 + /* "_pynini.pyx":2398 * return self._reader.find(key) * * cpdef Fst get_fst(self): # <<<<<<<<<<<<<< * """ * get_fst(self) */ - __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_get_fst, 2382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_get_fst, 2398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2398, __pyx_L1_error) - /* "_pynini.pyx":2399 + /* "_pynini.pyx":2415 * return Fst.from_pywrapfst(self._reader.get_fst()) * * cpdef string get_key(self) except *: # <<<<<<<<<<<<<< * """ * get_key(self) */ - __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_get_key, 2399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2399, __pyx_L1_error) + __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_get_key, 2415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2415, __pyx_L1_error) - /* "_pynini.pyx":2415 + /* "_pynini.pyx":2431 * return self._reader.get_key() * * cpdef void next(self) except *: # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_next, 2415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 2415, __pyx_L1_error) + __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_next, 2431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 2431, __pyx_L1_error) - /* "_pynini.pyx":2428 + /* "_pynini.pyx":2444 * self._reader.next() * * cpdef void reset(self) except *: # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reset, 2428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2428, __pyx_L1_error) + __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_reset, 2444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2444, __pyx_L1_error) - /* "_pynini.pyx":2458 + /* "_pynini.pyx":2474 * # FarWriter API. * * cpdef void add(self, key, Fst fst): # <<<<<<<<<<<<<< * """ * add(self, key, fst) */ - __pyx_tuple__158 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 2458, __pyx_L1_error) + __pyx_tuple__158 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_fst); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__158); __Pyx_GIVEREF(__pyx_tuple__158); - __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add, 2458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2458, __pyx_L1_error) + __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_add, 2474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2474, __pyx_L1_error) - /* "_pynini.pyx":2483 + /* "_pynini.pyx":2499 * self._writer[key] = fst * * cpdef void close(self): # <<<<<<<<<<<<<< * """ * close(self) */ - __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_close, 2483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_close, 2499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2499, __pyx_L1_error) - /* "_pynini.pyx":2495 + /* "_pynini.pyx":2511 * # Adds support for use as a PEP-343 context manager. * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ - __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_enter, 2495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 2495, __pyx_L1_error) + __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_enter, 2511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 2511, __pyx_L1_error) - /* "_pynini.pyx":2498 + /* "_pynini.pyx":2514 * return self * * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< * self.close() * */ - __pyx_tuple__162 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc, __pyx_n_s_value, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_tuple__162 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc, __pyx_n_s_value, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__162); __Pyx_GIVEREF(__pyx_tuple__162); - __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_exit, 2498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_exit, 2514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 2514, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< @@ -45364,14 +45907,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(1, 16, __pyx_L1_error) - /* "_pynini.pyx":2621 + /* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(arg1, *args, **kwargs): */ - __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy_patch, 2621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 2621, __pyx_L1_error) + __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pynini_pyx, __pyx_n_s_copy_patch, 2641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 2641, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_PdtParentheses(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -45458,7 +46001,7 @@ static int __Pyx_modinit_type_init_code(void) { /*--- Type init code ---*/ __pyx_t_1 = PyImport_ImportModule("_pywrapfst"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_10_pywrapfst_VectorFst = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "VectorFst", sizeof(struct __pyx_obj_10_pywrapfst_VectorFst), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_VectorFst),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_VectorFst) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_VectorFst = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "VectorFst", sizeof(struct __pyx_obj_10_pywrapfst_VectorFst), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_VectorFst),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_VectorFst) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_VectorFst = (struct __pyx_vtabstruct_10_pywrapfst_VectorFst*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_VectorFst); if (unlikely(!__pyx_vtabptr_10_pywrapfst_VectorFst)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_vtabptr_7_pynini_Fst = &__pyx_vtable_7_pynini_Fst; __pyx_vtable_7_pynini_Fst.__pyx_base = *__pyx_vtabptr_10_pywrapfst_VectorFst; @@ -45469,12 +46012,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_7_pynini_Fst.copy = (struct __pyx_obj_7_pynini_Fst *(*)(struct __pyx_obj_7_pynini_Fst *, int __pyx_skip_dispatch))__pyx_f_7_pynini_3Fst_copy; __pyx_vtable_7_pynini_Fst._optimize = (void (*)(struct __pyx_obj_7_pynini_Fst *, struct __pyx_opt_args_7_pynini_3Fst__optimize *__pyx_optional_args))__pyx_f_7_pynini_3Fst__optimize; #if CYTHON_USE_TYPE_SPECS - __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_VectorFst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_VectorFst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_7_pynini_Fst = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_Fst_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_ptype_7_pynini_Fst)) __PYX_ERR(0, 332, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_Fst_spec, __pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(!__pyx_ptype_7_pynini_Fst)) __PYX_ERR(0, 333, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_Fst_spec, __pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 333, __pyx_L1_error) #else __pyx_ptype_7_pynini_Fst = &__pyx_type_7_pynini_Fst; #endif @@ -45483,7 +46026,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini_Fst->tp_base = __pyx_ptype_10_pywrapfst_VectorFst; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 332, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 333, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini_Fst->tp_print = 0; @@ -45495,31 +46038,31 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_7_pynini_Fst, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 332, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_7_pynini_Fst, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 333, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { - __pyx_wrapperbase_7_pynini_3Fst_34__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_7_pynini_3Fst_34__pow__.doc = __pyx_doc_7_pynini_3Fst_34__pow__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7_pynini_3Fst_34__pow__; + __pyx_wrapperbase_7_pynini_3Fst_38__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_7_pynini_3Fst_38__pow__.doc = __pyx_doc_7_pynini_3Fst_38__pow__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_7_pynini_3Fst_38__pow__; } } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini_Fst, __pyx_vtabptr_7_pynini_Fst) < 0) __PYX_ERR(0, 332, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini_Fst, __pyx_vtabptr_7_pynini_Fst) < 0) __PYX_ERR(0, 333, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 332, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 333, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *) __pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 332, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_SymbolTableView = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "SymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst_SymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_SymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_SymbolTableView) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *) __pyx_ptype_7_pynini_Fst) < 0) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_SymbolTableView = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "SymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst_SymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_SymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_SymbolTableView) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_SymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst_SymbolTableView)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_vtabptr_7_pynini__PointerSymbolTableView = &__pyx_vtable_7_pynini__PointerSymbolTableView; __pyx_vtable_7_pynini__PointerSymbolTableView.__pyx_base = *__pyx_vtabptr_10_pywrapfst_SymbolTableView; __pyx_vtable_7_pynini__PointerSymbolTableView.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_7_pynini_23_PointerSymbolTableView__raw; #if CYTHON_USE_TYPE_SPECS - __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_2 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_7_pynini__PointerSymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini__PointerSymbolTableView_spec, __pyx_t_2); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_ptype_7_pynini__PointerSymbolTableView)) __PYX_ERR(0, 1189, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini__PointerSymbolTableView_spec, __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (unlikely(!__pyx_ptype_7_pynini__PointerSymbolTableView)) __PYX_ERR(0, 1207, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini__PointerSymbolTableView_spec, __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #else __pyx_ptype_7_pynini__PointerSymbolTableView = &__pyx_type_7_pynini__PointerSymbolTableView; #endif @@ -45528,7 +46071,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini__PointerSymbolTableView->tp_base = __pyx_ptype_10_pywrapfst_SymbolTableView; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini__PointerSymbolTableView->tp_print = 0; @@ -45538,28 +46081,28 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini__PointerSymbolTableView->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini__PointerSymbolTableView, __pyx_vtabptr_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini__PointerSymbolTableView, __pyx_vtabptr_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PointerSymbolTableView, (PyObject *) __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PointerSymbolTableView, (PyObject *) __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1189, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini__PointerSymbolTableView) < 0) __PYX_ERR(0, 1207, __pyx_L1_error) #endif __pyx_vtabptr_7_pynini_PdtParentheses = &__pyx_vtable_7_pynini_PdtParentheses; __pyx_vtable_7_pynini_PdtParentheses.copy = (struct __pyx_obj_7_pynini_PdtParentheses *(*)(struct __pyx_obj_7_pynini_PdtParentheses *, int __pyx_skip_dispatch))__pyx_f_7_pynini_14PdtParentheses_copy; __pyx_vtable_7_pynini_PdtParentheses.add_pair = (void (*)(struct __pyx_obj_7_pynini_PdtParentheses *, int64_t, int64_t, int __pyx_skip_dispatch))__pyx_f_7_pynini_14PdtParentheses_add_pair; __pyx_vtable_7_pynini_PdtParentheses.write = (void (*)(struct __pyx_obj_7_pynini_PdtParentheses *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7_pynini_14PdtParentheses_write; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini_PdtParentheses = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_PdtParentheses_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_PdtParentheses)) __PYX_ERR(0, 1409, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_PdtParentheses_spec, __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_ptype_7_pynini_PdtParentheses = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_PdtParentheses_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_PdtParentheses)) __PYX_ERR(0, 1427, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_PdtParentheses_spec, __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #else __pyx_ptype_7_pynini_PdtParentheses = &__pyx_type_7_pynini_PdtParentheses; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini_PdtParentheses->tp_print = 0; @@ -45569,28 +46112,28 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini_PdtParentheses->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini_PdtParentheses, __pyx_vtabptr_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini_PdtParentheses, __pyx_vtabptr_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PdtParentheses, (PyObject *) __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PdtParentheses, (PyObject *) __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_PdtParentheses) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) #endif __pyx_vtabptr_7_pynini_MPdtParentheses = &__pyx_vtable_7_pynini_MPdtParentheses; __pyx_vtable_7_pynini_MPdtParentheses.copy = (struct __pyx_obj_7_pynini_MPdtParentheses *(*)(struct __pyx_obj_7_pynini_MPdtParentheses *, int __pyx_skip_dispatch))__pyx_f_7_pynini_15MPdtParentheses_copy; __pyx_vtable_7_pynini_MPdtParentheses.add_triple = (void (*)(struct __pyx_obj_7_pynini_MPdtParentheses *, int64_t, int64_t, int64_t, int __pyx_skip_dispatch))__pyx_f_7_pynini_15MPdtParentheses_add_triple; __pyx_vtable_7_pynini_MPdtParentheses.write = (void (*)(struct __pyx_obj_7_pynini_MPdtParentheses *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7_pynini_15MPdtParentheses_write; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini_MPdtParentheses = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_MPdtParentheses_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_MPdtParentheses)) __PYX_ERR(0, 1751, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_MPdtParentheses_spec, __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + __pyx_ptype_7_pynini_MPdtParentheses = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_MPdtParentheses_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_MPdtParentheses)) __PYX_ERR(0, 1768, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_MPdtParentheses_spec, __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #else __pyx_ptype_7_pynini_MPdtParentheses = &__pyx_type_7_pynini_MPdtParentheses; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini_MPdtParentheses->tp_print = 0; @@ -45600,13 +46143,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini_MPdtParentheses->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini_MPdtParentheses, __pyx_vtabptr_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini_MPdtParentheses, __pyx_vtabptr_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MPdtParentheses, (PyObject *) __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MPdtParentheses, (PyObject *) __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1751, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_MPdtParentheses) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) #endif __pyx_vtabptr_7_pynini__StringPathIterator = &__pyx_vtable_7_pynini__StringPathIterator; __pyx_vtable_7_pynini__StringPathIterator.done = (bool (*)(struct __pyx_obj_7_pynini__StringPathIterator *, int __pyx_skip_dispatch))__pyx_f_7_pynini_19_StringPathIterator_done; @@ -45617,15 +46160,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_7_pynini__StringPathIterator.ostring = (std::string (*)(struct __pyx_obj_7_pynini__StringPathIterator *, int __pyx_skip_dispatch))__pyx_f_7_pynini_19_StringPathIterator_ostring; __pyx_vtable_7_pynini__StringPathIterator.weight = (struct __pyx_obj_10_pywrapfst_Weight *(*)(struct __pyx_obj_7_pynini__StringPathIterator *, int __pyx_skip_dispatch))__pyx_f_7_pynini_19_StringPathIterator_weight; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini__StringPathIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini__StringPathIterator_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini__StringPathIterator)) __PYX_ERR(0, 1983, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini__StringPathIterator_spec, __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + __pyx_ptype_7_pynini__StringPathIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini__StringPathIterator_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini__StringPathIterator)) __PYX_ERR(0, 1999, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini__StringPathIterator_spec, __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #else __pyx_ptype_7_pynini__StringPathIterator = &__pyx_type_7_pynini__StringPathIterator; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini__StringPathIterator->tp_print = 0; @@ -45635,13 +46178,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini__StringPathIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini__StringPathIterator, __pyx_vtabptr_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini__StringPathIterator, __pyx_vtabptr_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringPathIterator, (PyObject *) __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringPathIterator, (PyObject *) __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1983, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini__StringPathIterator) < 0) __PYX_ERR(0, 1999, __pyx_L1_error) #endif __pyx_vtabptr_7_pynini_Far = &__pyx_vtable_7_pynini_Far; __pyx_vtable_7_pynini_Far._check_open = (void (*)(struct __pyx_obj_7_pynini_Far *))__pyx_f_7_pynini_3Far__check_open; @@ -45661,15 +46204,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_7_pynini_Far.add = (void (*)(struct __pyx_obj_7_pynini_Far *, PyObject *, struct __pyx_obj_7_pynini_Fst *, int __pyx_skip_dispatch))__pyx_f_7_pynini_3Far_add; __pyx_vtable_7_pynini_Far.close = (void (*)(struct __pyx_obj_7_pynini_Far *, int __pyx_skip_dispatch))__pyx_f_7_pynini_3Far_close; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini_Far = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_Far_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_Far)) __PYX_ERR(0, 2218, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_Far_spec, __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + __pyx_ptype_7_pynini_Far = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini_Far_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini_Far)) __PYX_ERR(0, 2234, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini_Far_spec, __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #else __pyx_ptype_7_pynini_Far = &__pyx_type_7_pynini_Far; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini_Far->tp_print = 0; @@ -45679,24 +46222,24 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_7_pynini_Far->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_7_pynini_Far, __pyx_vtabptr_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_7_pynini_Far, __pyx_vtabptr_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Far_2, (PyObject *) __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Far_2, (PyObject *) __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2218, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_7_pynini_Far) < 0) __PYX_ERR(0, 2234, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct__union = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct__union_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct__union)) __PYX_ERR(0, 680, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct__union_spec, __pyx_ptype_7_pynini___pyx_scope_struct__union) < 0) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct__union = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct__union_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct__union)) __PYX_ERR(0, 681, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct__union_spec, __pyx_ptype_7_pynini___pyx_scope_struct__union) < 0) __PYX_ERR(0, 681, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct__union = &__pyx_type_7_pynini___pyx_scope_struct__union; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct__union) < 0) __PYX_ERR(0, 680, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct__union) < 0) __PYX_ERR(0, 681, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct__union->tp_print = 0; @@ -45707,15 +46250,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 681, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 682, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_1_genexpr_spec, __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 682, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr = &__pyx_type_7_pynini___pyx_scope_struct_1_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 681, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 682, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_1_genexpr->tp_print = 0; @@ -45726,15 +46269,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_2__1arg_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch)) __PYX_ERR(0, 1223, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_2__1arg_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch) < 0) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_2__1arg_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch)) __PYX_ERR(0, 1241, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_2__1arg_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch = &__pyx_type_7_pynini___pyx_scope_struct_2__1arg_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch) < 0) __PYX_ERR(0, 1223, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_2__1arg_patch->tp_print = 0; @@ -45745,15 +46288,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_3__shortestdistance_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch)) __PYX_ERR(0, 1244, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_3__shortestdistance_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch) < 0) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_3__shortestdistance_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch)) __PYX_ERR(0, 1262, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_3__shortestdistance_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch = &__pyx_type_7_pynini___pyx_scope_struct_3__shortestdistance_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch) < 0) __PYX_ERR(0, 1244, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_3__shortestdistance_patch->tp_print = 0; @@ -45764,15 +46307,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_4__compose_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch)) __PYX_ERR(0, 1260, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_4__compose_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_4__compose_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch)) __PYX_ERR(0, 1278, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_4__compose_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch = &__pyx_type_7_pynini___pyx_scope_struct_4__compose_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_4__compose_patch->tp_print = 0; @@ -45783,15 +46326,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_5__difference_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch)) __PYX_ERR(0, 1275, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_5__difference_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_5__difference_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch)) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_5__difference_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch = &__pyx_type_7_pynini___pyx_scope_struct_5__difference_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_5__difference_patch->tp_print = 0; @@ -45802,15 +46345,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_6__comp_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch)) __PYX_ERR(0, 1293, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_6__comp_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_6__comp_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch)) __PYX_ERR(0, 1311, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_6__comp_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch = &__pyx_type_7_pynini___pyx_scope_struct_6__comp_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_6__comp_patch->tp_print = 0; @@ -45821,15 +46364,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_7___iter___spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_7___iter__)) __PYX_ERR(0, 1433, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_7___iter___spec, __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_7___iter___spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_7___iter__)) __PYX_ERR(0, 1451, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_7___iter___spec, __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__ = &__pyx_type_7_pynini___pyx_scope_struct_7___iter__; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1433, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_7___iter__) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_7___iter__->tp_print = 0; @@ -45840,15 +46383,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_8___iter___spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_8___iter__)) __PYX_ERR(0, 1777, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_8___iter___spec, __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__) < 0) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_8___iter___spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_8___iter__)) __PYX_ERR(0, 1794, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_8___iter___spec, __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__) < 0) __PYX_ERR(0, 1794, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__ = &__pyx_type_7_pynini___pyx_scope_struct_8___iter__; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_8___iter__) < 0) __PYX_ERR(0, 1777, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_8___iter__) < 0) __PYX_ERR(0, 1794, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_8___iter__->tp_print = 0; @@ -45859,15 +46402,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_9_istrings_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_9_istrings)) __PYX_ERR(0, 2109, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_9_istrings_spec, __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings) < 0) __PYX_ERR(0, 2109, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_9_istrings_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_9_istrings)) __PYX_ERR(0, 2125, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_9_istrings_spec, __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings = &__pyx_type_7_pynini___pyx_scope_struct_9_istrings; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_9_istrings) < 0) __PYX_ERR(0, 2109, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_9_istrings) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_9_istrings->tp_print = 0; @@ -45878,15 +46421,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_10_items = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_10_items_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_10_items)) __PYX_ERR(0, 2125, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_10_items_spec, __pyx_ptype_7_pynini___pyx_scope_struct_10_items) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_10_items = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_10_items_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_10_items)) __PYX_ERR(0, 2141, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_10_items_spec, __pyx_ptype_7_pynini___pyx_scope_struct_10_items) < 0) __PYX_ERR(0, 2141, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_10_items = &__pyx_type_7_pynini___pyx_scope_struct_10_items; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_10_items) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_10_items) < 0) __PYX_ERR(0, 2141, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_10_items->tp_print = 0; @@ -45897,15 +46440,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_11_ostrings_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings)) __PYX_ERR(0, 2169, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_11_ostrings_spec, __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings) < 0) __PYX_ERR(0, 2169, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_11_ostrings_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings)) __PYX_ERR(0, 2185, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_11_ostrings_spec, __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings) < 0) __PYX_ERR(0, 2185, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings = &__pyx_type_7_pynini___pyx_scope_struct_11_ostrings; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings) < 0) __PYX_ERR(0, 2169, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings) < 0) __PYX_ERR(0, 2185, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_11_ostrings->tp_print = 0; @@ -45916,15 +46459,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_12_weights = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_12_weights_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_12_weights)) __PYX_ERR(0, 2198, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_12_weights_spec, __pyx_ptype_7_pynini___pyx_scope_struct_12_weights) < 0) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_12_weights = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_12_weights_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_12_weights)) __PYX_ERR(0, 2214, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_12_weights_spec, __pyx_ptype_7_pynini___pyx_scope_struct_12_weights) < 0) __PYX_ERR(0, 2214, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_12_weights = &__pyx_type_7_pynini___pyx_scope_struct_12_weights; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_12_weights) < 0) __PYX_ERR(0, 2198, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_12_weights) < 0) __PYX_ERR(0, 2214, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_12_weights->tp_print = 0; @@ -45935,15 +46478,15 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_13__copy_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch)) __PYX_ERR(0, 2621, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_13__copy_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch) < 0) __PYX_ERR(0, 2621, __pyx_L1_error) + __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7_pynini___pyx_scope_struct_13__copy_patch_spec, NULL); if (unlikely(!__pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch)) __PYX_ERR(0, 2641, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7_pynini___pyx_scope_struct_13__copy_patch_spec, __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch) < 0) __PYX_ERR(0, 2641, __pyx_L1_error) #else __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch = &__pyx_type_7_pynini___pyx_scope_struct_13__copy_patch; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch) < 0) __PYX_ERR(0, 2621, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch) < 0) __PYX_ERR(0, 2641, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_7_pynini___pyx_scope_struct_13__copy_patch->tp_print = 0; @@ -45971,41 +46514,41 @@ static int __Pyx_modinit_type_import_code(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule("_pywrapfst"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 72, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("_pywrapfst"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_10_pywrapfst_Weight = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "Weight", sizeof(struct __pyx_obj_10_pywrapfst_Weight), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_Weight),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_Weight) __PYX_ERR(2, 72, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_Weight = (struct __pyx_vtabstruct_10_pywrapfst_Weight*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Weight); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Weight)) __PYX_ERR(2, 72, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_EncodeMapperSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) __PYX_ERR(2, 139, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView)) __PYX_ERR(2, 139, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__FstSymbolTableView = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_FstSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__FstSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__FstSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__FstSymbolTableView) __PYX_ERR(2, 147, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__FstSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__FstSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__FstSymbolTableView)) __PYX_ERR(2, 147, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__MutableSymbolTable = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_MutableSymbolTable", sizeof(struct __pyx_obj_10_pywrapfst__MutableSymbolTable), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__MutableSymbolTable),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__MutableSymbolTable) __PYX_ERR(2, 155, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__MutableSymbolTable = (struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableSymbolTable)) __PYX_ERR(2, 155, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_MutableFstSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) __PYX_ERR(2, 168, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView)) __PYX_ERR(2, 168, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_SymbolTable = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "SymbolTable", sizeof(struct __pyx_obj_10_pywrapfst_SymbolTable), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_SymbolTable),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_SymbolTable) __PYX_ERR(2, 176, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_SymbolTable = (struct __pyx_vtabstruct_10_pywrapfst_SymbolTable*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_SymbolTable); if (unlikely(!__pyx_vtabptr_10_pywrapfst_SymbolTable)) __PYX_ERR(2, 176, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__SymbolTableIterator = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_SymbolTableIterator", sizeof(struct __pyx_obj_10_pywrapfst__SymbolTableIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__SymbolTableIterator),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__SymbolTableIterator) __PYX_ERR(2, 199, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_EncodeMapper = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "EncodeMapper", sizeof(struct __pyx_obj_10_pywrapfst_EncodeMapper), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_EncodeMapper),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_EncodeMapper) __PYX_ERR(2, 211, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_EncodeMapper = (struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_EncodeMapper); if (unlikely(!__pyx_vtabptr_10_pywrapfst_EncodeMapper)) __PYX_ERR(2, 211, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_Fst = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "Fst", sizeof(struct __pyx_obj_10_pywrapfst_Fst), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_Fst),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_Fst) __PYX_ERR(2, 248, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_Fst = (struct __pyx_vtabstruct_10_pywrapfst_Fst*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Fst); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Fst)) __PYX_ERR(2, 248, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_MutableFst = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "MutableFst", sizeof(struct __pyx_obj_10_pywrapfst_MutableFst), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_MutableFst),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_MutableFst) __PYX_ERR(2, 314, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_MutableFst = (struct __pyx_vtabstruct_10_pywrapfst_MutableFst*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_MutableFst); if (unlikely(!__pyx_vtabptr_10_pywrapfst_MutableFst)) __PYX_ERR(2, 314, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_Arc = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "Arc", sizeof(struct __pyx_obj_10_pywrapfst_Arc), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_Arc),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_Arc) __PYX_ERR(2, 417, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_Arc = (struct __pyx_vtabstruct_10_pywrapfst_Arc*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Arc); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Arc)) __PYX_ERR(2, 417, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__ArcIterator = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_ArcIterator", sizeof(struct __pyx_obj_10_pywrapfst__ArcIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__ArcIterator),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__ArcIterator) __PYX_ERR(2, 427, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__ArcIterator = (struct __pyx_vtabstruct_10_pywrapfst__ArcIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__ArcIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__ArcIterator)) __PYX_ERR(2, 427, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__MutableArcIterator = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_MutableArcIterator", sizeof(struct __pyx_obj_10_pywrapfst__MutableArcIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__MutableArcIterator),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__MutableArcIterator) __PYX_ERR(2, 449, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__MutableArcIterator = (struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableArcIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableArcIterator)) __PYX_ERR(2, 449, __pyx_L1_error) - __pyx_ptype_10_pywrapfst__StateIterator = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "_StateIterator", sizeof(struct __pyx_obj_10_pywrapfst__StateIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst__StateIterator),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst__StateIterator) __PYX_ERR(2, 473, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst__StateIterator = (struct __pyx_vtabstruct_10_pywrapfst__StateIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__StateIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__StateIterator)) __PYX_ERR(2, 473, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_Compiler = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "Compiler", sizeof(struct __pyx_obj_10_pywrapfst_Compiler), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_Compiler),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_Compiler) __PYX_ERR(2, 595, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_Compiler = (struct __pyx_vtabstruct_10_pywrapfst_Compiler*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Compiler); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Compiler)) __PYX_ERR(2, 595, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_FarReader = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "FarReader", sizeof(struct __pyx_obj_10_pywrapfst_FarReader), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_FarReader),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_FarReader) __PYX_ERR(2, 616, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_FarReader = (struct __pyx_vtabstruct_10_pywrapfst_FarReader*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_FarReader); if (unlikely(!__pyx_vtabptr_10_pywrapfst_FarReader)) __PYX_ERR(2, 616, __pyx_L1_error) - __pyx_ptype_10_pywrapfst_FarWriter = __Pyx_ImportType_3_0_3(__pyx_t_1, "_pywrapfst", "FarWriter", sizeof(struct __pyx_obj_10_pywrapfst_FarWriter), __PYX_GET_STRUCT_ALIGNMENT_3_0_3(struct __pyx_obj_10_pywrapfst_FarWriter),__Pyx_ImportType_CheckSize_Warn_3_0_3); if (!__pyx_ptype_10_pywrapfst_FarWriter) __PYX_ERR(2, 641, __pyx_L1_error) - __pyx_vtabptr_10_pywrapfst_FarWriter = (struct __pyx_vtabstruct_10_pywrapfst_FarWriter*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_FarWriter); if (unlikely(!__pyx_vtabptr_10_pywrapfst_FarWriter)) __PYX_ERR(2, 641, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Weight = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "Weight", sizeof(struct __pyx_obj_10_pywrapfst_Weight), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_Weight),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_Weight) __PYX_ERR(2, 70, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_Weight = (struct __pyx_vtabstruct_10_pywrapfst_Weight*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Weight); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Weight)) __PYX_ERR(2, 70, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_EncodeMapperSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) __PYX_ERR(2, 135, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView)) __PYX_ERR(2, 135, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__FstSymbolTableView = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_FstSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__FstSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__FstSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__FstSymbolTableView) __PYX_ERR(2, 143, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__FstSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__FstSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__FstSymbolTableView)) __PYX_ERR(2, 143, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__MutableSymbolTable = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_MutableSymbolTable", sizeof(struct __pyx_obj_10_pywrapfst__MutableSymbolTable), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__MutableSymbolTable),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__MutableSymbolTable) __PYX_ERR(2, 151, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__MutableSymbolTable = (struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableSymbolTable)) __PYX_ERR(2, 151, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_MutableFstSymbolTableView", sizeof(struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) __PYX_ERR(2, 164, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView = (struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView)) __PYX_ERR(2, 164, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_SymbolTable = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "SymbolTable", sizeof(struct __pyx_obj_10_pywrapfst_SymbolTable), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_SymbolTable),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_SymbolTable) __PYX_ERR(2, 172, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_SymbolTable = (struct __pyx_vtabstruct_10_pywrapfst_SymbolTable*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_SymbolTable); if (unlikely(!__pyx_vtabptr_10_pywrapfst_SymbolTable)) __PYX_ERR(2, 172, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__SymbolTableIterator = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_SymbolTableIterator", sizeof(struct __pyx_obj_10_pywrapfst__SymbolTableIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__SymbolTableIterator),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__SymbolTableIterator) __PYX_ERR(2, 195, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_EncodeMapper = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "EncodeMapper", sizeof(struct __pyx_obj_10_pywrapfst_EncodeMapper), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_EncodeMapper),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_EncodeMapper) __PYX_ERR(2, 207, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_EncodeMapper = (struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_EncodeMapper); if (unlikely(!__pyx_vtabptr_10_pywrapfst_EncodeMapper)) __PYX_ERR(2, 207, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Fst = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "Fst", sizeof(struct __pyx_obj_10_pywrapfst_Fst), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_Fst),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_Fst) __PYX_ERR(2, 244, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_Fst = (struct __pyx_vtabstruct_10_pywrapfst_Fst*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Fst); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Fst)) __PYX_ERR(2, 244, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_MutableFst = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "MutableFst", sizeof(struct __pyx_obj_10_pywrapfst_MutableFst), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_MutableFst),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_MutableFst) __PYX_ERR(2, 310, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_MutableFst = (struct __pyx_vtabstruct_10_pywrapfst_MutableFst*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_MutableFst); if (unlikely(!__pyx_vtabptr_10_pywrapfst_MutableFst)) __PYX_ERR(2, 310, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Arc = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "Arc", sizeof(struct __pyx_obj_10_pywrapfst_Arc), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_Arc),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_Arc) __PYX_ERR(2, 413, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_Arc = (struct __pyx_vtabstruct_10_pywrapfst_Arc*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Arc); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Arc)) __PYX_ERR(2, 413, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__ArcIterator = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_ArcIterator", sizeof(struct __pyx_obj_10_pywrapfst__ArcIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__ArcIterator),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__ArcIterator) __PYX_ERR(2, 423, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__ArcIterator = (struct __pyx_vtabstruct_10_pywrapfst__ArcIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__ArcIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__ArcIterator)) __PYX_ERR(2, 423, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__MutableArcIterator = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_MutableArcIterator", sizeof(struct __pyx_obj_10_pywrapfst__MutableArcIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__MutableArcIterator),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__MutableArcIterator) __PYX_ERR(2, 445, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__MutableArcIterator = (struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__MutableArcIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__MutableArcIterator)) __PYX_ERR(2, 445, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__StateIterator = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "_StateIterator", sizeof(struct __pyx_obj_10_pywrapfst__StateIterator), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst__StateIterator),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst__StateIterator) __PYX_ERR(2, 469, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst__StateIterator = (struct __pyx_vtabstruct_10_pywrapfst__StateIterator*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst__StateIterator); if (unlikely(!__pyx_vtabptr_10_pywrapfst__StateIterator)) __PYX_ERR(2, 469, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Compiler = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "Compiler", sizeof(struct __pyx_obj_10_pywrapfst_Compiler), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_Compiler),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_Compiler) __PYX_ERR(2, 591, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_Compiler = (struct __pyx_vtabstruct_10_pywrapfst_Compiler*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_Compiler); if (unlikely(!__pyx_vtabptr_10_pywrapfst_Compiler)) __PYX_ERR(2, 591, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_FarReader = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "FarReader", sizeof(struct __pyx_obj_10_pywrapfst_FarReader), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_FarReader),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_FarReader) __PYX_ERR(2, 611, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_FarReader = (struct __pyx_vtabstruct_10_pywrapfst_FarReader*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_FarReader); if (unlikely(!__pyx_vtabptr_10_pywrapfst_FarReader)) __PYX_ERR(2, 611, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_FarWriter = __Pyx_ImportType_3_0_7(__pyx_t_1, "_pywrapfst", "FarWriter", sizeof(struct __pyx_obj_10_pywrapfst_FarWriter), __PYX_GET_STRUCT_ALIGNMENT_3_0_7(struct __pyx_obj_10_pywrapfst_FarWriter),__Pyx_ImportType_CheckSize_Warn_3_0_7); if (!__pyx_ptype_10_pywrapfst_FarWriter) __PYX_ERR(2, 636, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_FarWriter = (struct __pyx_vtabstruct_10_pywrapfst_FarWriter*)__Pyx_GetVtable(__pyx_ptype_10_pywrapfst_FarWriter); if (unlikely(!__pyx_vtabptr_10_pywrapfst_FarWriter)) __PYX_ERR(2, 636, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -46033,15 +46576,15 @@ static int __Pyx_modinit_function_import_code(void) { /*--- Function import code ---*/ __pyx_t_1 = PyImport_ImportModule("_pywrapfst"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "tostring", (void (**)(void))&__pyx_f_10_pywrapfst_tostring, "std::string (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "path_tostring", (void (**)(void))&__pyx_f_10_pywrapfst_path_tostring, "std::string (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "_get_compose_filter", (void (**)(void))&__pyx_f_10_pywrapfst__get_compose_filter, "enum fst::ComposeFilter (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "_get_queue_type", (void (**)(void))&__pyx_f_10_pywrapfst__get_queue_type, "enum fst::QueueType (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "_get_replace_label_type", (void (**)(void))&__pyx_f_10_pywrapfst__get_replace_label_type, "enum fst::ReplaceLabelType (std::string const &, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "_get_WeightClass_or_one", (void (**)(void))&__pyx_f_10_pywrapfst__get_WeightClass_or_one, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "_get_WeightClass_or_zero", (void (**)(void))&__pyx_f_10_pywrapfst__get_WeightClass_or_zero, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "equal", (void (**)(void))&__pyx_f_10_pywrapfst_equal, "bool (struct __pyx_obj_10_pywrapfst_Fst *, struct __pyx_obj_10_pywrapfst_Fst *, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_equal *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction_3_0_3(__pyx_t_1, "replace", (void (**)(void))&__pyx_f_10_pywrapfst_replace, "struct __pyx_obj_10_pywrapfst_MutableFst *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_replace *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "tostring", (void (**)(void))&__pyx_f_10_pywrapfst_tostring, "std::string (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "path_tostring", (void (**)(void))&__pyx_f_10_pywrapfst_path_tostring, "std::string (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_get_compose_filter", (void (**)(void))&__pyx_f_10_pywrapfst__get_compose_filter, "enum fst::ComposeFilter (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_get_queue_type", (void (**)(void))&__pyx_f_10_pywrapfst__get_queue_type, "enum fst::QueueType (std::string const &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_get_replace_label_type", (void (**)(void))&__pyx_f_10_pywrapfst__get_replace_label_type, "enum fst::ReplaceLabelType (std::string const &, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_get_WeightClass_or_one", (void (**)(void))&__pyx_f_10_pywrapfst__get_WeightClass_or_one, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "_get_WeightClass_or_zero", (void (**)(void))&__pyx_f_10_pywrapfst__get_WeightClass_or_zero, "fst::script::WeightClass (std::string const &, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "equal", (void (**)(void))&__pyx_f_10_pywrapfst_equal, "bool (struct __pyx_obj_10_pywrapfst_Fst *, struct __pyx_obj_10_pywrapfst_Fst *, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_equal *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_0_7(__pyx_t_1, "replace", (void (**)(void))&__pyx_f_10_pywrapfst_replace, "struct __pyx_obj_10_pywrapfst_MutableFst *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_replace *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -46242,7 +46785,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__pynini(PyObject *__pyx_pyinit_mod __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); - __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to _pynini pseudovariable */ + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_pynini" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } @@ -46254,10 +46797,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__pynini(PyObject *__pyx_pyinit_mod CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -46334,537 +46875,537 @@ if (!__Pyx_RefNanny) { if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - /* "_pynini.pyx":133 + /* "_pynini.pyx":134 * * * import contextlib # <<<<<<<<<<<<<< * import functools * import io */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_contextlib, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_contextlib, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_contextlib, __pyx_t_2) < 0) __PYX_ERR(0, 133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_contextlib, __pyx_t_2) < 0) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":134 + /* "_pynini.pyx":135 * * import contextlib * import functools # <<<<<<<<<<<<<< * import io * import os */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_functools, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_functools, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_functools, __pyx_t_2) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_functools, __pyx_t_2) < 0) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":135 + /* "_pynini.pyx":136 * import contextlib * import functools * import io # <<<<<<<<<<<<<< * import os * */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_io, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_io, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_io, __pyx_t_2) < 0) __PYX_ERR(0, 135, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_io, __pyx_t_2) < 0) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":136 + /* "_pynini.pyx":137 * import functools * import io * import os # <<<<<<<<<<<<<< * * from _pywrapfst import FstArgError */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 136, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":138 + /* "_pynini.pyx":139 * import os * * from _pywrapfst import FstArgError # <<<<<<<<<<<<<< * from _pywrapfst import FstIOError * from _pywrapfst import FstOpError */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_FstArgError); __Pyx_GIVEREF(__pyx_n_s_FstArgError); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_FstArgError)) __PYX_ERR(0, 138, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_FstArgError)) __PYX_ERR(0, 139, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_2) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_2) < 0) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":139 + /* "_pynini.pyx":140 * * from _pywrapfst import FstArgError * from _pywrapfst import FstIOError # <<<<<<<<<<<<<< * from _pywrapfst import FstOpError * */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_FstIOError); __Pyx_GIVEREF(__pyx_n_s_FstIOError); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_FstIOError)) __PYX_ERR(0, 139, __pyx_L1_error); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_FstIOError)) __PYX_ERR(0, 140, __pyx_L1_error); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_3) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_3) < 0) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":140 + /* "_pynini.pyx":141 * from _pywrapfst import FstArgError * from _pywrapfst import FstIOError * from _pywrapfst import FstOpError # <<<<<<<<<<<<<< * * import _pywrapfst */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_FstOpError); __Pyx_GIVEREF(__pyx_n_s_FstOpError); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_FstOpError)) __PYX_ERR(0, 140, __pyx_L1_error); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_FstOpError)) __PYX_ERR(0, 141, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_2) < 0) __PYX_ERR(0, 140, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_2) < 0) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":142 + /* "_pynini.pyx":143 * from _pywrapfst import FstOpError * * import _pywrapfst # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_pywrapfst, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_pywrapfst, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pywrapfst, __pyx_t_3) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pywrapfst, __pyx_t_3) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":148 + /* "_pynini.pyx":149 * * * class FstStringCompilationError(FstArgError, ValueError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 148, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 149, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstStringCompilationError, __pyx_n_s_FstStringCompilationError, (PyObject *) NULL, __pyx_n_s_pynini, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstStringCompilationError, __pyx_n_s_FstStringCompilationError, (PyObject *) NULL, __pyx_n_s_pynini, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3 != __pyx_t_2) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 148, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 149, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstStringCompilationError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstStringCompilationError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstStringCompilationError, __pyx_t_2) < 0) __PYX_ERR(0, 148, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstStringCompilationError, __pyx_t_2) < 0) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":289 + /* "_pynini.pyx":290 * * * class default_token_type(contextlib.ContextDecorator): # <<<<<<<<<<<<<< * """Override the default token_type used by Pynini functions and classes. * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_contextlib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_contextlib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ContextDecorator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ContextDecorator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_default_token_type, __pyx_n_s_default_token_type, (PyObject *) NULL, __pyx_n_s_pynini, __pyx_kp_s_Override_the_default_token_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_default_token_type, __pyx_n_s_default_token_type, (PyObject *) NULL, __pyx_n_s_pynini, __pyx_kp_s_Override_the_default_token_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 289, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 290, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":309 + /* "_pynini.pyx":310 * """ * * def __init__(self, token_type): # <<<<<<<<<<<<<< * self._token_type = token_type * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_1__init__, 0, __pyx_n_s_default_token_type___init, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_1__init__, 0, __pyx_n_s_default_token_type___init, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 309, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":312 + /* "_pynini.pyx":313 * self._token_type = token_type * * def __enter__(self): # <<<<<<<<<<<<<< * cdef _TokenType _token_type * cdef const_SymbolTable_ptr _symbols = NULL */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_3__enter__, 0, __pyx_n_s_default_token_type___enter, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_3__enter__, 0, __pyx_n_s_default_token_type___enter, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_enter, __pyx_t_3) < 0) __PYX_ERR(0, 312, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_enter, __pyx_t_3) < 0) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":322 + /* "_pynini.pyx":323 * PushDefaults(_token_type, _symbols) * * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<< * PopDefaults() * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_5__exit__, 0, __pyx_n_s_default_token_type___exit, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_18default_token_type_5__exit__, 0, __pyx_n_s_default_token_type___exit, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_exit, __pyx_t_3) < 0) __PYX_ERR(0, 322, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_exit, __pyx_t_3) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pynini.pyx":289 + /* "_pynini.pyx":290 * * * class default_token_type(contextlib.ContextDecorator): # <<<<<<<<<<<<<< * """Override the default token_type used by Pynini functions and classes. * */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_default_token_type, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_default_token_type, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_token_type, __pyx_t_3) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_token_type, __pyx_t_3) < 0) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":361 + /* "_pynini.pyx":362 * self._from_MutableFstClass(_tfst.release()) * * @classmethod # <<<<<<<<<<<<<< * def from_pywrapfst(cls, _Fst fst): * """ */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_3from_pywrapfst, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_from_pywrapfst, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_3from_pywrapfst, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_from_pywrapfst, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst, __pyx_t_4) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst, __pyx_t_4) < 0) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst, __pyx_t_5) < 0) __PYX_ERR(0, 361, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_from_pywrapfst, __pyx_t_5) < 0) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":383 + /* "_pynini.pyx":384 * return _from_pywrapfst(fst) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_5read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_5read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read, __pyx_t_5) < 0) __PYX_ERR(0, 383, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read, __pyx_t_5) < 0) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 383, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":401 + /* "_pynini.pyx":402 * return _read(filename) * * @classmethod # <<<<<<<<<<<<<< * def read_from_string(cls, state): * """ */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_7read_from_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_7read_from_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2, __pyx_t_4) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2, __pyx_t_4) < 0) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_read_from_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":421 + /* "_pynini.pyx":422 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_from_string, (self.write_to_string(),)) * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst___reduce, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst___reduce, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_reduce, __pyx_t_5) < 0) __PYX_ERR(0, 421, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_reduce, __pyx_t_5) < 0) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":424 + /* "_pynini.pyx":425 * return (_read_from_string, (self.write_to_string(),)) * * cpdef _StringPathIterator paths(self, input_token_type=None, # <<<<<<<<<<<<<< * output_token_type=None): * """ */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_11paths, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_paths, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_11paths, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_paths, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__43); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_paths, __pyx_t_5) < 0) __PYX_ERR(0, 424, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_paths, __pyx_t_5) < 0) __PYX_ERR(0, 425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":462 + /* "_pynini.pyx":463 * return _StringPathIterator(self, input_token_type, output_token_type) * * cpdef string string(self, token_type=None) except *: # <<<<<<<<<<<<<< * """ * string(self, token_type=None) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_13string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_13string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__45); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_string, __pyx_t_5) < 0) __PYX_ERR(0, 462, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_string, __pyx_t_5) < 0) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":512 + /* "_pynini.pyx":513 * # The following all override their definition in MutableFst. * * cpdef Fst copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_15copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_15copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_copy, __pyx_t_5) < 0) __PYX_ERR(0, 512, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_copy, __pyx_t_5) < 0) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":520 + /* "_pynini.pyx":521 * return _init_Fst_from_MutableFst(super(_MutableFst, self).copy()) * * def closure(self, int32_t lower=0, int32_t upper=0): # <<<<<<<<<<<<<< * """ * closure(self, lower) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_17closure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_closure, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_17closure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_closure, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__49); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_closure, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_closure, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":615 + /* "_pynini.pyx":616 * return result * * def concat(self, fst2): # <<<<<<<<<<<<<< * """ * concat(self, fst2) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_19concat, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_concat, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_19concat, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_concat, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_concat, __pyx_t_5) < 0) __PYX_ERR(0, 615, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_concat, __pyx_t_5) < 0) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":639 + /* "_pynini.pyx":640 * self._check_mutating_imethod() * * def optimize(self, bool compute_props=False): # <<<<<<<<<<<<<< * """ * optimize(self, compute_props=False) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_21optimize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_optimize, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_21optimize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_optimize, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__54); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_optimize, __pyx_t_5) < 0) __PYX_ERR(0, 639, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_optimize, __pyx_t_5) < 0) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":680 + /* "_pynini.pyx":681 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< * return super().union(*(_compile_or_copy_Fst(fst2, self.arc_type()) * for fst2 in fsts2)) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_23union, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_union, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Fst_23union, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_union, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_union, __pyx_t_5) < 0) __PYX_ERR(0, 680, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Fst, __pyx_n_s_union, __pyx_t_5) < 0) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Fst); - /* "_pynini.pyx":796 + /* "_pynini.pyx":814 * * * cpdef Fst _from_pywrapfst(_Fst fst): # <<<<<<<<<<<<<< * cdef Fst result = Fst.__new__(Fst) * result._from_MutableFstClass(new VectorFstClass(deref(fst._fst))) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_1_from_pywrapfst, 0, __pyx_n_s_from_pywrapfst_2, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_1_from_pywrapfst, 0, __pyx_n_s_from_pywrapfst_2, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_from_pywrapfst_2, __pyx_t_5) < 0) __PYX_ERR(0, 796, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_from_pywrapfst_2, __pyx_t_5) < 0) __PYX_ERR(0, 814, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":802 + /* "_pynini.pyx":820 * * * cpdef Fst _read(filename): # <<<<<<<<<<<<<< * return _from_pywrapfst(_pywrapfst.Fst.read(filename)) * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3_read, 0, __pyx_n_s_read_2, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3_read, 0, __pyx_n_s_read_2, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_2, __pyx_t_5) < 0) __PYX_ERR(0, 802, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_2, __pyx_t_5) < 0) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":806 + /* "_pynini.pyx":824 * * * cpdef Fst _read_from_string(state): # <<<<<<<<<<<<<< * return _from_pywrapfst(_pywrapfst.Fst.read_from_string(state)) * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_5_read_from_string, 0, __pyx_n_s_read_from_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_5_read_from_string, 0, __pyx_n_s_read_from_string, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_from_string, __pyx_t_5) < 0) __PYX_ERR(0, 806, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_from_string, __pyx_t_5) < 0) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":813 + /* "_pynini.pyx":831 * * * cpdef string escape(data): # <<<<<<<<<<<<<< * """ * escape(data) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_7escape, 0, __pyx_n_s_escape, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_7escape, 0, __pyx_n_s_escape, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_escape, __pyx_t_5) < 0) __PYX_ERR(0, 813, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_escape, __pyx_t_5) < 0) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":836 + /* "_pynini.pyx":854 * * * cpdef Fst accep(astring, weight=None, arc_type="standard", token_type=None): # <<<<<<<<<<<<<< * """ * accep(astring, weight=None, arc_type=None, token_type=None) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_9accep, 0, __pyx_n_s_accep, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_9accep, 0, __pyx_n_s_accep, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__67); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_accep, __pyx_t_5) < 0) __PYX_ERR(0, 836, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_accep, __pyx_t_5) < 0) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":896 + /* "_pynini.pyx":914 * * * cpdef Fst cross(fst1, fst2): # <<<<<<<<<<<<<< * """ * cross(fst1, fst2) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11cross, 0, __pyx_n_s_cross, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_11cross, 0, __pyx_n_s_cross, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cross, __pyx_t_5) < 0) __PYX_ERR(0, 896, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cross, __pyx_t_5) < 0) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":926 + /* "_pynini.pyx":944 * * * cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): # <<<<<<<<<<<<<< * """ * cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl") */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_13cdrewrite, 0, __pyx_n_s_cdrewrite, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_13cdrewrite, 0, __pyx_n_s_cdrewrite, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__72); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cdrewrite, __pyx_t_5) < 0) __PYX_ERR(0, 926, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cdrewrite, __pyx_t_5) < 0) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":986 + /* "_pynini.pyx":1004 * * * cpdef Fst leniently_compose(mu, nu, sigma_star, compose_filter="auto", # <<<<<<<<<<<<<< * bool connect=True): * """ */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15leniently_compose, 0, __pyx_n_s_leniently_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15leniently_compose, 0, __pyx_n_s_leniently_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__75); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_leniently_compose, __pyx_t_5) < 0) __PYX_ERR(0, 986, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_leniently_compose, __pyx_t_5) < 0) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1033 + /* "_pynini.pyx":1051 * * * cpdef Fst string_file(filename, # <<<<<<<<<<<<<< * arc_type="standard", * input_token_type=None, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_17string_file, 0, __pyx_n_s_string_file, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_17string_file, 0, __pyx_n_s_string_file, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__78); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_file, __pyx_t_5) < 0) __PYX_ERR(0, 1033, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_file, __pyx_t_5) < 0) __PYX_ERR(0, 1051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1113 + /* "_pynini.pyx":1131 * * * cpdef Fst string_map(lines, # <<<<<<<<<<<<<< * arc_type="standard", * input_token_type=None, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19string_map, 0, __pyx_n_s_string_map, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19string_map, 0, __pyx_n_s_string_map, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__81); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_map, __pyx_t_5) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_map, __pyx_t_5) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":1 @@ -46888,571 +47429,571 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1212 + /* "_pynini.pyx":1230 * * * cpdef _PointerSymbolTableView generated_symbols(): # <<<<<<<<<<<<<< * """Returns a view of a symbol table containing generated symbols.""" * cdef _PointerSymbolTableView _symbols = ( */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_21generated_symbols, 0, __pyx_n_s_generated_symbols, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_21generated_symbols, 0, __pyx_n_s_generated_symbols, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_generated_symbols, __pyx_t_5) < 0) __PYX_ERR(0, 1212, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_generated_symbols, __pyx_t_5) < 0) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1223 + /* "_pynini.pyx":1241 * * * def _1arg_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_23_1arg_patch, 0, __pyx_n_s_1arg_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_23_1arg_patch, 0, __pyx_n_s_1arg_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_1arg_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1223, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_1arg_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1231 + /* "_pynini.pyx":1249 * * * arcmap = _1arg_patch(_pywrapfst.arcmap) # <<<<<<<<<<<<<< * determinize = _1arg_patch(_pywrapfst.determinize) * disambiguate = _1arg_patch(_pywrapfst.disambiguate) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_arcmap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_arcmap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcmap, __pyx_t_4) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcmap, __pyx_t_4) < 0) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1232 + /* "_pynini.pyx":1250 * * arcmap = _1arg_patch(_pywrapfst.arcmap) * determinize = _1arg_patch(_pywrapfst.determinize) # <<<<<<<<<<<<<< * disambiguate = _1arg_patch(_pywrapfst.disambiguate) * epsnormalize = _1arg_patch(_pywrapfst.epsnormalize) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_determinize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_determinize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_determinize, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_determinize, __pyx_t_2) < 0) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1233 + /* "_pynini.pyx":1251 * arcmap = _1arg_patch(_pywrapfst.arcmap) * determinize = _1arg_patch(_pywrapfst.determinize) * disambiguate = _1arg_patch(_pywrapfst.disambiguate) # <<<<<<<<<<<<<< * epsnormalize = _1arg_patch(_pywrapfst.epsnormalize) * prune = _1arg_patch(_pywrapfst.prune) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_disambiguate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_disambiguate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_disambiguate, __pyx_t_5) < 0) __PYX_ERR(0, 1233, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_disambiguate, __pyx_t_5) < 0) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1234 + /* "_pynini.pyx":1252 * determinize = _1arg_patch(_pywrapfst.determinize) * disambiguate = _1arg_patch(_pywrapfst.disambiguate) * epsnormalize = _1arg_patch(_pywrapfst.epsnormalize) # <<<<<<<<<<<<<< * prune = _1arg_patch(_pywrapfst.prune) * push = _1arg_patch(_pywrapfst.push) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_epsnormalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_epsnormalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_epsnormalize, __pyx_t_4) < 0) __PYX_ERR(0, 1234, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_epsnormalize, __pyx_t_4) < 0) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1235 + /* "_pynini.pyx":1253 * disambiguate = _1arg_patch(_pywrapfst.disambiguate) * epsnormalize = _1arg_patch(_pywrapfst.epsnormalize) * prune = _1arg_patch(_pywrapfst.prune) # <<<<<<<<<<<<<< * push = _1arg_patch(_pywrapfst.push) * randgen = _1arg_patch(_pywrapfst.randgen) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prune); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prune); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prune, __pyx_t_2) < 0) __PYX_ERR(0, 1235, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prune, __pyx_t_2) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1236 + /* "_pynini.pyx":1254 * epsnormalize = _1arg_patch(_pywrapfst.epsnormalize) * prune = _1arg_patch(_pywrapfst.prune) * push = _1arg_patch(_pywrapfst.push) # <<<<<<<<<<<<<< * randgen = _1arg_patch(_pywrapfst.randgen) * reverse = _1arg_patch(_pywrapfst.reverse) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_push); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_push); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_push, __pyx_t_5) < 0) __PYX_ERR(0, 1236, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_push, __pyx_t_5) < 0) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1237 + /* "_pynini.pyx":1255 * prune = _1arg_patch(_pywrapfst.prune) * push = _1arg_patch(_pywrapfst.push) * randgen = _1arg_patch(_pywrapfst.randgen) # <<<<<<<<<<<<<< * reverse = _1arg_patch(_pywrapfst.reverse) * shortestpath = _1arg_patch(_pywrapfst.shortestpath) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_randgen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_randgen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_randgen, __pyx_t_4) < 0) __PYX_ERR(0, 1237, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_randgen, __pyx_t_4) < 0) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1238 + /* "_pynini.pyx":1256 * push = _1arg_patch(_pywrapfst.push) * randgen = _1arg_patch(_pywrapfst.randgen) * reverse = _1arg_patch(_pywrapfst.reverse) # <<<<<<<<<<<<<< * shortestpath = _1arg_patch(_pywrapfst.shortestpath) * statemap = _1arg_patch(_pywrapfst.statemap) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse, __pyx_t_2) < 0) __PYX_ERR(0, 1238, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse, __pyx_t_2) < 0) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1239 + /* "_pynini.pyx":1257 * randgen = _1arg_patch(_pywrapfst.randgen) * reverse = _1arg_patch(_pywrapfst.reverse) * shortestpath = _1arg_patch(_pywrapfst.shortestpath) # <<<<<<<<<<<<<< * statemap = _1arg_patch(_pywrapfst.statemap) * synchronize = _1arg_patch(_pywrapfst.synchronize) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shortestpath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shortestpath); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestpath, __pyx_t_5) < 0) __PYX_ERR(0, 1239, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestpath, __pyx_t_5) < 0) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1240 + /* "_pynini.pyx":1258 * reverse = _1arg_patch(_pywrapfst.reverse) * shortestpath = _1arg_patch(_pywrapfst.shortestpath) * statemap = _1arg_patch(_pywrapfst.statemap) # <<<<<<<<<<<<<< * synchronize = _1arg_patch(_pywrapfst.synchronize) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_statemap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_statemap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_statemap, __pyx_t_4) < 0) __PYX_ERR(0, 1240, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_statemap, __pyx_t_4) < 0) __PYX_ERR(0, 1258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1241 + /* "_pynini.pyx":1259 * shortestpath = _1arg_patch(_pywrapfst.shortestpath) * statemap = _1arg_patch(_pywrapfst.statemap) * synchronize = _1arg_patch(_pywrapfst.synchronize) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1241, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_1arg_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_synchronize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_synchronize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_synchronize, __pyx_t_2) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_synchronize, __pyx_t_2) < 0) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1244 + /* "_pynini.pyx":1262 * * * def _shortestdistance_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst, *args, **kwargs): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_25_shortestdistance_patch, 0, __pyx_n_s_shortestdistance_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_25_shortestdistance_patch, 0, __pyx_n_s_shortestdistance_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance_patch, __pyx_t_2) < 0) __PYX_ERR(0, 1244, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance_patch, __pyx_t_2) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1252 + /* "_pynini.pyx":1270 * * * shortestdistance = _shortestdistance_patch(_pywrapfst.shortestdistance) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_shortestdistance_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_shortestdistance_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shortestdistance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shortestdistance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_5) < 0) __PYX_ERR(0, 1252, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_5) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1260 + /* "_pynini.pyx":1278 * * * def _compose_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_27_compose_patch, 0, __pyx_n_s_compose_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_27_compose_patch, 0, __pyx_n_s_compose_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1271 + /* "_pynini.pyx":1289 * * * compose = _compose_patch(_pywrapfst.compose) # <<<<<<<<<<<<<< * intersect = _compose_patch(_pywrapfst.intersect) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_compose_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1271, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_compose_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose, __pyx_t_4) < 0) __PYX_ERR(0, 1271, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose, __pyx_t_4) < 0) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1272 + /* "_pynini.pyx":1290 * * compose = _compose_patch(_pywrapfst.compose) * intersect = _compose_patch(_pywrapfst.intersect) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_compose_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_compose_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_intersect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_intersect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_intersect, __pyx_t_2) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_intersect, __pyx_t_2) < 0) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1275 + /* "_pynini.pyx":1293 * * * def _difference_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_29_difference_patch, 0, __pyx_n_s_difference_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_29_difference_patch, 0, __pyx_n_s_difference_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference_patch, __pyx_t_2) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference_patch, __pyx_t_2) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1287 + /* "_pynini.pyx":1305 * * * difference = _difference_patch(_pywrapfst.difference) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_difference_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_difference_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_difference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_difference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference, __pyx_t_5) < 0) __PYX_ERR(0, 1287, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference, __pyx_t_5) < 0) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1293 + /* "_pynini.pyx":1311 * * * def _comp_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(fst1, fst2, *args, **kwargs): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_31_comp_patch, 0, __pyx_n_s_comp_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_31_comp_patch, 0, __pyx_n_s_comp_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_comp_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_comp_patch, __pyx_t_5) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1303 + /* "_pynini.pyx":1321 * * * equal = _comp_patch(_pywrapfst.equal) # <<<<<<<<<<<<<< * equivalent = _comp_patch(_pywrapfst.equivalent) * isomorphic = _comp_patch(_pywrapfst.isomorphic) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_equal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_equal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_equal, __pyx_t_4) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_equal, __pyx_t_4) < 0) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1304 + /* "_pynini.pyx":1322 * * equal = _comp_patch(_pywrapfst.equal) * equivalent = _comp_patch(_pywrapfst.equivalent) # <<<<<<<<<<<<<< * isomorphic = _comp_patch(_pywrapfst.isomorphic) * randequivalent = _comp_patch(_pywrapfst.randequivalent) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_equivalent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_equivalent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_equivalent, __pyx_t_2) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_equivalent, __pyx_t_2) < 0) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1305 + /* "_pynini.pyx":1323 * equal = _comp_patch(_pywrapfst.equal) * equivalent = _comp_patch(_pywrapfst.equivalent) * isomorphic = _comp_patch(_pywrapfst.isomorphic) # <<<<<<<<<<<<<< * randequivalent = _comp_patch(_pywrapfst.randequivalent) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isomorphic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isomorphic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1305, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_isomorphic, __pyx_t_5) < 0) __PYX_ERR(0, 1305, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_isomorphic, __pyx_t_5) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1306 + /* "_pynini.pyx":1324 * equivalent = _comp_patch(_pywrapfst.equivalent) * isomorphic = _comp_patch(_pywrapfst.isomorphic) * randequivalent = _comp_patch(_pywrapfst.randequivalent) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_comp_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pywrapfst); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_randequivalent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_randequivalent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_randequivalent, __pyx_t_4) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_randequivalent, __pyx_t_4) < 0) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1309 + /* "_pynini.pyx":1327 * * * cpdef Fst concat(fst1, fst2): # <<<<<<<<<<<<<< * """ * concat(fst1, fst2) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_33concat, 0, __pyx_n_s_concat, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_33concat, 0, __pyx_n_s_concat, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_concat, __pyx_t_4) < 0) __PYX_ERR(0, 1309, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_concat, __pyx_t_4) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1333 + /* "_pynini.pyx":1351 * * * cpdef Fst replace(pairs, # <<<<<<<<<<<<<< * call_arc_labeling="input", * return_arc_labeling="neither", */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_35replace, 0, __pyx_n_s_replace, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_35replace, 0, __pyx_n_s_replace, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__95); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_replace, __pyx_t_4) < 0) __PYX_ERR(0, 1333, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_replace, __pyx_t_4) < 0) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1385 + /* "_pynini.pyx":1403 * * * def union(*fsts): # <<<<<<<<<<<<<< * """ * union(*fsts) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_37union, 0, __pyx_n_s_union, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_37union, 0, __pyx_n_s_union, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_union, __pyx_t_4) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_union, __pyx_t_4) < 0) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1438 + /* "_pynini.pyx":1456 * yield (self._parens[_i].first, self._parens[_i].second) * * cpdef PdtParentheses copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_8copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_8copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_copy, __pyx_t_4) < 0) __PYX_ERR(0, 1438, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_copy, __pyx_t_4) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); - /* "_pynini.pyx":1451 + /* "_pynini.pyx":1469 * return result * * cpdef void add_pair(self, int64_t push, int64_t pop): # <<<<<<<<<<<<<< * """ * add_pair(self, push, pop) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_10add_pair, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_add_pair, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_10add_pair, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_add_pair, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_add_pair, __pyx_t_4) < 0) __PYX_ERR(0, 1451, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_add_pair, __pyx_t_4) < 0) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); - /* "_pynini.pyx":1463 + /* "_pynini.pyx":1481 * self._parens.push_back(pair[int64_t, int64_t](push, pop)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_12read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_12read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 1463, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); - __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1463, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1463, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); - /* "_pynini.pyx":1489 + /* "_pynini.pyx":1506 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< * """ * write(self, filename) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_14write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_write, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_14PdtParentheses_14write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PdtParentheses_write, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 1489, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_PdtParentheses, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); @@ -47479,84 +48020,84 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_7_pynini_PdtParentheses); - /* "_pynini.pyx":1511 + /* "_pynini.pyx":1528 * PdtParentheses parens, * compose_filter="paren", * bool left_pdt=True): # <<<<<<<<<<<<<< * """ * pdt_compose(fst1, fst2, parens, compose_filter="paren", left_pdt=True) */ - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pynini.pyx":1507 + /* "_pynini.pyx":1524 * * * def pdt_compose(fst1, # <<<<<<<<<<<<<< * fst2, * PdtParentheses parens, */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject*)__pyx_n_u_paren)); __Pyx_GIVEREF(((PyObject*)__pyx_n_u_paren)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject*)__pyx_n_u_paren))) __PYX_ERR(0, 1507, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject*)__pyx_n_u_paren))) __PYX_ERR(0, 1524, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_39pdt_compose, 0, __pyx_n_s_pdt_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_39pdt_compose, 0, __pyx_n_s_pdt_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_compose, __pyx_t_2) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_compose, __pyx_t_2) < 0) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":1560 + /* "_pynini.pyx":1577 * def pdt_expand(fst, * PdtParentheses parens, * bool connect=True, # <<<<<<<<<<<<<< * bool keep_parentheses=False, * weight=None): */ - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pynini.pyx":1561 + /* "_pynini.pyx":1578 * PdtParentheses parens, * bool connect=True, * bool keep_parentheses=False, # <<<<<<<<<<<<<< * weight=None): * """ */ - __pyx_t_4 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "_pynini.pyx":1558 + /* "_pynini.pyx":1575 * * * def pdt_expand(fst, # <<<<<<<<<<<<<< * PdtParentheses parens, * bool connect=True, */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None)) __PYX_ERR(0, 1558, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None)) __PYX_ERR(0, 1575, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_41pdt_expand, 0, __pyx_n_s_pdt_expand, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_41pdt_expand, 0, __pyx_n_s_pdt_expand, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_expand, __pyx_t_4) < 0) __PYX_ERR(0, 1558, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_expand, __pyx_t_4) < 0) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1606 + /* "_pynini.pyx":1623 * cdef object _pdt_replace(pairs, * pdt_parser_type="left", * int64_t start_paren_labels=kNoLabel, # <<<<<<<<<<<<<< @@ -47565,18 +48106,18 @@ if (!__Pyx_RefNanny) { */ __pyx_k__12 = fst::kNoLabel; - /* "_pynini.pyx":1628 + /* "_pynini.pyx":1645 * * * def pdt_replace(pairs, # <<<<<<<<<<<<<< * pdt_parser_type="left", * int64_t start_paren_labels=kNoLabel, */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_43pdt_replace, 0, __pyx_n_s_pdt_replace, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_43pdt_replace, 0, __pyx_n_s_pdt_replace, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 0)) __PYX_ERR(0, 1628, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 0)) __PYX_ERR(0, 1645, __pyx_L1_error) - /* "_pynini.pyx":1630 + /* "_pynini.pyx":1647 * def pdt_replace(pairs, * pdt_parser_type="left", * int64_t start_paren_labels=kNoLabel, # <<<<<<<<<<<<<< @@ -47585,91 +48126,91 @@ if (!__Pyx_RefNanny) { */ __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_start_paren_labels = fst::kNoLabel; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_7_pynini_62__defaults__); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_replace, __pyx_t_4) < 0) __PYX_ERR(0, 1628, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_replace, __pyx_t_4) < 0) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1681 + /* "_pynini.pyx":1698 * * * cpdef Fst pdt_reverse(fst, PdtParentheses parens): # <<<<<<<<<<<<<< * """ * pdt_reverse(fst, parens) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_45pdt_reverse, 0, __pyx_n_s_pdt_reverse, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_45pdt_reverse, 0, __pyx_n_s_pdt_reverse, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_reverse, __pyx_t_4) < 0) __PYX_ERR(0, 1681, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_reverse, __pyx_t_4) < 0) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1704 + /* "_pynini.pyx":1721 * * * cpdef pdt_shortestpath(fst, # <<<<<<<<<<<<<< * PdtParentheses parens, * queue_type="fifo", */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_47pdt_shortestpath, 0, __pyx_n_s_pdt_shortestpath, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_47pdt_shortestpath, 0, __pyx_n_s_pdt_shortestpath, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__118); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_shortestpath, __pyx_t_4) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pdt_shortestpath, __pyx_t_4) < 0) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":1782 + /* "_pynini.pyx":1799 * yield (self._parens[_i].first, self._parens[_i].second, self._assign[_i]) * * cpdef MPdtParentheses copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_8copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1782, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_8copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_copy, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_copy, __pyx_t_4) < 0) __PYX_ERR(0, 1782, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_copy, __pyx_t_4) < 0) __PYX_ERR(0, 1799, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); - /* "_pynini.pyx":1796 + /* "_pynini.pyx":1813 * return result * * cpdef void add_triple(self, int64_t push, int64_t pop, int64_t assignment): # <<<<<<<<<<<<<< * """ * add_triple(self, push, pop, assignment) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_10add_triple, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_add_triple, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_10add_triple, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_add_triple, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_add_triple, __pyx_t_4) < 0) __PYX_ERR(0, 1796, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_add_triple, __pyx_t_4) < 0) __PYX_ERR(0, 1813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); - /* "_pynini.pyx":1812 + /* "_pynini.pyx":1829 * self._assign.push_back(assignment) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, filename): * """ */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_12read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_12read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_read, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 1812, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read, __pyx_t_4) < 0) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); - __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1812, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read, __pyx_t_5) < 0) __PYX_ERR(0, 1812, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_read, __pyx_t_5) < 0) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); - /* "_pynini.pyx":1839 + /* "_pynini.pyx":1855 * return result * * cpdef void write(self, filename) except *: # <<<<<<<<<<<<<< * """ * write(self, filename) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_14write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_write, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_15MPdtParentheses_14write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MPdtParentheses_write, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 1839, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_MPdtParentheses, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 1855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); @@ -47696,210 +48237,210 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_MPdtParentheses); - /* "_pynini.pyx":1858 + /* "_pynini.pyx":1874 * * * cpdef Fst mpdt_compose(fst1, fst2, MPdtParentheses parens, # <<<<<<<<<<<<<< * compose_filter="paren", bool left_mpdt=True): * """ */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_49mpdt_compose, 0, __pyx_n_s_mpdt_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1858, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_49mpdt_compose, 0, __pyx_n_s_mpdt_compose, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__128); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_compose, __pyx_t_5) < 0) __PYX_ERR(0, 1858, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_compose, __pyx_t_5) < 0) __PYX_ERR(0, 1874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1908 + /* "_pynini.pyx":1924 * * * cpdef Fst mpdt_expand(fst, # <<<<<<<<<<<<<< * MPdtParentheses parens, * bool connect=True, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_51mpdt_expand, 0, __pyx_n_s_mpdt_expand, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1908, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_51mpdt_expand, 0, __pyx_n_s_mpdt_expand, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__131); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_expand, __pyx_t_5) < 0) __PYX_ERR(0, 1908, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_expand, __pyx_t_5) < 0) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":1950 + /* "_pynini.pyx":1966 * * * def mpdt_reverse(fst, MPdtParentheses parens): # <<<<<<<<<<<<<< * """ * mpdt_reverse(fst, parens) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_53mpdt_reverse, 0, __pyx_n_s_mpdt_reverse, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_53mpdt_reverse, 0, __pyx_n_s_mpdt_reverse, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_reverse, __pyx_t_5) < 0) __PYX_ERR(0, 1950, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_mpdt_reverse, __pyx_t_5) < 0) __PYX_ERR(0, 1966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2054 + /* "_pynini.pyx":2070 * raise FstOpError("Operation failed") * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_5done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_done, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2054, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_5done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_done, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_done, __pyx_t_5) < 0) __PYX_ERR(0, 2054, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_done, __pyx_t_5) < 0) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2065 + /* "_pynini.pyx":2081 * return self._paths.get().Done() * * cpdef bool error(self): # <<<<<<<<<<<<<< * """ * error(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_7error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_error, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_7error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_error, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 2065, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 2081, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2076 + /* "_pynini.pyx":2092 * return self._paths.get().Error() * * def ilabels(self): # <<<<<<<<<<<<<< * """ * ilabels(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_9ilabels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ilabels, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_9ilabels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ilabels, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ilabels, __pyx_t_5) < 0) __PYX_ERR(0, 2076, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ilabels, __pyx_t_5) < 0) __PYX_ERR(0, 2092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2087 + /* "_pynini.pyx":2103 * return self._paths.get().ILabels() * * def olabels(self): # <<<<<<<<<<<<<< * """ * olabels(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_11olabels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_olabels, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2087, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_11olabels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_olabels, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_olabels, __pyx_t_5) < 0) __PYX_ERR(0, 2087, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_olabels, __pyx_t_5) < 0) __PYX_ERR(0, 2103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2098 + /* "_pynini.pyx":2114 * return self._paths.get().OLabels() * * cpdef string istring(self): # <<<<<<<<<<<<<< * """ * istring(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_13istring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_istring, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2098, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_13istring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_istring, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_istring, __pyx_t_5) < 0) __PYX_ERR(0, 2098, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_istring, __pyx_t_5) < 0) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2109 + /* "_pynini.pyx":2125 * return self._paths.get().IString() * * def istrings(self): # <<<<<<<<<<<<<< * """ * istrings(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_15istrings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_istrings, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2109, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_15istrings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_istrings, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_istrings, __pyx_t_5) < 0) __PYX_ERR(0, 2109, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_istrings, __pyx_t_5) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2125 + /* "_pynini.pyx":2141 * self._paths.get().Next() * * def items(self): # <<<<<<<<<<<<<< * """ * items(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_18items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_items, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_18items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_items, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_items, __pyx_t_5) < 0) __PYX_ERR(0, 2125, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_items, __pyx_t_5) < 0) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2142 + /* "_pynini.pyx":2158 * self._paths.get().Next() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_21next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_next, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_21next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_next, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_next, __pyx_t_5) < 0) __PYX_ERR(0, 2142, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_next, __pyx_t_5) < 0) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2150 + /* "_pynini.pyx":2166 * self._paths.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_23reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_reset, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_23reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_reset, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_reset, __pyx_t_5) < 0) __PYX_ERR(0, 2150, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_reset, __pyx_t_5) < 0) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2158 + /* "_pynini.pyx":2174 * self._paths.get().Reset() * * cpdef string ostring(self): # <<<<<<<<<<<<<< * """ * ostring(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_25ostring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ostring, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2158, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_25ostring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ostring, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ostring, __pyx_t_5) < 0) __PYX_ERR(0, 2158, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ostring, __pyx_t_5) < 0) __PYX_ERR(0, 2174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2169 + /* "_pynini.pyx":2185 * return self._paths.get().OString() * * def ostrings(self): # <<<<<<<<<<<<<< * """ * ostrings(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_27ostrings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ostrings, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2169, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_27ostrings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_ostrings, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ostrings, __pyx_t_5) < 0) __PYX_ERR(0, 2169, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_ostrings, __pyx_t_5) < 0) __PYX_ERR(0, 2185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2185 + /* "_pynini.pyx":2201 * self._paths.get().Next() * * cpdef _Weight weight(self): # <<<<<<<<<<<<<< * """ * weight(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_30weight, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_weight, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_30weight, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_weight, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_weight, __pyx_t_5) < 0) __PYX_ERR(0, 2185, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_weight, __pyx_t_5) < 0) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); - /* "_pynini.pyx":2198 + /* "_pynini.pyx":2214 * return weight * * def weights(self): # <<<<<<<<<<<<<< * """ * weights(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_32weights, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_weights, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_19_StringPathIterator_32weights, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringPathIterator_weights, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_weights, __pyx_t_5) < 0) __PYX_ERR(0, 2198, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini__StringPathIterator, __pyx_n_s_weights, __pyx_t_5) < 0) __PYX_ERR(0, 2214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini__StringPathIterator); @@ -47924,211 +48465,211 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2275 + /* "_pynini.pyx":2291 * # API shared between FarReader and FarWriter. * * cpdef bool error(self) except *: # <<<<<<<<<<<<<< * """ * error(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_5error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_error, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2275, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_5error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_error, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 2275, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 2291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2291 + /* "_pynini.pyx":2307 * return False * * cpdef string arc_type(self) except *: # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_7arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_arc_type, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2291, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_7arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_arc_type, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_arc_type, __pyx_t_5) < 0) __PYX_ERR(0, 2291, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_arc_type, __pyx_t_5) < 0) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2306 + /* "_pynini.pyx":2322 * return self._writer.arc_type() * * cpdef bool closed(self): # <<<<<<<<<<<<<< * """ * closed(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_9closed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_closed, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_9closed, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_closed, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_closed, __pyx_t_5) < 0) __PYX_ERR(0, 2306, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_closed, __pyx_t_5) < 0) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2314 + /* "_pynini.pyx":2330 * return self._mode == b"c" * * cpdef string far_type(self) except *: # <<<<<<<<<<<<<< * """far_type(self) * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_11far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_far_type, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2314, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_11far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_far_type, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_far_type, __pyx_t_5) < 0) __PYX_ERR(0, 2314, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_far_type, __pyx_t_5) < 0) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2328 + /* "_pynini.pyx":2344 * return self._writer.far_type() * * cpdef string mode(self): # <<<<<<<<<<<<<< * """ * mode(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_13mode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_mode, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2328, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_13mode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_mode, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_mode, __pyx_t_5) < 0) __PYX_ERR(0, 2328, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_mode, __pyx_t_5) < 0) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2336 + /* "_pynini.pyx":2352 * return f"{self._mode:c}" * * cpdef string name(self): # <<<<<<<<<<<<<< * """ * name(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_15name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_name, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2336, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_15name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_name, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_name_2, __pyx_t_5) < 0) __PYX_ERR(0, 2336, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_name_2, __pyx_t_5) < 0) __PYX_ERR(0, 2352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2346 + /* "_pynini.pyx":2362 * # FarReader API. * * cpdef bool done(self) except *: # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_17done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_done, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2346, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_17done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_done, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_done, __pyx_t_5) < 0) __PYX_ERR(0, 2346, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_done, __pyx_t_5) < 0) __PYX_ERR(0, 2362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2362 + /* "_pynini.pyx":2378 * return self._reader.done() * * cpdef bool find(self, key) except *: # <<<<<<<<<<<<<< * """ * find(self, key) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_19find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_find, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2362, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_19find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_find, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_find, __pyx_t_5) < 0) __PYX_ERR(0, 2362, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_find, __pyx_t_5) < 0) __PYX_ERR(0, 2378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2382 + /* "_pynini.pyx":2398 * return self._reader.find(key) * * cpdef Fst get_fst(self): # <<<<<<<<<<<<<< * """ * get_fst(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_21get_fst, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_get_fst, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_21get_fst, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_get_fst, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_get_fst, __pyx_t_5) < 0) __PYX_ERR(0, 2382, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_get_fst, __pyx_t_5) < 0) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2399 + /* "_pynini.pyx":2415 * return Fst.from_pywrapfst(self._reader.get_fst()) * * cpdef string get_key(self) except *: # <<<<<<<<<<<<<< * """ * get_key(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_23get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_get_key, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2399, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_23get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_get_key, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_get_key, __pyx_t_5) < 0) __PYX_ERR(0, 2399, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_get_key, __pyx_t_5) < 0) __PYX_ERR(0, 2415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2415 + /* "_pynini.pyx":2431 * return self._reader.get_key() * * cpdef void next(self) except *: # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_25next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_next, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2415, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_25next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_next, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_next, __pyx_t_5) < 0) __PYX_ERR(0, 2415, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_next, __pyx_t_5) < 0) __PYX_ERR(0, 2431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2428 + /* "_pynini.pyx":2444 * self._reader.next() * * cpdef void reset(self) except *: # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_27reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_reset, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2428, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_27reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_reset, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_reset, __pyx_t_5) < 0) __PYX_ERR(0, 2428, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_reset, __pyx_t_5) < 0) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2458 + /* "_pynini.pyx":2474 * # FarWriter API. * * cpdef void add(self, key, Fst fst): # <<<<<<<<<<<<<< * """ * add(self, key, fst) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_35add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_add, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2458, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_35add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_add, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_add, __pyx_t_5) < 0) __PYX_ERR(0, 2458, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_add, __pyx_t_5) < 0) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2483 + /* "_pynini.pyx":2499 * self._writer[key] = fst * * cpdef void close(self): # <<<<<<<<<<<<<< * """ * close(self) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_39close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_close, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_39close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far_close, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 2483, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_close, __pyx_t_5) < 0) __PYX_ERR(0, 2499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2495 + /* "_pynini.pyx":2511 * # Adds support for use as a PEP-343 context manager. * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_41__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far___enter, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2495, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_41__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far___enter, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 2495, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 2511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2498 + /* "_pynini.pyx":2514 * return self * * def __exit__(self, exc, value, tb): # <<<<<<<<<<<<<< * self.close() * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_43__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far___exit, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_3Far_43__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Far___exit, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 2498, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7_pynini_Far, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 2514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); @@ -48155,2446 +48696,2478 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_7_pynini_Far); - /* "_pynini.pyx":2506 + /* "_pynini.pyx":2522 * * * from _pywrapfst import Arc # <<<<<<<<<<<<<< * from _pywrapfst import EncodeMapper * from _pywrapfst import SymbolTable */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2506, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_Arc); __Pyx_GIVEREF(__pyx_n_s_Arc); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_Arc)) __PYX_ERR(0, 2506, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2506, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_Arc)) __PYX_ERR(0, 2522, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Arc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2506, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Arc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Arc, __pyx_t_5) < 0) __PYX_ERR(0, 2506, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Arc, __pyx_t_5) < 0) __PYX_ERR(0, 2522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2507 + /* "_pynini.pyx":2523 * * from _pywrapfst import Arc * from _pywrapfst import EncodeMapper # <<<<<<<<<<<<<< * from _pywrapfst import SymbolTable * from _pywrapfst import SymbolTableView */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_EncodeMapper); __Pyx_GIVEREF(__pyx_n_s_EncodeMapper); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EncodeMapper)) __PYX_ERR(0, 2507, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2507, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EncodeMapper)) __PYX_ERR(0, 2523, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EncodeMapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EncodeMapper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EncodeMapper, __pyx_t_4) < 0) __PYX_ERR(0, 2507, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EncodeMapper, __pyx_t_4) < 0) __PYX_ERR(0, 2523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2508 + /* "_pynini.pyx":2524 * from _pywrapfst import Arc * from _pywrapfst import EncodeMapper * from _pywrapfst import SymbolTable # <<<<<<<<<<<<<< * from _pywrapfst import SymbolTableView * from _pywrapfst import Weight */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2508, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_SymbolTable); __Pyx_GIVEREF(__pyx_n_s_SymbolTable); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SymbolTable)) __PYX_ERR(0, 2508, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2508, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SymbolTable)) __PYX_ERR(0, 2524, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SymbolTable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2508, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SymbolTable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SymbolTable, __pyx_t_5) < 0) __PYX_ERR(0, 2508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SymbolTable, __pyx_t_5) < 0) __PYX_ERR(0, 2524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2509 + /* "_pynini.pyx":2525 * from _pywrapfst import EncodeMapper * from _pywrapfst import SymbolTable * from _pywrapfst import SymbolTableView # <<<<<<<<<<<<<< * from _pywrapfst import Weight * from _pywrapfst import _ArcIterator */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SymbolTableView); __Pyx_GIVEREF(__pyx_n_s_SymbolTableView); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SymbolTableView)) __PYX_ERR(0, 2509, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2509, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SymbolTableView)) __PYX_ERR(0, 2525, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_SymbolTableView); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SymbolTableView, __pyx_t_4) < 0) __PYX_ERR(0, 2509, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SymbolTableView, __pyx_t_4) < 0) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2510 + /* "_pynini.pyx":2526 * from _pywrapfst import SymbolTable * from _pywrapfst import SymbolTableView * from _pywrapfst import Weight # <<<<<<<<<<<<<< * from _pywrapfst import _ArcIterator * from _pywrapfst import _MutableArcIterator */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2510, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_Weight); __Pyx_GIVEREF(__pyx_n_s_Weight); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_Weight)) __PYX_ERR(0, 2510, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2510, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_Weight)) __PYX_ERR(0, 2526, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Weight); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2510, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Weight); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Weight, __pyx_t_5) < 0) __PYX_ERR(0, 2510, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Weight, __pyx_t_5) < 0) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2511 + /* "_pynini.pyx":2527 * from _pywrapfst import SymbolTableView * from _pywrapfst import Weight * from _pywrapfst import _ArcIterator # <<<<<<<<<<<<<< * from _pywrapfst import _MutableArcIterator * from _pywrapfst import _StateIterator */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ArcIterator); __Pyx_GIVEREF(__pyx_n_s_ArcIterator); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ArcIterator)) __PYX_ERR(0, 2511, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2511, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ArcIterator)) __PYX_ERR(0, 2527, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ArcIterator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ArcIterator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcIterator, __pyx_t_4) < 0) __PYX_ERR(0, 2511, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcIterator, __pyx_t_4) < 0) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2512 + /* "_pynini.pyx":2528 * from _pywrapfst import Weight * from _pywrapfst import _ArcIterator * from _pywrapfst import _MutableArcIterator # <<<<<<<<<<<<<< * from _pywrapfst import _StateIterator * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2512, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_MutableArcIterator); __Pyx_GIVEREF(__pyx_n_s_MutableArcIterator); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_MutableArcIterator)) __PYX_ERR(0, 2512, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2512, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_MutableArcIterator)) __PYX_ERR(0, 2528, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_MutableArcIterator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2512, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_MutableArcIterator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableArcIterator, __pyx_t_5) < 0) __PYX_ERR(0, 2512, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableArcIterator, __pyx_t_5) < 0) __PYX_ERR(0, 2528, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2513 + /* "_pynini.pyx":2529 * from _pywrapfst import _ArcIterator * from _pywrapfst import _MutableArcIterator * from _pywrapfst import _StateIterator # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2513, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_StateIterator); __Pyx_GIVEREF(__pyx_n_s_StateIterator); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_StateIterator)) __PYX_ERR(0, 2513, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2513, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_StateIterator)) __PYX_ERR(0, 2529, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_StateIterator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2513, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_StateIterator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateIterator, __pyx_t_4) < 0) __PYX_ERR(0, 2513, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateIterator, __pyx_t_4) < 0) __PYX_ERR(0, 2529, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2519 + /* "_pynini.pyx":2535 * * * from _pywrapfst import FstBadWeightError # <<<<<<<<<<<<<< * from _pywrapfst import FstIndexError * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_FstBadWeightError); __Pyx_GIVEREF(__pyx_n_s_FstBadWeightError); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FstBadWeightError)) __PYX_ERR(0, 2519, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2519, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FstBadWeightError)) __PYX_ERR(0, 2535, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_5) < 0) __PYX_ERR(0, 2519, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_5) < 0) __PYX_ERR(0, 2535, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2520 + /* "_pynini.pyx":2536 * * from _pywrapfst import FstBadWeightError * from _pywrapfst import FstIndexError # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_FstIndexError); __Pyx_GIVEREF(__pyx_n_s_FstIndexError); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_FstIndexError)) __PYX_ERR(0, 2520, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2520, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_FstIndexError)) __PYX_ERR(0, 2536, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_4) < 0) __PYX_ERR(0, 2520, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_4) < 0) __PYX_ERR(0, 2536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2526 + /* "_pynini.pyx":2542 * * * from _pywrapfst import NO_LABEL # <<<<<<<<<<<<<< * from _pywrapfst import NO_STATE_ID * from _pywrapfst import NO_SYMBOL */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NO_LABEL); __Pyx_GIVEREF(__pyx_n_s_NO_LABEL); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_LABEL)) __PYX_ERR(0, 2526, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2526, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_LABEL)) __PYX_ERR(0, 2542, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_LABEL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2526, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_LABEL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_5) < 0) __PYX_ERR(0, 2526, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_5) < 0) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2527 + /* "_pynini.pyx":2543 * * from _pywrapfst import NO_LABEL * from _pywrapfst import NO_STATE_ID # <<<<<<<<<<<<<< * from _pywrapfst import NO_SYMBOL * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NO_STATE_ID); __Pyx_GIVEREF(__pyx_n_s_NO_STATE_ID); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NO_STATE_ID)) __PYX_ERR(0, 2527, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NO_STATE_ID)) __PYX_ERR(0, 2543, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NO_STATE_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NO_STATE_ID); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_4) < 0) __PYX_ERR(0, 2527, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_4) < 0) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2528 + /* "_pynini.pyx":2544 * from _pywrapfst import NO_LABEL * from _pywrapfst import NO_STATE_ID * from _pywrapfst import NO_SYMBOL # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2528, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NO_SYMBOL); __Pyx_GIVEREF(__pyx_n_s_NO_SYMBOL); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_SYMBOL)) __PYX_ERR(0, 2528, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2528, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_SYMBOL)) __PYX_ERR(0, 2544, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_SYMBOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2528, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_SYMBOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_5) < 0) __PYX_ERR(0, 2528, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_5) < 0) __PYX_ERR(0, 2544, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2534 + /* "_pynini.pyx":2550 * * * from _pywrapfst import ACCEPTOR # <<<<<<<<<<<<<< * from _pywrapfst import ACCESSIBLE * from _pywrapfst import ACYCLIC */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2534, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ACCEPTOR); __Pyx_GIVEREF(__pyx_n_s_ACCEPTOR); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ACCEPTOR)) __PYX_ERR(0, 2534, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2534, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ACCEPTOR)) __PYX_ERR(0, 2550, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ACCEPTOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2534, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ACCEPTOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2534, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2535 + /* "_pynini.pyx":2551 * * from _pywrapfst import ACCEPTOR * from _pywrapfst import ACCESSIBLE # <<<<<<<<<<<<<< * from _pywrapfst import ACYCLIC * from _pywrapfst import ADD_ARC_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ACCESSIBLE); __Pyx_GIVEREF(__pyx_n_s_ACCESSIBLE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ACCESSIBLE)) __PYX_ERR(0, 2535, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ACCESSIBLE)) __PYX_ERR(0, 2551, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ACCESSIBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2535, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ACCESSIBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_5) < 0) __PYX_ERR(0, 2535, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACCESSIBLE, __pyx_t_5) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2536 + /* "_pynini.pyx":2552 * from _pywrapfst import ACCEPTOR * from _pywrapfst import ACCESSIBLE * from _pywrapfst import ACYCLIC # <<<<<<<<<<<<<< * from _pywrapfst import ADD_ARC_PROPERTIES * from _pywrapfst import ADD_STATE_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ACYCLIC); __Pyx_GIVEREF(__pyx_n_s_ACYCLIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ACYCLIC)) __PYX_ERR(0, 2536, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ACYCLIC)) __PYX_ERR(0, 2552, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ACYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2536, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ACYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2536, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2537 + /* "_pynini.pyx":2553 * from _pywrapfst import ACCESSIBLE * from _pywrapfst import ACYCLIC * from _pywrapfst import ADD_ARC_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import ADD_STATE_PROPERTIES - * from _pywrapfst import ADD_SUPERFINAL_PROPERTIES + * from _pywrapfst import \ */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2537, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ADD_ARC_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_ADD_ARC_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ADD_ARC_PROPERTIES)) __PYX_ERR(0, 2537, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2537, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ADD_ARC_PROPERTIES)) __PYX_ERR(0, 2553, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ADD_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2537, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ADD_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2537, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2538 + /* "_pynini.pyx":2554 * from _pywrapfst import ACYCLIC * from _pywrapfst import ADD_ARC_PROPERTIES * from _pywrapfst import ADD_STATE_PROPERTIES # <<<<<<<<<<<<<< - * from _pywrapfst import ADD_SUPERFINAL_PROPERTIES - * from _pywrapfst import ARC_SORT_PROPERTIES + * from _pywrapfst import \ + * ADD_SUPERFINAL_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2538, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ADD_STATE_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_ADD_STATE_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ADD_STATE_PROPERTIES)) __PYX_ERR(0, 2538, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2538, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ADD_STATE_PROPERTIES)) __PYX_ERR(0, 2554, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ADD_STATE_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2538, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ADD_STATE_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2538, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2539 - * from _pywrapfst import ADD_ARC_PROPERTIES + /* "_pynini.pyx":2556 * from _pywrapfst import ADD_STATE_PROPERTIES - * from _pywrapfst import ADD_SUPERFINAL_PROPERTIES # <<<<<<<<<<<<<< + * from _pywrapfst import \ + * ADD_SUPERFINAL_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import ARC_SORT_PROPERTIES * from _pywrapfst import BINARY_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ADD_SUPERFINAL_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_ADD_SUPERFINAL_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES)) __PYX_ERR(0, 2539, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2539, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES)) __PYX_ERR(0, 2556, __pyx_L1_error); + + /* "_pynini.pyx":2555 + * from _pywrapfst import ADD_ARC_PROPERTIES + * from _pywrapfst import ADD_STATE_PROPERTIES + * from _pywrapfst import \ # <<<<<<<<<<<<<< + * ADD_SUPERFINAL_PROPERTIES + * from _pywrapfst import ARC_SORT_PROPERTIES + */ + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2539, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2540 - * from _pywrapfst import ADD_STATE_PROPERTIES - * from _pywrapfst import ADD_SUPERFINAL_PROPERTIES + /* "_pynini.pyx":2557 + * from _pywrapfst import \ + * ADD_SUPERFINAL_PROPERTIES * from _pywrapfst import ARC_SORT_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import BINARY_PROPERTIES * from _pywrapfst import COACCESSIBLE */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ARC_SORT_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_ARC_SORT_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_SORT_PROPERTIES)) __PYX_ERR(0, 2540, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2540, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_SORT_PROPERTIES)) __PYX_ERR(0, 2557, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_SORT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_SORT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2540, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2541 - * from _pywrapfst import ADD_SUPERFINAL_PROPERTIES + /* "_pynini.pyx":2558 + * ADD_SUPERFINAL_PROPERTIES * from _pywrapfst import ARC_SORT_PROPERTIES * from _pywrapfst import BINARY_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import COACCESSIBLE * from _pywrapfst import COPY_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2541, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_BINARY_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_BINARY_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_BINARY_PROPERTIES)) __PYX_ERR(0, 2541, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2541, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_BINARY_PROPERTIES)) __PYX_ERR(0, 2558, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_BINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2541, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_BINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2541, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2542 + /* "_pynini.pyx":2559 * from _pywrapfst import ARC_SORT_PROPERTIES * from _pywrapfst import BINARY_PROPERTIES * from _pywrapfst import COACCESSIBLE # <<<<<<<<<<<<<< * from _pywrapfst import COPY_PROPERTIES * from _pywrapfst import CYCLIC */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_COACCESSIBLE); __Pyx_GIVEREF(__pyx_n_s_COACCESSIBLE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_COACCESSIBLE)) __PYX_ERR(0, 2542, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2542, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_COACCESSIBLE)) __PYX_ERR(0, 2559, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_COACCESSIBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2542, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_COACCESSIBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 2542, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 2559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2543 + /* "_pynini.pyx":2560 * from _pywrapfst import BINARY_PROPERTIES * from _pywrapfst import COACCESSIBLE * from _pywrapfst import COPY_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import CYCLIC * from _pywrapfst import DELETE_ARC_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_COPY_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_COPY_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_COPY_PROPERTIES)) __PYX_ERR(0, 2543, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2543, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_COPY_PROPERTIES)) __PYX_ERR(0, 2560, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_COPY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_COPY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2543, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_COPY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2544 + /* "_pynini.pyx":2561 * from _pywrapfst import COACCESSIBLE * from _pywrapfst import COPY_PROPERTIES * from _pywrapfst import CYCLIC # <<<<<<<<<<<<<< * from _pywrapfst import DELETE_ARC_PROPERTIES * from _pywrapfst import DELETE_STATE_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_CYCLIC); __Pyx_GIVEREF(__pyx_n_s_CYCLIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_CYCLIC)) __PYX_ERR(0, 2544, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2544, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_CYCLIC)) __PYX_ERR(0, 2561, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_CYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_CYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2544, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2545 + /* "_pynini.pyx":2562 * from _pywrapfst import COPY_PROPERTIES * from _pywrapfst import CYCLIC * from _pywrapfst import DELETE_ARC_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import DELETE_STATE_PROPERTIES * from _pywrapfst import EPSILONS */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_DELETE_ARC_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_DELETE_ARC_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_DELETE_ARC_PROPERTIES)) __PYX_ERR(0, 2545, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_DELETE_ARC_PROPERTIES)) __PYX_ERR(0, 2562, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DELETE_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2545, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DELETE_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2545, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2546 + /* "_pynini.pyx":2563 * from _pywrapfst import CYCLIC * from _pywrapfst import DELETE_ARC_PROPERTIES * from _pywrapfst import DELETE_STATE_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import EPSILONS * from _pywrapfst import ERROR */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_DELETE_STATE_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_DELETE_STATE_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_DELETE_STATE_PROPERTIES)) __PYX_ERR(0, 2546, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2546, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_DELETE_STATE_PROPERTIES)) __PYX_ERR(0, 2563, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_DELETE_STATE_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_DELETE_STATE_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2546, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2547 + /* "_pynini.pyx":2564 * from _pywrapfst import DELETE_ARC_PROPERTIES * from _pywrapfst import DELETE_STATE_PROPERTIES * from _pywrapfst import EPSILONS # <<<<<<<<<<<<<< * from _pywrapfst import ERROR * from _pywrapfst import EXPANDED */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_EPSILONS)) __PYX_ERR(0, 2547, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2547, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_EPSILONS)) __PYX_ERR(0, 2564, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2547, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2548 + /* "_pynini.pyx":2565 * from _pywrapfst import DELETE_STATE_PROPERTIES * from _pywrapfst import EPSILONS * from _pywrapfst import ERROR # <<<<<<<<<<<<<< * from _pywrapfst import EXPANDED * from _pywrapfst import EXTRINSIC_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ERROR); __Pyx_GIVEREF(__pyx_n_s_ERROR); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ERROR)) __PYX_ERR(0, 2548, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ERROR)) __PYX_ERR(0, 2565, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2548, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 2565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2549 + /* "_pynini.pyx":2566 * from _pywrapfst import EPSILONS * from _pywrapfst import ERROR * from _pywrapfst import EXPANDED # <<<<<<<<<<<<<< * from _pywrapfst import EXTRINSIC_PROPERTIES * from _pywrapfst import FST_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2549, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_EXPANDED); __Pyx_GIVEREF(__pyx_n_s_EXPANDED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_EXPANDED)) __PYX_ERR(0, 2549, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_EXPANDED)) __PYX_ERR(0, 2566, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_EXPANDED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2549, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_EXPANDED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_5) < 0) __PYX_ERR(0, 2549, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPANDED, __pyx_t_5) < 0) __PYX_ERR(0, 2566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2550 + /* "_pynini.pyx":2567 * from _pywrapfst import ERROR * from _pywrapfst import EXPANDED * from _pywrapfst import EXTRINSIC_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import FST_PROPERTIES * from _pywrapfst import FstProperties */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_EXTRINSIC_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_EXTRINSIC_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EXTRINSIC_PROPERTIES)) __PYX_ERR(0, 2550, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2550, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EXTRINSIC_PROPERTIES)) __PYX_ERR(0, 2567, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EXTRINSIC_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EXTRINSIC_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2550, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2551 + /* "_pynini.pyx":2568 * from _pywrapfst import EXPANDED * from _pywrapfst import EXTRINSIC_PROPERTIES * from _pywrapfst import FST_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import FstProperties * from _pywrapfst import INITIAL_ACYCLIC */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_FST_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_FST_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FST_PROPERTIES)) __PYX_ERR(0, 2551, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FST_PROPERTIES)) __PYX_ERR(0, 2568, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FST_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2551, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FST_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2551, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FST_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2552 + /* "_pynini.pyx":2569 * from _pywrapfst import EXTRINSIC_PROPERTIES * from _pywrapfst import FST_PROPERTIES * from _pywrapfst import FstProperties # <<<<<<<<<<<<<< * from _pywrapfst import INITIAL_ACYCLIC * from _pywrapfst import INITIAL_CYCLIC */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_FstProperties); __Pyx_GIVEREF(__pyx_n_s_FstProperties); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_FstProperties)) __PYX_ERR(0, 2552, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2552, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_FstProperties)) __PYX_ERR(0, 2569, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 2552, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2553 + /* "_pynini.pyx":2570 * from _pywrapfst import FST_PROPERTIES * from _pywrapfst import FstProperties * from _pywrapfst import INITIAL_ACYCLIC # <<<<<<<<<<<<<< * from _pywrapfst import INITIAL_CYCLIC * from _pywrapfst import INTRINSIC_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_INITIAL_ACYCLIC); __Pyx_GIVEREF(__pyx_n_s_INITIAL_ACYCLIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_INITIAL_ACYCLIC)) __PYX_ERR(0, 2553, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2553, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_INITIAL_ACYCLIC)) __PYX_ERR(0, 2570, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_INITIAL_ACYCLIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_INITIAL_ACYCLIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_5) < 0) __PYX_ERR(0, 2553, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_5) < 0) __PYX_ERR(0, 2570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2554 + /* "_pynini.pyx":2571 * from _pywrapfst import FstProperties * from _pywrapfst import INITIAL_ACYCLIC * from _pywrapfst import INITIAL_CYCLIC # <<<<<<<<<<<<<< * from _pywrapfst import INTRINSIC_PROPERTIES * from _pywrapfst import I_DETERMINISTIC */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_INITIAL_CYCLIC); __Pyx_GIVEREF(__pyx_n_s_INITIAL_CYCLIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_INITIAL_CYCLIC)) __PYX_ERR(0, 2554, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_INITIAL_CYCLIC)) __PYX_ERR(0, 2571, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_INITIAL_CYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_INITIAL_CYCLIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2554, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2555 + /* "_pynini.pyx":2572 * from _pywrapfst import INITIAL_ACYCLIC * from _pywrapfst import INITIAL_CYCLIC * from _pywrapfst import INTRINSIC_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import I_DETERMINISTIC * from _pywrapfst import I_EPSILONS */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_INTRINSIC_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_INTRINSIC_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_INTRINSIC_PROPERTIES)) __PYX_ERR(0, 2555, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_INTRINSIC_PROPERTIES)) __PYX_ERR(0, 2572, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_INTRINSIC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_INTRINSIC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2555, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2556 + /* "_pynini.pyx":2573 * from _pywrapfst import INITIAL_CYCLIC * from _pywrapfst import INTRINSIC_PROPERTIES * from _pywrapfst import I_DETERMINISTIC # <<<<<<<<<<<<<< * from _pywrapfst import I_EPSILONS - * from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES + * from _pywrapfst import \ */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_I_DETERMINISTIC); __Pyx_GIVEREF(__pyx_n_s_I_DETERMINISTIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_I_DETERMINISTIC)) __PYX_ERR(0, 2556, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2556, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_I_DETERMINISTIC)) __PYX_ERR(0, 2573, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_I_DETERMINISTIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_I_DETERMINISTIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2556, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2557 + /* "_pynini.pyx":2574 * from _pywrapfst import INTRINSIC_PROPERTIES * from _pywrapfst import I_DETERMINISTIC * from _pywrapfst import I_EPSILONS # <<<<<<<<<<<<<< - * from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES - * from _pywrapfst import I_LABEL_SORTED + * from _pywrapfst import \ + * I_LABEL_INVARIANT_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_I_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_I_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_I_EPSILONS)) __PYX_ERR(0, 2557, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_I_EPSILONS)) __PYX_ERR(0, 2574, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_I_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_I_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2557, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2558 - * from _pywrapfst import I_DETERMINISTIC + /* "_pynini.pyx":2576 * from _pywrapfst import I_EPSILONS - * from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< + * from _pywrapfst import \ + * I_LABEL_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import I_LABEL_SORTED * from _pywrapfst import MUTABLE */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2558, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_I_LABEL_INVARIANT_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_I_LABEL_INVARIANT_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2558, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2558, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2576, __pyx_L1_error); + + /* "_pynini.pyx":2575 + * from _pywrapfst import I_DETERMINISTIC + * from _pywrapfst import I_EPSILONS + * from _pywrapfst import \ # <<<<<<<<<<<<<< + * I_LABEL_INVARIANT_PROPERTIES + * from _pywrapfst import I_LABEL_SORTED + */ + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2558, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2558, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2559 - * from _pywrapfst import I_EPSILONS - * from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES + /* "_pynini.pyx":2577 + * from _pywrapfst import \ + * I_LABEL_INVARIANT_PROPERTIES * from _pywrapfst import I_LABEL_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import MUTABLE * from _pywrapfst import NEG_TRINARY_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2559, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_I_LABEL_SORTED); __Pyx_GIVEREF(__pyx_n_s_I_LABEL_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_I_LABEL_SORTED)) __PYX_ERR(0, 2559, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2559, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_I_LABEL_SORTED)) __PYX_ERR(0, 2577, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_I_LABEL_SORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2559, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_I_LABEL_SORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_5) < 0) __PYX_ERR(0, 2559, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_I_LABEL_SORTED, __pyx_t_5) < 0) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2560 - * from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES + /* "_pynini.pyx":2578 + * I_LABEL_INVARIANT_PROPERTIES * from _pywrapfst import I_LABEL_SORTED * from _pywrapfst import MUTABLE # <<<<<<<<<<<<<< * from _pywrapfst import NEG_TRINARY_PROPERTIES * from _pywrapfst import NON_I_DETERMINISTIC */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_MUTABLE); __Pyx_GIVEREF(__pyx_n_s_MUTABLE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_MUTABLE)) __PYX_ERR(0, 2560, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_MUTABLE)) __PYX_ERR(0, 2578, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_MUTABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_MUTABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2560, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2561 + /* "_pynini.pyx":2579 * from _pywrapfst import I_LABEL_SORTED * from _pywrapfst import MUTABLE * from _pywrapfst import NEG_TRINARY_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import NON_I_DETERMINISTIC * from _pywrapfst import NON_O_DETERMINISTIC */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2561, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NEG_TRINARY_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_NEG_TRINARY_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NEG_TRINARY_PROPERTIES)) __PYX_ERR(0, 2561, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2561, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NEG_TRINARY_PROPERTIES)) __PYX_ERR(0, 2579, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NEG_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2561, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NEG_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2561, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2562 + /* "_pynini.pyx":2580 * from _pywrapfst import MUTABLE * from _pywrapfst import NEG_TRINARY_PROPERTIES * from _pywrapfst import NON_I_DETERMINISTIC # <<<<<<<<<<<<<< * from _pywrapfst import NON_O_DETERMINISTIC * from _pywrapfst import NOT_ACCEPTOR */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NON_I_DETERMINISTIC); __Pyx_GIVEREF(__pyx_n_s_NON_I_DETERMINISTIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NON_I_DETERMINISTIC)) __PYX_ERR(0, 2562, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NON_I_DETERMINISTIC)) __PYX_ERR(0, 2580, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NON_I_DETERMINISTIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2562, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NON_I_DETERMINISTIC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2562, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2563 + /* "_pynini.pyx":2581 * from _pywrapfst import NEG_TRINARY_PROPERTIES * from _pywrapfst import NON_I_DETERMINISTIC * from _pywrapfst import NON_O_DETERMINISTIC # <<<<<<<<<<<<<< * from _pywrapfst import NOT_ACCEPTOR * from _pywrapfst import NOT_ACCESSIBLE */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NON_O_DETERMINISTIC); __Pyx_GIVEREF(__pyx_n_s_NON_O_DETERMINISTIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NON_O_DETERMINISTIC)) __PYX_ERR(0, 2563, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2563, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NON_O_DETERMINISTIC)) __PYX_ERR(0, 2581, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NON_O_DETERMINISTIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2563, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NON_O_DETERMINISTIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_5) < 0) __PYX_ERR(0, 2563, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_5) < 0) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2564 + /* "_pynini.pyx":2582 * from _pywrapfst import NON_I_DETERMINISTIC * from _pywrapfst import NON_O_DETERMINISTIC * from _pywrapfst import NOT_ACCEPTOR # <<<<<<<<<<<<<< * from _pywrapfst import NOT_ACCESSIBLE * from _pywrapfst import NOT_COACCESSIBLE */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NOT_ACCEPTOR); __Pyx_GIVEREF(__pyx_n_s_NOT_ACCEPTOR); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_ACCEPTOR)) __PYX_ERR(0, 2564, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2564, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_ACCEPTOR)) __PYX_ERR(0, 2582, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_ACCEPTOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2564, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_ACCEPTOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2564, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2565 + /* "_pynini.pyx":2583 * from _pywrapfst import NON_O_DETERMINISTIC * from _pywrapfst import NOT_ACCEPTOR * from _pywrapfst import NOT_ACCESSIBLE # <<<<<<<<<<<<<< * from _pywrapfst import NOT_COACCESSIBLE * from _pywrapfst import NOT_I_LABEL_SORTED */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2565, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NOT_ACCESSIBLE); __Pyx_GIVEREF(__pyx_n_s_NOT_ACCESSIBLE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_ACCESSIBLE)) __PYX_ERR(0, 2565, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_ACCESSIBLE)) __PYX_ERR(0, 2583, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_ACCESSIBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2565, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_ACCESSIBLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_5) < 0) __PYX_ERR(0, 2565, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_5) < 0) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2566 + /* "_pynini.pyx":2584 * from _pywrapfst import NOT_ACCEPTOR * from _pywrapfst import NOT_ACCESSIBLE * from _pywrapfst import NOT_COACCESSIBLE # <<<<<<<<<<<<<< * from _pywrapfst import NOT_I_LABEL_SORTED * from _pywrapfst import NOT_O_LABEL_SORTED */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NOT_COACCESSIBLE); __Pyx_GIVEREF(__pyx_n_s_NOT_COACCESSIBLE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_COACCESSIBLE)) __PYX_ERR(0, 2566, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2566, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_COACCESSIBLE)) __PYX_ERR(0, 2584, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_COACCESSIBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2566, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_COACCESSIBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 2566, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2567 + /* "_pynini.pyx":2585 * from _pywrapfst import NOT_ACCESSIBLE * from _pywrapfst import NOT_COACCESSIBLE * from _pywrapfst import NOT_I_LABEL_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import NOT_O_LABEL_SORTED * from _pywrapfst import NOT_STRING */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NOT_I_LABEL_SORTED); __Pyx_GIVEREF(__pyx_n_s_NOT_I_LABEL_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_I_LABEL_SORTED)) __PYX_ERR(0, 2567, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_I_LABEL_SORTED)) __PYX_ERR(0, 2585, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_I_LABEL_SORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2567, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_I_LABEL_SORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_5) < 0) __PYX_ERR(0, 2567, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_5) < 0) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2568 + /* "_pynini.pyx":2586 * from _pywrapfst import NOT_COACCESSIBLE * from _pywrapfst import NOT_I_LABEL_SORTED * from _pywrapfst import NOT_O_LABEL_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import NOT_STRING * from _pywrapfst import NOT_TOP_SORTED */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2568, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NOT_O_LABEL_SORTED); __Pyx_GIVEREF(__pyx_n_s_NOT_O_LABEL_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_O_LABEL_SORTED)) __PYX_ERR(0, 2568, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_O_LABEL_SORTED)) __PYX_ERR(0, 2586, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_O_LABEL_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2568, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_O_LABEL_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2568, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2586, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2569 + /* "_pynini.pyx":2587 * from _pywrapfst import NOT_I_LABEL_SORTED * from _pywrapfst import NOT_O_LABEL_SORTED * from _pywrapfst import NOT_STRING # <<<<<<<<<<<<<< * from _pywrapfst import NOT_TOP_SORTED * from _pywrapfst import NO_EPSILONS */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2569, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NOT_STRING); __Pyx_GIVEREF(__pyx_n_s_NOT_STRING); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_STRING)) __PYX_ERR(0, 2569, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NOT_STRING)) __PYX_ERR(0, 2587, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_STRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2569, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NOT_STRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_5) < 0) __PYX_ERR(0, 2569, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_STRING, __pyx_t_5) < 0) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2570 + /* "_pynini.pyx":2588 * from _pywrapfst import NOT_O_LABEL_SORTED * from _pywrapfst import NOT_STRING * from _pywrapfst import NOT_TOP_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import NO_EPSILONS * from _pywrapfst import NO_I_EPSILONS */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NOT_TOP_SORTED); __Pyx_GIVEREF(__pyx_n_s_NOT_TOP_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_TOP_SORTED)) __PYX_ERR(0, 2570, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2570, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NOT_TOP_SORTED)) __PYX_ERR(0, 2588, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_TOP_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NOT_TOP_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2571 + /* "_pynini.pyx":2589 * from _pywrapfst import NOT_STRING * from _pywrapfst import NOT_TOP_SORTED * from _pywrapfst import NO_EPSILONS # <<<<<<<<<<<<<< * from _pywrapfst import NO_I_EPSILONS * from _pywrapfst import NO_O_EPSILONS */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2571, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NO_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_NO_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_EPSILONS)) __PYX_ERR(0, 2571, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2571, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_EPSILONS)) __PYX_ERR(0, 2589, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2571, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2571, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2589, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2572 + /* "_pynini.pyx":2590 * from _pywrapfst import NOT_TOP_SORTED * from _pywrapfst import NO_EPSILONS * from _pywrapfst import NO_I_EPSILONS # <<<<<<<<<<<<<< * from _pywrapfst import NO_O_EPSILONS * from _pywrapfst import NULL_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NO_I_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_NO_I_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NO_I_EPSILONS)) __PYX_ERR(0, 2572, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2572, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NO_I_EPSILONS)) __PYX_ERR(0, 2590, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NO_I_EPSILONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NO_I_EPSILONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2572, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2573 + /* "_pynini.pyx":2591 * from _pywrapfst import NO_EPSILONS * from _pywrapfst import NO_I_EPSILONS * from _pywrapfst import NO_O_EPSILONS # <<<<<<<<<<<<<< * from _pywrapfst import NULL_PROPERTIES * from _pywrapfst import O_DETERMINISTIC */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2573, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_NO_O_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_NO_O_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_O_EPSILONS)) __PYX_ERR(0, 2573, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_NO_O_EPSILONS)) __PYX_ERR(0, 2591, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_O_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2573, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_NO_O_EPSILONS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2573, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_O_EPSILONS, __pyx_t_5) < 0) __PYX_ERR(0, 2591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2574 + /* "_pynini.pyx":2592 * from _pywrapfst import NO_I_EPSILONS * from _pywrapfst import NO_O_EPSILONS * from _pywrapfst import NULL_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import O_DETERMINISTIC * from _pywrapfst import O_EPSILONS */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_NULL_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_NULL_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NULL_PROPERTIES)) __PYX_ERR(0, 2574, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_NULL_PROPERTIES)) __PYX_ERR(0, 2592, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NULL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_NULL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2574, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2575 + /* "_pynini.pyx":2593 * from _pywrapfst import NO_O_EPSILONS * from _pywrapfst import NULL_PROPERTIES * from _pywrapfst import O_DETERMINISTIC # <<<<<<<<<<<<<< * from _pywrapfst import O_EPSILONS - * from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES + * from _pywrapfst import \ */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_O_DETERMINISTIC); __Pyx_GIVEREF(__pyx_n_s_O_DETERMINISTIC); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_O_DETERMINISTIC)) __PYX_ERR(0, 2575, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_O_DETERMINISTIC)) __PYX_ERR(0, 2593, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_O_DETERMINISTIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2575, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_O_DETERMINISTIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_5) < 0) __PYX_ERR(0, 2575, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_DETERMINISTIC, __pyx_t_5) < 0) __PYX_ERR(0, 2593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2576 + /* "_pynini.pyx":2594 * from _pywrapfst import NULL_PROPERTIES * from _pywrapfst import O_DETERMINISTIC * from _pywrapfst import O_EPSILONS # <<<<<<<<<<<<<< - * from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES - * from _pywrapfst import O_LABEL_SORTED + * from _pywrapfst import \ + * O_LABEL_INVARIANT_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_O_EPSILONS); __Pyx_GIVEREF(__pyx_n_s_O_EPSILONS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_O_EPSILONS)) __PYX_ERR(0, 2576, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2576, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_O_EPSILONS)) __PYX_ERR(0, 2594, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_O_EPSILONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_O_EPSILONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2576, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2577 - * from _pywrapfst import O_DETERMINISTIC + /* "_pynini.pyx":2596 * from _pywrapfst import O_EPSILONS - * from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< + * from _pywrapfst import \ + * O_LABEL_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import O_LABEL_SORTED * from _pywrapfst import POS_TRINARY_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_O_LABEL_INVARIANT_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_O_LABEL_INVARIANT_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2577, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2596, __pyx_L1_error); + + /* "_pynini.pyx":2595 + * from _pywrapfst import O_DETERMINISTIC + * from _pywrapfst import O_EPSILONS + * from _pywrapfst import \ # <<<<<<<<<<<<<< + * O_LABEL_INVARIANT_PROPERTIES + * from _pywrapfst import O_LABEL_SORTED + */ + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2577, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2577, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2578 - * from _pywrapfst import O_EPSILONS - * from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES + /* "_pynini.pyx":2597 + * from _pywrapfst import \ + * O_LABEL_INVARIANT_PROPERTIES * from _pywrapfst import O_LABEL_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import POS_TRINARY_PROPERTIES * from _pywrapfst import RM_SUPERFINAL_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_O_LABEL_SORTED); __Pyx_GIVEREF(__pyx_n_s_O_LABEL_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_O_LABEL_SORTED)) __PYX_ERR(0, 2578, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2578, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_O_LABEL_SORTED)) __PYX_ERR(0, 2597, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_O_LABEL_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_O_LABEL_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2579 - * from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES + /* "_pynini.pyx":2598 + * O_LABEL_INVARIANT_PROPERTIES * from _pywrapfst import O_LABEL_SORTED * from _pywrapfst import POS_TRINARY_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import RM_SUPERFINAL_PROPERTIES * from _pywrapfst import SET_ARC_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2579, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_POS_TRINARY_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_POS_TRINARY_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_POS_TRINARY_PROPERTIES)) __PYX_ERR(0, 2579, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_POS_TRINARY_PROPERTIES)) __PYX_ERR(0, 2598, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_POS_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2579, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_POS_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2579, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2580 + /* "_pynini.pyx":2599 * from _pywrapfst import O_LABEL_SORTED * from _pywrapfst import POS_TRINARY_PROPERTIES * from _pywrapfst import RM_SUPERFINAL_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import SET_ARC_PROPERTIES * from _pywrapfst import SET_FINAL_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_RM_SUPERFINAL_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_RM_SUPERFINAL_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_RM_SUPERFINAL_PROPERTIES)) __PYX_ERR(0, 2580, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2580, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_RM_SUPERFINAL_PROPERTIES)) __PYX_ERR(0, 2599, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_RM_SUPERFINAL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_RM_SUPERFINAL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2580, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2581 + /* "_pynini.pyx":2600 * from _pywrapfst import POS_TRINARY_PROPERTIES * from _pywrapfst import RM_SUPERFINAL_PROPERTIES * from _pywrapfst import SET_ARC_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import SET_FINAL_PROPERTIES * from _pywrapfst import SET_START_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2581, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_SET_ARC_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_SET_ARC_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SET_ARC_PROPERTIES)) __PYX_ERR(0, 2581, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2581, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SET_ARC_PROPERTIES)) __PYX_ERR(0, 2600, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SET_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2581, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SET_ARC_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2581, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2582 + /* "_pynini.pyx":2601 * from _pywrapfst import RM_SUPERFINAL_PROPERTIES * from _pywrapfst import SET_ARC_PROPERTIES * from _pywrapfst import SET_FINAL_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import SET_START_PROPERTIES * from _pywrapfst import STATE_SORT_PROPERTIES */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SET_FINAL_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_SET_FINAL_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SET_FINAL_PROPERTIES)) __PYX_ERR(0, 2582, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2582, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SET_FINAL_PROPERTIES)) __PYX_ERR(0, 2601, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_SET_FINAL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_SET_FINAL_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2582, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2583 + /* "_pynini.pyx":2602 * from _pywrapfst import SET_ARC_PROPERTIES * from _pywrapfst import SET_FINAL_PROPERTIES * from _pywrapfst import SET_START_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import STATE_SORT_PROPERTIES * from _pywrapfst import STRING */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2583, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_SET_START_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_SET_START_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SET_START_PROPERTIES)) __PYX_ERR(0, 2583, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SET_START_PROPERTIES)) __PYX_ERR(0, 2602, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SET_START_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2583, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SET_START_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2583, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2584 + /* "_pynini.pyx":2603 * from _pywrapfst import SET_FINAL_PROPERTIES * from _pywrapfst import SET_START_PROPERTIES * from _pywrapfst import STATE_SORT_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import STRING * from _pywrapfst import TOP_SORTED */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2584, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_STATE_SORT_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_STATE_SORT_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_STATE_SORT_PROPERTIES)) __PYX_ERR(0, 2584, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2584, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_STATE_SORT_PROPERTIES)) __PYX_ERR(0, 2603, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_STATE_SORT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2584, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_STATE_SORT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2584, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2585 + /* "_pynini.pyx":2604 * from _pywrapfst import SET_START_PROPERTIES * from _pywrapfst import STATE_SORT_PROPERTIES * from _pywrapfst import STRING # <<<<<<<<<<<<<< * from _pywrapfst import TOP_SORTED * from _pywrapfst import TRINARY_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_STRING); __Pyx_GIVEREF(__pyx_n_s_STRING); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_STRING)) __PYX_ERR(0, 2585, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_STRING)) __PYX_ERR(0, 2604, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_STRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2585, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_STRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_5) < 0) __PYX_ERR(0, 2585, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STRING, __pyx_t_5) < 0) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2586 + /* "_pynini.pyx":2605 * from _pywrapfst import STATE_SORT_PROPERTIES * from _pywrapfst import STRING * from _pywrapfst import TOP_SORTED # <<<<<<<<<<<<<< * from _pywrapfst import TRINARY_PROPERTIES * from _pywrapfst import UNWEIGHTED */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_TOP_SORTED); __Pyx_GIVEREF(__pyx_n_s_TOP_SORTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_TOP_SORTED)) __PYX_ERR(0, 2586, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_TOP_SORTED)) __PYX_ERR(0, 2605, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_TOP_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_TOP_SORTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2586, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2587 + /* "_pynini.pyx":2606 * from _pywrapfst import STRING * from _pywrapfst import TOP_SORTED * from _pywrapfst import TRINARY_PROPERTIES # <<<<<<<<<<<<<< * from _pywrapfst import UNWEIGHTED * from _pywrapfst import UNWEIGHTED_CYCLES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_TRINARY_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_TRINARY_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_TRINARY_PROPERTIES)) __PYX_ERR(0, 2587, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2587, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_TRINARY_PROPERTIES)) __PYX_ERR(0, 2606, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2587, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_TRINARY_PROPERTIES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2587, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_5) < 0) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2588 + /* "_pynini.pyx":2607 * from _pywrapfst import TOP_SORTED * from _pywrapfst import TRINARY_PROPERTIES * from _pywrapfst import UNWEIGHTED # <<<<<<<<<<<<<< * from _pywrapfst import UNWEIGHTED_CYCLES * from _pywrapfst import WEIGHTED */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_UNWEIGHTED); __Pyx_GIVEREF(__pyx_n_s_UNWEIGHTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_UNWEIGHTED)) __PYX_ERR(0, 2588, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2588, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_UNWEIGHTED)) __PYX_ERR(0, 2607, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_UNWEIGHTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_UNWEIGHTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 2588, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2589 + /* "_pynini.pyx":2608 * from _pywrapfst import TRINARY_PROPERTIES * from _pywrapfst import UNWEIGHTED * from _pywrapfst import UNWEIGHTED_CYCLES # <<<<<<<<<<<<<< * from _pywrapfst import WEIGHTED * from _pywrapfst import WEIGHTED_CYCLES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_UNWEIGHTED_CYCLES); __Pyx_GIVEREF(__pyx_n_s_UNWEIGHTED_CYCLES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_UNWEIGHTED_CYCLES)) __PYX_ERR(0, 2589, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_UNWEIGHTED_CYCLES)) __PYX_ERR(0, 2608, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_UNWEIGHTED_CYCLES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_UNWEIGHTED_CYCLES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_5) < 0) __PYX_ERR(0, 2589, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_5) < 0) __PYX_ERR(0, 2608, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2590 + /* "_pynini.pyx":2609 * from _pywrapfst import UNWEIGHTED * from _pywrapfst import UNWEIGHTED_CYCLES * from _pywrapfst import WEIGHTED # <<<<<<<<<<<<<< * from _pywrapfst import WEIGHTED_CYCLES - * from _pywrapfst import WEIGHT_INVARIANT_PROPERTIES + * from _pywrapfst import \ */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_WEIGHTED); __Pyx_GIVEREF(__pyx_n_s_WEIGHTED); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_WEIGHTED)) __PYX_ERR(0, 2590, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2590, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_WEIGHTED)) __PYX_ERR(0, 2609, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_WEIGHTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_WEIGHTED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 2590, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2591 + /* "_pynini.pyx":2610 * from _pywrapfst import UNWEIGHTED_CYCLES * from _pywrapfst import WEIGHTED * from _pywrapfst import WEIGHTED_CYCLES # <<<<<<<<<<<<<< - * from _pywrapfst import WEIGHT_INVARIANT_PROPERTIES - * + * from _pywrapfst import \ + * WEIGHT_INVARIANT_PROPERTIES */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_WEIGHTED_CYCLES); __Pyx_GIVEREF(__pyx_n_s_WEIGHTED_CYCLES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_WEIGHTED_CYCLES)) __PYX_ERR(0, 2591, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2591, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_WEIGHTED_CYCLES)) __PYX_ERR(0, 2610, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_WEIGHTED_CYCLES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_WEIGHTED_CYCLES); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_5) < 0) __PYX_ERR(0, 2591, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_5) < 0) __PYX_ERR(0, 2610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2592 - * from _pywrapfst import WEIGHTED + /* "_pynini.pyx":2612 * from _pywrapfst import WEIGHTED_CYCLES - * from _pywrapfst import WEIGHT_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< + * from _pywrapfst import \ + * WEIGHT_INVARIANT_PROPERTIES # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_WEIGHT_INVARIANT_PROPERTIES); __Pyx_GIVEREF(__pyx_n_s_WEIGHT_INVARIANT_PROPERTIES); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2592, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2592, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES)) __PYX_ERR(0, 2612, __pyx_L1_error); + + /* "_pynini.pyx":2611 + * from _pywrapfst import WEIGHTED + * from _pywrapfst import WEIGHTED_CYCLES + * from _pywrapfst import \ # <<<<<<<<<<<<<< + * WEIGHT_INVARIANT_PROPERTIES + * + */ + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2592, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2592, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2598 + /* "_pynini.pyx":2618 * * * from _pywrapfst import ARC_FLAGS # <<<<<<<<<<<<<< * from _pywrapfst import ARC_I_LABEL_VALUE * from _pywrapfst import ARC_NEXT_STATE_VALUE */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ARC_FLAGS); __Pyx_GIVEREF(__pyx_n_s_ARC_FLAGS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_FLAGS)) __PYX_ERR(0, 2598, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2598, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_FLAGS)) __PYX_ERR(0, 2618, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_FLAGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_FLAGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_5) < 0) __PYX_ERR(0, 2598, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_5) < 0) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2599 + /* "_pynini.pyx":2619 * * from _pywrapfst import ARC_FLAGS * from _pywrapfst import ARC_I_LABEL_VALUE # <<<<<<<<<<<<<< * from _pywrapfst import ARC_NEXT_STATE_VALUE * from _pywrapfst import ARC_NO_CACHE */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ARC_I_LABEL_VALUE); __Pyx_GIVEREF(__pyx_n_s_ARC_I_LABEL_VALUE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_I_LABEL_VALUE)) __PYX_ERR(0, 2599, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_I_LABEL_VALUE)) __PYX_ERR(0, 2619, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_I_LABEL_VALUE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_I_LABEL_VALUE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_4) < 0) __PYX_ERR(0, 2599, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_4) < 0) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2600 + /* "_pynini.pyx":2620 * from _pywrapfst import ARC_FLAGS * from _pywrapfst import ARC_I_LABEL_VALUE * from _pywrapfst import ARC_NEXT_STATE_VALUE # <<<<<<<<<<<<<< * from _pywrapfst import ARC_NO_CACHE * from _pywrapfst import ARC_O_LABEL_VALUE */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ARC_NEXT_STATE_VALUE); __Pyx_GIVEREF(__pyx_n_s_ARC_NEXT_STATE_VALUE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_NEXT_STATE_VALUE)) __PYX_ERR(0, 2600, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_NEXT_STATE_VALUE)) __PYX_ERR(0, 2620, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_NEXT_STATE_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_NEXT_STATE_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2600, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2601 + /* "_pynini.pyx":2621 * from _pywrapfst import ARC_I_LABEL_VALUE * from _pywrapfst import ARC_NEXT_STATE_VALUE * from _pywrapfst import ARC_NO_CACHE # <<<<<<<<<<<<<< * from _pywrapfst import ARC_O_LABEL_VALUE * from _pywrapfst import ARC_VALUE_FLAGS */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ARC_NO_CACHE); __Pyx_GIVEREF(__pyx_n_s_ARC_NO_CACHE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_NO_CACHE)) __PYX_ERR(0, 2601, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2601, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_NO_CACHE)) __PYX_ERR(0, 2621, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_NO_CACHE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2601, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_NO_CACHE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_4) < 0) __PYX_ERR(0, 2601, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_4) < 0) __PYX_ERR(0, 2621, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2602 + /* "_pynini.pyx":2622 * from _pywrapfst import ARC_NEXT_STATE_VALUE * from _pywrapfst import ARC_NO_CACHE * from _pywrapfst import ARC_O_LABEL_VALUE # <<<<<<<<<<<<<< * from _pywrapfst import ARC_VALUE_FLAGS * from _pywrapfst import ARC_WEIGHT_VALUE */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2602, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ARC_O_LABEL_VALUE); __Pyx_GIVEREF(__pyx_n_s_ARC_O_LABEL_VALUE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_O_LABEL_VALUE)) __PYX_ERR(0, 2602, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2602, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_O_LABEL_VALUE)) __PYX_ERR(0, 2622, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_O_LABEL_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2602, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_O_LABEL_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2602, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2603 + /* "_pynini.pyx":2623 * from _pywrapfst import ARC_NO_CACHE * from _pywrapfst import ARC_O_LABEL_VALUE * from _pywrapfst import ARC_VALUE_FLAGS # <<<<<<<<<<<<<< * from _pywrapfst import ARC_WEIGHT_VALUE * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ARC_VALUE_FLAGS); __Pyx_GIVEREF(__pyx_n_s_ARC_VALUE_FLAGS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_VALUE_FLAGS)) __PYX_ERR(0, 2603, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2603, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ARC_VALUE_FLAGS)) __PYX_ERR(0, 2623, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_VALUE_FLAGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ARC_VALUE_FLAGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_4) < 0) __PYX_ERR(0, 2603, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_4) < 0) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2604 + /* "_pynini.pyx":2624 * from _pywrapfst import ARC_O_LABEL_VALUE * from _pywrapfst import ARC_VALUE_FLAGS * from _pywrapfst import ARC_WEIGHT_VALUE # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2604, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ARC_WEIGHT_VALUE); __Pyx_GIVEREF(__pyx_n_s_ARC_WEIGHT_VALUE); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_WEIGHT_VALUE)) __PYX_ERR(0, 2604, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2604, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ARC_WEIGHT_VALUE)) __PYX_ERR(0, 2624, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_WEIGHT_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2604, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ARC_WEIGHT_VALUE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2604, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_5) < 0) __PYX_ERR(0, 2624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2610 + /* "_pynini.pyx":2630 * * * from _pywrapfst import ENCODE_FLAGS # <<<<<<<<<<<<<< * from _pywrapfst import ENCODE_LABELS * from _pywrapfst import ENCODE_WEIGHTS */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ENCODE_FLAGS); __Pyx_GIVEREF(__pyx_n_s_ENCODE_FLAGS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ENCODE_FLAGS)) __PYX_ERR(0, 2610, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2610, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ENCODE_FLAGS)) __PYX_ERR(0, 2630, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ENCODE_FLAGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ENCODE_FLAGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_4) < 0) __PYX_ERR(0, 2610, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_4) < 0) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2611 + /* "_pynini.pyx":2631 * * from _pywrapfst import ENCODE_FLAGS * from _pywrapfst import ENCODE_LABELS # <<<<<<<<<<<<<< * from _pywrapfst import ENCODE_WEIGHTS * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2611, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ENCODE_LABELS); __Pyx_GIVEREF(__pyx_n_s_ENCODE_LABELS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ENCODE_LABELS)) __PYX_ERR(0, 2611, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ENCODE_LABELS)) __PYX_ERR(0, 2631, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ENCODE_LABELS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2611, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ENCODE_LABELS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_5) < 0) __PYX_ERR(0, 2611, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_5) < 0) __PYX_ERR(0, 2631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2612 + /* "_pynini.pyx":2632 * from _pywrapfst import ENCODE_FLAGS * from _pywrapfst import ENCODE_LABELS * from _pywrapfst import ENCODE_WEIGHTS # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ENCODE_WEIGHTS); __Pyx_GIVEREF(__pyx_n_s_ENCODE_WEIGHTS); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ENCODE_WEIGHTS)) __PYX_ERR(0, 2612, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2612, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ENCODE_WEIGHTS)) __PYX_ERR(0, 2632, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ENCODE_WEIGHTS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ENCODE_WEIGHTS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_4) < 0) __PYX_ERR(0, 2612, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_4) < 0) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2621 + /* "_pynini.pyx":2641 * * * def _copy_patch(fnc): # <<<<<<<<<<<<<< * @functools.wraps(fnc) * def patch(arg1, *args, **kwargs): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_55_copy_patch, 0, __pyx_n_s_copy_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2621, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7_pynini_55_copy_patch, 0, __pyx_n_s_copy_patch, NULL, __pyx_n_s_pynini, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy_patch, __pyx_t_5) < 0) __PYX_ERR(0, 2621, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy_patch, __pyx_t_5) < 0) __PYX_ERR(0, 2641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2630 + /* "_pynini.pyx":2650 * * * arcsort = _copy_patch(Fst.arcsort) # <<<<<<<<<<<<<< * closure = _copy_patch(Fst.closure) * connect = _copy_patch(Fst.connect) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2630, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_arcsort); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_arcsort); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2630, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcsort, __pyx_t_2) < 0) __PYX_ERR(0, 2630, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcsort, __pyx_t_2) < 0) __PYX_ERR(0, 2650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2631 + /* "_pynini.pyx":2651 * * arcsort = _copy_patch(Fst.arcsort) * closure = _copy_patch(Fst.closure) # <<<<<<<<<<<<<< * connect = _copy_patch(Fst.connect) * decode = _copy_patch(Fst.decode) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2631, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2631, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_closure); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2631, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_closure, __pyx_t_5) < 0) __PYX_ERR(0, 2631, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_closure, __pyx_t_5) < 0) __PYX_ERR(0, 2651, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2632 + /* "_pynini.pyx":2652 * arcsort = _copy_patch(Fst.arcsort) * closure = _copy_patch(Fst.closure) * connect = _copy_patch(Fst.connect) # <<<<<<<<<<<<<< * decode = _copy_patch(Fst.decode) * encode = _copy_patch(Fst.encode) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2632, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_connect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2632, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_connect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2632, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_connect, __pyx_t_2) < 0) __PYX_ERR(0, 2632, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_connect, __pyx_t_2) < 0) __PYX_ERR(0, 2652, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2633 + /* "_pynini.pyx":2653 * closure = _copy_patch(Fst.closure) * connect = _copy_patch(Fst.connect) * decode = _copy_patch(Fst.decode) # <<<<<<<<<<<<<< * encode = _copy_patch(Fst.encode) * invert = _copy_patch(Fst.invert) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2633, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2633, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode, __pyx_t_5) < 0) __PYX_ERR(0, 2633, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode, __pyx_t_5) < 0) __PYX_ERR(0, 2653, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2634 + /* "_pynini.pyx":2654 * connect = _copy_patch(Fst.connect) * decode = _copy_patch(Fst.decode) * encode = _copy_patch(Fst.encode) # <<<<<<<<<<<<<< * invert = _copy_patch(Fst.invert) * minimize = _copy_patch(Fst.minimize) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2634, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2634, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2634, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 2634, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode, __pyx_t_2) < 0) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2635 + /* "_pynini.pyx":2655 * decode = _copy_patch(Fst.decode) * encode = _copy_patch(Fst.encode) * invert = _copy_patch(Fst.invert) # <<<<<<<<<<<<<< * minimize = _copy_patch(Fst.minimize) * optimize = _copy_patch(Fst.optimize) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2635, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_invert); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_invert); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2635, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_invert, __pyx_t_5) < 0) __PYX_ERR(0, 2635, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_invert, __pyx_t_5) < 0) __PYX_ERR(0, 2655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2636 + /* "_pynini.pyx":2656 * encode = _copy_patch(Fst.encode) * invert = _copy_patch(Fst.invert) * minimize = _copy_patch(Fst.minimize) # <<<<<<<<<<<<<< * optimize = _copy_patch(Fst.optimize) * project = _copy_patch(Fst.project) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2636, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_minimize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2636, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_minimize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimize, __pyx_t_2) < 0) __PYX_ERR(0, 2636, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_minimize, __pyx_t_2) < 0) __PYX_ERR(0, 2656, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2637 + /* "_pynini.pyx":2657 * invert = _copy_patch(Fst.invert) * minimize = _copy_patch(Fst.minimize) * optimize = _copy_patch(Fst.optimize) # <<<<<<<<<<<<<< * project = _copy_patch(Fst.project) * relabel_pairs = _copy_patch(Fst.relabel_pairs) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2637, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_optimize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2637, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_optimize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2637, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_optimize, __pyx_t_5) < 0) __PYX_ERR(0, 2637, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_optimize, __pyx_t_5) < 0) __PYX_ERR(0, 2657, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2638 + /* "_pynini.pyx":2658 * minimize = _copy_patch(Fst.minimize) * optimize = _copy_patch(Fst.optimize) * project = _copy_patch(Fst.project) # <<<<<<<<<<<<<< * relabel_pairs = _copy_patch(Fst.relabel_pairs) * relabel_tables = _copy_patch(Fst.relabel_tables) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2638, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_project); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_project); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_project, __pyx_t_2) < 0) __PYX_ERR(0, 2638, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_project, __pyx_t_2) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2639 + /* "_pynini.pyx":2659 * optimize = _copy_patch(Fst.optimize) * project = _copy_patch(Fst.project) * relabel_pairs = _copy_patch(Fst.relabel_pairs) # <<<<<<<<<<<<<< * relabel_tables = _copy_patch(Fst.relabel_tables) * reweight = _copy_patch(Fst.reweight) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_relabel_pairs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_relabel_pairs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_relabel_pairs, __pyx_t_5) < 0) __PYX_ERR(0, 2639, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_relabel_pairs, __pyx_t_5) < 0) __PYX_ERR(0, 2659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2640 + /* "_pynini.pyx":2660 * project = _copy_patch(Fst.project) * relabel_pairs = _copy_patch(Fst.relabel_pairs) * relabel_tables = _copy_patch(Fst.relabel_tables) # <<<<<<<<<<<<<< * reweight = _copy_patch(Fst.reweight) * rmepsilon = _copy_patch(Fst.rmepsilon) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2640, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_relabel_tables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_relabel_tables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_relabel_tables, __pyx_t_2) < 0) __PYX_ERR(0, 2640, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_relabel_tables, __pyx_t_2) < 0) __PYX_ERR(0, 2660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2641 + /* "_pynini.pyx":2661 * relabel_pairs = _copy_patch(Fst.relabel_pairs) * relabel_tables = _copy_patch(Fst.relabel_tables) * reweight = _copy_patch(Fst.reweight) # <<<<<<<<<<<<<< * rmepsilon = _copy_patch(Fst.rmepsilon) * topsort = _copy_patch(Fst.topsort) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2641, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_reweight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2641, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_reweight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2641, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reweight, __pyx_t_5) < 0) __PYX_ERR(0, 2641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reweight, __pyx_t_5) < 0) __PYX_ERR(0, 2661, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2642 + /* "_pynini.pyx":2662 * relabel_tables = _copy_patch(Fst.relabel_tables) * reweight = _copy_patch(Fst.reweight) * rmepsilon = _copy_patch(Fst.rmepsilon) # <<<<<<<<<<<<<< * topsort = _copy_patch(Fst.topsort) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2642, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_rmepsilon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2642, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_rmepsilon); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2642, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmepsilon, __pyx_t_2) < 0) __PYX_ERR(0, 2642, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmepsilon, __pyx_t_2) < 0) __PYX_ERR(0, 2662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pynini.pyx":2643 + /* "_pynini.pyx":2663 * reweight = _copy_patch(Fst.reweight) * rmepsilon = _copy_patch(Fst.rmepsilon) * topsort = _copy_patch(Fst.topsort) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy_patch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_topsort); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2643, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7_pynini_Fst), __pyx_n_s_topsort); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2643, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_topsort, __pyx_t_5) < 0) __PYX_ERR(0, 2643, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_topsort, __pyx_t_5) < 0) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2649 + /* "_pynini.pyx":2669 * * * from _pywrapfst import compact_symbol_table # <<<<<<<<<<<<<< * from _pywrapfst import merge_symbol_table * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2649, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_compact_symbol_table); __Pyx_GIVEREF(__pyx_n_s_compact_symbol_table); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_compact_symbol_table)) __PYX_ERR(0, 2649, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2649, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_compact_symbol_table)) __PYX_ERR(0, 2669, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_compact_symbol_table); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2649, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_compact_symbol_table); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_compact_symbol_table, __pyx_t_5) < 0) __PYX_ERR(0, 2649, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_compact_symbol_table, __pyx_t_5) < 0) __PYX_ERR(0, 2669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2650 + /* "_pynini.pyx":2670 * * from _pywrapfst import compact_symbol_table * from _pywrapfst import merge_symbol_table # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_merge_symbol_table); __Pyx_GIVEREF(__pyx_n_s_merge_symbol_table); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_merge_symbol_table)) __PYX_ERR(0, 2650, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2650, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_merge_symbol_table)) __PYX_ERR(0, 2670, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_merge_symbol_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_merge_symbol_table); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_symbol_table, __pyx_t_4) < 0) __PYX_ERR(0, 2650, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_symbol_table, __pyx_t_4) < 0) __PYX_ERR(0, 2670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2656 + /* "_pynini.pyx":2676 * * * from _pywrapfst import divide # <<<<<<<<<<<<<< * from _pywrapfst import power * from _pywrapfst import plus */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2656, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_divide); __Pyx_GIVEREF(__pyx_n_s_divide); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_divide)) __PYX_ERR(0, 2656, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2656, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_divide)) __PYX_ERR(0, 2676, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_divide); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2656, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_divide); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_5) < 0) __PYX_ERR(0, 2656, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_5) < 0) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2657 + /* "_pynini.pyx":2677 * * from _pywrapfst import divide * from _pywrapfst import power # <<<<<<<<<<<<<< * from _pywrapfst import plus * from _pywrapfst import times */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_power); __Pyx_GIVEREF(__pyx_n_s_power); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_power)) __PYX_ERR(0, 2657, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_power)) __PYX_ERR(0, 2677, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_power); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_power); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_4) < 0) __PYX_ERR(0, 2657, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_4) < 0) __PYX_ERR(0, 2677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2658 + /* "_pynini.pyx":2678 * from _pywrapfst import divide * from _pywrapfst import power * from _pywrapfst import plus # <<<<<<<<<<<<<< * from _pywrapfst import times * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_plus); __Pyx_GIVEREF(__pyx_n_s_plus); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_plus)) __PYX_ERR(0, 2658, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2658, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_plus)) __PYX_ERR(0, 2678, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_plus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_plus); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_5) < 0) __PYX_ERR(0, 2658, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_5) < 0) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2659 + /* "_pynini.pyx":2679 * from _pywrapfst import power * from _pywrapfst import plus * from _pywrapfst import times # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2659, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_times); __Pyx_GIVEREF(__pyx_n_s_times); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_times)) __PYX_ERR(0, 2659, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2659, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_times)) __PYX_ERR(0, 2679, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_times); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2659, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_times); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_4) < 0) __PYX_ERR(0, 2659, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_4) < 0) __PYX_ERR(0, 2679, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2664 + /* "_pynini.pyx":2684 * # Custom types. * * from _pywrapfst import ArcMapType # <<<<<<<<<<<<<< * from _pywrapfst import ComposeFilter * from _pywrapfst import DeterminizeType */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2664, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ArcMapType); __Pyx_GIVEREF(__pyx_n_s_ArcMapType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ArcMapType)) __PYX_ERR(0, 2664, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ArcMapType)) __PYX_ERR(0, 2684, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ArcMapType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2664, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ArcMapType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_t_5) < 0) __PYX_ERR(0, 2664, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_t_5) < 0) __PYX_ERR(0, 2684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2665 + /* "_pynini.pyx":2685 * * from _pywrapfst import ArcMapType * from _pywrapfst import ComposeFilter # <<<<<<<<<<<<<< * from _pywrapfst import DeterminizeType * from _pywrapfst import EpsNormalizeType */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ComposeFilter); __Pyx_GIVEREF(__pyx_n_s_ComposeFilter); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ComposeFilter)) __PYX_ERR(0, 2665, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2665, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ComposeFilter)) __PYX_ERR(0, 2685, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ComposeFilter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ComposeFilter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_t_4) < 0) __PYX_ERR(0, 2665, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_t_4) < 0) __PYX_ERR(0, 2685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2666 + /* "_pynini.pyx":2686 * from _pywrapfst import ArcMapType * from _pywrapfst import ComposeFilter * from _pywrapfst import DeterminizeType # <<<<<<<<<<<<<< * from _pywrapfst import EpsNormalizeType * from _pywrapfst import FarType */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2666, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_DeterminizeType); __Pyx_GIVEREF(__pyx_n_s_DeterminizeType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_DeterminizeType)) __PYX_ERR(0, 2666, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2666, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_DeterminizeType)) __PYX_ERR(0, 2686, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DeterminizeType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2666, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_DeterminizeType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_t_5) < 0) __PYX_ERR(0, 2666, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_t_5) < 0) __PYX_ERR(0, 2686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2667 + /* "_pynini.pyx":2687 * from _pywrapfst import ComposeFilter * from _pywrapfst import DeterminizeType * from _pywrapfst import EpsNormalizeType # <<<<<<<<<<<<<< * from _pywrapfst import FarType * from _pywrapfst import ProjectType */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_EpsNormalizeType); __Pyx_GIVEREF(__pyx_n_s_EpsNormalizeType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EpsNormalizeType)) __PYX_ERR(0, 2667, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2667, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_EpsNormalizeType)) __PYX_ERR(0, 2687, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EpsNormalizeType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_EpsNormalizeType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EpsNormalizeType, __pyx_t_4) < 0) __PYX_ERR(0, 2667, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EpsNormalizeType, __pyx_t_4) < 0) __PYX_ERR(0, 2687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2668 + /* "_pynini.pyx":2688 * from _pywrapfst import DeterminizeType * from _pywrapfst import EpsNormalizeType * from _pywrapfst import FarType # <<<<<<<<<<<<<< * from _pywrapfst import ProjectType * from _pywrapfst import QueueType */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2668, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_FarType); __Pyx_GIVEREF(__pyx_n_s_FarType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FarType)) __PYX_ERR(0, 2668, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2668, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_FarType)) __PYX_ERR(0, 2688, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FarType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2668, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FarType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_t_5) < 0) __PYX_ERR(0, 2668, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_t_5) < 0) __PYX_ERR(0, 2688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2669 + /* "_pynini.pyx":2689 * from _pywrapfst import EpsNormalizeType * from _pywrapfst import FarType * from _pywrapfst import ProjectType # <<<<<<<<<<<<<< * from _pywrapfst import QueueType * from _pywrapfst import RandArcSelection */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2669, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ProjectType); __Pyx_GIVEREF(__pyx_n_s_ProjectType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ProjectType)) __PYX_ERR(0, 2669, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2669, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ProjectType)) __PYX_ERR(0, 2689, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ProjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2669, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ProjectType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_t_4) < 0) __PYX_ERR(0, 2669, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_t_4) < 0) __PYX_ERR(0, 2689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2670 + /* "_pynini.pyx":2690 * from _pywrapfst import FarType * from _pywrapfst import ProjectType * from _pywrapfst import QueueType # <<<<<<<<<<<<<< * from _pywrapfst import RandArcSelection * from _pywrapfst import ReplaceLabelType */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2670, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_QueueType); __Pyx_GIVEREF(__pyx_n_s_QueueType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_QueueType)) __PYX_ERR(0, 2670, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_QueueType)) __PYX_ERR(0, 2690, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_QueueType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2670, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_QueueType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_t_5) < 0) __PYX_ERR(0, 2670, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_t_5) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2671 + /* "_pynini.pyx":2691 * from _pywrapfst import ProjectType * from _pywrapfst import QueueType * from _pywrapfst import RandArcSelection # <<<<<<<<<<<<<< * from _pywrapfst import ReplaceLabelType * from _pywrapfst import ReweightType */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2671, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_RandArcSelection); __Pyx_GIVEREF(__pyx_n_s_RandArcSelection); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_RandArcSelection)) __PYX_ERR(0, 2671, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2671, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_RandArcSelection)) __PYX_ERR(0, 2691, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_RandArcSelection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2671, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_RandArcSelection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_t_4) < 0) __PYX_ERR(0, 2671, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_t_4) < 0) __PYX_ERR(0, 2691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2672 + /* "_pynini.pyx":2692 * from _pywrapfst import QueueType * from _pywrapfst import RandArcSelection * from _pywrapfst import ReplaceLabelType # <<<<<<<<<<<<<< * from _pywrapfst import ReweightType * from _pywrapfst import SortType */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2672, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_ReplaceLabelType); __Pyx_GIVEREF(__pyx_n_s_ReplaceLabelType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ReplaceLabelType)) __PYX_ERR(0, 2672, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2672, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_ReplaceLabelType)) __PYX_ERR(0, 2692, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ReplaceLabelType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2672, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ReplaceLabelType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_t_5) < 0) __PYX_ERR(0, 2672, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_t_5) < 0) __PYX_ERR(0, 2692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2673 + /* "_pynini.pyx":2693 * from _pywrapfst import RandArcSelection * from _pywrapfst import ReplaceLabelType * from _pywrapfst import ReweightType # <<<<<<<<<<<<<< * from _pywrapfst import SortType * from _pywrapfst import StateMapType */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2673, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_ReweightType); __Pyx_GIVEREF(__pyx_n_s_ReweightType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ReweightType)) __PYX_ERR(0, 2673, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2673, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_ReweightType)) __PYX_ERR(0, 2693, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ReweightType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2673, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_ReweightType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReweightType, __pyx_t_4) < 0) __PYX_ERR(0, 2673, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReweightType, __pyx_t_4) < 0) __PYX_ERR(0, 2693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2674 + /* "_pynini.pyx":2694 * from _pywrapfst import ReplaceLabelType * from _pywrapfst import ReweightType * from _pywrapfst import SortType # <<<<<<<<<<<<<< * from _pywrapfst import StateMapType * from _pywrapfst import WeightLike */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2674, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_SortType); __Pyx_GIVEREF(__pyx_n_s_SortType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SortType)) __PYX_ERR(0, 2674, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2674, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SortType)) __PYX_ERR(0, 2694, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SortType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2674, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SortType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_t_5) < 0) __PYX_ERR(0, 2674, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_t_5) < 0) __PYX_ERR(0, 2694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2675 + /* "_pynini.pyx":2695 * from _pywrapfst import ReweightType * from _pywrapfst import SortType * from _pywrapfst import StateMapType # <<<<<<<<<<<<<< * from _pywrapfst import WeightLike * */ - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_StateMapType); __Pyx_GIVEREF(__pyx_n_s_StateMapType); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_StateMapType)) __PYX_ERR(0, 2675, __pyx_L1_error); - __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2675, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_StateMapType)) __PYX_ERR(0, 2695, __pyx_L1_error); + __pyx_t_5 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_StateMapType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_StateMapType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_t_4) < 0) __PYX_ERR(0, 2675, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_t_4) < 0) __PYX_ERR(0, 2695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pynini.pyx":2676 + /* "_pynini.pyx":2696 * from _pywrapfst import SortType * from _pywrapfst import StateMapType * from _pywrapfst import WeightLike # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2676, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_WeightLike); __Pyx_GIVEREF(__pyx_n_s_WeightLike); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_WeightLike)) __PYX_ERR(0, 2676, __pyx_L1_error); - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2676, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_WeightLike)) __PYX_ERR(0, 2696, __pyx_L1_error); + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pywrapfst, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_WeightLike); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2676, __pyx_L1_error) + __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_WeightLike); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_t_5) < 0) __PYX_ERR(0, 2676, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_t_5) < 0) __PYX_ERR(0, 2696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2683 + /* "_pynini.pyx":2703 * * * import typing # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_typing, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2683, __pyx_L1_error) + __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_typing, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_4) < 0) __PYX_ERR(0, 2683, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_4) < 0) __PYX_ERR(0, 2703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pynini.pyx":2686 + /* "_pynini.pyx":2706 * * * CDRewriteDirection = """typing.Literal["ltr", "rtl", "sim"]""" # <<<<<<<<<<<<<< * CDRewriteMode = """typing.Literal["obl", "opt"]""" * FarFileMode = """typing.Literal["r", "w"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CDRewriteDirection, __pyx_kp_u_typing_Literal_ltr_rtl_sim) < 0) __PYX_ERR(0, 2686, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CDRewriteDirection, __pyx_kp_u_typing_Literal_ltr_rtl_sim) < 0) __PYX_ERR(0, 2706, __pyx_L1_error) - /* "_pynini.pyx":2687 + /* "_pynini.pyx":2707 * * CDRewriteDirection = """typing.Literal["ltr", "rtl", "sim"]""" * CDRewriteMode = """typing.Literal["obl", "opt"]""" # <<<<<<<<<<<<<< * FarFileMode = """typing.Literal["r", "w"]""" * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CDRewriteMode, __pyx_kp_u_typing_Literal_obl_opt) < 0) __PYX_ERR(0, 2687, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CDRewriteMode, __pyx_kp_u_typing_Literal_obl_opt) < 0) __PYX_ERR(0, 2707, __pyx_L1_error) - /* "_pynini.pyx":2688 + /* "_pynini.pyx":2708 * CDRewriteDirection = """typing.Literal["ltr", "rtl", "sim"]""" * CDRewriteMode = """typing.Literal["obl", "opt"]""" * FarFileMode = """typing.Literal["r", "w"]""" # <<<<<<<<<<<<<< * * FstLike = """typing.Union[Fst, str]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarFileMode, __pyx_kp_u_typing_Literal_r_w) < 0) __PYX_ERR(0, 2688, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarFileMode, __pyx_kp_u_typing_Literal_r_w) < 0) __PYX_ERR(0, 2708, __pyx_L1_error) - /* "_pynini.pyx":2690 + /* "_pynini.pyx":2710 * FarFileMode = """typing.Literal["r", "w"]""" * * FstLike = """typing.Union[Fst, str]""" # <<<<<<<<<<<<<< * TokenType = """typing.Union[SymbolTableView, typing.Literal["byte", "utf8"]]""" * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstLike, __pyx_kp_u_typing_Union_Fst_str) < 0) __PYX_ERR(0, 2690, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstLike, __pyx_kp_u_typing_Union_Fst_str) < 0) __PYX_ERR(0, 2710, __pyx_L1_error) - /* "_pynini.pyx":2691 + /* "_pynini.pyx":2711 * * FstLike = """typing.Union[Fst, str]""" * TokenType = """typing.Union[SymbolTableView, typing.Literal["byte", "utf8"]]""" # <<<<<<<<<<<<<< * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TokenType, __pyx_kp_u_typing_Union_SymbolTableView_typ) < 0) __PYX_ERR(0, 2691, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TokenType, __pyx_kp_u_typing_Union_SymbolTableView_typ) < 0) __PYX_ERR(0, 2711, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_PdtParentheses(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -50629,8 +51202,8 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "_pynini.pyx":1 - * #cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, c_api_binop_methods=True, nonecheck=True # <<<<<<<<<<<<<< - * # Copyright 2016-2020 Google LLC + * #cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, nonecheck=True # <<<<<<<<<<<<<< + * # Copyright 2016-2024 Google LLC * # */ __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -50826,14 +51399,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #endif /* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } +#endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { @@ -50845,6 +51424,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; +#endif } /* GetBuiltinName */ @@ -50933,7 +51513,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { @@ -51012,9 +51592,15 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && @@ -51091,8 +51677,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -51111,8 +51702,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -51177,7 +51773,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL - #if Py_VERSION_HEX < 0x03090000 + #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); @@ -51568,6 +52164,24 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO } return NULL; // not found (no exception set) } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; i= 0x030D0000 + #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); @@ -52323,10 +52939,7 @@ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME); - if (unlikely(!abi_module)) return NULL; - Py_INCREF(abi_module); - return abi_module; + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ @@ -53502,6 +54115,7 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qual } /* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -53511,9 +54125,14 @@ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { Py_INCREF(d); return d; } +#endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; -#if CYTHON_USE_TYPE_SLOTS +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS if (likely(PyString_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { @@ -53521,9 +54140,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject } return r; } -#endif + #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif } /* RaiseUnexpectedTypeError */ @@ -53739,7 +54359,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } } #else - if (is_list || PySequence_Check(o)) { + if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif @@ -53760,6 +54380,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { } /* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { @@ -53776,12 +54397,13 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { return 1; } } +#endif /* TypeImport */ -#ifndef __PYX_HAVE_RT_ImportType_3_0_3 -#define __PYX_HAVE_RT_ImportType_3_0_3 -static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_3 check_size) +#ifndef __PYX_HAVE_RT_ImportType_3_0_7 +#define __PYX_HAVE_RT_ImportType_3_0_7 +static PyTypeObject *__Pyx_ImportType_3_0_7(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_7 check_size) { PyObject *result = 0; char warning[200]; @@ -53835,7 +54457,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_3 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_7 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -53843,7 +54465,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_3(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_3 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_7 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -54039,38 +54661,38 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs #endif return -1; } -#if !CYTHON_USE_TYPE_SLOTS - if (dictoffset == 0) { - PyErr_Format(PyExc_TypeError, - "extension type '%s.200s': " - "unable to validate whether bases have a __dict__ " - "when CYTHON_USE_TYPE_SLOTS is off " - "(likely because you are building in the limited API). " - "Therefore, all extension types with multiple bases " - "must add 'cdef dict __dict__' in this compilation mode", - type_name); -#if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); -#endif - return -1; - } -#else - if (dictoffset == 0 && b->tp_dictoffset) + if (dictoffset == 0) { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, " - "but base type '" __Pyx_FMT_TYPENAME "' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - type_name, b_name); - __Pyx_DECREF_TypeName(b_name); + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); + Py_DECREF(b0); #endif - return -1; + return -1; + } } -#endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif @@ -55090,8 +55712,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject Py_DECREF(replace); return result; } - #if __PYX_LIMITED_VERSION_HEX < 0x030780000 PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; @@ -55111,6 +55733,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject if (result) Py_INCREF(result); return result; } + #else + return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, @@ -55312,13 +55936,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int64_t), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); if (!py_bytes) goto limited_bad; @@ -55326,16 +55950,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -55511,7 +56137,7 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -55647,13 +56273,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(char), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(char)); if (!py_bytes) goto limited_bad; @@ -55661,16 +56287,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -55846,7 +56474,7 @@ static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -56119,7 +56747,7 @@ static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -56392,7 +57020,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -56665,7 +57293,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -56801,13 +57429,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; @@ -56815,16 +57443,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -57016,7 +57646,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -57290,12 +57920,21 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, #endif /* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } +#endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { @@ -57305,6 +57944,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); +#endif } /* CoroutineBase */ @@ -57592,9 +58232,22 @@ PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { PyErr_SetNone(PyExc_StopIteration); } else { +#if PY_VERSION_HEX < 0x030d00A1 _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif } - Py_CLEAR(result); + Py_DECREF(result); + result = NULL; } return result; #endif @@ -58375,7 +59028,7 @@ static int __pyx_Generator_init(PyObject *module) { } /* CheckBinaryVersion */ -static unsigned long __Pyx_get_runtime_version() { +static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else @@ -58422,9 +59075,9 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt } /* FunctionImport */ -#ifndef __PYX_HAVE_RT_ImportFunction_3_0_3 -#define __PYX_HAVE_RT_ImportFunction_3_0_3 -static int __Pyx_ImportFunction_3_0_3(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { +#ifndef __PYX_HAVE_RT_ImportFunction_3_0_7 +#define __PYX_HAVE_RT_ImportFunction_3_0_7 +static int __Pyx_ImportFunction_3_0_7(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { diff --git a/extensions/_pynini.pyx b/extensions/_pynini.pyx index 607e3e0..ec6b4d2 100644 --- a/extensions/_pynini.pyx +++ b/extensions/_pynini.pyx @@ -1,5 +1,5 @@ -#cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, c_api_binop_methods=True, nonecheck=True -# Copyright 2016-2020 Google LLC +#cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, nonecheck=True +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Pynini: finite-state grammar compilation for Python.""" @@ -38,8 +36,6 @@ from libcpp.utility cimport pair from libcpp.string cimport string from libcpp.vector cimport vector -from cmemory cimport WrapUnique - from cpywrapfst cimport ArcSort from cpywrapfst cimport ArcSortType from cpywrapfst cimport Closure @@ -64,15 +60,19 @@ from cpywrapfst cimport WeightClass from _pywrapfst cimport FarReader from _pywrapfst cimport FarWriter from _pywrapfst cimport Fst as _Fst -from _pywrapfst cimport MutableFst as _MutableFst +from _pywrapfst cimport MutableFst as \ + _MutableFst from _pywrapfst cimport SymbolTable_ptr from _pywrapfst cimport const_SymbolTable_ptr from _pywrapfst cimport VectorFst as _VectorFst from _pywrapfst cimport Weight as _Weight -from _pywrapfst cimport SymbolTable as _SymbolTable -from _pywrapfst cimport SymbolTableView as _SymbolTableView +from _pywrapfst cimport SymbolTable as \ + _SymbolTable +from _pywrapfst cimport SymbolTableView as \ + _SymbolTableView from _pywrapfst cimport _get_WeightClass_or_one -from _pywrapfst cimport _get_WeightClass_or_zero +from _pywrapfst cimport \ + _get_WeightClass_or_zero from _pywrapfst cimport _get_compose_filter from _pywrapfst cimport _get_queue_type from _pywrapfst cimport _get_replace_label_type @@ -84,7 +84,8 @@ from _pywrapfst cimport path_tostring # C++ code for Pynini not from fst_util. from cpynini cimport CDRewriteCompile -from cpynini cimport CDRewriteDirection as _CDRewriteDirection +from cpynini cimport CDRewriteDirection as \ + _CDRewriteDirection from cpynini cimport CDRewriteMode as _CDRewriteMode from cpynini cimport Compose from cpynini cimport ConcatRange @@ -695,23 +696,32 @@ cdef class Fst(_VectorFst): def __add__(self, other): return concat(self, other) + def __radd__(self, other): + # Called as `fst.__radd__(string)` from the expression `string + fst`, + # hence the change in order of arguments. + return concat(other, self) + def __iadd__(self, other): return self.concat(other) def __sub__(self, other): return difference(self, other) + def __rsub__(self, other): + # Called as `fst.__rsub__(string)` in the (weird) expression + # `string - fst`, hence the change in order of arguments. + return difference(other, self) + # __isub__ is not implemented separately because difference is not an # in-place operation. def __pow__(self, other, modulo): """Constructively generates the range-concatenation of the FST. - For all natural numbers n, `f ** n` is the same as `f ** (n, n). - Note that `f ** (0, ...)` is the same as `f.star`, - `f ** (1, ...)` is `f.plus`, - `f ** (0, 1)` is the same as `f.ques`. - and `f ** (5, ...)` is the obvious generalization. + For all natural numbers n, `f ** n` is the same as `f ** (n, n). Note that + `f ** (0, ...)` is the same as `f.star`, `f ** (1, ...)` is `f.plus`, + `f ** (0, 1)` is the same as `f.ques`, and `f ** (5, ...)` is the obvious + generalization. """ if not isinstance(self, Fst) or modulo is not None: return NotImplemented @@ -730,21 +740,29 @@ cdef class Fst(_VectorFst): return closure(self, lower, upper) return NotImplemented - # TODO(kbg): Cython only has support for two-argument __ipow__; see: + # TODO(kbg): Cython <3.0 only has support for two-argument __ipow__; see: # # http://github.com/cython/cython/commit/829d6 # - # If this ever changes, implement __ipow__ in the obvious fashion. + # Implement __ipow__ once we move to Cython 3. def __matmul__(self, other): return compose(self, other) + def __rmatmul__(self, other): + # Called as `fst.__rmatmul__(string)` from the expression `string @ fst`, + # hence the change in order of arguments. + return compose(other, self) + # __imatmul__ is not implemented separately because composition is not an # in-place operation. def __or__(self, other): return union(self, other) + def __ror__(self, other): + return union(self, other) + def __ior__(self, other): return self.union(other) @@ -940,7 +958,7 @@ cpdef Fst cdrewrite(tau, l, r, sigma_star, direction="ltr", mode="obl"): within L, and "[EOS]" (end of string) denotes the right edge of a string within R. Note that these reserved symbols do not have any special interpretation anywhere else within this library. - + Args: tau: A transducer representing the desired transduction tau. l: An unweighted acceptor representing the left context L. @@ -1355,7 +1373,7 @@ cpdef Fst replace(pairs, Args: pairs: An iterable of (nonterminal label, FST) pairs, where the former is an - unsigned integer and the latter is an Fst instance. + unsigned integer and the latter is an Fst instance. call_arc_labeling: A string indicating which call arc labels should be non-epsilon. One of: "input" (default), "output", "both", "neither". This value is set to "neither" if epsilon_on_replace is True. @@ -1481,8 +1499,7 @@ cdef class PdtParentheses: """ cdef PdtParentheses result = PdtParentheses.__new__(PdtParentheses) if not ReadLabelPairs[int64_t](path_tostring(filename), - addr(result._parens), - False): + addr(result._parens)): raise FstIOError(f"Read failed: {filename}") return result @@ -1831,8 +1848,7 @@ cdef class MPdtParentheses: cdef MPdtParentheses result = MPdtParentheses.__new__(MPdtParentheses) if not ReadLabelTriples[int64_t](path_tostring(filename), addr(result._parens), - addr(result._assign), - False): + addr(result._assign)): raise FstIOError(f"Read failed: {filename}") return result @@ -2128,7 +2144,7 @@ cdef class _StringPathIterator: Generates all (istring, ostring, weight) triples in the FST. - This method returns a generator over all triples of input strings, + This method returns a generator over all triples of input strings, output strings, and path weights. The caller is responsible for resetting the iterator if desired. @@ -2536,7 +2552,8 @@ from _pywrapfst import ACCESSIBLE from _pywrapfst import ACYCLIC from _pywrapfst import ADD_ARC_PROPERTIES from _pywrapfst import ADD_STATE_PROPERTIES -from _pywrapfst import ADD_SUPERFINAL_PROPERTIES +from _pywrapfst import \ + ADD_SUPERFINAL_PROPERTIES from _pywrapfst import ARC_SORT_PROPERTIES from _pywrapfst import BINARY_PROPERTIES from _pywrapfst import COACCESSIBLE @@ -2555,7 +2572,8 @@ from _pywrapfst import INITIAL_CYCLIC from _pywrapfst import INTRINSIC_PROPERTIES from _pywrapfst import I_DETERMINISTIC from _pywrapfst import I_EPSILONS -from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES +from _pywrapfst import \ + I_LABEL_INVARIANT_PROPERTIES from _pywrapfst import I_LABEL_SORTED from _pywrapfst import MUTABLE from _pywrapfst import NEG_TRINARY_PROPERTIES @@ -2574,7 +2592,8 @@ from _pywrapfst import NO_O_EPSILONS from _pywrapfst import NULL_PROPERTIES from _pywrapfst import O_DETERMINISTIC from _pywrapfst import O_EPSILONS -from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES +from _pywrapfst import \ + O_LABEL_INVARIANT_PROPERTIES from _pywrapfst import O_LABEL_SORTED from _pywrapfst import POS_TRINARY_PROPERTIES from _pywrapfst import RM_SUPERFINAL_PROPERTIES @@ -2589,7 +2608,8 @@ from _pywrapfst import UNWEIGHTED from _pywrapfst import UNWEIGHTED_CYCLES from _pywrapfst import WEIGHTED from _pywrapfst import WEIGHTED_CYCLES -from _pywrapfst import WEIGHT_INVARIANT_PROPERTIES +from _pywrapfst import \ + WEIGHT_INVARIANT_PROPERTIES # Arc iterator properties. diff --git a/extensions/_pywrapfst.cpp b/extensions/_pywrapfst.cpp index 20c4879..87091a9 100644 --- a/extensions/_pywrapfst.cpp +++ b/extensions/_pywrapfst.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.3 */ +/* Generated by Cython 3.0.7 */ /* BEGIN: Cython Metadata { @@ -49,15 +49,15 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.7+ or Python 3.3+. #else -#if CYTHON_LIMITED_API +#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API #define __PYX_EXTRA_ABI_MODULE_NAME "limited" #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_3" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_7" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030003F0 +#define CYTHON_HEX_VERSION 0x030007F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -271,7 +271,7 @@ END: Cython Metadata */ #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif -#elif defined(PY_NOGIL) +#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 @@ -616,8 +616,8 @@ class __Pyx_FakeReference { PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 PyObject *version_info; // borrowed - #endif PyObject *py_minor_version = NULL; + #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); @@ -627,6 +627,7 @@ class __Pyx_FakeReference { if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; @@ -647,7 +648,6 @@ class __Pyx_FakeReference { Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); - Py_XDECREF(py_minor_version); if (type) { PyErr_Restore(type, value, traceback); } @@ -842,6 +842,8 @@ static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 @@ -917,7 +919,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { } #endif #endif -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() @@ -929,7 +931,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); @@ -973,7 +975,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #endif #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ - PyTypeObject *type = Py_TYPE(obj);\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ @@ -1117,6 +1119,15 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #endif +#if PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type @@ -1247,8 +1258,6 @@ static CYTHON_INLINE float __PYX_NAN() { #include #include #include -#include -#include #include #include #ifdef _OPENMP @@ -1551,7 +1560,7 @@ struct __pyx_obj_10_pywrapfst_FarReader; struct __pyx_obj_10_pywrapfst_FarWriter; struct __pyx_obj_10_pywrapfst___pyx_scope_struct____iter__; -/* "cpywrapfst.pxd":516 +/* "cpywrapfst.pxd":509 * * * ctypedef pair[int64_t, const FstClass *] LabelFstClassPair # <<<<<<<<<<<<<< @@ -1560,7 +1569,7 @@ struct __pyx_obj_10_pywrapfst___pyx_scope_struct____iter__; */ typedef std::pair __pyx_t_10cpywrapfst_LabelFstClassPair; -/* "cpywrapfst.pxd":518 +/* "cpywrapfst.pxd":511 * ctypedef pair[int64_t, const FstClass *] LabelFstClassPair * * ctypedef pair[int64_t, int64_t] LabelPair # <<<<<<<<<<<<<< @@ -1606,7 +1615,7 @@ struct __pyx_opt_args_10_pywrapfst_shortestpath; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; -/* "_pywrapfst.pxd":104 +/* "_pywrapfst.pxd":102 * # SymbolTable. * * ctypedef fst.SymbolTable * SymbolTable_ptr # <<<<<<<<<<<<<< @@ -1615,7 +1624,7 @@ typedef struct __pyx_defaults __pyx_defaults; */ typedef fst::SymbolTable *__pyx_t_10_pywrapfst_SymbolTable_ptr; -/* "_pywrapfst.pxd":105 +/* "_pywrapfst.pxd":103 * * ctypedef fst.SymbolTable * SymbolTable_ptr * ctypedef const fst.SymbolTable * const_SymbolTable_ptr # <<<<<<<<<<<<<< @@ -1624,7 +1633,7 @@ typedef fst::SymbolTable *__pyx_t_10_pywrapfst_SymbolTable_ptr; */ typedef fst::SymbolTable const *__pyx_t_10_pywrapfst_const_SymbolTable_ptr; -/* "_pywrapfst.pxd":161 +/* "_pywrapfst.pxd":157 * cdef fst.SymbolTable *_mutable_raw_ptr_or_raise(self) except * * * cpdef int64_t add_symbol(self, symbol, int64_t key=?) except * # <<<<<<<<<<<<<< @@ -1636,7 +1645,7 @@ struct __pyx_opt_args_10_pywrapfst_19_MutableSymbolTable_add_symbol { int64_t key; }; -/* "_pywrapfst.pxd":208 +/* "_pywrapfst.pxd":204 * * * ctypedef fst.EncodeMapperClass * EncodeMapperClass_ptr # <<<<<<<<<<<<<< @@ -1645,7 +1654,7 @@ struct __pyx_opt_args_10_pywrapfst_19_MutableSymbolTable_add_symbol { */ typedef fst::script::EncodeMapperClass *__pyx_t_10_pywrapfst_EncodeMapperClass_ptr; -/* "_pywrapfst.pxd":242 +/* "_pywrapfst.pxd":238 * * * ctypedef fst.FstClass * FstClass_ptr # <<<<<<<<<<<<<< @@ -1654,7 +1663,7 @@ typedef fst::script::EncodeMapperClass *__pyx_t_10_pywrapfst_EncodeMapperClass_p */ typedef fst::script::FstClass *__pyx_t_10_pywrapfst_FstClass_ptr; -/* "_pywrapfst.pxd":243 +/* "_pywrapfst.pxd":239 * * ctypedef fst.FstClass * FstClass_ptr * ctypedef const fst.FstClass * const_FstClass_ptr # <<<<<<<<<<<<<< @@ -1663,7 +1672,7 @@ typedef fst::script::FstClass *__pyx_t_10_pywrapfst_FstClass_ptr; */ typedef fst::script::FstClass const *__pyx_t_10_pywrapfst_const_FstClass_ptr; -/* "_pywrapfst.pxd":244 +/* "_pywrapfst.pxd":240 * ctypedef fst.FstClass * FstClass_ptr * ctypedef const fst.FstClass * const_FstClass_ptr * ctypedef fst.MutableFstClass * MutableFstClass_ptr # <<<<<<<<<<<<<< @@ -1672,7 +1681,7 @@ typedef fst::script::FstClass const *__pyx_t_10_pywrapfst_const_FstClass_ptr; */ typedef fst::script::MutableFstClass *__pyx_t_10_pywrapfst_MutableFstClass_ptr; -/* "_pywrapfst.pxd":245 +/* "_pywrapfst.pxd":241 * ctypedef const fst.FstClass * const_FstClass_ptr * ctypedef fst.MutableFstClass * MutableFstClass_ptr * ctypedef fst.VectorFstClass * VectorFstClass_ptr # <<<<<<<<<<<<<< @@ -1681,7 +1690,7 @@ typedef fst::script::MutableFstClass *__pyx_t_10_pywrapfst_MutableFstClass_ptr; */ typedef fst::script::VectorFstClass *__pyx_t_10_pywrapfst_VectorFstClass_ptr; -/* "_pywrapfst.pxd":261 +/* "_pywrapfst.pxd":257 * cpdef Fst copy(self) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -1707,7 +1716,7 @@ struct __pyx_opt_args_10_pywrapfst_3Fst_draw { bool show_weight_one; }; -/* "_pywrapfst.pxd":293 +/* "_pywrapfst.pxd":289 * cpdef _FstSymbolTableView output_symbols(self) * * cpdef string print(self, # <<<<<<<<<<<<<< @@ -1724,7 +1733,7 @@ struct __pyx_opt_args_10_pywrapfst_3Fst_print { PyObject *missing_sym; }; -/* "_pywrapfst.pxd":326 +/* "_pywrapfst.pxd":322 * cpdef void add_states(self, size_t) * * cdef void _arcsort(self, sort_type=?) except * # <<<<<<<<<<<<<< @@ -1736,7 +1745,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__arcsort { PyObject *sort_type; }; -/* "_pywrapfst.pxd":328 +/* "_pywrapfst.pxd":324 * cdef void _arcsort(self, sort_type=?) except * * * cdef void _closure(self, closure_type=?) # <<<<<<<<<<<<<< @@ -1748,7 +1757,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__closure { PyObject *closure_type; }; -/* "_pywrapfst.pxd":336 +/* "_pywrapfst.pxd":332 * cdef void _decode(self, EncodeMapper) except * * * cdef void _delete_arcs(self, int64_t state, size_t n=?) except * # <<<<<<<<<<<<<< @@ -1760,7 +1769,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__delete_arcs { size_t n; }; -/* "_pywrapfst.pxd":338 +/* "_pywrapfst.pxd":334 * cdef void _delete_arcs(self, int64_t state, size_t n=?) except * * * cdef void _delete_states(self, states=?) except * # <<<<<<<<<<<<<< @@ -1772,7 +1781,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__delete_states { PyObject *states; }; -/* "_pywrapfst.pxd":344 +/* "_pywrapfst.pxd":340 * cdef void _invert(self) * * cdef void _minimize(self, float delta=?, bool allow_nondet=?) except * # <<<<<<<<<<<<<< @@ -1785,7 +1794,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__minimize { bool allow_nondet; }; -/* "_pywrapfst.pxd":352 +/* "_pywrapfst.pxd":348 * cdef void _project(self, project_type) except * * * cdef void _prune(self, float delta=?, int64_t nstate=?, weight=?) except * # <<<<<<<<<<<<<< @@ -1799,7 +1808,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__prune { PyObject *weight; }; -/* "_pywrapfst.pxd":354 +/* "_pywrapfst.pxd":350 * cdef void _prune(self, float delta=?, int64_t nstate=?, weight=?) except * * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -1813,7 +1822,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__push { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":359 +/* "_pywrapfst.pxd":355 * reweight_type=?) * * cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * # <<<<<<<<<<<<<< @@ -1826,7 +1835,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__relabel_pairs { PyObject *opairs; }; -/* "_pywrapfst.pxd":361 +/* "_pywrapfst.pxd":357 * cdef void _relabel_pairs(self, ipairs=?, opairs=?) except * * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -1845,7 +1854,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__relabel_tables { bool attach_new_osymbols; }; -/* "_pywrapfst.pxd":375 +/* "_pywrapfst.pxd":371 * cdef void _reserve_states(self, int64_t n) * * cdef void _reweight(self, potentials, reweight_type=?) except * # <<<<<<<<<<<<<< @@ -1857,7 +1866,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__reweight { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":377 +/* "_pywrapfst.pxd":373 * cdef void _reweight(self, potentials, reweight_type=?) except * * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -1873,7 +1882,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__rmepsilon { float delta; }; -/* "_pywrapfst.pxd":384 +/* "_pywrapfst.pxd":380 * float delta=?) except * * * cdef void _set_final(self, int64_t state, weight=?) except * # <<<<<<<<<<<<<< @@ -1885,7 +1894,7 @@ struct __pyx_opt_args_10_pywrapfst_10MutableFst__set_final { PyObject *weight; }; -/* "_pywrapfst.pxd":492 +/* "_pywrapfst.pxd":488 * * * cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<< @@ -1900,7 +1909,7 @@ struct __pyx_opt_args_10_pywrapfst__map { PyObject *weight; }; -/* "_pywrapfst.pxd":494 +/* "_pywrapfst.pxd":490 * cdef Fst _map(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) * * cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) # <<<<<<<<<<<<<< @@ -1915,7 +1924,7 @@ struct __pyx_opt_args_10_pywrapfst_arcmap { PyObject *weight; }; -/* "_pywrapfst.pxd":496 +/* "_pywrapfst.pxd":492 * cpdef Fst arcmap(Fst ifst, float delta=?, map_type=?, double power=?, weight=?) * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< @@ -1928,7 +1937,7 @@ struct __pyx_opt_args_10_pywrapfst_compose { bool connect; }; -/* "_pywrapfst.pxd":501 +/* "_pywrapfst.pxd":497 * bool connect=?) * * cpdef Fst convert(Fst ifst, fst_type=?) # <<<<<<<<<<<<<< @@ -1940,7 +1949,7 @@ struct __pyx_opt_args_10_pywrapfst_convert { PyObject *fst_type; }; -/* "_pywrapfst.pxd":503 +/* "_pywrapfst.pxd":499 * cpdef Fst convert(Fst ifst, fst_type=?) * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< @@ -1957,7 +1966,7 @@ struct __pyx_opt_args_10_pywrapfst_determinize { bool increment_subsequential_label; }; -/* "_pywrapfst.pxd":511 +/* "_pywrapfst.pxd":507 * bool increment_subsequential_label=?) * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< @@ -1970,7 +1979,7 @@ struct __pyx_opt_args_10_pywrapfst_difference { bool connect; }; -/* "_pywrapfst.pxd":516 +/* "_pywrapfst.pxd":512 * bool connect=?) * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< @@ -1985,7 +1994,7 @@ struct __pyx_opt_args_10_pywrapfst_disambiguate { PyObject *weight; }; -/* "_pywrapfst.pxd":522 +/* "_pywrapfst.pxd":518 * weight=?) * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type=?) # <<<<<<<<<<<<<< @@ -1997,7 +2006,7 @@ struct __pyx_opt_args_10_pywrapfst_epsnormalize { PyObject *eps_norm_type; }; -/* "_pywrapfst.pxd":524 +/* "_pywrapfst.pxd":520 * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type=?) * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<< @@ -2009,7 +2018,7 @@ struct __pyx_opt_args_10_pywrapfst_equal { float delta; }; -/* "_pywrapfst.pxd":526 +/* "_pywrapfst.pxd":522 * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=?) * * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except * # <<<<<<<<<<<<<< @@ -2021,7 +2030,7 @@ struct __pyx_opt_args_10_pywrapfst_equivalent { float delta; }; -/* "_pywrapfst.pxd":528 +/* "_pywrapfst.pxd":524 * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=?) except * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< @@ -2034,7 +2043,7 @@ struct __pyx_opt_args_10_pywrapfst_intersect { bool connect; }; -/* "_pywrapfst.pxd":533 +/* "_pywrapfst.pxd":529 * bool connect=?) * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?) # <<<<<<<<<<<<<< @@ -2046,7 +2055,7 @@ struct __pyx_opt_args_10_pywrapfst_isomorphic { float delta; }; -/* "_pywrapfst.pxd":535 +/* "_pywrapfst.pxd":531 * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=?) * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< @@ -2060,7 +2069,7 @@ struct __pyx_opt_args_10_pywrapfst_prune { PyObject *weight; }; -/* "_pywrapfst.pxd":540 +/* "_pywrapfst.pxd":536 * weight=?) * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< @@ -2077,7 +2086,7 @@ struct __pyx_opt_args_10_pywrapfst_push { PyObject *reweight_type; }; -/* "_pywrapfst.pxd":548 +/* "_pywrapfst.pxd":544 * reweight_type=?) * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< @@ -2093,7 +2102,7 @@ struct __pyx_opt_args_10_pywrapfst_randequivalent { uint64_t seed; }; -/* "_pywrapfst.pxd":556 +/* "_pywrapfst.pxd":552 * uint64_t seed=?) except * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< @@ -2110,7 +2119,7 @@ struct __pyx_opt_args_10_pywrapfst_randgen { uint64_t seed; }; -/* "_pywrapfst.pxd":564 +/* "_pywrapfst.pxd":560 * uint64_t seed=?) * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -2125,7 +2134,7 @@ struct __pyx_opt_args_10_pywrapfst_replace { int64_t return_label; }; -/* "_pywrapfst.pxd":570 +/* "_pywrapfst.pxd":566 * int64_t return_label=?) * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?) # <<<<<<<<<<<<<< @@ -2137,7 +2146,7 @@ struct __pyx_opt_args_10_pywrapfst_reverse { bool require_superinitial; }; -/* "_pywrapfst.pxd":572 +/* "_pywrapfst.pxd":568 * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=?) * * cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -2152,7 +2161,7 @@ struct __pyx_opt_args_10_pywrapfst__shortestdistance { bool reverse; }; -/* "_pywrapfst.pxd":579 +/* "_pywrapfst.pxd":575 * bool reverse=?) except * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< @@ -2173,7 +2182,7 @@ struct __pyx_defaults { int64_t __pyx_arg_nstate; }; -/* "_pywrapfst.pxd":72 +/* "_pywrapfst.pxd":70 * * * cdef class Weight: # <<<<<<<<<<<<<< @@ -2187,7 +2196,7 @@ struct __pyx_obj_10_pywrapfst_Weight { }; -/* "_pywrapfst.pxd":108 +/* "_pywrapfst.pxd":106 * * * cdef class SymbolTableView: # <<<<<<<<<<<<<< @@ -2200,7 +2209,7 @@ struct __pyx_obj_10_pywrapfst_SymbolTableView { }; -/* "_pywrapfst.pxd":139 +/* "_pywrapfst.pxd":135 * * * cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2214,7 +2223,7 @@ struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView { }; -/* "_pywrapfst.pxd":147 +/* "_pywrapfst.pxd":143 * * * cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2228,7 +2237,7 @@ struct __pyx_obj_10_pywrapfst__FstSymbolTableView { }; -/* "_pywrapfst.pxd":155 +/* "_pywrapfst.pxd":151 * * * cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<< @@ -2240,7 +2249,7 @@ struct __pyx_obj_10_pywrapfst__MutableSymbolTable { }; -/* "_pywrapfst.pxd":168 +/* "_pywrapfst.pxd":164 * * * cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2254,7 +2263,7 @@ struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView { }; -/* "_pywrapfst.pxd":176 +/* "_pywrapfst.pxd":172 * * * cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2267,7 +2276,7 @@ struct __pyx_obj_10_pywrapfst_SymbolTable { }; -/* "_pywrapfst.pxd":199 +/* "_pywrapfst.pxd":195 * * * cdef class _SymbolTableIterator: # <<<<<<<<<<<<<< @@ -2281,7 +2290,7 @@ struct __pyx_obj_10_pywrapfst__SymbolTableIterator { }; -/* "_pywrapfst.pxd":211 +/* "_pywrapfst.pxd":207 * * * cdef class EncodeMapper: # <<<<<<<<<<<<<< @@ -2295,7 +2304,7 @@ struct __pyx_obj_10_pywrapfst_EncodeMapper { }; -/* "_pywrapfst.pxd":248 +/* "_pywrapfst.pxd":244 * * * cdef class Fst: # <<<<<<<<<<<<<< @@ -2309,7 +2318,7 @@ struct __pyx_obj_10_pywrapfst_Fst { }; -/* "_pywrapfst.pxd":314 +/* "_pywrapfst.pxd":310 * * * cdef class MutableFst(Fst): # <<<<<<<<<<<<<< @@ -2322,7 +2331,7 @@ struct __pyx_obj_10_pywrapfst_MutableFst { }; -/* "_pywrapfst.pxd":395 +/* "_pywrapfst.pxd":391 * * * cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<< @@ -2334,7 +2343,7 @@ struct __pyx_obj_10_pywrapfst_VectorFst { }; -/* "_pywrapfst.pxd":417 +/* "_pywrapfst.pxd":413 * * * cdef class Arc: # <<<<<<<<<<<<<< @@ -2348,7 +2357,7 @@ struct __pyx_obj_10_pywrapfst_Arc { }; -/* "_pywrapfst.pxd":427 +/* "_pywrapfst.pxd":423 * * * cdef class _ArcIterator: # <<<<<<<<<<<<<< @@ -2363,7 +2372,7 @@ struct __pyx_obj_10_pywrapfst__ArcIterator { }; -/* "_pywrapfst.pxd":449 +/* "_pywrapfst.pxd":445 * * * cdef class _MutableArcIterator: # <<<<<<<<<<<<<< @@ -2378,7 +2387,7 @@ struct __pyx_obj_10_pywrapfst__MutableArcIterator { }; -/* "_pywrapfst.pxd":473 +/* "_pywrapfst.pxd":469 * * * cdef class _StateIterator: # <<<<<<<<<<<<<< @@ -2393,7 +2402,7 @@ struct __pyx_obj_10_pywrapfst__StateIterator { }; -/* "_pywrapfst.pxd":595 +/* "_pywrapfst.pxd":591 * * * cdef class Compiler: # <<<<<<<<<<<<<< @@ -2413,11 +2422,10 @@ struct __pyx_obj_10_pywrapfst_Compiler { bool _keep_isymbols; bool _keep_osymbols; bool _keep_state_numbering; - bool _allow_negative_labels; }; -/* "_pywrapfst.pxd":616 +/* "_pywrapfst.pxd":611 * # FarReader. * * cdef class FarReader: # <<<<<<<<<<<<<< @@ -2431,7 +2439,7 @@ struct __pyx_obj_10_pywrapfst_FarReader { }; -/* "_pywrapfst.pxd":641 +/* "_pywrapfst.pxd":636 * # FarWriter. * * cdef class FarWriter: # <<<<<<<<<<<<<< @@ -2445,7 +2453,7 @@ struct __pyx_obj_10_pywrapfst_FarWriter { }; -/* "_pywrapfst.pyx":3361 +/* "_pywrapfst.pyx":3359 * * # Magic method used to get a Pythonic Iterator API out of the C++ API. * def __iter__(self): # <<<<<<<<<<<<<< @@ -2459,7 +2467,7 @@ struct __pyx_obj_10_pywrapfst___pyx_scope_struct____iter__ { -/* "_pywrapfst.pyx":467 +/* "_pywrapfst.pyx":463 * * * cdef class Weight: # <<<<<<<<<<<<<< @@ -2477,7 +2485,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Weight { static struct __pyx_vtabstruct_10_pywrapfst_Weight *__pyx_vtabptr_10_pywrapfst_Weight; -/* "_pywrapfst.pyx":794 +/* "_pywrapfst.pyx":790 * * * cdef class SymbolTableView: # <<<<<<<<<<<<<< @@ -2498,13 +2506,12 @@ struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView { std::string (*name)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); size_t (*num_symbols)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); void (*write)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch); - void (*write_text)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch); PyObject *(*write_to_string)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *__pyx_vtabptr_10_pywrapfst_SymbolTableView; -/* "_pywrapfst.pyx":997 +/* "_pywrapfst.pyx":996 * * * cdef class _EncodeMapperSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2518,7 +2525,7 @@ struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView; -/* "_pywrapfst.pyx":1021 +/* "_pywrapfst.pyx":1020 * * * cdef class _FstSymbolTableView(SymbolTableView): # <<<<<<<<<<<<<< @@ -2532,7 +2539,7 @@ struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView *__pyx_vtabptr_10_pywrapfst__FstSymbolTableView; -/* "_pywrapfst.pyx":1044 +/* "_pywrapfst.pyx":1043 * * * cdef class _MutableSymbolTable(SymbolTableView): # <<<<<<<<<<<<<< @@ -2551,7 +2558,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable { static struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *__pyx_vtabptr_10_pywrapfst__MutableSymbolTable; -/* "_pywrapfst.pyx":1116 +/* "_pywrapfst.pyx":1115 * * * cdef class _MutableFstSymbolTableView(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2565,7 +2572,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView { static struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView *__pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView; -/* "_pywrapfst.pyx":1131 +/* "_pywrapfst.pyx":1130 * * * cdef class SymbolTable(_MutableSymbolTable): # <<<<<<<<<<<<<< @@ -2579,7 +2586,7 @@ struct __pyx_vtabstruct_10_pywrapfst_SymbolTable { static struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *__pyx_vtabptr_10_pywrapfst_SymbolTable; -/* "_pywrapfst.pyx":1359 +/* "_pywrapfst.pyx":1355 * * * cdef class EncodeMapper: # <<<<<<<<<<<<<< @@ -2601,7 +2608,7 @@ struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper { static struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *__pyx_vtabptr_10_pywrapfst_EncodeMapper; -/* "_pywrapfst.pyx":1627 +/* "_pywrapfst.pyx":1623 * * * cdef class Fst: # <<<<<<<<<<<<<< @@ -2633,7 +2640,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Fst { static struct __pyx_vtabstruct_10_pywrapfst_Fst *__pyx_vtabptr_10_pywrapfst_Fst; -/* "_pywrapfst.pyx":2094 +/* "_pywrapfst.pyx":2090 * * * cdef class MutableFst(Fst): # <<<<<<<<<<<<<< @@ -2677,7 +2684,7 @@ struct __pyx_vtabstruct_10_pywrapfst_MutableFst { static struct __pyx_vtabstruct_10_pywrapfst_MutableFst *__pyx_vtabptr_10_pywrapfst_MutableFst; -/* "_pywrapfst.pyx":2959 +/* "_pywrapfst.pyx":2957 * * * cdef class VectorFst(MutableFst): # <<<<<<<<<<<<<< @@ -2691,7 +2698,7 @@ struct __pyx_vtabstruct_10_pywrapfst_VectorFst { static struct __pyx_vtabstruct_10_pywrapfst_VectorFst *__pyx_vtabptr_10_pywrapfst_VectorFst; -/* "_pywrapfst.pyx":3141 +/* "_pywrapfst.pyx":3139 * * * cdef class Arc: # <<<<<<<<<<<<<< @@ -2705,7 +2712,7 @@ struct __pyx_vtabstruct_10_pywrapfst_Arc { static struct __pyx_vtabstruct_10_pywrapfst_Arc *__pyx_vtabptr_10_pywrapfst_Arc; -/* "_pywrapfst.pyx":3211 +/* "_pywrapfst.pyx":3209 * * * cdef class _ArcIterator: # <<<<<<<<<<<<<< @@ -2726,7 +2733,7 @@ struct __pyx_vtabstruct_10_pywrapfst__ArcIterator { static struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *__pyx_vtabptr_10_pywrapfst__ArcIterator; -/* "_pywrapfst.pyx":3341 +/* "_pywrapfst.pyx":3339 * * * cdef class _MutableArcIterator: # <<<<<<<<<<<<<< @@ -2748,7 +2755,7 @@ struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator { static struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *__pyx_vtabptr_10_pywrapfst__MutableArcIterator; -/* "_pywrapfst.pyx":3505 +/* "_pywrapfst.pyx":3503 * * * cdef class _StateIterator: # <<<<<<<<<<<<<< @@ -2766,7 +2773,7 @@ struct __pyx_vtabstruct_10_pywrapfst__StateIterator { static struct __pyx_vtabstruct_10_pywrapfst__StateIterator *__pyx_vtabptr_10_pywrapfst__StateIterator; -/* "_pywrapfst.pyx":4437 +/* "_pywrapfst.pyx":4443 * * * cdef class Compiler: # <<<<<<<<<<<<<< @@ -3142,7 +3149,11 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else @@ -3173,14 +3184,36 @@ static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); static double __Pyx_SlowPyString_AsDouble(PyObject *obj); static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length); static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) { - return __Pyx__PyBytes_AsDouble(obj, PyBytes_AS_STRING(obj), PyBytes_GET_SIZE(obj)); + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS + as_c_string = PyBytes_AS_STRING(obj); + size = PyBytes_GET_SIZE(obj); +#else + if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) { + return (double)-1; + } +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); } static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) { - return __Pyx__PyBytes_AsDouble(obj, PyByteArray_AS_STRING(obj), PyByteArray_GET_SIZE(obj)); + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS + as_c_string = PyByteArray_AS_STRING(obj); + size = PyByteArray_GET_SIZE(obj); +#else + as_c_string = PyByteArray_AsString(obj); + if (as_c_string == NULL) { + return (double)-1; + } + size = PyByteArray_Size(obj); +#endif + return __Pyx__PyBytes_AsDouble(obj, as_c_string, size); } /* pyunicode_as_double.proto */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) { int last_was_punctuation; Py_ssize_t i; @@ -3291,7 +3324,7 @@ static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) { } #endif static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS if (unlikely(__Pyx_PyUnicode_READY(obj) == -1)) return (double)-1; if (likely(PyUnicode_IS_ASCII(obj))) { @@ -3306,19 +3339,9 @@ static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) { #endif } -/* pyobject_as_double.proto */ -static double __Pyx__PyObject_AsDouble(PyObject* obj); -#if CYTHON_COMPILING_IN_PYPY -#define __Pyx_PyObject_AsDouble(obj)\ -(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) :\ - likely(PyInt_CheckExact(obj)) ?\ - PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) -#else -#define __Pyx_PyObject_AsDouble(obj)\ -((likely(PyFloat_CheckExact(obj))) ? PyFloat_AS_DOUBLE(obj) :\ - likely(PyLong_CheckExact(obj)) ?\ - PyLong_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) -#endif +/* pynumber_float.proto */ +static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x)) /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, @@ -3432,7 +3455,11 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else PyList_SET_ITEM(list, len, x); + #endif __Pyx_SET_SIZE(list, len + 1); return 0; } @@ -3680,7 +3707,7 @@ CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* SetNameInClass.proto */ -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON @@ -3947,7 +3974,7 @@ static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(PyObject *module); /* CheckBinaryVersion.proto */ -static unsigned long __Pyx_get_runtime_version(); +static unsigned long __Pyx_get_runtime_version(void); static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* FunctionExport.proto */ @@ -3974,7 +4001,6 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py static std::string __pyx_f_10_pywrapfst_15SymbolTableView_name(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static size_t __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch); /* proto*/ -static void __pyx_f_10_pywrapfst_15SymbolTableView_write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_28_EncodeMapperSymbolTableView__raw(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_v_self); /* proto*/ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_FstSymbolTableView__raw(struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_v_self); /* proto*/ @@ -4102,10 +4128,6 @@ static std::string __pyx_f_10_pywrapfst_9FarWriter_far_type(struct __pyx_obj_10_ /* Module declarations from "cpywrapfst" */ -/* Module declarations from "libc.stddef" */ - -/* Module declarations from "libc.time" */ - /* Module declarations from "libcpp.cast" */ /* Module declarations from "libcpp.limits" */ @@ -4207,13 +4229,14 @@ static const char __pyx_k_w[] = "w"; static const char __pyx_k_x[] = "x"; static const char __pyx_k__2[] = "<"; static const char __pyx_k__3[] = ">"; -static const char __pyx_k__5[] = ""; +static const char __pyx_k__4[] = "\t "; +static const char __pyx_k__6[] = ""; static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_id[] = "id"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_Arc[] = "Arc"; static const char __pyx_k_Fst[] = "Fst"; -static const char __pyx_k__37[] = "*"; +static const char __pyx_k__40[] = "*"; static const char __pyx_k_add[] = "add"; static const char __pyx_k_arc[] = "arc"; static const char __pyx_k_cls[] = "cls"; @@ -4225,10 +4248,11 @@ static const char __pyx_k_one[] = "one"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_raw[] = "_raw"; static const char __pyx_k_rhs[] = "rhs"; +static const char __pyx_k_sep[] = "sep"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_Flag[] = "Flag"; static const char __pyx_k_PIPE[] = "PIPE"; -static const char __pyx_k__310[] = "?"; +static const char __pyx_k__313[] = "?"; static const char __pyx_k_arcs[] = "arcs"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_auto[] = "auto"; @@ -4246,7 +4270,6 @@ static const char __pyx_k_mask[] = "mask"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_next[] = "next"; static const char __pyx_k_open[] = "open"; -static const char __pyx_k_opts[] = "_opts"; static const char __pyx_k_plus[] = "plus"; static const char __pyx_k_push[] = "push"; static const char __pyx_k_read[] = "read"; @@ -4740,7 +4763,6 @@ static const char __pyx_k_SymbolTableView_write[] = "SymbolTableView.write"; static const char __pyx_k_SymbolTable_read_text[] = "SymbolTable.read_text"; static const char __pyx_k_Unknown_reweight_type[] = "Unknown reweight type: "; static const char __pyx_k_Weight_type_not_found[] = "Weight type not found"; -static const char __pyx_k_allow_negative_labels[] = "allow_negative_labels"; static const char __pyx_k_mutable_input_symbols[] = "mutable_input_symbols"; static const char __pyx_k_Dot_rendering_failed_s[] = "Dot rendering failed: %s"; static const char __pyx_k_Fst_num_input_epsilons[] = "Fst.num_input_epsilons"; @@ -4838,6 +4860,7 @@ static const char __pyx_k_self__aiter_self__fst_cannot_be[] = "self._aiter,self. static const char __pyx_k_self__fst_self__siter_cannot_be[] = "self._fst,self._siter cannot be converted to a Python object for pickling"; static const char __pyx_k_self__siter_cannot_be_converted[] = "self._siter cannot be converted to a Python object for pickling"; static const char __pyx_k_typing_Literal_uniform_log_prob[] = "typing.Literal[\"uniform\", \"log_prob\", \"fast_log_prob\"]"; +static const char __pyx_k_Argument_FST_did_not_satisfy_pre[] = "Argument FST did not satisfy preconditions"; static const char __pyx_k_Can_t_get_value_from_an_exhauste[] = "Can't get value from an exhausted iterator"; static const char __pyx_k_Incompatible_or_invalid_arc_type[] = "Incompatible or invalid arc type"; static const char __pyx_k_Incompatible_or_invalid_weight_t[] = "Incompatible or invalid weight type"; @@ -4860,7 +4883,7 @@ static const char __pyx_k_typing_Literal_fst_stlist_sttabl[] = "typing.Literal[\ static const char __pyx_k_typing_Literal_functional_nonfun[] = "typing.Literal[\"functional\", \"nonfunctional\",\n \"disambiguate\"]"; static const char __pyx_k_typing_Literal_identity_input_ep[] = "typing.Literal[\"identity\", \"input_epsilon\", \"invert\",\n \"output_epsilon\", \"plus\", \"power\", \"quantize\",\n \"rmweight\", \"superfinal\", \"times\", \"to_log\",\n # NOTE: Both spellings of \"to_std\"\n \"to_log64\", \"to_std\", \"to_standard\"]"; static const char __pyx_k_typing_Literal_neither_input_out[] = "typing.Literal[\"neither\", \"input\", \"output\", \"both\"]"; -static const char __pyx_k_typing_Literal_to_inital_to_fina[] = "typing.Literal[\"to_inital\", \"to_final\"]"; +static const char __pyx_k_typing_Literal_to_initial_to_fin[] = "typing.Literal[\"to_initial\", \"to_final\"]"; static const char __pyx_k_typing_Union_Weight_typing_Union[] = "typing.Union[Weight, typing.Union[str, int, float]]"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywrapfst_Weight *__pyx_v_self); /* proto */ @@ -4895,7 +4918,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_18member(struct __pyx_o static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_20name(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_22num_symbols(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_24write(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source); /* proto */ -static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source); /* proto */ +static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_sep); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_28write_to_string(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_28_EncodeMapperSymbolTableView___repr__(struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_19_FstSymbolTableView___repr__(struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_v_self); /* proto */ @@ -4906,7 +4929,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_self); /* proto */ static int __pyx_pf_10_pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source); /* proto */ -static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source, bool __pyx_v_allow_negative_labels); /* proto */ +static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source, PyObject *__pyx_v_sep); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source, bool __pyx_v_input_table); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_8_read_SymbolTable_from_string(CYTHON_UNUSED PyObject *__pyx_self, std::string __pyx_v_state); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_10compact_symbol_table(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_symbols); /* proto */ @@ -5070,7 +5093,7 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject static PyObject *__pyx_pf_10_pywrapfst_56shortestpath(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, float __pyx_v_delta, int32_t __pyx_v_nshortest, int64_t __pyx_v_nstate, PyObject *__pyx_v_queue_type, bool __pyx_v_unique, PyObject *__pyx_v_weight); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_58statemap(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, PyObject *__pyx_v_map_type); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_60synchronize(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst); /* proto */ -static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_fst_type, PyObject *__pyx_v_arc_type, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_isymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_osymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, bool __pyx_v_keep_isymbols, bool __pyx_v_keep_osymbols, bool __pyx_v_keep_state_numbering, bool __pyx_v_allow_negative_labels); /* proto */ +static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_fst_type, PyObject *__pyx_v_arc_type, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_isymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_osymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, bool __pyx_v_keep_isymbols, bool __pyx_v_keep_osymbols, bool __pyx_v_keep_state_numbering); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_8Compiler_2compile(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_8Compiler_4write(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_expression); /* proto */ static PyObject *__pyx_pf_10_pywrapfst_8Compiler_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self); /* proto */ @@ -5174,10 +5197,6 @@ typedef struct { #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE - #endif - #if CYTHON_USE_MODULE_STATE - #endif - #if CYTHON_USE_MODULE_STATE PyObject *__pyx_type_10_pywrapfst_Weight; PyObject *__pyx_type_10_pywrapfst_SymbolTableView; PyObject *__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView; @@ -5252,6 +5271,7 @@ typedef struct { PyObject *__pyx_n_s_Arc___setstate_cython; PyObject *__pyx_kp_u_Arc_at_0x; PyObject *__pyx_n_s_Arc_copy; + PyObject *__pyx_kp_u_Argument_FST_did_not_satisfy_pre; PyObject *__pyx_n_s_BINARY_PROPERTIES; PyObject *__pyx_n_s_COACCESSIBLE; PyObject *__pyx_n_s_COPY_PROPERTIES; @@ -5549,9 +5569,10 @@ typedef struct { PyObject *__pyx_kp_u_Write_to_string_failed; PyObject *__pyx_kp_u__2; PyObject *__pyx_kp_u__3; - PyObject *__pyx_n_s__310; - PyObject *__pyx_n_s__37; - PyObject *__pyx_kp_u__5; + PyObject *__pyx_n_s__313; + PyObject *__pyx_kp_u__4; + PyObject *__pyx_n_s__40; + PyObject *__pyx_kp_u__6; PyObject *__pyx_n_s_a; PyObject *__pyx_n_s_acceptor; PyObject *__pyx_n_s_add; @@ -5560,7 +5581,6 @@ typedef struct { PyObject *__pyx_n_s_add_states; PyObject *__pyx_n_s_add_symbol; PyObject *__pyx_n_s_add_table; - PyObject *__pyx_n_s_allow_negative_labels; PyObject *__pyx_n_s_allow_nondet; PyObject *__pyx_n_s_arc; PyObject *__pyx_n_s_arc_type; @@ -5722,7 +5742,6 @@ typedef struct { PyObject *__pyx_n_s_one; PyObject *__pyx_n_s_opairs; PyObject *__pyx_n_s_open; - PyObject *__pyx_n_s_opts; PyObject *__pyx_n_s_os; PyObject *__pyx_n_s_osymbols; PyObject *__pyx_n_s_output_symbols; @@ -5795,6 +5814,7 @@ typedef struct { PyObject *__pyx_kp_s_self__weight_cannot_be_converted; PyObject *__pyx_kp_s_self__writer_cannot_be_converted; PyObject *__pyx_n_s_send; + PyObject *__pyx_n_s_sep; PyObject *__pyx_n_s_set_final; PyObject *__pyx_n_s_set_flags; PyObject *__pyx_n_s_set_input_symbols; @@ -5855,7 +5875,7 @@ typedef struct { PyObject *__pyx_kp_u_typing_Literal_ilabel_olabel; PyObject *__pyx_kp_u_typing_Literal_input_output; PyObject *__pyx_kp_u_typing_Literal_neither_input_out; - PyObject *__pyx_kp_u_typing_Literal_to_inital_to_fina; + PyObject *__pyx_kp_u_typing_Literal_to_initial_to_fin; PyObject *__pyx_kp_u_typing_Literal_uniform_log_prob; PyObject *__pyx_kp_u_typing_Union_Weight_typing_Union; PyObject *__pyx_n_u_uniform; @@ -5890,237 +5910,236 @@ typedef struct { PyObject *__pyx_int_1; PyObject *__pyx_int_5; PyObject *__pyx_int_14; - int64_t __pyx_k__4; - float __pyx_k__6; + int64_t __pyx_k__5; float __pyx_k__7; float __pyx_k__8; - int64_t __pyx_k__9; - float __pyx_k__10; - int64_t __pyx_k__11; - float __pyx_k__12; + float __pyx_k__9; + int64_t __pyx_k__10; + float __pyx_k__11; + int64_t __pyx_k__12; float __pyx_k__13; - int64_t __pyx_k__14; - float __pyx_k__15; - int64_t __pyx_k__16; - float __pyx_k__17; + float __pyx_k__14; + int64_t __pyx_k__15; + float __pyx_k__16; + int64_t __pyx_k__17; float __pyx_k__18; float __pyx_k__19; float __pyx_k__20; - int64_t __pyx_k__21; - float __pyx_k__22; - int64_t __pyx_k__23; - float __pyx_k__24; + float __pyx_k__21; + int64_t __pyx_k__22; + float __pyx_k__23; + int64_t __pyx_k__24; float __pyx_k__25; float __pyx_k__26; float __pyx_k__27; - int64_t __pyx_k__28; - float __pyx_k__29; + float __pyx_k__28; + int64_t __pyx_k__29; float __pyx_k__30; - int32_t __pyx_k__31; + float __pyx_k__31; int32_t __pyx_k__32; - float __pyx_k__33; - int64_t __pyx_k__34; - float __pyx_k__35; - int64_t __pyx_k__36; - PyObject *__pyx_tuple__38; - PyObject *__pyx_tuple__40; - PyObject *__pyx_tuple__48; - PyObject *__pyx_tuple__50; - PyObject *__pyx_tuple__54; - PyObject *__pyx_tuple__60; - PyObject *__pyx_tuple__62; + uint64_t __pyx_k__33; + int32_t __pyx_k__34; + uint64_t __pyx_k__35; + float __pyx_k__36; + int64_t __pyx_k__37; + float __pyx_k__38; + int64_t __pyx_k__39; + PyObject *__pyx_tuple__41; + PyObject *__pyx_tuple__43; + PyObject *__pyx_tuple__51; + PyObject *__pyx_tuple__53; + PyObject *__pyx_tuple__57; + PyObject *__pyx_tuple__63; PyObject *__pyx_tuple__65; - PyObject *__pyx_tuple__69; - PyObject *__pyx_tuple__73; - PyObject *__pyx_tuple__75; + PyObject *__pyx_tuple__68; + PyObject *__pyx_tuple__72; + PyObject *__pyx_tuple__74; PyObject *__pyx_tuple__77; PyObject *__pyx_tuple__79; PyObject *__pyx_tuple__81; PyObject *__pyx_tuple__83; - PyObject *__pyx_tuple__84; - PyObject *__pyx_tuple__86; - PyObject *__pyx_tuple__88; - PyObject *__pyx_tuple__90; - PyObject *__pyx_tuple__98; - PyObject *__pyx_tuple__100; - PyObject *__pyx_tuple__110; - PyObject *__pyx_tuple__114; + PyObject *__pyx_tuple__85; + PyObject *__pyx_tuple__87; + PyObject *__pyx_tuple__89; + PyObject *__pyx_tuple__91; + PyObject *__pyx_tuple__93; + PyObject *__pyx_tuple__101; + PyObject *__pyx_tuple__103; + PyObject *__pyx_tuple__113; PyObject *__pyx_tuple__117; - PyObject *__pyx_tuple__119; - PyObject *__pyx_tuple__127; - PyObject *__pyx_tuple__129; + PyObject *__pyx_tuple__120; + PyObject *__pyx_tuple__122; PyObject *__pyx_tuple__130; PyObject *__pyx_tuple__132; - PyObject *__pyx_tuple__134; - PyObject *__pyx_tuple__142; + PyObject *__pyx_tuple__133; + PyObject *__pyx_tuple__135; + PyObject *__pyx_tuple__137; PyObject *__pyx_tuple__145; - PyObject *__pyx_tuple__147; - PyObject *__pyx_tuple__149; + PyObject *__pyx_tuple__148; PyObject *__pyx_tuple__150; PyObject *__pyx_tuple__152; PyObject *__pyx_tuple__153; + PyObject *__pyx_tuple__155; PyObject *__pyx_tuple__156; - PyObject *__pyx_tuple__158; - PyObject *__pyx_tuple__160; + PyObject *__pyx_tuple__159; PyObject *__pyx_tuple__161; PyObject *__pyx_tuple__163; + PyObject *__pyx_tuple__164; PyObject *__pyx_tuple__166; - PyObject *__pyx_tuple__172; - PyObject *__pyx_tuple__174; - PyObject *__pyx_tuple__176; - PyObject *__pyx_tuple__178; - PyObject *__pyx_tuple__180; + PyObject *__pyx_tuple__169; + PyObject *__pyx_tuple__175; + PyObject *__pyx_tuple__177; + PyObject *__pyx_tuple__179; PyObject *__pyx_tuple__181; PyObject *__pyx_tuple__183; + PyObject *__pyx_tuple__184; PyObject *__pyx_tuple__186; - PyObject *__pyx_tuple__188; PyObject *__pyx_tuple__189; PyObject *__pyx_tuple__191; - PyObject *__pyx_tuple__195; - PyObject *__pyx_tuple__199; - PyObject *__pyx_tuple__201; - PyObject *__pyx_tuple__212; - PyObject *__pyx_tuple__214; - PyObject *__pyx_tuple__226; - PyObject *__pyx_tuple__237; - PyObject *__pyx_tuple__239; - PyObject *__pyx_tuple__241; + PyObject *__pyx_tuple__192; + PyObject *__pyx_tuple__194; + PyObject *__pyx_tuple__198; + PyObject *__pyx_tuple__202; + PyObject *__pyx_tuple__204; + PyObject *__pyx_tuple__215; + PyObject *__pyx_tuple__217; + PyObject *__pyx_tuple__229; + PyObject *__pyx_tuple__240; PyObject *__pyx_tuple__242; PyObject *__pyx_tuple__244; PyObject *__pyx_tuple__245; + PyObject *__pyx_tuple__247; PyObject *__pyx_tuple__248; - PyObject *__pyx_tuple__249; PyObject *__pyx_tuple__251; - PyObject *__pyx_tuple__253; + PyObject *__pyx_tuple__252; PyObject *__pyx_tuple__254; - PyObject *__pyx_tuple__258; - PyObject *__pyx_tuple__260; - PyObject *__pyx_tuple__262; - PyObject *__pyx_tuple__264; - PyObject *__pyx_tuple__266; - PyObject *__pyx_tuple__268; - PyObject *__pyx_tuple__270; + PyObject *__pyx_tuple__256; + PyObject *__pyx_tuple__257; + PyObject *__pyx_tuple__261; + PyObject *__pyx_tuple__263; + PyObject *__pyx_tuple__265; + PyObject *__pyx_tuple__267; + PyObject *__pyx_tuple__269; PyObject *__pyx_tuple__271; PyObject *__pyx_tuple__273; PyObject *__pyx_tuple__274; PyObject *__pyx_tuple__276; - PyObject *__pyx_tuple__278; - PyObject *__pyx_tuple__280; + PyObject *__pyx_tuple__277; + PyObject *__pyx_tuple__279; + PyObject *__pyx_tuple__281; PyObject *__pyx_tuple__283; - PyObject *__pyx_tuple__287; - PyObject *__pyx_tuple__300; - PyObject *__pyx_tuple__302; + PyObject *__pyx_tuple__286; + PyObject *__pyx_tuple__290; PyObject *__pyx_tuple__303; - PyObject *__pyx_codeobj__39; - PyObject *__pyx_codeobj__41; + PyObject *__pyx_tuple__305; + PyObject *__pyx_tuple__306; PyObject *__pyx_codeobj__42; - PyObject *__pyx_codeobj__43; PyObject *__pyx_codeobj__44; PyObject *__pyx_codeobj__45; PyObject *__pyx_codeobj__46; PyObject *__pyx_codeobj__47; + PyObject *__pyx_codeobj__48; PyObject *__pyx_codeobj__49; - PyObject *__pyx_codeobj__51; + PyObject *__pyx_codeobj__50; PyObject *__pyx_codeobj__52; - PyObject *__pyx_codeobj__53; + PyObject *__pyx_codeobj__54; PyObject *__pyx_codeobj__55; PyObject *__pyx_codeobj__56; - PyObject *__pyx_codeobj__57; PyObject *__pyx_codeobj__58; PyObject *__pyx_codeobj__59; + PyObject *__pyx_codeobj__60; PyObject *__pyx_codeobj__61; - PyObject *__pyx_codeobj__63; + PyObject *__pyx_codeobj__62; PyObject *__pyx_codeobj__64; PyObject *__pyx_codeobj__66; PyObject *__pyx_codeobj__67; - PyObject *__pyx_codeobj__68; + PyObject *__pyx_codeobj__69; PyObject *__pyx_codeobj__70; PyObject *__pyx_codeobj__71; - PyObject *__pyx_codeobj__72; - PyObject *__pyx_codeobj__74; + PyObject *__pyx_codeobj__73; + PyObject *__pyx_codeobj__75; PyObject *__pyx_codeobj__76; PyObject *__pyx_codeobj__78; PyObject *__pyx_codeobj__80; PyObject *__pyx_codeobj__82; - PyObject *__pyx_codeobj__85; - PyObject *__pyx_codeobj__87; - PyObject *__pyx_codeobj__89; - PyObject *__pyx_codeobj__91; + PyObject *__pyx_codeobj__84; + PyObject *__pyx_codeobj__86; + PyObject *__pyx_codeobj__88; + PyObject *__pyx_codeobj__90; PyObject *__pyx_codeobj__92; - PyObject *__pyx_codeobj__93; PyObject *__pyx_codeobj__94; PyObject *__pyx_codeobj__95; PyObject *__pyx_codeobj__96; PyObject *__pyx_codeobj__97; + PyObject *__pyx_codeobj__98; PyObject *__pyx_codeobj__99; - PyObject *__pyx_codeobj__101; + PyObject *__pyx_codeobj__100; PyObject *__pyx_codeobj__102; - PyObject *__pyx_codeobj__103; PyObject *__pyx_codeobj__104; PyObject *__pyx_codeobj__105; PyObject *__pyx_codeobj__106; PyObject *__pyx_codeobj__107; PyObject *__pyx_codeobj__108; PyObject *__pyx_codeobj__109; + PyObject *__pyx_codeobj__110; PyObject *__pyx_codeobj__111; PyObject *__pyx_codeobj__112; - PyObject *__pyx_codeobj__113; + PyObject *__pyx_codeobj__114; PyObject *__pyx_codeobj__115; PyObject *__pyx_codeobj__116; PyObject *__pyx_codeobj__118; - PyObject *__pyx_codeobj__120; + PyObject *__pyx_codeobj__119; PyObject *__pyx_codeobj__121; - PyObject *__pyx_codeobj__122; PyObject *__pyx_codeobj__123; PyObject *__pyx_codeobj__124; PyObject *__pyx_codeobj__125; PyObject *__pyx_codeobj__126; + PyObject *__pyx_codeobj__127; PyObject *__pyx_codeobj__128; + PyObject *__pyx_codeobj__129; PyObject *__pyx_codeobj__131; - PyObject *__pyx_codeobj__133; - PyObject *__pyx_codeobj__135; + PyObject *__pyx_codeobj__134; PyObject *__pyx_codeobj__136; - PyObject *__pyx_codeobj__137; PyObject *__pyx_codeobj__138; PyObject *__pyx_codeobj__139; PyObject *__pyx_codeobj__140; PyObject *__pyx_codeobj__141; + PyObject *__pyx_codeobj__142; PyObject *__pyx_codeobj__143; PyObject *__pyx_codeobj__144; PyObject *__pyx_codeobj__146; - PyObject *__pyx_codeobj__148; + PyObject *__pyx_codeobj__147; + PyObject *__pyx_codeobj__149; PyObject *__pyx_codeobj__151; PyObject *__pyx_codeobj__154; - PyObject *__pyx_codeobj__155; PyObject *__pyx_codeobj__157; - PyObject *__pyx_codeobj__159; + PyObject *__pyx_codeobj__158; + PyObject *__pyx_codeobj__160; PyObject *__pyx_codeobj__162; - PyObject *__pyx_codeobj__164; PyObject *__pyx_codeobj__165; PyObject *__pyx_codeobj__167; PyObject *__pyx_codeobj__168; - PyObject *__pyx_codeobj__169; PyObject *__pyx_codeobj__170; PyObject *__pyx_codeobj__171; + PyObject *__pyx_codeobj__172; PyObject *__pyx_codeobj__173; - PyObject *__pyx_codeobj__175; - PyObject *__pyx_codeobj__177; - PyObject *__pyx_codeobj__179; + PyObject *__pyx_codeobj__174; + PyObject *__pyx_codeobj__176; + PyObject *__pyx_codeobj__178; + PyObject *__pyx_codeobj__180; PyObject *__pyx_codeobj__182; - PyObject *__pyx_codeobj__184; PyObject *__pyx_codeobj__185; PyObject *__pyx_codeobj__187; + PyObject *__pyx_codeobj__188; PyObject *__pyx_codeobj__190; - PyObject *__pyx_codeobj__192; PyObject *__pyx_codeobj__193; - PyObject *__pyx_codeobj__194; + PyObject *__pyx_codeobj__195; PyObject *__pyx_codeobj__196; PyObject *__pyx_codeobj__197; - PyObject *__pyx_codeobj__198; + PyObject *__pyx_codeobj__199; PyObject *__pyx_codeobj__200; - PyObject *__pyx_codeobj__202; + PyObject *__pyx_codeobj__201; PyObject *__pyx_codeobj__203; - PyObject *__pyx_codeobj__204; PyObject *__pyx_codeobj__205; PyObject *__pyx_codeobj__206; PyObject *__pyx_codeobj__207; @@ -6128,10 +6147,10 @@ typedef struct { PyObject *__pyx_codeobj__209; PyObject *__pyx_codeobj__210; PyObject *__pyx_codeobj__211; + PyObject *__pyx_codeobj__212; PyObject *__pyx_codeobj__213; - PyObject *__pyx_codeobj__215; + PyObject *__pyx_codeobj__214; PyObject *__pyx_codeobj__216; - PyObject *__pyx_codeobj__217; PyObject *__pyx_codeobj__218; PyObject *__pyx_codeobj__219; PyObject *__pyx_codeobj__220; @@ -6140,9 +6159,9 @@ typedef struct { PyObject *__pyx_codeobj__223; PyObject *__pyx_codeobj__224; PyObject *__pyx_codeobj__225; + PyObject *__pyx_codeobj__226; PyObject *__pyx_codeobj__227; PyObject *__pyx_codeobj__228; - PyObject *__pyx_codeobj__229; PyObject *__pyx_codeobj__230; PyObject *__pyx_codeobj__231; PyObject *__pyx_codeobj__232; @@ -6150,34 +6169,34 @@ typedef struct { PyObject *__pyx_codeobj__234; PyObject *__pyx_codeobj__235; PyObject *__pyx_codeobj__236; + PyObject *__pyx_codeobj__237; PyObject *__pyx_codeobj__238; - PyObject *__pyx_codeobj__240; + PyObject *__pyx_codeobj__239; + PyObject *__pyx_codeobj__241; PyObject *__pyx_codeobj__243; PyObject *__pyx_codeobj__246; - PyObject *__pyx_codeobj__247; + PyObject *__pyx_codeobj__249; PyObject *__pyx_codeobj__250; - PyObject *__pyx_codeobj__252; + PyObject *__pyx_codeobj__253; PyObject *__pyx_codeobj__255; - PyObject *__pyx_codeobj__256; - PyObject *__pyx_codeobj__257; + PyObject *__pyx_codeobj__258; PyObject *__pyx_codeobj__259; - PyObject *__pyx_codeobj__261; - PyObject *__pyx_codeobj__263; - PyObject *__pyx_codeobj__265; - PyObject *__pyx_codeobj__267; - PyObject *__pyx_codeobj__269; + PyObject *__pyx_codeobj__260; + PyObject *__pyx_codeobj__262; + PyObject *__pyx_codeobj__264; + PyObject *__pyx_codeobj__266; + PyObject *__pyx_codeobj__268; + PyObject *__pyx_codeobj__270; PyObject *__pyx_codeobj__272; PyObject *__pyx_codeobj__275; - PyObject *__pyx_codeobj__277; - PyObject *__pyx_codeobj__279; - PyObject *__pyx_codeobj__281; + PyObject *__pyx_codeobj__278; + PyObject *__pyx_codeobj__280; PyObject *__pyx_codeobj__282; PyObject *__pyx_codeobj__284; PyObject *__pyx_codeobj__285; - PyObject *__pyx_codeobj__286; + PyObject *__pyx_codeobj__287; PyObject *__pyx_codeobj__288; PyObject *__pyx_codeobj__289; - PyObject *__pyx_codeobj__290; PyObject *__pyx_codeobj__291; PyObject *__pyx_codeobj__292; PyObject *__pyx_codeobj__293; @@ -6187,13 +6206,16 @@ typedef struct { PyObject *__pyx_codeobj__297; PyObject *__pyx_codeobj__298; PyObject *__pyx_codeobj__299; + PyObject *__pyx_codeobj__300; PyObject *__pyx_codeobj__301; + PyObject *__pyx_codeobj__302; PyObject *__pyx_codeobj__304; - PyObject *__pyx_codeobj__305; - PyObject *__pyx_codeobj__306; PyObject *__pyx_codeobj__307; PyObject *__pyx_codeobj__308; PyObject *__pyx_codeobj__309; + PyObject *__pyx_codeobj__310; + PyObject *__pyx_codeobj__311; + PyObject *__pyx_codeobj__312; } __pyx_mstate; #if CYTHON_USE_MODULE_STATE @@ -6309,6 +6331,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_Arc___setstate_cython); Py_CLEAR(clear_module_state->__pyx_kp_u_Arc_at_0x); Py_CLEAR(clear_module_state->__pyx_n_s_Arc_copy); + Py_CLEAR(clear_module_state->__pyx_kp_u_Argument_FST_did_not_satisfy_pre); Py_CLEAR(clear_module_state->__pyx_n_s_BINARY_PROPERTIES); Py_CLEAR(clear_module_state->__pyx_n_s_COACCESSIBLE); Py_CLEAR(clear_module_state->__pyx_n_s_COPY_PROPERTIES); @@ -6606,9 +6629,10 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_u_Write_to_string_failed); Py_CLEAR(clear_module_state->__pyx_kp_u__2); Py_CLEAR(clear_module_state->__pyx_kp_u__3); - Py_CLEAR(clear_module_state->__pyx_n_s__310); - Py_CLEAR(clear_module_state->__pyx_n_s__37); - Py_CLEAR(clear_module_state->__pyx_kp_u__5); + Py_CLEAR(clear_module_state->__pyx_n_s__313); + Py_CLEAR(clear_module_state->__pyx_kp_u__4); + Py_CLEAR(clear_module_state->__pyx_n_s__40); + Py_CLEAR(clear_module_state->__pyx_kp_u__6); Py_CLEAR(clear_module_state->__pyx_n_s_a); Py_CLEAR(clear_module_state->__pyx_n_s_acceptor); Py_CLEAR(clear_module_state->__pyx_n_s_add); @@ -6617,7 +6641,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_add_states); Py_CLEAR(clear_module_state->__pyx_n_s_add_symbol); Py_CLEAR(clear_module_state->__pyx_n_s_add_table); - Py_CLEAR(clear_module_state->__pyx_n_s_allow_negative_labels); Py_CLEAR(clear_module_state->__pyx_n_s_allow_nondet); Py_CLEAR(clear_module_state->__pyx_n_s_arc); Py_CLEAR(clear_module_state->__pyx_n_s_arc_type); @@ -6779,7 +6802,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_one); Py_CLEAR(clear_module_state->__pyx_n_s_opairs); Py_CLEAR(clear_module_state->__pyx_n_s_open); - Py_CLEAR(clear_module_state->__pyx_n_s_opts); Py_CLEAR(clear_module_state->__pyx_n_s_os); Py_CLEAR(clear_module_state->__pyx_n_s_osymbols); Py_CLEAR(clear_module_state->__pyx_n_s_output_symbols); @@ -6852,6 +6874,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_s_self__weight_cannot_be_converted); Py_CLEAR(clear_module_state->__pyx_kp_s_self__writer_cannot_be_converted); Py_CLEAR(clear_module_state->__pyx_n_s_send); + Py_CLEAR(clear_module_state->__pyx_n_s_sep); Py_CLEAR(clear_module_state->__pyx_n_s_set_final); Py_CLEAR(clear_module_state->__pyx_n_s_set_flags); Py_CLEAR(clear_module_state->__pyx_n_s_set_input_symbols); @@ -6912,7 +6935,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_ilabel_olabel); Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_input_output); Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_neither_input_out); - Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_to_inital_to_fina); + Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_to_initial_to_fin); Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Literal_uniform_log_prob); Py_CLEAR(clear_module_state->__pyx_kp_u_typing_Union_Weight_typing_Union); Py_CLEAR(clear_module_state->__pyx_n_u_uniform); @@ -6947,205 +6970,202 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_5); Py_CLEAR(clear_module_state->__pyx_int_14); - Py_CLEAR(clear_module_state->__pyx_tuple__38); - Py_CLEAR(clear_module_state->__pyx_tuple__40); - Py_CLEAR(clear_module_state->__pyx_tuple__48); - Py_CLEAR(clear_module_state->__pyx_tuple__50); - Py_CLEAR(clear_module_state->__pyx_tuple__54); - Py_CLEAR(clear_module_state->__pyx_tuple__60); - Py_CLEAR(clear_module_state->__pyx_tuple__62); + Py_CLEAR(clear_module_state->__pyx_tuple__41); + Py_CLEAR(clear_module_state->__pyx_tuple__43); + Py_CLEAR(clear_module_state->__pyx_tuple__51); + Py_CLEAR(clear_module_state->__pyx_tuple__53); + Py_CLEAR(clear_module_state->__pyx_tuple__57); + Py_CLEAR(clear_module_state->__pyx_tuple__63); Py_CLEAR(clear_module_state->__pyx_tuple__65); - Py_CLEAR(clear_module_state->__pyx_tuple__69); - Py_CLEAR(clear_module_state->__pyx_tuple__73); - Py_CLEAR(clear_module_state->__pyx_tuple__75); + Py_CLEAR(clear_module_state->__pyx_tuple__68); + Py_CLEAR(clear_module_state->__pyx_tuple__72); + Py_CLEAR(clear_module_state->__pyx_tuple__74); Py_CLEAR(clear_module_state->__pyx_tuple__77); Py_CLEAR(clear_module_state->__pyx_tuple__79); Py_CLEAR(clear_module_state->__pyx_tuple__81); Py_CLEAR(clear_module_state->__pyx_tuple__83); - Py_CLEAR(clear_module_state->__pyx_tuple__84); - Py_CLEAR(clear_module_state->__pyx_tuple__86); - Py_CLEAR(clear_module_state->__pyx_tuple__88); - Py_CLEAR(clear_module_state->__pyx_tuple__90); - Py_CLEAR(clear_module_state->__pyx_tuple__98); - Py_CLEAR(clear_module_state->__pyx_tuple__100); - Py_CLEAR(clear_module_state->__pyx_tuple__110); - Py_CLEAR(clear_module_state->__pyx_tuple__114); + Py_CLEAR(clear_module_state->__pyx_tuple__85); + Py_CLEAR(clear_module_state->__pyx_tuple__87); + Py_CLEAR(clear_module_state->__pyx_tuple__89); + Py_CLEAR(clear_module_state->__pyx_tuple__91); + Py_CLEAR(clear_module_state->__pyx_tuple__93); + Py_CLEAR(clear_module_state->__pyx_tuple__101); + Py_CLEAR(clear_module_state->__pyx_tuple__103); + Py_CLEAR(clear_module_state->__pyx_tuple__113); Py_CLEAR(clear_module_state->__pyx_tuple__117); - Py_CLEAR(clear_module_state->__pyx_tuple__119); - Py_CLEAR(clear_module_state->__pyx_tuple__127); - Py_CLEAR(clear_module_state->__pyx_tuple__129); + Py_CLEAR(clear_module_state->__pyx_tuple__120); + Py_CLEAR(clear_module_state->__pyx_tuple__122); Py_CLEAR(clear_module_state->__pyx_tuple__130); Py_CLEAR(clear_module_state->__pyx_tuple__132); - Py_CLEAR(clear_module_state->__pyx_tuple__134); - Py_CLEAR(clear_module_state->__pyx_tuple__142); + Py_CLEAR(clear_module_state->__pyx_tuple__133); + Py_CLEAR(clear_module_state->__pyx_tuple__135); + Py_CLEAR(clear_module_state->__pyx_tuple__137); Py_CLEAR(clear_module_state->__pyx_tuple__145); - Py_CLEAR(clear_module_state->__pyx_tuple__147); - Py_CLEAR(clear_module_state->__pyx_tuple__149); + Py_CLEAR(clear_module_state->__pyx_tuple__148); Py_CLEAR(clear_module_state->__pyx_tuple__150); Py_CLEAR(clear_module_state->__pyx_tuple__152); Py_CLEAR(clear_module_state->__pyx_tuple__153); + Py_CLEAR(clear_module_state->__pyx_tuple__155); Py_CLEAR(clear_module_state->__pyx_tuple__156); - Py_CLEAR(clear_module_state->__pyx_tuple__158); - Py_CLEAR(clear_module_state->__pyx_tuple__160); + Py_CLEAR(clear_module_state->__pyx_tuple__159); Py_CLEAR(clear_module_state->__pyx_tuple__161); Py_CLEAR(clear_module_state->__pyx_tuple__163); + Py_CLEAR(clear_module_state->__pyx_tuple__164); Py_CLEAR(clear_module_state->__pyx_tuple__166); - Py_CLEAR(clear_module_state->__pyx_tuple__172); - Py_CLEAR(clear_module_state->__pyx_tuple__174); - Py_CLEAR(clear_module_state->__pyx_tuple__176); - Py_CLEAR(clear_module_state->__pyx_tuple__178); - Py_CLEAR(clear_module_state->__pyx_tuple__180); + Py_CLEAR(clear_module_state->__pyx_tuple__169); + Py_CLEAR(clear_module_state->__pyx_tuple__175); + Py_CLEAR(clear_module_state->__pyx_tuple__177); + Py_CLEAR(clear_module_state->__pyx_tuple__179); Py_CLEAR(clear_module_state->__pyx_tuple__181); Py_CLEAR(clear_module_state->__pyx_tuple__183); + Py_CLEAR(clear_module_state->__pyx_tuple__184); Py_CLEAR(clear_module_state->__pyx_tuple__186); - Py_CLEAR(clear_module_state->__pyx_tuple__188); Py_CLEAR(clear_module_state->__pyx_tuple__189); Py_CLEAR(clear_module_state->__pyx_tuple__191); - Py_CLEAR(clear_module_state->__pyx_tuple__195); - Py_CLEAR(clear_module_state->__pyx_tuple__199); - Py_CLEAR(clear_module_state->__pyx_tuple__201); - Py_CLEAR(clear_module_state->__pyx_tuple__212); - Py_CLEAR(clear_module_state->__pyx_tuple__214); - Py_CLEAR(clear_module_state->__pyx_tuple__226); - Py_CLEAR(clear_module_state->__pyx_tuple__237); - Py_CLEAR(clear_module_state->__pyx_tuple__239); - Py_CLEAR(clear_module_state->__pyx_tuple__241); + Py_CLEAR(clear_module_state->__pyx_tuple__192); + Py_CLEAR(clear_module_state->__pyx_tuple__194); + Py_CLEAR(clear_module_state->__pyx_tuple__198); + Py_CLEAR(clear_module_state->__pyx_tuple__202); + Py_CLEAR(clear_module_state->__pyx_tuple__204); + Py_CLEAR(clear_module_state->__pyx_tuple__215); + Py_CLEAR(clear_module_state->__pyx_tuple__217); + Py_CLEAR(clear_module_state->__pyx_tuple__229); + Py_CLEAR(clear_module_state->__pyx_tuple__240); Py_CLEAR(clear_module_state->__pyx_tuple__242); Py_CLEAR(clear_module_state->__pyx_tuple__244); Py_CLEAR(clear_module_state->__pyx_tuple__245); + Py_CLEAR(clear_module_state->__pyx_tuple__247); Py_CLEAR(clear_module_state->__pyx_tuple__248); - Py_CLEAR(clear_module_state->__pyx_tuple__249); Py_CLEAR(clear_module_state->__pyx_tuple__251); - Py_CLEAR(clear_module_state->__pyx_tuple__253); + Py_CLEAR(clear_module_state->__pyx_tuple__252); Py_CLEAR(clear_module_state->__pyx_tuple__254); - Py_CLEAR(clear_module_state->__pyx_tuple__258); - Py_CLEAR(clear_module_state->__pyx_tuple__260); - Py_CLEAR(clear_module_state->__pyx_tuple__262); - Py_CLEAR(clear_module_state->__pyx_tuple__264); - Py_CLEAR(clear_module_state->__pyx_tuple__266); - Py_CLEAR(clear_module_state->__pyx_tuple__268); - Py_CLEAR(clear_module_state->__pyx_tuple__270); + Py_CLEAR(clear_module_state->__pyx_tuple__256); + Py_CLEAR(clear_module_state->__pyx_tuple__257); + Py_CLEAR(clear_module_state->__pyx_tuple__261); + Py_CLEAR(clear_module_state->__pyx_tuple__263); + Py_CLEAR(clear_module_state->__pyx_tuple__265); + Py_CLEAR(clear_module_state->__pyx_tuple__267); + Py_CLEAR(clear_module_state->__pyx_tuple__269); Py_CLEAR(clear_module_state->__pyx_tuple__271); Py_CLEAR(clear_module_state->__pyx_tuple__273); Py_CLEAR(clear_module_state->__pyx_tuple__274); Py_CLEAR(clear_module_state->__pyx_tuple__276); - Py_CLEAR(clear_module_state->__pyx_tuple__278); - Py_CLEAR(clear_module_state->__pyx_tuple__280); + Py_CLEAR(clear_module_state->__pyx_tuple__277); + Py_CLEAR(clear_module_state->__pyx_tuple__279); + Py_CLEAR(clear_module_state->__pyx_tuple__281); Py_CLEAR(clear_module_state->__pyx_tuple__283); - Py_CLEAR(clear_module_state->__pyx_tuple__287); - Py_CLEAR(clear_module_state->__pyx_tuple__300); - Py_CLEAR(clear_module_state->__pyx_tuple__302); + Py_CLEAR(clear_module_state->__pyx_tuple__286); + Py_CLEAR(clear_module_state->__pyx_tuple__290); Py_CLEAR(clear_module_state->__pyx_tuple__303); - Py_CLEAR(clear_module_state->__pyx_codeobj__39); - Py_CLEAR(clear_module_state->__pyx_codeobj__41); + Py_CLEAR(clear_module_state->__pyx_tuple__305); + Py_CLEAR(clear_module_state->__pyx_tuple__306); Py_CLEAR(clear_module_state->__pyx_codeobj__42); - Py_CLEAR(clear_module_state->__pyx_codeobj__43); Py_CLEAR(clear_module_state->__pyx_codeobj__44); Py_CLEAR(clear_module_state->__pyx_codeobj__45); Py_CLEAR(clear_module_state->__pyx_codeobj__46); Py_CLEAR(clear_module_state->__pyx_codeobj__47); + Py_CLEAR(clear_module_state->__pyx_codeobj__48); Py_CLEAR(clear_module_state->__pyx_codeobj__49); - Py_CLEAR(clear_module_state->__pyx_codeobj__51); + Py_CLEAR(clear_module_state->__pyx_codeobj__50); Py_CLEAR(clear_module_state->__pyx_codeobj__52); - Py_CLEAR(clear_module_state->__pyx_codeobj__53); + Py_CLEAR(clear_module_state->__pyx_codeobj__54); Py_CLEAR(clear_module_state->__pyx_codeobj__55); Py_CLEAR(clear_module_state->__pyx_codeobj__56); - Py_CLEAR(clear_module_state->__pyx_codeobj__57); Py_CLEAR(clear_module_state->__pyx_codeobj__58); Py_CLEAR(clear_module_state->__pyx_codeobj__59); + Py_CLEAR(clear_module_state->__pyx_codeobj__60); Py_CLEAR(clear_module_state->__pyx_codeobj__61); - Py_CLEAR(clear_module_state->__pyx_codeobj__63); + Py_CLEAR(clear_module_state->__pyx_codeobj__62); Py_CLEAR(clear_module_state->__pyx_codeobj__64); Py_CLEAR(clear_module_state->__pyx_codeobj__66); Py_CLEAR(clear_module_state->__pyx_codeobj__67); - Py_CLEAR(clear_module_state->__pyx_codeobj__68); + Py_CLEAR(clear_module_state->__pyx_codeobj__69); Py_CLEAR(clear_module_state->__pyx_codeobj__70); Py_CLEAR(clear_module_state->__pyx_codeobj__71); - Py_CLEAR(clear_module_state->__pyx_codeobj__72); - Py_CLEAR(clear_module_state->__pyx_codeobj__74); + Py_CLEAR(clear_module_state->__pyx_codeobj__73); + Py_CLEAR(clear_module_state->__pyx_codeobj__75); Py_CLEAR(clear_module_state->__pyx_codeobj__76); Py_CLEAR(clear_module_state->__pyx_codeobj__78); Py_CLEAR(clear_module_state->__pyx_codeobj__80); Py_CLEAR(clear_module_state->__pyx_codeobj__82); - Py_CLEAR(clear_module_state->__pyx_codeobj__85); - Py_CLEAR(clear_module_state->__pyx_codeobj__87); - Py_CLEAR(clear_module_state->__pyx_codeobj__89); - Py_CLEAR(clear_module_state->__pyx_codeobj__91); + Py_CLEAR(clear_module_state->__pyx_codeobj__84); + Py_CLEAR(clear_module_state->__pyx_codeobj__86); + Py_CLEAR(clear_module_state->__pyx_codeobj__88); + Py_CLEAR(clear_module_state->__pyx_codeobj__90); Py_CLEAR(clear_module_state->__pyx_codeobj__92); - Py_CLEAR(clear_module_state->__pyx_codeobj__93); Py_CLEAR(clear_module_state->__pyx_codeobj__94); Py_CLEAR(clear_module_state->__pyx_codeobj__95); Py_CLEAR(clear_module_state->__pyx_codeobj__96); Py_CLEAR(clear_module_state->__pyx_codeobj__97); + Py_CLEAR(clear_module_state->__pyx_codeobj__98); Py_CLEAR(clear_module_state->__pyx_codeobj__99); - Py_CLEAR(clear_module_state->__pyx_codeobj__101); + Py_CLEAR(clear_module_state->__pyx_codeobj__100); Py_CLEAR(clear_module_state->__pyx_codeobj__102); - Py_CLEAR(clear_module_state->__pyx_codeobj__103); Py_CLEAR(clear_module_state->__pyx_codeobj__104); Py_CLEAR(clear_module_state->__pyx_codeobj__105); Py_CLEAR(clear_module_state->__pyx_codeobj__106); Py_CLEAR(clear_module_state->__pyx_codeobj__107); Py_CLEAR(clear_module_state->__pyx_codeobj__108); Py_CLEAR(clear_module_state->__pyx_codeobj__109); + Py_CLEAR(clear_module_state->__pyx_codeobj__110); Py_CLEAR(clear_module_state->__pyx_codeobj__111); Py_CLEAR(clear_module_state->__pyx_codeobj__112); - Py_CLEAR(clear_module_state->__pyx_codeobj__113); + Py_CLEAR(clear_module_state->__pyx_codeobj__114); Py_CLEAR(clear_module_state->__pyx_codeobj__115); Py_CLEAR(clear_module_state->__pyx_codeobj__116); Py_CLEAR(clear_module_state->__pyx_codeobj__118); - Py_CLEAR(clear_module_state->__pyx_codeobj__120); + Py_CLEAR(clear_module_state->__pyx_codeobj__119); Py_CLEAR(clear_module_state->__pyx_codeobj__121); - Py_CLEAR(clear_module_state->__pyx_codeobj__122); Py_CLEAR(clear_module_state->__pyx_codeobj__123); Py_CLEAR(clear_module_state->__pyx_codeobj__124); Py_CLEAR(clear_module_state->__pyx_codeobj__125); Py_CLEAR(clear_module_state->__pyx_codeobj__126); + Py_CLEAR(clear_module_state->__pyx_codeobj__127); Py_CLEAR(clear_module_state->__pyx_codeobj__128); + Py_CLEAR(clear_module_state->__pyx_codeobj__129); Py_CLEAR(clear_module_state->__pyx_codeobj__131); - Py_CLEAR(clear_module_state->__pyx_codeobj__133); - Py_CLEAR(clear_module_state->__pyx_codeobj__135); + Py_CLEAR(clear_module_state->__pyx_codeobj__134); Py_CLEAR(clear_module_state->__pyx_codeobj__136); - Py_CLEAR(clear_module_state->__pyx_codeobj__137); Py_CLEAR(clear_module_state->__pyx_codeobj__138); Py_CLEAR(clear_module_state->__pyx_codeobj__139); Py_CLEAR(clear_module_state->__pyx_codeobj__140); Py_CLEAR(clear_module_state->__pyx_codeobj__141); + Py_CLEAR(clear_module_state->__pyx_codeobj__142); Py_CLEAR(clear_module_state->__pyx_codeobj__143); Py_CLEAR(clear_module_state->__pyx_codeobj__144); Py_CLEAR(clear_module_state->__pyx_codeobj__146); - Py_CLEAR(clear_module_state->__pyx_codeobj__148); + Py_CLEAR(clear_module_state->__pyx_codeobj__147); + Py_CLEAR(clear_module_state->__pyx_codeobj__149); Py_CLEAR(clear_module_state->__pyx_codeobj__151); Py_CLEAR(clear_module_state->__pyx_codeobj__154); - Py_CLEAR(clear_module_state->__pyx_codeobj__155); Py_CLEAR(clear_module_state->__pyx_codeobj__157); - Py_CLEAR(clear_module_state->__pyx_codeobj__159); + Py_CLEAR(clear_module_state->__pyx_codeobj__158); + Py_CLEAR(clear_module_state->__pyx_codeobj__160); Py_CLEAR(clear_module_state->__pyx_codeobj__162); - Py_CLEAR(clear_module_state->__pyx_codeobj__164); Py_CLEAR(clear_module_state->__pyx_codeobj__165); Py_CLEAR(clear_module_state->__pyx_codeobj__167); Py_CLEAR(clear_module_state->__pyx_codeobj__168); - Py_CLEAR(clear_module_state->__pyx_codeobj__169); Py_CLEAR(clear_module_state->__pyx_codeobj__170); Py_CLEAR(clear_module_state->__pyx_codeobj__171); + Py_CLEAR(clear_module_state->__pyx_codeobj__172); Py_CLEAR(clear_module_state->__pyx_codeobj__173); - Py_CLEAR(clear_module_state->__pyx_codeobj__175); - Py_CLEAR(clear_module_state->__pyx_codeobj__177); - Py_CLEAR(clear_module_state->__pyx_codeobj__179); + Py_CLEAR(clear_module_state->__pyx_codeobj__174); + Py_CLEAR(clear_module_state->__pyx_codeobj__176); + Py_CLEAR(clear_module_state->__pyx_codeobj__178); + Py_CLEAR(clear_module_state->__pyx_codeobj__180); Py_CLEAR(clear_module_state->__pyx_codeobj__182); - Py_CLEAR(clear_module_state->__pyx_codeobj__184); Py_CLEAR(clear_module_state->__pyx_codeobj__185); Py_CLEAR(clear_module_state->__pyx_codeobj__187); + Py_CLEAR(clear_module_state->__pyx_codeobj__188); Py_CLEAR(clear_module_state->__pyx_codeobj__190); - Py_CLEAR(clear_module_state->__pyx_codeobj__192); Py_CLEAR(clear_module_state->__pyx_codeobj__193); - Py_CLEAR(clear_module_state->__pyx_codeobj__194); + Py_CLEAR(clear_module_state->__pyx_codeobj__195); Py_CLEAR(clear_module_state->__pyx_codeobj__196); Py_CLEAR(clear_module_state->__pyx_codeobj__197); - Py_CLEAR(clear_module_state->__pyx_codeobj__198); + Py_CLEAR(clear_module_state->__pyx_codeobj__199); Py_CLEAR(clear_module_state->__pyx_codeobj__200); - Py_CLEAR(clear_module_state->__pyx_codeobj__202); + Py_CLEAR(clear_module_state->__pyx_codeobj__201); Py_CLEAR(clear_module_state->__pyx_codeobj__203); - Py_CLEAR(clear_module_state->__pyx_codeobj__204); Py_CLEAR(clear_module_state->__pyx_codeobj__205); Py_CLEAR(clear_module_state->__pyx_codeobj__206); Py_CLEAR(clear_module_state->__pyx_codeobj__207); @@ -7153,10 +7173,10 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_codeobj__209); Py_CLEAR(clear_module_state->__pyx_codeobj__210); Py_CLEAR(clear_module_state->__pyx_codeobj__211); + Py_CLEAR(clear_module_state->__pyx_codeobj__212); Py_CLEAR(clear_module_state->__pyx_codeobj__213); - Py_CLEAR(clear_module_state->__pyx_codeobj__215); + Py_CLEAR(clear_module_state->__pyx_codeobj__214); Py_CLEAR(clear_module_state->__pyx_codeobj__216); - Py_CLEAR(clear_module_state->__pyx_codeobj__217); Py_CLEAR(clear_module_state->__pyx_codeobj__218); Py_CLEAR(clear_module_state->__pyx_codeobj__219); Py_CLEAR(clear_module_state->__pyx_codeobj__220); @@ -7165,9 +7185,9 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_codeobj__223); Py_CLEAR(clear_module_state->__pyx_codeobj__224); Py_CLEAR(clear_module_state->__pyx_codeobj__225); + Py_CLEAR(clear_module_state->__pyx_codeobj__226); Py_CLEAR(clear_module_state->__pyx_codeobj__227); Py_CLEAR(clear_module_state->__pyx_codeobj__228); - Py_CLEAR(clear_module_state->__pyx_codeobj__229); Py_CLEAR(clear_module_state->__pyx_codeobj__230); Py_CLEAR(clear_module_state->__pyx_codeobj__231); Py_CLEAR(clear_module_state->__pyx_codeobj__232); @@ -7175,34 +7195,34 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_codeobj__234); Py_CLEAR(clear_module_state->__pyx_codeobj__235); Py_CLEAR(clear_module_state->__pyx_codeobj__236); + Py_CLEAR(clear_module_state->__pyx_codeobj__237); Py_CLEAR(clear_module_state->__pyx_codeobj__238); - Py_CLEAR(clear_module_state->__pyx_codeobj__240); + Py_CLEAR(clear_module_state->__pyx_codeobj__239); + Py_CLEAR(clear_module_state->__pyx_codeobj__241); Py_CLEAR(clear_module_state->__pyx_codeobj__243); Py_CLEAR(clear_module_state->__pyx_codeobj__246); - Py_CLEAR(clear_module_state->__pyx_codeobj__247); + Py_CLEAR(clear_module_state->__pyx_codeobj__249); Py_CLEAR(clear_module_state->__pyx_codeobj__250); - Py_CLEAR(clear_module_state->__pyx_codeobj__252); + Py_CLEAR(clear_module_state->__pyx_codeobj__253); Py_CLEAR(clear_module_state->__pyx_codeobj__255); - Py_CLEAR(clear_module_state->__pyx_codeobj__256); - Py_CLEAR(clear_module_state->__pyx_codeobj__257); + Py_CLEAR(clear_module_state->__pyx_codeobj__258); Py_CLEAR(clear_module_state->__pyx_codeobj__259); - Py_CLEAR(clear_module_state->__pyx_codeobj__261); - Py_CLEAR(clear_module_state->__pyx_codeobj__263); - Py_CLEAR(clear_module_state->__pyx_codeobj__265); - Py_CLEAR(clear_module_state->__pyx_codeobj__267); - Py_CLEAR(clear_module_state->__pyx_codeobj__269); + Py_CLEAR(clear_module_state->__pyx_codeobj__260); + Py_CLEAR(clear_module_state->__pyx_codeobj__262); + Py_CLEAR(clear_module_state->__pyx_codeobj__264); + Py_CLEAR(clear_module_state->__pyx_codeobj__266); + Py_CLEAR(clear_module_state->__pyx_codeobj__268); + Py_CLEAR(clear_module_state->__pyx_codeobj__270); Py_CLEAR(clear_module_state->__pyx_codeobj__272); Py_CLEAR(clear_module_state->__pyx_codeobj__275); - Py_CLEAR(clear_module_state->__pyx_codeobj__277); - Py_CLEAR(clear_module_state->__pyx_codeobj__279); - Py_CLEAR(clear_module_state->__pyx_codeobj__281); + Py_CLEAR(clear_module_state->__pyx_codeobj__278); + Py_CLEAR(clear_module_state->__pyx_codeobj__280); Py_CLEAR(clear_module_state->__pyx_codeobj__282); Py_CLEAR(clear_module_state->__pyx_codeobj__284); Py_CLEAR(clear_module_state->__pyx_codeobj__285); - Py_CLEAR(clear_module_state->__pyx_codeobj__286); + Py_CLEAR(clear_module_state->__pyx_codeobj__287); Py_CLEAR(clear_module_state->__pyx_codeobj__288); Py_CLEAR(clear_module_state->__pyx_codeobj__289); - Py_CLEAR(clear_module_state->__pyx_codeobj__290); Py_CLEAR(clear_module_state->__pyx_codeobj__291); Py_CLEAR(clear_module_state->__pyx_codeobj__292); Py_CLEAR(clear_module_state->__pyx_codeobj__293); @@ -7212,13 +7232,16 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_codeobj__297); Py_CLEAR(clear_module_state->__pyx_codeobj__298); Py_CLEAR(clear_module_state->__pyx_codeobj__299); + Py_CLEAR(clear_module_state->__pyx_codeobj__300); Py_CLEAR(clear_module_state->__pyx_codeobj__301); + Py_CLEAR(clear_module_state->__pyx_codeobj__302); Py_CLEAR(clear_module_state->__pyx_codeobj__304); - Py_CLEAR(clear_module_state->__pyx_codeobj__305); - Py_CLEAR(clear_module_state->__pyx_codeobj__306); Py_CLEAR(clear_module_state->__pyx_codeobj__307); Py_CLEAR(clear_module_state->__pyx_codeobj__308); Py_CLEAR(clear_module_state->__pyx_codeobj__309); + Py_CLEAR(clear_module_state->__pyx_codeobj__310); + Py_CLEAR(clear_module_state->__pyx_codeobj__311); + Py_CLEAR(clear_module_state->__pyx_codeobj__312); return 0; } #endif @@ -7312,6 +7335,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_Arc___setstate_cython); Py_VISIT(traverse_module_state->__pyx_kp_u_Arc_at_0x); Py_VISIT(traverse_module_state->__pyx_n_s_Arc_copy); + Py_VISIT(traverse_module_state->__pyx_kp_u_Argument_FST_did_not_satisfy_pre); Py_VISIT(traverse_module_state->__pyx_n_s_BINARY_PROPERTIES); Py_VISIT(traverse_module_state->__pyx_n_s_COACCESSIBLE); Py_VISIT(traverse_module_state->__pyx_n_s_COPY_PROPERTIES); @@ -7609,9 +7633,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_u_Write_to_string_failed); Py_VISIT(traverse_module_state->__pyx_kp_u__2); Py_VISIT(traverse_module_state->__pyx_kp_u__3); - Py_VISIT(traverse_module_state->__pyx_n_s__310); - Py_VISIT(traverse_module_state->__pyx_n_s__37); - Py_VISIT(traverse_module_state->__pyx_kp_u__5); + Py_VISIT(traverse_module_state->__pyx_n_s__313); + Py_VISIT(traverse_module_state->__pyx_kp_u__4); + Py_VISIT(traverse_module_state->__pyx_n_s__40); + Py_VISIT(traverse_module_state->__pyx_kp_u__6); Py_VISIT(traverse_module_state->__pyx_n_s_a); Py_VISIT(traverse_module_state->__pyx_n_s_acceptor); Py_VISIT(traverse_module_state->__pyx_n_s_add); @@ -7620,7 +7645,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_add_states); Py_VISIT(traverse_module_state->__pyx_n_s_add_symbol); Py_VISIT(traverse_module_state->__pyx_n_s_add_table); - Py_VISIT(traverse_module_state->__pyx_n_s_allow_negative_labels); Py_VISIT(traverse_module_state->__pyx_n_s_allow_nondet); Py_VISIT(traverse_module_state->__pyx_n_s_arc); Py_VISIT(traverse_module_state->__pyx_n_s_arc_type); @@ -7782,7 +7806,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_one); Py_VISIT(traverse_module_state->__pyx_n_s_opairs); Py_VISIT(traverse_module_state->__pyx_n_s_open); - Py_VISIT(traverse_module_state->__pyx_n_s_opts); Py_VISIT(traverse_module_state->__pyx_n_s_os); Py_VISIT(traverse_module_state->__pyx_n_s_osymbols); Py_VISIT(traverse_module_state->__pyx_n_s_output_symbols); @@ -7855,6 +7878,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_s_self__weight_cannot_be_converted); Py_VISIT(traverse_module_state->__pyx_kp_s_self__writer_cannot_be_converted); Py_VISIT(traverse_module_state->__pyx_n_s_send); + Py_VISIT(traverse_module_state->__pyx_n_s_sep); Py_VISIT(traverse_module_state->__pyx_n_s_set_final); Py_VISIT(traverse_module_state->__pyx_n_s_set_flags); Py_VISIT(traverse_module_state->__pyx_n_s_set_input_symbols); @@ -7915,7 +7939,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_ilabel_olabel); Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_input_output); Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_neither_input_out); - Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_to_inital_to_fina); + Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_to_initial_to_fin); Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Literal_uniform_log_prob); Py_VISIT(traverse_module_state->__pyx_kp_u_typing_Union_Weight_typing_Union); Py_VISIT(traverse_module_state->__pyx_n_u_uniform); @@ -7950,205 +7974,202 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_int_1); Py_VISIT(traverse_module_state->__pyx_int_5); Py_VISIT(traverse_module_state->__pyx_int_14); - Py_VISIT(traverse_module_state->__pyx_tuple__38); - Py_VISIT(traverse_module_state->__pyx_tuple__40); - Py_VISIT(traverse_module_state->__pyx_tuple__48); - Py_VISIT(traverse_module_state->__pyx_tuple__50); - Py_VISIT(traverse_module_state->__pyx_tuple__54); - Py_VISIT(traverse_module_state->__pyx_tuple__60); - Py_VISIT(traverse_module_state->__pyx_tuple__62); + Py_VISIT(traverse_module_state->__pyx_tuple__41); + Py_VISIT(traverse_module_state->__pyx_tuple__43); + Py_VISIT(traverse_module_state->__pyx_tuple__51); + Py_VISIT(traverse_module_state->__pyx_tuple__53); + Py_VISIT(traverse_module_state->__pyx_tuple__57); + Py_VISIT(traverse_module_state->__pyx_tuple__63); Py_VISIT(traverse_module_state->__pyx_tuple__65); - Py_VISIT(traverse_module_state->__pyx_tuple__69); - Py_VISIT(traverse_module_state->__pyx_tuple__73); - Py_VISIT(traverse_module_state->__pyx_tuple__75); + Py_VISIT(traverse_module_state->__pyx_tuple__68); + Py_VISIT(traverse_module_state->__pyx_tuple__72); + Py_VISIT(traverse_module_state->__pyx_tuple__74); Py_VISIT(traverse_module_state->__pyx_tuple__77); Py_VISIT(traverse_module_state->__pyx_tuple__79); Py_VISIT(traverse_module_state->__pyx_tuple__81); Py_VISIT(traverse_module_state->__pyx_tuple__83); - Py_VISIT(traverse_module_state->__pyx_tuple__84); - Py_VISIT(traverse_module_state->__pyx_tuple__86); - Py_VISIT(traverse_module_state->__pyx_tuple__88); - Py_VISIT(traverse_module_state->__pyx_tuple__90); - Py_VISIT(traverse_module_state->__pyx_tuple__98); - Py_VISIT(traverse_module_state->__pyx_tuple__100); - Py_VISIT(traverse_module_state->__pyx_tuple__110); - Py_VISIT(traverse_module_state->__pyx_tuple__114); + Py_VISIT(traverse_module_state->__pyx_tuple__85); + Py_VISIT(traverse_module_state->__pyx_tuple__87); + Py_VISIT(traverse_module_state->__pyx_tuple__89); + Py_VISIT(traverse_module_state->__pyx_tuple__91); + Py_VISIT(traverse_module_state->__pyx_tuple__93); + Py_VISIT(traverse_module_state->__pyx_tuple__101); + Py_VISIT(traverse_module_state->__pyx_tuple__103); + Py_VISIT(traverse_module_state->__pyx_tuple__113); Py_VISIT(traverse_module_state->__pyx_tuple__117); - Py_VISIT(traverse_module_state->__pyx_tuple__119); - Py_VISIT(traverse_module_state->__pyx_tuple__127); - Py_VISIT(traverse_module_state->__pyx_tuple__129); + Py_VISIT(traverse_module_state->__pyx_tuple__120); + Py_VISIT(traverse_module_state->__pyx_tuple__122); Py_VISIT(traverse_module_state->__pyx_tuple__130); Py_VISIT(traverse_module_state->__pyx_tuple__132); - Py_VISIT(traverse_module_state->__pyx_tuple__134); - Py_VISIT(traverse_module_state->__pyx_tuple__142); + Py_VISIT(traverse_module_state->__pyx_tuple__133); + Py_VISIT(traverse_module_state->__pyx_tuple__135); + Py_VISIT(traverse_module_state->__pyx_tuple__137); Py_VISIT(traverse_module_state->__pyx_tuple__145); - Py_VISIT(traverse_module_state->__pyx_tuple__147); - Py_VISIT(traverse_module_state->__pyx_tuple__149); + Py_VISIT(traverse_module_state->__pyx_tuple__148); Py_VISIT(traverse_module_state->__pyx_tuple__150); Py_VISIT(traverse_module_state->__pyx_tuple__152); Py_VISIT(traverse_module_state->__pyx_tuple__153); + Py_VISIT(traverse_module_state->__pyx_tuple__155); Py_VISIT(traverse_module_state->__pyx_tuple__156); - Py_VISIT(traverse_module_state->__pyx_tuple__158); - Py_VISIT(traverse_module_state->__pyx_tuple__160); + Py_VISIT(traverse_module_state->__pyx_tuple__159); Py_VISIT(traverse_module_state->__pyx_tuple__161); Py_VISIT(traverse_module_state->__pyx_tuple__163); + Py_VISIT(traverse_module_state->__pyx_tuple__164); Py_VISIT(traverse_module_state->__pyx_tuple__166); - Py_VISIT(traverse_module_state->__pyx_tuple__172); - Py_VISIT(traverse_module_state->__pyx_tuple__174); - Py_VISIT(traverse_module_state->__pyx_tuple__176); - Py_VISIT(traverse_module_state->__pyx_tuple__178); - Py_VISIT(traverse_module_state->__pyx_tuple__180); + Py_VISIT(traverse_module_state->__pyx_tuple__169); + Py_VISIT(traverse_module_state->__pyx_tuple__175); + Py_VISIT(traverse_module_state->__pyx_tuple__177); + Py_VISIT(traverse_module_state->__pyx_tuple__179); Py_VISIT(traverse_module_state->__pyx_tuple__181); Py_VISIT(traverse_module_state->__pyx_tuple__183); + Py_VISIT(traverse_module_state->__pyx_tuple__184); Py_VISIT(traverse_module_state->__pyx_tuple__186); - Py_VISIT(traverse_module_state->__pyx_tuple__188); Py_VISIT(traverse_module_state->__pyx_tuple__189); Py_VISIT(traverse_module_state->__pyx_tuple__191); - Py_VISIT(traverse_module_state->__pyx_tuple__195); - Py_VISIT(traverse_module_state->__pyx_tuple__199); - Py_VISIT(traverse_module_state->__pyx_tuple__201); - Py_VISIT(traverse_module_state->__pyx_tuple__212); - Py_VISIT(traverse_module_state->__pyx_tuple__214); - Py_VISIT(traverse_module_state->__pyx_tuple__226); - Py_VISIT(traverse_module_state->__pyx_tuple__237); - Py_VISIT(traverse_module_state->__pyx_tuple__239); - Py_VISIT(traverse_module_state->__pyx_tuple__241); + Py_VISIT(traverse_module_state->__pyx_tuple__192); + Py_VISIT(traverse_module_state->__pyx_tuple__194); + Py_VISIT(traverse_module_state->__pyx_tuple__198); + Py_VISIT(traverse_module_state->__pyx_tuple__202); + Py_VISIT(traverse_module_state->__pyx_tuple__204); + Py_VISIT(traverse_module_state->__pyx_tuple__215); + Py_VISIT(traverse_module_state->__pyx_tuple__217); + Py_VISIT(traverse_module_state->__pyx_tuple__229); + Py_VISIT(traverse_module_state->__pyx_tuple__240); Py_VISIT(traverse_module_state->__pyx_tuple__242); Py_VISIT(traverse_module_state->__pyx_tuple__244); Py_VISIT(traverse_module_state->__pyx_tuple__245); + Py_VISIT(traverse_module_state->__pyx_tuple__247); Py_VISIT(traverse_module_state->__pyx_tuple__248); - Py_VISIT(traverse_module_state->__pyx_tuple__249); Py_VISIT(traverse_module_state->__pyx_tuple__251); - Py_VISIT(traverse_module_state->__pyx_tuple__253); + Py_VISIT(traverse_module_state->__pyx_tuple__252); Py_VISIT(traverse_module_state->__pyx_tuple__254); - Py_VISIT(traverse_module_state->__pyx_tuple__258); - Py_VISIT(traverse_module_state->__pyx_tuple__260); - Py_VISIT(traverse_module_state->__pyx_tuple__262); - Py_VISIT(traverse_module_state->__pyx_tuple__264); - Py_VISIT(traverse_module_state->__pyx_tuple__266); - Py_VISIT(traverse_module_state->__pyx_tuple__268); - Py_VISIT(traverse_module_state->__pyx_tuple__270); + Py_VISIT(traverse_module_state->__pyx_tuple__256); + Py_VISIT(traverse_module_state->__pyx_tuple__257); + Py_VISIT(traverse_module_state->__pyx_tuple__261); + Py_VISIT(traverse_module_state->__pyx_tuple__263); + Py_VISIT(traverse_module_state->__pyx_tuple__265); + Py_VISIT(traverse_module_state->__pyx_tuple__267); + Py_VISIT(traverse_module_state->__pyx_tuple__269); Py_VISIT(traverse_module_state->__pyx_tuple__271); Py_VISIT(traverse_module_state->__pyx_tuple__273); Py_VISIT(traverse_module_state->__pyx_tuple__274); Py_VISIT(traverse_module_state->__pyx_tuple__276); - Py_VISIT(traverse_module_state->__pyx_tuple__278); - Py_VISIT(traverse_module_state->__pyx_tuple__280); + Py_VISIT(traverse_module_state->__pyx_tuple__277); + Py_VISIT(traverse_module_state->__pyx_tuple__279); + Py_VISIT(traverse_module_state->__pyx_tuple__281); Py_VISIT(traverse_module_state->__pyx_tuple__283); - Py_VISIT(traverse_module_state->__pyx_tuple__287); - Py_VISIT(traverse_module_state->__pyx_tuple__300); - Py_VISIT(traverse_module_state->__pyx_tuple__302); + Py_VISIT(traverse_module_state->__pyx_tuple__286); + Py_VISIT(traverse_module_state->__pyx_tuple__290); Py_VISIT(traverse_module_state->__pyx_tuple__303); - Py_VISIT(traverse_module_state->__pyx_codeobj__39); - Py_VISIT(traverse_module_state->__pyx_codeobj__41); + Py_VISIT(traverse_module_state->__pyx_tuple__305); + Py_VISIT(traverse_module_state->__pyx_tuple__306); Py_VISIT(traverse_module_state->__pyx_codeobj__42); - Py_VISIT(traverse_module_state->__pyx_codeobj__43); Py_VISIT(traverse_module_state->__pyx_codeobj__44); Py_VISIT(traverse_module_state->__pyx_codeobj__45); Py_VISIT(traverse_module_state->__pyx_codeobj__46); Py_VISIT(traverse_module_state->__pyx_codeobj__47); + Py_VISIT(traverse_module_state->__pyx_codeobj__48); Py_VISIT(traverse_module_state->__pyx_codeobj__49); - Py_VISIT(traverse_module_state->__pyx_codeobj__51); + Py_VISIT(traverse_module_state->__pyx_codeobj__50); Py_VISIT(traverse_module_state->__pyx_codeobj__52); - Py_VISIT(traverse_module_state->__pyx_codeobj__53); + Py_VISIT(traverse_module_state->__pyx_codeobj__54); Py_VISIT(traverse_module_state->__pyx_codeobj__55); Py_VISIT(traverse_module_state->__pyx_codeobj__56); - Py_VISIT(traverse_module_state->__pyx_codeobj__57); Py_VISIT(traverse_module_state->__pyx_codeobj__58); Py_VISIT(traverse_module_state->__pyx_codeobj__59); + Py_VISIT(traverse_module_state->__pyx_codeobj__60); Py_VISIT(traverse_module_state->__pyx_codeobj__61); - Py_VISIT(traverse_module_state->__pyx_codeobj__63); + Py_VISIT(traverse_module_state->__pyx_codeobj__62); Py_VISIT(traverse_module_state->__pyx_codeobj__64); Py_VISIT(traverse_module_state->__pyx_codeobj__66); Py_VISIT(traverse_module_state->__pyx_codeobj__67); - Py_VISIT(traverse_module_state->__pyx_codeobj__68); + Py_VISIT(traverse_module_state->__pyx_codeobj__69); Py_VISIT(traverse_module_state->__pyx_codeobj__70); Py_VISIT(traverse_module_state->__pyx_codeobj__71); - Py_VISIT(traverse_module_state->__pyx_codeobj__72); - Py_VISIT(traverse_module_state->__pyx_codeobj__74); + Py_VISIT(traverse_module_state->__pyx_codeobj__73); + Py_VISIT(traverse_module_state->__pyx_codeobj__75); Py_VISIT(traverse_module_state->__pyx_codeobj__76); Py_VISIT(traverse_module_state->__pyx_codeobj__78); Py_VISIT(traverse_module_state->__pyx_codeobj__80); Py_VISIT(traverse_module_state->__pyx_codeobj__82); - Py_VISIT(traverse_module_state->__pyx_codeobj__85); - Py_VISIT(traverse_module_state->__pyx_codeobj__87); - Py_VISIT(traverse_module_state->__pyx_codeobj__89); - Py_VISIT(traverse_module_state->__pyx_codeobj__91); + Py_VISIT(traverse_module_state->__pyx_codeobj__84); + Py_VISIT(traverse_module_state->__pyx_codeobj__86); + Py_VISIT(traverse_module_state->__pyx_codeobj__88); + Py_VISIT(traverse_module_state->__pyx_codeobj__90); Py_VISIT(traverse_module_state->__pyx_codeobj__92); - Py_VISIT(traverse_module_state->__pyx_codeobj__93); Py_VISIT(traverse_module_state->__pyx_codeobj__94); Py_VISIT(traverse_module_state->__pyx_codeobj__95); Py_VISIT(traverse_module_state->__pyx_codeobj__96); Py_VISIT(traverse_module_state->__pyx_codeobj__97); + Py_VISIT(traverse_module_state->__pyx_codeobj__98); Py_VISIT(traverse_module_state->__pyx_codeobj__99); - Py_VISIT(traverse_module_state->__pyx_codeobj__101); + Py_VISIT(traverse_module_state->__pyx_codeobj__100); Py_VISIT(traverse_module_state->__pyx_codeobj__102); - Py_VISIT(traverse_module_state->__pyx_codeobj__103); Py_VISIT(traverse_module_state->__pyx_codeobj__104); Py_VISIT(traverse_module_state->__pyx_codeobj__105); Py_VISIT(traverse_module_state->__pyx_codeobj__106); Py_VISIT(traverse_module_state->__pyx_codeobj__107); Py_VISIT(traverse_module_state->__pyx_codeobj__108); Py_VISIT(traverse_module_state->__pyx_codeobj__109); + Py_VISIT(traverse_module_state->__pyx_codeobj__110); Py_VISIT(traverse_module_state->__pyx_codeobj__111); Py_VISIT(traverse_module_state->__pyx_codeobj__112); - Py_VISIT(traverse_module_state->__pyx_codeobj__113); + Py_VISIT(traverse_module_state->__pyx_codeobj__114); Py_VISIT(traverse_module_state->__pyx_codeobj__115); Py_VISIT(traverse_module_state->__pyx_codeobj__116); Py_VISIT(traverse_module_state->__pyx_codeobj__118); - Py_VISIT(traverse_module_state->__pyx_codeobj__120); + Py_VISIT(traverse_module_state->__pyx_codeobj__119); Py_VISIT(traverse_module_state->__pyx_codeobj__121); - Py_VISIT(traverse_module_state->__pyx_codeobj__122); Py_VISIT(traverse_module_state->__pyx_codeobj__123); Py_VISIT(traverse_module_state->__pyx_codeobj__124); Py_VISIT(traverse_module_state->__pyx_codeobj__125); Py_VISIT(traverse_module_state->__pyx_codeobj__126); + Py_VISIT(traverse_module_state->__pyx_codeobj__127); Py_VISIT(traverse_module_state->__pyx_codeobj__128); + Py_VISIT(traverse_module_state->__pyx_codeobj__129); Py_VISIT(traverse_module_state->__pyx_codeobj__131); - Py_VISIT(traverse_module_state->__pyx_codeobj__133); - Py_VISIT(traverse_module_state->__pyx_codeobj__135); + Py_VISIT(traverse_module_state->__pyx_codeobj__134); Py_VISIT(traverse_module_state->__pyx_codeobj__136); - Py_VISIT(traverse_module_state->__pyx_codeobj__137); Py_VISIT(traverse_module_state->__pyx_codeobj__138); Py_VISIT(traverse_module_state->__pyx_codeobj__139); Py_VISIT(traverse_module_state->__pyx_codeobj__140); Py_VISIT(traverse_module_state->__pyx_codeobj__141); + Py_VISIT(traverse_module_state->__pyx_codeobj__142); Py_VISIT(traverse_module_state->__pyx_codeobj__143); Py_VISIT(traverse_module_state->__pyx_codeobj__144); Py_VISIT(traverse_module_state->__pyx_codeobj__146); - Py_VISIT(traverse_module_state->__pyx_codeobj__148); + Py_VISIT(traverse_module_state->__pyx_codeobj__147); + Py_VISIT(traverse_module_state->__pyx_codeobj__149); Py_VISIT(traverse_module_state->__pyx_codeobj__151); Py_VISIT(traverse_module_state->__pyx_codeobj__154); - Py_VISIT(traverse_module_state->__pyx_codeobj__155); Py_VISIT(traverse_module_state->__pyx_codeobj__157); - Py_VISIT(traverse_module_state->__pyx_codeobj__159); + Py_VISIT(traverse_module_state->__pyx_codeobj__158); + Py_VISIT(traverse_module_state->__pyx_codeobj__160); Py_VISIT(traverse_module_state->__pyx_codeobj__162); - Py_VISIT(traverse_module_state->__pyx_codeobj__164); Py_VISIT(traverse_module_state->__pyx_codeobj__165); Py_VISIT(traverse_module_state->__pyx_codeobj__167); Py_VISIT(traverse_module_state->__pyx_codeobj__168); - Py_VISIT(traverse_module_state->__pyx_codeobj__169); Py_VISIT(traverse_module_state->__pyx_codeobj__170); Py_VISIT(traverse_module_state->__pyx_codeobj__171); + Py_VISIT(traverse_module_state->__pyx_codeobj__172); Py_VISIT(traverse_module_state->__pyx_codeobj__173); - Py_VISIT(traverse_module_state->__pyx_codeobj__175); - Py_VISIT(traverse_module_state->__pyx_codeobj__177); - Py_VISIT(traverse_module_state->__pyx_codeobj__179); + Py_VISIT(traverse_module_state->__pyx_codeobj__174); + Py_VISIT(traverse_module_state->__pyx_codeobj__176); + Py_VISIT(traverse_module_state->__pyx_codeobj__178); + Py_VISIT(traverse_module_state->__pyx_codeobj__180); Py_VISIT(traverse_module_state->__pyx_codeobj__182); - Py_VISIT(traverse_module_state->__pyx_codeobj__184); Py_VISIT(traverse_module_state->__pyx_codeobj__185); Py_VISIT(traverse_module_state->__pyx_codeobj__187); + Py_VISIT(traverse_module_state->__pyx_codeobj__188); Py_VISIT(traverse_module_state->__pyx_codeobj__190); - Py_VISIT(traverse_module_state->__pyx_codeobj__192); Py_VISIT(traverse_module_state->__pyx_codeobj__193); - Py_VISIT(traverse_module_state->__pyx_codeobj__194); + Py_VISIT(traverse_module_state->__pyx_codeobj__195); Py_VISIT(traverse_module_state->__pyx_codeobj__196); Py_VISIT(traverse_module_state->__pyx_codeobj__197); - Py_VISIT(traverse_module_state->__pyx_codeobj__198); + Py_VISIT(traverse_module_state->__pyx_codeobj__199); Py_VISIT(traverse_module_state->__pyx_codeobj__200); - Py_VISIT(traverse_module_state->__pyx_codeobj__202); + Py_VISIT(traverse_module_state->__pyx_codeobj__201); Py_VISIT(traverse_module_state->__pyx_codeobj__203); - Py_VISIT(traverse_module_state->__pyx_codeobj__204); Py_VISIT(traverse_module_state->__pyx_codeobj__205); Py_VISIT(traverse_module_state->__pyx_codeobj__206); Py_VISIT(traverse_module_state->__pyx_codeobj__207); @@ -8156,10 +8177,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_codeobj__209); Py_VISIT(traverse_module_state->__pyx_codeobj__210); Py_VISIT(traverse_module_state->__pyx_codeobj__211); + Py_VISIT(traverse_module_state->__pyx_codeobj__212); Py_VISIT(traverse_module_state->__pyx_codeobj__213); - Py_VISIT(traverse_module_state->__pyx_codeobj__215); + Py_VISIT(traverse_module_state->__pyx_codeobj__214); Py_VISIT(traverse_module_state->__pyx_codeobj__216); - Py_VISIT(traverse_module_state->__pyx_codeobj__217); Py_VISIT(traverse_module_state->__pyx_codeobj__218); Py_VISIT(traverse_module_state->__pyx_codeobj__219); Py_VISIT(traverse_module_state->__pyx_codeobj__220); @@ -8168,9 +8189,9 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_codeobj__223); Py_VISIT(traverse_module_state->__pyx_codeobj__224); Py_VISIT(traverse_module_state->__pyx_codeobj__225); + Py_VISIT(traverse_module_state->__pyx_codeobj__226); Py_VISIT(traverse_module_state->__pyx_codeobj__227); Py_VISIT(traverse_module_state->__pyx_codeobj__228); - Py_VISIT(traverse_module_state->__pyx_codeobj__229); Py_VISIT(traverse_module_state->__pyx_codeobj__230); Py_VISIT(traverse_module_state->__pyx_codeobj__231); Py_VISIT(traverse_module_state->__pyx_codeobj__232); @@ -8178,34 +8199,34 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_codeobj__234); Py_VISIT(traverse_module_state->__pyx_codeobj__235); Py_VISIT(traverse_module_state->__pyx_codeobj__236); + Py_VISIT(traverse_module_state->__pyx_codeobj__237); Py_VISIT(traverse_module_state->__pyx_codeobj__238); - Py_VISIT(traverse_module_state->__pyx_codeobj__240); + Py_VISIT(traverse_module_state->__pyx_codeobj__239); + Py_VISIT(traverse_module_state->__pyx_codeobj__241); Py_VISIT(traverse_module_state->__pyx_codeobj__243); Py_VISIT(traverse_module_state->__pyx_codeobj__246); - Py_VISIT(traverse_module_state->__pyx_codeobj__247); + Py_VISIT(traverse_module_state->__pyx_codeobj__249); Py_VISIT(traverse_module_state->__pyx_codeobj__250); - Py_VISIT(traverse_module_state->__pyx_codeobj__252); + Py_VISIT(traverse_module_state->__pyx_codeobj__253); Py_VISIT(traverse_module_state->__pyx_codeobj__255); - Py_VISIT(traverse_module_state->__pyx_codeobj__256); - Py_VISIT(traverse_module_state->__pyx_codeobj__257); + Py_VISIT(traverse_module_state->__pyx_codeobj__258); Py_VISIT(traverse_module_state->__pyx_codeobj__259); - Py_VISIT(traverse_module_state->__pyx_codeobj__261); - Py_VISIT(traverse_module_state->__pyx_codeobj__263); - Py_VISIT(traverse_module_state->__pyx_codeobj__265); - Py_VISIT(traverse_module_state->__pyx_codeobj__267); - Py_VISIT(traverse_module_state->__pyx_codeobj__269); + Py_VISIT(traverse_module_state->__pyx_codeobj__260); + Py_VISIT(traverse_module_state->__pyx_codeobj__262); + Py_VISIT(traverse_module_state->__pyx_codeobj__264); + Py_VISIT(traverse_module_state->__pyx_codeobj__266); + Py_VISIT(traverse_module_state->__pyx_codeobj__268); + Py_VISIT(traverse_module_state->__pyx_codeobj__270); Py_VISIT(traverse_module_state->__pyx_codeobj__272); Py_VISIT(traverse_module_state->__pyx_codeobj__275); - Py_VISIT(traverse_module_state->__pyx_codeobj__277); - Py_VISIT(traverse_module_state->__pyx_codeobj__279); - Py_VISIT(traverse_module_state->__pyx_codeobj__281); + Py_VISIT(traverse_module_state->__pyx_codeobj__278); + Py_VISIT(traverse_module_state->__pyx_codeobj__280); Py_VISIT(traverse_module_state->__pyx_codeobj__282); Py_VISIT(traverse_module_state->__pyx_codeobj__284); Py_VISIT(traverse_module_state->__pyx_codeobj__285); - Py_VISIT(traverse_module_state->__pyx_codeobj__286); + Py_VISIT(traverse_module_state->__pyx_codeobj__287); Py_VISIT(traverse_module_state->__pyx_codeobj__288); Py_VISIT(traverse_module_state->__pyx_codeobj__289); - Py_VISIT(traverse_module_state->__pyx_codeobj__290); Py_VISIT(traverse_module_state->__pyx_codeobj__291); Py_VISIT(traverse_module_state->__pyx_codeobj__292); Py_VISIT(traverse_module_state->__pyx_codeobj__293); @@ -8215,13 +8236,16 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_codeobj__297); Py_VISIT(traverse_module_state->__pyx_codeobj__298); Py_VISIT(traverse_module_state->__pyx_codeobj__299); + Py_VISIT(traverse_module_state->__pyx_codeobj__300); Py_VISIT(traverse_module_state->__pyx_codeobj__301); + Py_VISIT(traverse_module_state->__pyx_codeobj__302); Py_VISIT(traverse_module_state->__pyx_codeobj__304); - Py_VISIT(traverse_module_state->__pyx_codeobj__305); - Py_VISIT(traverse_module_state->__pyx_codeobj__306); Py_VISIT(traverse_module_state->__pyx_codeobj__307); Py_VISIT(traverse_module_state->__pyx_codeobj__308); Py_VISIT(traverse_module_state->__pyx_codeobj__309); + Py_VISIT(traverse_module_state->__pyx_codeobj__310); + Py_VISIT(traverse_module_state->__pyx_codeobj__311); + Py_VISIT(traverse_module_state->__pyx_codeobj__312); return 0; } #endif @@ -8275,10 +8299,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #if CYTHON_USE_MODULE_STATE #endif #if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE #define __pyx_type_10_pywrapfst_Weight __pyx_mstate_global->__pyx_type_10_pywrapfst_Weight #define __pyx_type_10_pywrapfst_SymbolTableView __pyx_mstate_global->__pyx_type_10_pywrapfst_SymbolTableView #define __pyx_type_10_pywrapfst__EncodeMapperSymbolTableView __pyx_mstate_global->__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView @@ -8353,6 +8373,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_Arc___setstate_cython __pyx_mstate_global->__pyx_n_s_Arc___setstate_cython #define __pyx_kp_u_Arc_at_0x __pyx_mstate_global->__pyx_kp_u_Arc_at_0x #define __pyx_n_s_Arc_copy __pyx_mstate_global->__pyx_n_s_Arc_copy +#define __pyx_kp_u_Argument_FST_did_not_satisfy_pre __pyx_mstate_global->__pyx_kp_u_Argument_FST_did_not_satisfy_pre #define __pyx_n_s_BINARY_PROPERTIES __pyx_mstate_global->__pyx_n_s_BINARY_PROPERTIES #define __pyx_n_s_COACCESSIBLE __pyx_mstate_global->__pyx_n_s_COACCESSIBLE #define __pyx_n_s_COPY_PROPERTIES __pyx_mstate_global->__pyx_n_s_COPY_PROPERTIES @@ -8650,9 +8671,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_u_Write_to_string_failed __pyx_mstate_global->__pyx_kp_u_Write_to_string_failed #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2 #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 -#define __pyx_n_s__310 __pyx_mstate_global->__pyx_n_s__310 -#define __pyx_n_s__37 __pyx_mstate_global->__pyx_n_s__37 -#define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5 +#define __pyx_n_s__313 __pyx_mstate_global->__pyx_n_s__313 +#define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4 +#define __pyx_n_s__40 __pyx_mstate_global->__pyx_n_s__40 +#define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a #define __pyx_n_s_acceptor __pyx_mstate_global->__pyx_n_s_acceptor #define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add @@ -8661,7 +8683,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_add_states __pyx_mstate_global->__pyx_n_s_add_states #define __pyx_n_s_add_symbol __pyx_mstate_global->__pyx_n_s_add_symbol #define __pyx_n_s_add_table __pyx_mstate_global->__pyx_n_s_add_table -#define __pyx_n_s_allow_negative_labels __pyx_mstate_global->__pyx_n_s_allow_negative_labels #define __pyx_n_s_allow_nondet __pyx_mstate_global->__pyx_n_s_allow_nondet #define __pyx_n_s_arc __pyx_mstate_global->__pyx_n_s_arc #define __pyx_n_s_arc_type __pyx_mstate_global->__pyx_n_s_arc_type @@ -8823,7 +8844,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_one __pyx_mstate_global->__pyx_n_s_one #define __pyx_n_s_opairs __pyx_mstate_global->__pyx_n_s_opairs #define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open -#define __pyx_n_s_opts __pyx_mstate_global->__pyx_n_s_opts #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os #define __pyx_n_s_osymbols __pyx_mstate_global->__pyx_n_s_osymbols #define __pyx_n_s_output_symbols __pyx_mstate_global->__pyx_n_s_output_symbols @@ -8896,6 +8916,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_s_self__weight_cannot_be_converted __pyx_mstate_global->__pyx_kp_s_self__weight_cannot_be_converted #define __pyx_kp_s_self__writer_cannot_be_converted __pyx_mstate_global->__pyx_kp_s_self__writer_cannot_be_converted #define __pyx_n_s_send __pyx_mstate_global->__pyx_n_s_send +#define __pyx_n_s_sep __pyx_mstate_global->__pyx_n_s_sep #define __pyx_n_s_set_final __pyx_mstate_global->__pyx_n_s_set_final #define __pyx_n_s_set_flags __pyx_mstate_global->__pyx_n_s_set_flags #define __pyx_n_s_set_input_symbols __pyx_mstate_global->__pyx_n_s_set_input_symbols @@ -8956,7 +8977,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_kp_u_typing_Literal_ilabel_olabel __pyx_mstate_global->__pyx_kp_u_typing_Literal_ilabel_olabel #define __pyx_kp_u_typing_Literal_input_output __pyx_mstate_global->__pyx_kp_u_typing_Literal_input_output #define __pyx_kp_u_typing_Literal_neither_input_out __pyx_mstate_global->__pyx_kp_u_typing_Literal_neither_input_out -#define __pyx_kp_u_typing_Literal_to_inital_to_fina __pyx_mstate_global->__pyx_kp_u_typing_Literal_to_inital_to_fina +#define __pyx_kp_u_typing_Literal_to_initial_to_fin __pyx_mstate_global->__pyx_kp_u_typing_Literal_to_initial_to_fin #define __pyx_kp_u_typing_Literal_uniform_log_prob __pyx_mstate_global->__pyx_kp_u_typing_Literal_uniform_log_prob #define __pyx_kp_u_typing_Union_Weight_typing_Union __pyx_mstate_global->__pyx_kp_u_typing_Union_Weight_typing_Union #define __pyx_n_u_uniform __pyx_mstate_global->__pyx_n_u_uniform @@ -8991,8 +9012,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5 #define __pyx_int_14 __pyx_mstate_global->__pyx_int_14 -#define __pyx_k__4 __pyx_mstate_global->__pyx_k__4 -#define __pyx_k__6 __pyx_mstate_global->__pyx_k__6 +#define __pyx_k__5 __pyx_mstate_global->__pyx_k__5 #define __pyx_k__7 __pyx_mstate_global->__pyx_k__7 #define __pyx_k__8 __pyx_mstate_global->__pyx_k__8 #define __pyx_k__9 __pyx_mstate_global->__pyx_k__9 @@ -9023,205 +9043,205 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_k__34 __pyx_mstate_global->__pyx_k__34 #define __pyx_k__35 __pyx_mstate_global->__pyx_k__35 #define __pyx_k__36 __pyx_mstate_global->__pyx_k__36 -#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38 -#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40 -#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48 -#define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50 -#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54 -#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60 -#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 +#define __pyx_k__37 __pyx_mstate_global->__pyx_k__37 +#define __pyx_k__38 __pyx_mstate_global->__pyx_k__38 +#define __pyx_k__39 __pyx_mstate_global->__pyx_k__39 +#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41 +#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43 +#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51 +#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53 +#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57 +#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63 #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65 -#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69 -#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73 -#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75 +#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 +#define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72 +#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77 #define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79 #define __pyx_tuple__81 __pyx_mstate_global->__pyx_tuple__81 #define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83 -#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84 -#define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86 -#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88 -#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90 -#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98 -#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100 -#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110 -#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114 +#define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85 +#define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87 +#define __pyx_tuple__89 __pyx_mstate_global->__pyx_tuple__89 +#define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91 +#define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93 +#define __pyx_tuple__101 __pyx_mstate_global->__pyx_tuple__101 +#define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103 +#define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113 #define __pyx_tuple__117 __pyx_mstate_global->__pyx_tuple__117 -#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119 -#define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127 -#define __pyx_tuple__129 __pyx_mstate_global->__pyx_tuple__129 +#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120 +#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122 #define __pyx_tuple__130 __pyx_mstate_global->__pyx_tuple__130 #define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132 -#define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134 -#define __pyx_tuple__142 __pyx_mstate_global->__pyx_tuple__142 +#define __pyx_tuple__133 __pyx_mstate_global->__pyx_tuple__133 +#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135 +#define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137 #define __pyx_tuple__145 __pyx_mstate_global->__pyx_tuple__145 -#define __pyx_tuple__147 __pyx_mstate_global->__pyx_tuple__147 -#define __pyx_tuple__149 __pyx_mstate_global->__pyx_tuple__149 +#define __pyx_tuple__148 __pyx_mstate_global->__pyx_tuple__148 #define __pyx_tuple__150 __pyx_mstate_global->__pyx_tuple__150 #define __pyx_tuple__152 __pyx_mstate_global->__pyx_tuple__152 #define __pyx_tuple__153 __pyx_mstate_global->__pyx_tuple__153 +#define __pyx_tuple__155 __pyx_mstate_global->__pyx_tuple__155 #define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156 -#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158 -#define __pyx_tuple__160 __pyx_mstate_global->__pyx_tuple__160 +#define __pyx_tuple__159 __pyx_mstate_global->__pyx_tuple__159 #define __pyx_tuple__161 __pyx_mstate_global->__pyx_tuple__161 #define __pyx_tuple__163 __pyx_mstate_global->__pyx_tuple__163 +#define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164 #define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166 -#define __pyx_tuple__172 __pyx_mstate_global->__pyx_tuple__172 -#define __pyx_tuple__174 __pyx_mstate_global->__pyx_tuple__174 -#define __pyx_tuple__176 __pyx_mstate_global->__pyx_tuple__176 -#define __pyx_tuple__178 __pyx_mstate_global->__pyx_tuple__178 -#define __pyx_tuple__180 __pyx_mstate_global->__pyx_tuple__180 +#define __pyx_tuple__169 __pyx_mstate_global->__pyx_tuple__169 +#define __pyx_tuple__175 __pyx_mstate_global->__pyx_tuple__175 +#define __pyx_tuple__177 __pyx_mstate_global->__pyx_tuple__177 +#define __pyx_tuple__179 __pyx_mstate_global->__pyx_tuple__179 #define __pyx_tuple__181 __pyx_mstate_global->__pyx_tuple__181 #define __pyx_tuple__183 __pyx_mstate_global->__pyx_tuple__183 +#define __pyx_tuple__184 __pyx_mstate_global->__pyx_tuple__184 #define __pyx_tuple__186 __pyx_mstate_global->__pyx_tuple__186 -#define __pyx_tuple__188 __pyx_mstate_global->__pyx_tuple__188 #define __pyx_tuple__189 __pyx_mstate_global->__pyx_tuple__189 #define __pyx_tuple__191 __pyx_mstate_global->__pyx_tuple__191 -#define __pyx_tuple__195 __pyx_mstate_global->__pyx_tuple__195 -#define __pyx_tuple__199 __pyx_mstate_global->__pyx_tuple__199 -#define __pyx_tuple__201 __pyx_mstate_global->__pyx_tuple__201 -#define __pyx_tuple__212 __pyx_mstate_global->__pyx_tuple__212 -#define __pyx_tuple__214 __pyx_mstate_global->__pyx_tuple__214 -#define __pyx_tuple__226 __pyx_mstate_global->__pyx_tuple__226 -#define __pyx_tuple__237 __pyx_mstate_global->__pyx_tuple__237 -#define __pyx_tuple__239 __pyx_mstate_global->__pyx_tuple__239 -#define __pyx_tuple__241 __pyx_mstate_global->__pyx_tuple__241 +#define __pyx_tuple__192 __pyx_mstate_global->__pyx_tuple__192 +#define __pyx_tuple__194 __pyx_mstate_global->__pyx_tuple__194 +#define __pyx_tuple__198 __pyx_mstate_global->__pyx_tuple__198 +#define __pyx_tuple__202 __pyx_mstate_global->__pyx_tuple__202 +#define __pyx_tuple__204 __pyx_mstate_global->__pyx_tuple__204 +#define __pyx_tuple__215 __pyx_mstate_global->__pyx_tuple__215 +#define __pyx_tuple__217 __pyx_mstate_global->__pyx_tuple__217 +#define __pyx_tuple__229 __pyx_mstate_global->__pyx_tuple__229 +#define __pyx_tuple__240 __pyx_mstate_global->__pyx_tuple__240 #define __pyx_tuple__242 __pyx_mstate_global->__pyx_tuple__242 #define __pyx_tuple__244 __pyx_mstate_global->__pyx_tuple__244 #define __pyx_tuple__245 __pyx_mstate_global->__pyx_tuple__245 +#define __pyx_tuple__247 __pyx_mstate_global->__pyx_tuple__247 #define __pyx_tuple__248 __pyx_mstate_global->__pyx_tuple__248 -#define __pyx_tuple__249 __pyx_mstate_global->__pyx_tuple__249 #define __pyx_tuple__251 __pyx_mstate_global->__pyx_tuple__251 -#define __pyx_tuple__253 __pyx_mstate_global->__pyx_tuple__253 +#define __pyx_tuple__252 __pyx_mstate_global->__pyx_tuple__252 #define __pyx_tuple__254 __pyx_mstate_global->__pyx_tuple__254 -#define __pyx_tuple__258 __pyx_mstate_global->__pyx_tuple__258 -#define __pyx_tuple__260 __pyx_mstate_global->__pyx_tuple__260 -#define __pyx_tuple__262 __pyx_mstate_global->__pyx_tuple__262 -#define __pyx_tuple__264 __pyx_mstate_global->__pyx_tuple__264 -#define __pyx_tuple__266 __pyx_mstate_global->__pyx_tuple__266 -#define __pyx_tuple__268 __pyx_mstate_global->__pyx_tuple__268 -#define __pyx_tuple__270 __pyx_mstate_global->__pyx_tuple__270 +#define __pyx_tuple__256 __pyx_mstate_global->__pyx_tuple__256 +#define __pyx_tuple__257 __pyx_mstate_global->__pyx_tuple__257 +#define __pyx_tuple__261 __pyx_mstate_global->__pyx_tuple__261 +#define __pyx_tuple__263 __pyx_mstate_global->__pyx_tuple__263 +#define __pyx_tuple__265 __pyx_mstate_global->__pyx_tuple__265 +#define __pyx_tuple__267 __pyx_mstate_global->__pyx_tuple__267 +#define __pyx_tuple__269 __pyx_mstate_global->__pyx_tuple__269 #define __pyx_tuple__271 __pyx_mstate_global->__pyx_tuple__271 #define __pyx_tuple__273 __pyx_mstate_global->__pyx_tuple__273 #define __pyx_tuple__274 __pyx_mstate_global->__pyx_tuple__274 #define __pyx_tuple__276 __pyx_mstate_global->__pyx_tuple__276 -#define __pyx_tuple__278 __pyx_mstate_global->__pyx_tuple__278 -#define __pyx_tuple__280 __pyx_mstate_global->__pyx_tuple__280 +#define __pyx_tuple__277 __pyx_mstate_global->__pyx_tuple__277 +#define __pyx_tuple__279 __pyx_mstate_global->__pyx_tuple__279 +#define __pyx_tuple__281 __pyx_mstate_global->__pyx_tuple__281 #define __pyx_tuple__283 __pyx_mstate_global->__pyx_tuple__283 -#define __pyx_tuple__287 __pyx_mstate_global->__pyx_tuple__287 -#define __pyx_tuple__300 __pyx_mstate_global->__pyx_tuple__300 -#define __pyx_tuple__302 __pyx_mstate_global->__pyx_tuple__302 +#define __pyx_tuple__286 __pyx_mstate_global->__pyx_tuple__286 +#define __pyx_tuple__290 __pyx_mstate_global->__pyx_tuple__290 #define __pyx_tuple__303 __pyx_mstate_global->__pyx_tuple__303 -#define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39 -#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41 +#define __pyx_tuple__305 __pyx_mstate_global->__pyx_tuple__305 +#define __pyx_tuple__306 __pyx_mstate_global->__pyx_tuple__306 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42 -#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 +#define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 -#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 +#define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 -#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53 +#define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55 #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 -#define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59 +#define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 -#define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 +#define __pyx_codeobj__62 __pyx_mstate_global->__pyx_codeobj__62 #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64 #define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66 #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 -#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68 +#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70 #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 -#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72 -#define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74 +#define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73 +#define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75 #define __pyx_codeobj__76 __pyx_mstate_global->__pyx_codeobj__76 #define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78 #define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 #define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82 -#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85 -#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 -#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 -#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91 +#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 +#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 +#define __pyx_codeobj__88 __pyx_mstate_global->__pyx_codeobj__88 +#define __pyx_codeobj__90 __pyx_mstate_global->__pyx_codeobj__90 #define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 -#define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93 #define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94 #define __pyx_codeobj__95 __pyx_mstate_global->__pyx_codeobj__95 #define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 #define __pyx_codeobj__97 __pyx_mstate_global->__pyx_codeobj__97 +#define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98 #define __pyx_codeobj__99 __pyx_mstate_global->__pyx_codeobj__99 -#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101 +#define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100 #define __pyx_codeobj__102 __pyx_mstate_global->__pyx_codeobj__102 -#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103 #define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104 #define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105 #define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106 #define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107 #define __pyx_codeobj__108 __pyx_mstate_global->__pyx_codeobj__108 #define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109 +#define __pyx_codeobj__110 __pyx_mstate_global->__pyx_codeobj__110 #define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111 #define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112 -#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113 +#define __pyx_codeobj__114 __pyx_mstate_global->__pyx_codeobj__114 #define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115 #define __pyx_codeobj__116 __pyx_mstate_global->__pyx_codeobj__116 #define __pyx_codeobj__118 __pyx_mstate_global->__pyx_codeobj__118 -#define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120 +#define __pyx_codeobj__119 __pyx_mstate_global->__pyx_codeobj__119 #define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121 -#define __pyx_codeobj__122 __pyx_mstate_global->__pyx_codeobj__122 #define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123 #define __pyx_codeobj__124 __pyx_mstate_global->__pyx_codeobj__124 #define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125 #define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126 +#define __pyx_codeobj__127 __pyx_mstate_global->__pyx_codeobj__127 #define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128 +#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129 #define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131 -#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133 -#define __pyx_codeobj__135 __pyx_mstate_global->__pyx_codeobj__135 +#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134 #define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136 -#define __pyx_codeobj__137 __pyx_mstate_global->__pyx_codeobj__137 #define __pyx_codeobj__138 __pyx_mstate_global->__pyx_codeobj__138 #define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139 #define __pyx_codeobj__140 __pyx_mstate_global->__pyx_codeobj__140 #define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141 +#define __pyx_codeobj__142 __pyx_mstate_global->__pyx_codeobj__142 #define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143 #define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144 #define __pyx_codeobj__146 __pyx_mstate_global->__pyx_codeobj__146 -#define __pyx_codeobj__148 __pyx_mstate_global->__pyx_codeobj__148 +#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147 +#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149 #define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151 #define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154 -#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155 #define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157 -#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159 +#define __pyx_codeobj__158 __pyx_mstate_global->__pyx_codeobj__158 +#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160 #define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162 -#define __pyx_codeobj__164 __pyx_mstate_global->__pyx_codeobj__164 #define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165 #define __pyx_codeobj__167 __pyx_mstate_global->__pyx_codeobj__167 #define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168 -#define __pyx_codeobj__169 __pyx_mstate_global->__pyx_codeobj__169 #define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170 #define __pyx_codeobj__171 __pyx_mstate_global->__pyx_codeobj__171 +#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172 #define __pyx_codeobj__173 __pyx_mstate_global->__pyx_codeobj__173 -#define __pyx_codeobj__175 __pyx_mstate_global->__pyx_codeobj__175 -#define __pyx_codeobj__177 __pyx_mstate_global->__pyx_codeobj__177 -#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179 +#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174 +#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176 +#define __pyx_codeobj__178 __pyx_mstate_global->__pyx_codeobj__178 +#define __pyx_codeobj__180 __pyx_mstate_global->__pyx_codeobj__180 #define __pyx_codeobj__182 __pyx_mstate_global->__pyx_codeobj__182 -#define __pyx_codeobj__184 __pyx_mstate_global->__pyx_codeobj__184 #define __pyx_codeobj__185 __pyx_mstate_global->__pyx_codeobj__185 #define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187 +#define __pyx_codeobj__188 __pyx_mstate_global->__pyx_codeobj__188 #define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190 -#define __pyx_codeobj__192 __pyx_mstate_global->__pyx_codeobj__192 #define __pyx_codeobj__193 __pyx_mstate_global->__pyx_codeobj__193 -#define __pyx_codeobj__194 __pyx_mstate_global->__pyx_codeobj__194 +#define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195 #define __pyx_codeobj__196 __pyx_mstate_global->__pyx_codeobj__196 #define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197 -#define __pyx_codeobj__198 __pyx_mstate_global->__pyx_codeobj__198 +#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199 #define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200 -#define __pyx_codeobj__202 __pyx_mstate_global->__pyx_codeobj__202 +#define __pyx_codeobj__201 __pyx_mstate_global->__pyx_codeobj__201 #define __pyx_codeobj__203 __pyx_mstate_global->__pyx_codeobj__203 -#define __pyx_codeobj__204 __pyx_mstate_global->__pyx_codeobj__204 #define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205 #define __pyx_codeobj__206 __pyx_mstate_global->__pyx_codeobj__206 #define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207 @@ -9229,10 +9249,10 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209 #define __pyx_codeobj__210 __pyx_mstate_global->__pyx_codeobj__210 #define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211 +#define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212 #define __pyx_codeobj__213 __pyx_mstate_global->__pyx_codeobj__213 -#define __pyx_codeobj__215 __pyx_mstate_global->__pyx_codeobj__215 +#define __pyx_codeobj__214 __pyx_mstate_global->__pyx_codeobj__214 #define __pyx_codeobj__216 __pyx_mstate_global->__pyx_codeobj__216 -#define __pyx_codeobj__217 __pyx_mstate_global->__pyx_codeobj__217 #define __pyx_codeobj__218 __pyx_mstate_global->__pyx_codeobj__218 #define __pyx_codeobj__219 __pyx_mstate_global->__pyx_codeobj__219 #define __pyx_codeobj__220 __pyx_mstate_global->__pyx_codeobj__220 @@ -9241,9 +9261,9 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__223 __pyx_mstate_global->__pyx_codeobj__223 #define __pyx_codeobj__224 __pyx_mstate_global->__pyx_codeobj__224 #define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225 +#define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226 #define __pyx_codeobj__227 __pyx_mstate_global->__pyx_codeobj__227 #define __pyx_codeobj__228 __pyx_mstate_global->__pyx_codeobj__228 -#define __pyx_codeobj__229 __pyx_mstate_global->__pyx_codeobj__229 #define __pyx_codeobj__230 __pyx_mstate_global->__pyx_codeobj__230 #define __pyx_codeobj__231 __pyx_mstate_global->__pyx_codeobj__231 #define __pyx_codeobj__232 __pyx_mstate_global->__pyx_codeobj__232 @@ -9251,34 +9271,34 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__234 __pyx_mstate_global->__pyx_codeobj__234 #define __pyx_codeobj__235 __pyx_mstate_global->__pyx_codeobj__235 #define __pyx_codeobj__236 __pyx_mstate_global->__pyx_codeobj__236 +#define __pyx_codeobj__237 __pyx_mstate_global->__pyx_codeobj__237 #define __pyx_codeobj__238 __pyx_mstate_global->__pyx_codeobj__238 -#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240 +#define __pyx_codeobj__239 __pyx_mstate_global->__pyx_codeobj__239 +#define __pyx_codeobj__241 __pyx_mstate_global->__pyx_codeobj__241 #define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243 #define __pyx_codeobj__246 __pyx_mstate_global->__pyx_codeobj__246 -#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247 +#define __pyx_codeobj__249 __pyx_mstate_global->__pyx_codeobj__249 #define __pyx_codeobj__250 __pyx_mstate_global->__pyx_codeobj__250 -#define __pyx_codeobj__252 __pyx_mstate_global->__pyx_codeobj__252 +#define __pyx_codeobj__253 __pyx_mstate_global->__pyx_codeobj__253 #define __pyx_codeobj__255 __pyx_mstate_global->__pyx_codeobj__255 -#define __pyx_codeobj__256 __pyx_mstate_global->__pyx_codeobj__256 -#define __pyx_codeobj__257 __pyx_mstate_global->__pyx_codeobj__257 +#define __pyx_codeobj__258 __pyx_mstate_global->__pyx_codeobj__258 #define __pyx_codeobj__259 __pyx_mstate_global->__pyx_codeobj__259 -#define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261 -#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263 -#define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265 -#define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267 -#define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269 +#define __pyx_codeobj__260 __pyx_mstate_global->__pyx_codeobj__260 +#define __pyx_codeobj__262 __pyx_mstate_global->__pyx_codeobj__262 +#define __pyx_codeobj__264 __pyx_mstate_global->__pyx_codeobj__264 +#define __pyx_codeobj__266 __pyx_mstate_global->__pyx_codeobj__266 +#define __pyx_codeobj__268 __pyx_mstate_global->__pyx_codeobj__268 +#define __pyx_codeobj__270 __pyx_mstate_global->__pyx_codeobj__270 #define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272 #define __pyx_codeobj__275 __pyx_mstate_global->__pyx_codeobj__275 -#define __pyx_codeobj__277 __pyx_mstate_global->__pyx_codeobj__277 -#define __pyx_codeobj__279 __pyx_mstate_global->__pyx_codeobj__279 -#define __pyx_codeobj__281 __pyx_mstate_global->__pyx_codeobj__281 +#define __pyx_codeobj__278 __pyx_mstate_global->__pyx_codeobj__278 +#define __pyx_codeobj__280 __pyx_mstate_global->__pyx_codeobj__280 #define __pyx_codeobj__282 __pyx_mstate_global->__pyx_codeobj__282 #define __pyx_codeobj__284 __pyx_mstate_global->__pyx_codeobj__284 #define __pyx_codeobj__285 __pyx_mstate_global->__pyx_codeobj__285 -#define __pyx_codeobj__286 __pyx_mstate_global->__pyx_codeobj__286 +#define __pyx_codeobj__287 __pyx_mstate_global->__pyx_codeobj__287 #define __pyx_codeobj__288 __pyx_mstate_global->__pyx_codeobj__288 #define __pyx_codeobj__289 __pyx_mstate_global->__pyx_codeobj__289 -#define __pyx_codeobj__290 __pyx_mstate_global->__pyx_codeobj__290 #define __pyx_codeobj__291 __pyx_mstate_global->__pyx_codeobj__291 #define __pyx_codeobj__292 __pyx_mstate_global->__pyx_codeobj__292 #define __pyx_codeobj__293 __pyx_mstate_global->__pyx_codeobj__293 @@ -9288,13 +9308,16 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_codeobj__297 __pyx_mstate_global->__pyx_codeobj__297 #define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298 #define __pyx_codeobj__299 __pyx_mstate_global->__pyx_codeobj__299 +#define __pyx_codeobj__300 __pyx_mstate_global->__pyx_codeobj__300 #define __pyx_codeobj__301 __pyx_mstate_global->__pyx_codeobj__301 +#define __pyx_codeobj__302 __pyx_mstate_global->__pyx_codeobj__302 #define __pyx_codeobj__304 __pyx_mstate_global->__pyx_codeobj__304 -#define __pyx_codeobj__305 __pyx_mstate_global->__pyx_codeobj__305 -#define __pyx_codeobj__306 __pyx_mstate_global->__pyx_codeobj__306 #define __pyx_codeobj__307 __pyx_mstate_global->__pyx_codeobj__307 #define __pyx_codeobj__308 __pyx_mstate_global->__pyx_codeobj__308 #define __pyx_codeobj__309 __pyx_mstate_global->__pyx_codeobj__309 +#define __pyx_codeobj__310 __pyx_mstate_global->__pyx_codeobj__310 +#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311 +#define __pyx_codeobj__312 __pyx_mstate_global->__pyx_codeobj__312 /* #### Code section: module_code ### */ /* "string.from_py":13 @@ -9887,7 +9910,7 @@ static std::vector __pyx_convert_vector_from_py_std_3a__3a_string( return __pyx_r; } -/* "_pywrapfst.pyx":179 +/* "_pywrapfst.pyx":174 * * * cdef string tostring(data) except *: # <<<<<<<<<<<<<< @@ -9910,7 +9933,7 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tostring", 1); - /* "_pywrapfst.pyx":198 + /* "_pywrapfst.pyx":193 * """ * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): # <<<<<<<<<<<<<< @@ -9920,18 +9943,18 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { __pyx_t_1 = PyUnicode_Check(__pyx_v_data); if (__pyx_t_1) { - /* "_pywrapfst.pyx":199 + /* "_pywrapfst.pyx":194 * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): * return data # <<<<<<<<<<<<<< * raise TypeError(f"Expected {str.__name__} but received " * f"{type(data).__name__}: {data!r}") */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_pywrapfst.pyx":198 + /* "_pywrapfst.pyx":193 * """ * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): # <<<<<<<<<<<<<< @@ -9940,14 +9963,14 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { */ } - /* "_pywrapfst.pyx":200 + /* "_pywrapfst.pyx":195 * if isinstance(data, str): * return data * raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<< * f"{type(data).__name__}: {data!r}") * */ - __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = 127; @@ -9955,9 +9978,9 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { __pyx_t_4 += 9; __Pyx_GIVEREF(__pyx_kp_u_Expected); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Expected); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; @@ -9970,16 +9993,16 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { __Pyx_GIVEREF(__pyx_kp_u_but_received); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_but_received); - /* "_pywrapfst.pyx":201 + /* "_pywrapfst.pyx":196 * return data * raise TypeError(f"Expected {str.__name__} but received " * f"{type(data).__name__}: {data!r}") # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; @@ -9991,7 +10014,7 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { __pyx_t_4 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); @@ -9999,24 +10022,24 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_6); __pyx_t_6 = 0; - /* "_pywrapfst.pyx":200 + /* "_pywrapfst.pyx":195 * if isinstance(data, str): * return data * raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<< * f"{type(data).__name__}: {data!r}") * */ - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 200, __pyx_L1_error) + __PYX_ERR(0, 195, __pyx_L1_error) - /* "_pywrapfst.pyx":179 + /* "_pywrapfst.pyx":174 * * * cdef string tostring(data) except *: # <<<<<<<<<<<<<< @@ -10036,7 +10059,7 @@ static std::string __pyx_f_10_pywrapfst_tostring(PyObject *__pyx_v_data) { return __pyx_r; } -/* "_pywrapfst.pyx":204 +/* "_pywrapfst.pyx":199 * * * cdef string weight_tostring(data) except *: # <<<<<<<<<<<<<< @@ -10059,7 +10082,7 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) int __pyx_clineno = 0; __Pyx_RefNannySetupContext("weight_tostring", 1); - /* "_pywrapfst.pyx":226 + /* "_pywrapfst.pyx":221 * """ * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): # <<<<<<<<<<<<<< @@ -10069,18 +10092,18 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) __pyx_t_1 = PyUnicode_Check(__pyx_v_data); if (__pyx_t_1) { - /* "_pywrapfst.pyx":227 + /* "_pywrapfst.pyx":222 * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): * return data # <<<<<<<<<<<<<< * elif isinstance(data, numbers.Number): * return str(data) */ - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 222, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_pywrapfst.pyx":226 + /* "_pywrapfst.pyx":221 * """ * # A Python string can be implicitly cast to a C++ string. * if isinstance(data, str): # <<<<<<<<<<<<<< @@ -10089,37 +10112,37 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) */ } - /* "_pywrapfst.pyx":228 + /* "_pywrapfst.pyx":223 * if isinstance(data, str): * return data * elif isinstance(data, numbers.Number): # <<<<<<<<<<<<<< * return str(data) * raise TypeError(f"Expected {str.__name__} but received " */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_data, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "_pywrapfst.pyx":229 + /* "_pywrapfst.pyx":224 * return data * elif isinstance(data, numbers.Number): * return str(data) # <<<<<<<<<<<<<< * raise TypeError(f"Expected {str.__name__} but received " * f"{type(data).__name__}: {data!r}") */ - __pyx_t_4 = __Pyx_PyObject_Str(__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Str(__pyx_v_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_pywrapfst.pyx":228 + /* "_pywrapfst.pyx":223 * if isinstance(data, str): * return data * elif isinstance(data, numbers.Number): # <<<<<<<<<<<<<< @@ -10128,14 +10151,14 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) */ } - /* "_pywrapfst.pyx":230 + /* "_pywrapfst.pyx":225 * elif isinstance(data, numbers.Number): * return str(data) * raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<< * f"{type(data).__name__}: {data!r}") * */ - __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -10143,9 +10166,9 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) __pyx_t_5 += 9; __Pyx_GIVEREF(__pyx_kp_u_Expected); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Expected); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyUnicode_Type)), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; @@ -10158,16 +10181,16 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) __Pyx_GIVEREF(__pyx_kp_u_but_received); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_but_received); - /* "_pywrapfst.pyx":231 + /* "_pywrapfst.pyx":226 * return str(data) * raise TypeError(f"Expected {str.__name__} but received " * f"{type(data).__name__}: {data!r}") # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6; @@ -10179,7 +10202,7 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) __pyx_t_5 += 2; __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u_); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_data), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -10187,24 +10210,24 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":230 + /* "_pywrapfst.pyx":225 * elif isinstance(data, numbers.Number): * return str(data) * raise TypeError(f"Expected {str.__name__} but received " # <<<<<<<<<<<<<< * f"{type(data).__name__}: {data!r}") * */ - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 6, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __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, 230, __pyx_L1_error) + __PYX_ERR(0, 225, __pyx_L1_error) - /* "_pywrapfst.pyx":204 + /* "_pywrapfst.pyx":199 * * * cdef string weight_tostring(data) except *: # <<<<<<<<<<<<<< @@ -10224,7 +10247,7 @@ static std::string __pyx_f_10_pywrapfst_weight_tostring(PyObject *__pyx_v_data) return __pyx_r; } -/* "_pywrapfst.pyx":234 +/* "_pywrapfst.pyx":229 * * * cdef string path_tostring(data) except *: # <<<<<<<<<<<<<< @@ -10245,16 +10268,16 @@ static std::string __pyx_f_10_pywrapfst_path_tostring(PyObject *__pyx_v_data) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("path_tostring", 1); - /* "_pywrapfst.pyx":235 + /* "_pywrapfst.pyx":230 * * cdef string path_tostring(data) except *: * return tostring(os.fspath(data)) # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fspath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -10275,16 +10298,16 @@ static std::string __pyx_f_10_pywrapfst_path_tostring(PyObject *__pyx_v_data) { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_data}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_pywrapfst.pyx":234 + /* "_pywrapfst.pyx":229 * * * cdef string path_tostring(data) except *: # <<<<<<<<<<<<<< @@ -10304,7 +10327,7 @@ static std::string __pyx_f_10_pywrapfst_path_tostring(PyObject *__pyx_v_data) { return __pyx_r; } -/* "_pywrapfst.pyx":238 +/* "_pywrapfst.pyx":233 * * * cdef fst.FarType _get_far_type(const string &far_type) except *: # <<<<<<<<<<<<<< @@ -10327,7 +10350,7 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_far_type", 1); - /* "_pywrapfst.pyx":254 + /* "_pywrapfst.pyx":249 * """ * cdef fst.FarType _far_type * if not fst.GetFarType(far_type, addr(_far_type)): # <<<<<<<<<<<<<< @@ -10337,21 +10360,21 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ __pyx_t_1 = (!(fst::script::GetFarType(__pyx_v_far_type, (&__pyx_v__far_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":255 + /* "_pywrapfst.pyx":250 * cdef fst.FarType _far_type * if not fst.GetFarType(far_type, addr(_far_type)): * raise FstArgError(f"Unknown FAR type: {far_type!r}") # <<<<<<<<<<<<<< * return _far_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_far_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_far_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_FAR_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_FAR_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10373,15 +10396,15 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __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, 255, __pyx_L1_error) + __PYX_ERR(0, 250, __pyx_L1_error) - /* "_pywrapfst.pyx":254 + /* "_pywrapfst.pyx":249 * """ * cdef fst.FarType _far_type * if not fst.GetFarType(far_type, addr(_far_type)): # <<<<<<<<<<<<<< @@ -10390,7 +10413,7 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ */ } - /* "_pywrapfst.pyx":256 + /* "_pywrapfst.pyx":251 * if not fst.GetFarType(far_type, addr(_far_type)): * raise FstArgError(f"Unknown FAR type: {far_type!r}") * return _far_type # <<<<<<<<<<<<<< @@ -10400,7 +10423,7 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ __pyx_r = __pyx_v__far_type; goto __pyx_L0; - /* "_pywrapfst.pyx":238 + /* "_pywrapfst.pyx":233 * * * cdef fst.FarType _get_far_type(const string &far_type) except *: # <<<<<<<<<<<<<< @@ -10421,7 +10444,7 @@ static fst::FarType __pyx_f_10_pywrapfst__get_far_type(std::string const &__pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":258 +/* "_pywrapfst.pyx":253 * return _far_type * * cdef fst.ClosureType _get_closure_type(const string &closure_type) except *: # <<<<<<<<<<<<<< @@ -10444,7 +10467,7 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_closure_type", 1); - /* "_pywrapfst.pyx":274 + /* "_pywrapfst.pyx":269 * """ * cdef fst.ClosureType _closure_type * if not fst.GetClosureType(closure_type, addr(_closure_type)): # <<<<<<<<<<<<<< @@ -10454,21 +10477,21 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string __pyx_t_1 = (!(fst::script::GetClosureType(__pyx_v_closure_type, (&__pyx_v__closure_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":275 + /* "_pywrapfst.pyx":270 * cdef fst.ClosureType _closure_type * if not fst.GetClosureType(closure_type, addr(_closure_type)): * raise FstArgError(f"Unknown projection type: {closure_type!r}") # <<<<<<<<<<<<<< * return _closure_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_closure_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_closure_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10490,15 +10513,15 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __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, 275, __pyx_L1_error) + __PYX_ERR(0, 270, __pyx_L1_error) - /* "_pywrapfst.pyx":274 + /* "_pywrapfst.pyx":269 * """ * cdef fst.ClosureType _closure_type * if not fst.GetClosureType(closure_type, addr(_closure_type)): # <<<<<<<<<<<<<< @@ -10507,7 +10530,7 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string */ } - /* "_pywrapfst.pyx":276 + /* "_pywrapfst.pyx":271 * if not fst.GetClosureType(closure_type, addr(_closure_type)): * raise FstArgError(f"Unknown projection type: {closure_type!r}") * return _closure_type # <<<<<<<<<<<<<< @@ -10517,7 +10540,7 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string __pyx_r = __pyx_v__closure_type; goto __pyx_L0; - /* "_pywrapfst.pyx":258 + /* "_pywrapfst.pyx":253 * return _far_type * * cdef fst.ClosureType _get_closure_type(const string &closure_type) except *: # <<<<<<<<<<<<<< @@ -10538,7 +10561,7 @@ static enum fst::ClosureType __pyx_f_10_pywrapfst__get_closure_type(std::string return __pyx_r; } -/* "_pywrapfst.pyx":278 +/* "_pywrapfst.pyx":273 * return _closure_type * * cdef fst.ComposeFilter _get_compose_filter( # <<<<<<<<<<<<<< @@ -10561,7 +10584,7 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_compose_filter", 1); - /* "_pywrapfst.pyx":300 + /* "_pywrapfst.pyx":295 * """ * cdef fst.ComposeFilter _compose_filter * if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<< @@ -10571,21 +10594,21 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str __pyx_t_1 = (!(fst::script::GetComposeFilter(__pyx_v_compose_filter, (&__pyx_v__compose_filter)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":301 + /* "_pywrapfst.pyx":296 * cdef fst.ComposeFilter _compose_filter * if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): * raise FstArgError(f"Unknown compose filter type: {compose_filter!r}") # <<<<<<<<<<<<<< * return _compose_filter * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_compose_filter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_compose_filter_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_compose_filter_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10607,15 +10630,15 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __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, 301, __pyx_L1_error) + __PYX_ERR(0, 296, __pyx_L1_error) - /* "_pywrapfst.pyx":300 + /* "_pywrapfst.pyx":295 * """ * cdef fst.ComposeFilter _compose_filter * if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): # <<<<<<<<<<<<<< @@ -10624,7 +10647,7 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str */ } - /* "_pywrapfst.pyx":302 + /* "_pywrapfst.pyx":297 * if not fst.GetComposeFilter(compose_filter, addr(_compose_filter)): * raise FstArgError(f"Unknown compose filter type: {compose_filter!r}") * return _compose_filter # <<<<<<<<<<<<<< @@ -10634,7 +10657,7 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str __pyx_r = __pyx_v__compose_filter; goto __pyx_L0; - /* "_pywrapfst.pyx":278 + /* "_pywrapfst.pyx":273 * return _closure_type * * cdef fst.ComposeFilter _get_compose_filter( # <<<<<<<<<<<<<< @@ -10655,7 +10678,7 @@ static enum fst::ComposeFilter __pyx_f_10_pywrapfst__get_compose_filter(std::str return __pyx_r; } -/* "_pywrapfst.pyx":305 +/* "_pywrapfst.pyx":300 * * * cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<< @@ -10678,7 +10701,7 @@ static enum fst::DeterminizeType __pyx_f_10_pywrapfst__get_determinize_type(std: int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_determinize_type", 1); - /* "_pywrapfst.pyx":321 + /* "_pywrapfst.pyx":316 * """ * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(det_type, addr(_det_type)): # <<<<<<<<<<<<<< @@ -10688,21 +10711,21 @@ static enum fst::DeterminizeType __pyx_f_10_pywrapfst__get_determinize_type(std: __pyx_t_1 = (!(fst::script::GetDeterminizeType(__pyx_v_det_type, (&__pyx_v__det_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":322 + /* "_pywrapfst.pyx":317 * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(det_type, addr(_det_type)): * raise FstArgError(f"Unknown determinization type: {det_type!r}") # <<<<<<<<<<<<<< * return _det_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_det_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10724,15 +10747,15 @@ static enum fst::DeterminizeType __pyx_f_10_pywrapfst__get_determinize_type(std: __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __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, 322, __pyx_L1_error) + __PYX_ERR(0, 317, __pyx_L1_error) - /* "_pywrapfst.pyx":321 + /* "_pywrapfst.pyx":316 * """ * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(det_type, addr(_det_type)): # <<<<<<<<<<<<<< @@ -10741,17 +10764,17 @@ static enum fst::DeterminizeType __pyx_f_10_pywrapfst__get_determinize_type(std: */ } - /* "_pywrapfst.pyx":323 + /* "_pywrapfst.pyx":318 * if not fst.GetDeterminizeType(det_type, addr(_det_type)): * raise FstArgError(f"Unknown determinization type: {det_type!r}") * return _det_type # <<<<<<<<<<<<<< * - * cdef fst.EpsNormalizeType _get_eps_norm_type(const string &eps_norm_type) except *: + * cdef fst.EpsNormalizeType _get_eps_norm_type( */ __pyx_r = __pyx_v__det_type; goto __pyx_L0; - /* "_pywrapfst.pyx":305 + /* "_pywrapfst.pyx":300 * * * cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: # <<<<<<<<<<<<<< @@ -10772,12 +10795,12 @@ static enum fst::DeterminizeType __pyx_f_10_pywrapfst__get_determinize_type(std: return __pyx_r; } -/* "_pywrapfst.pyx":325 +/* "_pywrapfst.pyx":320 * return _det_type * - * cdef fst.EpsNormalizeType _get_eps_norm_type(const string &eps_norm_type) except *: # <<<<<<<<<<<<<< + * cdef fst.EpsNormalizeType _get_eps_norm_type( # <<<<<<<<<<<<<< + * const string &eps_norm_type) except *: * """Matches string with the appropriate EpsNormalizeType enum value. - * */ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::string const &__pyx_v_eps_norm_type) { @@ -10795,7 +10818,7 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_eps_norm_type", 1); - /* "_pywrapfst.pyx":341 + /* "_pywrapfst.pyx":337 * """ * cdef fst.EpsNormalizeType _eps_norm_type * if not fst.GetEpsNormalizeType(eps_norm_type, addr(_eps_norm_type)): # <<<<<<<<<<<<<< @@ -10805,21 +10828,21 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s __pyx_t_1 = (!(fst::script::GetEpsNormalizeType(__pyx_v_eps_norm_type, (&__pyx_v__eps_norm_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":342 + /* "_pywrapfst.pyx":338 * cdef fst.EpsNormalizeType _eps_norm_type * if not fst.GetEpsNormalizeType(eps_norm_type, addr(_eps_norm_type)): * raise FstArgError(f"Unknown epsilon normalization type: {eps_norm_type!r}") # <<<<<<<<<<<<<< * return _eps_norm_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_eps_norm_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_eps_norm_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_epsilon_normalization_ty, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_epsilon_normalization_ty, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10841,15 +10864,15 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __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, 342, __pyx_L1_error) + __PYX_ERR(0, 338, __pyx_L1_error) - /* "_pywrapfst.pyx":341 + /* "_pywrapfst.pyx":337 * """ * cdef fst.EpsNormalizeType _eps_norm_type * if not fst.GetEpsNormalizeType(eps_norm_type, addr(_eps_norm_type)): # <<<<<<<<<<<<<< @@ -10858,7 +10881,7 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s */ } - /* "_pywrapfst.pyx":343 + /* "_pywrapfst.pyx":339 * if not fst.GetEpsNormalizeType(eps_norm_type, addr(_eps_norm_type)): * raise FstArgError(f"Unknown epsilon normalization type: {eps_norm_type!r}") * return _eps_norm_type # <<<<<<<<<<<<<< @@ -10868,12 +10891,12 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s __pyx_r = __pyx_v__eps_norm_type; goto __pyx_L0; - /* "_pywrapfst.pyx":325 + /* "_pywrapfst.pyx":320 * return _det_type * - * cdef fst.EpsNormalizeType _get_eps_norm_type(const string &eps_norm_type) except *: # <<<<<<<<<<<<<< + * cdef fst.EpsNormalizeType _get_eps_norm_type( # <<<<<<<<<<<<<< + * const string &eps_norm_type) except *: * """Matches string with the appropriate EpsNormalizeType enum value. - * */ /* function exit code */ @@ -10889,7 +10912,7 @@ static enum fst::EpsNormalizeType __pyx_f_10_pywrapfst__get_eps_norm_type(std::s return __pyx_r; } -/* "_pywrapfst.pyx":346 +/* "_pywrapfst.pyx":342 * * * cdef fst.ProjectType _get_project_type(const string &project_type) except *: # <<<<<<<<<<<<<< @@ -10912,7 +10935,7 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_project_type", 1); - /* "_pywrapfst.pyx":362 + /* "_pywrapfst.pyx":358 * """ * cdef fst.ProjectType _project_type * if not fst.GetProjectType(project_type, addr(_project_type)): # <<<<<<<<<<<<<< @@ -10922,21 +10945,21 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const __pyx_t_1 = (!(fst::script::GetProjectType(__pyx_v_project_type, (&__pyx_v__project_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":363 + /* "_pywrapfst.pyx":359 * cdef fst.ProjectType _project_type * if not fst.GetProjectType(project_type, addr(_project_type)): * raise FstArgError(f"Unknown projection type: {project_type!r}") # <<<<<<<<<<<<<< * return _project_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_project_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_project_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_projection_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -10958,15 +10981,15 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __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, 363, __pyx_L1_error) + __PYX_ERR(0, 359, __pyx_L1_error) - /* "_pywrapfst.pyx":362 + /* "_pywrapfst.pyx":358 * """ * cdef fst.ProjectType _project_type * if not fst.GetProjectType(project_type, addr(_project_type)): # <<<<<<<<<<<<<< @@ -10975,7 +10998,7 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const */ } - /* "_pywrapfst.pyx":364 + /* "_pywrapfst.pyx":360 * if not fst.GetProjectType(project_type, addr(_project_type)): * raise FstArgError(f"Unknown projection type: {project_type!r}") * return _project_type # <<<<<<<<<<<<<< @@ -10985,7 +11008,7 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const __pyx_r = __pyx_v__project_type; goto __pyx_L0; - /* "_pywrapfst.pyx":346 + /* "_pywrapfst.pyx":342 * * * cdef fst.ProjectType _get_project_type(const string &project_type) except *: # <<<<<<<<<<<<<< @@ -11006,7 +11029,7 @@ static fst::ProjectType __pyx_f_10_pywrapfst__get_project_type(std::string const return __pyx_r; } -/* "_pywrapfst.pyx":367 +/* "_pywrapfst.pyx":363 * * * cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<< @@ -11029,7 +11052,7 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_queue_type", 1); - /* "_pywrapfst.pyx":386 + /* "_pywrapfst.pyx":382 * """ * cdef fst.QueueType _queue_type * if not fst.GetQueueType(queue_type, addr(_queue_type)): # <<<<<<<<<<<<<< @@ -11039,21 +11062,21 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons __pyx_t_1 = (!(fst::script::GetQueueType(__pyx_v_queue_type, (&__pyx_v__queue_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":387 + /* "_pywrapfst.pyx":383 * cdef fst.QueueType _queue_type * if not fst.GetQueueType(queue_type, addr(_queue_type)): * raise FstArgError(f"Unknown queue type: {queue_type!r}") # <<<<<<<<<<<<<< * return _queue_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_queue_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_queue_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_queue_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11075,15 +11098,15 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __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, 387, __pyx_L1_error) + __PYX_ERR(0, 383, __pyx_L1_error) - /* "_pywrapfst.pyx":386 + /* "_pywrapfst.pyx":382 * """ * cdef fst.QueueType _queue_type * if not fst.GetQueueType(queue_type, addr(_queue_type)): # <<<<<<<<<<<<<< @@ -11092,7 +11115,7 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons */ } - /* "_pywrapfst.pyx":388 + /* "_pywrapfst.pyx":384 * if not fst.GetQueueType(queue_type, addr(_queue_type)): * raise FstArgError(f"Unknown queue type: {queue_type!r}") * return _queue_type # <<<<<<<<<<<<<< @@ -11102,7 +11125,7 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons __pyx_r = __pyx_v__queue_type; goto __pyx_L0; - /* "_pywrapfst.pyx":367 + /* "_pywrapfst.pyx":363 * * * cdef fst.QueueType _get_queue_type(const string &queue_type) except *: # <<<<<<<<<<<<<< @@ -11123,7 +11146,7 @@ static enum fst::QueueType __pyx_f_10_pywrapfst__get_queue_type(std::string cons return __pyx_r; } -/* "_pywrapfst.pyx":391 +/* "_pywrapfst.pyx":387 * * * cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<< @@ -11146,7 +11169,7 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_rand_arc_selection", 1); - /* "_pywrapfst.pyx":411 + /* "_pywrapfst.pyx":407 * """ * cdef fst.RandArcSelection _select * if not fst.GetRandArcSelection(select, addr(_select)): # <<<<<<<<<<<<<< @@ -11156,21 +11179,21 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio __pyx_t_1 = (!(fst::script::GetRandArcSelection(__pyx_v_select, (&__pyx_v__select)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":412 + /* "_pywrapfst.pyx":408 * cdef fst.RandArcSelection _select * if not fst.GetRandArcSelection(select, addr(_select)): * raise FstArgError(f"Unknown random arc selection type: {select!r}") # <<<<<<<<<<<<<< * return _select * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_select); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_random_arc_selection_typ, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11192,15 +11215,15 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __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, 412, __pyx_L1_error) + __PYX_ERR(0, 408, __pyx_L1_error) - /* "_pywrapfst.pyx":411 + /* "_pywrapfst.pyx":407 * """ * cdef fst.RandArcSelection _select * if not fst.GetRandArcSelection(select, addr(_select)): # <<<<<<<<<<<<<< @@ -11209,7 +11232,7 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio */ } - /* "_pywrapfst.pyx":413 + /* "_pywrapfst.pyx":409 * if not fst.GetRandArcSelection(select, addr(_select)): * raise FstArgError(f"Unknown random arc selection type: {select!r}") * return _select # <<<<<<<<<<<<<< @@ -11219,7 +11242,7 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio __pyx_r = __pyx_v__select; goto __pyx_L0; - /* "_pywrapfst.pyx":391 + /* "_pywrapfst.pyx":387 * * * cdef fst.RandArcSelection _get_rand_arc_selection( # <<<<<<<<<<<<<< @@ -11240,7 +11263,7 @@ static fst::script::RandArcSelection __pyx_f_10_pywrapfst__get_rand_arc_selectio return __pyx_r; } -/* "_pywrapfst.pyx":416 +/* "_pywrapfst.pyx":412 * * * cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<< @@ -11263,7 +11286,7 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_replace_label_type", 1); - /* "_pywrapfst.pyx":437 + /* "_pywrapfst.pyx":433 * """ * cdef fst.ReplaceLabelType _replace_label_type * if not fst.GetReplaceLabelType(replace_label_type, # <<<<<<<<<<<<<< @@ -11273,21 +11296,21 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s __pyx_t_1 = (!(fst::script::GetReplaceLabelType(__pyx_v_replace_label_type, __pyx_v_epsilon_on_replace, (&__pyx_v__replace_label_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":440 + /* "_pywrapfst.pyx":436 * epsilon_on_replace, * addr(_replace_label_type)): * raise FstArgError(f"Unknown replace label type: {replace_label_type!r}") # <<<<<<<<<<<<<< * return _replace_label_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_replace_label_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_replace_label_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_replace_label_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11309,15 +11332,15 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __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, 440, __pyx_L1_error) + __PYX_ERR(0, 436, __pyx_L1_error) - /* "_pywrapfst.pyx":437 + /* "_pywrapfst.pyx":433 * """ * cdef fst.ReplaceLabelType _replace_label_type * if not fst.GetReplaceLabelType(replace_label_type, # <<<<<<<<<<<<<< @@ -11326,7 +11349,7 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s */ } - /* "_pywrapfst.pyx":441 + /* "_pywrapfst.pyx":437 * addr(_replace_label_type)): * raise FstArgError(f"Unknown replace label type: {replace_label_type!r}") * return _replace_label_type # <<<<<<<<<<<<<< @@ -11336,7 +11359,7 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s __pyx_r = __pyx_v__replace_label_type; goto __pyx_L0; - /* "_pywrapfst.pyx":416 + /* "_pywrapfst.pyx":412 * * * cdef fst.ReplaceLabelType _get_replace_label_type( # <<<<<<<<<<<<<< @@ -11357,7 +11380,7 @@ static enum fst::ReplaceLabelType __pyx_f_10_pywrapfst__get_replace_label_type(s return __pyx_r; } -/* "_pywrapfst.pyx":444 +/* "_pywrapfst.pyx":440 * * * cdef fst.ReweightType _get_reweight_type(const string &reweight_type) except *: # <<<<<<<<<<<<<< @@ -11380,7 +11403,7 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_reweight_type", 1); - /* "_pywrapfst.pyx":460 + /* "_pywrapfst.pyx":456 * """ * cdef fst.ReweightType _reweight_type * if not fst.GetReweightType(reweight_type, addr(_reweight_type)): # <<<<<<<<<<<<<< @@ -11390,21 +11413,21 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin __pyx_t_1 = (!(fst::script::GetReweightType(__pyx_v_reweight_type, (&__pyx_v__reweight_type)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":461 + /* "_pywrapfst.pyx":457 * cdef fst.ReweightType _reweight_type * if not fst.GetReweightType(reweight_type, addr(_reweight_type)): * raise FstArgError(f"Unknown reweight type: {reweight_type!r}") # <<<<<<<<<<<<<< * return _reweight_type * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_reweight_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_reweight_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_4), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_reweight_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_reweight_type, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -11426,15 +11449,15 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __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, 461, __pyx_L1_error) + __PYX_ERR(0, 457, __pyx_L1_error) - /* "_pywrapfst.pyx":460 + /* "_pywrapfst.pyx":456 * """ * cdef fst.ReweightType _reweight_type * if not fst.GetReweightType(reweight_type, addr(_reweight_type)): # <<<<<<<<<<<<<< @@ -11443,7 +11466,7 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin */ } - /* "_pywrapfst.pyx":462 + /* "_pywrapfst.pyx":458 * if not fst.GetReweightType(reweight_type, addr(_reweight_type)): * raise FstArgError(f"Unknown reweight type: {reweight_type!r}") * return _reweight_type # <<<<<<<<<<<<<< @@ -11453,7 +11476,7 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin __pyx_r = __pyx_v__reweight_type; goto __pyx_L0; - /* "_pywrapfst.pyx":444 + /* "_pywrapfst.pyx":440 * * * cdef fst.ReweightType _get_reweight_type(const string &reweight_type) except *: # <<<<<<<<<<<<<< @@ -11474,7 +11497,7 @@ static enum fst::ReweightType __pyx_f_10_pywrapfst__get_reweight_type(std::strin return __pyx_r; } -/* "_pywrapfst.pyx":487 +/* "_pywrapfst.pyx":483 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11511,7 +11534,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":488 + /* "_pywrapfst.pyx":484 * * def __repr__(self): * return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -11519,7 +11542,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr * def __str__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -11529,10 +11552,10 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type"); - __PYX_ERR(0, 488, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -11545,10 +11568,10 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Weight); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 488, __pyx_L1_error) + __PYX_ERR(0, 484, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -11559,9 +11582,9 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_at_0x); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -11573,14 +11596,14 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":487 + /* "_pywrapfst.pyx":483 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -11601,7 +11624,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight___repr__(struct __pyx_obj_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":490 +/* "_pywrapfst.pyx":486 * return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>" * * def __str__(self): # <<<<<<<<<<<<<< @@ -11634,7 +11657,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_2__str__(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 1); - /* "_pywrapfst.pyx":491 + /* "_pywrapfst.pyx":487 * * def __str__(self): * return self.to_string() # <<<<<<<<<<<<<< @@ -11644,16 +11667,16 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_2__str__(struct __pyx_obj_10_pywr __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 491, __pyx_L1_error) + __PYX_ERR(0, 487, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":490 + /* "_pywrapfst.pyx":486 * return f"<{self.type()} Weight {self.to_string()} at 0x{id(self):x}>" * * def __str__(self): # <<<<<<<<<<<<<< @@ -11672,7 +11695,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_2__str__(struct __pyx_obj_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":496 +/* "_pywrapfst.pyx":492 * # ValueError when that is not appropriate. * * def __float__(self): # <<<<<<<<<<<<<< @@ -11699,14 +11722,14 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_4__float__(struct __pyx_obj_10_py PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations std::string __pyx_t_1; - double __pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__float__", 1); - /* "_pywrapfst.pyx":497 + /* "_pywrapfst.pyx":493 * * def __float__(self): * return float(self.to_string()) # <<<<<<<<<<<<<< @@ -11716,17 +11739,19 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_4__float__(struct __pyx_obj_10_py __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "to_string"); - __PYX_ERR(0, 497, __pyx_L1_error) + __PYX_ERR(0, 493, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_AsDouble(((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error) - __pyx_t_3 = PyFloat_FromDouble(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":496 + /* "_pywrapfst.pyx":492 * # ValueError when that is not appropriate. * * def __float__(self): # <<<<<<<<<<<<<< @@ -11736,6 +11761,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_4__float__(struct __pyx_obj_10_py /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_pywrapfst.Weight.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; @@ -11745,7 +11771,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_4__float__(struct __pyx_obj_10_py return __pyx_r; } -/* "_pywrapfst.pyx":499 +/* "_pywrapfst.pyx":495 * return float(self.to_string()) * * def __init__(self, weight_type, weight): # <<<<<<<<<<<<<< @@ -11792,7 +11818,7 @@ static int __pyx_pw_10_pywrapfst_6Weight_7__init__(PyObject *__pyx_v_self, PyObj (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -11800,14 +11826,14 @@ static int __pyx_pw_10_pywrapfst_6Weight_7__init__(PyObject *__pyx_v_self, PyObj (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 499, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 495, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 499, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 495, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -11820,7 +11846,7 @@ static int __pyx_pw_10_pywrapfst_6Weight_7__init__(PyObject *__pyx_v_self, PyObj } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 499, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 495, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11855,7 +11881,7 @@ static int __pyx_pf_10_pywrapfst_6Weight_6__init__(struct __pyx_obj_10_pywrapfst const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":500 + /* "_pywrapfst.pyx":496 * * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<< @@ -11864,20 +11890,20 @@ static int __pyx_pf_10_pywrapfst_6Weight_6__init__(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 500, __pyx_L1_error) + __PYX_ERR(0, 496, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error) - /* "_pywrapfst.pyx":501 + /* "_pywrapfst.pyx":497 * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), * weight_tostring(weight))) # <<<<<<<<<<<<<< * self._check_weight() * */ - __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 497, __pyx_L1_error) - /* "_pywrapfst.pyx":500 + /* "_pywrapfst.pyx":496 * * def __init__(self, weight_type, weight): * self._weight.reset(new fst.WeightClass(tostring(weight_type), # <<<<<<<<<<<<<< @@ -11886,7 +11912,7 @@ static int __pyx_pf_10_pywrapfst_6Weight_6__init__(struct __pyx_obj_10_pywrapfst */ __pyx_v_self->_weight.reset(new fst::script::WeightClass(__pyx_t_1, __pyx_t_2)); - /* "_pywrapfst.pyx":502 + /* "_pywrapfst.pyx":498 * self._weight.reset(new fst.WeightClass(tostring(weight_type), * weight_tostring(weight))) * self._check_weight() # <<<<<<<<<<<<<< @@ -11895,11 +11921,11 @@ static int __pyx_pf_10_pywrapfst_6Weight_6__init__(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 502, __pyx_L1_error) + __PYX_ERR(0, 498, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->_check_weight(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error) - /* "_pywrapfst.pyx":499 + /* "_pywrapfst.pyx":495 * return float(self.to_string()) * * def __init__(self, weight_type, weight): # <<<<<<<<<<<<<< @@ -11917,7 +11943,7 @@ static int __pyx_pf_10_pywrapfst_6Weight_6__init__(struct __pyx_obj_10_pywrapfst return __pyx_r; } -/* "_pywrapfst.pyx":504 +/* "_pywrapfst.pyx":500 * self._check_weight() * * cdef void _check_weight(self) except *: # <<<<<<<<<<<<<< @@ -11939,7 +11965,7 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_weight", 1); - /* "_pywrapfst.pyx":505 + /* "_pywrapfst.pyx":501 * * cdef void _check_weight(self) except *: * if self.type() == b"none": # <<<<<<<<<<<<<< @@ -11948,20 +11974,20 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "type"); - __PYX_ERR(0, 505, __pyx_L1_error) + __PYX_ERR(0, 501, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 == ((char const *)"none")); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":506 + /* "_pywrapfst.pyx":502 * cdef void _check_weight(self) except *: * if self.type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * if not self.member(): * raise FstBadWeightError("Invalid weight") */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -11981,15 +12007,15 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_Weight_type_not_found}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 506, __pyx_L1_error) + __PYX_ERR(0, 502, __pyx_L1_error) - /* "_pywrapfst.pyx":505 + /* "_pywrapfst.pyx":501 * * cdef void _check_weight(self) except *: * if self.type() == b"none": # <<<<<<<<<<<<<< @@ -11998,7 +12024,7 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":507 + /* "_pywrapfst.pyx":503 * if self.type() == b"none": * raise FstArgError("Weight type not found") * if not self.member(): # <<<<<<<<<<<<<< @@ -12007,20 +12033,20 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member"); - __PYX_ERR(0, 507, __pyx_L1_error) + __PYX_ERR(0, 503, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->member(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v_self->__pyx_vtab)->member(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_t_2 = (!(__pyx_t_7 != 0)); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":508 + /* "_pywrapfst.pyx":504 * raise FstArgError("Weight type not found") * if not self.member(): * raise FstBadWeightError("Invalid weight") # <<<<<<<<<<<<<< * * cpdef Weight copy(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -12040,15 +12066,15 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_Invalid_weight}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 508, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) - /* "_pywrapfst.pyx":507 + /* "_pywrapfst.pyx":503 * if self.type() == b"none": * raise FstArgError("Weight type not found") * if not self.member(): # <<<<<<<<<<<<<< @@ -12057,7 +12083,7 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":504 + /* "_pywrapfst.pyx":500 * self._check_weight() * * cdef void _check_weight(self) except *: # <<<<<<<<<<<<<< @@ -12076,7 +12102,7 @@ static void __pyx_f_10_pywrapfst_6Weight__check_weight(struct __pyx_obj_10_pywra __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":510 +/* "_pywrapfst.pyx":506 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< @@ -12113,7 +12139,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_6Weight_copy(s if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __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, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_6Weight_9copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -12136,11 +12162,11 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_6Weight_copy(s PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __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_10_pywrapfst_Weight))))) __PYX_ERR(0, 510, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Weight))))) __PYX_ERR(0, 506, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12159,19 +12185,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_6Weight_copy(s #endif } - /* "_pywrapfst.pyx":516 + /* "_pywrapfst.pyx":512 * Returns a copy of the Weight. * """ * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(deref(self._weight))) * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":517 + /* "_pywrapfst.pyx":513 * """ * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(deref(self._weight))) # <<<<<<<<<<<<<< @@ -12180,15 +12206,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_6Weight_copy(s */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 517, __pyx_L1_error) + __PYX_ERR(0, 513, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 517, __pyx_L1_error) + __PYX_ERR(0, 513, __pyx_L1_error) } __pyx_v__weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_weight))); - /* "_pywrapfst.pyx":518 + /* "_pywrapfst.pyx":514 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(deref(self._weight))) * return _weight # <<<<<<<<<<<<<< @@ -12200,7 +12226,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_6Weight_copy(s __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":510 + /* "_pywrapfst.pyx":506 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< @@ -12274,7 +12300,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_8copy(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_6Weight_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12291,7 +12317,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_8copy(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":523 +/* "_pywrapfst.pyx":519 * # C++ part out-of-class and then call it from within. * * @classmethod # <<<<<<<<<<<<<< @@ -12353,12 +12379,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "zero") < 0)) __PYX_ERR(0, 523, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "zero") < 0)) __PYX_ERR(0, 519, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -12369,7 +12395,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 523, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("zero", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 519, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12405,7 +12431,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_10zero(CYTHON_UNUSED PyTypeObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("zero", 1); - /* "_pywrapfst.pyx":530 + /* "_pywrapfst.pyx":526 * Constructs semiring zero. * """ * return _zero(weight_type) # <<<<<<<<<<<<<< @@ -12413,13 +12439,13 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_10zero(CYTHON_UNUSED PyTypeObject * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__zero(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":523 + /* "_pywrapfst.pyx":519 * # C++ part out-of-class and then call it from within. * * @classmethod # <<<<<<<<<<<<<< @@ -12438,7 +12464,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_10zero(CYTHON_UNUSED PyTypeObject return __pyx_r; } -/* "_pywrapfst.pyx":532 +/* "_pywrapfst.pyx":528 * return _zero(weight_type) * * @classmethod # <<<<<<<<<<<<<< @@ -12500,12 +12526,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "one") < 0)) __PYX_ERR(0, 532, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "one") < 0)) __PYX_ERR(0, 528, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -12516,7 +12542,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("one", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 532, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("one", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 528, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12552,7 +12578,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_12one(CYTHON_UNUSED PyTypeObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("one", 1); - /* "_pywrapfst.pyx":539 + /* "_pywrapfst.pyx":535 * Constructs semiring One. * """ * return _one(weight_type) # <<<<<<<<<<<<<< @@ -12560,13 +12586,13 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_12one(CYTHON_UNUSED PyTypeObject * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__one(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__one(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":532 + /* "_pywrapfst.pyx":528 * return _zero(weight_type) * * @classmethod # <<<<<<<<<<<<<< @@ -12585,7 +12611,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_12one(CYTHON_UNUSED PyTypeObject return __pyx_r; } -/* "_pywrapfst.pyx":541 +/* "_pywrapfst.pyx":537 * return _one(weight_type) * * @classmethod # <<<<<<<<<<<<<< @@ -12647,12 +12673,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "no_weight") < 0)) __PYX_ERR(0, 541, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "no_weight") < 0)) __PYX_ERR(0, 537, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -12663,7 +12689,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("no_weight", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 541, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("no_weight", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 537, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12699,7 +12725,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_14no_weight(CYTHON_UNUSED PyTypeO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("no_weight", 1); - /* "_pywrapfst.pyx":548 + /* "_pywrapfst.pyx":544 * Constructs a non-member weight in the semiring. * """ * return _no_weight(weight_type) # <<<<<<<<<<<<<< @@ -12707,13 +12733,13 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_14no_weight(CYTHON_UNUSED PyTypeO * def __eq__(Weight w1, Weight w2): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__no_weight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__no_weight(__pyx_v_weight_type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":541 + /* "_pywrapfst.pyx":537 * return _one(weight_type) * * @classmethod # <<<<<<<<<<<<<< @@ -12732,7 +12758,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_14no_weight(CYTHON_UNUSED PyTypeO return __pyx_r; } -/* "_pywrapfst.pyx":550 +/* "_pywrapfst.pyx":546 * return _no_weight(weight_type) * * def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -12751,7 +12777,7 @@ static PyObject *__pyx_pw_10_pywrapfst_6Weight_17__eq__(PyObject *__pyx_v_w1, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_10_pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 550, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_10_pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 546, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_6Weight_16__eq__(((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_w2)); /* function exit code */ @@ -12772,7 +12798,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_16__eq__(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 1); - /* "_pywrapfst.pyx":551 + /* "_pywrapfst.pyx":547 * * def __eq__(Weight w1, Weight w2): * return fst.Eq(deref(w1._weight), deref(w2._weight)) # <<<<<<<<<<<<<< @@ -12782,19 +12808,19 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_16__eq__(struct __pyx_obj_10_pywr __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_w1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 551, __pyx_L1_error) + __PYX_ERR(0, 547, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_w2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 551, __pyx_L1_error) + __PYX_ERR(0, 547, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(operator==((*__pyx_v_w1->_weight), (*__pyx_v_w2->_weight))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":550 + /* "_pywrapfst.pyx":546 * return _no_weight(weight_type) * * def __eq__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -12813,7 +12839,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_16__eq__(struct __pyx_obj_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":553 +/* "_pywrapfst.pyx":549 * return fst.Eq(deref(w1._weight), deref(w2._weight)) * * def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -12832,7 +12858,7 @@ static PyObject *__pyx_pw_10_pywrapfst_6Weight_19__ne__(PyObject *__pyx_v_w1, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_10_pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 553, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w2), __pyx_ptype_10_pywrapfst_Weight, 1, "w2", 0))) __PYX_ERR(0, 549, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_6Weight_18__ne__(((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_w1), ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_w2)); /* function exit code */ @@ -12854,7 +12880,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_18__ne__(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ne__", 1); - /* "_pywrapfst.pyx":554 + /* "_pywrapfst.pyx":550 * * def __ne__(Weight w1, Weight w2): * return not w1 == w2 # <<<<<<<<<<<<<< @@ -12862,16 +12888,16 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_18__ne__(struct __pyx_obj_10_pywr * cpdef string to_string(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_w1), ((PyObject *)__pyx_v_w2), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":553 + /* "_pywrapfst.pyx":549 * return fst.Eq(deref(w1._weight), deref(w2._weight)) * * def __ne__(Weight w1, Weight w2): # <<<<<<<<<<<<<< @@ -12890,7 +12916,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_18__ne__(struct __pyx_obj_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":556 +/* "_pywrapfst.pyx":552 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< @@ -12927,7 +12953,7 @@ static std::string __pyx_f_10_pywrapfst_6Weight_to_string(struct __pyx_obj_10_py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_6Weight_21to_string)) { __Pyx_INCREF(__pyx_t_1); @@ -12949,11 +12975,11 @@ static std::string __pyx_f_10_pywrapfst_6Weight_to_string(struct __pyx_obj_10_py PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 552, __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; @@ -12972,7 +12998,7 @@ static std::string __pyx_f_10_pywrapfst_6Weight_to_string(struct __pyx_obj_10_py #endif } - /* "_pywrapfst.pyx":557 + /* "_pywrapfst.pyx":553 * * cpdef string to_string(self): * return self._weight.get().ToString() # <<<<<<<<<<<<<< @@ -12981,12 +13007,12 @@ static std::string __pyx_f_10_pywrapfst_6Weight_to_string(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 557, __pyx_L1_error) + __PYX_ERR(0, 553, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->ToString(); goto __pyx_L0; - /* "_pywrapfst.pyx":556 + /* "_pywrapfst.pyx":552 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< @@ -13058,8 +13084,8 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_20to_string(struct __pyx_obj_10_p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("to_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_to_string(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 556, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_to_string(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -13076,7 +13102,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_20to_string(struct __pyx_obj_10_p return __pyx_r; } -/* "_pywrapfst.pyx":559 +/* "_pywrapfst.pyx":555 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< @@ -13113,7 +13139,7 @@ static std::string __pyx_f_10_pywrapfst_6Weight_type(struct __pyx_obj_10_pywrapf if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_6Weight_23type)) { __Pyx_INCREF(__pyx_t_1); @@ -13135,11 +13161,11 @@ static std::string __pyx_f_10_pywrapfst_6Weight_type(struct __pyx_obj_10_pywrapf PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 555, __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; @@ -13158,7 +13184,7 @@ static std::string __pyx_f_10_pywrapfst_6Weight_type(struct __pyx_obj_10_pywrapf #endif } - /* "_pywrapfst.pyx":564 + /* "_pywrapfst.pyx":560 * Returns a string indicating the weight type. * """ * return self._weight.get().Type() # <<<<<<<<<<<<<< @@ -13167,12 +13193,12 @@ static std::string __pyx_f_10_pywrapfst_6Weight_type(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 564, __pyx_L1_error) + __PYX_ERR(0, 560, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->Type(); goto __pyx_L0; - /* "_pywrapfst.pyx":559 + /* "_pywrapfst.pyx":555 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< @@ -13245,8 +13271,8 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_22type(struct __pyx_obj_10_pywrap int __pyx_clineno = 0; __Pyx_RefNannySetupContext("type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -13263,7 +13289,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_22type(struct __pyx_obj_10_pywrap return __pyx_r; } -/* "_pywrapfst.pyx":566 +/* "_pywrapfst.pyx":562 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< @@ -13300,7 +13326,7 @@ static bool __pyx_f_10_pywrapfst_6Weight_member(struct __pyx_obj_10_pywrapfst_We if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_6Weight_25member)) { __Pyx_INCREF(__pyx_t_1); @@ -13322,11 +13348,11 @@ static bool __pyx_f_10_pywrapfst_6Weight_member(struct __pyx_obj_10_pywrapfst_We PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 566, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 562, __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; @@ -13345,7 +13371,7 @@ static bool __pyx_f_10_pywrapfst_6Weight_member(struct __pyx_obj_10_pywrapfst_We #endif } - /* "_pywrapfst.pyx":567 + /* "_pywrapfst.pyx":563 * * cpdef bool member(self): * return self._weight.get().Member() # <<<<<<<<<<<<<< @@ -13354,12 +13380,12 @@ static bool __pyx_f_10_pywrapfst_6Weight_member(struct __pyx_obj_10_pywrapfst_We */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 567, __pyx_L1_error) + __PYX_ERR(0, 563, __pyx_L1_error) } __pyx_r = __pyx_v_self->_weight.get()->Member(); goto __pyx_L0; - /* "_pywrapfst.pyx":566 + /* "_pywrapfst.pyx":562 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< @@ -13431,8 +13457,8 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_24member(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("member", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_member(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 566, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_6Weight_member(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -13663,7 +13689,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6Weight_28__setstate_cython__(CYTHON_UNUS return __pyx_r; } -/* "_pywrapfst.pyx":570 +/* "_pywrapfst.pyx":566 * * * cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -13681,19 +13707,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_plus", 1); - /* "_pywrapfst.pyx":571 + /* "_pywrapfst.pyx":567 * * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":572 + /* "_pywrapfst.pyx":568 * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -13702,14 +13728,14 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 572, __pyx_L1_error) + __PYX_ERR(0, 568, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 572, __pyx_L1_error) + __PYX_ERR(0, 568, __pyx_L1_error) } - /* "_pywrapfst.pyx":573 + /* "_pywrapfst.pyx":569 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -13718,10 +13744,10 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 573, __pyx_L1_error) + __PYX_ERR(0, 569, __pyx_L1_error) } - /* "_pywrapfst.pyx":572 + /* "_pywrapfst.pyx":568 * cdef Weight _plus(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -13730,7 +13756,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Plus((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "_pywrapfst.pyx":574 + /* "_pywrapfst.pyx":570 * _weight._weight.reset(new fst.WeightClass(fst.Plus(deref(lhs._weight), * deref(rhs._weight)))) * return _weight # <<<<<<<<<<<<<< @@ -13742,7 +13768,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":570 + /* "_pywrapfst.pyx":566 * * * cdef Weight _plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -13762,7 +13788,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__plus(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":577 +/* "_pywrapfst.pyx":573 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -13827,7 +13853,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 573, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -13835,14 +13861,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 573, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 577, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, 1); __PYX_ERR(0, 573, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plus") < 0)) __PYX_ERR(0, 577, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "plus") < 0)) __PYX_ERR(0, 573, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -13855,7 +13881,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 577, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("plus", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 573, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13869,8 +13895,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 577, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 577, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 573, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 573, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_plus(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -13898,19 +13924,19 @@ static PyObject *__pyx_pf_10_pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_clineno = 0; __Pyx_RefNannySetupContext("plus", 1); - /* "_pywrapfst.pyx":597 + /* "_pywrapfst.pyx":593 * FstBadWeightError: invalid weight. * """ * cdef Weight _weight = _plus(lhs, rhs) # <<<<<<<<<<<<<< * _weight._check_weight() * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__plus(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":598 + /* "_pywrapfst.pyx":594 * """ * cdef Weight _weight = _plus(lhs, rhs) * _weight._check_weight() # <<<<<<<<<<<<<< @@ -13919,11 +13945,11 @@ static PyObject *__pyx_pf_10_pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 598, __pyx_L1_error) + __PYX_ERR(0, 594, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 594, __pyx_L1_error) - /* "_pywrapfst.pyx":599 + /* "_pywrapfst.pyx":595 * cdef Weight _weight = _plus(lhs, rhs) * _weight._check_weight() * return _weight # <<<<<<<<<<<<<< @@ -13935,7 +13961,7 @@ static PyObject *__pyx_pf_10_pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, __pyx_r = ((PyObject *)__pyx_v__weight); goto __pyx_L0; - /* "_pywrapfst.pyx":577 + /* "_pywrapfst.pyx":573 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -13955,7 +13981,7 @@ static PyObject *__pyx_pf_10_pywrapfst_plus(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "_pywrapfst.pyx":602 +/* "_pywrapfst.pyx":598 * * * cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -13973,19 +13999,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_times", 1); - /* "_pywrapfst.pyx":603 + /* "_pywrapfst.pyx":599 * * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":604 + /* "_pywrapfst.pyx":600 * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -13994,14 +14020,14 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 604, __pyx_L1_error) + __PYX_ERR(0, 600, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 604, __pyx_L1_error) + __PYX_ERR(0, 600, __pyx_L1_error) } - /* "_pywrapfst.pyx":605 + /* "_pywrapfst.pyx":601 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -14010,10 +14036,10 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 605, __pyx_L1_error) + __PYX_ERR(0, 601, __pyx_L1_error) } - /* "_pywrapfst.pyx":604 + /* "_pywrapfst.pyx":600 * cdef Weight _times(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -14022,7 +14048,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Times((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "_pywrapfst.pyx":606 + /* "_pywrapfst.pyx":602 * _weight._weight.reset(new fst.WeightClass(fst.Times(deref(lhs._weight), * deref(rhs._weight)))) * return _weight # <<<<<<<<<<<<<< @@ -14034,7 +14060,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":602 + /* "_pywrapfst.pyx":598 * * * cdef Weight _times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14054,7 +14080,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__times(struct return __pyx_r; } -/* "_pywrapfst.pyx":609 +/* "_pywrapfst.pyx":605 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14119,7 +14145,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -14127,14 +14153,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 609, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, 1); __PYX_ERR(0, 605, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "times") < 0)) __PYX_ERR(0, 609, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "times") < 0)) __PYX_ERR(0, 605, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -14147,7 +14173,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 609, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("times", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 605, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14161,8 +14187,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 609, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 609, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 605, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 605, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_2times(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -14190,19 +14216,19 @@ static PyObject *__pyx_pf_10_pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("times", 1); - /* "_pywrapfst.pyx":629 + /* "_pywrapfst.pyx":625 * FstBadWeightError: Invalid weight. * """ * cdef Weight _weight = _times(lhs, rhs) # <<<<<<<<<<<<<< * _weight._check_weight() * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__times(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":630 + /* "_pywrapfst.pyx":626 * """ * cdef Weight _weight = _times(lhs, rhs) * _weight._check_weight() # <<<<<<<<<<<<<< @@ -14211,11 +14237,11 @@ static PyObject *__pyx_pf_10_pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 630, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 626, __pyx_L1_error) - /* "_pywrapfst.pyx":631 + /* "_pywrapfst.pyx":627 * cdef Weight _weight = _times(lhs, rhs) * _weight._check_weight() * return _weight # <<<<<<<<<<<<<< @@ -14227,7 +14253,7 @@ static PyObject *__pyx_pf_10_pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self __pyx_r = ((PyObject *)__pyx_v__weight); goto __pyx_L0; - /* "_pywrapfst.pyx":609 + /* "_pywrapfst.pyx":605 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14247,7 +14273,7 @@ static PyObject *__pyx_pf_10_pywrapfst_2times(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "_pywrapfst.pyx":634 +/* "_pywrapfst.pyx":630 * * * cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14265,19 +14291,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_divide", 1); - /* "_pywrapfst.pyx":635 + /* "_pywrapfst.pyx":631 * * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":636 + /* "_pywrapfst.pyx":632 * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -14286,14 +14312,14 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 632, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 632, __pyx_L1_error) } - /* "_pywrapfst.pyx":637 + /* "_pywrapfst.pyx":633 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) # <<<<<<<<<<<<<< @@ -14302,10 +14328,10 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 637, __pyx_L1_error) + __PYX_ERR(0, 633, __pyx_L1_error) } - /* "_pywrapfst.pyx":636 + /* "_pywrapfst.pyx":632 * cdef Weight _divide(Weight lhs, Weight rhs): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), # <<<<<<<<<<<<<< @@ -14314,7 +14340,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Divide((*__pyx_v_lhs->_weight), (*__pyx_v_rhs->_weight)))); - /* "_pywrapfst.pyx":638 + /* "_pywrapfst.pyx":634 * _weight._weight.reset(new fst.WeightClass(fst.Divide(deref(lhs._weight), * deref(rhs._weight)))) * return _weight # <<<<<<<<<<<<<< @@ -14326,7 +14352,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":634 + /* "_pywrapfst.pyx":630 * * * cdef Weight _divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14346,7 +14372,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__divide(struct return __pyx_r; } -/* "_pywrapfst.pyx":641 +/* "_pywrapfst.pyx":637 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14411,7 +14437,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -14419,14 +14445,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 641, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, 1); __PYX_ERR(0, 637, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "divide") < 0)) __PYX_ERR(0, 641, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "divide") < 0)) __PYX_ERR(0, 637, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -14439,7 +14465,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 641, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("divide", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 637, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14453,8 +14479,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 641, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 641, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_Weight, 1, "lhs", 0))) __PYX_ERR(0, 637, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_Weight, 1, "rhs", 0))) __PYX_ERR(0, 637, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_4divide(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -14482,19 +14508,19 @@ static PyObject *__pyx_pf_10_pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_sel int __pyx_clineno = 0; __Pyx_RefNannySetupContext("divide", 1); - /* "_pywrapfst.pyx":663 + /* "_pywrapfst.pyx":659 * FstBadWeightError: Invalid weight. * """ * cdef Weight _weight = _divide(lhs, rhs) # <<<<<<<<<<<<<< * _weight._check_weight() * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__divide(__pyx_v_lhs, __pyx_v_rhs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":664 + /* "_pywrapfst.pyx":660 * """ * cdef Weight _weight = _divide(lhs, rhs) * _weight._check_weight() # <<<<<<<<<<<<<< @@ -14503,11 +14529,11 @@ static PyObject *__pyx_pf_10_pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_sel */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 664, __pyx_L1_error) + __PYX_ERR(0, 660, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error) - /* "_pywrapfst.pyx":665 + /* "_pywrapfst.pyx":661 * cdef Weight _weight = _divide(lhs, rhs) * _weight._check_weight() * return _weight # <<<<<<<<<<<<<< @@ -14519,7 +14545,7 @@ static PyObject *__pyx_pf_10_pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_sel __pyx_r = ((PyObject *)__pyx_v__weight); goto __pyx_L0; - /* "_pywrapfst.pyx":641 + /* "_pywrapfst.pyx":637 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< @@ -14539,7 +14565,7 @@ static PyObject *__pyx_pf_10_pywrapfst_4divide(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "_pywrapfst.pyx":668 +/* "_pywrapfst.pyx":664 * * * cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -14557,19 +14583,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__power(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_power", 1); - /* "_pywrapfst.pyx":669 + /* "_pywrapfst.pyx":665 * * cdef Weight _power(Weight w, size_t n): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":670 + /* "_pywrapfst.pyx":666 * cdef Weight _power(Weight w, size_t n): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) # <<<<<<<<<<<<<< @@ -14578,15 +14604,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__power(struct */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 670, __pyx_L1_error) + __PYX_ERR(0, 666, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_w) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 670, __pyx_L1_error) + __PYX_ERR(0, 666, __pyx_L1_error) } __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::Power((*__pyx_v_w->_weight), __pyx_v_n))); - /* "_pywrapfst.pyx":671 + /* "_pywrapfst.pyx":667 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(fst.Power(deref(w._weight), n))) * return _weight # <<<<<<<<<<<<<< @@ -14598,7 +14624,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__power(struct __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":668 + /* "_pywrapfst.pyx":664 * * * cdef Weight _power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -14618,7 +14644,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__power(struct return __pyx_r; } -/* "_pywrapfst.pyx":674 +/* "_pywrapfst.pyx":670 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -14683,7 +14709,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 674, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -14691,14 +14717,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 674, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 674, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, 1); __PYX_ERR(0, 670, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "power") < 0)) __PYX_ERR(0, 674, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "power") < 0)) __PYX_ERR(0, 670, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -14707,11 +14733,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_w = ((struct __pyx_obj_10_pywrapfst_Weight *)values[0]); - __pyx_v_n = __Pyx_PyInt_As_size_t(values[1]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 674, __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, 670, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 674, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("power", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 670, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14725,7 +14751,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_10_pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 674, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_10_pywrapfst_Weight, 1, "w", 0))) __PYX_ERR(0, 670, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_6power(__pyx_self, __pyx_v_w, __pyx_v_n); /* function exit code */ @@ -14753,19 +14779,19 @@ static PyObject *__pyx_pf_10_pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("power", 1); - /* "_pywrapfst.pyx":691 + /* "_pywrapfst.pyx":687 * FstBadWeightError: Invalid weight. * """ * cdef Weight _weight = _power(w, n) # <<<<<<<<<<<<<< * _weight._check_weight() * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__power(__pyx_v_w, __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":692 + /* "_pywrapfst.pyx":688 * """ * cdef Weight _weight = _power(w, n) * _weight._check_weight() # <<<<<<<<<<<<<< @@ -14774,11 +14800,11 @@ static PyObject *__pyx_pf_10_pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_weight"); - __PYX_ERR(0, 692, __pyx_L1_error) + __PYX_ERR(0, 688, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->_check_weight(__pyx_v__weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L1_error) - /* "_pywrapfst.pyx":693 + /* "_pywrapfst.pyx":689 * cdef Weight _weight = _power(w, n) * _weight._check_weight() * return _weight # <<<<<<<<<<<<<< @@ -14790,7 +14816,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self __pyx_r = ((PyObject *)__pyx_v__weight); goto __pyx_L0; - /* "_pywrapfst.pyx":674 + /* "_pywrapfst.pyx":670 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< @@ -14810,7 +14836,7 @@ static PyObject *__pyx_pf_10_pywrapfst_6power(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "_pywrapfst.pyx":696 +/* "_pywrapfst.pyx":692 * * * cdef fst.WeightClass _get_WeightClass_or_zero(const string &weight_type, # <<<<<<<<<<<<<< @@ -14834,7 +14860,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_WeightClass_or_zero", 1); - /* "_pywrapfst.pyx":714 + /* "_pywrapfst.pyx":710 * """ * cdef fst.WeightClass _weight * if weight is None: # <<<<<<<<<<<<<< @@ -14844,7 +14870,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st __pyx_t_1 = (__pyx_v_weight == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":715 + /* "_pywrapfst.pyx":711 * cdef fst.WeightClass _weight * if weight is None: * _weight = fst.WeightClass.Zero(weight_type) # <<<<<<<<<<<<<< @@ -14853,7 +14879,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st */ __pyx_v__weight = fst::script::WeightClass::Zero(__pyx_v_weight_type); - /* "_pywrapfst.pyx":714 + /* "_pywrapfst.pyx":710 * """ * cdef fst.WeightClass _weight * if weight is None: # <<<<<<<<<<<<<< @@ -14863,7 +14889,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st goto __pyx_L3; } - /* "_pywrapfst.pyx":716 + /* "_pywrapfst.pyx":712 * if weight is None: * _weight = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -14873,7 +14899,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weight, __pyx_ptype_10_pywrapfst_Weight); if (__pyx_t_1) { - /* "_pywrapfst.pyx":717 + /* "_pywrapfst.pyx":713 * _weight = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): * _weight = deref( ( weight)._weight.get()) # <<<<<<<<<<<<<< @@ -14882,11 +14908,11 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st */ if (unlikely(__pyx_v_weight == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 717, __pyx_L1_error) + __PYX_ERR(0, 713, __pyx_L1_error) } __pyx_v__weight = (*((fst::script::WeightClass *)((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_weight)->_weight.get())); - /* "_pywrapfst.pyx":716 + /* "_pywrapfst.pyx":712 * if weight is None: * _weight = fst.WeightClass.Zero(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -14896,7 +14922,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st goto __pyx_L3; } - /* "_pywrapfst.pyx":719 + /* "_pywrapfst.pyx":715 * _weight = deref( ( weight)._weight.get()) * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<< @@ -14904,10 +14930,10 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st * raise FstBadWeightError(weight_tostring(weight)) */ /*else*/ { - __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L1_error) __pyx_v__weight = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_2); - /* "_pywrapfst.pyx":720 + /* "_pywrapfst.pyx":716 * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): # <<<<<<<<<<<<<< @@ -14917,17 +14943,17 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st __pyx_t_1 = (!(__pyx_v__weight.Member() != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":721 + /* "_pywrapfst.pyx":717 * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): * raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<< * return _weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 717, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -14948,15 +14974,15 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 721, __pyx_L1_error) + __PYX_ERR(0, 717, __pyx_L1_error) - /* "_pywrapfst.pyx":720 + /* "_pywrapfst.pyx":716 * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): # <<<<<<<<<<<<<< @@ -14967,7 +14993,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st } __pyx_L3:; - /* "_pywrapfst.pyx":722 + /* "_pywrapfst.pyx":718 * if not _weight.Member(): * raise FstBadWeightError(weight_tostring(weight)) * return _weight # <<<<<<<<<<<<<< @@ -14977,7 +15003,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":696 + /* "_pywrapfst.pyx":692 * * * cdef fst.WeightClass _get_WeightClass_or_zero(const string &weight_type, # <<<<<<<<<<<<<< @@ -14998,7 +15024,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_zero(st return __pyx_r; } -/* "_pywrapfst.pyx":725 +/* "_pywrapfst.pyx":721 * * * cdef fst.WeightClass _get_WeightClass_or_one(const string &weight_type, # <<<<<<<<<<<<<< @@ -15022,7 +15048,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_WeightClass_or_one", 1); - /* "_pywrapfst.pyx":743 + /* "_pywrapfst.pyx":739 * """ * cdef fst.WeightClass _weight * if weight is None: # <<<<<<<<<<<<<< @@ -15032,7 +15058,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std __pyx_t_1 = (__pyx_v_weight == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":744 + /* "_pywrapfst.pyx":740 * cdef fst.WeightClass _weight * if weight is None: * _weight = fst.WeightClass.One(weight_type) # <<<<<<<<<<<<<< @@ -15041,7 +15067,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std */ __pyx_v__weight = fst::script::WeightClass::One(__pyx_v_weight_type); - /* "_pywrapfst.pyx":743 + /* "_pywrapfst.pyx":739 * """ * cdef fst.WeightClass _weight * if weight is None: # <<<<<<<<<<<<<< @@ -15051,7 +15077,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std goto __pyx_L3; } - /* "_pywrapfst.pyx":745 + /* "_pywrapfst.pyx":741 * if weight is None: * _weight = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -15061,7 +15087,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_weight, __pyx_ptype_10_pywrapfst_Weight); if (__pyx_t_1) { - /* "_pywrapfst.pyx":746 + /* "_pywrapfst.pyx":742 * _weight = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): * _weight = deref( ( weight)._weight.get()) # <<<<<<<<<<<<<< @@ -15070,11 +15096,11 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std */ if (unlikely(__pyx_v_weight == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 746, __pyx_L1_error) + __PYX_ERR(0, 742, __pyx_L1_error) } __pyx_v__weight = (*((fst::script::WeightClass *)((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_v_weight)->_weight.get())); - /* "_pywrapfst.pyx":745 + /* "_pywrapfst.pyx":741 * if weight is None: * _weight = fst.WeightClass.One(weight_type) * elif isinstance(weight, Weight): # <<<<<<<<<<<<<< @@ -15084,7 +15110,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std goto __pyx_L3; } - /* "_pywrapfst.pyx":748 + /* "_pywrapfst.pyx":744 * _weight = deref( ( weight)._weight.get()) * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) # <<<<<<<<<<<<<< @@ -15092,10 +15118,10 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std * raise FstBadWeightError(weight_tostring(weight)) */ /*else*/ { - __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error) __pyx_v__weight = fst::script::WeightClass(__pyx_v_weight_type, __pyx_t_2); - /* "_pywrapfst.pyx":749 + /* "_pywrapfst.pyx":745 * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): # <<<<<<<<<<<<<< @@ -15105,17 +15131,17 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std __pyx_t_1 = (!(__pyx_v__weight.Member() != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":750 + /* "_pywrapfst.pyx":746 * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): * raise FstBadWeightError(weight_tostring(weight)) # <<<<<<<<<<<<<< * return _weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstBadWeightError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_weight_tostring(__pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -15136,15 +15162,15 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 750, __pyx_L1_error) + __PYX_ERR(0, 746, __pyx_L1_error) - /* "_pywrapfst.pyx":749 + /* "_pywrapfst.pyx":745 * else: * _weight = fst.WeightClass(weight_type, weight_tostring(weight)) * if not _weight.Member(): # <<<<<<<<<<<<<< @@ -15155,7 +15181,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std } __pyx_L3:; - /* "_pywrapfst.pyx":751 + /* "_pywrapfst.pyx":747 * if not _weight.Member(): * raise FstBadWeightError(weight_tostring(weight)) * return _weight # <<<<<<<<<<<<<< @@ -15165,7 +15191,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":725 + /* "_pywrapfst.pyx":721 * * * cdef fst.WeightClass _get_WeightClass_or_one(const string &weight_type, # <<<<<<<<<<<<<< @@ -15186,7 +15212,7 @@ static fst::script::WeightClass __pyx_f_10_pywrapfst__get_WeightClass_or_one(std return __pyx_r; } -/* "_pywrapfst.pyx":754 +/* "_pywrapfst.pyx":750 * * * cdef Weight _zero(weight_type): # <<<<<<<<<<<<<< @@ -15209,19 +15235,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_zero", 1); - /* "_pywrapfst.pyx":755 + /* "_pywrapfst.pyx":751 * * cdef Weight _zero(weight_type): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":756 + /* "_pywrapfst.pyx":752 * cdef Weight _zero(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15230,19 +15256,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 756, __pyx_L1_error) + __PYX_ERR(0, 752, __pyx_L1_error) } - /* "_pywrapfst.pyx":757 + /* "_pywrapfst.pyx":753 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) # <<<<<<<<<<<<<< * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 753, __pyx_L1_error) - /* "_pywrapfst.pyx":756 + /* "_pywrapfst.pyx":752 * cdef Weight _zero(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15251,7 +15277,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::Zero(__pyx_t_2))); - /* "_pywrapfst.pyx":758 + /* "_pywrapfst.pyx":754 * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -15260,19 +15286,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 758, __pyx_L1_error) + __PYX_ERR(0, 754, __pyx_L1_error) } __pyx_t_3 = (__pyx_v__weight->_weight.get()->Type() == ((char const *)"none")); if (unlikely(__pyx_t_3)) { - /* "_pywrapfst.pyx":759 + /* "_pywrapfst.pyx":755 * new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * return _weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -15292,15 +15318,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_Weight_type_not_found}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 759, __pyx_L1_error) + __PYX_ERR(0, 755, __pyx_L1_error) - /* "_pywrapfst.pyx":758 + /* "_pywrapfst.pyx":754 * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.Zero(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -15309,7 +15335,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject */ } - /* "_pywrapfst.pyx":760 + /* "_pywrapfst.pyx":756 * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") * return _weight # <<<<<<<<<<<<<< @@ -15321,7 +15347,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":754 + /* "_pywrapfst.pyx":750 * * * cdef Weight _zero(weight_type): # <<<<<<<<<<<<<< @@ -15343,7 +15369,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__zero(PyObject return __pyx_r; } -/* "_pywrapfst.pyx":763 +/* "_pywrapfst.pyx":759 * * * cdef Weight _one(weight_type): # <<<<<<<<<<<<<< @@ -15366,19 +15392,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_one", 1); - /* "_pywrapfst.pyx":764 + /* "_pywrapfst.pyx":760 * * cdef Weight _one(weight_type): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":765 + /* "_pywrapfst.pyx":761 * cdef Weight _one(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15387,19 +15413,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 765, __pyx_L1_error) + __PYX_ERR(0, 761, __pyx_L1_error) } - /* "_pywrapfst.pyx":766 + /* "_pywrapfst.pyx":762 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) # <<<<<<<<<<<<<< * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 766, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) - /* "_pywrapfst.pyx":765 + /* "_pywrapfst.pyx":761 * cdef Weight _one(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15408,7 +15434,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::One(__pyx_t_2))); - /* "_pywrapfst.pyx":767 + /* "_pywrapfst.pyx":763 * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -15417,19 +15443,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 767, __pyx_L1_error) + __PYX_ERR(0, 763, __pyx_L1_error) } __pyx_t_3 = (__pyx_v__weight->_weight.get()->Type() == ((char const *)"none")); if (unlikely(__pyx_t_3)) { - /* "_pywrapfst.pyx":768 + /* "_pywrapfst.pyx":764 * new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") # <<<<<<<<<<<<<< * return _weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -15449,15 +15475,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_Weight_type_not_found}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 768, __pyx_L1_error) + __PYX_ERR(0, 764, __pyx_L1_error) - /* "_pywrapfst.pyx":767 + /* "_pywrapfst.pyx":763 * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.One(tostring(weight_type)))) * if _weight._weight.get().Type() == b"none": # <<<<<<<<<<<<<< @@ -15466,7 +15492,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject */ } - /* "_pywrapfst.pyx":769 + /* "_pywrapfst.pyx":765 * if _weight._weight.get().Type() == b"none": * raise FstArgError("Weight type not found") * return _weight # <<<<<<<<<<<<<< @@ -15478,7 +15504,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":763 + /* "_pywrapfst.pyx":759 * * * cdef Weight _one(weight_type): # <<<<<<<<<<<<<< @@ -15500,7 +15526,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__one(PyObject return __pyx_r; } -/* "_pywrapfst.pyx":772 +/* "_pywrapfst.pyx":768 * * * cdef Weight _no_weight(weight_type): # <<<<<<<<<<<<<< @@ -15519,19 +15545,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__no_weight(PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_no_weight", 1); - /* "_pywrapfst.pyx":773 + /* "_pywrapfst.pyx":769 * * cdef Weight _no_weight(weight_type): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type)))) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":774 + /* "_pywrapfst.pyx":770 * cdef Weight _no_weight(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15540,19 +15566,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__no_weight(PyO */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 774, __pyx_L1_error) + __PYX_ERR(0, 770, __pyx_L1_error) } - /* "_pywrapfst.pyx":775 + /* "_pywrapfst.pyx":771 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type)))) # <<<<<<<<<<<<<< * return _weight * */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_weight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error) - /* "_pywrapfst.pyx":774 + /* "_pywrapfst.pyx":770 * cdef Weight _no_weight(weight_type): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset( # <<<<<<<<<<<<<< @@ -15561,7 +15587,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__no_weight(PyO */ __pyx_v__weight->_weight.reset(new fst::script::WeightClass(fst::script::WeightClass::NoWeight(__pyx_t_2))); - /* "_pywrapfst.pyx":776 + /* "_pywrapfst.pyx":772 * _weight._weight.reset( * new fst.WeightClass(fst.WeightClass.NoWeight(tostring(weight_type)))) * return _weight # <<<<<<<<<<<<<< @@ -15573,7 +15599,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__no_weight(PyO __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":772 + /* "_pywrapfst.pyx":768 * * * cdef Weight _no_weight(weight_type): # <<<<<<<<<<<<<< @@ -15593,7 +15619,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst__no_weight(PyO return __pyx_r; } -/* "_pywrapfst.pyx":808 +/* "_pywrapfst.pyx":804 * # Doing so will allow undefined behavior. * * def __init__(self): # <<<<<<<<<<<<<< @@ -15635,32 +15661,32 @@ static int __pyx_pf_10_pywrapfst_15SymbolTableView___init__(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":809 + /* "_pywrapfst.pyx":805 * * def __init__(self): * raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __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, 809, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) - /* "_pywrapfst.pyx":808 + /* "_pywrapfst.pyx":804 * # Doing so will allow undefined behavior. * * def __init__(self): # <<<<<<<<<<<<<< @@ -15678,7 +15704,7 @@ static int __pyx_pf_10_pywrapfst_15SymbolTableView___init__(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":811 +/* "_pywrapfst.pyx":807 * raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") * * def __iter__(self): # <<<<<<<<<<<<<< @@ -15710,7 +15736,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_2__iter__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 1); - /* "_pywrapfst.pyx":812 + /* "_pywrapfst.pyx":808 * * def __iter__(self): * return _SymbolTableIterator(self) # <<<<<<<<<<<<<< @@ -15718,13 +15744,13 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_2__iter__(struct __pyx_ * # Registers the class for pickling. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10_pywrapfst__SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10_pywrapfst__SymbolTableIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":811 + /* "_pywrapfst.pyx":807 * raise NotImplementedError(f"Cannot construct {self.__class__.__name__}") * * def __iter__(self): # <<<<<<<<<<<<<< @@ -15743,7 +15769,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_2__iter__(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":816 +/* "_pywrapfst.pyx":812 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -15803,7 +15829,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_4__reduce__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 1); - /* "_pywrapfst.pyx":817 + /* "_pywrapfst.pyx":813 * * def __reduce__(self): * return (_read_SymbolTable_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -15811,32 +15837,32 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_4__reduce__(struct __py * # Returns a raw const pointer to SymbolTable. */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_SymbolTable_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 817, __pyx_L1_error) + __PYX_ERR(0, 813, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 813, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":816 + /* "_pywrapfst.pyx":812 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -15857,7 +15883,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_4__reduce__(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":823 +/* "_pywrapfst.pyx":819 * # Should not be directly accessed except by `_raw_ptr_or_raise()`. * # All other methods should use the safer _raw_ptr_or_raise() instead. * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -15868,7 +15894,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_4__reduce__(struct __py static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolTableView__raw(CYTHON_UNUSED struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self) { __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_r; - /* "_pywrapfst.pyx":824 + /* "_pywrapfst.pyx":820 * # All other methods should use the safer _raw_ptr_or_raise() instead. * cdef const_SymbolTable_ptr _raw(self): * return NULL # <<<<<<<<<<<<<< @@ -15878,7 +15904,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT __pyx_r = NULL; goto __pyx_L0; - /* "_pywrapfst.pyx":823 + /* "_pywrapfst.pyx":819 * # Should not be directly accessed except by `_raw_ptr_or_raise()`. * # All other methods should use the safer _raw_ptr_or_raise() instead. * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -15891,7 +15917,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT return __pyx_r; } -/* "_pywrapfst.pyx":827 +/* "_pywrapfst.pyx":823 * * # Raises an FstOpError for a nonexistent SymbolTable. * cdef void _raise_nonexistent(self) except *: # <<<<<<<<<<<<<< @@ -15910,14 +15936,14 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView__raise_nonexistent(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_raise_nonexistent", 1); - /* "_pywrapfst.pyx":828 + /* "_pywrapfst.pyx":824 * # Raises an FstOpError for a nonexistent SymbolTable. * cdef void _raise_nonexistent(self) except *: * raise FstOpError("SymbolTable no longer exists") # <<<<<<<<<<<<<< * * # Internal API method that should be used when a const pointer to an */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -15937,15 +15963,15 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView__raise_nonexistent(CYTHON_UNU PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_SymbolTable_no_longer_exists}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __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, 828, __pyx_L1_error) + __PYX_ERR(0, 824, __pyx_L1_error) - /* "_pywrapfst.pyx":827 + /* "_pywrapfst.pyx":823 * * # Raises an FstOpError for a nonexistent SymbolTable. * cdef void _raise_nonexistent(self) except *: # <<<<<<<<<<<<<< @@ -15962,7 +15988,7 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView__raise_nonexistent(CYTHON_UNU __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":832 +/* "_pywrapfst.pyx":828 * # Internal API method that should be used when a const pointer to an * # fst.SymbolTable is required. * cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<< @@ -15979,7 +16005,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":833 + /* "_pywrapfst.pyx":829 * # fst.SymbolTable is required. * cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: * cdef const_SymbolTable_ptr _raw = self._raw() # <<<<<<<<<<<<<< @@ -15988,12 +16014,12 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw"); - __PYX_ERR(0, 833, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L1_error) __pyx_v__raw = __pyx_t_1; - /* "_pywrapfst.pyx":834 + /* "_pywrapfst.pyx":830 * cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: * cdef const_SymbolTable_ptr _raw = self._raw() * if _raw == NULL: # <<<<<<<<<<<<<< @@ -16003,7 +16029,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT __pyx_t_2 = (__pyx_v__raw == NULL); if (__pyx_t_2) { - /* "_pywrapfst.pyx":835 + /* "_pywrapfst.pyx":831 * cdef const_SymbolTable_ptr _raw = self._raw() * if _raw == NULL: * self._raise_nonexistent() # <<<<<<<<<<<<<< @@ -16012,11 +16038,11 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raise_nonexistent"); - __PYX_ERR(0, 835, __pyx_L1_error) + __PYX_ERR(0, 831, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raise_nonexistent(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 835, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raise_nonexistent(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error) - /* "_pywrapfst.pyx":834 + /* "_pywrapfst.pyx":830 * cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: * cdef const_SymbolTable_ptr _raw = self._raw() * if _raw == NULL: # <<<<<<<<<<<<<< @@ -16025,7 +16051,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT */ } - /* "_pywrapfst.pyx":836 + /* "_pywrapfst.pyx":832 * if _raw == NULL: * self._raise_nonexistent() * return _raw # <<<<<<<<<<<<<< @@ -16035,7 +16061,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT __pyx_r = __pyx_v__raw; goto __pyx_L0; - /* "_pywrapfst.pyx":832 + /* "_pywrapfst.pyx":828 * # Internal API method that should be used when a const pointer to an * # fst.SymbolTable is required. * cdef const_SymbolTable_ptr _raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<< @@ -16051,7 +16077,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_15SymbolT return __pyx_r; } -/* "_pywrapfst.pyx":838 +/* "_pywrapfst.pyx":834 * return _raw * * cpdef int64_t available_key(self) except *: # <<<<<<<<<<<<<< @@ -16089,7 +16115,7 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_available_key(struct __pyx if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_available_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_7available_key)) { __Pyx_INCREF(__pyx_t_1); @@ -16111,11 +16137,11 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_available_key(struct __pyx PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 838, __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, 834, __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; @@ -16134,7 +16160,7 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_available_key(struct __pyx #endif } - /* "_pywrapfst.pyx":844 + /* "_pywrapfst.pyx":840 * Returns an integer indicating the next available key index in the table. * """ * return self._raw_ptr_or_raise().AvailableKey() # <<<<<<<<<<<<<< @@ -16143,13 +16169,13 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_available_key(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 844, __pyx_L1_error) + __PYX_ERR(0, 840, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 840, __pyx_L1_error) __pyx_r = __pyx_t_7->AvailableKey(); goto __pyx_L0; - /* "_pywrapfst.pyx":838 + /* "_pywrapfst.pyx":834 * return _raw * * cpdef int64_t available_key(self) except *: # <<<<<<<<<<<<<< @@ -16222,8 +16248,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_6available_key(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("available_key", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_available_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 838, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_available_key(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -16240,7 +16266,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_6available_key(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":846 +/* "_pywrapfst.pyx":842 * return self._raw_ptr_or_raise().AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< @@ -16277,7 +16303,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_checksum(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_9checksum)) { __Pyx_XDECREF(__pyx_r); @@ -16300,11 +16326,11 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_checksum(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 846, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 842, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -16323,7 +16349,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_checksum(struct __pyx_ob #endif } - /* "_pywrapfst.pyx":852 + /* "_pywrapfst.pyx":848 * Returns a bytestring indicating the label-independent MD5 checksum. * """ * return self._raw_ptr_or_raise().CheckSum() # <<<<<<<<<<<<<< @@ -16333,16 +16359,16 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_checksum(struct __pyx_ob __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 852, __pyx_L1_error) + __PYX_ERR(0, 848, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_6->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_6->CheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":846 + /* "_pywrapfst.pyx":842 * return self._raw_ptr_or_raise().AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< @@ -16415,7 +16441,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_8checksum(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("checksum", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16432,7 +16458,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_8checksum(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":854 +/* "_pywrapfst.pyx":850 * return self._raw_ptr_or_raise().CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< @@ -16469,7 +16495,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_15SymbolT if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __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, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_11copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -16492,11 +16518,11 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_15SymbolT PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __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_10_pywrapfst_SymbolTable))))) __PYX_ERR(0, 854, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_SymbolTable))))) __PYX_ERR(0, 850, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -16515,7 +16541,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_15SymbolT #endif } - /* "_pywrapfst.pyx":860 + /* "_pywrapfst.pyx":856 * Returns a mutable copy of the SymbolTable. * """ * return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) # <<<<<<<<<<<<<< @@ -16525,16 +16551,16 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_15SymbolT __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 860, __pyx_L1_error) + __PYX_ERR(0, 856, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L1_error) - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(__pyx_t_6->Copy()))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(__pyx_t_6->Copy()))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":854 + /* "_pywrapfst.pyx":850 * return self._raw_ptr_or_raise().CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< @@ -16607,7 +16633,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_10copy(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_15SymbolTableView_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_15SymbolTableView_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16624,7 +16650,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_10copy(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":862 +/* "_pywrapfst.pyx":858 * return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) * * def find(self, key): # <<<<<<<<<<<<<< @@ -16686,12 +16712,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 858, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "find") < 0)) __PYX_ERR(0, 862, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "find") < 0)) __PYX_ERR(0, 858, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -16702,7 +16728,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 862, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 858, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16749,7 +16775,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("find", 1); - /* "_pywrapfst.pyx":879 + /* "_pywrapfst.pyx":875 * not found. * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -16758,12 +16784,12 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 879, __pyx_L1_error) + __PYX_ERR(0, 875, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 875, __pyx_L1_error) __pyx_v__raw = __pyx_t_1; - /* "_pywrapfst.pyx":880 + /* "_pywrapfst.pyx":876 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -16779,7 +16805,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "_pywrapfst.pyx":881 + /* "_pywrapfst.pyx":877 * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: * return _raw.FindIndex(tostring(key)) # <<<<<<<<<<<<<< @@ -16787,14 +16813,14 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj * return _raw.FindSymbol(key) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L3_error) - __pyx_t_6 = __Pyx_PyInt_From_int64_t(__pyx_v__raw->Find(__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 881, __pyx_L3_error) + __pyx_t_5 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyInt_From_int64_t(__pyx_v__raw->Find(__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 877, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L7_try_return; - /* "_pywrapfst.pyx":880 + /* "_pywrapfst.pyx":876 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -16805,7 +16831,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pywrapfst.pyx":882 + /* "_pywrapfst.pyx":878 * try: * return _raw.FindIndex(tostring(key)) * except TypeError: # <<<<<<<<<<<<<< @@ -16815,12 +16841,12 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_7) { __Pyx_AddTraceback("_pywrapfst.SymbolTableView.find", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 882, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 878, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); - /* "_pywrapfst.pyx":883 + /* "_pywrapfst.pyx":879 * return _raw.FindIndex(tostring(key)) * except TypeError: * return _raw.FindSymbol(key) # <<<<<<<<<<<<<< @@ -16828,8 +16854,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj * cpdef int64_t get_nth_key(self, ssize_t pos) except *: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L5_except_error) - __pyx_t_11 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__raw->Find(__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 883, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L5_except_error) + __pyx_t_11 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__raw->Find(__pyx_t_10)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 879, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; @@ -16840,7 +16866,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj } goto __pyx_L5_except_error; - /* "_pywrapfst.pyx":880 + /* "_pywrapfst.pyx":876 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -16867,7 +16893,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj goto __pyx_L0; } - /* "_pywrapfst.pyx":862 + /* "_pywrapfst.pyx":858 * return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) * * def find(self, key): # <<<<<<<<<<<<<< @@ -16889,7 +16915,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_12find(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":885 +/* "_pywrapfst.pyx":881 * return _raw.FindSymbol(key) * * cpdef int64_t get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< @@ -16928,10 +16954,10 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nth_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_15get_nth_key)) { - __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -16953,11 +16979,11 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(struct __pyx_o __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 881, __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; @@ -16976,7 +17002,7 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(struct __pyx_o #endif } - /* "_pywrapfst.pyx":897 + /* "_pywrapfst.pyx":893 * The integer index of the n-th key, or NO_LABEL if not found. * """ * return self._raw_ptr_or_raise().GetNthKey(pos) # <<<<<<<<<<<<<< @@ -16985,13 +17011,13 @@ static int64_t __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 897, __pyx_L1_error) + __PYX_ERR(0, 893, __pyx_L1_error) } - __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 893, __pyx_L1_error) __pyx_r = __pyx_t_8->GetNthKey(__pyx_v_pos); goto __pyx_L0; - /* "_pywrapfst.pyx":885 + /* "_pywrapfst.pyx":881 * return _raw.FindSymbol(key) * * cpdef int64_t get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< @@ -17067,23 +17093,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_nth_key") < 0)) __PYX_ERR(0, 885, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_nth_key") < 0)) __PYX_ERR(0, 881, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_pos = PyInt_AsSsize_t(values[0]); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L3_error) + __pyx_v_pos = PyInt_AsSsize_t(values[0]); if (unlikely((__pyx_v_pos == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_nth_key", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 885, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_nth_key", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 881, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17120,8 +17146,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_14get_nth_key(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_nth_key", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_get_nth_key(__pyx_v_self, __pyx_v_pos, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -17138,7 +17164,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_14get_nth_key(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":899 +/* "_pywrapfst.pyx":895 * return self._raw_ptr_or_raise().GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< @@ -17175,7 +17201,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_labeled_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_17labeled_checksum)) { __Pyx_XDECREF(__pyx_r); @@ -17198,11 +17224,11 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(struct PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 899, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -17221,7 +17247,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(struct #endif } - /* "_pywrapfst.pyx":905 + /* "_pywrapfst.pyx":901 * Returns a bytestring indicating the label-dependent MD5 checksum. * """ * return self._raw_ptr_or_raise().LabeledCheckSum() # <<<<<<<<<<<<<< @@ -17231,16 +17257,16 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(struct __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 905, __pyx_L1_error) + __PYX_ERR(0, 901, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error) - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_6->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_6->LabeledCheckSum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":899 + /* "_pywrapfst.pyx":895 * return self._raw_ptr_or_raise().GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< @@ -17313,7 +17339,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_16labeled_checksum(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("labeled_checksum", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_labeled_checksum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17330,7 +17356,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_16labeled_checksum(stru return __pyx_r; } -/* "_pywrapfst.pyx":907 +/* "_pywrapfst.pyx":903 * return self._raw_ptr_or_raise().LabeledCheckSum() * * cpdef bool member(self, key) except *: # <<<<<<<<<<<<<< @@ -17374,7 +17400,7 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_member); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_19member)) { __Pyx_INCREF(__pyx_t_1); @@ -17396,11 +17422,11 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 907, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 903, __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; @@ -17419,7 +17445,7 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py #endif } - /* "_pywrapfst.pyx":923 + /* "_pywrapfst.pyx":919 * Whether or not the key is present (as a string or a index) in the table. * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -17428,12 +17454,12 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 923, __pyx_L1_error) + __PYX_ERR(0, 919, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 923, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 919, __pyx_L1_error) __pyx_v__raw = __pyx_t_7; - /* "_pywrapfst.pyx":924 + /* "_pywrapfst.pyx":920 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -17449,18 +17475,18 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "_pywrapfst.pyx":925 + /* "_pywrapfst.pyx":921 * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: * return _raw.MemberSymbol(tostring(key)) # <<<<<<<<<<<<<< * except TypeError: * return _raw.MemberIndex(key) */ - __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L3_error) + __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_key); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 921, __pyx_L3_error) __pyx_r = __pyx_v__raw->Member(__pyx_t_11); goto __pyx_L7_try_return; - /* "_pywrapfst.pyx":924 + /* "_pywrapfst.pyx":920 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -17474,7 +17500,7 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":926 + /* "_pywrapfst.pyx":922 * try: * return _raw.MemberSymbol(tostring(key)) * except TypeError: # <<<<<<<<<<<<<< @@ -17484,19 +17510,19 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_5) { __Pyx_AddTraceback("_pywrapfst.SymbolTableView.member", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 926, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 922, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":927 + /* "_pywrapfst.pyx":923 * return _raw.MemberSymbol(tostring(key)) * except TypeError: * return _raw.MemberIndex(key) # <<<<<<<<<<<<<< * * cpdef string name(self) except *: */ - __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 927, __pyx_L5_except_error) + __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_v_key); if (unlikely((__pyx_t_12 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 923, __pyx_L5_except_error) __pyx_r = __pyx_v__raw->Member(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17505,7 +17531,7 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py } goto __pyx_L5_except_error; - /* "_pywrapfst.pyx":924 + /* "_pywrapfst.pyx":920 * """ * cdef const_SymbolTable_ptr _raw = self._raw_ptr_or_raise() * try: # <<<<<<<<<<<<<< @@ -17532,7 +17558,7 @@ static bool __pyx_f_10_pywrapfst_15SymbolTableView_member(struct __pyx_obj_10_py goto __pyx_L0; } - /* "_pywrapfst.pyx":907 + /* "_pywrapfst.pyx":903 * return self._raw_ptr_or_raise().LabeledCheckSum() * * cpdef bool member(self, key) except *: # <<<<<<<<<<<<<< @@ -17607,12 +17633,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "member") < 0)) __PYX_ERR(0, 907, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "member") < 0)) __PYX_ERR(0, 903, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -17623,7 +17649,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("member", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 907, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("member", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 903, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17660,8 +17686,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_18member(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("member", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_member(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_member(__pyx_v_self, __pyx_v_key, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -17678,7 +17704,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_18member(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":929 +/* "_pywrapfst.pyx":925 * return _raw.MemberIndex(key) * * cpdef string name(self) except *: # <<<<<<<<<<<<<< @@ -17716,7 +17742,7 @@ static std::string __pyx_f_10_pywrapfst_15SymbolTableView_name(struct __pyx_obj_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_21name)) { __Pyx_INCREF(__pyx_t_1); @@ -17738,11 +17764,11 @@ static std::string __pyx_f_10_pywrapfst_15SymbolTableView_name(struct __pyx_obj_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 925, __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; @@ -17761,7 +17787,7 @@ static std::string __pyx_f_10_pywrapfst_15SymbolTableView_name(struct __pyx_obj_ #endif } - /* "_pywrapfst.pyx":935 + /* "_pywrapfst.pyx":931 * Returns the symbol table's name. * """ * return self._raw_ptr_or_raise().Name() # <<<<<<<<<<<<<< @@ -17770,13 +17796,13 @@ static std::string __pyx_f_10_pywrapfst_15SymbolTableView_name(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 935, __pyx_L1_error) + __PYX_ERR(0, 931, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L1_error) __pyx_r = __pyx_t_7->Name(); goto __pyx_L0; - /* "_pywrapfst.pyx":929 + /* "_pywrapfst.pyx":925 * return _raw.MemberIndex(key) * * cpdef string name(self) except *: # <<<<<<<<<<<<<< @@ -17849,8 +17875,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_20name(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("name", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_name(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -17867,7 +17893,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_20name(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":937 +/* "_pywrapfst.pyx":933 * return self._raw_ptr_or_raise().Name() * * cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<< @@ -17905,7 +17931,7 @@ static size_t __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_23num_symbols)) { __Pyx_INCREF(__pyx_t_1); @@ -17927,11 +17953,11 @@ static size_t __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 933, __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; @@ -17950,7 +17976,7 @@ static size_t __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(struct __pyx_ob #endif } - /* "_pywrapfst.pyx":943 + /* "_pywrapfst.pyx":939 * Returns the number of symbols in the symbol table. * """ * return self._raw_ptr_or_raise().NumSymbols() # <<<<<<<<<<<<<< @@ -17959,13 +17985,13 @@ static size_t __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 943, __pyx_L1_error) + __PYX_ERR(0, 939, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L1_error) __pyx_r = __pyx_t_7->NumSymbols(); goto __pyx_L0; - /* "_pywrapfst.pyx":937 + /* "_pywrapfst.pyx":933 * return self._raw_ptr_or_raise().Name() * * cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<< @@ -18038,8 +18064,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_22num_symbols(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("num_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_num_symbols(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -18056,7 +18082,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_22num_symbols(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":945 +/* "_pywrapfst.pyx":941 * return self._raw_ptr_or_raise().NumSymbols() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -18094,7 +18120,7 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __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, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_25write)) { __Pyx_INCREF(__pyx_t_1); @@ -18116,7 +18142,7 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -18137,7 +18163,7 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw #endif } - /* "_pywrapfst.pyx":959 + /* "_pywrapfst.pyx":955 * FstIOError: Write failed. * """ * if not self._raw_ptr_or_raise().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -18146,25 +18172,25 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 959, __pyx_L1_error) + __PYX_ERR(0, 955, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error) - __pyx_t_7 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error) __pyx_t_8 = (!(__pyx_t_6->Write(__pyx_t_7) != 0)); if (unlikely(__pyx_t_8)) { - /* "_pywrapfst.pyx":960 + /* "_pywrapfst.pyx":956 * """ * if not self._raw_ptr_or_raise().Write(path_tostring(source)): * raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<< * - * cpdef void write_text(self, source) except *: + * def write_text(self, source, *, sep="\t "): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -18186,15 +18212,15 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __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, 960, __pyx_L1_error) + __PYX_ERR(0, 956, __pyx_L1_error) - /* "_pywrapfst.pyx":959 + /* "_pywrapfst.pyx":955 * FstIOError: Write failed. * """ * if not self._raw_ptr_or_raise().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -18203,7 +18229,7 @@ static void __pyx_f_10_pywrapfst_15SymbolTableView_write(struct __pyx_obj_10_pyw */ } - /* "_pywrapfst.pyx":945 + /* "_pywrapfst.pyx":941 * return self._raw_ptr_or_raise().NumSymbols() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -18277,12 +18303,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 945, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 941, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 945, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 941, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -18293,7 +18319,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 945, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 941, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18329,8 +18355,8 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_24write(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_15SymbolTableView_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 945, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_f_10_pywrapfst_15SymbolTableView_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 941, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18347,173 +18373,14 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_24write(struct __pyx_ob return __pyx_r; } -/* "_pywrapfst.pyx":962 +/* "_pywrapfst.pyx":958 * raise FstIOError(f"Write failed: {source!r}") * - * cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<< + * def write_text(self, source, *, sep="\t "): # <<<<<<<<<<<<<< * """ - * write_text(self, source) + * write_text(self, source, *, sep="\t ") */ -static PyObject *__pyx_pw_10_pywrapfst_15SymbolTableView_27write_text(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static void __pyx_f_10_pywrapfst_15SymbolTableView_write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - fst::SymbolTable const *__pyx_t_6; - std::string __pyx_t_7; - int __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("write_text", 1); - /* Check if called by wrapper */ - if (unlikely(__pyx_skip_dispatch)) ; - /* Check if overridden in Python */ - else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; - if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { - PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); - #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_27write_text)) { - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __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; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; - } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); - __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); - if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { - __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; - } - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS - } - #endif - } - - /* "_pywrapfst.pyx":976 - * FstIOError: Write failed. - * """ - * if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): # <<<<<<<<<<<<<< - * raise FstIOError(f"Write failed: {source!r}") - * - */ - if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 976, __pyx_L1_error) - } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 976, __pyx_L1_error) - __pyx_t_7 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 976, __pyx_L1_error) - __pyx_t_8 = (!(__pyx_t_6->WriteText(__pyx_t_7) != 0)); - if (unlikely(__pyx_t_8)) { - - /* "_pywrapfst.pyx":977 - * """ - * if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): - * raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<< - * - * cpdef bytes write_to_string(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_5 = 0; - #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_5 = 1; - } - } - #endif - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __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, 977, __pyx_L1_error) - - /* "_pywrapfst.pyx":976 - * FstIOError: Write failed. - * """ - * if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): # <<<<<<<<<<<<<< - * raise FstIOError(f"Write failed: {source!r}") - * - */ - } - - /* "_pywrapfst.pyx":962 - * raise FstIOError(f"Write failed: {source!r}") - * - * cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<< - * """ - * write_text(self, source) - */ - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("_pywrapfst.SymbolTableView.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); -} - /* Python wrapper */ static PyObject *__pyx_pw_10_pywrapfst_15SymbolTableView_27write_text(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL @@ -18522,7 +18389,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_15SymbolTableView_26write_text, "\n write_text(self, source)\n\n Writes symbol table to text file.\n\n This method writes the SymbolTable to a file in human-readable format.\n\n Args:\n source: The string location of the output file.\n\n Raises:\n FstIOError: Write failed.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_15SymbolTableView_26write_text, "\n write_text(self, source, *, sep=\"\t \")\n\n Writes symbol table to text file.\n\n This method writes the SymbolTable to a file in human-readable format.\n\n Args:\n source: The string location of the output file.\n sep: Characters to be used as a separator between fields in a textual\n SymbolTable file, encoded as a string. Only the first byte is used.\n\n Raises:\n FstIOError: Write failed.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_15SymbolTableView_27write_text = {"write_text", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_15SymbolTableView_27write_text, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_15SymbolTableView_26write_text}; static PyObject *__pyx_pw_10_pywrapfst_15SymbolTableView_27write_text(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL @@ -18532,11 +18399,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_source = 0; + PyObject *__pyx_v_sep = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; + PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -18552,7 +18420,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0}; + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_sep,0}; + values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__4)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { @@ -18568,12 +18437,18 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 962, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } + if (kw_args == 1) { + const Py_ssize_t index = 1; + PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]); + if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error) + } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write_text") < 0)) __PYX_ERR(0, 962, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write_text") < 0)) __PYX_ERR(0, 958, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -18581,10 +18456,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_source = values[0]; + __pyx_v_sep = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_text", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 962, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_text", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 958, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18598,7 +18474,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), __pyx_v_source); + __pyx_r = __pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), __pyx_v_source, __pyx_v_sep); /* function exit code */ { @@ -18611,25 +18487,122 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source) { +static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_sep) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; + fst::SymbolTable const *__pyx_t_1; + std::string __pyx_t_2; + std::string __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 1); - __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_15SymbolTableView_write_text(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 962, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + + /* "_pywrapfst.pyx":974 + * FstIOError: Write failed. + * """ + * if not self._raw_ptr_or_raise().WriteText(path_tostring(source), # <<<<<<<<<<<<<< + * tostring(sep)): + * raise FstIOError(f"Write failed: {source!r}") + */ + if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); + __PYX_ERR(0, 974, __pyx_L1_error) + } + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L1_error) + + /* "_pywrapfst.pyx":975 + * """ + * if not self._raw_ptr_or_raise().WriteText(path_tostring(source), + * tostring(sep)): # <<<<<<<<<<<<<< + * raise FstIOError(f"Write failed: {source!r}") + * + */ + __pyx_t_3 = __pyx_f_10_pywrapfst_tostring(__pyx_v_sep); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L1_error) + + /* "_pywrapfst.pyx":974 + * FstIOError: Write failed. + * """ + * if not self._raw_ptr_or_raise().WriteText(path_tostring(source), # <<<<<<<<<<<<<< + * tostring(sep)): + * raise FstIOError(f"Write failed: {source!r}") + */ + __pyx_t_4 = (!(__pyx_t_1->WriteText(__pyx_t_2, __pyx_t_3) != 0)); + if (unlikely(__pyx_t_4)) { + + /* "_pywrapfst.pyx":976 + * if not self._raw_ptr_or_raise().WriteText(path_tostring(source), + * tostring(sep)): + * raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<< + * + * cpdef bytes write_to_string(self): + */ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + __pyx_t_9 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_9 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 976, __pyx_L1_error) + + /* "_pywrapfst.pyx":974 + * FstIOError: Write failed. + * """ + * if not self._raw_ptr_or_raise().WriteText(path_tostring(source), # <<<<<<<<<<<<<< + * tostring(sep)): + * raise FstIOError(f"Write failed: {source!r}") + */ + } + + /* "_pywrapfst.pyx":958 + * raise FstIOError(f"Write failed: {source!r}") + * + * def write_text(self, source, *, sep="\t "): # <<<<<<<<<<<<<< + * """ + * write_text(self, source, *, sep="\t ") + */ /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("_pywrapfst.SymbolTableView.write_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -18638,7 +18611,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_26write_text(struct __p return __pyx_r; } -/* "_pywrapfst.pyx":979 +/* "_pywrapfst.pyx":978 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -18677,7 +18650,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_15SymbolTableView_29write_to_string)) { __Pyx_XDECREF(__pyx_r); @@ -18700,11 +18673,11 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 979, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 978, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -18723,7 +18696,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ #endif } - /* "_pywrapfst.pyx":992 + /* "_pywrapfst.pyx":991 * """ * cdef stringstream _sstrm * if not self._raw_ptr_or_raise().Write(_sstrm): # <<<<<<<<<<<<<< @@ -18732,20 +18705,20 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 992, __pyx_L1_error) + __PYX_ERR(0, 991, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error) __pyx_t_7 = (!(__pyx_t_6->Write(__pyx_v__sstrm) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pywrapfst.pyx":993 + /* "_pywrapfst.pyx":992 * cdef stringstream _sstrm * if not self._raw_ptr_or_raise().Write(_sstrm): * raise FstIOError("Write to string failed") # <<<<<<<<<<<<<< * return _sstrm.str() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -18765,15 +18738,15 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Write_to_string_failed}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __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, 993, __pyx_L1_error) + __PYX_ERR(0, 992, __pyx_L1_error) - /* "_pywrapfst.pyx":992 + /* "_pywrapfst.pyx":991 * """ * cdef stringstream _sstrm * if not self._raw_ptr_or_raise().Write(_sstrm): # <<<<<<<<<<<<<< @@ -18782,7 +18755,7 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ */ } - /* "_pywrapfst.pyx":994 + /* "_pywrapfst.pyx":993 * if not self._raw_ptr_or_raise().Write(_sstrm): * raise FstIOError("Write to string failed") * return _sstrm.str() # <<<<<<<<<<<<<< @@ -18790,13 +18763,13 @@ static PyObject *__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(struct _ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":979 + /* "_pywrapfst.pyx":978 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -18869,7 +18842,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_28write_to_string(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_to_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_15SymbolTableView_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18886,7 +18859,7 @@ static PyObject *__pyx_pf_10_pywrapfst_15SymbolTableView_28write_to_string(struc return __pyx_r; } -/* "_pywrapfst.pyx":1012 +/* "_pywrapfst.pyx":1011 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -18923,7 +18896,7 @@ static PyObject *__pyx_pf_10_pywrapfst_28_EncodeMapperSymbolTableView___repr__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1013 + /* "_pywrapfst.pyx":1012 * * def __repr__(self): * return (f"__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -18959,16 +18932,16 @@ static PyObject *__pyx_pf_10_pywrapfst_28_EncodeMapperSymbolTableView___repr__(s __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - /* "_pywrapfst.pyx":1014 + /* "_pywrapfst.pyx":1013 * def __repr__(self): * return (f"") # <<<<<<<<<<<<<< * * cdef const_SymbolTable_ptr _raw(self): */ - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1014, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -18981,21 +18954,21 @@ static PyObject *__pyx_pf_10_pywrapfst_28_EncodeMapperSymbolTableView___repr__(s __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - /* "_pywrapfst.pyx":1013 + /* "_pywrapfst.pyx":1012 * * def __repr__(self): * return (f"") * */ - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1012 + /* "_pywrapfst.pyx":1011 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -19016,7 +18989,7 @@ static PyObject *__pyx_pf_10_pywrapfst_28_EncodeMapperSymbolTableView___repr__(s return __pyx_r; } -/* "_pywrapfst.pyx":1016 +/* "_pywrapfst.pyx":1015 * f"at 0x{id(self):x}>") * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19032,7 +19005,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_28_Encode const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1017 + /* "_pywrapfst.pyx":1016 * * cdef const_SymbolTable_ptr _raw(self): * return (self._mapper.get().InputSymbols() if self._input_side # <<<<<<<<<<<<<< @@ -19041,18 +19014,18 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_28_Encode */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1017, __pyx_L1_error) + __PYX_ERR(0, 1016, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_input_side != 0); if (__pyx_t_2) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1017, __pyx_L1_error) + __PYX_ERR(0, 1016, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mapper.get()->InputSymbols(); } else { - /* "_pywrapfst.pyx":1018 + /* "_pywrapfst.pyx":1017 * cdef const_SymbolTable_ptr _raw(self): * return (self._mapper.get().InputSymbols() if self._input_side * else self._mapper.get().OutputSymbols()) # <<<<<<<<<<<<<< @@ -19061,14 +19034,14 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_28_Encode */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1018, __pyx_L1_error) + __PYX_ERR(0, 1017, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mapper.get()->OutputSymbols(); } __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_pywrapfst.pyx":1016 + /* "_pywrapfst.pyx":1015 * f"at 0x{id(self):x}>") * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19084,7 +19057,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_28_Encode return __pyx_r; } -/* "_pywrapfst.pyx":1035 +/* "_pywrapfst.pyx":1034 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -19121,7 +19094,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_FstSymbolTableView___repr__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1036 + /* "_pywrapfst.pyx":1035 * * def __repr__(self): * return (f"__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst__FstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -19157,16 +19130,16 @@ static PyObject *__pyx_pf_10_pywrapfst_19_FstSymbolTableView___repr__(struct __p __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - /* "_pywrapfst.pyx":1037 + /* "_pywrapfst.pyx":1036 * def __repr__(self): * return (f"") # <<<<<<<<<<<<<< * * cdef const_SymbolTable_ptr _raw(self): */ - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -19179,21 +19152,21 @@ static PyObject *__pyx_pf_10_pywrapfst_19_FstSymbolTableView___repr__(struct __p __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - /* "_pywrapfst.pyx":1036 + /* "_pywrapfst.pyx":1035 * * def __repr__(self): * return (f"") * */ - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1035 + /* "_pywrapfst.pyx":1034 * # Doing so will allow undefined behavior. * * def __repr__(self): # <<<<<<<<<<<<<< @@ -19214,7 +19187,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_FstSymbolTableView___repr__(struct __p return __pyx_r; } -/* "_pywrapfst.pyx":1039 +/* "_pywrapfst.pyx":1038 * f"at 0x{id(self):x}>") * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19230,7 +19203,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_FstSym const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1040 + /* "_pywrapfst.pyx":1039 * * cdef const_SymbolTable_ptr _raw(self): * return (self._fst.get().InputSymbols() if self._input_side # <<<<<<<<<<<<<< @@ -19239,18 +19212,18 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_FstSym */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1040, __pyx_L1_error) + __PYX_ERR(0, 1039, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_input_side != 0); if (__pyx_t_2) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1040, __pyx_L1_error) + __PYX_ERR(0, 1039, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_fst.get()->InputSymbols(); } else { - /* "_pywrapfst.pyx":1041 + /* "_pywrapfst.pyx":1040 * cdef const_SymbolTable_ptr _raw(self): * return (self._fst.get().InputSymbols() if self._input_side * else self._fst.get().OutputSymbols()) # <<<<<<<<<<<<<< @@ -19259,14 +19232,14 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_FstSym */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1041, __pyx_L1_error) + __PYX_ERR(0, 1040, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_fst.get()->OutputSymbols(); } __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_pywrapfst.pyx":1039 + /* "_pywrapfst.pyx":1038 * f"at 0x{id(self):x}>") * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19282,7 +19255,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_FstSym return __pyx_r; } -/* "_pywrapfst.pyx":1055 +/* "_pywrapfst.pyx":1054 * """ * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19297,7 +19270,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_Mutabl const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1056 + /* "_pywrapfst.pyx":1055 * * cdef const_SymbolTable_ptr _raw(self): * return self._mutable_raw() # <<<<<<<<<<<<<< @@ -19306,13 +19279,13 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_Mutabl */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw"); - __PYX_ERR(0, 1056, __pyx_L1_error) + __PYX_ERR(0, 1055, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_pywrapfst.pyx":1055 + /* "_pywrapfst.pyx":1054 * """ * * cdef const_SymbolTable_ptr _raw(self): # <<<<<<<<<<<<<< @@ -19328,7 +19301,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_Mutabl return __pyx_r; } -/* "_pywrapfst.pyx":1062 +/* "_pywrapfst.pyx":1061 * # Should not be directly accessed except by `_mutable__raw_ptr_or_raise()`. * # All other methods should use the safer _mutable__raw_ptr_or_raise() instead. * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -19339,7 +19312,7 @@ static __pyx_t_10_pywrapfst_const_SymbolTable_ptr __pyx_f_10_pywrapfst_19_Mutabl static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbolTable__mutable_raw(CYTHON_UNUSED struct __pyx_obj_10_pywrapfst__MutableSymbolTable *__pyx_v_self) { __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_r; - /* "_pywrapfst.pyx":1063 + /* "_pywrapfst.pyx":1062 * # All other methods should use the safer _mutable__raw_ptr_or_raise() instead. * cdef SymbolTable_ptr _mutable_raw(self): * return NULL # <<<<<<<<<<<<<< @@ -19349,7 +19322,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo __pyx_r = NULL; goto __pyx_L0; - /* "_pywrapfst.pyx":1062 + /* "_pywrapfst.pyx":1061 * # Should not be directly accessed except by `_mutable__raw_ptr_or_raise()`. * # All other methods should use the safer _mutable__raw_ptr_or_raise() instead. * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -19362,7 +19335,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo return __pyx_r; } -/* "_pywrapfst.pyx":1067 +/* "_pywrapfst.pyx":1066 * # Internal API method that should be used when a mutable pointer to an * # fst.SymbolTable is required. * cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<< @@ -19379,7 +19352,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1068 + /* "_pywrapfst.pyx":1067 * # fst.SymbolTable is required. * cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: * cdef SymbolTable_ptr mutable_raw = self._mutable_raw() # <<<<<<<<<<<<<< @@ -19388,12 +19361,12 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw"); - __PYX_ERR(0, 1068, __pyx_L1_error) + __PYX_ERR(0, 1067, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1067, __pyx_L1_error) __pyx_v_mutable_raw = __pyx_t_1; - /* "_pywrapfst.pyx":1069 + /* "_pywrapfst.pyx":1068 * cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: * cdef SymbolTable_ptr mutable_raw = self._mutable_raw() * if mutable_raw == NULL: # <<<<<<<<<<<<<< @@ -19403,7 +19376,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo __pyx_t_2 = (__pyx_v_mutable_raw == NULL); if (__pyx_t_2) { - /* "_pywrapfst.pyx":1070 + /* "_pywrapfst.pyx":1069 * cdef SymbolTable_ptr mutable_raw = self._mutable_raw() * if mutable_raw == NULL: * self._raise_nonexistent() # <<<<<<<<<<<<<< @@ -19412,11 +19385,11 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raise_nonexistent"); - __PYX_ERR(0, 1070, __pyx_L1_error) + __PYX_ERR(0, 1069, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._raise_nonexistent(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._raise_nonexistent(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1069, __pyx_L1_error) - /* "_pywrapfst.pyx":1069 + /* "_pywrapfst.pyx":1068 * cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: * cdef SymbolTable_ptr mutable_raw = self._mutable_raw() * if mutable_raw == NULL: # <<<<<<<<<<<<<< @@ -19425,7 +19398,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo */ } - /* "_pywrapfst.pyx":1071 + /* "_pywrapfst.pyx":1070 * if mutable_raw == NULL: * self._raise_nonexistent() * return mutable_raw # <<<<<<<<<<<<<< @@ -19435,7 +19408,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo __pyx_r = __pyx_v_mutable_raw; goto __pyx_L0; - /* "_pywrapfst.pyx":1067 + /* "_pywrapfst.pyx":1066 * # Internal API method that should be used when a mutable pointer to an * # fst.SymbolTable is required. * cdef SymbolTable_ptr _mutable_raw_ptr_or_raise(self) except *: # <<<<<<<<<<<<<< @@ -19451,7 +19424,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_19_MutableSymbo return __pyx_r; } -/* "_pywrapfst.pyx":1073 +/* "_pywrapfst.pyx":1072 * return mutable_raw * * cpdef int64_t add_symbol(self, symbol, int64_t key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<< @@ -19467,7 +19440,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __pyx_obj_10_pywrapfst__MutableSymbolTable *__pyx_v_self, PyObject *__pyx_v_symbol, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_19_MutableSymbolTable_add_symbol *__pyx_optional_args) { - int64_t __pyx_v_key = __pyx_k__4; + int64_t __pyx_v_key = __pyx_k__5; __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_v__mutable_raw; std::string __pyx_v__symbol; int64_t __pyx_r; @@ -19500,10 +19473,10 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_symbol); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableSymbolTable_1add_symbol)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -19525,11 +19498,11 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1072, __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; @@ -19548,7 +19521,7 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py #endif } - /* "_pywrapfst.pyx":1090 + /* "_pywrapfst.pyx":1089 * The integer key of the new symbol. * """ * cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -19557,22 +19530,22 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise"); - __PYX_ERR(0, 1090, __pyx_L1_error) + __PYX_ERR(0, 1089, __pyx_L1_error) } - __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error) + __pyx_t_8 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L1_error) __pyx_v__mutable_raw = __pyx_t_8; - /* "_pywrapfst.pyx":1091 + /* "_pywrapfst.pyx":1090 * """ * cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise() * cdef string _symbol = tostring(symbol) # <<<<<<<<<<<<<< * if key != fst.kNoSymbol: * return _mutable_raw.AddSymbol(_symbol, key) */ - __pyx_t_9 = __pyx_f_10_pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_t_9 = __pyx_f_10_pywrapfst_tostring(__pyx_v_symbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error) __pyx_v__symbol = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9); - /* "_pywrapfst.pyx":1092 + /* "_pywrapfst.pyx":1091 * cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise() * cdef string _symbol = tostring(symbol) * if key != fst.kNoSymbol: # <<<<<<<<<<<<<< @@ -19582,7 +19555,7 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py __pyx_t_10 = (__pyx_v_key != fst::kNoSymbol); if (__pyx_t_10) { - /* "_pywrapfst.pyx":1093 + /* "_pywrapfst.pyx":1092 * cdef string _symbol = tostring(symbol) * if key != fst.kNoSymbol: * return _mutable_raw.AddSymbol(_symbol, key) # <<<<<<<<<<<<<< @@ -19592,7 +19565,7 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py __pyx_r = __pyx_v__mutable_raw->AddSymbol(__pyx_v__symbol, __pyx_v_key); goto __pyx_L0; - /* "_pywrapfst.pyx":1092 + /* "_pywrapfst.pyx":1091 * cdef SymbolTable_ptr _mutable_raw = self._mutable_raw_ptr_or_raise() * cdef string _symbol = tostring(symbol) * if key != fst.kNoSymbol: # <<<<<<<<<<<<<< @@ -19601,7 +19574,7 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py */ } - /* "_pywrapfst.pyx":1095 + /* "_pywrapfst.pyx":1094 * return _mutable_raw.AddSymbol(_symbol, key) * else: * return _mutable_raw.AddSymbol(_symbol) # <<<<<<<<<<<<<< @@ -19613,7 +19586,7 @@ static int64_t __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct __py goto __pyx_L0; } - /* "_pywrapfst.pyx":1073 + /* "_pywrapfst.pyx":1072 * return mutable_raw * * cpdef int64_t add_symbol(self, symbol, int64_t key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<< @@ -19692,19 +19665,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_symbol") < 0)) __PYX_ERR(0, 1073, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_symbol") < 0)) __PYX_ERR(0, 1072, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -19717,14 +19690,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_symbol = values[0]; if (values[1]) { - __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L3_error) + __pyx_v_key = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_key == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L3_error) } else { - __pyx_v_key = __pyx_k__4; + __pyx_v_key = __pyx_k__5; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1073, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symbol", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1072, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -19764,8 +19737,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct _ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.key = __pyx_v_key; - __pyx_t_1 = __pyx_vtabptr_10_pywrapfst__MutableSymbolTable->add_symbol(__pyx_v_self, __pyx_v_symbol, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_10_pywrapfst__MutableSymbolTable->add_symbol(__pyx_v_self, __pyx_v_symbol, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -19782,7 +19755,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_add_symbol(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":1097 +/* "_pywrapfst.pyx":1096 * return _mutable_raw.AddSymbol(_symbol) * * cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -19819,7 +19792,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableSymbolTable_3add_table)) { __Pyx_INCREF(__pyx_t_1); @@ -19841,7 +19814,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_symbols)}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -19862,7 +19835,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob #endif } - /* "_pywrapfst.pyx":1109 + /* "_pywrapfst.pyx":1108 * symbols: A SymbolTable to be merged with the current table. * """ * self._mutable_raw_ptr_or_raise().AddTable( # <<<<<<<<<<<<<< @@ -19871,11 +19844,11 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise"); - __PYX_ERR(0, 1109, __pyx_L1_error) + __PYX_ERR(0, 1108, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L1_error) - /* "_pywrapfst.pyx":1110 + /* "_pywrapfst.pyx":1109 * """ * self._mutable_raw_ptr_or_raise().AddTable( * deref(symbols._raw_ptr_or_raise())) # <<<<<<<<<<<<<< @@ -19884,11 +19857,11 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1110, __pyx_L1_error) + __PYX_ERR(0, 1109, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1110, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) - /* "_pywrapfst.pyx":1109 + /* "_pywrapfst.pyx":1108 * symbols: A SymbolTable to be merged with the current table. * """ * self._mutable_raw_ptr_or_raise().AddTable( # <<<<<<<<<<<<<< @@ -19897,7 +19870,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(struct __pyx_ob */ __pyx_t_6->AddTable((*__pyx_t_7)); - /* "_pywrapfst.pyx":1097 + /* "_pywrapfst.pyx":1096 * return _mutable_raw.AddSymbol(_symbol) * * cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -19971,12 +19944,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_table") < 0)) __PYX_ERR(0, 1097, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_table") < 0)) __PYX_ERR(0, 1096, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -19987,7 +19960,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_table", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1097, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_table", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1096, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20001,7 +19974,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1097, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1096, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_19_MutableSymbolTable_2add_table(((struct __pyx_obj_10_pywrapfst__MutableSymbolTable *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -20028,8 +20001,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_2add_table(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_table", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_symbols, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table(__pyx_v_self, __pyx_v_symbols, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20046,7 +20019,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_2add_table(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":1112 +/* "_pywrapfst.pyx":1111 * deref(symbols._raw_ptr_or_raise())) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< @@ -20083,7 +20056,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableSymbolTable_5set_name)) { __Pyx_INCREF(__pyx_t_1); @@ -20105,7 +20078,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_new_name}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -20126,7 +20099,7 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj #endif } - /* "_pywrapfst.pyx":1113 + /* "_pywrapfst.pyx":1112 * * cpdef void set_name(self, new_name) except *: * self._mutable_raw_ptr_or_raise().SetName(tostring(new_name)) # <<<<<<<<<<<<<< @@ -20135,13 +20108,13 @@ static void __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mutable_raw_ptr_or_raise"); - __PYX_ERR(0, 1113, __pyx_L1_error) + __PYX_ERR(0, 1112, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error) - __pyx_t_7 = __pyx_f_10_pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableSymbolTable *)__pyx_v_self->__pyx_base.__pyx_vtab)->_mutable_raw_ptr_or_raise(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10_pywrapfst_tostring(__pyx_v_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) __pyx_t_6->SetName(__pyx_t_7); - /* "_pywrapfst.pyx":1112 + /* "_pywrapfst.pyx":1111 * deref(symbols._raw_ptr_or_raise())) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< @@ -20214,12 +20187,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_name") < 0)) __PYX_ERR(0, 1112, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_name") < 0)) __PYX_ERR(0, 1111, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -20230,7 +20203,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1112, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1111, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20266,8 +20239,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_4set_name(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_name", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name(__pyx_v_self, __pyx_v_new_name, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20284,7 +20257,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableSymbolTable_4set_name(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":1123 +/* "_pywrapfst.pyx":1122 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20321,7 +20294,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1124 + /* "_pywrapfst.pyx":1123 * * def __repr__(self): * return f"" # <<<<<<<<<<<<<< @@ -20329,7 +20302,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str * cdef SymbolTable_ptr _mutable_raw(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -20339,12 +20312,12 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Fst_SymbolTableView); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 1124, __pyx_L1_error) + __PYX_ERR(0, 1123, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableFstSymbolTableView *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -20356,9 +20329,9 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -20370,14 +20343,14 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1123 + /* "_pywrapfst.pyx":1122 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20398,7 +20371,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26_MutableFstSymbolTableView___repr__(str return __pyx_r; } -/* "_pywrapfst.pyx":1126 +/* "_pywrapfst.pyx":1125 * return f"" * * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -20414,7 +20387,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_26_MutableFstSy const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1127 + /* "_pywrapfst.pyx":1126 * * cdef SymbolTable_ptr _mutable_raw(self): * return (self._mfst.get().MutableInputSymbols() if self._input_side else # <<<<<<<<<<<<<< @@ -20423,18 +20396,18 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_26_MutableFstSy */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1127, __pyx_L1_error) + __PYX_ERR(0, 1126, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_input_side != 0); if (__pyx_t_2) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1127, __pyx_L1_error) + __PYX_ERR(0, 1126, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->MutableInputSymbols(); } else { - /* "_pywrapfst.pyx":1128 + /* "_pywrapfst.pyx":1127 * cdef SymbolTable_ptr _mutable_raw(self): * return (self._mfst.get().MutableInputSymbols() if self._input_side else * self._mfst.get().MutableOutputSymbols()) # <<<<<<<<<<<<<< @@ -20443,14 +20416,14 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_26_MutableFstSy */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1128, __pyx_L1_error) + __PYX_ERR(0, 1127, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->MutableOutputSymbols(); } __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_pywrapfst.pyx":1126 + /* "_pywrapfst.pyx":1125 * return f"" * * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -20466,7 +20439,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_26_MutableFstSy return __pyx_r; } -/* "_pywrapfst.pyx":1148 +/* "_pywrapfst.pyx":1147 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20503,7 +20476,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1149 + /* "_pywrapfst.pyx":1148 * * def __repr__(self): * return f"" # <<<<<<<<<<<<<< @@ -20511,7 +20484,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 * def __init__(self, name=""): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -20521,12 +20494,12 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_SymbolTable); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "name"); - __PYX_ERR(0, 1149, __pyx_L1_error) + __PYX_ERR(0, 1148, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.name(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -20538,9 +20511,9 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 __pyx_t_2 += 6; __Pyx_GIVEREF(__pyx_kp_u_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_at_0x); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -20552,14 +20525,14 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1148 + /* "_pywrapfst.pyx":1147 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20580,7 +20553,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable___repr__(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":1151 +/* "_pywrapfst.pyx":1150 * return f"" * * def __init__(self, name=""): # <<<<<<<<<<<<<< @@ -20624,12 +20597,12 @@ static int __pyx_pw_10_pywrapfst_11SymbolTable_3__init__(PyObject *__pyx_v_self, if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name_2); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1151, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1150, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1151, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1150, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -20643,7 +20616,7 @@ static int __pyx_pw_10_pywrapfst_11SymbolTable_3__init__(PyObject *__pyx_v_self, } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1151, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 1150, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20677,7 +20650,7 @@ static int __pyx_pf_10_pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_10_pyw const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1152 + /* "_pywrapfst.pyx":1151 * * def __init__(self, name=""): * self._smart_table.reset(new fst.SymbolTable(tostring(name))) # <<<<<<<<<<<<<< @@ -20686,12 +20659,12 @@ static int __pyx_pf_10_pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table"); - __PYX_ERR(0, 1152, __pyx_L1_error) + __PYX_ERR(0, 1151, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1151, __pyx_L1_error) __pyx_v_self->_smart_table.reset(new fst::SymbolTable(__pyx_t_1)); - /* "_pywrapfst.pyx":1151 + /* "_pywrapfst.pyx":1150 * return f"" * * def __init__(self, name=""): # <<<<<<<<<<<<<< @@ -20709,7 +20682,7 @@ static int __pyx_pf_10_pywrapfst_11SymbolTable_2__init__(struct __pyx_obj_10_pyw return __pyx_r; } -/* "_pywrapfst.pyx":1154 +/* "_pywrapfst.pyx":1153 * self._smart_table.reset(new fst.SymbolTable(tostring(name))) * * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -20723,7 +20696,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_11SymbolTable__ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1155 + /* "_pywrapfst.pyx":1154 * * cdef SymbolTable_ptr _mutable_raw(self): * return self._smart_table.get() # <<<<<<<<<<<<<< @@ -20732,12 +20705,12 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_11SymbolTable__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table"); - __PYX_ERR(0, 1155, __pyx_L1_error) + __PYX_ERR(0, 1154, __pyx_L1_error) } __pyx_r = __pyx_v_self->_smart_table.get(); goto __pyx_L0; - /* "_pywrapfst.pyx":1154 + /* "_pywrapfst.pyx":1153 * self._smart_table.reset(new fst.SymbolTable(tostring(name))) * * cdef SymbolTable_ptr _mutable_raw(self): # <<<<<<<<<<<<<< @@ -20753,7 +20726,7 @@ static __pyx_t_10_pywrapfst_SymbolTable_ptr __pyx_f_10_pywrapfst_11SymbolTable__ return __pyx_r; } -/* "_pywrapfst.pyx":1157 +/* "_pywrapfst.pyx":1156 * return self._smart_table.get() * * @classmethod # <<<<<<<<<<<<<< @@ -20815,12 +20788,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1156, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1156, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -20831,7 +20804,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1157, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1156, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20874,17 +20847,17 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pywrapfst.pyx":1173 + /* "_pywrapfst.pyx":1172 * """ * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.Read(path_tostring(source))) # <<<<<<<<<<<<<< * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L1_error) __pyx_v__symbols.reset(fst::SymbolTable::Read(__pyx_t_1)); - /* "_pywrapfst.pyx":1174 + /* "_pywrapfst.pyx":1173 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.Read(path_tostring(source))) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -20894,18 +20867,18 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO __pyx_t_2 = (__pyx_v__symbols.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":1175 + /* "_pywrapfst.pyx":1174 * _symbols.reset(fst.SymbolTable.Read(path_tostring(source))) * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<< * return _init_SymbolTable(move(_symbols)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -20927,15 +20900,15 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1175, __pyx_L1_error) + __PYX_ERR(0, 1174, __pyx_L1_error) - /* "_pywrapfst.pyx":1174 + /* "_pywrapfst.pyx":1173 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.Read(path_tostring(source))) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -20944,7 +20917,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO */ } - /* "_pywrapfst.pyx":1176 + /* "_pywrapfst.pyx":1175 * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") * return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<< @@ -20952,13 +20925,13 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1157 + /* "_pywrapfst.pyx":1156 * return self._smart_table.get() * * @classmethod # <<<<<<<<<<<<<< @@ -20980,11 +20953,11 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_4read(CYTHON_UNUSED PyTypeO return __pyx_r; } -/* "_pywrapfst.pyx":1178 +/* "_pywrapfst.pyx":1177 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< - * def read_text(cls, source, bool allow_negative_labels=False): + * def read_text(cls, source, *, sep="\t "): * """ */ @@ -20996,7 +20969,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_11SymbolTable_6read_text, "\n SymbolTable.read_text(source)\n\n Reads symbol table from text file.\n\n This class method creates a new SymbolTable from a symbol table text file.\n\n Args:\n source: The string location of the input text file.\n allow_negative_labels: Should negative labels be allowed? (Not\n recommended; may cause conflicts).\n\n Returns:\n A new SymbolTable instance.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_11SymbolTable_6read_text, "\n SymbolTable.read_text(source, *, sep=\"\t \")\n\n Reads symbol table from text file.\n\n This class method creates a new SymbolTable from a symbol table text file.\n\n Args:\n source: The string location of the input text file.\n sep: Characters to be used as a separator between fields in a textual\n SymbolTable file, encoded as a string. Only the first byte is used.\n\n Returns:\n A new SymbolTable instance.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_11SymbolTable_7read_text = {"read_text", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_11SymbolTable_7read_text, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_11SymbolTable_6read_text}; static PyObject *__pyx_pw_10_pywrapfst_11SymbolTable_7read_text(PyObject *__pyx_v_cls, #if CYTHON_METH_FASTCALL @@ -21006,7 +20979,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_source = 0; - bool __pyx_v_allow_negative_labels; + PyObject *__pyx_v_sep = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif @@ -21027,12 +21000,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_allow_negative_labels,0}; + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_sep,0}; + values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__4)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; @@ -21045,47 +21017,30 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1177, __pyx_L3_error) else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allow_negative_labels); - if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L3_error) - } + } + if (kw_args == 1) { + const Py_ssize_t index = 1; + PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]); + if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1177, __pyx_L3_error) } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_text") < 0)) __PYX_ERR(0, 1178, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_text") < 0)) __PYX_ERR(0, 1177, __pyx_L3_error) } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; } else { - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - break; - default: goto __pyx_L5_argtuple_error; - } + values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } __pyx_v_source = values[0]; - if (values[1]) { - __pyx_v_allow_negative_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_allow_negative_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1179, __pyx_L3_error) - } else { - - /* "_pywrapfst.pyx":1179 - * - * @classmethod - * def read_text(cls, source, bool allow_negative_labels=False): # <<<<<<<<<<<<<< - * """ - * SymbolTable.read_text(source) - */ - __pyx_v_allow_negative_labels = ((bool)0); - } + __pyx_v_sep = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_text", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1178, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_text", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1177, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21099,15 +21054,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10_pywrapfst_11SymbolTable_6read_text(((PyTypeObject*)__pyx_v_cls), __pyx_v_source, __pyx_v_allow_negative_labels); - - /* "_pywrapfst.pyx":1178 - * return _init_SymbolTable(move(_symbols)) - * - * @classmethod # <<<<<<<<<<<<<< - * def read_text(cls, source, bool allow_negative_labels=False): - * """ - */ + __pyx_r = __pyx_pf_10_pywrapfst_11SymbolTable_6read_text(((PyTypeObject*)__pyx_v_cls), __pyx_v_source, __pyx_v_sep); /* function exit code */ { @@ -21120,111 +21067,95 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source, bool __pyx_v_allow_negative_labels) { - std::unique_ptr __pyx_v__opts; +static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_source, PyObject *__pyx_v_sep) { std::unique_ptr __pyx_v__symbols; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations std::string __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + std::string __pyx_t_2; + int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 1); - /* "_pywrapfst.pyx":1196 + /* "_pywrapfst.pyx":1195 * """ - * cdef unique_ptr[fst.SymbolTableTextOptions] _opts - * _opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) # <<<<<<<<<<<<<< - * cdef unique_ptr[fst.SymbolTable] _symbols - * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), - */ - __pyx_v__opts.reset(new fst::SymbolTableTextOptions(__pyx_v_allow_negative_labels)); - - /* "_pywrapfst.pyx":1198 - * _opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) - * cdef unique_ptr[fst.SymbolTable] _symbols - * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), # <<<<<<<<<<<<<< - * deref(_opts))) - * if _symbols.get() == NULL: - */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1198, __pyx_L1_error) - - /* "_pywrapfst.pyx":1199 * cdef unique_ptr[fst.SymbolTable] _symbols - * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), - * deref(_opts))) # <<<<<<<<<<<<<< + * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), tostring(sep))) # <<<<<<<<<<<<<< * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") */ - __pyx_v__symbols.reset(fst::SymbolTable::ReadText(__pyx_t_1, (*__pyx_v__opts))); + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_sep); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_v__symbols.reset(fst::SymbolTable::ReadText(__pyx_t_1, __pyx_t_2)); - /* "_pywrapfst.pyx":1200 - * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), - * deref(_opts))) + /* "_pywrapfst.pyx":1196 + * cdef unique_ptr[fst.SymbolTable] _symbols + * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), tostring(sep))) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< * raise FstIOError(f"Read failed: {source!r}") * return _init_SymbolTable(move(_symbols)) */ - __pyx_t_2 = (__pyx_v__symbols.get() == NULL); - if (unlikely(__pyx_t_2)) { + __pyx_t_3 = (__pyx_v__symbols.get() == NULL); + if (unlikely(__pyx_t_3)) { - /* "_pywrapfst.pyx":1201 - * deref(_opts))) + /* "_pywrapfst.pyx":1197 + * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), tostring(sep))) * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<< * return _init_SymbolTable(move(_symbols)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + __pyx_t_8 = 0; #if CYTHON_UNPACK_METHODS - if (unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_7 = 1; + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_8 = 1; } } #endif { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1201, __pyx_L1_error) + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(0, 1197, __pyx_L1_error) - /* "_pywrapfst.pyx":1200 - * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), - * deref(_opts))) + /* "_pywrapfst.pyx":1196 + * cdef unique_ptr[fst.SymbolTable] _symbols + * _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), tostring(sep))) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< * raise FstIOError(f"Read failed: {source!r}") * return _init_SymbolTable(move(_symbols)) */ } - /* "_pywrapfst.pyx":1202 + /* "_pywrapfst.pyx":1198 * if _symbols.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") * return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<< @@ -21232,26 +21163,26 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED Py * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1178 + /* "_pywrapfst.pyx":1177 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< - * def read_text(cls, source, bool allow_negative_labels=False): + * def read_text(cls, source, *, sep="\t "): * """ */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("_pywrapfst.SymbolTable.read_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -21260,7 +21191,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_6read_text(CYTHON_UNUSED Py return __pyx_r; } -/* "_pywrapfst.pyx":1204 +/* "_pywrapfst.pyx":1200 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< @@ -21325,7 +21256,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -21333,14 +21264,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1204, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, 1); __PYX_ERR(0, 1200, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_fst") < 0)) __PYX_ERR(0, 1204, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_fst") < 0)) __PYX_ERR(0, 1200, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -21349,11 +21280,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_source = values[0]; - __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L3_error) + __pyx_v_input_table = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_input_table == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1204, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_fst", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1200, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21396,17 +21327,17 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_fst", 1); - /* "_pywrapfst.pyx":1226 + /* "_pywrapfst.pyx":1222 * """ * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table)) # <<<<<<<<<<<<<< * if _symbols.get() == NULL: * raise FstIOError(f"Read from FST failed: {source!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1222, __pyx_L1_error) __pyx_v__symbols.reset(fst::FstReadSymbols(__pyx_t_1, __pyx_v_input_table)); - /* "_pywrapfst.pyx":1227 + /* "_pywrapfst.pyx":1223 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table)) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -21416,18 +21347,18 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT __pyx_t_2 = (__pyx_v__symbols.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":1228 + /* "_pywrapfst.pyx":1224 * _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table)) * if _symbols.get() == NULL: * raise FstIOError(f"Read from FST failed: {source!r}") # <<<<<<<<<<<<<< * return _init_SymbolTable(move(_symbols)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_from_FST_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_from_FST_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -21449,15 +21380,15 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1228, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) - /* "_pywrapfst.pyx":1227 + /* "_pywrapfst.pyx":1223 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.FstReadSymbols(path_tostring(source), input_table)) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -21466,7 +21397,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT */ } - /* "_pywrapfst.pyx":1229 + /* "_pywrapfst.pyx":1225 * if _symbols.get() == NULL: * raise FstIOError(f"Read from FST failed: {source!r}") * return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<< @@ -21474,13 +21405,13 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1204 + /* "_pywrapfst.pyx":1200 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< @@ -21502,7 +21433,7 @@ static PyObject *__pyx_pf_10_pywrapfst_11SymbolTable_8read_fst(CYTHON_UNUSED PyT return __pyx_r; } -/* "_pywrapfst.pyx":1232 +/* "_pywrapfst.pyx":1228 * * * cdef _EncodeMapperSymbolTableView _init_EncodeMapperSymbolTableView( # <<<<<<<<<<<<<< @@ -21520,19 +21451,19 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_EncodeMapperSymbolTableView", 1); - /* "_pywrapfst.pyx":1235 + /* "_pywrapfst.pyx":1231 * shared_ptr[fst.EncodeMapperClass] mapper, bool input_side): * cdef _EncodeMapperSymbolTableView _symbols = ( * _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView)) # <<<<<<<<<<<<<< * _symbols._mapper = move(mapper) * _symbols._input_side = input_side */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__EncodeMapperSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__EncodeMapperSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__symbols = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1236 + /* "_pywrapfst.pyx":1232 * cdef _EncodeMapperSymbolTableView _symbols = ( * _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView)) * _symbols._mapper = move(mapper) # <<<<<<<<<<<<<< @@ -21541,11 +21472,11 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1236, __pyx_L1_error) + __PYX_ERR(0, 1232, __pyx_L1_error) } __pyx_v__symbols->_mapper = cython_std::move >(__pyx_v_mapper); - /* "_pywrapfst.pyx":1237 + /* "_pywrapfst.pyx":1233 * _EncodeMapperSymbolTableView.__new__(_EncodeMapperSymbolTableView)) * _symbols._mapper = move(mapper) * _symbols._input_side = input_side # <<<<<<<<<<<<<< @@ -21554,11 +21485,11 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1237, __pyx_L1_error) + __PYX_ERR(0, 1233, __pyx_L1_error) } __pyx_v__symbols->_input_side = __pyx_v_input_side; - /* "_pywrapfst.pyx":1238 + /* "_pywrapfst.pyx":1234 * _symbols._mapper = move(mapper) * _symbols._input_side = input_side * return _symbols # <<<<<<<<<<<<<< @@ -21570,7 +21501,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py __pyx_r = __pyx_v__symbols; goto __pyx_L0; - /* "_pywrapfst.pyx":1232 + /* "_pywrapfst.pyx":1228 * * * cdef _EncodeMapperSymbolTableView _init_EncodeMapperSymbolTableView( # <<<<<<<<<<<<<< @@ -21590,7 +21521,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py return __pyx_r; } -/* "_pywrapfst.pyx":1241 +/* "_pywrapfst.pyx":1237 * * * cdef _FstSymbolTableView _init_FstSymbolTableView(shared_ptr[fst.FstClass] ifst, # <<<<<<<<<<<<<< @@ -21608,19 +21539,19 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_FstSymbolTableView", 1); - /* "_pywrapfst.pyx":1244 + /* "_pywrapfst.pyx":1240 * bool input_side): * cdef _FstSymbolTableView _symbols = ( * _FstSymbolTableView.__new__(_FstSymbolTableView)) # <<<<<<<<<<<<<< * _symbols._fst = move(ifst) * _symbols._input_side = input_side */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__FstSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__FstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__FstSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__FstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__symbols = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1245 + /* "_pywrapfst.pyx":1241 * cdef _FstSymbolTableView _symbols = ( * _FstSymbolTableView.__new__(_FstSymbolTableView)) * _symbols._fst = move(ifst) # <<<<<<<<<<<<<< @@ -21629,11 +21560,11 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst__ */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1245, __pyx_L1_error) + __PYX_ERR(0, 1241, __pyx_L1_error) } __pyx_v__symbols->_fst = cython_std::move >(__pyx_v_ifst); - /* "_pywrapfst.pyx":1246 + /* "_pywrapfst.pyx":1242 * _FstSymbolTableView.__new__(_FstSymbolTableView)) * _symbols._fst = move(ifst) * _symbols._input_side = input_side # <<<<<<<<<<<<<< @@ -21642,11 +21573,11 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst__ */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1246, __pyx_L1_error) + __PYX_ERR(0, 1242, __pyx_L1_error) } __pyx_v__symbols->_input_side = __pyx_v_input_side; - /* "_pywrapfst.pyx":1247 + /* "_pywrapfst.pyx":1243 * _symbols._fst = move(ifst) * _symbols._input_side = input_side * return _symbols # <<<<<<<<<<<<<< @@ -21658,7 +21589,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst__ __pyx_r = __pyx_v__symbols; goto __pyx_L0; - /* "_pywrapfst.pyx":1241 + /* "_pywrapfst.pyx":1237 * * * cdef _FstSymbolTableView _init_FstSymbolTableView(shared_ptr[fst.FstClass] ifst, # <<<<<<<<<<<<<< @@ -21678,7 +21609,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst__ return __pyx_r; } -/* "_pywrapfst.pyx":1250 +/* "_pywrapfst.pyx":1246 * * * cdef _MutableFstSymbolTableView _init_MutableFstSymbolTableView( # <<<<<<<<<<<<<< @@ -21696,19 +21627,19 @@ static struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *__pyx_f_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_MutableFstSymbolTableView", 1); - /* "_pywrapfst.pyx":1254 + /* "_pywrapfst.pyx":1250 * bool input_side): * cdef _MutableFstSymbolTableView _symbols = ( * _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView)) # <<<<<<<<<<<<<< * _symbols._mfst = move(ifst) * _symbols._input_side = input_side */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__MutableFstSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst__MutableFstSymbolTableView(((PyTypeObject *)__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__symbols = ((struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1255 + /* "_pywrapfst.pyx":1251 * cdef _MutableFstSymbolTableView _symbols = ( * _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView)) * _symbols._mfst = move(ifst) # <<<<<<<<<<<<<< @@ -21717,11 +21648,11 @@ static struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *__pyx_f_10_pywr */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 1255, __pyx_L1_error) + __PYX_ERR(0, 1251, __pyx_L1_error) } __pyx_v__symbols->_mfst = cython_std::move >(__pyx_v_ifst); - /* "_pywrapfst.pyx":1256 + /* "_pywrapfst.pyx":1252 * _MutableFstSymbolTableView.__new__(_MutableFstSymbolTableView)) * _symbols._mfst = move(ifst) * _symbols._input_side = input_side # <<<<<<<<<<<<<< @@ -21730,11 +21661,11 @@ static struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *__pyx_f_10_pywr */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_input_side"); - __PYX_ERR(0, 1256, __pyx_L1_error) + __PYX_ERR(0, 1252, __pyx_L1_error) } __pyx_v__symbols->_input_side = __pyx_v_input_side; - /* "_pywrapfst.pyx":1257 + /* "_pywrapfst.pyx":1253 * _symbols._mfst = move(ifst) * _symbols._input_side = input_side * return _symbols # <<<<<<<<<<<<<< @@ -21746,7 +21677,7 @@ static struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *__pyx_f_10_pywr __pyx_r = __pyx_v__symbols; goto __pyx_L0; - /* "_pywrapfst.pyx":1250 + /* "_pywrapfst.pyx":1246 * * * cdef _MutableFstSymbolTableView _init_MutableFstSymbolTableView( # <<<<<<<<<<<<<< @@ -21766,7 +21697,7 @@ static struct __pyx_obj_10_pywrapfst__MutableFstSymbolTableView *__pyx_f_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":1260 +/* "_pywrapfst.pyx":1256 * * * cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): # <<<<<<<<<<<<<< @@ -21784,19 +21715,19 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__init_Sym int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_SymbolTable", 1); - /* "_pywrapfst.pyx":1261 + /* "_pywrapfst.pyx":1257 * * cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): * cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable) # <<<<<<<<<<<<<< * _symbols._smart_table = move(symbols) * return _symbols */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_10_pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_SymbolTable(((PyTypeObject *)__pyx_ptype_10_pywrapfst_SymbolTable), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__symbols = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1262 + /* "_pywrapfst.pyx":1258 * cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): * cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable) * _symbols._smart_table = move(symbols) # <<<<<<<<<<<<<< @@ -21805,11 +21736,11 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__init_Sym */ if (unlikely(((PyObject *)__pyx_v__symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_smart_table"); - __PYX_ERR(0, 1262, __pyx_L1_error) + __PYX_ERR(0, 1258, __pyx_L1_error) } __pyx_v__symbols->_smart_table = cython_std::move >(__pyx_v_symbols); - /* "_pywrapfst.pyx":1263 + /* "_pywrapfst.pyx":1259 * cdef SymbolTable _symbols = SymbolTable.__new__(SymbolTable) * _symbols._smart_table = move(symbols) * return _symbols # <<<<<<<<<<<<<< @@ -21821,7 +21752,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__init_Sym __pyx_r = __pyx_v__symbols; goto __pyx_L0; - /* "_pywrapfst.pyx":1260 + /* "_pywrapfst.pyx":1256 * * * cdef SymbolTable _init_SymbolTable(unique_ptr[fst.SymbolTable] symbols): # <<<<<<<<<<<<<< @@ -21841,7 +21772,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__init_Sym return __pyx_r; } -/* "_pywrapfst.pyx":1266 +/* "_pywrapfst.pyx":1262 * * * cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<< @@ -21871,7 +21802,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 1); - /* "_pywrapfst.pyx":1268 + /* "_pywrapfst.pyx":1264 * cpdef SymbolTable _read_SymbolTable_from_string(string state): * cdef stringstream _sstrm * _sstrm << state # <<<<<<<<<<<<<< @@ -21880,7 +21811,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym */ (void)((__pyx_v__sstrm << __pyx_v_state)); - /* "_pywrapfst.pyx":1270 + /* "_pywrapfst.pyx":1266 * _sstrm << state * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"")) # <<<<<<<<<<<<<< @@ -21889,7 +21820,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym */ __pyx_v__symbols.reset(fst::SymbolTable::Read(__pyx_v__sstrm, __pyx_k_pywrapfst)); - /* "_pywrapfst.pyx":1271 + /* "_pywrapfst.pyx":1267 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"")) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -21899,14 +21830,14 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym __pyx_t_1 = (__pyx_v__symbols.get() == NULL); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":1272 + /* "_pywrapfst.pyx":1268 * _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"")) * if _symbols.get() == NULL: * raise FstIOError("Read from string failed") # <<<<<<<<<<<<<< * return _init_SymbolTable(move(_symbols)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -21926,15 +21857,15 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Read_from_string_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __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, 1272, __pyx_L1_error) + __PYX_ERR(0, 1268, __pyx_L1_error) - /* "_pywrapfst.pyx":1271 + /* "_pywrapfst.pyx":1267 * cdef unique_ptr[fst.SymbolTable] _symbols * _symbols.reset(fst.SymbolTable.ReadStream(_sstrm, b"")) * if _symbols.get() == NULL: # <<<<<<<<<<<<<< @@ -21943,7 +21874,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym */ } - /* "_pywrapfst.pyx":1273 + /* "_pywrapfst.pyx":1269 * if _symbols.get() == NULL: * raise FstIOError("Read from string failed") * return _init_SymbolTable(move(_symbols)) # <<<<<<<<<<<<<< @@ -21951,13 +21882,13 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst__read_Sym * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(cython_std::move >(__pyx_v__symbols))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1266 + /* "_pywrapfst.pyx":1262 * * * cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<< @@ -22031,23 +21962,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_SymbolTable_from_string") < 0)) __PYX_ERR(0, 1266, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_SymbolTable_from_string") < 0)) __PYX_ERR(0, 1262, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L3_error) + __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read_SymbolTable_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1266, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read_SymbolTable_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1262, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22083,7 +22014,7 @@ static PyObject *__pyx_pf_10_pywrapfst_8_read_SymbolTable_from_string(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_SymbolTable_from_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_SymbolTable_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22100,7 +22031,7 @@ static PyObject *__pyx_pf_10_pywrapfst_8_read_SymbolTable_from_string(CYTHON_UNU return __pyx_r; } -/* "_pywrapfst.pyx":1279 +/* "_pywrapfst.pyx":1275 * * * cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -22125,7 +22056,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_compact_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compact_symbol_table", 1); - /* "_pywrapfst.pyx":1291 + /* "_pywrapfst.pyx":1287 * A new compacted SymbolTable. * """ * return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable( # <<<<<<<<<<<<<< @@ -22134,7 +22065,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_compact_s */ __Pyx_XDECREF((PyObject *)__pyx_r); - /* "_pywrapfst.pyx":1292 + /* "_pywrapfst.pyx":1288 * """ * return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable( * deref(symbols._raw_ptr_or_raise())))) # <<<<<<<<<<<<<< @@ -22143,24 +22074,24 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_compact_s */ if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1292, __pyx_L1_error) + __PYX_ERR(0, 1288, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1288, __pyx_L1_error) - /* "_pywrapfst.pyx":1291 + /* "_pywrapfst.pyx":1287 * A new compacted SymbolTable. * """ * return _init_SymbolTable(WrapUnique(fst.CompactSymbolTable( # <<<<<<<<<<<<<< * deref(symbols._raw_ptr_or_raise())))) * */ - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(fst::CompactSymbolTable((*__pyx_t_1))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(fst::CompactSymbolTable((*__pyx_t_1))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1279 + /* "_pywrapfst.pyx":1275 * * * cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -22233,12 +22164,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1275, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compact_symbol_table") < 0)) __PYX_ERR(0, 1279, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compact_symbol_table") < 0)) __PYX_ERR(0, 1275, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -22249,7 +22180,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compact_symbol_table", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1279, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compact_symbol_table", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1275, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22263,7 +22194,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1279, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1275, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10compact_symbol_table(__pyx_self, __pyx_v_symbols); /* function exit code */ @@ -22290,7 +22221,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10compact_symbol_table(CYTHON_UNUSED PyOb int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compact_symbol_table", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_compact_symbol_table(__pyx_v_symbols, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_compact_symbol_table(__pyx_v_symbols, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22307,7 +22238,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10compact_symbol_table(CYTHON_UNUSED PyOb return __pyx_r; } -/* "_pywrapfst.pyx":1295 +/* "_pywrapfst.pyx":1291 * * * cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<< @@ -22333,7 +22264,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_merge_sym int __pyx_clineno = 0; __Pyx_RefNannySetupContext("merge_symbol_table", 1); - /* "_pywrapfst.pyx":1318 + /* "_pywrapfst.pyx":1314 * A new merged SymbolTable. * """ * return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( # <<<<<<<<<<<<<< @@ -22342,7 +22273,7 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_merge_sym */ __Pyx_XDECREF((PyObject *)__pyx_r); - /* "_pywrapfst.pyx":1319 + /* "_pywrapfst.pyx":1315 * """ * return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( * deref(lhs._raw_ptr_or_raise()), # <<<<<<<<<<<<<< @@ -22351,11 +22282,11 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_merge_sym */ if (unlikely(((PyObject *)__pyx_v_lhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1319, __pyx_L1_error) + __PYX_ERR(0, 1315, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_lhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_lhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_lhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_lhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1315, __pyx_L1_error) - /* "_pywrapfst.pyx":1320 + /* "_pywrapfst.pyx":1316 * return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( * deref(lhs._raw_ptr_or_raise()), * deref(rhs._raw_ptr_or_raise()), # <<<<<<<<<<<<<< @@ -22364,24 +22295,24 @@ static struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_f_10_pywrapfst_merge_sym */ if (unlikely(((PyObject *)__pyx_v_rhs) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1320, __pyx_L1_error) + __PYX_ERR(0, 1316, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_rhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_rhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_rhs->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_rhs); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error) - /* "_pywrapfst.pyx":1318 + /* "_pywrapfst.pyx":1314 * A new merged SymbolTable. * """ * return _init_SymbolTable(WrapUnique(fst.MergeSymbolTable( # <<<<<<<<<<<<<< * deref(lhs._raw_ptr_or_raise()), * deref(rhs._raw_ptr_or_raise()), */ - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(fst::MergeSymbolTable((*__pyx_t_1), (*__pyx_t_2), NULL)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_SymbolTable(fst::WrapUnique(fst::MergeSymbolTable((*__pyx_t_1), (*__pyx_t_2), NULL)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1295 + /* "_pywrapfst.pyx":1291 * * * cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<< @@ -22457,7 +22388,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -22465,14 +22396,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1295, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, 1); __PYX_ERR(0, 1291, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1295, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "merge_symbol_table") < 0)) __PYX_ERR(0, 1291, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -22485,7 +22416,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1295, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("merge_symbol_table", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1291, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22499,8 +22430,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "lhs", 0))) __PYX_ERR(0, 1295, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "rhs", 0))) __PYX_ERR(0, 1296, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lhs), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "lhs", 0))) __PYX_ERR(0, 1291, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rhs), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "rhs", 0))) __PYX_ERR(0, 1292, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_12merge_symbol_table(__pyx_self, __pyx_v_lhs, __pyx_v_rhs); /* function exit code */ @@ -22527,7 +22458,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12merge_symbol_table(CYTHON_UNUSED PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("merge_symbol_table", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_merge_symbol_table(__pyx_v_lhs, __pyx_v_rhs, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22544,7 +22475,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12merge_symbol_table(CYTHON_UNUSED PyObje return __pyx_r; } -/* "_pywrapfst.pyx":1334 +/* "_pywrapfst.pyx":1330 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -22580,7 +22511,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator___repr__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1335 + /* "_pywrapfst.pyx":1331 * * def __repr__(self): * return f"<_SymbolTableIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -22588,7 +22519,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator___repr__(struct __ * def __init__(self, SymbolTableView symbols): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -22596,9 +22527,9 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator___repr__(struct __ __pyx_t_2 += 27; __Pyx_GIVEREF(__pyx_kp_u_SymbolTableIterator_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_SymbolTableIterator_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -22610,14 +22541,14 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator___repr__(struct __ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1334 + /* "_pywrapfst.pyx":1330 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -22638,7 +22569,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator___repr__(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":1337 +/* "_pywrapfst.pyx":1333 * return f"<_SymbolTableIterator at 0x{id(self):x}>" * * def __init__(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -22682,12 +22613,12 @@ static int __pyx_pw_10_pywrapfst_20_SymbolTableIterator_3__init__(PyObject *__py (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1337, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1337, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1333, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -22698,7 +22629,7 @@ static int __pyx_pw_10_pywrapfst_20_SymbolTableIterator_3__init__(PyObject *__py } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1337, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1333, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22712,7 +22643,7 @@ static int __pyx_pw_10_pywrapfst_20_SymbolTableIterator_3__init__(PyObject *__py __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1337, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1333, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(((struct __pyx_obj_10_pywrapfst__SymbolTableIterator *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -22739,7 +22670,7 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":1338 + /* "_pywrapfst.pyx":1334 * * def __init__(self, SymbolTableView symbols): * self._table = symbols # <<<<<<<<<<<<<< @@ -22748,7 +22679,7 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1338, __pyx_L1_error) + __PYX_ERR(0, 1334, __pyx_L1_error) } __Pyx_INCREF((PyObject *)__pyx_v_symbols); __Pyx_GIVEREF((PyObject *)__pyx_v_symbols); @@ -22756,7 +22687,7 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o __Pyx_DECREF((PyObject *)__pyx_v_self->_table); __pyx_v_self->_table = __pyx_v_symbols; - /* "_pywrapfst.pyx":1339 + /* "_pywrapfst.pyx":1335 * def __init__(self, SymbolTableView symbols): * self._table = symbols * self._siter.reset( # <<<<<<<<<<<<<< @@ -22765,10 +22696,10 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1339, __pyx_L1_error) + __PYX_ERR(0, 1335, __pyx_L1_error) } - /* "_pywrapfst.pyx":1340 + /* "_pywrapfst.pyx":1336 * self._table = symbols * self._siter.reset( * new fst.SymbolTableIterator(self._table._raw_ptr_or_raise().begin())) # <<<<<<<<<<<<<< @@ -22777,15 +22708,15 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1340, __pyx_L1_error) + __PYX_ERR(0, 1336, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_table) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1340, __pyx_L1_error) + __PYX_ERR(0, 1336, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1336, __pyx_L1_error) - /* "_pywrapfst.pyx":1339 + /* "_pywrapfst.pyx":1335 * def __init__(self, SymbolTableView symbols): * self._table = symbols * self._siter.reset( # <<<<<<<<<<<<<< @@ -22794,7 +22725,7 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o */ __pyx_v_self->_siter.reset(new fst::SymbolTable::iterator(__pyx_t_1->begin())); - /* "_pywrapfst.pyx":1337 + /* "_pywrapfst.pyx":1333 * return f"<_SymbolTableIterator at 0x{id(self):x}>" * * def __init__(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -22813,7 +22744,7 @@ static int __pyx_pf_10_pywrapfst_20_SymbolTableIterator_2__init__(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":1343 +/* "_pywrapfst.pyx":1339 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -22841,7 +22772,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_4__iter__(struct _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 1); - /* "_pywrapfst.pyx":1344 + /* "_pywrapfst.pyx":1340 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -22853,7 +22784,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_4__iter__(struct _ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":1343 + /* "_pywrapfst.pyx":1339 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -22868,7 +22799,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_4__iter__(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":1347 +/* "_pywrapfst.pyx":1343 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -22907,7 +22838,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 1); - /* "_pywrapfst.pyx":1348 + /* "_pywrapfst.pyx":1344 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self._table._raw_ptr_or_raise().end() == deref(self._siter): # <<<<<<<<<<<<<< @@ -22916,21 +22847,21 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_table"); - __PYX_ERR(0, 1348, __pyx_L1_error) + __PYX_ERR(0, 1344, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self->_table) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1348, __pyx_L1_error) + __PYX_ERR(0, 1344, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_self->_table->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_self->_table); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1348, __pyx_L1_error) + __PYX_ERR(0, 1344, __pyx_L1_error) } __pyx_t_2 = ((__pyx_t_1->end() == (*__pyx_v_self->_siter)) != 0); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":1349 + /* "_pywrapfst.pyx":1345 * def __next__(self): * if self._table._raw_ptr_or_raise().end() == deref(self._siter): * raise StopIteration # <<<<<<<<<<<<<< @@ -22940,7 +22871,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ __pyx_error_without_exception = 1; goto __pyx_L1_error;; - /* "_pywrapfst.pyx":1348 + /* "_pywrapfst.pyx":1344 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self._table._raw_ptr_or_raise().end() == deref(self._siter): # <<<<<<<<<<<<<< @@ -22949,7 +22880,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ */ } - /* "_pywrapfst.pyx":1350 + /* "_pywrapfst.pyx":1346 * if self._table._raw_ptr_or_raise().end() == deref(self._siter): * raise StopIteration * cdef int64_t _label = self._siter.get().Pair().Label() # <<<<<<<<<<<<<< @@ -22958,11 +22889,11 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1350, __pyx_L1_error) + __PYX_ERR(0, 1346, __pyx_L1_error) } __pyx_v__label = __pyx_v_self->_siter.get()->operator*().Label(); - /* "_pywrapfst.pyx":1351 + /* "_pywrapfst.pyx":1347 * raise StopIteration * cdef int64_t _label = self._siter.get().Pair().Label() * cdef string _symbol = self._siter.get().Pair().Symbol() # <<<<<<<<<<<<<< @@ -22971,11 +22902,11 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1351, __pyx_L1_error) + __PYX_ERR(0, 1347, __pyx_L1_error) } __pyx_v__symbol = __pyx_v_self->_siter.get()->operator*().Symbol(); - /* "_pywrapfst.pyx":1352 + /* "_pywrapfst.pyx":1348 * cdef int64_t _label = self._siter.get().Pair().Label() * cdef string _symbol = self._siter.get().Pair().Symbol() * inc(deref(self._siter)) # <<<<<<<<<<<<<< @@ -22984,11 +22915,11 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 1352, __pyx_L1_error) + __PYX_ERR(0, 1348, __pyx_L1_error) } (void)((++(*__pyx_v_self->_siter))); - /* "_pywrapfst.pyx":1353 + /* "_pywrapfst.pyx":1349 * cdef string _symbol = self._siter.get().Pair().Symbol() * inc(deref(self._siter)) * return (_label, _symbol) # <<<<<<<<<<<<<< @@ -22996,23 +22927,23 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_6__next__(struct _ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v__label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v__label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v__symbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 1349, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1347 + /* "_pywrapfst.pyx":1343 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -23249,7 +23180,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20_SymbolTableIterator_10__setstate_cytho return __pyx_r; } -/* "_pywrapfst.pyx":1382 +/* "_pywrapfst.pyx":1378 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -23285,7 +23216,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1383 + /* "_pywrapfst.pyx":1379 * * def __repr__(self): * return f"" # <<<<<<<<<<<<<< @@ -23293,7 +23224,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_ * def __init__(self, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -23301,9 +23232,9 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_ __pyx_t_2 += 19; __Pyx_GIVEREF(__pyx_kp_u_EncodeMapper_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_EncodeMapper_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -23315,14 +23246,14 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1382 + /* "_pywrapfst.pyx":1378 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -23343,7 +23274,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper___repr__(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":1385 +/* "_pywrapfst.pyx":1381 * return f"" * * def __init__(self, # <<<<<<<<<<<<<< @@ -23393,26 +23324,26 @@ static int __pyx_pw_10_pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encode_labels); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encode_weights); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1385, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1381, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -23428,10 +23359,10 @@ static int __pyx_pw_10_pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self } __pyx_v_arc_type = values[0]; if (values[1]) { - __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L3_error) + __pyx_v_encode_labels = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_encode_labels == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1383, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1387 + /* "_pywrapfst.pyx":1383 * def __init__(self, * arc_type="standard", * bool encode_labels=False, # <<<<<<<<<<<<<< @@ -23441,10 +23372,10 @@ static int __pyx_pw_10_pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self __pyx_v_encode_labels = ((bool)0); } if (values[2]) { - __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1388, __pyx_L3_error) + __pyx_v_encode_weights = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_encode_weights == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1384, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1388 + /* "_pywrapfst.pyx":1384 * arc_type="standard", * bool encode_labels=False, * bool encode_weights=False): # <<<<<<<<<<<<<< @@ -23456,7 +23387,7 @@ static int __pyx_pw_10_pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1385, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 1381, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23472,7 +23403,7 @@ static int __pyx_pw_10_pywrapfst_12EncodeMapper_3__init__(PyObject *__pyx_v_self __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc_type, __pyx_v_encode_labels, __pyx_v_encode_weights); - /* "_pywrapfst.pyx":1385 + /* "_pywrapfst.pyx":1381 * return f"" * * def __init__(self, # <<<<<<<<<<<<<< @@ -23507,7 +23438,7 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":1389 + /* "_pywrapfst.pyx":1385 * bool encode_labels=False, * bool encode_weights=False): * cdef uint8_t _flags = fst.GetEncodeFlags(encode_labels, encode_weights) # <<<<<<<<<<<<<< @@ -23516,7 +23447,7 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py */ __pyx_v__flags = fst::script::GetEncodeFlags(__pyx_v_encode_labels, __pyx_v_encode_weights); - /* "_pywrapfst.pyx":1390 + /* "_pywrapfst.pyx":1386 * bool encode_weights=False): * cdef uint8_t _flags = fst.GetEncodeFlags(encode_labels, encode_weights) * self._mapper.reset( # <<<<<<<<<<<<<< @@ -23525,19 +23456,19 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1390, __pyx_L1_error) + __PYX_ERR(0, 1386, __pyx_L1_error) } - /* "_pywrapfst.pyx":1391 + /* "_pywrapfst.pyx":1387 * cdef uint8_t _flags = fst.GetEncodeFlags(encode_labels, encode_weights) * self._mapper.reset( * new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE)) # <<<<<<<<<<<<<< * if self._mapper.get() == NULL: * raise FstOpError(f"Unknown arc type: {arc_type!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L1_error) - /* "_pywrapfst.pyx":1390 + /* "_pywrapfst.pyx":1386 * bool encode_weights=False): * cdef uint8_t _flags = fst.GetEncodeFlags(encode_labels, encode_weights) * self._mapper.reset( # <<<<<<<<<<<<<< @@ -23546,7 +23477,7 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py */ __pyx_v_self->_mapper.reset(new fst::script::EncodeMapperClass(__pyx_t_1, __pyx_v__flags, fst::ENCODE)); - /* "_pywrapfst.pyx":1392 + /* "_pywrapfst.pyx":1388 * self._mapper.reset( * new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE)) * if self._mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -23555,23 +23486,23 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1392, __pyx_L1_error) + __PYX_ERR(0, 1388, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_self->_mapper.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":1393 + /* "_pywrapfst.pyx":1389 * new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE)) * if self._mapper.get() == NULL: * raise FstOpError(f"Unknown arc type: {arc_type!r}") # <<<<<<<<<<<<<< * * # Python's equivalent to operator(). */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -23593,15 +23524,15 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1393, __pyx_L1_error) + __PYX_ERR(0, 1389, __pyx_L1_error) - /* "_pywrapfst.pyx":1392 + /* "_pywrapfst.pyx":1388 * self._mapper.reset( * new fst.EncodeMapperClass(tostring(arc_type), _flags, fst.ENCODE)) * if self._mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -23610,7 +23541,7 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py */ } - /* "_pywrapfst.pyx":1385 + /* "_pywrapfst.pyx":1381 * return f"" * * def __init__(self, # <<<<<<<<<<<<<< @@ -23633,7 +23564,7 @@ static int __pyx_pf_10_pywrapfst_12EncodeMapper_2__init__(struct __pyx_obj_10_py return __pyx_r; } -/* "_pywrapfst.pyx":1397 +/* "_pywrapfst.pyx":1393 * # Python's equivalent to operator(). * * def __call__(self, Arc arc): # <<<<<<<<<<<<<< @@ -23681,12 +23612,12 @@ static PyObject *__pyx_pw_10_pywrapfst_12EncodeMapper_5__call__(PyObject *__pyx_ (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1397, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1393, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1397, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 1393, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -23697,7 +23628,7 @@ static PyObject *__pyx_pw_10_pywrapfst_12EncodeMapper_5__call__(PyObject *__pyx_ } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1397, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1393, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23711,7 +23642,7 @@ static PyObject *__pyx_pw_10_pywrapfst_12EncodeMapper_5__call__(PyObject *__pyx_ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1397, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 1393, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_12EncodeMapper_4__call__(((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_arc); /* function exit code */ @@ -23738,7 +23669,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_4__call__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 1); - /* "_pywrapfst.pyx":1413 + /* "_pywrapfst.pyx":1409 * FstOpError: Incompatible or invalid weight. * """ * return _init_Arc(self._mapper.get().__call__(deref(arc._arc))) # <<<<<<<<<<<<<< @@ -23748,19 +23679,19 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_4__call__(struct __pyx_obj __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1413, __pyx_L1_error) + __PYX_ERR(0, 1409, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 1413, __pyx_L1_error) + __PYX_ERR(0, 1409, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_mapper.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_mapper.get()->operator()((*__pyx_v_arc->_arc)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1397 + /* "_pywrapfst.pyx":1393 * # Python's equivalent to operator(). * * def __call__(self, Arc arc): # <<<<<<<<<<<<<< @@ -23779,7 +23710,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_4__call__(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":1417 +/* "_pywrapfst.pyx":1413 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -23839,7 +23770,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_6__reduce__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 1); - /* "_pywrapfst.pyx":1418 + /* "_pywrapfst.pyx":1414 * * def __reduce__(self): * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -23847,32 +23778,32 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_6__reduce__(struct __pyx_o * cpdef string arc_type(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_EncodeMapper_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_EncodeMapper_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 1418, __pyx_L1_error) + __PYX_ERR(0, 1414, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1417 + /* "_pywrapfst.pyx":1413 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -23893,7 +23824,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_6__reduce__(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":1420 +/* "_pywrapfst.pyx":1416 * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -23930,7 +23861,7 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __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, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_9arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -23952,11 +23883,11 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1416, __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; @@ -23975,7 +23906,7 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj #endif } - /* "_pywrapfst.pyx":1426 + /* "_pywrapfst.pyx":1422 * Returns a string indicating the arc type. * """ * return self._mapper.get().ArcType() # <<<<<<<<<<<<<< @@ -23984,12 +23915,12 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1426, __pyx_L1_error) + __PYX_ERR(0, 1422, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mapper.get()->ArcType(); goto __pyx_L0; - /* "_pywrapfst.pyx":1420 + /* "_pywrapfst.pyx":1416 * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -24062,8 +23993,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_8arc_type(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arc_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -24080,7 +24011,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_8arc_type(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":1428 +/* "_pywrapfst.pyx":1424 * return self._mapper.get().ArcType() * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -24117,7 +24048,7 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __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, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_11weight_type)) { __Pyx_INCREF(__pyx_t_1); @@ -24139,11 +24070,11 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(struct __pyx_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1424, __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; @@ -24162,7 +24093,7 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(struct __pyx_ #endif } - /* "_pywrapfst.pyx":1434 + /* "_pywrapfst.pyx":1430 * Returns a string indicating the weight type. * """ * return self._mapper.get().WeightType() # <<<<<<<<<<<<<< @@ -24171,12 +24102,12 @@ static std::string __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1434, __pyx_L1_error) + __PYX_ERR(0, 1430, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mapper.get()->WeightType(); goto __pyx_L0; - /* "_pywrapfst.pyx":1428 + /* "_pywrapfst.pyx":1424 * return self._mapper.get().ArcType() * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -24249,8 +24180,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_10weight_type(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("weight_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1428, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -24267,7 +24198,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_10weight_type(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":1436 +/* "_pywrapfst.pyx":1432 * return self._mapper.get().WeightType() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -24304,7 +24235,7 @@ static uint8_t __pyx_f_10_pywrapfst_12EncodeMapper_flags(struct __pyx_obj_10_pyw if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __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, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_13flags)) { __Pyx_INCREF(__pyx_t_1); @@ -24326,11 +24257,11 @@ static uint8_t __pyx_f_10_pywrapfst_12EncodeMapper_flags(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1432, __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; @@ -24349,7 +24280,7 @@ static uint8_t __pyx_f_10_pywrapfst_12EncodeMapper_flags(struct __pyx_obj_10_pyw #endif } - /* "_pywrapfst.pyx":1442 + /* "_pywrapfst.pyx":1438 * Returns the mapper's flags. * """ * return self._mapper.get().Flags() # <<<<<<<<<<<<<< @@ -24358,12 +24289,12 @@ static uint8_t __pyx_f_10_pywrapfst_12EncodeMapper_flags(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1442, __pyx_L1_error) + __PYX_ERR(0, 1438, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mapper.get()->Flags(); goto __pyx_L0; - /* "_pywrapfst.pyx":1436 + /* "_pywrapfst.pyx":1432 * return self._mapper.get().WeightType() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -24436,8 +24367,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_12flags(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flags", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -24454,7 +24385,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_12flags(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":1444 +/* "_pywrapfst.pyx":1440 * return self._mapper.get().Flags() * * def properties(self, mask): # <<<<<<<<<<<<<< @@ -24516,12 +24447,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1444, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "properties") < 0)) __PYX_ERR(0, 1444, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "properties") < 0)) __PYX_ERR(0, 1440, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -24532,7 +24463,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("properties", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("properties", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1440, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24573,7 +24504,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_14properties(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("properties", 1); - /* "_pywrapfst.pyx":1459 + /* "_pywrapfst.pyx":1455 * """ * * return FstProperties(self._mapper.get().Properties(mask.value)) # <<<<<<<<<<<<<< @@ -24581,17 +24512,17 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_14properties(struct __pyx_ * @classmethod */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1459, __pyx_L1_error) + __PYX_ERR(0, 1455, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_mapper.get()->Properties(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_mapper.get()->Properties(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -24612,7 +24543,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_14properties(struct __pyx_ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -24620,7 +24551,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_14properties(struct __pyx_ __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1444 + /* "_pywrapfst.pyx":1440 * return self._mapper.get().Flags() * * def properties(self, mask): # <<<<<<<<<<<<<< @@ -24642,7 +24573,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_14properties(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":1461 +/* "_pywrapfst.pyx":1457 * return FstProperties(self._mapper.get().Properties(mask.value)) * * @classmethod # <<<<<<<<<<<<<< @@ -24704,12 +24635,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1461, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1461, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1457, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -24720,7 +24651,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1461, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1457, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24763,16 +24694,16 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pywrapfst.pyx":1478 + /* "_pywrapfst.pyx":1474 * """ * cdef unique_ptr[fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.Read( * path_tostring(source)) # <<<<<<<<<<<<<< * if _mapper.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1474, __pyx_L1_error) - /* "_pywrapfst.pyx":1477 + /* "_pywrapfst.pyx":1473 * A new EncodeMapper instance. * """ * cdef unique_ptr[fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.Read( # <<<<<<<<<<<<<< @@ -24781,7 +24712,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp */ __pyx_v__mapper = fst::script::EncodeMapperClass::Read(__pyx_t_1); - /* "_pywrapfst.pyx":1479 + /* "_pywrapfst.pyx":1475 * cdef unique_ptr[fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.Read( * path_tostring(source)) * if _mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -24791,18 +24722,18 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp __pyx_t_2 = (__pyx_v__mapper.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":1480 + /* "_pywrapfst.pyx":1476 * path_tostring(source)) * if _mapper.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<< * return _init_EncodeMapper(_mapper.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1480, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -24824,15 +24755,15 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1480, __pyx_L1_error) + __PYX_ERR(0, 1476, __pyx_L1_error) - /* "_pywrapfst.pyx":1479 + /* "_pywrapfst.pyx":1475 * cdef unique_ptr[fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.Read( * path_tostring(source)) * if _mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -24841,7 +24772,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp */ } - /* "_pywrapfst.pyx":1481 + /* "_pywrapfst.pyx":1477 * if _mapper.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") * return _init_EncodeMapper(_mapper.release()) # <<<<<<<<<<<<<< @@ -24849,13 +24780,13 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp * @staticmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1461 + /* "_pywrapfst.pyx":1457 * return FstProperties(self._mapper.get().Properties(mask.value)) * * @classmethod # <<<<<<<<<<<<<< @@ -24877,7 +24808,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_16read(CYTHON_UNUSED PyTyp return __pyx_r; } -/* "_pywrapfst.pyx":1483 +/* "_pywrapfst.pyx":1479 * return _init_EncodeMapper(_mapper.release()) * * @staticmethod # <<<<<<<<<<<<<< @@ -24939,12 +24870,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1479, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 1483, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 1479, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -24955,7 +24886,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1483, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1479, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24992,7 +24923,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_18read_from_string(PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_from_string", 1); - /* "_pywrapfst.pyx":1499 + /* "_pywrapfst.pyx":1495 * FstIOError: Read failed. * """ * return _read_EncodeMapper_from_string(state) # <<<<<<<<<<<<<< @@ -25000,14 +24931,14 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_18read_from_string(PyObjec * cpdef void write(self, source) except *: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1499, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__read_EncodeMapper_from_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1499, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__read_EncodeMapper_from_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1483 + /* "_pywrapfst.pyx":1479 * return _init_EncodeMapper(_mapper.release()) * * @staticmethod # <<<<<<<<<<<<<< @@ -25026,7 +24957,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_18read_from_string(PyObjec return __pyx_r; } -/* "_pywrapfst.pyx":1501 +/* "_pywrapfst.pyx":1497 * return _read_EncodeMapper_from_string(state) * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -25063,7 +24994,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __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, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_21write)) { __Pyx_INCREF(__pyx_t_1); @@ -25085,7 +25016,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1501, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -25106,7 +25037,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap #endif } - /* "_pywrapfst.pyx":1514 + /* "_pywrapfst.pyx":1510 * FstIOError: Write failed. * """ * if not self._mapper.get().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -25115,24 +25046,24 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1514, __pyx_L1_error) + __PYX_ERR(0, 1510, __pyx_L1_error) } - __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1510, __pyx_L1_error) __pyx_t_7 = (!(__pyx_v_self->_mapper.get()->Write(__pyx_t_6) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pywrapfst.pyx":1515 + /* "_pywrapfst.pyx":1511 * """ * if not self._mapper.get().Write(path_tostring(source)): * raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<< * * cpdef bytes write_to_string(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -25154,15 +25085,15 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1515, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __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, 1515, __pyx_L1_error) + __PYX_ERR(0, 1511, __pyx_L1_error) - /* "_pywrapfst.pyx":1514 + /* "_pywrapfst.pyx":1510 * FstIOError: Write failed. * """ * if not self._mapper.get().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -25171,7 +25102,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper_write(struct __pyx_obj_10_pywrap */ } - /* "_pywrapfst.pyx":1501 + /* "_pywrapfst.pyx":1497 * return _read_EncodeMapper_from_string(state) * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -25245,12 +25176,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1501, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 1497, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -25261,7 +25192,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1501, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1497, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25297,8 +25228,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_20write(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_12EncodeMapper_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_f_10_pywrapfst_12EncodeMapper_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25315,7 +25246,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_20write(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":1517 +/* "_pywrapfst.pyx":1513 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -25353,7 +25284,7 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_23write_to_string)) { __Pyx_XDECREF(__pyx_r); @@ -25376,11 +25307,11 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1517, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 1513, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25399,7 +25330,7 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py #endif } - /* "_pywrapfst.pyx":1530 + /* "_pywrapfst.pyx":1526 * """ * cdef stringstream _sstrm * if not self._mapper.get().WriteStream(_sstrm, b""): # <<<<<<<<<<<<<< @@ -25408,19 +25339,19 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1530, __pyx_L1_error) + __PYX_ERR(0, 1526, __pyx_L1_error) } __pyx_t_6 = (!(__pyx_v_self->_mapper.get()->Write(__pyx_v__sstrm, __pyx_k_pywrapfst) != 0)); if (unlikely(__pyx_t_6)) { - /* "_pywrapfst.pyx":1531 + /* "_pywrapfst.pyx":1527 * cdef stringstream _sstrm * if not self._mapper.get().WriteStream(_sstrm, b""): * raise FstIOError("Write to string failed") # <<<<<<<<<<<<<< * return _sstrm.str() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -25440,15 +25371,15 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Write_to_string_failed}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __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, 1531, __pyx_L1_error) + __PYX_ERR(0, 1527, __pyx_L1_error) - /* "_pywrapfst.pyx":1530 + /* "_pywrapfst.pyx":1526 * """ * cdef stringstream _sstrm * if not self._mapper.get().WriteStream(_sstrm, b""): # <<<<<<<<<<<<<< @@ -25457,7 +25388,7 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py */ } - /* "_pywrapfst.pyx":1532 + /* "_pywrapfst.pyx":1528 * if not self._mapper.get().WriteStream(_sstrm, b""): * raise FstIOError("Write to string failed") * return _sstrm.str() # <<<<<<<<<<<<<< @@ -25465,13 +25396,13 @@ static PyObject *__pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(struct __py * cpdef _EncodeMapperSymbolTableView input_symbols(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1517 + /* "_pywrapfst.pyx":1513 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -25544,7 +25475,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_22write_to_string(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_to_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12EncodeMapper_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25561,7 +25492,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_22write_to_string(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":1534 +/* "_pywrapfst.pyx":1530 * return _sstrm.str() * * cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< @@ -25598,7 +25529,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __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, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_25input_symbols)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -25621,11 +25552,11 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __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_10_pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1534, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1530, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25644,7 +25575,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py #endif } - /* "_pywrapfst.pyx":1540 + /* "_pywrapfst.pyx":1536 * Returns the mapper's input symbol table, or None if none is present. * """ * if self._mapper.get().InputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -25653,12 +25584,12 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1540, __pyx_L1_error) + __PYX_ERR(0, 1536, __pyx_L1_error) } __pyx_t_6 = (__pyx_v_self->_mapper.get()->InputSymbols() == NULL); if (__pyx_t_6) { - /* "_pywrapfst.pyx":1541 + /* "_pywrapfst.pyx":1537 * """ * if self._mapper.get().InputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -25669,7 +25600,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":1540 + /* "_pywrapfst.pyx":1536 * Returns the mapper's input symbol table, or None if none is present. * """ * if self._mapper.get().InputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -25678,7 +25609,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ } - /* "_pywrapfst.pyx":1542 + /* "_pywrapfst.pyx":1538 * if self._mapper.get().InputSymbols() == NULL: * return * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) # <<<<<<<<<<<<<< @@ -25688,15 +25619,15 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1542, __pyx_L1_error) + __PYX_ERR(0, 1538, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1534 + /* "_pywrapfst.pyx":1530 * return _sstrm.str() * * cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< @@ -25769,7 +25700,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_24input_symbols(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("input_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_12EncodeMapper_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25786,7 +25717,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_24input_symbols(struct __p return __pyx_r; } -/* "_pywrapfst.pyx":1544 +/* "_pywrapfst.pyx":1540 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) * * cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< @@ -25823,7 +25754,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __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, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12EncodeMapper_27output_symbols)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -25846,11 +25777,11 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __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_10_pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1544, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView))))) __PYX_ERR(0, 1540, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25869,7 +25800,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py #endif } - /* "_pywrapfst.pyx":1550 + /* "_pywrapfst.pyx":1546 * Returns the mapper's output symbol table, or None if none is present. * """ * if self._mapper.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -25878,12 +25809,12 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1550, __pyx_L1_error) + __PYX_ERR(0, 1546, __pyx_L1_error) } __pyx_t_6 = (__pyx_v_self->_mapper.get()->OutputSymbols() == NULL); if (__pyx_t_6) { - /* "_pywrapfst.pyx":1551 + /* "_pywrapfst.pyx":1547 * """ * if self._mapper.get().OutputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -25894,7 +25825,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":1550 + /* "_pywrapfst.pyx":1546 * Returns the mapper's output symbol table, or None if none is present. * """ * if self._mapper.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -25903,7 +25834,7 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py */ } - /* "_pywrapfst.pyx":1552 + /* "_pywrapfst.pyx":1548 * if self._mapper.get().OutputSymbols() == NULL: * return * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False) # <<<<<<<<<<<<<< @@ -25913,15 +25844,15 @@ static struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *__pyx_f_10_py __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1552, __pyx_L1_error) + __PYX_ERR(0, 1548, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapperSymbolTableView(__pyx_v_self->_mapper, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst__EncodeMapperSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1544 + /* "_pywrapfst.pyx":1540 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) * * cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< @@ -25994,7 +25925,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_26output_symbols(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("output_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_12EncodeMapper_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26011,7 +25942,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_26output_symbols(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":1554 +/* "_pywrapfst.pyx":1550 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False) * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -26026,7 +25957,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1555 + /* "_pywrapfst.pyx":1551 * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -26036,7 +25967,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ __pyx_t_1 = (((PyObject *)__pyx_v_symbols) == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":1556 + /* "_pywrapfst.pyx":1552 * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: * self._mapper.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<< @@ -26045,11 +25976,11 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1556, __pyx_L1_error) + __PYX_ERR(0, 1552, __pyx_L1_error) } __pyx_v_self->_mapper.get()->SetInputSymbols(NULL); - /* "_pywrapfst.pyx":1557 + /* "_pywrapfst.pyx":1553 * if symbols is None: * self._mapper.get().SetInputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -26058,7 +25989,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ */ goto __pyx_L0; - /* "_pywrapfst.pyx":1555 + /* "_pywrapfst.pyx":1551 * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -26067,7 +25998,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ */ } - /* "_pywrapfst.pyx":1558 + /* "_pywrapfst.pyx":1554 * self._mapper.get().SetInputSymbols(NULL) * return * self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<< @@ -26076,16 +26007,16 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1558, __pyx_L1_error) + __PYX_ERR(0, 1554, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1558, __pyx_L1_error) + __PYX_ERR(0, 1554, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1554, __pyx_L1_error) __pyx_v_self->_mapper.get()->SetInputSymbols(__pyx_t_2); - /* "_pywrapfst.pyx":1554 + /* "_pywrapfst.pyx":1550 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=False) * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -26100,7 +26031,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols(struct __pyx_ __pyx_L0:; } -/* "_pywrapfst.pyx":1560 +/* "_pywrapfst.pyx":1556 * self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -26162,12 +26093,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1556, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_input_symbols") < 0)) __PYX_ERR(0, 1560, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_input_symbols") < 0)) __PYX_ERR(0, 1556, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -26178,7 +26109,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_input_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1560, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_input_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1556, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26192,7 +26123,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1560, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1556, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_12EncodeMapper_28set_input_symbols(((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -26218,7 +26149,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_28set_input_symbols(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_input_symbols", 1); - /* "_pywrapfst.pyx":1574 + /* "_pywrapfst.pyx":1570 * self. * """ * self._set_input_symbols(symbols) # <<<<<<<<<<<<<< @@ -26227,11 +26158,11 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_28set_input_symbols(struct */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_input_symbols"); - __PYX_ERR(0, 1574, __pyx_L1_error) + __PYX_ERR(0, 1570, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1574, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error) - /* "_pywrapfst.pyx":1575 + /* "_pywrapfst.pyx":1571 * """ * self._set_input_symbols(symbols) * return self # <<<<<<<<<<<<<< @@ -26243,7 +26174,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_28set_input_symbols(struct __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":1560 + /* "_pywrapfst.pyx":1556 * self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -26261,7 +26192,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_28set_input_symbols(struct return __pyx_r; } -/* "_pywrapfst.pyx":1577 +/* "_pywrapfst.pyx":1573 * return self * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -26276,7 +26207,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":1578 + /* "_pywrapfst.pyx":1574 * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -26286,7 +26217,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx __pyx_t_1 = (((PyObject *)__pyx_v_symbols) == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":1579 + /* "_pywrapfst.pyx":1575 * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: * self._mapper.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<< @@ -26295,11 +26226,11 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1579, __pyx_L1_error) + __PYX_ERR(0, 1575, __pyx_L1_error) } __pyx_v_self->_mapper.get()->SetOutputSymbols(NULL); - /* "_pywrapfst.pyx":1580 + /* "_pywrapfst.pyx":1576 * if symbols is None: * self._mapper.get().SetOutputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -26308,7 +26239,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx */ goto __pyx_L0; - /* "_pywrapfst.pyx":1578 + /* "_pywrapfst.pyx":1574 * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -26317,7 +26248,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx */ } - /* "_pywrapfst.pyx":1581 + /* "_pywrapfst.pyx":1577 * self._mapper.get().SetOutputSymbols(NULL) * return * self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<< @@ -26326,16 +26257,16 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1581, __pyx_L1_error) + __PYX_ERR(0, 1577, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1581, __pyx_L1_error) + __PYX_ERR(0, 1577, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L1_error) __pyx_v_self->_mapper.get()->SetOutputSymbols(__pyx_t_2); - /* "_pywrapfst.pyx":1577 + /* "_pywrapfst.pyx":1573 * return self * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -26350,7 +26281,7 @@ static void __pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols(struct __pyx __pyx_L0:; } -/* "_pywrapfst.pyx":1583 +/* "_pywrapfst.pyx":1579 * self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -26412,12 +26343,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_output_symbols") < 0)) __PYX_ERR(0, 1583, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_output_symbols") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -26428,7 +26359,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_output_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1583, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_output_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1579, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26442,7 +26373,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1583, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 1579, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_12EncodeMapper_30set_output_symbols(((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -26468,7 +26399,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_30set_output_symbols(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_output_symbols", 1); - /* "_pywrapfst.pyx":1597 + /* "_pywrapfst.pyx":1593 * self. * """ * self._set_output_symbols(symbols) # <<<<<<<<<<<<<< @@ -26477,11 +26408,11 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_30set_output_symbols(struc */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_output_symbols"); - __PYX_ERR(0, 1597, __pyx_L1_error) + __PYX_ERR(0, 1593, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_EncodeMapper *)__pyx_v_self->__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1593, __pyx_L1_error) - /* "_pywrapfst.pyx":1598 + /* "_pywrapfst.pyx":1594 * """ * self._set_output_symbols(symbols) * return self # <<<<<<<<<<<<<< @@ -26493,7 +26424,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_30set_output_symbols(struc __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":1583 + /* "_pywrapfst.pyx":1579 * self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -26511,7 +26442,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12EncodeMapper_30set_output_symbols(struc return __pyx_r; } -/* "_pywrapfst.pyx":1601 +/* "_pywrapfst.pyx":1597 * * * cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): # <<<<<<<<<<<<<< @@ -26529,19 +26460,19 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__init_En int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_EncodeMapper", 1); - /* "_pywrapfst.pyx":1602 + /* "_pywrapfst.pyx":1598 * * cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): * cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper) # <<<<<<<<<<<<<< * result._mapper.reset(mapper) * return result */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_EncodeMapper(((PyTypeObject *)__pyx_ptype_10_pywrapfst_EncodeMapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_EncodeMapper(((PyTypeObject *)__pyx_ptype_10_pywrapfst_EncodeMapper), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1603 + /* "_pywrapfst.pyx":1599 * cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): * cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper) * result._mapper.reset(mapper) # <<<<<<<<<<<<<< @@ -26550,11 +26481,11 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__init_En */ if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 1603, __pyx_L1_error) + __PYX_ERR(0, 1599, __pyx_L1_error) } __pyx_v_result->_mapper.reset(__pyx_v_mapper); - /* "_pywrapfst.pyx":1604 + /* "_pywrapfst.pyx":1600 * cdef EncodeMapper result = EncodeMapper.__new__(EncodeMapper) * result._mapper.reset(mapper) * return result # <<<<<<<<<<<<<< @@ -26566,7 +26497,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__init_En __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "_pywrapfst.pyx":1601 + /* "_pywrapfst.pyx":1597 * * * cdef EncodeMapper _init_EncodeMapper(EncodeMapperClass_ptr mapper): # <<<<<<<<<<<<<< @@ -26586,7 +26517,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__init_En return __pyx_r; } -/* "_pywrapfst.pyx":1607 +/* "_pywrapfst.pyx":1603 * * * cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<< @@ -26616,7 +26547,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_EncodeMapper_from_string", 1); - /* "_pywrapfst.pyx":1609 + /* "_pywrapfst.pyx":1605 * cpdef EncodeMapper _read_EncodeMapper_from_string(string state): * cdef stringstream _sstrm * _sstrm << state # <<<<<<<<<<<<<< @@ -26625,7 +26556,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En */ (void)((__pyx_v__sstrm << __pyx_v_state)); - /* "_pywrapfst.pyx":1611 + /* "_pywrapfst.pyx":1607 * _sstrm << state * cdef unique_ptr[ * fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.ReadStream( # <<<<<<<<<<<<<< @@ -26634,7 +26565,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En */ __pyx_v__mapper = fst::script::EncodeMapperClass::Read(__pyx_v__sstrm, __pyx_k_pywrapfst); - /* "_pywrapfst.pyx":1613 + /* "_pywrapfst.pyx":1609 * fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.ReadStream( * _sstrm, b"") * if _mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -26644,14 +26575,14 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En __pyx_t_1 = (__pyx_v__mapper.get() == NULL); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":1614 + /* "_pywrapfst.pyx":1610 * _sstrm, b"") * if _mapper.get() == NULL: * raise FstIOError("Read from string failed") # <<<<<<<<<<<<<< * return _init_EncodeMapper(_mapper.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1614, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -26671,15 +26602,15 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Read_from_string_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __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, 1614, __pyx_L1_error) + __PYX_ERR(0, 1610, __pyx_L1_error) - /* "_pywrapfst.pyx":1613 + /* "_pywrapfst.pyx":1609 * fst.EncodeMapperClass] _mapper = fst.EncodeMapperClass.ReadStream( * _sstrm, b"") * if _mapper.get() == NULL: # <<<<<<<<<<<<<< @@ -26688,7 +26619,7 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En */ } - /* "_pywrapfst.pyx":1615 + /* "_pywrapfst.pyx":1611 * if _mapper.get() == NULL: * raise FstIOError("Read from string failed") * return _init_EncodeMapper(_mapper.release()) # <<<<<<<<<<<<<< @@ -26696,13 +26627,13 @@ static struct __pyx_obj_10_pywrapfst_EncodeMapper *__pyx_f_10_pywrapfst__read_En * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1615, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_EncodeMapper(__pyx_v__mapper.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_EncodeMapper *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1607 + /* "_pywrapfst.pyx":1603 * * * cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<< @@ -26776,23 +26707,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1603, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_EncodeMapper_from_string") < 0)) __PYX_ERR(0, 1607, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_EncodeMapper_from_string") < 0)) __PYX_ERR(0, 1603, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L3_error) + __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1603, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read_EncodeMapper_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1607, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read_EncodeMapper_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1603, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26828,7 +26759,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_read_EncodeMapper_from_string(CYTHON_U int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_EncodeMapper_from_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_EncodeMapper_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_EncodeMapper_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26845,7 +26776,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_read_EncodeMapper_from_string(CYTHON_U return __pyx_r; } -/* "_pywrapfst.pyx":1641 +/* "_pywrapfst.pyx":1637 * * @staticmethod * cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<< @@ -26869,72 +26800,72 @@ static std::string __pyx_f_10_pywrapfst_3Fst__local_render_svg(std::string const int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_local_render_svg", 1); - /* "_pywrapfst.pyx":1644 + /* "_pywrapfst.pyx":1640 * # As suggested in the following, we now use the Cairo renderer: * # https://github.com/kylebgorman/pynini/issues/35 * proc = subprocess.Popen(["dot", "-Tsvg:cairo"], # <<<<<<<<<<<<<< * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1644, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Popen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error) + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_dot); __Pyx_GIVEREF(__pyx_n_u_dot); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_dot)) __PYX_ERR(0, 1644, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_dot)) __PYX_ERR(0, 1640, __pyx_L1_error); __Pyx_INCREF(__pyx_kp_u_Tsvg_cairo); __Pyx_GIVEREF(__pyx_kp_u_Tsvg_cairo); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_Tsvg_cairo)) __PYX_ERR(0, 1644, __pyx_L1_error); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_Tsvg_cairo)) __PYX_ERR(0, 1640, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1645 + /* "_pywrapfst.pyx":1641 * # https://github.com/kylebgorman/pynini/issues/35 * proc = subprocess.Popen(["dot", "-Tsvg:cairo"], * stdin=subprocess.PIPE, # <<<<<<<<<<<<<< * stdout=subprocess.PIPE) * return proc.communicate(dot.encode("utf8"))[0] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1645, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_5) < 0) __PYX_ERR(0, 1645, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdin, __pyx_t_5) < 0) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":1646 + /* "_pywrapfst.pyx":1642 * proc = subprocess.Popen(["dot", "-Tsvg:cairo"], * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) # <<<<<<<<<<<<<< * return proc.communicate(dot.encode("utf8"))[0] * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1646, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_subprocess); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_PIPE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_4) < 0) __PYX_ERR(0, 1645, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stdout, __pyx_t_4) < 0) __PYX_ERR(0, 1641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":1644 + /* "_pywrapfst.pyx":1640 * # As suggested in the following, we now use the Cairo renderer: * # https://github.com/kylebgorman/pynini/issues/35 * proc = subprocess.Popen(["dot", "-Tsvg:cairo"], # <<<<<<<<<<<<<< * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1644, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -26942,18 +26873,18 @@ static std::string __pyx_f_10_pywrapfst_3Fst__local_render_svg(std::string const __pyx_v_proc = __pyx_t_4; __pyx_t_4 = 0; - /* "_pywrapfst.pyx":1647 + /* "_pywrapfst.pyx":1643 * stdin=subprocess.PIPE, * stdout=subprocess.PIPE) * return proc.communicate(dot.encode("utf8"))[0] # <<<<<<<<<<<<<< * * def _repr_svg_(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proc, __pyx_n_s_communicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_dot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -26975,23 +26906,23 @@ static std::string __pyx_f_10_pywrapfst_3Fst__local_render_svg(std::string const __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1647, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1647, __pyx_L1_error) + __PYX_ERR(0, 1643, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_7; goto __pyx_L0; - /* "_pywrapfst.pyx":1641 + /* "_pywrapfst.pyx":1637 * * @staticmethod * cdef string _local_render_svg(const string &dot): # <<<<<<<<<<<<<< @@ -27014,7 +26945,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst__local_render_svg(std::string const return __pyx_r; } -/* "_pywrapfst.pyx":1649 +/* "_pywrapfst.pyx":1645 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< @@ -27094,7 +27025,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_repr_svg_", 1); - /* "_pywrapfst.pyx":1657 + /* "_pywrapfst.pyx":1653 * """ * cdef stringstream _sstrm * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == # <<<<<<<<<<<<<< @@ -27103,10 +27034,10 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1657, __pyx_L1_error) + __PYX_ERR(0, 1653, __pyx_L1_error) } - /* "_pywrapfst.pyx":1658 + /* "_pywrapfst.pyx":1654 * cdef stringstream _sstrm * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) # <<<<<<<<<<<<<< @@ -27115,7 +27046,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra */ __pyx_v_acceptor = (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor); - /* "_pywrapfst.pyx":1659 + /* "_pywrapfst.pyx":1655 * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) * fst.Draw(deref(self._fst), # <<<<<<<<<<<<<< @@ -27124,10 +27055,10 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1659, __pyx_L1_error) + __PYX_ERR(0, 1655, __pyx_L1_error) } - /* "_pywrapfst.pyx":1660 + /* "_pywrapfst.pyx":1656 * fst.kAcceptor) * fst.Draw(deref(self._fst), * self._fst.get().InputSymbols(), # <<<<<<<<<<<<<< @@ -27136,10 +27067,10 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1660, __pyx_L1_error) + __PYX_ERR(0, 1656, __pyx_L1_error) } - /* "_pywrapfst.pyx":1661 + /* "_pywrapfst.pyx":1657 * fst.Draw(deref(self._fst), * self._fst.get().InputSymbols(), * self._fst.get().OutputSymbols(), # <<<<<<<<<<<<<< @@ -27148,19 +27079,19 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1661, __pyx_L1_error) + __PYX_ERR(0, 1657, __pyx_L1_error) } - /* "_pywrapfst.pyx":1659 + /* "_pywrapfst.pyx":1655 * cdef bool acceptor = (self._fst.get().Properties(fst.kAcceptor, True) == * fst.kAcceptor) * fst.Draw(deref(self._fst), # <<<<<<<<<<<<<< * self._fst.get().InputSymbols(), * self._fst.get().OutputSymbols(), */ - fst::script::Draw((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, __pyx_v_acceptor, __pyx_k__5, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_k_g, 0, __pyx_v__sstrm, __pyx_k_pywrapfst); + fst::script::Draw((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, __pyx_v_acceptor, __pyx_k__6, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_k_g, 0, __pyx_v__sstrm, __pyx_k_pywrapfst); - /* "_pywrapfst.pyx":1677 + /* "_pywrapfst.pyx":1673 * _sstrm, * b"") * try: # <<<<<<<<<<<<<< @@ -27176,7 +27107,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "_pywrapfst.pyx":1678 + /* "_pywrapfst.pyx":1674 * b"") * try: * return Fst._local_render_svg(_sstrm.str()) # <<<<<<<<<<<<<< @@ -27184,14 +27115,14 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra * logging.error("Dot rendering failed: %s", e) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_10_pywrapfst_3Fst__local_render_svg(__pyx_v__sstrm.str()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1678, __pyx_L3_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __pyx_L3_error) + __pyx_t_4 = __pyx_f_10_pywrapfst_3Fst__local_render_svg(__pyx_v__sstrm.str()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1674, __pyx_L3_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; - /* "_pywrapfst.pyx":1677 + /* "_pywrapfst.pyx":1673 * _sstrm, * b"") * try: # <<<<<<<<<<<<<< @@ -27202,7 +27133,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":1679 + /* "_pywrapfst.pyx":1675 * try: * return Fst._local_render_svg(_sstrm.str()) * except Exception as e: # <<<<<<<<<<<<<< @@ -27212,7 +27143,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_6) { __Pyx_AddTraceback("_pywrapfst.Fst._repr_svg_", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1679, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1675, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); @@ -27220,16 +27151,16 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra __pyx_v_e = __pyx_t_7; /*try:*/ { - /* "_pywrapfst.pyx":1680 + /* "_pywrapfst.pyx":1676 * return Fst._local_render_svg(_sstrm.str()) * except Exception as e: * logging.error("Dot rendering failed: %s", e) # <<<<<<<<<<<<<< * * def __init__(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1680, __pyx_L14_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_logging); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1676, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1680, __pyx_L14_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1676, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -27250,14 +27181,14 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_kp_u_Dot_rendering_failed_s, __pyx_v_e}; __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1680, __pyx_L14_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1676, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } - /* "_pywrapfst.pyx":1679 + /* "_pywrapfst.pyx":1675 * try: * return Fst._local_render_svg(_sstrm.str()) * except Exception as e: # <<<<<<<<<<<<<< @@ -27312,7 +27243,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra } goto __pyx_L5_except_error; - /* "_pywrapfst.pyx":1677 + /* "_pywrapfst.pyx":1673 * _sstrm, * b"") * try: # <<<<<<<<<<<<<< @@ -27338,7 +27269,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); } - /* "_pywrapfst.pyx":1649 + /* "_pywrapfst.pyx":1645 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< @@ -27365,7 +27296,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst__repr_svg_(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":1682 +/* "_pywrapfst.pyx":1678 * logging.error("Dot rendering failed: %s", e) * * def __init__(self): # <<<<<<<<<<<<<< @@ -27407,32 +27338,32 @@ static int __pyx_pf_10_pywrapfst_3Fst_2__init__(struct __pyx_obj_10_pywrapfst_Fs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":1683 + /* "_pywrapfst.pyx":1679 * * def __init__(self): * raise NotImplementedError(f"Cannot construct {self._class__.__name__}") # <<<<<<<<<<<<<< * * # Registers the class for pickling; must be repeated in any subclass which */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Cannot_construct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_NotImplementedError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __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, 1683, __pyx_L1_error) + __PYX_ERR(0, 1679, __pyx_L1_error) - /* "_pywrapfst.pyx":1682 + /* "_pywrapfst.pyx":1678 * logging.error("Dot rendering failed: %s", e) * * def __init__(self): # <<<<<<<<<<<<<< @@ -27450,7 +27381,7 @@ static int __pyx_pf_10_pywrapfst_3Fst_2__init__(struct __pyx_obj_10_pywrapfst_Fs return __pyx_r; } -/* "_pywrapfst.pyx":1688 +/* "_pywrapfst.pyx":1684 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -27510,7 +27441,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_4__reduce__(struct __pyx_obj_10_pywr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 1); - /* "_pywrapfst.pyx":1689 + /* "_pywrapfst.pyx":1685 * * def __reduce__(self): * return (_read_Fst_from_string, (self.write_to_string(),)) # <<<<<<<<<<<<<< @@ -27518,32 +27449,32 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_4__reduce__(struct __pyx_obj_10_pywr * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_read_Fst_from_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "write_to_string"); - __PYX_ERR(0, 1689, __pyx_L1_error) + __PYX_ERR(0, 1685, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->write_to_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1685, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 1685, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1688 + /* "_pywrapfst.pyx":1684 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -27564,7 +27495,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_4__reduce__(struct __pyx_obj_10_pywr return __pyx_r; } -/* "_pywrapfst.pyx":1691 +/* "_pywrapfst.pyx":1687 * return (_read_Fst_from_string, (self.write_to_string(),)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27601,7 +27532,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":1692 + /* "_pywrapfst.pyx":1688 * * def __repr__(self): * return f"<{self.fst_type()} Fst at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -27609,7 +27540,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap * def __str__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -27619,10 +27550,10 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "fst_type"); - __PYX_ERR(0, 1692, __pyx_L1_error) + __PYX_ERR(0, 1688, __pyx_L1_error) } - __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1692, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->fst_type(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -27633,9 +27564,9 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap __pyx_t_2 += 10; __Pyx_GIVEREF(__pyx_kp_u_Fst_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_Fst_at_0x); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_5, __pyx_n_u_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_3; @@ -27647,14 +27578,14 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1691 + /* "_pywrapfst.pyx":1687 * return (_read_Fst_from_string, (self.write_to_string(),)) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27675,7 +27606,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_6__repr__(struct __pyx_obj_10_pywrap return __pyx_r; } -/* "_pywrapfst.pyx":1694 +/* "_pywrapfst.pyx":1690 * return f"<{self.fst_type()} Fst at 0x{id(self):x}>" * * def __str__(self): # <<<<<<<<<<<<<< @@ -27708,7 +27639,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_8__str__(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 1); - /* "_pywrapfst.pyx":1695 + /* "_pywrapfst.pyx":1691 * * def __str__(self): * return self.print() # <<<<<<<<<<<<<< @@ -27718,16 +27649,16 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_8__str__(struct __pyx_obj_10_pywrapf __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "print"); - __PYX_ERR(0, 1695, __pyx_L1_error) + __PYX_ERR(0, 1691, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->print(__pyx_v_self, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1695, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_self->__pyx_vtab)->print(__pyx_v_self, 0, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1694 + /* "_pywrapfst.pyx":1690 * return f"<{self.fst_type()} Fst at 0x{id(self):x}>" * * def __str__(self): # <<<<<<<<<<<<<< @@ -27746,7 +27677,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_8__str__(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":1697 +/* "_pywrapfst.pyx":1693 * return self.print() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -27783,7 +27714,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_arc_type(struct __pyx_obj_10_pywrap if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arc_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __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, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_11arc_type)) { __Pyx_INCREF(__pyx_t_1); @@ -27805,11 +27736,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_arc_type(struct __pyx_obj_10_pywrap PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1693, __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; @@ -27828,7 +27759,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_arc_type(struct __pyx_obj_10_pywrap #endif } - /* "_pywrapfst.pyx":1703 + /* "_pywrapfst.pyx":1699 * Returns a string indicating the arc type. * """ * return self._fst.get().ArcType() # <<<<<<<<<<<<<< @@ -27837,12 +27768,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_arc_type(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1703, __pyx_L1_error) + __PYX_ERR(0, 1699, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->ArcType(); goto __pyx_L0; - /* "_pywrapfst.pyx":1697 + /* "_pywrapfst.pyx":1693 * return self.print() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< @@ -27915,8 +27846,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_10arc_type(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arc_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1697, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_arc_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1693, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -27933,7 +27864,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_10arc_type(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":1705 +/* "_pywrapfst.pyx":1701 * return self._fst.get().ArcType() * * cpdef _ArcIterator arcs(self, int64_t state): # <<<<<<<<<<<<<< @@ -27970,11 +27901,11 @@ static struct __pyx_obj_10_pywrapfst__ArcIterator *__pyx_f_10_pywrapfst_3Fst_arc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_13arcs)) { __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -27996,11 +27927,11 @@ static struct __pyx_obj_10_pywrapfst__ArcIterator *__pyx_f_10_pywrapfst_3Fst_arc __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1705, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__ArcIterator))))) __PYX_ERR(0, 1705, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__ArcIterator))))) __PYX_ERR(0, 1701, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__ArcIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28019,7 +27950,7 @@ static struct __pyx_obj_10_pywrapfst__ArcIterator *__pyx_f_10_pywrapfst_3Fst_arc #endif } - /* "_pywrapfst.pyx":1717 + /* "_pywrapfst.pyx":1713 * An _ArcIterator. * """ * return _ArcIterator(self, state) # <<<<<<<<<<<<<< @@ -28027,24 +27958,24 @@ static struct __pyx_obj_10_pywrapfst__ArcIterator *__pyx_f_10_pywrapfst_3Fst_arc * cpdef Fst copy(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 1717, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 1713, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((struct __pyx_obj_10_pywrapfst__ArcIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1705 + /* "_pywrapfst.pyx":1701 * return self._fst.get().ArcType() * * cpdef _ArcIterator arcs(self, int64_t state): # <<<<<<<<<<<<<< @@ -28121,23 +28052,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1705, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1701, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcs") < 0)) __PYX_ERR(0, 1705, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcs") < 0)) __PYX_ERR(0, 1701, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1705, __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, 1701, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1705, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1701, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28173,7 +28104,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_12arcs(struct __pyx_obj_10_pywrapfst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arcs", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28190,7 +28121,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_12arcs(struct __pyx_obj_10_pywrapfst return __pyx_r; } -/* "_pywrapfst.pyx":1719 +/* "_pywrapfst.pyx":1715 * return _ArcIterator(self, state) * * cpdef Fst copy(self): # <<<<<<<<<<<<<< @@ -28226,7 +28157,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_3Fst_copy(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __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, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_15copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -28249,11 +28180,11 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_3Fst_copy(struct PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1719, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __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_10_pywrapfst_Fst))))) __PYX_ERR(0, 1719, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 1715, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28272,7 +28203,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_3Fst_copy(struct #endif } - /* "_pywrapfst.pyx":1725 + /* "_pywrapfst.pyx":1721 * Makes a copy of the FST. * """ * return _init_XFst(new fst.FstClass(deref(self._fst))) # <<<<<<<<<<<<<< @@ -28282,15 +28213,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_3Fst_copy(struct __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1725, __pyx_L1_error) + __PYX_ERR(0, 1721, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(new fst::script::FstClass((*__pyx_v_self->_fst)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1719 + /* "_pywrapfst.pyx":1715 * return _ArcIterator(self, state) * * cpdef Fst copy(self): # <<<<<<<<<<<<<< @@ -28363,7 +28294,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_14copy(struct __pyx_obj_10_pywrapfst int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28380,7 +28311,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_14copy(struct __pyx_obj_10_pywrapfst return __pyx_r; } -/* "_pywrapfst.pyx":1727 +/* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -28397,7 +28328,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds ); /*proto*/ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_self, PyObject *__pyx_v_source, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_3Fst_draw *__pyx_optional_args) { - /* "_pywrapfst.pyx":1729 + /* "_pywrapfst.pyx":1725 * cpdef void draw(self, * source, * SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -28406,7 +28337,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_isymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":1730 + /* "_pywrapfst.pyx":1726 * source, * SymbolTableView isymbols=None, * SymbolTableView osymbols=None, # <<<<<<<<<<<<<< @@ -28415,7 +28346,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":1731 + /* "_pywrapfst.pyx":1727 * SymbolTableView isymbols=None, * SymbolTableView osymbols=None, * SymbolTableView ssymbols=None, # <<<<<<<<<<<<<< @@ -28424,7 +28355,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_ssymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":1732 + /* "_pywrapfst.pyx":1728 * SymbolTableView osymbols=None, * SymbolTableView ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -28432,11 +28363,11 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ * double width=8.5, */ bool __pyx_v_acceptor = ((bool)0); - PyObject *__pyx_v_title = ((PyObject *)__pyx_kp_u__5); + PyObject *__pyx_v_title = ((PyObject *)__pyx_kp_u__6); double __pyx_v_width = ((double)8.5); double __pyx_v_height = ((double)11.0); - /* "_pywrapfst.pyx":1736 + /* "_pywrapfst.pyx":1732 * double width=8.5, * double height=11, * bool portrait=False, # <<<<<<<<<<<<<< @@ -28445,7 +28376,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ bool __pyx_v_portrait = ((bool)0); - /* "_pywrapfst.pyx":1737 + /* "_pywrapfst.pyx":1733 * double height=11, * bool portrait=False, * bool vertical=False, # <<<<<<<<<<<<<< @@ -28459,7 +28390,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ int32_t __pyx_v_precision = ((int32_t)5); PyObject *__pyx_v_float_format = ((PyObject *)__pyx_n_u_g); - /* "_pywrapfst.pyx":1743 + /* "_pywrapfst.pyx":1739 * int32_t precision=5, * float_format="g", * bool show_weight_one=False) except *: # <<<<<<<<<<<<<< @@ -28544,7 +28475,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ } } - /* "_pywrapfst.pyx":1727 + /* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -28560,28 +28491,28 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_draw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_17draw)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_portrait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_vertical); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_ranksep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_nodesep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int32_t(__pyx_v_fontsize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int32_t(__pyx_v_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = __pyx_t_1; __pyx_t_14 = NULL; @@ -28612,7 +28543,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -28633,17 +28564,17 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ #endif } - /* "_pywrapfst.pyx":1775 + /* "_pywrapfst.pyx":1771 * show_weight_one: Should weights equivalent to semiring One be printed? * """ * cdef string _source = path_tostring(source) # <<<<<<<<<<<<<< * cdef unique_ptr[ostream] _fstrm * _fstrm.reset(new ofstream(_source)) */ - __pyx_t_16 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1775, __pyx_L1_error) + __pyx_t_16 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1771, __pyx_L1_error) __pyx_v__source = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_16); - /* "_pywrapfst.pyx":1777 + /* "_pywrapfst.pyx":1773 * cdef string _source = path_tostring(source) * cdef unique_ptr[ostream] _fstrm * _fstrm.reset(new ofstream(_source)) # <<<<<<<<<<<<<< @@ -28652,7 +28583,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ __pyx_v__fstrm.reset(new std::ofstream(__pyx_v__source)); - /* "_pywrapfst.pyx":1778 + /* "_pywrapfst.pyx":1774 * cdef unique_ptr[ostream] _fstrm * _fstrm.reset(new ofstream(_source)) * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<< @@ -28661,11 +28592,11 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1778, __pyx_L1_error) + __PYX_ERR(0, 1774, __pyx_L1_error) } __pyx_v__isymbols = __pyx_v_self->_fst.get()->InputSymbols(); - /* "_pywrapfst.pyx":1779 + /* "_pywrapfst.pyx":1775 * _fstrm.reset(new ofstream(_source)) * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: # <<<<<<<<<<<<<< @@ -28675,7 +28606,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ __pyx_t_17 = (((PyObject *)__pyx_v_isymbols) != Py_None); if (__pyx_t_17) { - /* "_pywrapfst.pyx":1780 + /* "_pywrapfst.pyx":1776 * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: * _isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -28684,12 +28615,12 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1780, __pyx_L1_error) + __PYX_ERR(0, 1776, __pyx_L1_error) } - __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1780, __pyx_L1_error) + __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1776, __pyx_L1_error) __pyx_v__isymbols = __pyx_t_18; - /* "_pywrapfst.pyx":1779 + /* "_pywrapfst.pyx":1775 * _fstrm.reset(new ofstream(_source)) * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: # <<<<<<<<<<<<<< @@ -28698,7 +28629,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ } - /* "_pywrapfst.pyx":1781 + /* "_pywrapfst.pyx":1777 * if isymbols is not None: * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<< @@ -28707,11 +28638,11 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1781, __pyx_L1_error) + __PYX_ERR(0, 1777, __pyx_L1_error) } __pyx_v__osymbols = __pyx_v_self->_fst.get()->OutputSymbols(); - /* "_pywrapfst.pyx":1782 + /* "_pywrapfst.pyx":1778 * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: # <<<<<<<<<<<<<< @@ -28721,7 +28652,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ __pyx_t_17 = (((PyObject *)__pyx_v_osymbols) != Py_None); if (__pyx_t_17) { - /* "_pywrapfst.pyx":1783 + /* "_pywrapfst.pyx":1779 * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: * _osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -28730,12 +28661,12 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1783, __pyx_L1_error) + __PYX_ERR(0, 1779, __pyx_L1_error) } - __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1783, __pyx_L1_error) + __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1779, __pyx_L1_error) __pyx_v__osymbols = __pyx_t_18; - /* "_pywrapfst.pyx":1782 + /* "_pywrapfst.pyx":1778 * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: # <<<<<<<<<<<<<< @@ -28744,7 +28675,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ } - /* "_pywrapfst.pyx":1784 + /* "_pywrapfst.pyx":1780 * if osymbols is not None: * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL # <<<<<<<<<<<<<< @@ -28753,7 +28684,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ __pyx_v__ssymbols = NULL; - /* "_pywrapfst.pyx":1785 + /* "_pywrapfst.pyx":1781 * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -28763,7 +28694,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ __pyx_t_17 = (((PyObject *)__pyx_v_ssymbols) != Py_None); if (__pyx_t_17) { - /* "_pywrapfst.pyx":1786 + /* "_pywrapfst.pyx":1782 * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: * _ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -28772,12 +28703,12 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1786, __pyx_L1_error) + __PYX_ERR(0, 1782, __pyx_L1_error) } - __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1786, __pyx_L1_error) + __pyx_t_18 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1782, __pyx_L1_error) __pyx_v__ssymbols = __pyx_t_18; - /* "_pywrapfst.pyx":1785 + /* "_pywrapfst.pyx":1781 * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -28786,7 +28717,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ } - /* "_pywrapfst.pyx":1787 + /* "_pywrapfst.pyx":1783 * if ssymbols is not None: * _ssymbols = ssymbols._raw_ptr_or_raise() * fst.Draw(deref(self._fst), # <<<<<<<<<<<<<< @@ -28795,28 +28726,28 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1787, __pyx_L1_error) + __PYX_ERR(0, 1783, __pyx_L1_error) } - /* "_pywrapfst.pyx":1792 + /* "_pywrapfst.pyx":1788 * _ssymbols, * acceptor, * tostring(title), # <<<<<<<<<<<<<< * width, * height, */ - __pyx_t_16 = __pyx_f_10_pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1792, __pyx_L1_error) + __pyx_t_16 = __pyx_f_10_pywrapfst_tostring(__pyx_v_title); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1788, __pyx_L1_error) - /* "_pywrapfst.pyx":1801 + /* "_pywrapfst.pyx":1797 * fontsize, * precision, * tostring(float_format), # <<<<<<<<<<<<<< * show_weight_one, * deref(_fstrm), */ - __pyx_t_19 = __pyx_f_10_pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L1_error) + __pyx_t_19 = __pyx_f_10_pywrapfst_tostring(__pyx_v_float_format); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1797, __pyx_L1_error) - /* "_pywrapfst.pyx":1787 + /* "_pywrapfst.pyx":1783 * if ssymbols is not None: * _ssymbols = ssymbols._raw_ptr_or_raise() * fst.Draw(deref(self._fst), # <<<<<<<<<<<<<< @@ -28825,7 +28756,7 @@ static void __pyx_f_10_pywrapfst_3Fst_draw(struct __pyx_obj_10_pywrapfst_Fst *__ */ fst::script::Draw((*__pyx_v_self->_fst), __pyx_v__isymbols, __pyx_v__osymbols, __pyx_v__ssymbols, __pyx_v_acceptor, __pyx_t_16, __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_19, __pyx_v_show_weight_one, (*__pyx_v__fstrm), __pyx_v__source); - /* "_pywrapfst.pyx":1727 + /* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -28910,7 +28841,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_title,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_portrait,&__pyx_n_s_vertical,&__pyx_n_s_ranksep,&__pyx_n_s_nodesep,&__pyx_n_s_fontsize,&__pyx_n_s_precision,&__pyx_n_s_float_format,&__pyx_n_s_show_weight_one,0}; - /* "_pywrapfst.pyx":1729 + /* "_pywrapfst.pyx":1725 * cpdef void draw(self, * source, * SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -28919,7 +28850,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - /* "_pywrapfst.pyx":1730 + /* "_pywrapfst.pyx":1726 * source, * SymbolTableView isymbols=None, * SymbolTableView osymbols=None, # <<<<<<<<<<<<<< @@ -28928,7 +28859,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - /* "_pywrapfst.pyx":1731 + /* "_pywrapfst.pyx":1727 * SymbolTableView isymbols=None, * SymbolTableView osymbols=None, * SymbolTableView ssymbols=None, # <<<<<<<<<<<<<< @@ -28936,7 +28867,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds * title="", */ values[3] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__5)); + values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__6)); values[14] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_g)); if (__pyx_kwds) { Py_ssize_t kw_args; @@ -28983,117 +28914,117 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_isymbols); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_osymbols); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ssymbols); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_acceptor); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_title); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_width); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_height); if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_portrait); if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 9: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vertical); if (value) { values[9] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 10: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ranksep); if (value) { values[10] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 11: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nodesep); if (value) { values[11] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 12: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fontsize); if (value) { values[12] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 13: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_precision); if (value) { values[13] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 14: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_float_format); if (value) { values[14] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 15: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_show_weight_one); if (value) { values[15] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 1727, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "draw") < 0)) __PYX_ERR(0, 1723, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -29137,10 +29068,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[2]); __pyx_v_ssymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[3]); if (values[4]) { - __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1732, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1728, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1732 + /* "_pywrapfst.pyx":1728 * SymbolTableView osymbols=None, * SymbolTableView ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -29151,20 +29082,20 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_title = values[5]; if (values[6]) { - __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1734, __pyx_L3_error) + __pyx_v_width = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_width == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1730, __pyx_L3_error) } else { __pyx_v_width = ((double)8.5); } if (values[7]) { - __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error) + __pyx_v_height = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_height == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L3_error) } else { __pyx_v_height = ((double)11.0); } if (values[8]) { - __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1736, __pyx_L3_error) + __pyx_v_portrait = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_portrait == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1732, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1736 + /* "_pywrapfst.pyx":1732 * double width=8.5, * double height=11, * bool portrait=False, # <<<<<<<<<<<<<< @@ -29174,10 +29105,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_portrait = ((bool)0); } if (values[9]) { - __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L3_error) + __pyx_v_vertical = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_vertical == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1733, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1737 + /* "_pywrapfst.pyx":1733 * double height=11, * bool portrait=False, * bool vertical=False, # <<<<<<<<<<<<<< @@ -29187,31 +29118,31 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_vertical = ((bool)0); } if (values[10]) { - __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1738, __pyx_L3_error) + __pyx_v_ranksep = __pyx_PyFloat_AsDouble(values[10]); if (unlikely((__pyx_v_ranksep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1734, __pyx_L3_error) } else { __pyx_v_ranksep = ((double)0.4); } if (values[11]) { - __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1739, __pyx_L3_error) + __pyx_v_nodesep = __pyx_PyFloat_AsDouble(values[11]); if (unlikely((__pyx_v_nodesep == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1735, __pyx_L3_error) } else { __pyx_v_nodesep = ((double)0.25); } if (values[12]) { - __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1740, __pyx_L3_error) + __pyx_v_fontsize = __Pyx_PyInt_As_int32_t(values[12]); if (unlikely((__pyx_v_fontsize == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1736, __pyx_L3_error) } else { __pyx_v_fontsize = ((int32_t)14); } if (values[13]) { - __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1741, __pyx_L3_error) + __pyx_v_precision = __Pyx_PyInt_As_int32_t(values[13]); if (unlikely((__pyx_v_precision == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1737, __pyx_L3_error) } else { __pyx_v_precision = ((int32_t)5); } __pyx_v_float_format = values[14]; if (values[15]) { - __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L3_error) + __pyx_v_show_weight_one = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_show_weight_one == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1739, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1743 + /* "_pywrapfst.pyx":1739 * int32_t precision=5, * float_format="g", * bool show_weight_one=False) except *: # <<<<<<<<<<<<<< @@ -29223,7 +29154,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, __pyx_nargs); __PYX_ERR(0, 1727, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 16, __pyx_nargs); __PYX_ERR(0, 1723, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29237,12 +29168,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1729, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1730, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1731, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1725, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1726, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1727, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_3Fst_16draw(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), __pyx_v_source, __pyx_v_isymbols, __pyx_v_osymbols, __pyx_v_ssymbols, __pyx_v_acceptor, __pyx_v_title, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_v_float_format, __pyx_v_show_weight_one); - /* "_pywrapfst.pyx":1727 + /* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< @@ -29291,8 +29222,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_16draw(struct __pyx_obj_10_pywrapfst __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_10_pywrapfst_Fst->draw(__pyx_v_self, __pyx_v_source, 1, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1727, __pyx_L1_error) - __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_vtabptr_10_pywrapfst_Fst->draw(__pyx_v_self, __pyx_v_source, 1, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -29309,7 +29240,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_16draw(struct __pyx_obj_10_pywrapfst return __pyx_r; } -/* "_pywrapfst.pyx":1806 +/* "_pywrapfst.pyx":1802 * _source) * * cpdef Weight final(self, int64_t state): # <<<<<<<<<<<<<< @@ -29349,11 +29280,11 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_final); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __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, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_19final)) { __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -29375,11 +29306,11 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1806, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Weight))))) __PYX_ERR(0, 1806, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Weight))))) __PYX_ERR(0, 1802, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -29398,19 +29329,19 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str #endif } - /* "_pywrapfst.pyx":1821 + /* "_pywrapfst.pyx":1817 * FstIndexError: State index out of range. * """ * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not _weight.member(): */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1817, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":1822 + /* "_pywrapfst.pyx":1818 * """ * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) # <<<<<<<<<<<<<< @@ -29419,15 +29350,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 1822, __pyx_L1_error) + __PYX_ERR(0, 1818, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1822, __pyx_L1_error) + __PYX_ERR(0, 1818, __pyx_L1_error) } __pyx_v__weight->_weight.reset(new fst::script::WeightClass(__pyx_v_self->_fst.get()->Final(__pyx_v_state))); - /* "_pywrapfst.pyx":1823 + /* "_pywrapfst.pyx":1819 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not _weight.member(): # <<<<<<<<<<<<<< @@ -29436,20 +29367,20 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "member"); - __PYX_ERR(0, 1823, __pyx_L1_error) + __PYX_ERR(0, 1819, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->member(__pyx_v__weight, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_Weight *)__pyx_v__weight->__pyx_vtab)->member(__pyx_v__weight, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1819, __pyx_L1_error) __pyx_t_8 = (!(__pyx_t_7 != 0)); if (unlikely(__pyx_t_8)) { - /* "_pywrapfst.pyx":1824 + /* "_pywrapfst.pyx":1820 * _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not _weight.member(): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return _weight * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -29469,15 +29400,15 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __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, 1824, __pyx_L1_error) + __PYX_ERR(0, 1820, __pyx_L1_error) - /* "_pywrapfst.pyx":1823 + /* "_pywrapfst.pyx":1819 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(self._fst.get().Final(state))) * if not _weight.member(): # <<<<<<<<<<<<<< @@ -29486,7 +29417,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str */ } - /* "_pywrapfst.pyx":1825 + /* "_pywrapfst.pyx":1821 * if not _weight.member(): * raise FstIndexError("State index out of range") * return _weight # <<<<<<<<<<<<<< @@ -29498,7 +29429,7 @@ static struct __pyx_obj_10_pywrapfst_Weight *__pyx_f_10_pywrapfst_3Fst_final(str __pyx_r = __pyx_v__weight; goto __pyx_L0; - /* "_pywrapfst.pyx":1806 + /* "_pywrapfst.pyx":1802 * _source) * * cpdef Weight final(self, int64_t state): # <<<<<<<<<<<<<< @@ -29576,23 +29507,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1806, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1802, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "final") < 0)) __PYX_ERR(0, 1806, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "final") < 0)) __PYX_ERR(0, 1802, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1806, __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, 1802, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("final", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1806, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("final", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1802, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29628,7 +29559,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_18final(struct __pyx_obj_10_pywrapfs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("final", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1806, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_final(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29645,7 +29576,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_18final(struct __pyx_obj_10_pywrapfs return __pyx_r; } -/* "_pywrapfst.pyx":1827 +/* "_pywrapfst.pyx":1823 * return _weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< @@ -29682,7 +29613,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_fst_type(struct __pyx_obj_10_pywrap if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fst_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __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, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_21fst_type)) { __Pyx_INCREF(__pyx_t_1); @@ -29704,11 +29635,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_fst_type(struct __pyx_obj_10_pywrap PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1827, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1823, __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; @@ -29727,7 +29658,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_fst_type(struct __pyx_obj_10_pywrap #endif } - /* "_pywrapfst.pyx":1833 + /* "_pywrapfst.pyx":1829 * Returns a string indicating the FST type. * """ * return self._fst.get().FstType() # <<<<<<<<<<<<<< @@ -29736,12 +29667,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_fst_type(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1833, __pyx_L1_error) + __PYX_ERR(0, 1829, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->FstType(); goto __pyx_L0; - /* "_pywrapfst.pyx":1827 + /* "_pywrapfst.pyx":1823 * return _weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< @@ -29814,8 +29745,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_20fst_type(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fst_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_fst_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1827, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_fst_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -29832,7 +29763,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_20fst_type(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":1835 +/* "_pywrapfst.pyx":1831 * return self._fst.get().FstType() * * cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< @@ -29869,7 +29800,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_input_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __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, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_23input_symbols)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -29892,11 +29823,11 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1835, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __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_10_pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1835, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1831, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -29915,7 +29846,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 #endif } - /* "_pywrapfst.pyx":1841 + /* "_pywrapfst.pyx":1837 * Returns the FST's input symbol table, or None if none is present. * """ * if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -29924,12 +29855,12 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1841, __pyx_L1_error) + __PYX_ERR(0, 1837, __pyx_L1_error) } __pyx_t_6 = (__pyx_v_self->_fst.get()->InputSymbols() == NULL); if (__pyx_t_6) { - /* "_pywrapfst.pyx":1842 + /* "_pywrapfst.pyx":1838 * """ * if self._fst.get().InputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -29940,7 +29871,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":1841 + /* "_pywrapfst.pyx":1837 * Returns the FST's input symbol table, or None if none is present. * """ * if self._fst.get().InputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -29949,7 +29880,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 */ } - /* "_pywrapfst.pyx":1843 + /* "_pywrapfst.pyx":1839 * if self._fst.get().InputSymbols() == NULL: * return * return _init_FstSymbolTableView(self._fst, input_side=True) # <<<<<<<<<<<<<< @@ -29959,15 +29890,15 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1843, __pyx_L1_error) + __PYX_ERR(0, 1839, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1835 + /* "_pywrapfst.pyx":1831 * return self._fst.get().FstType() * * cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< @@ -30040,7 +29971,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_22input_symbols(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("input_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_input_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -30057,7 +29988,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_22input_symbols(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":1845 +/* "_pywrapfst.pyx":1841 * return _init_FstSymbolTableView(self._fst, input_side=True) * * cpdef size_t num_arcs(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30097,10 +30028,10 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __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, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_25num_arcs)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -30122,11 +30053,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 1845, __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, 1841, __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; @@ -30145,7 +30076,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F #endif } - /* "_pywrapfst.pyx":1860 + /* "_pywrapfst.pyx":1856 * FstIndexError: State index out of range. * """ * cdef size_t _result = self._fst.get().NumArcs(state) # <<<<<<<<<<<<<< @@ -30154,11 +30085,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1860, __pyx_L1_error) + __PYX_ERR(0, 1856, __pyx_L1_error) } __pyx_v__result = __pyx_v_self->_fst.get()->NumArcs(__pyx_v_state); - /* "_pywrapfst.pyx":1861 + /* "_pywrapfst.pyx":1857 * """ * cdef size_t _result = self._fst.get().NumArcs(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30168,14 +30099,14 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F __pyx_t_8 = (__pyx_v__result == std::numeric_limits ::max()); if (unlikely(__pyx_t_8)) { - /* "_pywrapfst.pyx":1862 + /* "_pywrapfst.pyx":1858 * cdef size_t _result = self._fst.get().NumArcs(state) * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return _result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -30195,15 +30126,15 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __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, 1862, __pyx_L1_error) + __PYX_ERR(0, 1858, __pyx_L1_error) - /* "_pywrapfst.pyx":1861 + /* "_pywrapfst.pyx":1857 * """ * cdef size_t _result = self._fst.get().NumArcs(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30212,7 +30143,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F */ } - /* "_pywrapfst.pyx":1863 + /* "_pywrapfst.pyx":1859 * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") * return _result # <<<<<<<<<<<<<< @@ -30222,7 +30153,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_arcs(struct __pyx_obj_10_pywrapfst_F __pyx_r = __pyx_v__result; goto __pyx_L0; - /* "_pywrapfst.pyx":1845 + /* "_pywrapfst.pyx":1841 * return _init_FstSymbolTableView(self._fst, input_side=True) * * cpdef size_t num_arcs(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30298,23 +30229,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1845, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_arcs") < 0)) __PYX_ERR(0, 1845, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_arcs") < 0)) __PYX_ERR(0, 1841, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1845, __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, 1841, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("num_arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1845, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num_arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1841, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30351,8 +30282,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_24num_arcs(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("num_arcs", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1845, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_arcs(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -30369,7 +30300,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_24num_arcs(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":1865 +/* "_pywrapfst.pyx":1861 * return _result * * cpdef size_t num_input_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30409,10 +30340,10 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_input_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1865, __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, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_27num_input_epsilons)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -30434,11 +30365,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 1865, __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, 1861, __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; @@ -30457,7 +30388,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p #endif } - /* "_pywrapfst.pyx":1880 + /* "_pywrapfst.pyx":1876 * FstIndexError: State index out of range. * """ * cdef size_t _result = self._fst.get().NumInputEpsilons(state) # <<<<<<<<<<<<<< @@ -30466,11 +30397,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1880, __pyx_L1_error) + __PYX_ERR(0, 1876, __pyx_L1_error) } __pyx_v__result = __pyx_v_self->_fst.get()->NumInputEpsilons(__pyx_v_state); - /* "_pywrapfst.pyx":1881 + /* "_pywrapfst.pyx":1877 * """ * cdef size_t _result = self._fst.get().NumInputEpsilons(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30480,14 +30411,14 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p __pyx_t_8 = (__pyx_v__result == std::numeric_limits ::max()); if (unlikely(__pyx_t_8)) { - /* "_pywrapfst.pyx":1882 + /* "_pywrapfst.pyx":1878 * cdef size_t _result = self._fst.get().NumInputEpsilons(state) * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return _result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1882, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -30507,15 +30438,15 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1878, __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, 1882, __pyx_L1_error) + __PYX_ERR(0, 1878, __pyx_L1_error) - /* "_pywrapfst.pyx":1881 + /* "_pywrapfst.pyx":1877 * """ * cdef size_t _result = self._fst.get().NumInputEpsilons(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30524,7 +30455,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p */ } - /* "_pywrapfst.pyx":1883 + /* "_pywrapfst.pyx":1879 * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") * return _result # <<<<<<<<<<<<<< @@ -30534,7 +30465,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(struct __pyx_obj_10_p __pyx_r = __pyx_v__result; goto __pyx_L0; - /* "_pywrapfst.pyx":1865 + /* "_pywrapfst.pyx":1861 * return _result * * cpdef size_t num_input_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30610,23 +30541,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1861, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_input_epsilons") < 0)) __PYX_ERR(0, 1865, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_input_epsilons") < 0)) __PYX_ERR(0, 1861, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1865, __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, 1861, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("num_input_epsilons", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1865, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num_input_epsilons", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1861, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30663,8 +30594,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_26num_input_epsilons(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("num_input_epsilons", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1865, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_input_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1861, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -30681,7 +30612,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_26num_input_epsilons(struct __pyx_ob return __pyx_r; } -/* "_pywrapfst.pyx":1885 +/* "_pywrapfst.pyx":1881 * return _result * * cpdef size_t num_output_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30721,10 +30652,10 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_output_epsilons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __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, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_29num_output_epsilons)) { - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -30746,11 +30677,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 1885, __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, 1881, __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; @@ -30769,7 +30700,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ #endif } - /* "_pywrapfst.pyx":1900 + /* "_pywrapfst.pyx":1896 * FstIndexError: State index out of range. * """ * cdef size_t _result = self._fst.get().NumOutputEpsilons(state) # <<<<<<<<<<<<<< @@ -30778,11 +30709,11 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1900, __pyx_L1_error) + __PYX_ERR(0, 1896, __pyx_L1_error) } __pyx_v__result = __pyx_v_self->_fst.get()->NumOutputEpsilons(__pyx_v_state); - /* "_pywrapfst.pyx":1901 + /* "_pywrapfst.pyx":1897 * """ * cdef size_t _result = self._fst.get().NumOutputEpsilons(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30792,14 +30723,14 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ __pyx_t_8 = (__pyx_v__result == std::numeric_limits ::max()); if (unlikely(__pyx_t_8)) { - /* "_pywrapfst.pyx":1902 + /* "_pywrapfst.pyx":1898 * cdef size_t _result = self._fst.get().NumOutputEpsilons(state) * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * return _result * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1902, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_6 = 0; @@ -30819,15 +30750,15 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __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, 1902, __pyx_L1_error) + __PYX_ERR(0, 1898, __pyx_L1_error) - /* "_pywrapfst.pyx":1901 + /* "_pywrapfst.pyx":1897 * """ * cdef size_t _result = self._fst.get().NumOutputEpsilons(state) * if _result == numeric_limits[size_t].max(): # <<<<<<<<<<<<<< @@ -30836,7 +30767,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ */ } - /* "_pywrapfst.pyx":1903 + /* "_pywrapfst.pyx":1899 * if _result == numeric_limits[size_t].max(): * raise FstIndexError("State index out of range") * return _result # <<<<<<<<<<<<<< @@ -30846,7 +30777,7 @@ static size_t __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(struct __pyx_obj_10_ __pyx_r = __pyx_v__result; goto __pyx_L0; - /* "_pywrapfst.pyx":1885 + /* "_pywrapfst.pyx":1881 * return _result * * cpdef size_t num_output_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -30922,23 +30853,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1885, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_output_epsilons") < 0)) __PYX_ERR(0, 1885, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "num_output_epsilons") < 0)) __PYX_ERR(0, 1881, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1885, __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, 1881, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("num_output_epsilons", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1885, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("num_output_epsilons", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1881, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30975,8 +30906,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_28num_output_epsilons(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("num_output_epsilons", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1885, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_num_output_epsilons(__pyx_v_self, __pyx_v_state, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1881, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -30993,7 +30924,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_28num_output_epsilons(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":1905 +/* "_pywrapfst.pyx":1901 * return _result * * cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< @@ -31030,7 +30961,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_output_symbols); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __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, 1901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_31output_symbols)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -31053,11 +30984,11 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1905, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1901, __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_10_pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1905, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__FstSymbolTableView))))) __PYX_ERR(0, 1901, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31076,7 +31007,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 #endif } - /* "_pywrapfst.pyx":1911 + /* "_pywrapfst.pyx":1907 * Returns the FST's output symbol table, or None if none is present. * """ * if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -31085,12 +31016,12 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1911, __pyx_L1_error) + __PYX_ERR(0, 1907, __pyx_L1_error) } __pyx_t_6 = (__pyx_v_self->_fst.get()->OutputSymbols() == NULL); if (__pyx_t_6) { - /* "_pywrapfst.pyx":1912 + /* "_pywrapfst.pyx":1908 * """ * if self._fst.get().OutputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -31101,7 +31032,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":1911 + /* "_pywrapfst.pyx":1907 * Returns the FST's output symbol table, or None if none is present. * """ * if self._fst.get().OutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -31110,7 +31041,7 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 */ } - /* "_pywrapfst.pyx":1913 + /* "_pywrapfst.pyx":1909 * if self._fst.get().OutputSymbols() == NULL: * return * return _init_FstSymbolTableView(self._fst, input_side=False) # <<<<<<<<<<<<<< @@ -31120,15 +31051,15 @@ static struct __pyx_obj_10_pywrapfst__FstSymbolTableView *__pyx_f_10_pywrapfst_3 __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1913, __pyx_L1_error) + __PYX_ERR(0, 1909, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_FstSymbolTableView(__pyx_v_self->_fst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst__FstSymbolTableView *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1905 + /* "_pywrapfst.pyx":1901 * return _result * * cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< @@ -31201,7 +31132,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_30output_symbols(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("output_symbols", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_output_symbols(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31218,7 +31149,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_30output_symbols(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":1915 +/* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -31236,7 +31167,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_3Fst_print *__pyx_optional_args) { struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_isymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":1916 + /* "_pywrapfst.pyx":1912 * * cpdef string print(self, SymbolTableView isymbols=None, * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, # <<<<<<<<<<<<<< @@ -31246,7 +31177,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_ssymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":1917 + /* "_pywrapfst.pyx":1913 * cpdef string print(self, SymbolTableView isymbols=None, * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, * bool acceptor=False, bool show_weight_one=False, # <<<<<<<<<<<<<< @@ -31255,7 +31186,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ bool __pyx_v_acceptor = ((bool)0); bool __pyx_v_show_weight_one = ((bool)0); - PyObject *__pyx_v_missing_sym = ((PyObject *)__pyx_kp_u__5); + PyObject *__pyx_v_missing_sym = ((PyObject *)__pyx_kp_u__6); fst::SymbolTable const *__pyx_v__isymbols; fst::SymbolTable const *__pyx_v__osymbols; fst::SymbolTable const *__pyx_v__ssymbols; @@ -31297,7 +31228,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst } } - /* "_pywrapfst.pyx":1915 + /* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -31313,12 +31244,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_33print)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_acceptor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __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, 1915, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_show_weight_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -31341,11 +31272,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_8 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_8 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31364,7 +31295,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst #endif } - /* "_pywrapfst.pyx":1941 + /* "_pywrapfst.pyx":1937 * """ * # Prints FST to stringstream, then returns resulting string. * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<< @@ -31373,11 +31304,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1941, __pyx_L1_error) + __PYX_ERR(0, 1937, __pyx_L1_error) } __pyx_v__isymbols = __pyx_v_self->_fst.get()->InputSymbols(); - /* "_pywrapfst.pyx":1942 + /* "_pywrapfst.pyx":1938 * # Prints FST to stringstream, then returns resulting string. * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: # <<<<<<<<<<<<<< @@ -31387,7 +31318,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst __pyx_t_9 = (((PyObject *)__pyx_v_isymbols) != Py_None); if (__pyx_t_9) { - /* "_pywrapfst.pyx":1943 + /* "_pywrapfst.pyx":1939 * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: * _isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -31396,12 +31327,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1943, __pyx_L1_error) + __PYX_ERR(0, 1939, __pyx_L1_error) } - __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1943, __pyx_L1_error) + __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1939, __pyx_L1_error) __pyx_v__isymbols = __pyx_t_10; - /* "_pywrapfst.pyx":1942 + /* "_pywrapfst.pyx":1938 * # Prints FST to stringstream, then returns resulting string. * cdef const fst.SymbolTable *_isymbols = self._fst.get().InputSymbols() * if isymbols is not None: # <<<<<<<<<<<<<< @@ -31410,7 +31341,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ } - /* "_pywrapfst.pyx":1944 + /* "_pywrapfst.pyx":1940 * if isymbols is not None: * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<< @@ -31419,11 +31350,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1944, __pyx_L1_error) + __PYX_ERR(0, 1940, __pyx_L1_error) } __pyx_v__osymbols = __pyx_v_self->_fst.get()->OutputSymbols(); - /* "_pywrapfst.pyx":1945 + /* "_pywrapfst.pyx":1941 * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: # <<<<<<<<<<<<<< @@ -31433,7 +31364,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst __pyx_t_9 = (((PyObject *)__pyx_v_osymbols) != Py_None); if (__pyx_t_9) { - /* "_pywrapfst.pyx":1946 + /* "_pywrapfst.pyx":1942 * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: * _osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -31442,12 +31373,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1946, __pyx_L1_error) + __PYX_ERR(0, 1942, __pyx_L1_error) } - __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1946, __pyx_L1_error) + __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1942, __pyx_L1_error) __pyx_v__osymbols = __pyx_t_10; - /* "_pywrapfst.pyx":1945 + /* "_pywrapfst.pyx":1941 * _isymbols = isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_osymbols = self._fst.get().OutputSymbols() * if osymbols is not None: # <<<<<<<<<<<<<< @@ -31456,7 +31387,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ } - /* "_pywrapfst.pyx":1947 + /* "_pywrapfst.pyx":1943 * if osymbols is not None: * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL # <<<<<<<<<<<<<< @@ -31465,7 +31396,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ __pyx_v__ssymbols = NULL; - /* "_pywrapfst.pyx":1948 + /* "_pywrapfst.pyx":1944 * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -31475,7 +31406,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst __pyx_t_9 = (((PyObject *)__pyx_v_ssymbols) != Py_None); if (__pyx_t_9) { - /* "_pywrapfst.pyx":1949 + /* "_pywrapfst.pyx":1945 * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: * _ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -31484,12 +31415,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 1949, __pyx_L1_error) + __PYX_ERR(0, 1945, __pyx_L1_error) } - __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_10 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_ssymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1945, __pyx_L1_error) __pyx_v__ssymbols = __pyx_t_10; - /* "_pywrapfst.pyx":1948 + /* "_pywrapfst.pyx":1944 * _osymbols = osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -31498,7 +31429,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ } - /* "_pywrapfst.pyx":1951 + /* "_pywrapfst.pyx":1947 * _ssymbols = ssymbols._raw_ptr_or_raise() * cdef stringstream _sstrm * fst.Print(deref(self._fst), # <<<<<<<<<<<<<< @@ -31507,19 +31438,19 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1951, __pyx_L1_error) + __PYX_ERR(0, 1947, __pyx_L1_error) } - /* "_pywrapfst.pyx":1959 + /* "_pywrapfst.pyx":1955 * acceptor, * show_weight_one, * tostring(missing_sym)) # <<<<<<<<<<<<<< * return _sstrm.str() * */ - __pyx_t_8 = __pyx_f_10_pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1959, __pyx_L1_error) + __pyx_t_8 = __pyx_f_10_pywrapfst_tostring(__pyx_v_missing_sym); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1955, __pyx_L1_error) - /* "_pywrapfst.pyx":1951 + /* "_pywrapfst.pyx":1947 * _ssymbols = ssymbols._raw_ptr_or_raise() * cdef stringstream _sstrm * fst.Print(deref(self._fst), # <<<<<<<<<<<<<< @@ -31528,7 +31459,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst */ fst::script::Print((*__pyx_v_self->_fst), __pyx_v__sstrm, __pyx_k_pywrapfst, __pyx_v__isymbols, __pyx_v__osymbols, __pyx_v__ssymbols, __pyx_v_acceptor, __pyx_v_show_weight_one, __pyx_t_8); - /* "_pywrapfst.pyx":1960 + /* "_pywrapfst.pyx":1956 * show_weight_one, * tostring(missing_sym)) * return _sstrm.str() # <<<<<<<<<<<<<< @@ -31538,7 +31469,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_print(struct __pyx_obj_10_pywrapfst __pyx_r = __pyx_v__sstrm.str(); goto __pyx_L0; - /* "_pywrapfst.pyx":1915 + /* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -31607,7 +31538,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_isymbols,&__pyx_n_s_osymbols,&__pyx_n_s_ssymbols,&__pyx_n_s_acceptor,&__pyx_n_s_show_weight_one,&__pyx_n_s_missing_sym,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - /* "_pywrapfst.pyx":1916 + /* "_pywrapfst.pyx":1912 * * cpdef string print(self, SymbolTableView isymbols=None, * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, # <<<<<<<<<<<<<< @@ -31616,7 +31547,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); values[2] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__5)); + values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__6)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { @@ -31641,47 +31572,47 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_isymbols); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_osymbols); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ssymbols); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_acceptor); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_show_weight_one); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_missing_sym); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "print") < 0)) __PYX_ERR(0, 1915, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "print") < 0)) __PYX_ERR(0, 1911, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -31705,10 +31636,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[1]); __pyx_v_ssymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[2]); if (values[3]) { - __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1917, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1913, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":1917 + /* "_pywrapfst.pyx":1913 * cpdef string print(self, SymbolTableView isymbols=None, * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, * bool acceptor=False, bool show_weight_one=False, # <<<<<<<<<<<<<< @@ -31718,7 +31649,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 1917, __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, 1913, __pyx_L3_error) } else { __pyx_v_show_weight_one = ((bool)0); } @@ -31726,7 +31657,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("print", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 1915, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("print", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 1911, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31740,12 +31671,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1915, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1916, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1916, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "isymbols", 0))) __PYX_ERR(0, 1911, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "osymbols", 0))) __PYX_ERR(0, 1912, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "ssymbols", 0))) __PYX_ERR(0, 1912, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_3Fst_32print(((struct __pyx_obj_10_pywrapfst_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":1915 + /* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< @@ -31786,8 +31717,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_32print(struct __pyx_obj_10_pywrapfs __pyx_t_2.acceptor = __pyx_v_acceptor; __pyx_t_2.show_weight_one = __pyx_v_show_weight_one; __pyx_t_2.missing_sym = __pyx_v_missing_sym; - __pyx_t_1 = __pyx_vtabptr_10_pywrapfst_Fst->print(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L1_error) - __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_10_pywrapfst_Fst->print(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1911, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -31804,7 +31735,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_32print(struct __pyx_obj_10_pywrapfs return __pyx_r; } -/* "_pywrapfst.pyx":1962 +/* "_pywrapfst.pyx":1958 * return _sstrm.str() * * def properties(self, mask, bool test): # <<<<<<<<<<<<<< @@ -31869,7 +31800,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1962, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -31877,14 +31808,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1962, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1962, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, 1); __PYX_ERR(0, 1958, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "properties") < 0)) __PYX_ERR(0, 1962, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "properties") < 0)) __PYX_ERR(0, 1958, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -31893,11 +31824,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_mask = values[0]; - __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1962, __pyx_L3_error) + __pyx_v_test = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_test == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1958, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1962, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("properties", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1958, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31938,7 +31869,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_34properties(struct __pyx_obj_10_pyw int __pyx_clineno = 0; __Pyx_RefNannySetupContext("properties", 1); - /* "_pywrapfst.pyx":1980 + /* "_pywrapfst.pyx":1976 * A FstProperties representing a 64-bit bitmask of the requested properties. * """ * return FstProperties(self._fst.get().Properties(mask.value, test)) # <<<<<<<<<<<<<< @@ -31946,17 +31877,17 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_34properties(struct __pyx_obj_10_pyw * @classmethod */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 1980, __pyx_L1_error) + __PYX_ERR(0, 1976, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1980, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_3); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_fst.get()->Properties(__pyx_t_4, __pyx_v_test)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1980, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->_fst.get()->Properties(__pyx_t_4, __pyx_v_test)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -31977,7 +31908,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_34properties(struct __pyx_obj_10_pyw __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -31985,7 +31916,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_34properties(struct __pyx_obj_10_pyw __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1962 + /* "_pywrapfst.pyx":1958 * return _sstrm.str() * * def properties(self, mask, bool test): # <<<<<<<<<<<<<< @@ -32007,7 +31938,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_34properties(struct __pyx_obj_10_pyw return __pyx_r; } -/* "_pywrapfst.pyx":1982 +/* "_pywrapfst.pyx":1978 * return FstProperties(self._fst.get().Properties(mask.value, test)) * * @classmethod # <<<<<<<<<<<<<< @@ -32069,12 +32000,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1982, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1978, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1982, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read") < 0)) __PYX_ERR(0, 1978, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -32085,7 +32016,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1982, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1978, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32121,7 +32052,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_36read(CYTHON_UNUSED PyTypeObject *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 1); - /* "_pywrapfst.pyx":1998 + /* "_pywrapfst.pyx":1994 * FstIOError: Read failed. * """ * return _read_Fst(source) # <<<<<<<<<<<<<< @@ -32129,13 +32060,13 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_36read(CYTHON_UNUSED PyTypeObject *_ * @classmethod */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":1982 + /* "_pywrapfst.pyx":1978 * return FstProperties(self._fst.get().Properties(mask.value, test)) * * @classmethod # <<<<<<<<<<<<<< @@ -32154,7 +32085,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_36read(CYTHON_UNUSED PyTypeObject *_ return __pyx_r; } -/* "_pywrapfst.pyx":2000 +/* "_pywrapfst.pyx":1996 * return _read_Fst(source) * * @classmethod # <<<<<<<<<<<<<< @@ -32216,12 +32147,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2000, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1996, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 2000, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "read_from_string") < 0)) __PYX_ERR(0, 1996, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -32232,7 +32163,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2000, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1996, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32269,7 +32200,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_38read_from_string(CYTHON_UNUSED PyT int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_from_string", 1); - /* "_pywrapfst.pyx":2016 + /* "_pywrapfst.pyx":2012 * FstIOError: Read failed. * """ * return _read_Fst_from_string(state) # <<<<<<<<<<<<<< @@ -32277,14 +32208,14 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_38read_from_string(CYTHON_UNUSED PyT * cpdef int64_t start(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst_from_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2016, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2012, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst_from_string(__PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1), 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2000 + /* "_pywrapfst.pyx":1996 * return _read_Fst(source) * * @classmethod # <<<<<<<<<<<<<< @@ -32303,7 +32234,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_38read_from_string(CYTHON_UNUSED PyT return __pyx_r; } -/* "_pywrapfst.pyx":2018 +/* "_pywrapfst.pyx":2014 * return _read_Fst_from_string(state) * * cpdef int64_t start(self): # <<<<<<<<<<<<<< @@ -32340,7 +32271,7 @@ static int64_t __pyx_f_10_pywrapfst_3Fst_start(struct __pyx_obj_10_pywrapfst_Fst if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2018, __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, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_41start)) { __Pyx_INCREF(__pyx_t_1); @@ -32362,11 +32293,11 @@ static int64_t __pyx_f_10_pywrapfst_3Fst_start(struct __pyx_obj_10_pywrapfst_Fst PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2018, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2018, __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, 2014, __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; @@ -32385,7 +32316,7 @@ static int64_t __pyx_f_10_pywrapfst_3Fst_start(struct __pyx_obj_10_pywrapfst_Fst #endif } - /* "_pywrapfst.pyx":2024 + /* "_pywrapfst.pyx":2020 * Returns the start state. * """ * return self._fst.get().Start() # <<<<<<<<<<<<<< @@ -32394,12 +32325,12 @@ static int64_t __pyx_f_10_pywrapfst_3Fst_start(struct __pyx_obj_10_pywrapfst_Fst */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2024, __pyx_L1_error) + __PYX_ERR(0, 2020, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->Start(); goto __pyx_L0; - /* "_pywrapfst.pyx":2018 + /* "_pywrapfst.pyx":2014 * return _read_Fst_from_string(state) * * cpdef int64_t start(self): # <<<<<<<<<<<<<< @@ -32472,8 +32403,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_40start(struct __pyx_obj_10_pywrapfs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("start", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_start(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2018, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2018, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_start(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2014, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -32490,7 +32421,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_40start(struct __pyx_obj_10_pywrapfs return __pyx_r; } -/* "_pywrapfst.pyx":2026 +/* "_pywrapfst.pyx":2022 * return self._fst.get().Start() * * cpdef _StateIterator states(self): # <<<<<<<<<<<<<< @@ -32526,7 +32457,7 @@ static struct __pyx_obj_10_pywrapfst__StateIterator *__pyx_f_10_pywrapfst_3Fst_s if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __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, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_43states)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -32549,11 +32480,11 @@ static struct __pyx_obj_10_pywrapfst__StateIterator *__pyx_f_10_pywrapfst_3Fst_s PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2026, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __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_10_pywrapfst__StateIterator))))) __PYX_ERR(0, 2026, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__StateIterator))))) __PYX_ERR(0, 2022, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__StateIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -32572,7 +32503,7 @@ static struct __pyx_obj_10_pywrapfst__StateIterator *__pyx_f_10_pywrapfst_3Fst_s #endif } - /* "_pywrapfst.pyx":2035 + /* "_pywrapfst.pyx":2031 * A _StateIterator object for the FST. * """ * return _StateIterator(self) # <<<<<<<<<<<<<< @@ -32580,13 +32511,13 @@ static struct __pyx_obj_10_pywrapfst__StateIterator *__pyx_f_10_pywrapfst_3Fst_s * cpdef bool verify(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst__StateIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2026 + /* "_pywrapfst.pyx":2022 * return self._fst.get().Start() * * cpdef _StateIterator states(self): # <<<<<<<<<<<<<< @@ -32659,7 +32590,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_42states(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("states", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Fst_states(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32676,7 +32607,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_42states(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":2037 +/* "_pywrapfst.pyx":2033 * return _StateIterator(self) * * cpdef bool verify(self): # <<<<<<<<<<<<<< @@ -32713,7 +32644,7 @@ static bool __pyx_f_10_pywrapfst_3Fst_verify(struct __pyx_obj_10_pywrapfst_Fst * if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_verify); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __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, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_45verify)) { __Pyx_INCREF(__pyx_t_1); @@ -32735,11 +32666,11 @@ static bool __pyx_f_10_pywrapfst_3Fst_verify(struct __pyx_obj_10_pywrapfst_Fst * PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 2037, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2033, __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; @@ -32758,7 +32689,7 @@ static bool __pyx_f_10_pywrapfst_3Fst_verify(struct __pyx_obj_10_pywrapfst_Fst * #endif } - /* "_pywrapfst.pyx":2046 + /* "_pywrapfst.pyx":2042 * True if the contents are sane, False otherwise. * """ * return fst.Verify(deref(self._fst)) # <<<<<<<<<<<<<< @@ -32767,12 +32698,12 @@ static bool __pyx_f_10_pywrapfst_3Fst_verify(struct __pyx_obj_10_pywrapfst_Fst * */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2046, __pyx_L1_error) + __PYX_ERR(0, 2042, __pyx_L1_error) } __pyx_r = fst::script::Verify((*__pyx_v_self->_fst)); goto __pyx_L0; - /* "_pywrapfst.pyx":2037 + /* "_pywrapfst.pyx":2033 * return _StateIterator(self) * * cpdef bool verify(self): # <<<<<<<<<<<<<< @@ -32845,8 +32776,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_44verify(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("verify", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_verify(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2037, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_verify(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2033, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -32863,7 +32794,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_44verify(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":2048 +/* "_pywrapfst.pyx":2044 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -32900,7 +32831,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_weight_type(struct __pyx_obj_10_pyw if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weight_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2048, __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, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_47weight_type)) { __Pyx_INCREF(__pyx_t_1); @@ -32922,11 +32853,11 @@ static std::string __pyx_f_10_pywrapfst_3Fst_weight_type(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2048, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2044, __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; @@ -32945,7 +32876,7 @@ static std::string __pyx_f_10_pywrapfst_3Fst_weight_type(struct __pyx_obj_10_pyw #endif } - /* "_pywrapfst.pyx":2057 + /* "_pywrapfst.pyx":2053 * A string representing the weight type. * """ * return self._fst.get().WeightType() # <<<<<<<<<<<<<< @@ -32954,12 +32885,12 @@ static std::string __pyx_f_10_pywrapfst_3Fst_weight_type(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2057, __pyx_L1_error) + __PYX_ERR(0, 2053, __pyx_L1_error) } __pyx_r = __pyx_v_self->_fst.get()->WeightType(); goto __pyx_L0; - /* "_pywrapfst.pyx":2048 + /* "_pywrapfst.pyx":2044 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< @@ -33032,8 +32963,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_46weight_type(struct __pyx_obj_10_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("weight_type", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2048, __pyx_L1_error) - __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_weight_type(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2044, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -33050,7 +32981,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_46weight_type(struct __pyx_obj_10_py return __pyx_r; } -/* "_pywrapfst.pyx":2059 +/* "_pywrapfst.pyx":2055 * return self._fst.get().WeightType() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -33087,7 +33018,7 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2059, __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, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_49write)) { __Pyx_INCREF(__pyx_t_1); @@ -33109,7 +33040,7 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_source}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -33130,7 +33061,7 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ #endif } - /* "_pywrapfst.pyx":2073 + /* "_pywrapfst.pyx":2069 * FstIOError: Write failed. * """ * if not self._fst.get().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -33139,24 +33070,24 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2073, __pyx_L1_error) + __PYX_ERR(0, 2069, __pyx_L1_error) } - __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2073, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2069, __pyx_L1_error) __pyx_t_7 = (!(__pyx_v_self->_fst.get()->Write(__pyx_t_6) != 0)); if (unlikely(__pyx_t_7)) { - /* "_pywrapfst.pyx":2074 + /* "_pywrapfst.pyx":2070 * """ * if not self._fst.get().Write(path_tostring(source)): * raise FstIOError(f"Write failed: {source!r}") # <<<<<<<<<<<<<< * * cpdef bytes write_to_string(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2074, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Write_failed, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -33178,15 +33109,15 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __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, 2074, __pyx_L1_error) + __PYX_ERR(0, 2070, __pyx_L1_error) - /* "_pywrapfst.pyx":2073 + /* "_pywrapfst.pyx":2069 * FstIOError: Write failed. * """ * if not self._fst.get().Write(path_tostring(source)): # <<<<<<<<<<<<<< @@ -33195,7 +33126,7 @@ static void __pyx_f_10_pywrapfst_3Fst_write(struct __pyx_obj_10_pywrapfst_Fst *_ */ } - /* "_pywrapfst.pyx":2059 + /* "_pywrapfst.pyx":2055 * return self._fst.get().WeightType() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< @@ -33269,12 +33200,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2055, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 2059, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "write") < 0)) __PYX_ERR(0, 2055, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -33285,7 +33216,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2059, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2055, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33321,8 +33252,8 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_48write(struct __pyx_obj_10_pywrapfs int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_3Fst_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2059, __pyx_L1_error) + __pyx_f_10_pywrapfst_3Fst_write(__pyx_v_self, __pyx_v_source, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2055, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33339,7 +33270,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_48write(struct __pyx_obj_10_pywrapfs return __pyx_r; } -/* "_pywrapfst.pyx":2076 +/* "_pywrapfst.pyx":2072 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -33377,7 +33308,7 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Fst_51write_to_string)) { __Pyx_XDECREF(__pyx_r); @@ -33400,11 +33331,11 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 2076, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 2072, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -33423,7 +33354,7 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p #endif } - /* "_pywrapfst.pyx":2089 + /* "_pywrapfst.pyx":2085 * """ * cdef stringstream _sstrm * if not self._fst.get().Write(_sstrm, b""): # <<<<<<<<<<<<<< @@ -33432,19 +33363,19 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2089, __pyx_L1_error) + __PYX_ERR(0, 2085, __pyx_L1_error) } __pyx_t_6 = (!(__pyx_v_self->_fst.get()->Write(__pyx_v__sstrm, __pyx_k_pywrapfst) != 0)); if (unlikely(__pyx_t_6)) { - /* "_pywrapfst.pyx":2090 + /* "_pywrapfst.pyx":2086 * cdef stringstream _sstrm * if not self._fst.get().Write(_sstrm, b""): * raise FstIOError("Write to string failed") # <<<<<<<<<<<<<< * return _sstrm.str() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -33464,15 +33395,15 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Write_to_string_failed}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2086, __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, 2090, __pyx_L1_error) + __PYX_ERR(0, 2086, __pyx_L1_error) - /* "_pywrapfst.pyx":2089 + /* "_pywrapfst.pyx":2085 * """ * cdef stringstream _sstrm * if not self._fst.get().Write(_sstrm, b""): # <<<<<<<<<<<<<< @@ -33481,7 +33412,7 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p */ } - /* "_pywrapfst.pyx":2091 + /* "_pywrapfst.pyx":2087 * if not self._fst.get().Write(_sstrm, b""): * raise FstIOError("Write to string failed") * return _sstrm.str() # <<<<<<<<<<<<<< @@ -33489,13 +33420,13 @@ static PyObject *__pyx_f_10_pywrapfst_3Fst_write_to_string(struct __pyx_obj_10_p * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v__sstrm.str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2076 + /* "_pywrapfst.pyx":2072 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< @@ -33568,7 +33499,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_50write_to_string(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_to_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_3Fst_write_to_string(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33585,7 +33516,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Fst_50write_to_string(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":2104 +/* "_pywrapfst.pyx":2100 * """ * * cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<< @@ -33605,7 +33536,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_mutating_imethod", 1); - /* "_pywrapfst.pyx":2109 + /* "_pywrapfst.pyx":2105 * This function is not visible to Python users. * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -33614,19 +33545,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod(struct __p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2109, __pyx_L1_error) + __PYX_ERR(0, 2105, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->__pyx_base._fst.get()->Properties(fst::kError, 1) == fst::kError); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2110 + /* "_pywrapfst.pyx":2106 * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * cdef void _add_arc(self, int64_t state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2110, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -33646,15 +33577,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod(struct __p PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Operation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2110, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2106, __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, 2110, __pyx_L1_error) + __PYX_ERR(0, 2106, __pyx_L1_error) - /* "_pywrapfst.pyx":2109 + /* "_pywrapfst.pyx":2105 * This function is not visible to Python users. * """ * if self._fst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -33663,7 +33594,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod(struct __p */ } - /* "_pywrapfst.pyx":2104 + /* "_pywrapfst.pyx":2100 * """ * * cdef void _check_mutating_imethod(self) except *: # <<<<<<<<<<<<<< @@ -33682,7 +33613,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod(struct __p __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2111 +/* "_pywrapfst.pyx":2107 * if self._fst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef void _add_arc(self, int64_t state, Arc arc) except *: # <<<<<<<<<<<<<< @@ -33702,7 +33633,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_add_arc", 1); - /* "_pywrapfst.pyx":2112 + /* "_pywrapfst.pyx":2108 * raise FstOpError("Operation failed") * cdef void _add_arc(self, int64_t state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -33711,19 +33642,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2112, __pyx_L1_error) + __PYX_ERR(0, 2108, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2113 + /* "_pywrapfst.pyx":2109 * cdef void _add_arc(self, int64_t state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * if not self._mfst.get().AddArc(state, deref(arc._arc)): * raise FstOpError("Incompatible or invalid weight type") */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2113, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -33743,15 +33674,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2109, __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, 2113, __pyx_L1_error) + __PYX_ERR(0, 2109, __pyx_L1_error) - /* "_pywrapfst.pyx":2112 + /* "_pywrapfst.pyx":2108 * raise FstOpError("Operation failed") * cdef void _add_arc(self, int64_t state, Arc arc) except *: * if not self._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -33760,7 +33691,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":2114 + /* "_pywrapfst.pyx":2110 * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<< @@ -33769,23 +33700,23 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2114, __pyx_L1_error) + __PYX_ERR(0, 2110, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 2114, __pyx_L1_error) + __PYX_ERR(0, 2110, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->AddArc(__pyx_v_state, (*__pyx_v_arc->_arc)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2115 + /* "_pywrapfst.pyx":2111 * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): * raise FstOpError("Incompatible or invalid weight type") # <<<<<<<<<<<<<< * * def add_arc(self, int64_t state, Arc arc): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2115, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -33805,15 +33736,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight_t}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2115, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __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, 2115, __pyx_L1_error) + __PYX_ERR(0, 2111, __pyx_L1_error) - /* "_pywrapfst.pyx":2114 + /* "_pywrapfst.pyx":2110 * if not self._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * if not self._mfst.get().AddArc(state, deref(arc._arc)): # <<<<<<<<<<<<<< @@ -33822,7 +33753,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":2111 + /* "_pywrapfst.pyx":2107 * if self._fst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef void _add_arc(self, int64_t state, Arc arc) except *: # <<<<<<<<<<<<<< @@ -33841,7 +33772,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__add_arc(struct __pyx_obj_10_pywra __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2117 +/* "_pywrapfst.pyx":2113 * raise FstOpError("Incompatible or invalid weight type") * * def add_arc(self, int64_t state, Arc arc): # <<<<<<<<<<<<<< @@ -33906,7 +33837,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2113, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -33914,14 +33845,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2113, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 2117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, 1); __PYX_ERR(0, 2113, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_arc") < 0)) __PYX_ERR(0, 2117, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_arc") < 0)) __PYX_ERR(0, 2113, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -33929,12 +33860,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__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, 2117, __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, 2113, __pyx_L3_error) __pyx_v_arc = ((struct __pyx_obj_10_pywrapfst_Arc *)values[1]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_arc", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2113, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33948,7 +33879,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 2117, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 2113, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_add_arc(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_state, __pyx_v_arc); /* function exit code */ @@ -33974,7 +33905,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_add_arc(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_arc", 1); - /* "_pywrapfst.pyx":2134 + /* "_pywrapfst.pyx":2130 * FstOpdexError: Incompatible or invalid weight type. * """ * self._add_arc(state, arc) # <<<<<<<<<<<<<< @@ -33983,11 +33914,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_add_arc(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_add_arc"); - __PYX_ERR(0, 2134, __pyx_L1_error) + __PYX_ERR(0, 2130, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_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, 2134, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_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, 2130, __pyx_L1_error) - /* "_pywrapfst.pyx":2135 + /* "_pywrapfst.pyx":2131 * """ * self._add_arc(state, arc) * return self # <<<<<<<<<<<<<< @@ -33999,7 +33930,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_add_arc(struct __pyx_obj_10_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2117 + /* "_pywrapfst.pyx":2113 * raise FstOpError("Incompatible or invalid weight type") * * def add_arc(self, int64_t state, Arc arc): # <<<<<<<<<<<<<< @@ -34017,7 +33948,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_add_arc(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":2137 +/* "_pywrapfst.pyx":2133 * return self * * cpdef int64_t add_state(self): # <<<<<<<<<<<<<< @@ -34054,7 +33985,7 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_add_state(struct __pyx_obj_10_p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __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, 2133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_10MutableFst_3add_state)) { __Pyx_INCREF(__pyx_t_1); @@ -34076,11 +34007,11 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_add_state(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2137, __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, 2133, __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; @@ -34099,7 +34030,7 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_add_state(struct __pyx_obj_10_p #endif } - /* "_pywrapfst.pyx":2146 + /* "_pywrapfst.pyx":2142 * The integer index of the new state. * """ * return self._mfst.get().AddState() # <<<<<<<<<<<<<< @@ -34108,12 +34039,12 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_add_state(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2146, __pyx_L1_error) + __PYX_ERR(0, 2142, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mfst.get()->AddState(); goto __pyx_L0; - /* "_pywrapfst.pyx":2137 + /* "_pywrapfst.pyx":2133 * return self * * cpdef int64_t add_state(self): # <<<<<<<<<<<<<< @@ -34186,8 +34117,8 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_2add_state(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_state", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_10MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2137, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_10MutableFst_add_state(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2133, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -34204,7 +34135,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_2add_state(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":2148 +/* "_pywrapfst.pyx":2144 * return self._mfst.get().AddState() * * cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<< @@ -34240,10 +34171,10 @@ static void __pyx_f_10_pywrapfst_10MutableFst_add_states(struct __pyx_obj_10_pyw if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_10MutableFst_5add_states)) { - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2148, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -34265,7 +34196,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst_add_states(struct __pyx_obj_10_pyw __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2148, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -34286,7 +34217,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst_add_states(struct __pyx_obj_10_pyw #endif } - /* "_pywrapfst.pyx":2157 + /* "_pywrapfst.pyx":2153 * n: The number of states to add. * """ * self._mfst.get().AddStates(n) # <<<<<<<<<<<<<< @@ -34295,11 +34226,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst_add_states(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2157, __pyx_L1_error) + __PYX_ERR(0, 2153, __pyx_L1_error) } __pyx_v_self->_mfst.get()->AddStates(__pyx_v_n); - /* "_pywrapfst.pyx":2148 + /* "_pywrapfst.pyx":2144 * return self._mfst.get().AddState() * * cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<< @@ -34374,23 +34305,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2144, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_states") < 0)) __PYX_ERR(0, 2148, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_states") < 0)) __PYX_ERR(0, 2144, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_n = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_n == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2144, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_states", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2148, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_states", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2144, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34426,8 +34357,8 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_4add_states(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_states", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_10MutableFst_add_states(__pyx_v_self, __pyx_v_n, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L1_error) + __pyx_f_10_pywrapfst_10MutableFst_add_states(__pyx_v_self, __pyx_v_n, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2144, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -34444,7 +34375,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_4add_states(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":2159 +/* "_pywrapfst.pyx":2155 * self._mfst.get().AddStates(n) * * cdef void _arcsort(self, sort_type="ilabel") except *: # <<<<<<<<<<<<<< @@ -34473,29 +34404,29 @@ static void __pyx_f_10_pywrapfst_10MutableFst__arcsort(struct __pyx_obj_10_pywra } } - /* "_pywrapfst.pyx":2161 + /* "_pywrapfst.pyx":2157 * cdef void _arcsort(self, sort_type="ilabel") except *: * cdef fst.ArcSortType _sort_type * if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): # <<<<<<<<<<<<<< * raise FstArgError(f"Unknown sort type: {sort_type!r}") * fst.ArcSort(self._mfst.get(), _sort_type) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_sort_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2157, __pyx_L1_error) __pyx_t_2 = (!(fst::script::GetArcSortType(__pyx_t_1, (&__pyx_v__sort_type)) != 0)); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":2162 + /* "_pywrapfst.pyx":2158 * cdef fst.ArcSortType _sort_type * if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): * raise FstArgError(f"Unknown sort type: {sort_type!r}") # <<<<<<<<<<<<<< * fst.ArcSort(self._mfst.get(), _sort_type) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2162, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sort_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_sort_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_sort_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_sort_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -34517,15 +34448,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__arcsort(struct __pyx_obj_10_pywra __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2162, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2162, __pyx_L1_error) + __PYX_ERR(0, 2158, __pyx_L1_error) - /* "_pywrapfst.pyx":2161 + /* "_pywrapfst.pyx":2157 * cdef void _arcsort(self, sort_type="ilabel") except *: * cdef fst.ArcSortType _sort_type * if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): # <<<<<<<<<<<<<< @@ -34534,7 +34465,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__arcsort(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":2163 + /* "_pywrapfst.pyx":2159 * if not fst.GetArcSortType(tostring(sort_type), addr(_sort_type)): * raise FstArgError(f"Unknown sort type: {sort_type!r}") * fst.ArcSort(self._mfst.get(), _sort_type) # <<<<<<<<<<<<<< @@ -34543,11 +34474,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__arcsort(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2163, __pyx_L1_error) + __PYX_ERR(0, 2159, __pyx_L1_error) } fst::script::ArcSort(__pyx_v_self->_mfst.get(), __pyx_v__sort_type); - /* "_pywrapfst.pyx":2159 + /* "_pywrapfst.pyx":2155 * self._mfst.get().AddStates(n) * * cdef void _arcsort(self, sort_type="ilabel") except *: # <<<<<<<<<<<<<< @@ -34567,7 +34498,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__arcsort(struct __pyx_obj_10_pywra __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2165 +/* "_pywrapfst.pyx":2161 * fst.ArcSort(self._mfst.get(), _sort_type) * * def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<< @@ -34629,12 +34560,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sort_type); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2165, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2161, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcsort") < 0)) __PYX_ERR(0, 2165, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcsort") < 0)) __PYX_ERR(0, 2161, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -34648,7 +34579,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2165, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("arcsort", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2161, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34684,7 +34615,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_6arcsort(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arcsort", 1); - /* "_pywrapfst.pyx":2184 + /* "_pywrapfst.pyx":2180 * FstArgError: Unknown sort type. * """ * self._arcsort(sort_type) # <<<<<<<<<<<<<< @@ -34693,13 +34624,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_6arcsort(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arcsort"); - __PYX_ERR(0, 2184, __pyx_L1_error) + __PYX_ERR(0, 2180, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.sort_type = __pyx_v_sort_type; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2184, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_arcsort(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error) - /* "_pywrapfst.pyx":2185 + /* "_pywrapfst.pyx":2181 * """ * self._arcsort(sort_type) * return self # <<<<<<<<<<<<<< @@ -34711,7 +34642,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_6arcsort(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2165 + /* "_pywrapfst.pyx":2161 * fst.ArcSort(self._mfst.get(), _sort_type) * * def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<< @@ -34729,7 +34660,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_6arcsort(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2187 +/* "_pywrapfst.pyx":2183 * return self * * cdef void _closure(self, closure_type="star"): # <<<<<<<<<<<<<< @@ -34750,7 +34681,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__closure(struct __pyx_obj_10_pywra } } - /* "_pywrapfst.pyx":2188 + /* "_pywrapfst.pyx":2184 * * cdef void _closure(self, closure_type="star"): * fst.Closure(self._mfst.get(), _get_closure_type(tostring(closure_type))) # <<<<<<<<<<<<<< @@ -34759,13 +34690,13 @@ static void __pyx_f_10_pywrapfst_10MutableFst__closure(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2188, __pyx_L1_error) + __PYX_ERR(0, 2184, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_closure_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2188, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_closure_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2188, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_closure_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2184, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_closure_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2184, __pyx_L1_error) fst::script::Closure(__pyx_v_self->_mfst.get(), __pyx_t_2); - /* "_pywrapfst.pyx":2187 + /* "_pywrapfst.pyx":2183 * return self * * cdef void _closure(self, closure_type="star"): # <<<<<<<<<<<<<< @@ -34780,7 +34711,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__closure(struct __pyx_obj_10_pywra __pyx_L0:; } -/* "_pywrapfst.pyx":2190 +/* "_pywrapfst.pyx":2186 * fst.Closure(self._mfst.get(), _get_closure_type(tostring(closure_type))) * * def closure(self, closure_type="star"): # <<<<<<<<<<<<<< @@ -34796,7 +34727,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_10MutableFst_8closure, "\n closure(self, closure_type=\"star\")\n\n Computes concatenative closure.\n\n This operation destructively converts the FST to its concatenative closure.\n If A transduces string x to y with weight a, then the closure transduces x\n to y with weight a, xx to yy with weight a \\otimes a, xxx to yyy with weight\n a \\otimes a \\otimes a, and so on. The empty string is also transduced to\n itself with semiring One if `closure_type` is \"star\".\n\n Args:\n closure_type: If \"star\", do not accept the empty string. If \"plus\", accept the empty string.\n\n Returns:\n self.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_10MutableFst_8closure, "\n closure(self, closure_type=\"star\")\n\n Computes concatenative closure.\n\n This operation destructively converts the FST to its concatenative closure.\n If A transduces string x to y with weight a, then the closure transduces x\n to y with weight a, xx to yy with weight a \\otimes a, xxx to yyy with weight\n a \\otimes a \\otimes a, and so on. The empty string is also transduced to\n itself with semiring One if `closure_type` is \"star\".\n\n Args:\n closure_type: If \"star\", do not accept the empty string. If \"plus\", accept\n the empty string.\n\n Returns:\n self.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_10MutableFst_9closure = {"closure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_10MutableFst_9closure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_10MutableFst_8closure}; static PyObject *__pyx_pw_10_pywrapfst_10MutableFst_9closure(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL @@ -34842,12 +34773,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_closure_type); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2190, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2186, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closure") < 0)) __PYX_ERR(0, 2190, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "closure") < 0)) __PYX_ERR(0, 2186, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -34861,7 +34792,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2190, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("closure", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2186, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34897,7 +34828,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_8closure(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("closure", 1); - /* "_pywrapfst.pyx":2208 + /* "_pywrapfst.pyx":2205 * self. * """ * self._closure(closure_type) # <<<<<<<<<<<<<< @@ -34906,13 +34837,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_8closure(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_closure"); - __PYX_ERR(0, 2208, __pyx_L1_error) + __PYX_ERR(0, 2205, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.closure_type = __pyx_v_closure_type; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2208, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_closure(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2205, __pyx_L1_error) - /* "_pywrapfst.pyx":2209 + /* "_pywrapfst.pyx":2206 * """ * self._closure(closure_type) * return self # <<<<<<<<<<<<<< @@ -34924,7 +34855,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_8closure(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2190 + /* "_pywrapfst.pyx":2186 * fst.Closure(self._mfst.get(), _get_closure_type(tostring(closure_type))) * * def closure(self, closure_type="star"): # <<<<<<<<<<<<<< @@ -34942,7 +34873,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_8closure(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2211 +/* "_pywrapfst.pyx":2208 * return self * * cdef void _concat(self, Fst fst2) except *: # <<<<<<<<<<<<<< @@ -34955,7 +34886,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__concat(struct __pyx_obj_10_pywrap const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2212 + /* "_pywrapfst.pyx":2209 * * cdef void _concat(self, Fst fst2) except *: * fst.Concat(self._mfst.get(), deref(fst2._fst)) # <<<<<<<<<<<<<< @@ -34964,15 +34895,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__concat(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2212, __pyx_L1_error) + __PYX_ERR(0, 2209, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2212, __pyx_L1_error) + __PYX_ERR(0, 2209, __pyx_L1_error) } fst::script::Concat(__pyx_v_self->_mfst.get(), (*__pyx_v_fst2->_fst)); - /* "_pywrapfst.pyx":2213 + /* "_pywrapfst.pyx":2210 * cdef void _concat(self, Fst fst2) except *: * fst.Concat(self._mfst.get(), deref(fst2._fst)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -34981,11 +34912,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__concat(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2213, __pyx_L1_error) + __PYX_ERR(0, 2210, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2213, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2210, __pyx_L1_error) - /* "_pywrapfst.pyx":2211 + /* "_pywrapfst.pyx":2208 * return self * * cdef void _concat(self, Fst fst2) except *: # <<<<<<<<<<<<<< @@ -35000,7 +34931,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__concat(struct __pyx_obj_10_pywrap __pyx_L0:; } -/* "_pywrapfst.pyx":2215 +/* "_pywrapfst.pyx":2212 * self._check_mutating_imethod() * * def concat(self, Fst fst2): # <<<<<<<<<<<<<< @@ -35062,12 +34993,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2215, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2212, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 2215, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "concat") < 0)) __PYX_ERR(0, 2212, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -35078,7 +35009,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("concat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2215, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("concat", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2212, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35092,7 +35023,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst2), __pyx_ptype_10_pywrapfst_Fst, 1, "fst2", 0))) __PYX_ERR(0, 2215, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst2), __pyx_ptype_10_pywrapfst_Fst, 1, "fst2", 0))) __PYX_ERR(0, 2212, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_10concat(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_fst2); /* function exit code */ @@ -35118,7 +35049,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_10concat(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("concat", 1); - /* "_pywrapfst.pyx":2232 + /* "_pywrapfst.pyx":2229 * self. * """ * self._concat(fst2) # <<<<<<<<<<<<<< @@ -35127,11 +35058,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_10concat(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_concat"); - __PYX_ERR(0, 2232, __pyx_L1_error) + __PYX_ERR(0, 2229, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_fst2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2232, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_concat(__pyx_v_self, __pyx_v_fst2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2229, __pyx_L1_error) - /* "_pywrapfst.pyx":2233 + /* "_pywrapfst.pyx":2230 * """ * self._concat(fst2) * return self # <<<<<<<<<<<<<< @@ -35143,7 +35074,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_10concat(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2215 + /* "_pywrapfst.pyx":2212 * self._check_mutating_imethod() * * def concat(self, Fst fst2): # <<<<<<<<<<<<<< @@ -35161,7 +35092,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_10concat(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2235 +/* "_pywrapfst.pyx":2232 * return self * * cdef void _connect(self): # <<<<<<<<<<<<<< @@ -35174,7 +35105,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__connect(struct __pyx_obj_10_pywra const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2236 + /* "_pywrapfst.pyx":2233 * * cdef void _connect(self): * fst.Connect(self._mfst.get()) # <<<<<<<<<<<<<< @@ -35183,11 +35114,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__connect(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2236, __pyx_L1_error) + __PYX_ERR(0, 2233, __pyx_L1_error) } fst::script::Connect(__pyx_v_self->_mfst.get()); - /* "_pywrapfst.pyx":2235 + /* "_pywrapfst.pyx":2232 * return self * * cdef void _connect(self): # <<<<<<<<<<<<<< @@ -35202,7 +35133,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__connect(struct __pyx_obj_10_pywra __pyx_L0:; } -/* "_pywrapfst.pyx":2238 +/* "_pywrapfst.pyx":2235 * fst.Connect(self._mfst.get()) * * def connect(self): # <<<<<<<<<<<<<< @@ -35260,7 +35191,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_12connect(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 1); - /* "_pywrapfst.pyx":2250 + /* "_pywrapfst.pyx":2247 * self. * """ * self._connect() # <<<<<<<<<<<<<< @@ -35269,11 +35200,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_12connect(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_connect"); - __PYX_ERR(0, 2250, __pyx_L1_error) + __PYX_ERR(0, 2247, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_connect(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2247, __pyx_L1_error) - /* "_pywrapfst.pyx":2251 + /* "_pywrapfst.pyx":2248 * """ * self._connect() * return self # <<<<<<<<<<<<<< @@ -35285,7 +35216,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_12connect(struct __pyx_obj_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2238 + /* "_pywrapfst.pyx":2235 * fst.Connect(self._mfst.get()) * * def connect(self): # <<<<<<<<<<<<<< @@ -35303,7 +35234,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_12connect(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":2253 +/* "_pywrapfst.pyx":2250 * return self * * cdef void _decode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<< @@ -35316,7 +35247,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__decode(struct __pyx_obj_10_pywrap const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2254 + /* "_pywrapfst.pyx":2251 * * cdef void _decode(self, EncodeMapper mapper) except *: * fst.Decode(self._mfst.get(), deref(mapper._mapper)) # <<<<<<<<<<<<<< @@ -35325,15 +35256,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__decode(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2254, __pyx_L1_error) + __PYX_ERR(0, 2251, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_mapper) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 2254, __pyx_L1_error) + __PYX_ERR(0, 2251, __pyx_L1_error) } fst::script::Decode(__pyx_v_self->_mfst.get(), (*__pyx_v_mapper->_mapper)); - /* "_pywrapfst.pyx":2255 + /* "_pywrapfst.pyx":2252 * cdef void _decode(self, EncodeMapper mapper) except *: * fst.Decode(self._mfst.get(), deref(mapper._mapper)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -35342,11 +35273,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__decode(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2255, __pyx_L1_error) + __PYX_ERR(0, 2252, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2255, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2252, __pyx_L1_error) - /* "_pywrapfst.pyx":2253 + /* "_pywrapfst.pyx":2250 * return self * * cdef void _decode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<< @@ -35361,7 +35292,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__decode(struct __pyx_obj_10_pywrap __pyx_L0:; } -/* "_pywrapfst.pyx":2257 +/* "_pywrapfst.pyx":2254 * self._check_mutating_imethod() * * def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< @@ -35423,12 +35354,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2257, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2254, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "decode") < 0)) __PYX_ERR(0, 2257, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "decode") < 0)) __PYX_ERR(0, 2254, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -35439,7 +35370,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2257, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("decode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2254, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35453,7 +35384,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_10_pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2257, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_10_pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2254, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_14decode(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_mapper); /* function exit code */ @@ -35479,7 +35410,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_14decode(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("decode", 1); - /* "_pywrapfst.pyx":2271 + /* "_pywrapfst.pyx":2268 * self. * """ * self._decode(mapper) # <<<<<<<<<<<<<< @@ -35488,11 +35419,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_14decode(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_decode"); - __PYX_ERR(0, 2271, __pyx_L1_error) + __PYX_ERR(0, 2268, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2271, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_decode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L1_error) - /* "_pywrapfst.pyx":2272 + /* "_pywrapfst.pyx":2269 * """ * self._decode(mapper) * return self # <<<<<<<<<<<<<< @@ -35504,7 +35435,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_14decode(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2257 + /* "_pywrapfst.pyx":2254 * self._check_mutating_imethod() * * def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< @@ -35522,7 +35453,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_14decode(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2274 +/* "_pywrapfst.pyx":2271 * return self * * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: # <<<<<<<<<<<<<< @@ -35549,7 +35480,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p } } - /* "_pywrapfst.pyx":2275 + /* "_pywrapfst.pyx":2272 * * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -35560,12 +35491,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p if (__pyx_t_2) { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2275, __pyx_L1_error) + __PYX_ERR(0, 2272, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state, __pyx_v_n); } else { - /* "_pywrapfst.pyx":2276 + /* "_pywrapfst.pyx":2273 * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else * self._mfst.get().DeleteArcs(state)): # <<<<<<<<<<<<<< @@ -35574,12 +35505,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2276, __pyx_L1_error) + __PYX_ERR(0, 2273, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_mfst.get()->DeleteArcs(__pyx_v_state); } - /* "_pywrapfst.pyx":2275 + /* "_pywrapfst.pyx":2272 * * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -35589,14 +35520,14 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p __pyx_t_2 = (!(__pyx_t_1 != 0)); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":2277 + /* "_pywrapfst.pyx":2274 * if not (self._mfst.get().DeleteArcs(state, n) if n else * self._mfst.get().DeleteArcs(state)): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2277, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -35616,15 +35547,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_State_index_out_of_range}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2277, __pyx_L1_error) + __PYX_ERR(0, 2274, __pyx_L1_error) - /* "_pywrapfst.pyx":2275 + /* "_pywrapfst.pyx":2272 * * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: * if not (self._mfst.get().DeleteArcs(state, n) if n else # <<<<<<<<<<<<<< @@ -35633,7 +35564,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p */ } - /* "_pywrapfst.pyx":2278 + /* "_pywrapfst.pyx":2275 * self._mfst.get().DeleteArcs(state)): * raise FstIndexError("State index out of range") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -35642,11 +35573,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2278, __pyx_L1_error) + __PYX_ERR(0, 2275, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_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_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2275, __pyx_L1_error) - /* "_pywrapfst.pyx":2274 + /* "_pywrapfst.pyx":2271 * return self * * cdef void _delete_arcs(self, int64_t state, size_t n=0) except *: # <<<<<<<<<<<<<< @@ -35665,7 +35596,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_arcs(struct __pyx_obj_10_p __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2280 +/* "_pywrapfst.pyx":2277 * self._check_mutating_imethod() * * def delete_arcs(self, int64_t state, size_t n=0): # <<<<<<<<<<<<<< @@ -35730,19 +35661,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2277, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2277, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 2280, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delete_arcs") < 0)) __PYX_ERR(0, 2277, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -35753,16 +35684,16 @@ PyObject *__pyx_args, PyObject *__pyx_kwds 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, 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, 2277, __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, 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, 2277, __pyx_L3_error) } else { __pyx_v_n = ((size_t)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2280, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("delete_arcs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2277, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35798,7 +35729,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_16delete_arcs(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delete_arcs", 1); - /* "_pywrapfst.pyx":2298 + /* "_pywrapfst.pyx":2295 * FstIndexError: State index out of range. * """ * self._delete_arcs(state, n) # <<<<<<<<<<<<<< @@ -35807,13 +35738,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_16delete_arcs(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_arcs"); - __PYX_ERR(0, 2298, __pyx_L1_error) + __PYX_ERR(0, 2295, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.n = __pyx_v_n; - ((struct __pyx_vtabstruct_10_pywrapfst_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, 2298, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_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, 2295, __pyx_L1_error) - /* "_pywrapfst.pyx":2299 + /* "_pywrapfst.pyx":2296 * """ * self._delete_arcs(state, n) * return self # <<<<<<<<<<<<<< @@ -35825,7 +35756,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_16delete_arcs(struct __pyx_o __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2280 + /* "_pywrapfst.pyx":2277 * self._check_mutating_imethod() * * def delete_arcs(self, int64_t state, size_t n=0): # <<<<<<<<<<<<<< @@ -35843,7 +35774,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_16delete_arcs(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":2301 +/* "_pywrapfst.pyx":2298 * return self * * cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<< @@ -35870,17 +35801,17 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 } } - /* "_pywrapfst.pyx":2303 + /* "_pywrapfst.pyx":2300 * 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( 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, 2303, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_states); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2300, __pyx_L1_error) if (__pyx_t_1) { - /* "_pywrapfst.pyx":2304 + /* "_pywrapfst.pyx":2301 * # Only the former signature has a possible indexing failure. * if states: * if not self._mfst.get().DeleteStates( states): # <<<<<<<<<<<<<< @@ -35889,20 +35820,20 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2304, __pyx_L1_error) + __PYX_ERR(0, 2301, __pyx_L1_error) } - __pyx_t_2 = __pyx_convert_vector_from_py_int64_t(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2304, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_from_py_int64_t(__pyx_v_states); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2301, __pyx_L1_error) __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->DeleteStates(((std::vector const )__pyx_t_2)) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2305 + /* "_pywrapfst.pyx":2302 * if states: * if not self._mfst.get().DeleteStates( states): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * else: * self._mfst.get().DeleteStates() */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -35922,15 +35853,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_State_index_out_of_range}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2305, __pyx_L1_error) + __PYX_ERR(0, 2302, __pyx_L1_error) - /* "_pywrapfst.pyx":2304 + /* "_pywrapfst.pyx":2301 * # Only the former signature has a possible indexing failure. * if states: * if not self._mfst.get().DeleteStates( states): # <<<<<<<<<<<<<< @@ -35939,7 +35870,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 */ } - /* "_pywrapfst.pyx":2303 + /* "_pywrapfst.pyx":2300 * cdef void _delete_states(self, states=None) except *: * # Only the former signature has a possible indexing failure. * if states: # <<<<<<<<<<<<<< @@ -35949,7 +35880,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 goto __pyx_L3; } - /* "_pywrapfst.pyx":2307 + /* "_pywrapfst.pyx":2304 * raise FstIndexError("State index out of range") * else: * self._mfst.get().DeleteStates() # <<<<<<<<<<<<<< @@ -35959,13 +35890,13 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 /*else*/ { if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2307, __pyx_L1_error) + __PYX_ERR(0, 2304, __pyx_L1_error) } __pyx_v_self->_mfst.get()->DeleteStates(); } __pyx_L3:; - /* "_pywrapfst.pyx":2308 + /* "_pywrapfst.pyx":2305 * else: * self._mfst.get().DeleteStates() * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -35974,11 +35905,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2308, __pyx_L1_error) + __PYX_ERR(0, 2305, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2305, __pyx_L1_error) - /* "_pywrapfst.pyx":2301 + /* "_pywrapfst.pyx":2298 * return self * * cdef void _delete_states(self, states=None) except *: # <<<<<<<<<<<<<< @@ -35997,7 +35928,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__delete_states(struct __pyx_obj_10 __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2310 +/* "_pywrapfst.pyx":2307 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< @@ -36059,12 +35990,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_states); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2310, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2307, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delete_states") < 0)) __PYX_ERR(0, 2310, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delete_states") < 0)) __PYX_ERR(0, 2307, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -36078,7 +36009,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2310, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("delete_states", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2307, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36114,7 +36045,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_18delete_states(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("delete_states", 1); - /* "_pywrapfst.pyx":2326 + /* "_pywrapfst.pyx":2323 * FstIndexError: State index out of range. * """ * self._delete_states(states) # <<<<<<<<<<<<<< @@ -36123,13 +36054,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_18delete_states(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_delete_states"); - __PYX_ERR(0, 2326, __pyx_L1_error) + __PYX_ERR(0, 2323, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.states = __pyx_v_states; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2326, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_delete_states(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2323, __pyx_L1_error) - /* "_pywrapfst.pyx":2327 + /* "_pywrapfst.pyx":2324 * """ * self._delete_states(states) * return self # <<<<<<<<<<<<<< @@ -36141,7 +36072,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_18delete_states(struct __pyx __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2310 + /* "_pywrapfst.pyx":2307 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< @@ -36159,7 +36090,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_18delete_states(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":2329 +/* "_pywrapfst.pyx":2326 * return self * * cdef void _encode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<< @@ -36172,7 +36103,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__encode(struct __pyx_obj_10_pywrap const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2330 + /* "_pywrapfst.pyx":2327 * * cdef void _encode(self, EncodeMapper mapper) except *: * fst.Encode(self._mfst.get(), mapper._mapper.get()) # <<<<<<<<<<<<<< @@ -36181,15 +36112,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__encode(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2330, __pyx_L1_error) + __PYX_ERR(0, 2327, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_mapper) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mapper"); - __PYX_ERR(0, 2330, __pyx_L1_error) + __PYX_ERR(0, 2327, __pyx_L1_error) } fst::script::Encode(__pyx_v_self->_mfst.get(), __pyx_v_mapper->_mapper.get()); - /* "_pywrapfst.pyx":2331 + /* "_pywrapfst.pyx":2328 * cdef void _encode(self, EncodeMapper mapper) except *: * fst.Encode(self._mfst.get(), mapper._mapper.get()) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -36198,11 +36129,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__encode(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2331, __pyx_L1_error) + __PYX_ERR(0, 2328, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_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_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2328, __pyx_L1_error) - /* "_pywrapfst.pyx":2329 + /* "_pywrapfst.pyx":2326 * return self * * cdef void _encode(self, EncodeMapper mapper) except *: # <<<<<<<<<<<<<< @@ -36217,7 +36148,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__encode(struct __pyx_obj_10_pywrap __pyx_L0:; } -/* "_pywrapfst.pyx":2333 +/* "_pywrapfst.pyx":2330 * self._check_mutating_imethod() * * def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< @@ -36279,12 +36210,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2333, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2330, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "encode") < 0)) __PYX_ERR(0, 2333, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "encode") < 0)) __PYX_ERR(0, 2330, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -36295,7 +36226,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2333, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2330, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36309,7 +36240,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_10_pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2333, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapper), __pyx_ptype_10_pywrapfst_EncodeMapper, 1, "mapper", 0))) __PYX_ERR(0, 2330, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_20encode(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_mapper); /* function exit code */ @@ -36335,7 +36266,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_20encode(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("encode", 1); - /* "_pywrapfst.pyx":2352 + /* "_pywrapfst.pyx":2349 * self. * """ * self._encode(mapper) # <<<<<<<<<<<<<< @@ -36344,11 +36275,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_20encode(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_encode"); - __PYX_ERR(0, 2352, __pyx_L1_error) + __PYX_ERR(0, 2349, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2352, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_encode(__pyx_v_self, __pyx_v_mapper); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2349, __pyx_L1_error) - /* "_pywrapfst.pyx":2353 + /* "_pywrapfst.pyx":2350 * """ * self._encode(mapper) * return self # <<<<<<<<<<<<<< @@ -36360,7 +36291,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_20encode(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2333 + /* "_pywrapfst.pyx":2330 * self._check_mutating_imethod() * * def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< @@ -36378,7 +36309,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_20encode(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2355 +/* "_pywrapfst.pyx":2352 * return self * * cdef void _invert(self): # <<<<<<<<<<<<<< @@ -36391,7 +36322,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__invert(struct __pyx_obj_10_pywrap const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2356 + /* "_pywrapfst.pyx":2353 * * cdef void _invert(self): * fst.Invert(self._mfst.get()) # <<<<<<<<<<<<<< @@ -36400,11 +36331,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__invert(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2356, __pyx_L1_error) + __PYX_ERR(0, 2353, __pyx_L1_error) } fst::script::Invert(__pyx_v_self->_mfst.get()); - /* "_pywrapfst.pyx":2355 + /* "_pywrapfst.pyx":2352 * return self * * cdef void _invert(self): # <<<<<<<<<<<<<< @@ -36419,7 +36350,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__invert(struct __pyx_obj_10_pywrap __pyx_L0:; } -/* "_pywrapfst.pyx":2358 +/* "_pywrapfst.pyx":2355 * fst.Invert(self._mfst.get()) * * def invert(self): # <<<<<<<<<<<<<< @@ -36477,7 +36408,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_22invert(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("invert", 1); - /* "_pywrapfst.pyx":2370 + /* "_pywrapfst.pyx":2367 * self. * """ * self._invert() # <<<<<<<<<<<<<< @@ -36486,11 +36417,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_22invert(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_invert"); - __PYX_ERR(0, 2370, __pyx_L1_error) + __PYX_ERR(0, 2367, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2370, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_invert(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L1_error) - /* "_pywrapfst.pyx":2371 + /* "_pywrapfst.pyx":2368 * """ * self._invert() * return self # <<<<<<<<<<<<<< @@ -36502,7 +36433,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_22invert(struct __pyx_obj_10 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2358 + /* "_pywrapfst.pyx":2355 * fst.Invert(self._mfst.get()) * * def invert(self): # <<<<<<<<<<<<<< @@ -36520,7 +36451,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_22invert(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":2373 +/* "_pywrapfst.pyx":2370 * return self * * cdef void _minimize(self, # <<<<<<<<<<<<<< @@ -36529,9 +36460,9 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_22invert(struct __pyx_obj_10 */ static void __pyx_f_10_pywrapfst_10MutableFst__minimize(struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_10_pywrapfst_10MutableFst__minimize *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__6; + float __pyx_v_delta = __pyx_k__7; - /* "_pywrapfst.pyx":2375 + /* "_pywrapfst.pyx":2372 * cdef void _minimize(self, * float delta=fst.kShortestDelta, * bool allow_nondet=False) except *: # <<<<<<<<<<<<<< @@ -36551,7 +36482,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__minimize(struct __pyx_obj_10_pywr } } - /* "_pywrapfst.pyx":2377 + /* "_pywrapfst.pyx":2374 * bool allow_nondet=False) except *: * # This runs in-place when the second argument is null. * fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet) # <<<<<<<<<<<<<< @@ -36560,11 +36491,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__minimize(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2377, __pyx_L1_error) + __PYX_ERR(0, 2374, __pyx_L1_error) } fst::script::Minimize(__pyx_v_self->_mfst.get(), NULL, __pyx_v_delta, __pyx_v_allow_nondet); - /* "_pywrapfst.pyx":2378 + /* "_pywrapfst.pyx":2375 * # This runs in-place when the second argument is null. * fst.Minimize(self._mfst.get(), NULL, delta, allow_nondet) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -36573,11 +36504,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__minimize(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2378, __pyx_L1_error) + __PYX_ERR(0, 2375, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2378, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2375, __pyx_L1_error) - /* "_pywrapfst.pyx":2373 + /* "_pywrapfst.pyx":2370 * return self * * cdef void _minimize(self, # <<<<<<<<<<<<<< @@ -36592,7 +36523,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__minimize(struct __pyx_obj_10_pywr __pyx_L0:; } -/* "_pywrapfst.pyx":2380 +/* "_pywrapfst.pyx":2377 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< @@ -36656,19 +36587,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2377, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allow_nondet); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2377, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "minimize") < 0)) __PYX_ERR(0, 2380, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "minimize") < 0)) __PYX_ERR(0, 2377, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -36681,19 +36612,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2377, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__7; + __pyx_v_delta = __pyx_k__8; } 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, 2380, __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, 2377, __pyx_L3_error) } else { __pyx_v_allow_nondet = ((bool)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 2380, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("minimize", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 2377, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36729,7 +36660,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_24minimize(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("minimize", 1); - /* "_pywrapfst.pyx":2406 + /* "_pywrapfst.pyx":2403 * self. * """ * self._minimize(delta, allow_nondet) # <<<<<<<<<<<<<< @@ -36738,14 +36669,14 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_24minimize(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_minimize"); - __PYX_ERR(0, 2406, __pyx_L1_error) + __PYX_ERR(0, 2403, __pyx_L1_error) } __pyx_t_1.__pyx_n = 2; __pyx_t_1.delta = __pyx_v_delta; __pyx_t_1.allow_nondet = __pyx_v_allow_nondet; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2406, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_minimize(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2403, __pyx_L1_error) - /* "_pywrapfst.pyx":2407 + /* "_pywrapfst.pyx":2404 * """ * self._minimize(delta, allow_nondet) * return self # <<<<<<<<<<<<<< @@ -36757,7 +36688,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_24minimize(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2380 + /* "_pywrapfst.pyx":2377 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< @@ -36775,7 +36706,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_24minimize(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":2409 +/* "_pywrapfst.pyx":2406 * return self * * cpdef _MutableArcIterator mutable_arcs(self, int64_t state): # <<<<<<<<<<<<<< @@ -36812,11 +36743,11 @@ static struct __pyx_obj_10_pywrapfst__MutableArcIterator *__pyx_f_10_pywrapfst_1 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mutable_arcs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __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, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_10MutableFst_27mutable_arcs)) { __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -36838,11 +36769,11 @@ static struct __pyx_obj_10_pywrapfst__MutableArcIterator *__pyx_f_10_pywrapfst_1 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2409, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__MutableArcIterator))))) __PYX_ERR(0, 2409, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst__MutableArcIterator))))) __PYX_ERR(0, 2406, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst__MutableArcIterator *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -36861,7 +36792,7 @@ static struct __pyx_obj_10_pywrapfst__MutableArcIterator *__pyx_f_10_pywrapfst_1 #endif } - /* "_pywrapfst.pyx":2421 + /* "_pywrapfst.pyx":2418 * A _MutableArcIterator. * """ * return _MutableArcIterator(self, state) # <<<<<<<<<<<<<< @@ -36869,24 +36800,24 @@ static struct __pyx_obj_10_pywrapfst__MutableArcIterator *__pyx_f_10_pywrapfst_1 * 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, 2421, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2421, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 2421, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 2418, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 2421, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 2418, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2421, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = ((struct __pyx_obj_10_pywrapfst__MutableArcIterator *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2409 + /* "_pywrapfst.pyx":2406 * return self * * cpdef _MutableArcIterator mutable_arcs(self, int64_t state): # <<<<<<<<<<<<<< @@ -36963,23 +36894,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2406, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mutable_arcs") < 0)) __PYX_ERR(0, 2409, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "mutable_arcs") < 0)) __PYX_ERR(0, 2406, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2409, __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, 2406, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("mutable_arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2409, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("mutable_arcs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2406, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37015,7 +36946,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_26mutable_arcs(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mutable_arcs", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_10MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_10MutableFst_mutable_arcs(__pyx_v_self, __pyx_v_state, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37032,7 +36963,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_26mutable_arcs(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":2423 +/* "_pywrapfst.pyx":2420 * return _MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< @@ -37092,7 +37023,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mutable_input_symbols", 1); - /* "_pywrapfst.pyx":2429 + /* "_pywrapfst.pyx":2426 * Returns the FST's (mutable) input symbol table, or None if none is present. * """ * if self._mfst.get().MutableInputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -37101,12 +37032,12 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2429, __pyx_L1_error) + __PYX_ERR(0, 2426, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_mfst.get()->MutableInputSymbols() == NULL); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2430 + /* "_pywrapfst.pyx":2427 * """ * if self._mfst.get().MutableInputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -37117,7 +37048,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":2429 + /* "_pywrapfst.pyx":2426 * Returns the FST's (mutable) input symbol table, or None if none is present. * """ * if self._mfst.get().MutableInputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -37126,7 +37057,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru */ } - /* "_pywrapfst.pyx":2431 + /* "_pywrapfst.pyx":2428 * if self._mfst.get().MutableInputSymbols() == NULL: * return * return _init_MutableFstSymbolTableView(self._mfst, input_side=True) # <<<<<<<<<<<<<< @@ -37136,15 +37067,15 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2431, __pyx_L1_error) + __PYX_ERR(0, 2428, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2431, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2423 + /* "_pywrapfst.pyx":2420 * return _MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< @@ -37163,7 +37094,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_28mutable_input_symbols(stru return __pyx_r; } -/* "_pywrapfst.pyx":2433 +/* "_pywrapfst.pyx":2430 * return _init_MutableFstSymbolTableView(self._mfst, input_side=True) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< @@ -37223,7 +37154,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("mutable_output_symbols", 1); - /* "_pywrapfst.pyx":2439 + /* "_pywrapfst.pyx":2436 * Returns the FST's (mutable) output symbol table, or None if none is present. * """ * if self._mfst.get().MutableOutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -37232,12 +37163,12 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2436, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_mfst.get()->MutableOutputSymbols() == NULL); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2440 + /* "_pywrapfst.pyx":2437 * """ * if self._mfst.get().MutableOutputSymbols() == NULL: * return # <<<<<<<<<<<<<< @@ -37248,7 +37179,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "_pywrapfst.pyx":2439 + /* "_pywrapfst.pyx":2436 * Returns the FST's (mutable) output symbol table, or None if none is present. * """ * if self._mfst.get().MutableOutputSymbols() == NULL: # <<<<<<<<<<<<<< @@ -37257,7 +37188,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str */ } - /* "_pywrapfst.pyx":2441 + /* "_pywrapfst.pyx":2438 * if self._mfst.get().MutableOutputSymbols() == NULL: * return * return _init_MutableFstSymbolTableView(self._mfst, input_side=False) # <<<<<<<<<<<<<< @@ -37267,15 +37198,15 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2441, __pyx_L1_error) + __PYX_ERR(0, 2438, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFstSymbolTableView(__pyx_v_self->_mfst, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":2433 + /* "_pywrapfst.pyx":2430 * return _init_MutableFstSymbolTableView(self._mfst, input_side=True) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< @@ -37294,7 +37225,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_30mutable_output_symbols(str return __pyx_r; } -/* "_pywrapfst.pyx":2443 +/* "_pywrapfst.pyx":2440 * return _init_MutableFstSymbolTableView(self._mfst, input_side=False) * * cpdef int64_t num_states(self): # <<<<<<<<<<<<<< @@ -37331,7 +37262,7 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_num_states(struct __pyx_obj_10_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_states); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __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, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_10MutableFst_33num_states)) { __Pyx_INCREF(__pyx_t_1); @@ -37353,11 +37284,11 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_num_states(struct __pyx_obj_10_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2443, __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, 2440, __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; @@ -37376,7 +37307,7 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_num_states(struct __pyx_obj_10_ #endif } - /* "_pywrapfst.pyx":2449 + /* "_pywrapfst.pyx":2446 * Returns the number of states. * """ * return self._mfst.get().NumStates() # <<<<<<<<<<<<<< @@ -37385,12 +37316,12 @@ static int64_t __pyx_f_10_pywrapfst_10MutableFst_num_states(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2449, __pyx_L1_error) + __PYX_ERR(0, 2446, __pyx_L1_error) } __pyx_r = __pyx_v_self->_mfst.get()->NumStates(); goto __pyx_L0; - /* "_pywrapfst.pyx":2443 + /* "_pywrapfst.pyx":2440 * return _init_MutableFstSymbolTableView(self._mfst, input_side=False) * * cpdef int64_t num_states(self): # <<<<<<<<<<<<<< @@ -37463,8 +37394,8 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_32num_states(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("num_states", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_10MutableFst_num_states(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2443, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_10MutableFst_num_states(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2440, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -37481,7 +37412,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_32num_states(struct __pyx_ob return __pyx_r; } -/* "_pywrapfst.pyx":2451 +/* "_pywrapfst.pyx":2448 * return self._mfst.get().NumStates() * * cdef void _project(self, project_type) except *: # <<<<<<<<<<<<<< @@ -37496,7 +37427,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__project(struct __pyx_obj_10_pywra const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2452 + /* "_pywrapfst.pyx":2449 * * cdef void _project(self, project_type) except *: * fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) # <<<<<<<<<<<<<< @@ -37505,13 +37436,13 @@ static void __pyx_f_10_pywrapfst_10MutableFst__project(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2452, __pyx_L1_error) + __PYX_ERR(0, 2449, __pyx_L1_error) } - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2452, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_project_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2452, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_project_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2449, __pyx_L1_error) fst::script::Project(__pyx_v_self->_mfst.get(), __pyx_t_2); - /* "_pywrapfst.pyx":2451 + /* "_pywrapfst.pyx":2448 * return self._mfst.get().NumStates() * * cdef void _project(self, project_type) except *: # <<<<<<<<<<<<<< @@ -37526,7 +37457,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__project(struct __pyx_obj_10_pywra __pyx_L0:; } -/* "_pywrapfst.pyx":2454 +/* "_pywrapfst.pyx":2451 * fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) * * def project(self, project_type): # <<<<<<<<<<<<<< @@ -37588,12 +37519,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2454, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2451, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "project") < 0)) __PYX_ERR(0, 2454, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "project") < 0)) __PYX_ERR(0, 2451, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -37604,7 +37535,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("project", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("project", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2451, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37639,7 +37570,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_34project(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("project", 1); - /* "_pywrapfst.pyx":2471 + /* "_pywrapfst.pyx":2468 * self. * """ * self._project(project_type) # <<<<<<<<<<<<<< @@ -37648,11 +37579,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_34project(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_project"); - __PYX_ERR(0, 2471, __pyx_L1_error) + __PYX_ERR(0, 2468, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, __pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2471, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_project(__pyx_v_self, __pyx_v_project_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2468, __pyx_L1_error) - /* "_pywrapfst.pyx":2472 + /* "_pywrapfst.pyx":2469 * """ * self._project(project_type) * return self # <<<<<<<<<<<<<< @@ -37664,7 +37595,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_34project(struct __pyx_obj_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2454 + /* "_pywrapfst.pyx":2451 * fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) * * def project(self, project_type): # <<<<<<<<<<<<<< @@ -37682,7 +37613,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_34project(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":2474 +/* "_pywrapfst.pyx":2471 * return self * * cdef void _prune(self, # <<<<<<<<<<<<<< @@ -37691,10 +37622,10 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_34project(struct __pyx_obj_1 */ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_10_pywrapfst_10MutableFst__prune *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__8; - int64_t __pyx_v_nstate = __pyx_k__9; + float __pyx_v_delta = __pyx_k__9; + int64_t __pyx_v_nstate = __pyx_k__10; - /* "_pywrapfst.pyx":2477 + /* "_pywrapfst.pyx":2474 * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, * weight=None) except *: # <<<<<<<<<<<<<< @@ -37720,7 +37651,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapf } } - /* "_pywrapfst.pyx":2479 + /* "_pywrapfst.pyx":2476 * weight=None) except *: * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), # <<<<<<<<<<<<<< @@ -37729,21 +37660,21 @@ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2479, __pyx_L1_error) + __PYX_ERR(0, 2476, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2479, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L1_error) - /* "_pywrapfst.pyx":2480 + /* "_pywrapfst.pyx":2477 * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), * weight) # <<<<<<<<<<<<<< * fst.Prune(self._mfst.get(), _weight, nstate, delta) * self._check_mutating_imethod() */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2479, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2476, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":2481 + /* "_pywrapfst.pyx":2478 * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), * weight) * fst.Prune(self._mfst.get(), _weight, nstate, delta) # <<<<<<<<<<<<<< @@ -37752,11 +37683,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2481, __pyx_L1_error) + __PYX_ERR(0, 2478, __pyx_L1_error) } fst::script::Prune(__pyx_v_self->_mfst.get(), __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta); - /* "_pywrapfst.pyx":2482 + /* "_pywrapfst.pyx":2479 * weight) * fst.Prune(self._mfst.get(), _weight, nstate, delta) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -37765,11 +37696,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2482, __pyx_L1_error) + __PYX_ERR(0, 2479, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2482, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2479, __pyx_L1_error) - /* "_pywrapfst.pyx":2474 + /* "_pywrapfst.pyx":2471 * return self * * cdef void _prune(self, # <<<<<<<<<<<<<< @@ -37784,7 +37715,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__prune(struct __pyx_obj_10_pywrapf __pyx_L0:; } -/* "_pywrapfst.pyx":2484 +/* "_pywrapfst.pyx":2481 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -37834,7 +37765,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0}; - /* "_pywrapfst.pyx":2487 + /* "_pywrapfst.pyx":2484 * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -37860,26 +37791,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2484, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2481, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2484, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2481, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2484, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2481, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prune") < 0)) __PYX_ERR(0, 2484, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prune") < 0)) __PYX_ERR(0, 2481, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -37894,20 +37825,20 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2485, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2482, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__10; + __pyx_v_delta = __pyx_k__11; } 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, 2486, __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, 2483, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__11; + __pyx_v_nstate = __pyx_k__12; } __pyx_v_weight = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2484, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2481, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37923,7 +37854,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_36prune(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight); - /* "_pywrapfst.pyx":2484 + /* "_pywrapfst.pyx":2481 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -37951,7 +37882,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_36prune(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prune", 1); - /* "_pywrapfst.pyx":2507 + /* "_pywrapfst.pyx":2504 * self. * """ * self._prune(delta, nstate, weight) # <<<<<<<<<<<<<< @@ -37960,15 +37891,15 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_36prune(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_prune"); - __PYX_ERR(0, 2507, __pyx_L1_error) + __PYX_ERR(0, 2504, __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_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2507, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_prune(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2504, __pyx_L1_error) - /* "_pywrapfst.pyx":2508 + /* "_pywrapfst.pyx":2505 * """ * self._prune(delta, nstate, weight) * return self # <<<<<<<<<<<<<< @@ -37980,7 +37911,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_36prune(struct __pyx_obj_10_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2484 + /* "_pywrapfst.pyx":2481 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< @@ -37998,7 +37929,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_36prune(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":2510 +/* "_pywrapfst.pyx":2507 * return self * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -38007,9 +37938,9 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_36prune(struct __pyx_obj_10_ */ static void __pyx_f_10_pywrapfst_10MutableFst__push(struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_10_pywrapfst_10MutableFst__push *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__12; + float __pyx_v_delta = __pyx_k__13; - /* "_pywrapfst.pyx":2512 + /* "_pywrapfst.pyx":2509 * cdef void _push(self, * float delta=fst.kShortestDelta, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -38035,7 +37966,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__push(struct __pyx_obj_10_pywrapfs } } - /* "_pywrapfst.pyx":2514 + /* "_pywrapfst.pyx":2511 * bool remove_total_weight=False, * reweight_type="to_initial"): * fst.Push(self._mfst.get(), # <<<<<<<<<<<<<< @@ -38044,20 +37975,20 @@ static void __pyx_f_10_pywrapfst_10MutableFst__push(struct __pyx_obj_10_pywrapfs */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2514, __pyx_L1_error) + __PYX_ERR(0, 2511, __pyx_L1_error) } - /* "_pywrapfst.pyx":2515 + /* "_pywrapfst.pyx":2512 * reweight_type="to_initial"): * fst.Push(self._mfst.get(), * _get_reweight_type(tostring(reweight_type)), # <<<<<<<<<<<<<< * delta, * remove_total_weight) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2515, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2515, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2512, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2512, __pyx_L1_error) - /* "_pywrapfst.pyx":2514 + /* "_pywrapfst.pyx":2511 * bool remove_total_weight=False, * reweight_type="to_initial"): * fst.Push(self._mfst.get(), # <<<<<<<<<<<<<< @@ -38066,7 +37997,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__push(struct __pyx_obj_10_pywrapfs */ fst::script::Push(__pyx_v_self->_mfst.get(), __pyx_t_2, __pyx_v_delta, __pyx_v_remove_total_weight); - /* "_pywrapfst.pyx":2510 + /* "_pywrapfst.pyx":2507 * return self * * cdef void _push(self, # <<<<<<<<<<<<<< @@ -38081,7 +38012,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__push(struct __pyx_obj_10_pywrapfs __pyx_L0:; } -/* "_pywrapfst.pyx":2519 +/* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< @@ -38097,7 +38028,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_10MutableFst_38push, "\n push(self, delta=1-e6, remove_total_weight=False, reweight_type=\"to_initial\")\n\n Pushes weights towards the initial or final states.\n\n This operation destructively produces an equivalent transducer by pushing\n the weights towards the initial state or toward the final states. When\n pushing weights towards the initial state, the sum of the weight of the\n outgoing transitions and final weight at any non-initial state is equal to\n one in the resulting machine. When pushing weights towards the final states,\n the sum of the weight of the incoming transitions at any state is equal to\n one. Weights need to be left distributive when pushing towards the initial\n state and right distributive when pushing towards the final states.\n\n Args:\n delta: Comparison/quantization delta.\n remove_total_weight: If pushing weights, should the total weight be\n removed?\n reweight_type: Push towards initial or final states: a string matching a\n known reweight type: one of \"to_initial\", \"to_final\"\n\n Returns:\n self.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_10MutableFst_38push, "\n push(self, delta=1-e6, remove_total_weight=False,\n reweight_type=\"to_initial\")\n\n Pushes weights towards the initial or final states.\n\n This operation destructively produces an equivalent transducer by pushing\n the weights towards the initial state or toward the final states. When\n pushing weights towards the initial state, the sum of the weight of the\n outgoing transitions and final weight at any non-initial state is equal to\n one in the resulting machine. When pushing weights towards the final states,\n the sum of the weight of the incoming transitions at any state is equal to\n one. Weights need to be left distributive when pushing towards the initial\n state and right distributive when pushing towards the final states.\n\n Args:\n delta: Comparison/quantization delta.\n remove_total_weight: If pushing weights, should the total weight be\n removed?\n reweight_type: Push towards initial or final states: a string matching a\n known reweight type: one of \"to_initial\", \"to_final\"\n\n Returns:\n self.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_10MutableFst_39push = {"push", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_10MutableFst_39push, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_10MutableFst_38push}; static PyObject *__pyx_pw_10_pywrapfst_10MutableFst_39push(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL @@ -38149,26 +38080,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2519, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2516, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_total_weight); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2519, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2516, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reweight_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2519, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2516, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "push") < 0)) __PYX_ERR(0, 2519, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "push") < 0)) __PYX_ERR(0, 2516, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -38183,15 +38114,15 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } } if (values[0]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2520, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2517, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__13; + __pyx_v_delta = __pyx_k__14; } 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, 2521, __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, 2518, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":2521 + /* "_pywrapfst.pyx":2518 * def push(self, * float delta=fst.kShortestDelta, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -38204,7 +38135,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2519, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("push", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2516, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38220,7 +38151,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_38push(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_delta, __pyx_v_remove_total_weight, __pyx_v_reweight_type); - /* "_pywrapfst.pyx":2519 + /* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< @@ -38248,7 +38179,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_38push(struct __pyx_obj_10_p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("push", 1); - /* "_pywrapfst.pyx":2547 + /* "_pywrapfst.pyx":2545 * self. * """ * self._push(delta, remove_total_weight, reweight_type) # <<<<<<<<<<<<<< @@ -38257,15 +38188,15 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_38push(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_push"); - __PYX_ERR(0, 2547, __pyx_L1_error) + __PYX_ERR(0, 2545, __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.reweight_type = __pyx_v_reweight_type; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2547, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_push(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2545, __pyx_L1_error) - /* "_pywrapfst.pyx":2548 + /* "_pywrapfst.pyx":2546 * """ * self._push(delta, remove_total_weight, reweight_type) * return self # <<<<<<<<<<<<<< @@ -38277,7 +38208,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_38push(struct __pyx_obj_10_p __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2519 + /* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< @@ -38295,7 +38226,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_38push(struct __pyx_obj_10_p return __pyx_r; } -/* "_pywrapfst.pyx":2550 +/* "_pywrapfst.pyx":2548 * return self * * cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<< @@ -38338,17 +38269,17 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 } } - /* "_pywrapfst.pyx":2553 + /* "_pywrapfst.pyx":2551 * cdef vector[fst.LabelPair] _ipairs * cdef vector[fst.LabelPair] _opairs * if ipairs: # <<<<<<<<<<<<<< * for (before, after) in ipairs: * _ipairs.push_back(fst.LabelPair(before, after)) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2553, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ipairs); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2551, __pyx_L1_error) if (__pyx_t_1) { - /* "_pywrapfst.pyx":2554 + /* "_pywrapfst.pyx":2552 * cdef vector[fst.LabelPair] _opairs * if ipairs: * for (before, after) in ipairs: # <<<<<<<<<<<<<< @@ -38360,9 +38291,9 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_ipairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { @@ -38370,28 +38301,28 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2554, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2552, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2554, __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, 2552, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2554, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2552, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2554, __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, 2552, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -38401,7 +38332,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2554, __pyx_L1_error) + else __PYX_ERR(0, 2552, __pyx_L1_error) } break; } @@ -38413,7 +38344,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2554, __pyx_L1_error) + __PYX_ERR(0, 2552, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38426,15 +38357,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2554, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -38442,7 +38373,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2554, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2552, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -38450,7 +38381,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2554, __pyx_L1_error) + __PYX_ERR(0, 2552, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_before, __pyx_t_6); @@ -38458,29 +38389,29 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_XDECREF_SET(__pyx_v_after, __pyx_t_7); __pyx_t_7 = 0; - /* "_pywrapfst.pyx":2555 + /* "_pywrapfst.pyx":2553 * if ipairs: * for (before, after) in ipairs: * _ipairs.push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<< * if opairs: * for (before, after) in opairs: */ - __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2553, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2553, __pyx_L1_error) try { __pyx_t_12 = __pyx_t_10cpywrapfst_LabelPair(__pyx_t_10, __pyx_t_11); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2555, __pyx_L1_error) + __PYX_ERR(0, 2553, __pyx_L1_error) } try { __pyx_v__ipairs.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2555, __pyx_L1_error) + __PYX_ERR(0, 2553, __pyx_L1_error) } - /* "_pywrapfst.pyx":2554 + /* "_pywrapfst.pyx":2552 * cdef vector[fst.LabelPair] _opairs * if ipairs: * for (before, after) in ipairs: # <<<<<<<<<<<<<< @@ -38490,7 +38421,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":2553 + /* "_pywrapfst.pyx":2551 * cdef vector[fst.LabelPair] _ipairs * cdef vector[fst.LabelPair] _opairs * if ipairs: # <<<<<<<<<<<<<< @@ -38499,17 +38430,17 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 */ } - /* "_pywrapfst.pyx":2556 + /* "_pywrapfst.pyx":2554 * for (before, after) in ipairs: * _ipairs.push_back(fst.LabelPair(before, after)) * if opairs: # <<<<<<<<<<<<<< * for (before, after) in opairs: * _opairs.push_back(fst.LabelPair(before, after)) */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_opairs); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2554, __pyx_L1_error) if (__pyx_t_1) { - /* "_pywrapfst.pyx":2557 + /* "_pywrapfst.pyx":2555 * _ipairs.push_back(fst.LabelPair(before, after)) * if opairs: * for (before, after) in opairs: # <<<<<<<<<<<<<< @@ -38521,9 +38452,9 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_opairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { @@ -38531,28 +38462,28 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2557, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2555, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2557, __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, 2555, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2557, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2555, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2557, __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, 2555, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -38562,7 +38493,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2557, __pyx_L1_error) + else __PYX_ERR(0, 2555, __pyx_L1_error) } break; } @@ -38574,7 +38505,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2557, __pyx_L1_error) + __PYX_ERR(0, 2555, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -38587,15 +38518,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2557, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -38603,7 +38534,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2557, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2555, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_unpacking_done; @@ -38611,7 +38542,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2557, __pyx_L1_error) + __PYX_ERR(0, 2555, __pyx_L1_error) __pyx_L13_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_before, __pyx_t_7); @@ -38619,29 +38550,29 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_XDECREF_SET(__pyx_v_after, __pyx_t_6); __pyx_t_6 = 0; - /* "_pywrapfst.pyx":2558 + /* "_pywrapfst.pyx":2556 * if opairs: * for (before, after) in opairs: * _opairs.push_back(fst.LabelPair(before, after)) # <<<<<<<<<<<<<< * if _ipairs.empty() and _opairs.empty(): * raise FstArgError("No relabeling pairs specified") */ - __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2558, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2558, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int64_t(__pyx_v_before); if (unlikely((__pyx_t_11 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2556, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int64_t(__pyx_v_after); if (unlikely((__pyx_t_10 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2556, __pyx_L1_error) try { __pyx_t_12 = __pyx_t_10cpywrapfst_LabelPair(__pyx_t_11, __pyx_t_10); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2558, __pyx_L1_error) + __PYX_ERR(0, 2556, __pyx_L1_error) } try { __pyx_v__opairs.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2558, __pyx_L1_error) + __PYX_ERR(0, 2556, __pyx_L1_error) } - /* "_pywrapfst.pyx":2557 + /* "_pywrapfst.pyx":2555 * _ipairs.push_back(fst.LabelPair(before, after)) * if opairs: * for (before, after) in opairs: # <<<<<<<<<<<<<< @@ -38651,7 +38582,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":2556 + /* "_pywrapfst.pyx":2554 * for (before, after) in ipairs: * _ipairs.push_back(fst.LabelPair(before, after)) * if opairs: # <<<<<<<<<<<<<< @@ -38660,7 +38591,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 */ } - /* "_pywrapfst.pyx":2559 + /* "_pywrapfst.pyx":2557 * for (before, after) in opairs: * _opairs.push_back(fst.LabelPair(before, after)) * if _ipairs.empty() and _opairs.empty(): # <<<<<<<<<<<<<< @@ -38678,14 +38609,14 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __pyx_L16_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2560 + /* "_pywrapfst.pyx":2558 * _opairs.push_back(fst.LabelPair(before, after)) * if _ipairs.empty() and _opairs.empty(): * raise FstArgError("No relabeling pairs specified") # <<<<<<<<<<<<<< * fst.Relabel(self._mfst.get(), _ipairs, _opairs) * self._check_mutating_imethod() */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_14 = 0; @@ -38705,15 +38636,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_u_No_relabeling_pairs_specified}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2560, __pyx_L1_error) + __PYX_ERR(0, 2558, __pyx_L1_error) - /* "_pywrapfst.pyx":2559 + /* "_pywrapfst.pyx":2557 * for (before, after) in opairs: * _opairs.push_back(fst.LabelPair(before, after)) * if _ipairs.empty() and _opairs.empty(): # <<<<<<<<<<<<<< @@ -38722,7 +38653,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 */ } - /* "_pywrapfst.pyx":2561 + /* "_pywrapfst.pyx":2559 * if _ipairs.empty() and _opairs.empty(): * raise FstArgError("No relabeling pairs specified") * fst.Relabel(self._mfst.get(), _ipairs, _opairs) # <<<<<<<<<<<<<< @@ -38731,11 +38662,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2561, __pyx_L1_error) + __PYX_ERR(0, 2559, __pyx_L1_error) } fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_v__ipairs, __pyx_v__opairs); - /* "_pywrapfst.pyx":2562 + /* "_pywrapfst.pyx":2560 * raise FstArgError("No relabeling pairs specified") * fst.Relabel(self._mfst.get(), _ipairs, _opairs) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -38744,11 +38675,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2562, __pyx_L1_error) + __PYX_ERR(0, 2560, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2562, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2560, __pyx_L1_error) - /* "_pywrapfst.pyx":2550 + /* "_pywrapfst.pyx":2548 * return self * * cdef void _relabel_pairs(self, ipairs=None, opairs=None) except *: # <<<<<<<<<<<<<< @@ -38771,7 +38702,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_pairs(struct __pyx_obj_10 __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2564 +/* "_pywrapfst.pyx":2562 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< @@ -38837,19 +38768,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ipairs); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2564, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2562, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opairs); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2564, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2562, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2564, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "relabel_pairs") < 0)) __PYX_ERR(0, 2562, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -38866,7 +38797,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 2564, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("relabel_pairs", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 2562, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38902,7 +38833,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_40relabel_pairs(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relabel_pairs", 1); - /* "_pywrapfst.pyx":2584 + /* "_pywrapfst.pyx":2582 * FstArgError: No relabeling pairs specified. * """ * self._relabel_pairs(ipairs, opairs) # <<<<<<<<<<<<<< @@ -38911,14 +38842,14 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_40relabel_pairs(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_pairs"); - __PYX_ERR(0, 2584, __pyx_L1_error) + __PYX_ERR(0, 2582, __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_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2584, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_pairs(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2582, __pyx_L1_error) - /* "_pywrapfst.pyx":2585 + /* "_pywrapfst.pyx":2583 * """ * self._relabel_pairs(ipairs, opairs) * return self # <<<<<<<<<<<<<< @@ -38930,7 +38861,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_40relabel_pairs(struct __pyx __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2564 + /* "_pywrapfst.pyx":2562 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< @@ -38948,7 +38879,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_40relabel_pairs(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":2587 +/* "_pywrapfst.pyx":2585 * return self * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -38958,7 +38889,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_40relabel_pairs(struct __pyx static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_10_pywrapfst_10MutableFst__relabel_tables *__pyx_optional_args) { - /* "_pywrapfst.pyx":2588 + /* "_pywrapfst.pyx":2586 * * cdef void _relabel_tables(self, * SymbolTableView old_isymbols=None, # <<<<<<<<<<<<<< @@ -38967,7 +38898,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_old_isymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":2589 + /* "_pywrapfst.pyx":2587 * cdef void _relabel_tables(self, * SymbolTableView old_isymbols=None, * SymbolTableView new_isymbols=None, # <<<<<<<<<<<<<< @@ -38975,9 +38906,9 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 * bool attach_new_isymbols=True, */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_new_isymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - PyObject *__pyx_v_unknown_isymbol = ((PyObject *)__pyx_kp_u__5); + PyObject *__pyx_v_unknown_isymbol = ((PyObject *)__pyx_kp_u__6); - /* "_pywrapfst.pyx":2591 + /* "_pywrapfst.pyx":2589 * SymbolTableView new_isymbols=None, * unknown_isymbol="", * bool attach_new_isymbols=True, # <<<<<<<<<<<<<< @@ -38986,7 +38917,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ bool __pyx_v_attach_new_isymbols = ((bool)1); - /* "_pywrapfst.pyx":2592 + /* "_pywrapfst.pyx":2590 * unknown_isymbol="", * bool attach_new_isymbols=True, * SymbolTableView old_osymbols=None, # <<<<<<<<<<<<<< @@ -38995,7 +38926,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_old_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - /* "_pywrapfst.pyx":2593 + /* "_pywrapfst.pyx":2591 * bool attach_new_isymbols=True, * SymbolTableView old_osymbols=None, * SymbolTableView new_osymbols=None, # <<<<<<<<<<<<<< @@ -39003,9 +38934,9 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 * bool attach_new_osymbols=True) except *: */ struct __pyx_obj_10_pywrapfst_SymbolTableView *__pyx_v_new_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None); - PyObject *__pyx_v_unknown_osymbol = ((PyObject *)__pyx_kp_u__5); + PyObject *__pyx_v_unknown_osymbol = ((PyObject *)__pyx_kp_u__6); - /* "_pywrapfst.pyx":2595 + /* "_pywrapfst.pyx":2593 * SymbolTableView new_osymbols=None, * unknown_osymbol="", * bool attach_new_osymbols=True) except *: # <<<<<<<<<<<<<< @@ -39058,7 +38989,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 } } - /* "_pywrapfst.pyx":2596 + /* "_pywrapfst.pyx":2594 * unknown_osymbol="", * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<< @@ -39076,14 +39007,14 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2597 + /* "_pywrapfst.pyx":2595 * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: * raise FstArgError("No new SymbolTables specified") # <<<<<<<<<<<<<< * cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() * if old_isymbols is not None: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -39103,15 +39034,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_No_new_SymbolTables_specified}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2597, __pyx_L1_error) + __PYX_ERR(0, 2595, __pyx_L1_error) - /* "_pywrapfst.pyx":2596 + /* "_pywrapfst.pyx":2594 * unknown_osymbol="", * bool attach_new_osymbols=True) except *: * if new_isymbols is None and new_osymbols is None: # <<<<<<<<<<<<<< @@ -39120,7 +39051,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":2598 + /* "_pywrapfst.pyx":2596 * if new_isymbols is None and new_osymbols is None: * raise FstArgError("No new SymbolTables specified") * cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() # <<<<<<<<<<<<<< @@ -39129,11 +39060,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2598, __pyx_L1_error) + __PYX_ERR(0, 2596, __pyx_L1_error) } __pyx_v__old_isymbols = __pyx_v_self->__pyx_base._fst.get()->InputSymbols(); - /* "_pywrapfst.pyx":2599 + /* "_pywrapfst.pyx":2597 * raise FstArgError("No new SymbolTables specified") * cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() * if old_isymbols is not None: # <<<<<<<<<<<<<< @@ -39143,7 +39074,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __pyx_t_1 = (((PyObject *)__pyx_v_old_isymbols) != Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2600 + /* "_pywrapfst.pyx":2598 * cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() * if old_isymbols is not None: * _old_isymbols = old_isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -39152,12 +39083,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_old_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2600, __pyx_L1_error) + __PYX_ERR(0, 2598, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_old_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2600, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_old_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2598, __pyx_L1_error) __pyx_v__old_isymbols = __pyx_t_7; - /* "_pywrapfst.pyx":2599 + /* "_pywrapfst.pyx":2597 * raise FstArgError("No new SymbolTables specified") * cdef const fst.SymbolTable *_old_isymbols = self._fst.get().InputSymbols() * if old_isymbols is not None: # <<<<<<<<<<<<<< @@ -39166,7 +39097,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":2601 + /* "_pywrapfst.pyx":2599 * if old_isymbols is not None: * _old_isymbols = old_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols() # <<<<<<<<<<<<<< @@ -39175,11 +39106,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2601, __pyx_L1_error) + __PYX_ERR(0, 2599, __pyx_L1_error) } __pyx_v__old_osymbols = __pyx_v_self->__pyx_base._fst.get()->OutputSymbols(); - /* "_pywrapfst.pyx":2602 + /* "_pywrapfst.pyx":2600 * _old_isymbols = old_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols() * if old_osymbols is not None: # <<<<<<<<<<<<<< @@ -39189,7 +39120,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __pyx_t_1 = (((PyObject *)__pyx_v_old_osymbols) != Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2603 + /* "_pywrapfst.pyx":2601 * cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols() * if old_osymbols is not None: * _old_osymbols = old_osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -39198,12 +39129,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_old_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2603, __pyx_L1_error) + __PYX_ERR(0, 2601, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_old_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2603, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_old_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_old_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2601, __pyx_L1_error) __pyx_v__old_osymbols = __pyx_t_7; - /* "_pywrapfst.pyx":2602 + /* "_pywrapfst.pyx":2600 * _old_isymbols = old_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_old_osymbols = self._fst.get().OutputSymbols() * if old_osymbols is not None: # <<<<<<<<<<<<<< @@ -39212,7 +39143,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":2604 + /* "_pywrapfst.pyx":2602 * if old_osymbols is not None: * _old_osymbols = old_osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_isymbols = NULL # <<<<<<<<<<<<<< @@ -39221,7 +39152,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ __pyx_v__new_isymbols = NULL; - /* "_pywrapfst.pyx":2605 + /* "_pywrapfst.pyx":2603 * _old_osymbols = old_osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_isymbols = NULL * if new_isymbols is not None: # <<<<<<<<<<<<<< @@ -39231,7 +39162,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __pyx_t_1 = (((PyObject *)__pyx_v_new_isymbols) != Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2606 + /* "_pywrapfst.pyx":2604 * cdef const fst.SymbolTable *_new_isymbols = NULL * if new_isymbols is not None: * _new_isymbols = new_isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -39240,12 +39171,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_new_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2606, __pyx_L1_error) + __PYX_ERR(0, 2604, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_new_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2606, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_new_isymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_isymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2604, __pyx_L1_error) __pyx_v__new_isymbols = __pyx_t_7; - /* "_pywrapfst.pyx":2605 + /* "_pywrapfst.pyx":2603 * _old_osymbols = old_osymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_isymbols = NULL * if new_isymbols is not None: # <<<<<<<<<<<<<< @@ -39254,7 +39185,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":2607 + /* "_pywrapfst.pyx":2605 * if new_isymbols is not None: * _new_isymbols = new_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_osymbols = NULL # <<<<<<<<<<<<<< @@ -39263,7 +39194,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ __pyx_v__new_osymbols = NULL; - /* "_pywrapfst.pyx":2608 + /* "_pywrapfst.pyx":2606 * _new_isymbols = new_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_osymbols = NULL * if new_osymbols is not None: # <<<<<<<<<<<<<< @@ -39273,7 +39204,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __pyx_t_1 = (((PyObject *)__pyx_v_new_osymbols) != Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2609 + /* "_pywrapfst.pyx":2607 * cdef const fst.SymbolTable *_new_osymbols = NULL * if new_osymbols is not None: * _new_osymbols = new_osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -39282,12 +39213,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_new_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2609, __pyx_L1_error) + __PYX_ERR(0, 2607, __pyx_L1_error) } - __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_new_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2609, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_new_osymbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_new_osymbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2607, __pyx_L1_error) __pyx_v__new_osymbols = __pyx_t_7; - /* "_pywrapfst.pyx":2608 + /* "_pywrapfst.pyx":2606 * _new_isymbols = new_isymbols._raw_ptr_or_raise() * cdef const fst.SymbolTable *_new_osymbols = NULL * if new_osymbols is not None: # <<<<<<<<<<<<<< @@ -39296,7 +39227,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":2610 + /* "_pywrapfst.pyx":2608 * if new_osymbols is not None: * _new_osymbols = new_osymbols._raw_ptr_or_raise() * fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<< @@ -39305,28 +39236,28 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2610, __pyx_L1_error) + __PYX_ERR(0, 2608, __pyx_L1_error) } - /* "_pywrapfst.pyx":2613 + /* "_pywrapfst.pyx":2611 * _old_isymbols, * _new_isymbols, * tostring(unknown_isymbol), # <<<<<<<<<<<<<< * attach_new_isymbols, * _old_osymbols, */ - __pyx_t_8 = __pyx_f_10_pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2613, __pyx_L1_error) + __pyx_t_8 = __pyx_f_10_pywrapfst_tostring(__pyx_v_unknown_isymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error) - /* "_pywrapfst.pyx":2617 + /* "_pywrapfst.pyx":2615 * _old_osymbols, * _new_osymbols, * tostring(unknown_osymbol), # <<<<<<<<<<<<<< * attach_new_osymbols) * self._check_mutating_imethod() */ - __pyx_t_9 = __pyx_f_10_pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2617, __pyx_L1_error) + __pyx_t_9 = __pyx_f_10_pywrapfst_tostring(__pyx_v_unknown_osymbol); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2615, __pyx_L1_error) - /* "_pywrapfst.pyx":2610 + /* "_pywrapfst.pyx":2608 * if new_osymbols is not None: * _new_osymbols = new_osymbols._raw_ptr_or_raise() * fst.Relabel(self._mfst.get(), # <<<<<<<<<<<<<< @@ -39335,7 +39266,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ fst::script::Relabel(__pyx_v_self->_mfst.get(), __pyx_v__old_isymbols, __pyx_v__new_isymbols, __pyx_t_8, __pyx_v_attach_new_isymbols, __pyx_v__old_osymbols, __pyx_v__new_osymbols, __pyx_t_9, __pyx_v_attach_new_osymbols); - /* "_pywrapfst.pyx":2619 + /* "_pywrapfst.pyx":2617 * tostring(unknown_osymbol), * attach_new_osymbols) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -39344,11 +39275,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2619, __pyx_L1_error) + __PYX_ERR(0, 2617, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2617, __pyx_L1_error) - /* "_pywrapfst.pyx":2587 + /* "_pywrapfst.pyx":2585 * return self * * cdef void _relabel_tables(self, # <<<<<<<<<<<<<< @@ -39367,7 +39298,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__relabel_tables(struct __pyx_obj_1 __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2621 +/* "_pywrapfst.pyx":2619 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -39422,7 +39353,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { 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}; - /* "_pywrapfst.pyx":2622 + /* "_pywrapfst.pyx":2620 * * def relabel_tables(self, * SymbolTableView old_isymbols=None, # <<<<<<<<<<<<<< @@ -39431,7 +39362,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - /* "_pywrapfst.pyx":2623 + /* "_pywrapfst.pyx":2621 * def relabel_tables(self, * SymbolTableView old_isymbols=None, * SymbolTableView new_isymbols=None, # <<<<<<<<<<<<<< @@ -39439,9 +39370,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds * bool attach_new_isymbols=True, */ values[1] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__5)); + values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__6)); - /* "_pywrapfst.pyx":2626 + /* "_pywrapfst.pyx":2624 * unknown_isymbol="", * bool attach_new_isymbols=True, * SymbolTableView old_osymbols=None, # <<<<<<<<<<<<<< @@ -39450,7 +39381,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ values[4] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - /* "_pywrapfst.pyx":2627 + /* "_pywrapfst.pyx":2625 * bool attach_new_isymbols=True, * SymbolTableView old_osymbols=None, * SymbolTableView new_osymbols=None, # <<<<<<<<<<<<<< @@ -39458,7 +39389,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds * bool attach_new_osymbols=True): */ values[5] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTableView *)Py_None)); - values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__5)); + values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__6)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { @@ -39487,61 +39418,61 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_old_isymbols); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_isymbols); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unknown_isymbol); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attach_new_isymbols); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_old_osymbols); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_new_osymbols); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unknown_osymbol); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attach_new_osymbols); if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2621, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2619, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2621, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "relabel_tables") < 0)) __PYX_ERR(0, 2619, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -39569,10 +39500,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_new_isymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[1]); __pyx_v_unknown_isymbol = values[2]; if (values[3]) { - __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2625, __pyx_L3_error) + __pyx_v_attach_new_isymbols = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_attach_new_isymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2623, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":2625 + /* "_pywrapfst.pyx":2623 * SymbolTableView new_isymbols=None, * unknown_isymbol="", * bool attach_new_isymbols=True, # <<<<<<<<<<<<<< @@ -39585,10 +39516,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_new_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTableView *)values[5]); __pyx_v_unknown_osymbol = values[6]; if (values[7]) { - __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2629, __pyx_L3_error) + __pyx_v_attach_new_osymbols = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_attach_new_osymbols == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2627, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":2629 + /* "_pywrapfst.pyx":2627 * SymbolTableView new_osymbols=None, * unknown_osymbol="", * bool attach_new_osymbols=True): # <<<<<<<<<<<<<< @@ -39600,7 +39531,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, __pyx_nargs); __PYX_ERR(0, 2621, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("relabel_tables", 0, 0, 8, __pyx_nargs); __PYX_ERR(0, 2619, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39614,13 +39545,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "old_isymbols", 0))) __PYX_ERR(0, 2622, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "new_isymbols", 0))) __PYX_ERR(0, 2623, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "old_osymbols", 0))) __PYX_ERR(0, 2626, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "new_osymbols", 0))) __PYX_ERR(0, 2627, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "old_isymbols", 0))) __PYX_ERR(0, 2620, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_isymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "new_isymbols", 0))) __PYX_ERR(0, 2621, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_old_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "old_osymbols", 0))) __PYX_ERR(0, 2624, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_new_osymbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "new_osymbols", 0))) __PYX_ERR(0, 2625, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(((struct __pyx_obj_10_pywrapfst_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":2621 + /* "_pywrapfst.pyx":2619 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -39652,7 +39583,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("relabel_tables", 1); - /* "_pywrapfst.pyx":2663 + /* "_pywrapfst.pyx":2661 * FstArgError: No SymbolTable specified. * """ * self._relabel_tables(old_isymbols, # <<<<<<<<<<<<<< @@ -39661,10 +39592,10 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_relabel_tables"); - __PYX_ERR(0, 2663, __pyx_L1_error) + __PYX_ERR(0, 2661, __pyx_L1_error) } - /* "_pywrapfst.pyx":2670 + /* "_pywrapfst.pyx":2668 * new_osymbols, * unknown_osymbol, * attach_new_osymbols) # <<<<<<<<<<<<<< @@ -39680,9 +39611,9 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(struct __py __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_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2663, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_relabel_tables(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2661, __pyx_L1_error) - /* "_pywrapfst.pyx":2671 + /* "_pywrapfst.pyx":2669 * unknown_osymbol, * attach_new_osymbols) * return self # <<<<<<<<<<<<<< @@ -39694,7 +39625,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(struct __py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2621 + /* "_pywrapfst.pyx":2619 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< @@ -39712,7 +39643,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_42relabel_tables(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":2673 +/* "_pywrapfst.pyx":2671 * return self * * cdef void _reserve_arcs(self, int64_t state, size_t n) except *: # <<<<<<<<<<<<<< @@ -39732,7 +39663,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reserve_arcs", 1); - /* "_pywrapfst.pyx":2674 + /* "_pywrapfst.pyx":2672 * * cdef void _reserve_arcs(self, int64_t state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<< @@ -39741,19 +39672,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2674, __pyx_L1_error) + __PYX_ERR(0, 2672, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->ReserveArcs(__pyx_v_state, __pyx_v_n) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2675 + /* "_pywrapfst.pyx":2673 * cdef void _reserve_arcs(self, int64_t state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -39773,15 +39704,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2675, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2673, __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, 2675, __pyx_L1_error) + __PYX_ERR(0, 2673, __pyx_L1_error) - /* "_pywrapfst.pyx":2674 + /* "_pywrapfst.pyx":2672 * * cdef void _reserve_arcs(self, int64_t state, size_t n) except *: * if not self._mfst.get().ReserveArcs(state, n): # <<<<<<<<<<<<<< @@ -39790,7 +39721,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ */ } - /* "_pywrapfst.pyx":2676 + /* "_pywrapfst.pyx":2674 * if not self._mfst.get().ReserveArcs(state, n): * raise FstIndexError("State index out of range") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -39799,11 +39730,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2676, __pyx_L1_error) + __PYX_ERR(0, 2674, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2676, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2674, __pyx_L1_error) - /* "_pywrapfst.pyx":2673 + /* "_pywrapfst.pyx":2671 * return self * * cdef void _reserve_arcs(self, int64_t state, size_t n) except *: # <<<<<<<<<<<<<< @@ -39822,7 +39753,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_arcs(struct __pyx_obj_10_ __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2678 +/* "_pywrapfst.pyx":2676 * self._check_mutating_imethod() * * def reserve_arcs(self, int64_t state, size_t n): # <<<<<<<<<<<<<< @@ -39887,7 +39818,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2678, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2676, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -39895,14 +39826,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2678, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2676, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2678, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, 1); __PYX_ERR(0, 2676, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2678, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reserve_arcs") < 0)) __PYX_ERR(0, 2676, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -39910,12 +39841,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__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, 2678, __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, 2678, __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, 2676, __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, 2676, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2678, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reserve_arcs", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2676, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39950,7 +39881,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_44reserve_arcs(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reserve_arcs", 1); - /* "_pywrapfst.pyx":2694 + /* "_pywrapfst.pyx":2692 * FstIndexError: State index out of range. * """ * self._reserve_arcs(state, n) # <<<<<<<<<<<<<< @@ -39959,11 +39890,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_44reserve_arcs(struct __pyx_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_arcs"); - __PYX_ERR(0, 2694, __pyx_L1_error) + __PYX_ERR(0, 2692, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_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, 2694, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_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, 2692, __pyx_L1_error) - /* "_pywrapfst.pyx":2695 + /* "_pywrapfst.pyx":2693 * """ * self._reserve_arcs(state, n) * return self # <<<<<<<<<<<<<< @@ -39975,7 +39906,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_44reserve_arcs(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2678 + /* "_pywrapfst.pyx":2676 * self._check_mutating_imethod() * * def reserve_arcs(self, int64_t state, size_t n): # <<<<<<<<<<<<<< @@ -39993,7 +39924,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_44reserve_arcs(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":2697 +/* "_pywrapfst.pyx":2695 * return self * * cdef void _reserve_states(self, int64_t n): # <<<<<<<<<<<<<< @@ -40006,7 +39937,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_states(struct __pyx_obj_1 const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2698 + /* "_pywrapfst.pyx":2696 * * cdef void _reserve_states(self, int64_t n): * self._mfst.get().ReserveStates(n) # <<<<<<<<<<<<<< @@ -40015,11 +39946,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_states(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2698, __pyx_L1_error) + __PYX_ERR(0, 2696, __pyx_L1_error) } __pyx_v_self->_mfst.get()->ReserveStates(__pyx_v_n); - /* "_pywrapfst.pyx":2697 + /* "_pywrapfst.pyx":2695 * return self * * cdef void _reserve_states(self, int64_t n): # <<<<<<<<<<<<<< @@ -40034,7 +39965,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reserve_states(struct __pyx_obj_1 __pyx_L0:; } -/* "_pywrapfst.pyx":2700 +/* "_pywrapfst.pyx":2698 * self._mfst.get().ReserveStates(n) * * def reserve_states(self, int64_t n): # <<<<<<<<<<<<<< @@ -40096,23 +40027,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2700, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2698, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reserve_states") < 0)) __PYX_ERR(0, 2700, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reserve_states") < 0)) __PYX_ERR(0, 2698, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_n = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2700, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_n == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2698, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reserve_states", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2700, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reserve_states", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2698, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -40147,7 +40078,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_46reserve_states(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reserve_states", 1); - /* "_pywrapfst.pyx":2712 + /* "_pywrapfst.pyx":2710 * self. * """ * self._reserve_states(n) # <<<<<<<<<<<<<< @@ -40156,11 +40087,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_46reserve_states(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reserve_states"); - __PYX_ERR(0, 2712, __pyx_L1_error) + __PYX_ERR(0, 2710, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2712, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_reserve_states(__pyx_v_self, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2710, __pyx_L1_error) - /* "_pywrapfst.pyx":2713 + /* "_pywrapfst.pyx":2711 * """ * self._reserve_states(n) * return self # <<<<<<<<<<<<<< @@ -40172,7 +40103,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_46reserve_states(struct __py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2700 + /* "_pywrapfst.pyx":2698 * self._mfst.get().ReserveStates(n) * * def reserve_states(self, int64_t n): # <<<<<<<<<<<<<< @@ -40190,7 +40121,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_46reserve_states(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":2715 +/* "_pywrapfst.pyx":2713 * return self * * cdef void _reweight(self, potentials, reweight_type="to_initial") except *: # <<<<<<<<<<<<<< @@ -40221,7 +40152,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr } } - /* "_pywrapfst.pyx":2716 + /* "_pywrapfst.pyx":2714 * * cdef void _reweight(self, potentials, reweight_type="to_initial") except *: * cdef string _weight_type = self.weight_type() # <<<<<<<<<<<<<< @@ -40230,12 +40161,12 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2716, __pyx_L1_error) + __PYX_ERR(0, 2714, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2716, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2714, __pyx_L1_error) __pyx_v__weight_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":2718 + /* "_pywrapfst.pyx":2716 * cdef string _weight_type = self.weight_type() * cdef vector[fst.WeightClass] _potentials * for weight in potentials: # <<<<<<<<<<<<<< @@ -40247,9 +40178,9 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr __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, 2718, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_potentials); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2718, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2716, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { @@ -40257,28 +40188,28 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2718, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2716, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2718, __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, 2716, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2718, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2718, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2716, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) 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, 2718, __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, 2716, __pyx_L1_error) #else - __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2718, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -40288,7 +40219,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2718, __pyx_L1_error) + else __PYX_ERR(0, 2716, __pyx_L1_error) } break; } @@ -40297,22 +40228,22 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr __Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":2719 + /* "_pywrapfst.pyx":2717 * cdef vector[fst.WeightClass] _potentials * for weight in potentials: * _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight)) # <<<<<<<<<<<<<< * fst.Reweight(self._mfst.get(), _potentials, * _get_reweight_type(tostring(reweight_type))) */ - __pyx_t_6 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_v__weight_type, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2719, __pyx_L1_error) + __pyx_t_6 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_v__weight_type, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2717, __pyx_L1_error) try { __pyx_v__potentials.push_back(__pyx_t_6); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2719, __pyx_L1_error) + __PYX_ERR(0, 2717, __pyx_L1_error) } - /* "_pywrapfst.pyx":2718 + /* "_pywrapfst.pyx":2716 * cdef string _weight_type = self.weight_type() * cdef vector[fst.WeightClass] _potentials * for weight in potentials: # <<<<<<<<<<<<<< @@ -40322,7 +40253,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":2720 + /* "_pywrapfst.pyx":2718 * for weight in potentials: * _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight)) * fst.Reweight(self._mfst.get(), _potentials, # <<<<<<<<<<<<<< @@ -40331,20 +40262,20 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2720, __pyx_L1_error) + __PYX_ERR(0, 2718, __pyx_L1_error) } - /* "_pywrapfst.pyx":2721 + /* "_pywrapfst.pyx":2719 * _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight)) * fst.Reweight(self._mfst.get(), _potentials, * _get_reweight_type(tostring(reweight_type))) # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2721, __pyx_L1_error) - __pyx_t_7 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2721, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2719, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2719, __pyx_L1_error) - /* "_pywrapfst.pyx":2720 + /* "_pywrapfst.pyx":2718 * for weight in potentials: * _potentials.push_back(_get_WeightClass_or_one(_weight_type, weight)) * fst.Reweight(self._mfst.get(), _potentials, # <<<<<<<<<<<<<< @@ -40353,7 +40284,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr */ fst::script::Reweight(__pyx_v_self->_mfst.get(), __pyx_v__potentials, __pyx_t_7); - /* "_pywrapfst.pyx":2722 + /* "_pywrapfst.pyx":2720 * fst.Reweight(self._mfst.get(), _potentials, * _get_reweight_type(tostring(reweight_type))) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -40362,11 +40293,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2722, __pyx_L1_error) + __PYX_ERR(0, 2720, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2722, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2720, __pyx_L1_error) - /* "_pywrapfst.pyx":2715 + /* "_pywrapfst.pyx":2713 * return self * * cdef void _reweight(self, potentials, reweight_type="to_initial") except *: # <<<<<<<<<<<<<< @@ -40385,7 +40316,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__reweight(struct __pyx_obj_10_pywr __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2724 +/* "_pywrapfst.pyx":2722 * self._check_mutating_imethod() * * def reweight(self, potentials, reweight_type="to_initial"): # <<<<<<<<<<<<<< @@ -40451,19 +40382,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2724, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2722, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reweight_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2724, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2722, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reweight") < 0)) __PYX_ERR(0, 2724, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reweight") < 0)) __PYX_ERR(0, 2722, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -40479,7 +40410,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2724, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reweight", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2722, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -40515,7 +40446,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_48reweight(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reweight", 1); - /* "_pywrapfst.pyx":2747 + /* "_pywrapfst.pyx":2745 * self. * """ * self._reweight(potentials, reweight_type) # <<<<<<<<<<<<<< @@ -40524,13 +40455,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_48reweight(struct __pyx_obj_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_reweight"); - __PYX_ERR(0, 2747, __pyx_L1_error) + __PYX_ERR(0, 2745, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.reweight_type = __pyx_v_reweight_type; - ((struct __pyx_vtabstruct_10_pywrapfst_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, 2747, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_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, 2745, __pyx_L1_error) - /* "_pywrapfst.pyx":2748 + /* "_pywrapfst.pyx":2746 * """ * self._reweight(potentials, reweight_type) * return self # <<<<<<<<<<<<<< @@ -40542,7 +40473,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_48reweight(struct __pyx_obj_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2724 + /* "_pywrapfst.pyx":2722 * self._check_mutating_imethod() * * def reweight(self, potentials, reweight_type="to_initial"): # <<<<<<<<<<<<<< @@ -40560,7 +40491,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_48reweight(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":2750 +/* "_pywrapfst.pyx":2748 * return self * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -40571,7 +40502,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_48reweight(struct __pyx_obj_ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_v_self, struct __pyx_opt_args_10_pywrapfst_10MutableFst__rmepsilon *__pyx_optional_args) { PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":2752 + /* "_pywrapfst.pyx":2750 * cdef void _rmepsilon(self, * queue_type="auto", * bool connect=True, # <<<<<<<<<<<<<< @@ -40580,7 +40511,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw */ bool __pyx_v_connect = ((bool)1); - /* "_pywrapfst.pyx":2753 + /* "_pywrapfst.pyx":2751 * queue_type="auto", * bool connect=True, * weight=None, # <<<<<<<<<<<<<< @@ -40588,8 +40519,8 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw * float delta=fst.kShortestDelta) except *: */ PyObject *__pyx_v_weight = ((PyObject *)Py_None); - int64_t __pyx_v_nstate = __pyx_k__14; - float __pyx_v_delta = __pyx_k__15; + int64_t __pyx_v_nstate = __pyx_k__15; + float __pyx_v_delta = __pyx_k__16; fst::script::WeightClass __pyx_v__weight; std::unique_ptr __pyx_v__opts; std::string __pyx_t_1; @@ -40616,7 +40547,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw } } - /* "_pywrapfst.pyx":2756 + /* "_pywrapfst.pyx":2754 * int64_t nstate=fst.kNoStateId, * float delta=fst.kShortestDelta) except *: * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), # <<<<<<<<<<<<<< @@ -40625,31 +40556,31 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2756, __pyx_L1_error) + __PYX_ERR(0, 2754, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2754, __pyx_L1_error) - /* "_pywrapfst.pyx":2757 + /* "_pywrapfst.pyx":2755 * float delta=fst.kShortestDelta) except *: * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RmEpsilonOptions] _opts * _opts.reset( */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2756, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2754, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":2760 + /* "_pywrapfst.pyx":2758 * cdef unique_ptr[fst.RmEpsilonOptions] _opts * _opts.reset( * new fst.RmEpsilonOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * connect, * _weight, */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2760, __pyx_L1_error) - __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2760, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2758, __pyx_L1_error) - /* "_pywrapfst.pyx":2759 + /* "_pywrapfst.pyx":2757 * weight) * cdef unique_ptr[fst.RmEpsilonOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -40658,7 +40589,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw */ __pyx_v__opts.reset(new fst::script::RmEpsilonOptions(__pyx_t_3, __pyx_v_connect, __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta)); - /* "_pywrapfst.pyx":2765 + /* "_pywrapfst.pyx":2763 * nstate, * delta)) * fst.RmEpsilon(self._mfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -40667,11 +40598,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2765, __pyx_L1_error) + __PYX_ERR(0, 2763, __pyx_L1_error) } fst::script::RmEpsilon(__pyx_v_self->_mfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":2766 + /* "_pywrapfst.pyx":2764 * delta)) * fst.RmEpsilon(self._mfst.get(), deref(_opts)) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -40680,11 +40611,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2766, __pyx_L1_error) + __PYX_ERR(0, 2764, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2764, __pyx_L1_error) - /* "_pywrapfst.pyx":2750 + /* "_pywrapfst.pyx":2748 * return self * * cdef void _rmepsilon(self, # <<<<<<<<<<<<<< @@ -40699,7 +40630,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__rmepsilon(struct __pyx_obj_10_pyw __pyx_L0:; } -/* "_pywrapfst.pyx":2768 +/* "_pywrapfst.pyx":2766 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -40752,7 +40683,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_queue_type,&__pyx_n_s_connect,&__pyx_n_s_weight,&__pyx_n_s_nstate,&__pyx_n_s_delta,0}; values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_auto)); - /* "_pywrapfst.pyx":2771 + /* "_pywrapfst.pyx":2769 * queue_type="auto", * bool connect=True, * weight=None, # <<<<<<<<<<<<<< @@ -40782,40 +40713,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_type); if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2766, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2768, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rmepsilon") < 0)) __PYX_ERR(0, 2766, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -40835,10 +40766,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_queue_type = values[0]; if (values[1]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2770, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2768, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":2770 + /* "_pywrapfst.pyx":2768 * def rmepsilon(self, * queue_type="auto", * bool connect=True, # <<<<<<<<<<<<<< @@ -40849,19 +40780,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_weight = 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, 2772, __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, 2770, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__16; + __pyx_v_nstate = __pyx_k__17; } if (values[4]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2773, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2771, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__17; + __pyx_v_delta = __pyx_k__18; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 2768, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rmepsilon", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 2766, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -40877,7 +40808,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_queue_type, __pyx_v_connect, __pyx_v_weight, __pyx_v_nstate, __pyx_v_delta); - /* "_pywrapfst.pyx":2768 + /* "_pywrapfst.pyx":2766 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -40905,7 +40836,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("rmepsilon", 1); - /* "_pywrapfst.pyx":2795 + /* "_pywrapfst.pyx":2793 * self. * """ * self._rmepsilon(queue_type, connect, weight, nstate, delta) # <<<<<<<<<<<<<< @@ -40914,7 +40845,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_rmepsilon"); - __PYX_ERR(0, 2795, __pyx_L1_error) + __PYX_ERR(0, 2793, __pyx_L1_error) } __pyx_t_1.__pyx_n = 5; __pyx_t_1.queue_type = __pyx_v_queue_type; @@ -40922,9 +40853,9 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(struct __pyx_obj __pyx_t_1.weight = __pyx_v_weight; __pyx_t_1.nstate = __pyx_v_nstate; __pyx_t_1.delta = __pyx_v_delta; - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2795, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_rmepsilon(__pyx_v_self, &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2793, __pyx_L1_error) - /* "_pywrapfst.pyx":2796 + /* "_pywrapfst.pyx":2794 * """ * self._rmepsilon(queue_type, connect, weight, nstate, delta) * return self # <<<<<<<<<<<<<< @@ -40936,7 +40867,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2768 + /* "_pywrapfst.pyx":2766 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< @@ -40954,7 +40885,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_50rmepsilon(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":2798 +/* "_pywrapfst.pyx":2796 * return self * * cdef void _set_final(self, int64_t state, weight=None) except *: # <<<<<<<<<<<<<< @@ -40983,7 +40914,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw } } - /* "_pywrapfst.pyx":2799 + /* "_pywrapfst.pyx":2797 * * cdef void _set_final(self, int64_t state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -40992,19 +40923,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2799, __pyx_L1_error) + __PYX_ERR(0, 2797, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->ValidStateId(__pyx_v_state) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2800 + /* "_pywrapfst.pyx":2798 * cdef void _set_final(self, int64_t state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), * weight) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2800, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -41024,15 +40955,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2800, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2798, __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, 2800, __pyx_L1_error) + __PYX_ERR(0, 2798, __pyx_L1_error) - /* "_pywrapfst.pyx":2799 + /* "_pywrapfst.pyx":2797 * * cdef void _set_final(self, int64_t state, weight=None) except *: * if not self._mfst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -41041,7 +40972,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ } - /* "_pywrapfst.pyx":2801 + /* "_pywrapfst.pyx":2799 * if not self._mfst.get().ValidStateId(state): * raise FstIndexError("State index out of range") * cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), # <<<<<<<<<<<<<< @@ -41050,21 +40981,21 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 2801, __pyx_L1_error) + __PYX_ERR(0, 2799, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.weight_type(((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_v_self), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2799, __pyx_L1_error) - /* "_pywrapfst.pyx":2802 + /* "_pywrapfst.pyx":2800 * raise FstIndexError("State index out of range") * cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), * weight) # <<<<<<<<<<<<<< * if not self._mfst.get().SetFinal(state, _weight): * raise FstOpError("Incompatible or invalid weight") */ - __pyx_t_7 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_6, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2801, __pyx_L1_error) + __pyx_t_7 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_6, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2799, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_7); - /* "_pywrapfst.pyx":2803 + /* "_pywrapfst.pyx":2801 * cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), * weight) * if not self._mfst.get().SetFinal(state, _weight): # <<<<<<<<<<<<<< @@ -41073,19 +41004,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2803, __pyx_L1_error) + __PYX_ERR(0, 2801, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->SetFinal(__pyx_v_state, __pyx_v__weight) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2804 + /* "_pywrapfst.pyx":2802 * weight) * if not self._mfst.get().SetFinal(state, _weight): * raise FstOpError("Incompatible or invalid weight") # <<<<<<<<<<<<<< * self._check_mutating_imethod() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2804, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -41105,15 +41036,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Incompatible_or_invalid_weight}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2802, __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, 2804, __pyx_L1_error) + __PYX_ERR(0, 2802, __pyx_L1_error) - /* "_pywrapfst.pyx":2803 + /* "_pywrapfst.pyx":2801 * cdef fst.WeightClass _weight = _get_WeightClass_or_one(self.weight_type(), * weight) * if not self._mfst.get().SetFinal(state, _weight): # <<<<<<<<<<<<<< @@ -41122,7 +41053,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ } - /* "_pywrapfst.pyx":2805 + /* "_pywrapfst.pyx":2803 * if not self._mfst.get().SetFinal(state, _weight): * raise FstOpError("Incompatible or invalid weight") * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -41131,11 +41062,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2805, __pyx_L1_error) + __PYX_ERR(0, 2803, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2805, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2803, __pyx_L1_error) - /* "_pywrapfst.pyx":2798 + /* "_pywrapfst.pyx":2796 * return self * * cdef void _set_final(self, int64_t state, weight=None) except *: # <<<<<<<<<<<<<< @@ -41154,7 +41085,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_final(struct __pyx_obj_10_pyw __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2807 +/* "_pywrapfst.pyx":2805 * self._check_mutating_imethod() * * def set_final(self, int64_t state, weight=None): # <<<<<<<<<<<<<< @@ -41220,19 +41151,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2807, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2805, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2807, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2805, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_final") < 0)) __PYX_ERR(0, 2807, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_final") < 0)) __PYX_ERR(0, 2805, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -41243,12 +41174,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds 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, 2807, __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, 2805, __pyx_L3_error) __pyx_v_weight = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2807, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_final", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2805, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41284,7 +41215,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_52set_final(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_final", 1); - /* "_pywrapfst.pyx":2825 + /* "_pywrapfst.pyx":2823 * FstOpError: Incompatible or invalid weight. * """ * self._set_final(state, weight) # <<<<<<<<<<<<<< @@ -41293,13 +41224,13 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_52set_final(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_final"); - __PYX_ERR(0, 2825, __pyx_L1_error) + __PYX_ERR(0, 2823, __pyx_L1_error) } __pyx_t_1.__pyx_n = 1; __pyx_t_1.weight = __pyx_v_weight; - ((struct __pyx_vtabstruct_10_pywrapfst_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, 2825, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_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, 2823, __pyx_L1_error) - /* "_pywrapfst.pyx":2826 + /* "_pywrapfst.pyx":2824 * """ * self._set_final(state, weight) * return self # <<<<<<<<<<<<<< @@ -41311,7 +41242,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_52set_final(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2807 + /* "_pywrapfst.pyx":2805 * self._check_mutating_imethod() * * def set_final(self, int64_t state, weight=None): # <<<<<<<<<<<<<< @@ -41329,7 +41260,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_52set_final(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":2828 +/* "_pywrapfst.pyx":2826 * return self * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -41344,7 +41275,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2829 + /* "_pywrapfst.pyx":2827 * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -41354,7 +41285,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob __pyx_t_1 = (((PyObject *)__pyx_v_symbols) == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2830 + /* "_pywrapfst.pyx":2828 * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: * self._mfst.get().SetInputSymbols(NULL) # <<<<<<<<<<<<<< @@ -41363,11 +41294,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2830, __pyx_L1_error) + __PYX_ERR(0, 2828, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetInputSymbols(NULL); - /* "_pywrapfst.pyx":2831 + /* "_pywrapfst.pyx":2829 * if symbols is None: * self._mfst.get().SetInputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -41376,7 +41307,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob */ goto __pyx_L0; - /* "_pywrapfst.pyx":2829 + /* "_pywrapfst.pyx":2827 * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -41385,7 +41316,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob */ } - /* "_pywrapfst.pyx":2832 + /* "_pywrapfst.pyx":2830 * self._mfst.get().SetInputSymbols(NULL) * return * self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<< @@ -41394,16 +41325,16 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2832, __pyx_L1_error) + __PYX_ERR(0, 2830, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2832, __pyx_L1_error) + __PYX_ERR(0, 2830, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2832, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2830, __pyx_L1_error) __pyx_v_self->_mfst.get()->SetInputSymbols(__pyx_t_2); - /* "_pywrapfst.pyx":2828 + /* "_pywrapfst.pyx":2826 * return self * * cdef void _set_input_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -41418,7 +41349,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_input_symbols(struct __pyx_ob __pyx_L0:; } -/* "_pywrapfst.pyx":2834 +/* "_pywrapfst.pyx":2832 * self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -41480,12 +41411,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2834, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2832, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_input_symbols") < 0)) __PYX_ERR(0, 2834, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_input_symbols") < 0)) __PYX_ERR(0, 2832, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -41496,7 +41427,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_input_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2834, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_input_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2832, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41510,7 +41441,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2834, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2832, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_54set_input_symbols(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -41536,7 +41467,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_54set_input_symbols(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_input_symbols", 1); - /* "_pywrapfst.pyx":2848 + /* "_pywrapfst.pyx":2846 * self. * """ * self._set_input_symbols(symbols) # <<<<<<<<<<<<<< @@ -41545,11 +41476,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_54set_input_symbols(struct _ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_input_symbols"); - __PYX_ERR(0, 2848, __pyx_L1_error) + __PYX_ERR(0, 2846, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2848, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_input_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2846, __pyx_L1_error) - /* "_pywrapfst.pyx":2849 + /* "_pywrapfst.pyx":2847 * """ * self._set_input_symbols(symbols) * return self # <<<<<<<<<<<<<< @@ -41561,7 +41492,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_54set_input_symbols(struct _ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2834 + /* "_pywrapfst.pyx":2832 * self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -41579,7 +41510,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_54set_input_symbols(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":2851 +/* "_pywrapfst.pyx":2849 * return self * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -41594,7 +41525,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":2852 + /* "_pywrapfst.pyx":2850 * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -41604,7 +41535,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o __pyx_t_1 = (((PyObject *)__pyx_v_symbols) == Py_None); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2853 + /* "_pywrapfst.pyx":2851 * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: * self._mfst.get().SetOutputSymbols(NULL) # <<<<<<<<<<<<<< @@ -41613,11 +41544,11 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2853, __pyx_L1_error) + __PYX_ERR(0, 2851, __pyx_L1_error) } __pyx_v_self->_mfst.get()->SetOutputSymbols(NULL); - /* "_pywrapfst.pyx":2854 + /* "_pywrapfst.pyx":2852 * if symbols is None: * self._mfst.get().SetOutputSymbols(NULL) * return # <<<<<<<<<<<<<< @@ -41626,7 +41557,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o */ goto __pyx_L0; - /* "_pywrapfst.pyx":2852 + /* "_pywrapfst.pyx":2850 * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: * if symbols is None: # <<<<<<<<<<<<<< @@ -41635,7 +41566,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o */ } - /* "_pywrapfst.pyx":2855 + /* "_pywrapfst.pyx":2853 * self._mfst.get().SetOutputSymbols(NULL) * return * self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) # <<<<<<<<<<<<<< @@ -41644,16 +41575,16 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2855, __pyx_L1_error) + __PYX_ERR(0, 2853, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_symbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 2855, __pyx_L1_error) + __PYX_ERR(0, 2853, __pyx_L1_error) } - __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2855, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTableView *)__pyx_v_symbols->__pyx_vtab)->_raw_ptr_or_raise(__pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2853, __pyx_L1_error) __pyx_v_self->_mfst.get()->SetOutputSymbols(__pyx_t_2); - /* "_pywrapfst.pyx":2851 + /* "_pywrapfst.pyx":2849 * return self * * cdef void _set_output_symbols(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< @@ -41668,7 +41599,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_output_symbols(struct __pyx_o __pyx_L0:; } -/* "_pywrapfst.pyx":2857 +/* "_pywrapfst.pyx":2855 * self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -41730,12 +41661,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2857, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2855, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_output_symbols") < 0)) __PYX_ERR(0, 2857, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_output_symbols") < 0)) __PYX_ERR(0, 2855, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -41746,7 +41677,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_output_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2857, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_output_symbols", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2855, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41760,7 +41691,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2857, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), __pyx_ptype_10_pywrapfst_SymbolTableView, 1, "symbols", 0))) __PYX_ERR(0, 2855, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_10MutableFst_56set_output_symbols(((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_v_self), __pyx_v_symbols); /* function exit code */ @@ -41786,7 +41717,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_56set_output_symbols(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_output_symbols", 1); - /* "_pywrapfst.pyx":2871 + /* "_pywrapfst.pyx":2869 * self. * """ * self._set_output_symbols(symbols) # <<<<<<<<<<<<<< @@ -41795,11 +41726,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_56set_output_symbols(struct */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_output_symbols"); - __PYX_ERR(0, 2871, __pyx_L1_error) + __PYX_ERR(0, 2869, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2871, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_output_symbols(__pyx_v_self, __pyx_v_symbols); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2869, __pyx_L1_error) - /* "_pywrapfst.pyx":2872 + /* "_pywrapfst.pyx":2870 * """ * self._set_output_symbols(symbols) * return self # <<<<<<<<<<<<<< @@ -41811,7 +41742,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_56set_output_symbols(struct __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2857 + /* "_pywrapfst.pyx":2855 * self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< @@ -41829,7 +41760,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_56set_output_symbols(struct return __pyx_r; } -/* "_pywrapfst.pyx":2874 +/* "_pywrapfst.pyx":2872 * return self * * def set_properties(self, props, mask): # <<<<<<<<<<<<<< @@ -41894,7 +41825,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2874, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2872, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -41902,14 +41833,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2874, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2872, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2874, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, 1); __PYX_ERR(0, 2872, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_properties") < 0)) __PYX_ERR(0, 2874, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_properties") < 0)) __PYX_ERR(0, 2872, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -41922,7 +41853,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2874, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_properties", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2872, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41960,7 +41891,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_58set_properties(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_properties", 1); - /* "_pywrapfst.pyx":2888 + /* "_pywrapfst.pyx":2886 * self. * """ * self._mfst.get().SetProperties(props.value, mask.value) # <<<<<<<<<<<<<< @@ -41969,19 +41900,19 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_58set_properties(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2888, __pyx_L1_error) + __PYX_ERR(0, 2886, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_props, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_props, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mask, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2888, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_mfst.get()->SetProperties(__pyx_t_2, __pyx_t_3); - /* "_pywrapfst.pyx":2889 + /* "_pywrapfst.pyx":2887 * """ * self._mfst.get().SetProperties(props.value, mask.value) * return self # <<<<<<<<<<<<<< @@ -41993,7 +41924,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_58set_properties(struct __py __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2874 + /* "_pywrapfst.pyx":2872 * return self * * def set_properties(self, props, mask): # <<<<<<<<<<<<<< @@ -42012,7 +41943,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_58set_properties(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":2891 +/* "_pywrapfst.pyx":2889 * return self * * cdef void _set_start(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -42032,7 +41963,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_start(struct __pyx_obj_10_pyw int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_start", 1); - /* "_pywrapfst.pyx":2892 + /* "_pywrapfst.pyx":2890 * * cdef void _set_start(self, int64_t state) except *: * if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<< @@ -42041,19 +41972,19 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_start(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2892, __pyx_L1_error) + __PYX_ERR(0, 2890, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_self->_mfst.get()->SetStart(__pyx_v_state) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":2893 + /* "_pywrapfst.pyx":2891 * cdef void _set_start(self, int64_t state) except *: * if not self._mfst.get().SetStart(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * * def set_start(self, int64_t state): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2893, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -42073,15 +42004,15 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_start(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2893, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2891, __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, 2893, __pyx_L1_error) + __PYX_ERR(0, 2891, __pyx_L1_error) - /* "_pywrapfst.pyx":2892 + /* "_pywrapfst.pyx":2890 * * cdef void _set_start(self, int64_t state) except *: * if not self._mfst.get().SetStart(state): # <<<<<<<<<<<<<< @@ -42090,7 +42021,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_start(struct __pyx_obj_10_pyw */ } - /* "_pywrapfst.pyx":2891 + /* "_pywrapfst.pyx":2889 * return self * * cdef void _set_start(self, int64_t state) except *: # <<<<<<<<<<<<<< @@ -42109,7 +42040,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__set_start(struct __pyx_obj_10_pyw __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2895 +/* "_pywrapfst.pyx":2893 * raise FstIndexError("State index out of range") * * def set_start(self, int64_t state): # <<<<<<<<<<<<<< @@ -42171,23 +42102,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2893, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_start") < 0)) __PYX_ERR(0, 2895, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_start") < 0)) __PYX_ERR(0, 2893, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __Pyx_PyInt_As_int64_t(values[0]); if (unlikely((__pyx_v_state == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2895, __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, 2893, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2895, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_start", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2893, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -42222,7 +42153,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_60set_start(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_start", 1); - /* "_pywrapfst.pyx":2910 + /* "_pywrapfst.pyx":2908 * FstIndexError: State index out of range. * """ * self._set_start(state) # <<<<<<<<<<<<<< @@ -42231,11 +42162,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_60set_start(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_start"); - __PYX_ERR(0, 2910, __pyx_L1_error) + __PYX_ERR(0, 2908, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2910, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_set_start(__pyx_v_self, __pyx_v_state); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2908, __pyx_L1_error) - /* "_pywrapfst.pyx":2911 + /* "_pywrapfst.pyx":2909 * """ * self._set_start(state) * return self # <<<<<<<<<<<<<< @@ -42247,7 +42178,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_60set_start(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2895 + /* "_pywrapfst.pyx":2893 * raise FstIndexError("State index out of range") * * def set_start(self, int64_t state): # <<<<<<<<<<<<<< @@ -42265,7 +42196,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_60set_start(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":2913 +/* "_pywrapfst.pyx":2911 * return self * * cdef void _topsort(self): # <<<<<<<<<<<<<< @@ -42285,7 +42216,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__topsort(struct __pyx_obj_10_pywra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_topsort", 1); - /* "_pywrapfst.pyx":2915 + /* "_pywrapfst.pyx":2913 * cdef void _topsort(self): * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<< @@ -42294,21 +42225,21 @@ static void __pyx_f_10_pywrapfst_10MutableFst__topsort(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2915, __pyx_L1_error) + __PYX_ERR(0, 2913, __pyx_L1_error) } __pyx_t_1 = (!(fst::script::TopSort(__pyx_v_self->_mfst.get()) != 0)); if (__pyx_t_1) { - /* "_pywrapfst.pyx":2916 + /* "_pywrapfst.pyx":2914 * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): * logging.warning("Cannot topsort cyclic FST") # <<<<<<<<<<<<<< * * def topsort(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2916, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_logging); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2916, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -42329,13 +42260,13 @@ static void __pyx_f_10_pywrapfst_10MutableFst__topsort(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Cannot_topsort_cyclic_FST}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2916, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":2915 + /* "_pywrapfst.pyx":2913 * cdef void _topsort(self): * # TopSort returns False if the FST is cyclic, and thus can't be TopSorted. * if not fst.TopSort(self._mfst.get()): # <<<<<<<<<<<<<< @@ -42344,7 +42275,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__topsort(struct __pyx_obj_10_pywra */ } - /* "_pywrapfst.pyx":2913 + /* "_pywrapfst.pyx":2911 * return self * * cdef void _topsort(self): # <<<<<<<<<<<<<< @@ -42363,7 +42294,7 @@ static void __pyx_f_10_pywrapfst_10MutableFst__topsort(struct __pyx_obj_10_pywra __Pyx_RefNannyFinishContext(); } -/* "_pywrapfst.pyx":2918 +/* "_pywrapfst.pyx":2916 * logging.warning("Cannot topsort cyclic FST") * * def topsort(self): # <<<<<<<<<<<<<< @@ -42421,7 +42352,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_62topsort(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("topsort", 1); - /* "_pywrapfst.pyx":2931 + /* "_pywrapfst.pyx":2929 * self. * """ * self._topsort() # <<<<<<<<<<<<<< @@ -42430,11 +42361,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_62topsort(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_topsort"); - __PYX_ERR(0, 2931, __pyx_L1_error) + __PYX_ERR(0, 2929, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2931, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_topsort(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2929, __pyx_L1_error) - /* "_pywrapfst.pyx":2932 + /* "_pywrapfst.pyx":2930 * """ * self._topsort() * return self # <<<<<<<<<<<<<< @@ -42446,7 +42377,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_62topsort(struct __pyx_obj_1 __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2918 + /* "_pywrapfst.pyx":2916 * logging.warning("Cannot topsort cyclic FST") * * def topsort(self): # <<<<<<<<<<<<<< @@ -42464,7 +42395,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_62topsort(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":2934 +/* "_pywrapfst.pyx":2932 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -42513,7 +42444,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("union", 1); - /* "_pywrapfst.pyx":2952 + /* "_pywrapfst.pyx":2950 * cdef Fst _fst2 * cdef vector[const_FstClass_ptr] _fsts2 * for _fst2 in fsts2: # <<<<<<<<<<<<<< @@ -42526,21 +42457,21 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2952, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2950, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2952, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 2950, __pyx_L1_error) #else - __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2952, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 2952, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 2950, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v__fst2, ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":2953 + /* "_pywrapfst.pyx":2951 * cdef vector[const_FstClass_ptr] _fsts2 * for _fst2 in fsts2: * _fsts2.push_back(_fst2._fst.get()) # <<<<<<<<<<<<<< @@ -42549,16 +42480,16 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v__fst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2953, __pyx_L1_error) + __PYX_ERR(0, 2951, __pyx_L1_error) } try { __pyx_v__fsts2.push_back(__pyx_v__fst2->_fst.get()); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 2953, __pyx_L1_error) + __PYX_ERR(0, 2951, __pyx_L1_error) } - /* "_pywrapfst.pyx":2952 + /* "_pywrapfst.pyx":2950 * cdef Fst _fst2 * cdef vector[const_FstClass_ptr] _fsts2 * for _fst2 in fsts2: # <<<<<<<<<<<<<< @@ -42568,7 +42499,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":2954 + /* "_pywrapfst.pyx":2952 * for _fst2 in fsts2: * _fsts2.push_back(_fst2._fst.get()) * fst.Union(self._mfst.get(), _fsts2) # <<<<<<<<<<<<<< @@ -42577,11 +42508,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2954, __pyx_L1_error) + __PYX_ERR(0, 2952, __pyx_L1_error) } fst::script::Union(__pyx_v_self->_mfst.get(), __pyx_v__fsts2); - /* "_pywrapfst.pyx":2955 + /* "_pywrapfst.pyx":2953 * _fsts2.push_back(_fst2._fst.get()) * fst.Union(self._mfst.get(), _fsts2) * self._check_mutating_imethod() # <<<<<<<<<<<<<< @@ -42590,11 +42521,11 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_check_mutating_imethod"); - __PYX_ERR(0, 2955, __pyx_L1_error) + __PYX_ERR(0, 2953, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2955, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst_MutableFst *)__pyx_v_self->__pyx_base.__pyx_vtab)->_check_mutating_imethod(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2953, __pyx_L1_error) - /* "_pywrapfst.pyx":2956 + /* "_pywrapfst.pyx":2954 * fst.Union(self._mfst.get(), _fsts2) * self._check_mutating_imethod() * return self # <<<<<<<<<<<<<< @@ -42606,7 +42537,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":2934 + /* "_pywrapfst.pyx":2932 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< @@ -42627,7 +42558,7 @@ static PyObject *__pyx_pf_10_pywrapfst_10MutableFst_64union(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":2972 +/* "_pywrapfst.pyx":2970 * """ * * def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<< @@ -42671,12 +42602,12 @@ static int __pyx_pw_10_pywrapfst_9VectorFst_1__init__(PyObject *__pyx_v_self, Py if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2972, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2970, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2972, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2970, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -42690,7 +42621,7 @@ static int __pyx_pw_10_pywrapfst_9VectorFst_1__init__(PyObject *__pyx_v_self, Py } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2972, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2970, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -42733,17 +42664,17 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":2974 + /* "_pywrapfst.pyx":2972 * def __init__(self, arc_type="standard"): * cdef unique_ptr[fst.MutableFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(tostring(arc_type))) # <<<<<<<<<<<<<< * if _tfst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError(f"Unknown arc type: {arc_type!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2974, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2972, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":2975 + /* "_pywrapfst.pyx":2973 * cdef unique_ptr[fst.MutableFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -42753,18 +42684,18 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf __pyx_t_2 = (__pyx_v__tfst.get()->Properties(fst::kError, 1) == fst::kError); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":2976 + /* "_pywrapfst.pyx":2974 * _tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError(f"Unknown arc type: {arc_type!r}") # <<<<<<<<<<<<<< * self._fst.reset(_tfst.release()) * self._mfst = static_pointer_cast[fst.MutableFstClass, */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2976, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2976, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_arc_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2976, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_arc_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -42786,15 +42717,15 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2976, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 2976, __pyx_L1_error) + __PYX_ERR(0, 2974, __pyx_L1_error) - /* "_pywrapfst.pyx":2975 + /* "_pywrapfst.pyx":2973 * cdef unique_ptr[fst.MutableFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(tostring(arc_type))) * if _tfst.get().Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -42803,7 +42734,7 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf */ } - /* "_pywrapfst.pyx":2977 + /* "_pywrapfst.pyx":2975 * if _tfst.get().Properties(fst.kError, True) == fst.kError: * raise FstOpError(f"Unknown arc type: {arc_type!r}") * self._fst.reset(_tfst.release()) # <<<<<<<<<<<<<< @@ -42812,11 +42743,11 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2977, __pyx_L1_error) + __PYX_ERR(0, 2975, __pyx_L1_error) } __pyx_v_self->__pyx_base.__pyx_base._fst.reset(__pyx_v__tfst.release()); - /* "_pywrapfst.pyx":2979 + /* "_pywrapfst.pyx":2977 * self._fst.reset(_tfst.release()) * self._mfst = static_pointer_cast[fst.MutableFstClass, * fst.FstClass](self._fst) # <<<<<<<<<<<<<< @@ -42825,10 +42756,10 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 2979, __pyx_L1_error) + __PYX_ERR(0, 2977, __pyx_L1_error) } - /* "_pywrapfst.pyx":2978 + /* "_pywrapfst.pyx":2976 * raise FstOpError(f"Unknown arc type: {arc_type!r}") * self._fst.reset(_tfst.release()) * self._mfst = static_pointer_cast[fst.MutableFstClass, # <<<<<<<<<<<<<< @@ -42837,11 +42768,11 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 2978, __pyx_L1_error) + __PYX_ERR(0, 2976, __pyx_L1_error) } __pyx_v_self->__pyx_base._mfst = std::static_pointer_cast(__pyx_v_self->__pyx_base.__pyx_base._fst); - /* "_pywrapfst.pyx":2972 + /* "_pywrapfst.pyx":2970 * """ * * def __init__(self, arc_type="standard"): # <<<<<<<<<<<<<< @@ -42864,7 +42795,7 @@ static int __pyx_pf_10_pywrapfst_9VectorFst___init__(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":2998 +/* "_pywrapfst.pyx":2996 * * * cdef Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -42886,7 +42817,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_Fst", 1); - /* "_pywrapfst.pyx":2999 + /* "_pywrapfst.pyx":2997 * * cdef Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -42896,14 +42827,14 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t __pyx_t_1 = (__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3000 + /* "_pywrapfst.pyx":2998 * cdef Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * cdef Fst _ofst = Fst.__new__(Fst) * _ofst._fst.reset(tfst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -42923,15 +42854,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Operation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2998, __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, 3000, __pyx_L1_error) + __PYX_ERR(0, 2998, __pyx_L1_error) - /* "_pywrapfst.pyx":2999 + /* "_pywrapfst.pyx":2997 * * cdef Fst _init_Fst(FstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -42940,19 +42871,19 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t */ } - /* "_pywrapfst.pyx":3001 + /* "_pywrapfst.pyx":2999 * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef Fst _ofst = Fst.__new__(Fst) # <<<<<<<<<<<<<< * _ofst._fst.reset(tfst) * return _ofst */ - __pyx_t_2 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Fst(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3001, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Fst(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Fst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2999, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __pyx_v__ofst = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":3002 + /* "_pywrapfst.pyx":3000 * raise FstOpError("Operation failed") * cdef Fst _ofst = Fst.__new__(Fst) * _ofst._fst.reset(tfst) # <<<<<<<<<<<<<< @@ -42961,11 +42892,11 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t */ if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3002, __pyx_L1_error) + __PYX_ERR(0, 3000, __pyx_L1_error) } __pyx_v__ofst->_fst.reset(__pyx_v_tfst); - /* "_pywrapfst.pyx":3003 + /* "_pywrapfst.pyx":3001 * cdef Fst _ofst = Fst.__new__(Fst) * _ofst._fst.reset(tfst) * return _ofst # <<<<<<<<<<<<<< @@ -42977,7 +42908,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t __pyx_r = __pyx_v__ofst; goto __pyx_L0; - /* "_pywrapfst.pyx":2998 + /* "_pywrapfst.pyx":2996 * * * cdef Fst _init_Fst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -42999,7 +42930,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_Fst(__pyx_t return __pyx_r; } -/* "_pywrapfst.pyx":3006 +/* "_pywrapfst.pyx":3004 * * * cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -43021,7 +42952,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_MutableFst", 1); - /* "_pywrapfst.pyx":3007 + /* "_pywrapfst.pyx":3005 * * cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -43031,14 +42962,14 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta __pyx_t_1 = (__pyx_v_tfst->Properties(fst::kError, 1) == fst::kError); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3008 + /* "_pywrapfst.pyx":3006 * cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") # <<<<<<<<<<<<<< * cdef MutableFst _ofst = MutableFst.__new__(MutableFst) * _ofst._fst.reset(tfst) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3008, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -43058,15 +42989,15 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Operation_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3008, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3006, __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, 3008, __pyx_L1_error) + __PYX_ERR(0, 3006, __pyx_L1_error) - /* "_pywrapfst.pyx":3007 + /* "_pywrapfst.pyx":3005 * * cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): * if tfst.Properties(fst.kError, True) == fst.kError: # <<<<<<<<<<<<<< @@ -43075,19 +43006,19 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta */ } - /* "_pywrapfst.pyx":3009 + /* "_pywrapfst.pyx":3007 * if tfst.Properties(fst.kError, True) == fst.kError: * raise FstOpError("Operation failed") * cdef MutableFst _ofst = MutableFst.__new__(MutableFst) # <<<<<<<<<<<<<< * _ofst._fst.reset(tfst) * # Makes a copy of it as the derived type! Cool. */ - __pyx_t_2 = ((PyObject *)__pyx_tp_new_10_pywrapfst_MutableFst(((PyTypeObject *)__pyx_ptype_10_pywrapfst_MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_10_pywrapfst_MutableFst(((PyTypeObject *)__pyx_ptype_10_pywrapfst_MutableFst), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3007, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_2); __pyx_v__ofst = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":3010 + /* "_pywrapfst.pyx":3008 * raise FstOpError("Operation failed") * cdef MutableFst _ofst = MutableFst.__new__(MutableFst) * _ofst._fst.reset(tfst) # <<<<<<<<<<<<<< @@ -43096,11 +43027,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta */ if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3010, __pyx_L1_error) + __PYX_ERR(0, 3008, __pyx_L1_error) } __pyx_v__ofst->__pyx_base._fst.reset(__pyx_v_tfst); - /* "_pywrapfst.pyx":3013 + /* "_pywrapfst.pyx":3011 * # Makes a copy of it as the derived type! Cool. * _ofst._mfst = static_pointer_cast[fst.MutableFstClass, * fst.FstClass](_ofst._fst) # <<<<<<<<<<<<<< @@ -43109,10 +43040,10 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta */ if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3013, __pyx_L1_error) + __PYX_ERR(0, 3011, __pyx_L1_error) } - /* "_pywrapfst.pyx":3012 + /* "_pywrapfst.pyx":3010 * _ofst._fst.reset(tfst) * # Makes a copy of it as the derived type! Cool. * _ofst._mfst = static_pointer_cast[fst.MutableFstClass, # <<<<<<<<<<<<<< @@ -43121,11 +43052,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta */ if (unlikely(((PyObject *)__pyx_v__ofst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3012, __pyx_L1_error) + __PYX_ERR(0, 3010, __pyx_L1_error) } __pyx_v__ofst->_mfst = std::static_pointer_cast(__pyx_v__ofst->__pyx_base._fst); - /* "_pywrapfst.pyx":3014 + /* "_pywrapfst.pyx":3012 * _ofst._mfst = static_pointer_cast[fst.MutableFstClass, * fst.FstClass](_ofst._fst) * return _ofst # <<<<<<<<<<<<<< @@ -43137,7 +43068,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta __pyx_r = __pyx_v__ofst; goto __pyx_L0; - /* "_pywrapfst.pyx":3006 + /* "_pywrapfst.pyx":3004 * * * cdef MutableFst _init_MutableFst(MutableFstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -43159,7 +43090,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst__init_Muta return __pyx_r; } -/* "_pywrapfst.pyx":3017 +/* "_pywrapfst.pyx":3015 * * * cdef Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -43177,7 +43108,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_XFst", 1); - /* "_pywrapfst.pyx":3018 + /* "_pywrapfst.pyx":3016 * * cdef Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<< @@ -43187,7 +43118,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ __pyx_t_1 = (__pyx_v_tfst->Properties(fst::kMutable, 1) == fst::kMutable); if (__pyx_t_1) { - /* "_pywrapfst.pyx":3019 + /* "_pywrapfst.pyx":3017 * cdef Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: * return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst)) # <<<<<<<<<<<<<< @@ -43195,13 +43126,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ * return _init_Fst(tfst) */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(static_cast<__pyx_t_10_pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(static_cast<__pyx_t_10_pywrapfst_MutableFstClass_ptr>(__pyx_v_tfst))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3018 + /* "_pywrapfst.pyx":3016 * * cdef Fst _init_XFst(FstClass_ptr tfst): * if tfst.Properties(fst.kMutable, True) == fst.kMutable: # <<<<<<<<<<<<<< @@ -43210,7 +43141,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ */ } - /* "_pywrapfst.pyx":3021 + /* "_pywrapfst.pyx":3019 * return _init_MutableFst(static_cast[MutableFstClass_ptr](tfst)) * else: * return _init_Fst(tfst) # <<<<<<<<<<<<<< @@ -43219,14 +43150,14 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ */ /*else*/ { __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3021, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_Fst(__pyx_v_tfst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; } - /* "_pywrapfst.pyx":3017 + /* "_pywrapfst.pyx":3015 * * * cdef Fst _init_XFst(FstClass_ptr tfst): # <<<<<<<<<<<<<< @@ -43245,7 +43176,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__init_XFst(__pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":3024 +/* "_pywrapfst.pyx":3022 * * * cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<< @@ -43276,17 +43207,17 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst(PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_Fst", 1); - /* "_pywrapfst.pyx":3025 + /* "_pywrapfst.pyx":3023 * * cpdef Fst _read_Fst(source): * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) # <<<<<<<<<<<<<< * if _tfst.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") */ - __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3025, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_path_tostring(__pyx_v_source); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3023, __pyx_L1_error) __pyx_v__tfst = fst::script::FstClass::Read(__pyx_t_1); - /* "_pywrapfst.pyx":3026 + /* "_pywrapfst.pyx":3024 * cpdef Fst _read_Fst(source): * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -43296,18 +43227,18 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst(PyObjec __pyx_t_2 = (__pyx_v__tfst.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3027 + /* "_pywrapfst.pyx":3025 * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) * if _tfst.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") # <<<<<<<<<<<<<< * return _init_XFst(_tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3027, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3027, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_source), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3027, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Read_failed, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -43329,15 +43260,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst(PyObjec __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3027, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3027, __pyx_L1_error) + __PYX_ERR(0, 3025, __pyx_L1_error) - /* "_pywrapfst.pyx":3026 + /* "_pywrapfst.pyx":3024 * cpdef Fst _read_Fst(source): * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -43346,7 +43277,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst(PyObjec */ } - /* "_pywrapfst.pyx":3028 + /* "_pywrapfst.pyx":3026 * if _tfst.get() == NULL: * raise FstIOError(f"Read failed: {source!r}") * return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -43354,13 +43285,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst(PyObjec * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3028, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3024 + /* "_pywrapfst.pyx":3022 * * * cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<< @@ -43435,12 +43366,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3024, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3022, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_Fst") < 0)) __PYX_ERR(0, 3024, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_Fst") < 0)) __PYX_ERR(0, 3022, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -43451,7 +43382,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read_Fst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3024, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read_Fst", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3022, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -43487,7 +43418,7 @@ static PyObject *__pyx_pf_10_pywrapfst_16_read_Fst(CYTHON_UNUSED PyObject *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_Fst", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst(__pyx_v_source, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43504,7 +43435,7 @@ static PyObject *__pyx_pf_10_pywrapfst_16_read_Fst(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "_pywrapfst.pyx":3031 +/* "_pywrapfst.pyx":3029 * * * cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<< @@ -43534,7 +43465,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_Fst_from_string", 1); - /* "_pywrapfst.pyx":3033 + /* "_pywrapfst.pyx":3031 * cpdef Fst _read_Fst_from_string(string state): * cdef stringstream _sstrm * _sstrm << state # <<<<<<<<<<<<<< @@ -43543,7 +43474,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st */ (void)((__pyx_v__sstrm << __pyx_v_state)); - /* "_pywrapfst.pyx":3034 + /* "_pywrapfst.pyx":3032 * cdef stringstream _sstrm * _sstrm << state * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.ReadStream(_sstrm, # <<<<<<<<<<<<<< @@ -43552,7 +43483,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st */ __pyx_v__tfst = fst::script::FstClass::Read(__pyx_v__sstrm, __pyx_k_pywrapfst); - /* "_pywrapfst.pyx":3036 + /* "_pywrapfst.pyx":3034 * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.ReadStream(_sstrm, * b"") * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -43562,14 +43493,14 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st __pyx_t_1 = (__pyx_v__tfst.get() == NULL); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3037 + /* "_pywrapfst.pyx":3035 * b"") * if _tfst.get() == NULL: * raise FstIOError("Read from string failed") # <<<<<<<<<<<<<< * return _init_XFst(_tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3037, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIOError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -43589,15 +43520,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Read_from_string_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3037, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3035, __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, 3037, __pyx_L1_error) + __PYX_ERR(0, 3035, __pyx_L1_error) - /* "_pywrapfst.pyx":3036 + /* "_pywrapfst.pyx":3034 * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.ReadStream(_sstrm, * b"") * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -43606,7 +43537,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st */ } - /* "_pywrapfst.pyx":3038 + /* "_pywrapfst.pyx":3036 * if _tfst.get() == NULL: * raise FstIOError("Read from string failed") * return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -43614,13 +43545,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__read_Fst_from_st * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3038, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3031 + /* "_pywrapfst.pyx":3029 * * * cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<< @@ -43694,23 +43625,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3031, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3029, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_Fst_from_string") < 0)) __PYX_ERR(0, 3031, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_read_Fst_from_string") < 0)) __PYX_ERR(0, 3029, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3031, __pyx_L3_error) + __pyx_v_state = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3029, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_read_Fst_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3031, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_read_Fst_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3029, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -43746,7 +43677,7 @@ static PyObject *__pyx_pf_10_pywrapfst_18_read_Fst_from_string(CYTHON_UNUSED PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_read_Fst_from_string", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__read_Fst_from_string(__pyx_v_state, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43763,7 +43694,7 @@ static PyObject *__pyx_pf_10_pywrapfst_18_read_Fst_from_string(CYTHON_UNUSED PyO return __pyx_r; } -/* "_pywrapfst.pyx":3157 +/* "_pywrapfst.pyx":3155 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -43799,7 +43730,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc___repr__(struct __pyx_obj_10_pywrapf int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":3158 + /* "_pywrapfst.pyx":3156 * * def __repr__(self): * return f"" # <<<<<<<<<<<<<< @@ -43807,7 +43738,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc___repr__(struct __pyx_obj_10_pywrapf * def __init__(self, int64_t ilabel, int64_t olabel, weight, int64_t nextstate): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3158, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -43815,9 +43746,9 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc___repr__(struct __pyx_obj_10_pywrapf __pyx_t_2 += 10; __Pyx_GIVEREF(__pyx_kp_u_Arc_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Arc_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3158, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3158, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -43829,14 +43760,14 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc___repr__(struct __pyx_obj_10_pywrapf __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3158, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3157 + /* "_pywrapfst.pyx":3155 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -43857,7 +43788,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc___repr__(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":3160 +/* "_pywrapfst.pyx":3158 * return f"" * * def __init__(self, int64_t ilabel, int64_t olabel, weight, int64_t nextstate): # <<<<<<<<<<<<<< @@ -43910,7 +43841,7 @@ static int __pyx_pw_10_pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3160, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3158, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -43918,9 +43849,9 @@ static int __pyx_pw_10_pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3160, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3158, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 3160, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 3158, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -43928,9 +43859,9 @@ static int __pyx_pw_10_pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3160, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3158, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 3160, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 3158, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -43938,14 +43869,14 @@ static int __pyx_pw_10_pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject (void)__Pyx_Arg_NewRef_VARARGS(values[3]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3160, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3158, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 3160, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 3158, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3160, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3158, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; @@ -43955,14 +43886,14 @@ static int __pyx_pw_10_pywrapfst_3Arc_3__init__(PyObject *__pyx_v_self, PyObject values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); values[3] = __Pyx_Arg_VARARGS(__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, 3160, __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, 3160, __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, 3158, __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, 3158, __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, 3160, __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, 3158, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3160, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3158, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -43997,17 +43928,17 @@ static int __pyx_pf_10_pywrapfst_3Arc_2__init__(struct __pyx_obj_10_pywrapfst_Ar const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3161 + /* "_pywrapfst.pyx":3159 * * def __init__(self, int64_t ilabel, int64_t olabel, weight, int64_t nextstate): * cdef fst.WeightClass _weight = _get_WeightClass_or_one(b"tropical", weight) # <<<<<<<<<<<<<< * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) * */ - __pyx_t_1 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3161, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3159, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":3162 + /* "_pywrapfst.pyx":3160 * def __init__(self, int64_t ilabel, int64_t olabel, weight, int64_t nextstate): * cdef fst.WeightClass _weight = _get_WeightClass_or_one(b"tropical", weight) * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) # <<<<<<<<<<<<<< @@ -44016,11 +43947,11 @@ static int __pyx_pf_10_pywrapfst_3Arc_2__init__(struct __pyx_obj_10_pywrapfst_Ar */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3162, __pyx_L1_error) + __PYX_ERR(0, 3160, __pyx_L1_error) } __pyx_v_self->_arc.reset(new fst::script::ArcClass(__pyx_v_ilabel, __pyx_v_olabel, __pyx_v__weight, __pyx_v_nextstate)); - /* "_pywrapfst.pyx":3160 + /* "_pywrapfst.pyx":3158 * return f"" * * def __init__(self, int64_t ilabel, int64_t olabel, weight, int64_t nextstate): # <<<<<<<<<<<<<< @@ -44038,7 +43969,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_2__init__(struct __pyx_obj_10_pywrapfst_Ar return __pyx_r; } -/* "_pywrapfst.pyx":3164 +/* "_pywrapfst.pyx":3162 * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< @@ -44075,7 +44006,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_3Arc_copy(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3164, __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, 3162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_3Arc_5copy)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -44098,11 +44029,11 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_3Arc_copy(struct PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3164, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3162, __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_10_pywrapfst_Arc))))) __PYX_ERR(0, 3164, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Arc))))) __PYX_ERR(0, 3162, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -44121,7 +44052,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_3Arc_copy(struct #endif } - /* "_pywrapfst.pyx":3165 + /* "_pywrapfst.pyx":3163 * * cpdef Arc copy(self): * return Arc(self.ilabel, self.olabel, self.weight, self.nextstate) # <<<<<<<<<<<<<< @@ -44129,36 +44060,36 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_3Arc_copy(struct * 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, 3165, __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, 3163, __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, 3165, __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, 3163, __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, 3165, __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, 3163, __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, 3165, __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, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3165, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 3165, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 3165, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 3163, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(0, 3165, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(0, 3163, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4)) __PYX_ERR(0, 3163, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Arc), __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Arc), __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3164 + /* "_pywrapfst.pyx":3162 * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< @@ -44231,7 +44162,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_4copy(struct __pyx_obj_10_pywrapfst_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3164, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_3Arc_copy(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44248,7 +44179,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_4copy(struct __pyx_obj_10_pywrapfst_ return __pyx_r; } -/* "_pywrapfst.pyx":3169 +/* "_pywrapfst.pyx":3167 * property ilabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44280,7 +44211,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pywrapfst.pyx":3170 + /* "_pywrapfst.pyx":3168 * * def __get__(self): * return deref(self._arc).ilabel # <<<<<<<<<<<<<< @@ -44290,15 +44221,15 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_10_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3170, __pyx_L1_error) + __PYX_ERR(0, 3168, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3169 + /* "_pywrapfst.pyx":3167 * property ilabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44317,7 +44248,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6ilabel___get__(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3172 +/* "_pywrapfst.pyx":3170 * return deref(self._arc).ilabel * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -44338,7 +44269,7 @@ static int __pyx_pw_10_pywrapfst_3Arc_6ilabel_3__set__(PyObject *__pyx_v_self, P __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); 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, 3172, __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, 3170, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -44359,7 +44290,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_10_pywra const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3173 + /* "_pywrapfst.pyx":3171 * * def __set__(self, int64_t value): * deref(self._arc).ilabel = value # <<<<<<<<<<<<<< @@ -44368,11 +44299,11 @@ static int __pyx_pf_10_pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3173, __pyx_L1_error) + __PYX_ERR(0, 3171, __pyx_L1_error) } (*__pyx_v_self->_arc).ilabel = __pyx_v_value; - /* "_pywrapfst.pyx":3172 + /* "_pywrapfst.pyx":3170 * return deref(self._arc).ilabel * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -44390,7 +44321,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_6ilabel_2__set__(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":3177 +/* "_pywrapfst.pyx":3175 * property olabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44422,7 +44353,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pywrapfst.pyx":3178 + /* "_pywrapfst.pyx":3176 * * def __get__(self): * return deref(self._arc).olabel # <<<<<<<<<<<<<< @@ -44432,15 +44363,15 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_10_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3178, __pyx_L1_error) + __PYX_ERR(0, 3176, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).olabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3177 + /* "_pywrapfst.pyx":3175 * property olabel: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44459,7 +44390,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6olabel___get__(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3180 +/* "_pywrapfst.pyx":3178 * return deref(self._arc).olabel * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -44480,7 +44411,7 @@ static int __pyx_pw_10_pywrapfst_3Arc_6olabel_3__set__(PyObject *__pyx_v_self, P __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); 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, 3180, __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, 3178, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -44501,7 +44432,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_10_pywra const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3181 + /* "_pywrapfst.pyx":3179 * * def __set__(self, int64_t value): * deref(self._arc).olabel = value # <<<<<<<<<<<<<< @@ -44510,11 +44441,11 @@ static int __pyx_pf_10_pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3181, __pyx_L1_error) + __PYX_ERR(0, 3179, __pyx_L1_error) } (*__pyx_v_self->_arc).olabel = __pyx_v_value; - /* "_pywrapfst.pyx":3180 + /* "_pywrapfst.pyx":3178 * return deref(self._arc).olabel * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -44532,7 +44463,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_6olabel_2__set__(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":3185 +/* "_pywrapfst.pyx":3183 * property weight: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44565,19 +44496,19 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6weight___get__(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pywrapfst.pyx":3186 + /* "_pywrapfst.pyx":3184 * * def __get__(self): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) * return _weight */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3186, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3184, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":3187 + /* "_pywrapfst.pyx":3185 * def __get__(self): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) # <<<<<<<<<<<<<< @@ -44586,15 +44517,15 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6weight___get__(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 3187, __pyx_L1_error) + __PYX_ERR(0, 3185, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3187, __pyx_L1_error) + __PYX_ERR(0, 3185, __pyx_L1_error) } __pyx_v__weight->_weight.reset(new fst::script::WeightClass((*__pyx_v_self->_arc).weight)); - /* "_pywrapfst.pyx":3188 + /* "_pywrapfst.pyx":3186 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(deref(self._arc).weight)) * return _weight # <<<<<<<<<<<<<< @@ -44606,7 +44537,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6weight___get__(struct __pyx_obj_10_ __pyx_r = ((PyObject *)__pyx_v__weight); goto __pyx_L0; - /* "_pywrapfst.pyx":3185 + /* "_pywrapfst.pyx":3183 * property weight: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44626,7 +44557,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_6weight___get__(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3190 +/* "_pywrapfst.pyx":3188 * return _weight * * def __set__(self, weight): # <<<<<<<<<<<<<< @@ -44656,21 +44587,21 @@ static int __pyx_pf_10_pywrapfst_3Arc_6weight_2__set__(struct __pyx_obj_10_pywra const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3191 + /* "_pywrapfst.pyx":3189 * * def __set__(self, weight): * deref(self._arc).weight = _get_WeightClass_or_one(b"tropical", weight) # <<<<<<<<<<<<<< * * property nextstate: */ - __pyx_t_1 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_k_tropical, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3189, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3191, __pyx_L1_error) + __PYX_ERR(0, 3189, __pyx_L1_error) } (*__pyx_v_self->_arc).weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":3190 + /* "_pywrapfst.pyx":3188 * return _weight * * def __set__(self, weight): # <<<<<<<<<<<<<< @@ -44688,7 +44619,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_6weight_2__set__(struct __pyx_obj_10_pywra return __pyx_r; } -/* "_pywrapfst.pyx":3195 +/* "_pywrapfst.pyx":3193 * property nextstate: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44720,7 +44651,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 1); - /* "_pywrapfst.pyx":3196 + /* "_pywrapfst.pyx":3194 * * def __get__(self): * return deref(self._arc).nextstate # <<<<<<<<<<<<<< @@ -44730,15 +44661,15 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_ __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3196, __pyx_L1_error) + __PYX_ERR(0, 3194, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t((*__pyx_v_self->_arc).nextstate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3195 + /* "_pywrapfst.pyx":3193 * property nextstate: * * def __get__(self): # <<<<<<<<<<<<<< @@ -44757,7 +44688,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_9nextstate___get__(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":3198 +/* "_pywrapfst.pyx":3196 * return deref(self._arc).nextstate * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -44778,7 +44709,7 @@ static int __pyx_pw_10_pywrapfst_3Arc_9nextstate_3__set__(PyObject *__pyx_v_self __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); 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, 3198, __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, 3196, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -44799,7 +44730,7 @@ static int __pyx_pf_10_pywrapfst_3Arc_9nextstate_2__set__(struct __pyx_obj_10_py const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3199 + /* "_pywrapfst.pyx":3197 * * def __set__(self, int64_t value): * deref(self._arc).nextstate = value # <<<<<<<<<<<<<< @@ -44808,11 +44739,11 @@ static int __pyx_pf_10_pywrapfst_3Arc_9nextstate_2__set__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3199, __pyx_L1_error) + __PYX_ERR(0, 3197, __pyx_L1_error) } (*__pyx_v_self->_arc).nextstate = __pyx_v_value; - /* "_pywrapfst.pyx":3198 + /* "_pywrapfst.pyx":3196 * return deref(self._arc).nextstate * * def __set__(self, int64_t value): # <<<<<<<<<<<<<< @@ -45044,7 +44975,7 @@ static PyObject *__pyx_pf_10_pywrapfst_3Arc_8__setstate_cython__(CYTHON_UNUSED s return __pyx_r; } -/* "_pywrapfst.pyx":3202 +/* "_pywrapfst.pyx":3200 * * * cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<< @@ -45065,19 +44996,19 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst__init_Arc(fst::sc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_init_Arc", 1); - /* "_pywrapfst.pyx":3203 + /* "_pywrapfst.pyx":3201 * * cdef Arc _init_Arc(const fst.ArcClass &arc): * cdef Weight _weight = Weight.__new__(Weight) # <<<<<<<<<<<<<< * _weight._weight.reset(new fst.WeightClass(arc.weight)) * return Arc(arc.ilabel, arc.olabel, _weight, arc.nextstate) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_10_pywrapfst_Weight(((PyTypeObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3201, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v__weight = ((struct __pyx_obj_10_pywrapfst_Weight *)__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":3204 + /* "_pywrapfst.pyx":3202 * cdef Arc _init_Arc(const fst.ArcClass &arc): * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(arc.weight)) # <<<<<<<<<<<<<< @@ -45086,11 +45017,11 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst__init_Arc(fst::sc */ if (unlikely(((PyObject *)__pyx_v__weight) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_weight"); - __PYX_ERR(0, 3204, __pyx_L1_error) + __PYX_ERR(0, 3202, __pyx_L1_error) } __pyx_v__weight->_weight.reset(new fst::script::WeightClass(__pyx_v_arc.weight)); - /* "_pywrapfst.pyx":3205 + /* "_pywrapfst.pyx":3203 * cdef Weight _weight = Weight.__new__(Weight) * _weight._weight.reset(new fst.WeightClass(arc.weight)) * return Arc(arc.ilabel, arc.olabel, _weight, arc.nextstate) # <<<<<<<<<<<<<< @@ -45098,34 +45029,34 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst__init_Arc(fst::sc * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.ilabel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.olabel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_arc.nextstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 3205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 3203, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v__weight); __Pyx_GIVEREF((PyObject *)__pyx_v__weight); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v__weight))) __PYX_ERR(0, 3205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v__weight))) __PYX_ERR(0, 3203, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3)) __PYX_ERR(0, 3203, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Arc), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3202 + /* "_pywrapfst.pyx":3200 * * * cdef Arc _init_Arc(const fst.ArcClass &arc): # <<<<<<<<<<<<<< @@ -45148,7 +45079,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst__init_Arc(fst::sc return __pyx_r; } -/* "_pywrapfst.pyx":3219 +/* "_pywrapfst.pyx":3217 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -45184,7 +45115,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":3220 + /* "_pywrapfst.pyx":3218 * * def __repr__(self): * return f"<_ArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -45192,7 +45123,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_ * def __init__(self, Fst ifst, int64_t state): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3220, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -45200,9 +45131,9 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_ __pyx_t_2 += 19; __Pyx_GIVEREF(__pyx_kp_u_ArcIterator_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ArcIterator_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3220, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -45214,14 +45145,14 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3220, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3219 + /* "_pywrapfst.pyx":3217 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -45242,7 +45173,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator___repr__(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":3222 +/* "_pywrapfst.pyx":3220 * return f"<_ArcIterator at 0x{id(self):x}>" * * def __init__(self, Fst ifst, int64_t state): # <<<<<<<<<<<<<< @@ -45289,7 +45220,7 @@ static int __pyx_pw_10_pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3222, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3220, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -45297,14 +45228,14 @@ static int __pyx_pw_10_pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3222, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3220, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3222, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3220, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3222, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3220, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -45313,11 +45244,11 @@ static int __pyx_pw_10_pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3222, __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, 3220, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3222, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3220, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -45331,7 +45262,7 @@ static int __pyx_pw_10_pywrapfst_12_ArcIterator_3__init__(PyObject *__pyx_v_self __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3222, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3220, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(((struct __pyx_obj_10_pywrapfst__ArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state); /* function exit code */ @@ -45363,7 +45294,7 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":3223 + /* "_pywrapfst.pyx":3221 * * def __init__(self, Fst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -45372,19 +45303,19 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3223, __pyx_L1_error) + __PYX_ERR(0, 3221, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_ifst->_fst.get()->ValidStateId(__pyx_v_state) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3224 + /* "_pywrapfst.pyx":3222 * def __init__(self, Fst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3224, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -45404,15 +45335,15 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3224, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3222, __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, 3224, __pyx_L1_error) + __PYX_ERR(0, 3222, __pyx_L1_error) - /* "_pywrapfst.pyx":3223 + /* "_pywrapfst.pyx":3221 * * def __init__(self, Fst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -45421,7 +45352,7 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py */ } - /* "_pywrapfst.pyx":3226 + /* "_pywrapfst.pyx":3224 * raise FstIndexError("State index out of range") * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst # <<<<<<<<<<<<<< @@ -45430,16 +45361,16 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3226, __pyx_L1_error) + __PYX_ERR(0, 3224, __pyx_L1_error) } __pyx_t_6 = __pyx_v_ifst->_fst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3226, __pyx_L1_error) + __PYX_ERR(0, 3224, __pyx_L1_error) } __pyx_v_self->_fst = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6); - /* "_pywrapfst.pyx":3227 + /* "_pywrapfst.pyx":3225 * # 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)) # <<<<<<<<<<<<<< @@ -45448,15 +45379,15 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3227, __pyx_L1_error) + __PYX_ERR(0, 3225, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3227, __pyx_L1_error) + __PYX_ERR(0, 3225, __pyx_L1_error) } __pyx_v_self->_aiter.reset(new fst::script::ArcIteratorClass((*__pyx_v_self->_fst), __pyx_v_state)); - /* "_pywrapfst.pyx":3222 + /* "_pywrapfst.pyx":3220 * return f"<_ArcIterator at 0x{id(self):x}>" * * def __init__(self, Fst ifst, int64_t state): # <<<<<<<<<<<<<< @@ -45478,7 +45409,7 @@ static int __pyx_pf_10_pywrapfst_12_ArcIterator_2__init__(struct __pyx_obj_10_py return __pyx_r; } -/* "_pywrapfst.pyx":3230 +/* "_pywrapfst.pyx":3228 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -45506,7 +45437,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_4__iter__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 1); - /* "_pywrapfst.pyx":3231 + /* "_pywrapfst.pyx":3229 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -45518,7 +45449,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_4__iter__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":3230 + /* "_pywrapfst.pyx":3228 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -45533,7 +45464,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_4__iter__(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":3234 +/* "_pywrapfst.pyx":3232 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -45569,7 +45500,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 1); - /* "_pywrapfst.pyx":3235 + /* "_pywrapfst.pyx":3233 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -45578,13 +45509,13 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3235, __pyx_L1_error) + __PYX_ERR(0, 3233, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3233, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3236 + /* "_pywrapfst.pyx":3234 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -45594,7 +45525,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj __pyx_error_without_exception = 1; goto __pyx_L1_error;; - /* "_pywrapfst.pyx":3235 + /* "_pywrapfst.pyx":3233 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -45603,7 +45534,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj */ } - /* "_pywrapfst.pyx":3237 + /* "_pywrapfst.pyx":3235 * if self.done(): * raise StopIteration * result = self._value() # <<<<<<<<<<<<<< @@ -45612,14 +45543,14 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3237, __pyx_L1_error) + __PYX_ERR(0, 3235, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3237, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_result = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3238 + /* "_pywrapfst.pyx":3236 * raise StopIteration * result = self._value() * self.next() # <<<<<<<<<<<<<< @@ -45628,11 +45559,11 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3238, __pyx_L1_error) + __PYX_ERR(0, 3236, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3238, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3236, __pyx_L1_error) - /* "_pywrapfst.pyx":3239 + /* "_pywrapfst.pyx":3237 * result = self._value() * self.next() * return result # <<<<<<<<<<<<<< @@ -45644,7 +45575,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pywrapfst.pyx":3234 + /* "_pywrapfst.pyx":3232 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -45666,7 +45597,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_6__next__(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":3241 +/* "_pywrapfst.pyx":3239 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -45703,7 +45634,7 @@ static bool __pyx_f_10_pywrapfst_12_ArcIterator_done(struct __pyx_obj_10_pywrapf if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3241, __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, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -45725,11 +45656,11 @@ static bool __pyx_f_10_pywrapfst_12_ArcIterator_done(struct __pyx_obj_10_pywrapf PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3241, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 3241, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3239, __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; @@ -45748,7 +45679,7 @@ static bool __pyx_f_10_pywrapfst_12_ArcIterator_done(struct __pyx_obj_10_pywrapf #endif } - /* "_pywrapfst.pyx":3250 + /* "_pywrapfst.pyx":3248 * True if the iterator is exhausted, False otherwise. * """ * return self._aiter.get().Done() # <<<<<<<<<<<<<< @@ -45757,12 +45688,12 @@ static bool __pyx_f_10_pywrapfst_12_ArcIterator_done(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3250, __pyx_L1_error) + __PYX_ERR(0, 3248, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Done(); goto __pyx_L0; - /* "_pywrapfst.pyx":3241 + /* "_pywrapfst.pyx":3239 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -45835,8 +45766,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_8done(struct __pyx_obj_10_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("done", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3241, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3241, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -45853,7 +45784,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_8done(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3252 +/* "_pywrapfst.pyx":3250 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -45890,7 +45821,7 @@ static uint8_t __pyx_f_10_pywrapfst_12_ArcIterator_flags(struct __pyx_obj_10_pyw if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3252, __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, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_11flags)) { __Pyx_INCREF(__pyx_t_1); @@ -45912,11 +45843,11 @@ static uint8_t __pyx_f_10_pywrapfst_12_ArcIterator_flags(struct __pyx_obj_10_pyw PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3252, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3250, __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; @@ -45935,7 +45866,7 @@ static uint8_t __pyx_f_10_pywrapfst_12_ArcIterator_flags(struct __pyx_obj_10_pyw #endif } - /* "_pywrapfst.pyx":3261 + /* "_pywrapfst.pyx":3259 * The current iterator behavioral flags as an integer. * """ * return self._aiter.get().Flags() # <<<<<<<<<<<<<< @@ -45944,12 +45875,12 @@ static uint8_t __pyx_f_10_pywrapfst_12_ArcIterator_flags(struct __pyx_obj_10_pyw */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3261, __pyx_L1_error) + __PYX_ERR(0, 3259, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Flags(); goto __pyx_L0; - /* "_pywrapfst.pyx":3252 + /* "_pywrapfst.pyx":3250 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -46022,8 +45953,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_10flags(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flags", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3252, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3250, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -46040,7 +45971,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_10flags(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":3263 +/* "_pywrapfst.pyx":3261 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -46075,7 +46006,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_next(struct __pyx_obj_10_pywrapf if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3263, __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, 3261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_13next)) { __Pyx_INCREF(__pyx_t_1); @@ -46097,7 +46028,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_next(struct __pyx_obj_10_pywrapf PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3263, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46118,7 +46049,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_next(struct __pyx_obj_10_pywrapf #endif } - /* "_pywrapfst.pyx":3269 + /* "_pywrapfst.pyx":3267 * Advances the iterator. * """ * self._aiter.get().Next() # <<<<<<<<<<<<<< @@ -46127,11 +46058,11 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_next(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3269, __pyx_L1_error) + __PYX_ERR(0, 3267, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Next(); - /* "_pywrapfst.pyx":3263 + /* "_pywrapfst.pyx":3261 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -46202,8 +46133,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_12next(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_12_ArcIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3263, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3263, __pyx_L1_error) + __pyx_f_10_pywrapfst_12_ArcIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3261, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -46220,7 +46151,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_12next(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":3271 +/* "_pywrapfst.pyx":3269 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -46257,7 +46188,7 @@ static size_t __pyx_f_10_pywrapfst_12_ArcIterator_position(struct __pyx_obj_10_p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3271, __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, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_15position)) { __Pyx_INCREF(__pyx_t_1); @@ -46279,11 +46210,11 @@ static size_t __pyx_f_10_pywrapfst_12_ArcIterator_position(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3271, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3269, __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; @@ -46302,7 +46233,7 @@ static size_t __pyx_f_10_pywrapfst_12_ArcIterator_position(struct __pyx_obj_10_p #endif } - /* "_pywrapfst.pyx":3280 + /* "_pywrapfst.pyx":3278 * The iterator's position, expressed as an integer. * """ * return self._aiter.get().Position() # <<<<<<<<<<<<<< @@ -46311,12 +46242,12 @@ static size_t __pyx_f_10_pywrapfst_12_ArcIterator_position(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3280, __pyx_L1_error) + __PYX_ERR(0, 3278, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Position(); goto __pyx_L0; - /* "_pywrapfst.pyx":3271 + /* "_pywrapfst.pyx":3269 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -46389,8 +46320,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_14position(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("position", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_position(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_12_ArcIterator_position(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3269, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -46407,7 +46338,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_14position(struct __pyx_ob return __pyx_r; } -/* "_pywrapfst.pyx":3282 +/* "_pywrapfst.pyx":3280 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -46442,7 +46373,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_reset(struct __pyx_obj_10_pywrap if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3282, __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, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_17reset)) { __Pyx_INCREF(__pyx_t_1); @@ -46464,7 +46395,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_reset(struct __pyx_obj_10_pywrap PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3282, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -46485,7 +46416,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_reset(struct __pyx_obj_10_pywrap #endif } - /* "_pywrapfst.pyx":3288 + /* "_pywrapfst.pyx":3286 * Resets the iterator to the initial position. * """ * self._aiter.get().Reset() # <<<<<<<<<<<<<< @@ -46494,11 +46425,11 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_reset(struct __pyx_obj_10_pywrap */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3288, __pyx_L1_error) + __PYX_ERR(0, 3286, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Reset(); - /* "_pywrapfst.pyx":3282 + /* "_pywrapfst.pyx":3280 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -46569,8 +46500,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_16reset(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_12_ArcIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3282, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3282, __pyx_L1_error) + __pyx_f_10_pywrapfst_12_ArcIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3280, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -46587,7 +46518,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_16reset(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":3290 +/* "_pywrapfst.pyx":3288 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -46623,10 +46554,10 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_seek(struct __pyx_obj_10_pywrapf if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3290, __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, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_19seek)) { - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3290, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -46648,7 +46579,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_seek(struct __pyx_obj_10_pywrapf __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3290, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -46669,7 +46600,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_seek(struct __pyx_obj_10_pywrapf #endif } - /* "_pywrapfst.pyx":3299 + /* "_pywrapfst.pyx":3297 * a: The position to seek to. * """ * self._aiter.get().Seek(a) # <<<<<<<<<<<<<< @@ -46678,11 +46609,11 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_seek(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3299, __pyx_L1_error) + __PYX_ERR(0, 3297, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Seek(__pyx_v_a); - /* "_pywrapfst.pyx":3290 + /* "_pywrapfst.pyx":3288 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -46757,23 +46688,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3290, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3288, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "seek") < 0)) __PYX_ERR(0, 3290, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "seek") < 0)) __PYX_ERR(0, 3288, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_a = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3290, __pyx_L3_error) + __pyx_v_a = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3288, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("seek", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3290, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("seek", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3288, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -46809,8 +46740,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_18seek(struct __pyx_obj_10 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seek", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_12_ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3290, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3290, __pyx_L1_error) + __pyx_f_10_pywrapfst_12_ArcIterator_seek(__pyx_v_self, __pyx_v_a, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3288, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -46827,7 +46758,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_18seek(struct __pyx_obj_10 return __pyx_r; } -/* "_pywrapfst.pyx":3301 +/* "_pywrapfst.pyx":3299 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< @@ -46864,12 +46795,12 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_10_py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __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, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_12_ArcIterator_21set_flags)) { - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3301, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3301, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -46892,7 +46823,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_10_py __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3301, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -46913,7 +46844,7 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_10_py #endif } - /* "_pywrapfst.pyx":3311 + /* "_pywrapfst.pyx":3309 * mask: A mask to be applied to the `flags` argument before setting them. * """ * self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<< @@ -46922,11 +46853,11 @@ static void __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(struct __pyx_obj_10_py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3311, __pyx_L1_error) + __PYX_ERR(0, 3309, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask); - /* "_pywrapfst.pyx":3301 + /* "_pywrapfst.pyx":3299 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< @@ -47005,7 +46936,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -47013,14 +46944,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3301, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3299, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_flags") < 0)) __PYX_ERR(0, 3301, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_flags") < 0)) __PYX_ERR(0, 3299, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -47028,12 +46959,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L3_error) - __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3301, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3299, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -47069,8 +47000,8 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_20set_flags(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_flags", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3301, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3301, __pyx_L1_error) + __pyx_f_10_pywrapfst_12_ArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3299, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -47087,7 +47018,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_20set_flags(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":3313 +/* "_pywrapfst.pyx":3311 * self._aiter.get().SetFlags(flags, mask) * * cdef Arc _value(self): # <<<<<<<<<<<<<< @@ -47104,7 +47035,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_12_ArcIterator__v int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_value", 1); - /* "_pywrapfst.pyx":3322 + /* "_pywrapfst.pyx":3320 * The current arc. * """ * return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<< @@ -47114,15 +47045,15 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_12_ArcIterator__v __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3322, __pyx_L1_error) + __PYX_ERR(0, 3320, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3322, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3313 + /* "_pywrapfst.pyx":3311 * self._aiter.get().SetFlags(flags, mask) * * cdef Arc _value(self): # <<<<<<<<<<<<<< @@ -47141,7 +47072,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_12_ArcIterator__v return __pyx_r; } -/* "_pywrapfst.pyx":3324 +/* "_pywrapfst.pyx":3322 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< @@ -47204,7 +47135,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_22value(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value", 1); - /* "_pywrapfst.pyx":3336 + /* "_pywrapfst.pyx":3334 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -47213,19 +47144,19 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_22value(struct __pyx_obj_1 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3336, __pyx_L1_error) + __PYX_ERR(0, 3334, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_aiter.get()->Done() != 0); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3337 + /* "_pywrapfst.pyx":3335 * """ * if self._aiter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") # <<<<<<<<<<<<<< * return self._value() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -47245,15 +47176,15 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_22value(struct __pyx_obj_1 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Can_t_get_value_from_an_exhauste}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3337, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3335, __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, 3337, __pyx_L1_error) + __PYX_ERR(0, 3335, __pyx_L1_error) - /* "_pywrapfst.pyx":3336 + /* "_pywrapfst.pyx":3334 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -47262,7 +47193,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_22value(struct __pyx_obj_1 */ } - /* "_pywrapfst.pyx":3338 + /* "_pywrapfst.pyx":3336 * if self._aiter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") * return self._value() # <<<<<<<<<<<<<< @@ -47272,15 +47203,15 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_22value(struct __pyx_obj_1 __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3338, __pyx_L1_error) + __PYX_ERR(0, 3336, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__ArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3324 + /* "_pywrapfst.pyx":3322 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< @@ -47515,7 +47446,7 @@ static PyObject *__pyx_pf_10_pywrapfst_12_ArcIterator_26__setstate_cython__(CYTH return __pyx_r; } -/* "_pywrapfst.pyx":3350 +/* "_pywrapfst.pyx":3348 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -47551,7 +47482,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator___repr__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":3351 + /* "_pywrapfst.pyx":3349 * * def __repr__(self): * return f"<_MutableArcIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -47559,7 +47490,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator___repr__(struct __p * def __init__(self, MutableFst ifst, int64_t state): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3351, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -47567,9 +47498,9 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator___repr__(struct __p __pyx_t_2 += 26; __Pyx_GIVEREF(__pyx_kp_u_MutableArcIterator_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_MutableArcIterator_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3351, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3351, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -47581,14 +47512,14 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator___repr__(struct __p __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3351, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3350 + /* "_pywrapfst.pyx":3348 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -47609,7 +47540,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator___repr__(struct __p return __pyx_r; } -/* "_pywrapfst.pyx":3353 +/* "_pywrapfst.pyx":3351 * return f"<_MutableArcIterator at 0x{id(self):x}>" * * def __init__(self, MutableFst ifst, int64_t state): # <<<<<<<<<<<<<< @@ -47656,7 +47587,7 @@ static int __pyx_pw_10_pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3353, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3351, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -47664,14 +47595,14 @@ static int __pyx_pw_10_pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx (void)__Pyx_Arg_NewRef_VARARGS(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3353, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3351, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3353, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 3351, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3353, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3351, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -47680,11 +47611,11 @@ static int __pyx_pw_10_pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3353, __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, 3351, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3353, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3351, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -47698,7 +47629,7 @@ static int __pyx_pw_10_pywrapfst_19_MutableArcIterator_3__init__(PyObject *__pyx __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3353, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_MutableFst, 1, "ifst", 0))) __PYX_ERR(0, 3351, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(((struct __pyx_obj_10_pywrapfst__MutableArcIterator *)__pyx_v_self), __pyx_v_ifst, __pyx_v_state); /* function exit code */ @@ -47730,7 +47661,7 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 1); - /* "_pywrapfst.pyx":3354 + /* "_pywrapfst.pyx":3352 * * def __init__(self, MutableFst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -47739,19 +47670,19 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3354, __pyx_L1_error) + __PYX_ERR(0, 3352, __pyx_L1_error) } __pyx_t_1 = (!(__pyx_v_ifst->__pyx_base._fst.get()->ValidStateId(__pyx_v_state) != 0)); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3355 + /* "_pywrapfst.pyx":3353 * def __init__(self, MutableFst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): * raise FstIndexError("State index out of range") # <<<<<<<<<<<<<< * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._mfst = ifst._mfst */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3355, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstIndexError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -47771,15 +47702,15 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_State_index_out_of_range}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3355, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __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, 3355, __pyx_L1_error) + __PYX_ERR(0, 3353, __pyx_L1_error) - /* "_pywrapfst.pyx":3354 + /* "_pywrapfst.pyx":3352 * * def __init__(self, MutableFst ifst, int64_t state): * if not ifst._fst.get().ValidStateId(state): # <<<<<<<<<<<<<< @@ -47788,7 +47719,7 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob */ } - /* "_pywrapfst.pyx":3357 + /* "_pywrapfst.pyx":3355 * raise FstIndexError("State index out of range") * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._mfst = ifst._mfst # <<<<<<<<<<<<<< @@ -47797,16 +47728,16 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3357, __pyx_L1_error) + __PYX_ERR(0, 3355, __pyx_L1_error) } __pyx_t_6 = __pyx_v_ifst->_mfst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3357, __pyx_L1_error) + __PYX_ERR(0, 3355, __pyx_L1_error) } __pyx_v_self->_mfst = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_6); - /* "_pywrapfst.pyx":3358 + /* "_pywrapfst.pyx":3356 * # 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)) # <<<<<<<<<<<<<< @@ -47815,15 +47746,15 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3358, __pyx_L1_error) + __PYX_ERR(0, 3356, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_mfst"); - __PYX_ERR(0, 3358, __pyx_L1_error) + __PYX_ERR(0, 3356, __pyx_L1_error) } __pyx_v_self->_aiter.reset(new fst::script::MutableArcIteratorClass(__pyx_v_ifst->_mfst.get(), __pyx_v_state)); - /* "_pywrapfst.pyx":3353 + /* "_pywrapfst.pyx":3351 * return f"<_MutableArcIterator at 0x{id(self):x}>" * * def __init__(self, MutableFst ifst, int64_t state): # <<<<<<<<<<<<<< @@ -47846,7 +47777,7 @@ static int __pyx_pf_10_pywrapfst_19_MutableArcIterator_2__init__(struct __pyx_ob } static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_pywrapfst.pyx":3361 +/* "_pywrapfst.pyx":3359 * * # Magic method used to get a Pythonic Iterator API out of the C++ API. * def __iter__(self): # <<<<<<<<<<<<<< @@ -47881,7 +47812,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_4__iter__(struct __ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10_pywrapfst___pyx_scope_struct____iter__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 3361, __pyx_L1_error) + __PYX_ERR(0, 3359, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -47889,7 +47820,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_4__iter__(struct __ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_MutableArcIterator___iter, __pyx_n_s_pywrapfst_2); if (unlikely(!gen)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -47928,9 +47859,9 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3361, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3359, __pyx_L1_error) - /* "_pywrapfst.pyx":3362 + /* "_pywrapfst.pyx":3360 * # Magic method used to get a Pythonic Iterator API out of the C++ API. * def __iter__(self): * while not self.done(): # <<<<<<<<<<<<<< @@ -47940,20 +47871,20 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co while (1) { if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3362, __pyx_L1_error) + __PYX_ERR(0, 3360, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->done(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3362, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->done(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3360, __pyx_L1_error) __pyx_t_2 = (!(__pyx_t_1 != 0)); if (!__pyx_t_2) break; - /* "_pywrapfst.pyx":3363 + /* "_pywrapfst.pyx":3361 * def __iter__(self): * while not self.done(): * yield self.value() # <<<<<<<<<<<<<< * self.next() * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3363, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -47973,7 +47904,7 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3363, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -47986,9 +47917,9 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3363, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3361, __pyx_L1_error) - /* "_pywrapfst.pyx":3364 + /* "_pywrapfst.pyx":3362 * while not self.done(): * yield self.value() * self.next() # <<<<<<<<<<<<<< @@ -47997,13 +47928,13 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co */ if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3364, __pyx_L1_error) + __PYX_ERR(0, 3362, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->next(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3364, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->next(__pyx_cur_scope->__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3362, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_pywrapfst.pyx":3361 + /* "_pywrapfst.pyx":3359 * * # Magic method used to get a Pythonic Iterator API out of the C++ API. * def __iter__(self): # <<<<<<<<<<<<<< @@ -48031,7 +47962,7 @@ static PyObject *__pyx_gb_10_pywrapfst_19_MutableArcIterator_6generator(__pyx_Co return __pyx_r; } -/* "_pywrapfst.pyx":3367 +/* "_pywrapfst.pyx":3365 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -48067,7 +47998,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 1); - /* "_pywrapfst.pyx":3368 + /* "_pywrapfst.pyx":3366 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -48076,13 +48007,13 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3368, __pyx_L1_error) + __PYX_ERR(0, 3366, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3368, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3366, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3369 + /* "_pywrapfst.pyx":3367 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -48092,7 +48023,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ __pyx_error_without_exception = 1; goto __pyx_L1_error;; - /* "_pywrapfst.pyx":3368 + /* "_pywrapfst.pyx":3366 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -48101,7 +48032,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ */ } - /* "_pywrapfst.pyx":3370 + /* "_pywrapfst.pyx":3368 * if self.done(): * raise StopIteration * result = self._value() # <<<<<<<<<<<<<< @@ -48110,14 +48041,14 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3370, __pyx_L1_error) + __PYX_ERR(0, 3368, __pyx_L1_error) } - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3370, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_result = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3371 + /* "_pywrapfst.pyx":3369 * raise StopIteration * result = self._value() * self.next() # <<<<<<<<<<<<<< @@ -48126,11 +48057,11 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3371, __pyx_L1_error) + __PYX_ERR(0, 3369, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3371, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3369, __pyx_L1_error) - /* "_pywrapfst.pyx":3372 + /* "_pywrapfst.pyx":3370 * result = self._value() * self.next() * return result # <<<<<<<<<<<<<< @@ -48142,7 +48073,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "_pywrapfst.pyx":3367 + /* "_pywrapfst.pyx":3365 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -48164,7 +48095,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_7__next__(struct __ return __pyx_r; } -/* "_pywrapfst.pyx":3374 +/* "_pywrapfst.pyx":3372 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -48201,7 +48132,7 @@ static bool __pyx_f_10_pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_10_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3374, __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, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_10done)) { __Pyx_INCREF(__pyx_t_1); @@ -48223,11 +48154,11 @@ static bool __pyx_f_10_pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_10_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3374, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3374, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3372, __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; @@ -48246,7 +48177,7 @@ static bool __pyx_f_10_pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_10_ #endif } - /* "_pywrapfst.pyx":3383 + /* "_pywrapfst.pyx":3381 * True if the iterator is exhausted, False otherwise. * """ * return self._aiter.get().Done() # <<<<<<<<<<<<<< @@ -48255,12 +48186,12 @@ static bool __pyx_f_10_pywrapfst_19_MutableArcIterator_done(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3383, __pyx_L1_error) + __PYX_ERR(0, 3381, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Done(); goto __pyx_L0; - /* "_pywrapfst.pyx":3374 + /* "_pywrapfst.pyx":3372 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -48333,8 +48264,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_9done(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("done", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3374, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3374, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3372, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -48351,7 +48282,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_9done(struct __pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":3385 +/* "_pywrapfst.pyx":3383 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -48388,7 +48319,7 @@ static uint8_t __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3385, __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, 3383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_12flags)) { __Pyx_INCREF(__pyx_t_1); @@ -48410,11 +48341,11 @@ static uint8_t __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3385, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3385, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_uint8_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3383, __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; @@ -48433,7 +48364,7 @@ static uint8_t __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj #endif } - /* "_pywrapfst.pyx":3394 + /* "_pywrapfst.pyx":3392 * The current iterator behavioral flags as an integer. * """ * return self._aiter.get().Flags() # <<<<<<<<<<<<<< @@ -48442,12 +48373,12 @@ static uint8_t __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(struct __pyx_obj */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3394, __pyx_L1_error) + __PYX_ERR(0, 3392, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Flags(); goto __pyx_L0; - /* "_pywrapfst.pyx":3385 + /* "_pywrapfst.pyx":3383 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< @@ -48520,8 +48451,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_11flags(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flags", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3385, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3385, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_flags(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3383, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_uint8_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -48538,7 +48469,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_11flags(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":3396 +/* "_pywrapfst.pyx":3394 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -48573,7 +48504,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_10_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __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, 3394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_14next)) { __Pyx_INCREF(__pyx_t_1); @@ -48595,7 +48526,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_10_ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3396, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -48616,7 +48547,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_10_ #endif } - /* "_pywrapfst.pyx":3402 + /* "_pywrapfst.pyx":3400 * Advances the iterator. * """ * self._aiter.get().Next() # <<<<<<<<<<<<<< @@ -48625,11 +48556,11 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_next(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3402, __pyx_L1_error) + __PYX_ERR(0, 3400, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Next(); - /* "_pywrapfst.pyx":3396 + /* "_pywrapfst.pyx":3394 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -48700,8 +48631,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_13next(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableArcIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3396, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableArcIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3394, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -48718,7 +48649,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_13next(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":3404 +/* "_pywrapfst.pyx":3402 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -48755,7 +48686,7 @@ static size_t __pyx_f_10_pywrapfst_19_MutableArcIterator_position(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3404, __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, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_16position)) { __Pyx_INCREF(__pyx_t_1); @@ -48777,11 +48708,11 @@ static size_t __pyx_f_10_pywrapfst_19_MutableArcIterator_position(struct __pyx_o PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3404, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3404, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3402, __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; @@ -48800,7 +48731,7 @@ static size_t __pyx_f_10_pywrapfst_19_MutableArcIterator_position(struct __pyx_o #endif } - /* "_pywrapfst.pyx":3413 + /* "_pywrapfst.pyx":3411 * The iterator's position, expressed as an integer. * """ * return self._aiter.get().Position() # <<<<<<<<<<<<<< @@ -48809,12 +48740,12 @@ static size_t __pyx_f_10_pywrapfst_19_MutableArcIterator_position(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3413, __pyx_L1_error) + __PYX_ERR(0, 3411, __pyx_L1_error) } __pyx_r = __pyx_v_self->_aiter.get()->Position(); goto __pyx_L0; - /* "_pywrapfst.pyx":3404 + /* "_pywrapfst.pyx":3402 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< @@ -48887,8 +48818,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_15position(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("position", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_position(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3404, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3404, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_19_MutableArcIterator_position(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3402, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -48905,7 +48836,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_15position(struct _ return __pyx_r; } -/* "_pywrapfst.pyx":3415 +/* "_pywrapfst.pyx":3413 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -48940,7 +48871,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_10 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3415, __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, 3413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_18reset)) { __Pyx_INCREF(__pyx_t_1); @@ -48962,7 +48893,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_10 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3415, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -48983,7 +48914,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_10 #endif } - /* "_pywrapfst.pyx":3421 + /* "_pywrapfst.pyx":3419 * Resets the iterator to the initial position. * """ * self._aiter.get().Reset() # <<<<<<<<<<<<<< @@ -48992,11 +48923,11 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(struct __pyx_obj_10 */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3421, __pyx_L1_error) + __PYX_ERR(0, 3419, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Reset(); - /* "_pywrapfst.pyx":3415 + /* "_pywrapfst.pyx":3413 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -49067,8 +48998,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_17reset(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3415, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3415, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableArcIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3413, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -49085,7 +49016,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_17reset(struct __py return __pyx_r; } -/* "_pywrapfst.pyx":3423 +/* "_pywrapfst.pyx":3421 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -49121,10 +49052,10 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_10_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __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, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_20seek)) { - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_a); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -49146,7 +49077,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_10_ __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3423, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -49167,7 +49098,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_10_ #endif } - /* "_pywrapfst.pyx":3432 + /* "_pywrapfst.pyx":3430 * a: The position to seek to. * """ * self._aiter.get().Seek(a) # <<<<<<<<<<<<<< @@ -49176,11 +49107,11 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3432, __pyx_L1_error) + __PYX_ERR(0, 3430, __pyx_L1_error) } __pyx_v_self->_aiter.get()->Seek(__pyx_v_a); - /* "_pywrapfst.pyx":3423 + /* "_pywrapfst.pyx":3421 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< @@ -49255,23 +49186,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3423, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3421, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "seek") < 0)) __PYX_ERR(0, 3423, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "seek") < 0)) __PYX_ERR(0, 3421, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); } - __pyx_v_a = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3423, __pyx_L3_error) + __pyx_v_a = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_a == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3421, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("seek", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3423, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("seek", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3421, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49307,8 +49238,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_19seek(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("seek", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3423, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableArcIterator_seek(__pyx_v_self, __pyx_v_a, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3421, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -49325,7 +49256,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_19seek(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":3434 +/* "_pywrapfst.pyx":3432 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< @@ -49362,12 +49293,12 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3434, __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, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_19_MutableArcIterator_22set_flags)) { - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3434, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(__pyx_v_flags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3434, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint8_t(__pyx_v_mask); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -49390,7 +49321,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_ob __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3434, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -49411,7 +49342,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_ob #endif } - /* "_pywrapfst.pyx":3444 + /* "_pywrapfst.pyx":3442 * mask: A mask to be applied to the `flags` argument before setting them. * """ * self._aiter.get().SetFlags(flags, mask) # <<<<<<<<<<<<<< @@ -49420,11 +49351,11 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(struct __pyx_ob */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3444, __pyx_L1_error) + __PYX_ERR(0, 3442, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetFlags(__pyx_v_flags, __pyx_v_mask); - /* "_pywrapfst.pyx":3434 + /* "_pywrapfst.pyx":3432 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< @@ -49503,7 +49434,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3434, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3432, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -49511,14 +49442,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3434, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3432, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3434, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, 1); __PYX_ERR(0, 3432, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_flags") < 0)) __PYX_ERR(0, 3434, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_flags") < 0)) __PYX_ERR(0, 3432, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -49526,12 +49457,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3434, __pyx_L3_error) - __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3434, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyInt_As_uint8_t(values[0]); if (unlikely((__pyx_v_flags == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3432, __pyx_L3_error) + __pyx_v_mask = __Pyx_PyInt_As_uint8_t(values[1]); if (unlikely((__pyx_v_mask == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3432, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3434, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_flags", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3432, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49567,8 +49498,8 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_21set_flags(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_flags", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3434, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3434, __pyx_L1_error) + __pyx_f_10_pywrapfst_19_MutableArcIterator_set_flags(__pyx_v_self, __pyx_v_flags, __pyx_v_mask, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3432, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -49585,7 +49516,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_21set_flags(struct return __pyx_r; } -/* "_pywrapfst.pyx":3446 +/* "_pywrapfst.pyx":3444 * self._aiter.get().SetFlags(flags, mask) * * cdef void _set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -49598,7 +49529,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator__set_value(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3456 + /* "_pywrapfst.pyx":3454 * arc: The arc to replace the current arc with. * """ * self._aiter.get().SetValue(deref(arc._arc)) # <<<<<<<<<<<<<< @@ -49607,15 +49538,15 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator__set_value(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3456, __pyx_L1_error) + __PYX_ERR(0, 3454, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_arc) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc"); - __PYX_ERR(0, 3456, __pyx_L1_error) + __PYX_ERR(0, 3454, __pyx_L1_error) } __pyx_v_self->_aiter.get()->SetValue((*__pyx_v_arc->_arc)); - /* "_pywrapfst.pyx":3446 + /* "_pywrapfst.pyx":3444 * self._aiter.get().SetFlags(flags, mask) * * cdef void _set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -49630,7 +49561,7 @@ static void __pyx_f_10_pywrapfst_19_MutableArcIterator__set_value(struct __pyx_o __pyx_L0:; } -/* "_pywrapfst.pyx":3458 +/* "_pywrapfst.pyx":3456 * self._aiter.get().SetValue(deref(arc._arc)) * * def set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -49692,12 +49623,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3458, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3456, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_value") < 0)) __PYX_ERR(0, 3458, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_value") < 0)) __PYX_ERR(0, 3456, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -49708,7 +49639,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3458, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3456, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -49722,7 +49653,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3458, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc), __pyx_ptype_10_pywrapfst_Arc, 1, "arc", 0))) __PYX_ERR(0, 3456, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(((struct __pyx_obj_10_pywrapfst__MutableArcIterator *)__pyx_v_self), __pyx_v_arc); /* function exit code */ @@ -49753,7 +49684,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_value", 1); - /* "_pywrapfst.pyx":3470 + /* "_pywrapfst.pyx":3468 * FstOpError: Can't set value on an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -49762,19 +49693,19 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3470, __pyx_L1_error) + __PYX_ERR(0, 3468, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_aiter.get()->Done() != 0); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3471 + /* "_pywrapfst.pyx":3469 * """ * if self._aiter.get().Done(): * raise FstOpError("Can't set value on an exhausted iterator") # <<<<<<<<<<<<<< * self._set_value(arc) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3471, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -49794,15 +49725,15 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Can_t_set_value_on_an_exhausted}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3471, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3469, __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, 3471, __pyx_L1_error) + __PYX_ERR(0, 3469, __pyx_L1_error) - /* "_pywrapfst.pyx":3470 + /* "_pywrapfst.pyx":3468 * FstOpError: Can't set value on an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -49811,7 +49742,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct */ } - /* "_pywrapfst.pyx":3472 + /* "_pywrapfst.pyx":3470 * if self._aiter.get().Done(): * raise FstOpError("Can't set value on an exhausted iterator") * self._set_value(arc) # <<<<<<<<<<<<<< @@ -49820,11 +49751,11 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_set_value"); - __PYX_ERR(0, 3472, __pyx_L1_error) + __PYX_ERR(0, 3470, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_set_value(__pyx_v_self, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3472, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_set_value(__pyx_v_self, __pyx_v_arc); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3470, __pyx_L1_error) - /* "_pywrapfst.pyx":3458 + /* "_pywrapfst.pyx":3456 * self._aiter.get().SetValue(deref(arc._arc)) * * def set_value(self, Arc arc): # <<<<<<<<<<<<<< @@ -49847,7 +49778,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_23set_value(struct return __pyx_r; } -/* "_pywrapfst.pyx":3474 +/* "_pywrapfst.pyx":3472 * self._set_value(arc) * * cdef Arc _value(self): # <<<<<<<<<<<<<< @@ -49864,7 +49795,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_19_MutableArcIter int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_value", 1); - /* "_pywrapfst.pyx":3483 + /* "_pywrapfst.pyx":3481 * The current arc. * """ * return _init_Arc(self._aiter.get().Value()) # <<<<<<<<<<<<<< @@ -49874,15 +49805,15 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_19_MutableArcIter __Pyx_XDECREF((PyObject *)__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3483, __pyx_L1_error) + __PYX_ERR(0, 3481, __pyx_L1_error) } - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3483, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_Arc(__pyx_v_self->_aiter.get()->Value())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Arc *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3474 + /* "_pywrapfst.pyx":3472 * self._set_value(arc) * * cdef Arc _value(self): # <<<<<<<<<<<<<< @@ -49901,7 +49832,7 @@ static struct __pyx_obj_10_pywrapfst_Arc *__pyx_f_10_pywrapfst_19_MutableArcIter return __pyx_r; } -/* "_pywrapfst.pyx":3485 +/* "_pywrapfst.pyx":3483 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< @@ -49964,7 +49895,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_25value(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value", 1); - /* "_pywrapfst.pyx":3497 + /* "_pywrapfst.pyx":3495 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -49973,19 +49904,19 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_25value(struct __py */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_aiter"); - __PYX_ERR(0, 3497, __pyx_L1_error) + __PYX_ERR(0, 3495, __pyx_L1_error) } __pyx_t_1 = (__pyx_v_self->_aiter.get()->Done() != 0); if (unlikely(__pyx_t_1)) { - /* "_pywrapfst.pyx":3498 + /* "_pywrapfst.pyx":3496 * """ * if self._aiter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") # <<<<<<<<<<<<<< * return self._value() * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3498, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -50005,15 +49936,15 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_25value(struct __py PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Can_t_get_value_from_an_exhauste}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3498, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3496, __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, 3498, __pyx_L1_error) + __PYX_ERR(0, 3496, __pyx_L1_error) - /* "_pywrapfst.pyx":3497 + /* "_pywrapfst.pyx":3495 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._aiter.get().Done(): # <<<<<<<<<<<<<< @@ -50022,7 +49953,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_25value(struct __py */ } - /* "_pywrapfst.pyx":3499 + /* "_pywrapfst.pyx":3497 * if self._aiter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") * return self._value() # <<<<<<<<<<<<<< @@ -50032,15 +49963,15 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_25value(struct __py __Pyx_XDECREF(__pyx_r); if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3499, __pyx_L1_error) + __PYX_ERR(0, 3497, __pyx_L1_error) } - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3499, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_10_pywrapfst__MutableArcIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3485 + /* "_pywrapfst.pyx":3483 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< @@ -50275,7 +50206,7 @@ static PyObject *__pyx_pf_10_pywrapfst_19_MutableArcIterator_29__setstate_cython return __pyx_r; } -/* "_pywrapfst.pyx":3513 +/* "_pywrapfst.pyx":3511 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -50311,7 +50242,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator___repr__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 1); - /* "_pywrapfst.pyx":3514 + /* "_pywrapfst.pyx":3512 * * def __repr__(self): * return f"<_StateIterator at 0x{id(self):x}>" # <<<<<<<<<<<<<< @@ -50319,7 +50250,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator___repr__(struct __pyx_ob * def __init__(self, Fst ifst): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3514, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -50327,9 +50258,9 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator___repr__(struct __pyx_ob __pyx_t_2 += 21; __Pyx_GIVEREF(__pyx_kp_u_StateIterator_at_0x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_StateIterator_at_0x); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3514, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3514, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_4, __pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; @@ -50341,14 +50272,14 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator___repr__(struct __pyx_ob __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3514, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3513 + /* "_pywrapfst.pyx":3511 * """ * * def __repr__(self): # <<<<<<<<<<<<<< @@ -50369,7 +50300,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator___repr__(struct __pyx_ob return __pyx_r; } -/* "_pywrapfst.pyx":3516 +/* "_pywrapfst.pyx":3514 * return f"<_StateIterator at 0x{id(self):x}>" * * def __init__(self, Fst ifst): # <<<<<<<<<<<<<< @@ -50413,12 +50344,12 @@ static int __pyx_pw_10_pywrapfst_14_StateIterator_3__init__(PyObject *__pyx_v_se (void)__Pyx_Arg_NewRef_VARARGS(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3516, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3514, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3516, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 3514, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -50429,7 +50360,7 @@ static int __pyx_pw_10_pywrapfst_14_StateIterator_3__init__(PyObject *__pyx_v_se } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3516, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3514, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -50443,7 +50374,7 @@ static int __pyx_pw_10_pywrapfst_14_StateIterator_3__init__(PyObject *__pyx_v_se __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3516, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3514, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_14_StateIterator_2__init__(((struct __pyx_obj_10_pywrapfst__StateIterator *)__pyx_v_self), __pyx_v_ifst); /* function exit code */ @@ -50468,7 +50399,7 @@ static int __pyx_pf_10_pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_10_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3518 + /* "_pywrapfst.pyx":3516 * def __init__(self, Fst ifst): * # Makes copy of the shared_ptr, potentially extending the FST's lifetime. * self._fst = ifst._fst # <<<<<<<<<<<<<< @@ -50477,16 +50408,16 @@ static int __pyx_pf_10_pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3518, __pyx_L1_error) + __PYX_ERR(0, 3516, __pyx_L1_error) } __pyx_t_1 = __pyx_v_ifst->_fst; if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3518, __pyx_L1_error) + __PYX_ERR(0, 3516, __pyx_L1_error) } __pyx_v_self->_fst = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":3519 + /* "_pywrapfst.pyx":3517 * # 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))) # <<<<<<<<<<<<<< @@ -50495,15 +50426,15 @@ static int __pyx_pf_10_pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3519, __pyx_L1_error) + __PYX_ERR(0, 3517, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3519, __pyx_L1_error) + __PYX_ERR(0, 3517, __pyx_L1_error) } __pyx_v_self->_siter.reset(new fst::script::StateIteratorClass((*__pyx_v_self->_fst))); - /* "_pywrapfst.pyx":3516 + /* "_pywrapfst.pyx":3514 * return f"<_StateIterator at 0x{id(self):x}>" * * def __init__(self, Fst ifst): # <<<<<<<<<<<<<< @@ -50521,7 +50452,7 @@ static int __pyx_pf_10_pywrapfst_14_StateIterator_2__init__(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3522 +/* "_pywrapfst.pyx":3520 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -50549,7 +50480,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_4__iter__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 1); - /* "_pywrapfst.pyx":3523 + /* "_pywrapfst.pyx":3521 * # This just registers this class as a possible iterator. * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -50561,7 +50492,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_4__iter__(struct __pyx_o __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "_pywrapfst.pyx":3522 + /* "_pywrapfst.pyx":3520 * * # This just registers this class as a possible iterator. * def __iter__(self): # <<<<<<<<<<<<<< @@ -50576,7 +50507,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_4__iter__(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":3526 +/* "_pywrapfst.pyx":3524 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -50613,7 +50544,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 1); - /* "_pywrapfst.pyx":3527 + /* "_pywrapfst.pyx":3525 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -50622,13 +50553,13 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "done"); - __PYX_ERR(0, 3527, __pyx_L1_error) + __PYX_ERR(0, 3525, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3527, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->done(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3525, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3528 + /* "_pywrapfst.pyx":3526 * def __next__(self): * if self.done(): * raise StopIteration # <<<<<<<<<<<<<< @@ -50638,7 +50569,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o __pyx_error_without_exception = 1; goto __pyx_L1_error;; - /* "_pywrapfst.pyx":3527 + /* "_pywrapfst.pyx":3525 * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): * if self.done(): # <<<<<<<<<<<<<< @@ -50647,7 +50578,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o */ } - /* "_pywrapfst.pyx":3529 + /* "_pywrapfst.pyx":3527 * if self.done(): * raise StopIteration * cdef int64_t result = self._value() # <<<<<<<<<<<<<< @@ -50656,12 +50587,12 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3529, __pyx_L1_error) + __PYX_ERR(0, 3527, __pyx_L1_error) } - __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3529, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3527, __pyx_L1_error) __pyx_v_result = __pyx_t_3; - /* "_pywrapfst.pyx":3530 + /* "_pywrapfst.pyx":3528 * raise StopIteration * cdef int64_t result = self._value() * self.next() # <<<<<<<<<<<<<< @@ -50670,11 +50601,11 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "next"); - __PYX_ERR(0, 3530, __pyx_L1_error) + __PYX_ERR(0, 3528, __pyx_L1_error) } - ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3530, __pyx_L1_error) + ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->next(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3528, __pyx_L1_error) - /* "_pywrapfst.pyx":3531 + /* "_pywrapfst.pyx":3529 * cdef int64_t result = self._value() * self.next() * return result # <<<<<<<<<<<<<< @@ -50682,13 +50613,13 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o * cpdef bool done(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3531, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3526 + /* "_pywrapfst.pyx":3524 * * # Magic method used to get a Pythonic API out of the C++ API. * def __next__(self): # <<<<<<<<<<<<<< @@ -50709,7 +50640,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_6__next__(struct __pyx_o return __pyx_r; } -/* "_pywrapfst.pyx":3533 +/* "_pywrapfst.pyx":3531 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -50746,7 +50677,7 @@ static bool __pyx_f_10_pywrapfst_14_StateIterator_done(struct __pyx_obj_10_pywra if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_done); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3533, __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, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_14_StateIterator_9done)) { __Pyx_INCREF(__pyx_t_1); @@ -50768,11 +50699,11 @@ static bool __pyx_f_10_pywrapfst_14_StateIterator_done(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3533, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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, 3533, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3531, __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; @@ -50791,7 +50722,7 @@ static bool __pyx_f_10_pywrapfst_14_StateIterator_done(struct __pyx_obj_10_pywra #endif } - /* "_pywrapfst.pyx":3542 + /* "_pywrapfst.pyx":3540 * True if the iterator is exhausted, False otherwise. * """ * return self._siter.get().Done() # <<<<<<<<<<<<<< @@ -50800,12 +50731,12 @@ static bool __pyx_f_10_pywrapfst_14_StateIterator_done(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3542, __pyx_L1_error) + __PYX_ERR(0, 3540, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Done(); goto __pyx_L0; - /* "_pywrapfst.pyx":3533 + /* "_pywrapfst.pyx":3531 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< @@ -50878,8 +50809,8 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_8done(struct __pyx_obj_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("done", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_14_StateIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3533, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3533, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_14_StateIterator_done(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3531, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -50896,7 +50827,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_8done(struct __pyx_obj_1 return __pyx_r; } -/* "_pywrapfst.pyx":3544 +/* "_pywrapfst.pyx":3542 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -50931,7 +50862,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_next(struct __pyx_obj_10_pywra if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_next); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3544, __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, 3542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_14_StateIterator_11next)) { __Pyx_INCREF(__pyx_t_1); @@ -50953,7 +50884,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_next(struct __pyx_obj_10_pywra PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3544, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -50974,7 +50905,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_next(struct __pyx_obj_10_pywra #endif } - /* "_pywrapfst.pyx":3550 + /* "_pywrapfst.pyx":3548 * Advances the iterator. * """ * self._siter.get().Next() # <<<<<<<<<<<<<< @@ -50983,11 +50914,11 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_next(struct __pyx_obj_10_pywra */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3550, __pyx_L1_error) + __PYX_ERR(0, 3548, __pyx_L1_error) } __pyx_v_self->_siter.get()->Next(); - /* "_pywrapfst.pyx":3544 + /* "_pywrapfst.pyx":3542 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< @@ -51058,8 +50989,8 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_10next(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_14_StateIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3544, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_f_10_pywrapfst_14_StateIterator_next(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3542, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -51076,7 +51007,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_10next(struct __pyx_obj_ return __pyx_r; } -/* "_pywrapfst.pyx":3552 +/* "_pywrapfst.pyx":3550 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -51111,7 +51042,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_reset(struct __pyx_obj_10_pywr if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3552, __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, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_14_StateIterator_13reset)) { __Pyx_INCREF(__pyx_t_1); @@ -51133,7 +51064,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_reset(struct __pyx_obj_10_pywr PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3552, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -51154,7 +51085,7 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_reset(struct __pyx_obj_10_pywr #endif } - /* "_pywrapfst.pyx":3558 + /* "_pywrapfst.pyx":3556 * Resets the iterator to the initial position. * """ * self._siter.get().Reset() # <<<<<<<<<<<<<< @@ -51163,11 +51094,11 @@ static void __pyx_f_10_pywrapfst_14_StateIterator_reset(struct __pyx_obj_10_pywr */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3558, __pyx_L1_error) + __PYX_ERR(0, 3556, __pyx_L1_error) } __pyx_v_self->_siter.get()->Reset(); - /* "_pywrapfst.pyx":3552 + /* "_pywrapfst.pyx":3550 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< @@ -51238,8 +51169,8 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_12reset(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 1); __Pyx_XDECREF(__pyx_r); - __pyx_f_10_pywrapfst_14_StateIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3552, __pyx_L1_error) - __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3552, __pyx_L1_error) + __pyx_f_10_pywrapfst_14_StateIterator_reset(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -51256,7 +51187,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_12reset(struct __pyx_obj return __pyx_r; } -/* "_pywrapfst.pyx":3560 +/* "_pywrapfst.pyx":3558 * self._siter.get().Reset() * * cdef int64_t _value(self): # <<<<<<<<<<<<<< @@ -51270,7 +51201,7 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator__value(struct __pyx_obj_10_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":3570 + /* "_pywrapfst.pyx":3568 * The current state. * """ * return self._siter.get().Value() # <<<<<<<<<<<<<< @@ -51279,12 +51210,12 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator__value(struct __pyx_obj_10_ */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3570, __pyx_L1_error) + __PYX_ERR(0, 3568, __pyx_L1_error) } __pyx_r = __pyx_v_self->_siter.get()->Value(); goto __pyx_L0; - /* "_pywrapfst.pyx":3560 + /* "_pywrapfst.pyx":3558 * self._siter.get().Reset() * * cdef int64_t _value(self): # <<<<<<<<<<<<<< @@ -51300,7 +51231,7 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator__value(struct __pyx_obj_10_ return __pyx_r; } -/* "_pywrapfst.pyx":3572 +/* "_pywrapfst.pyx":3570 * return self._siter.get().Value() * * cpdef int64_t value(self) except *: # <<<<<<<<<<<<<< @@ -51338,7 +51269,7 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3572, __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, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_14_StateIterator_15value)) { __Pyx_INCREF(__pyx_t_1); @@ -51360,11 +51291,11 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3572, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_2); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3572, __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, 3570, __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; @@ -51383,7 +51314,7 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p #endif } - /* "_pywrapfst.pyx":3584 + /* "_pywrapfst.pyx":3582 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._siter.get().Done(): # <<<<<<<<<<<<<< @@ -51392,19 +51323,19 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_siter"); - __PYX_ERR(0, 3584, __pyx_L1_error) + __PYX_ERR(0, 3582, __pyx_L1_error) } __pyx_t_7 = (__pyx_v_self->_siter.get()->Done() != 0); if (unlikely(__pyx_t_7)) { - /* "_pywrapfst.pyx":3585 + /* "_pywrapfst.pyx":3583 * """ * if self._siter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") # <<<<<<<<<<<<<< * return self._value() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3585, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -51424,15 +51355,15 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u_Can_t_get_value_from_an_exhauste}; __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3585, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3583, __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, 3585, __pyx_L1_error) + __PYX_ERR(0, 3583, __pyx_L1_error) - /* "_pywrapfst.pyx":3584 + /* "_pywrapfst.pyx":3582 * FstOpError: Can't get value from an exhausted iterator. * """ * if self._siter.get().Done(): # <<<<<<<<<<<<<< @@ -51441,7 +51372,7 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p */ } - /* "_pywrapfst.pyx":3586 + /* "_pywrapfst.pyx":3584 * if self._siter.get().Done(): * raise FstOpError("Can't get value from an exhausted iterator") * return self._value() # <<<<<<<<<<<<<< @@ -51450,13 +51381,13 @@ static int64_t __pyx_f_10_pywrapfst_14_StateIterator_value(struct __pyx_obj_10_p */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_value"); - __PYX_ERR(0, 3586, __pyx_L1_error) + __PYX_ERR(0, 3584, __pyx_L1_error) } - __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3586, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_10_pywrapfst__StateIterator *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3584, __pyx_L1_error) __pyx_r = __pyx_t_6; goto __pyx_L0; - /* "_pywrapfst.pyx":3572 + /* "_pywrapfst.pyx":3570 * return self._siter.get().Value() * * cpdef int64_t value(self) except *: # <<<<<<<<<<<<<< @@ -51529,8 +51460,8 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_14value(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("value", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_10_pywrapfst_14_StateIterator_value(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3572, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3572, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_14_StateIterator_value(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3570, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -51761,7 +51692,7 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_18__setstate_cython__(CY return __pyx_r; } -/* "_pywrapfst.pyx":3592 +/* "_pywrapfst.pyx":3590 * * * cdef Fst _map(Fst ifst, # <<<<<<<<<<<<<< @@ -51770,11 +51701,11 @@ static PyObject *__pyx_pf_10_pywrapfst_14_StateIterator_18__setstate_cython__(CY */ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, struct __pyx_opt_args_10_pywrapfst__map *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__18; + float __pyx_v_delta = __pyx_k__19; PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_u_identity); double __pyx_v_power = ((double)1.); - /* "_pywrapfst.pyx":3596 + /* "_pywrapfst.pyx":3594 * map_type="identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -51813,29 +51744,29 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx } } - /* "_pywrapfst.pyx":3598 + /* "_pywrapfst.pyx":3596 * weight=None): * cdef fst.MapType _map_type * if not fst.GetMapType(tostring(map_type), addr(_map_type)): # <<<<<<<<<<<<<< * raise FstArgError(f"Unknown map type: {map_type!r}") * cdef fst.WeightClass _weight */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3598, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_map_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3596, __pyx_L1_error) __pyx_t_2 = (!(fst::script::GetMapType(__pyx_t_1, (&__pyx_v__map_type)) != 0)); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3599 + /* "_pywrapfst.pyx":3597 * cdef fst.MapType _map_type * if not fst.GetMapType(tostring(map_type), addr(_map_type)): * raise FstArgError(f"Unknown map type: {map_type!r}") # <<<<<<<<<<<<<< * cdef fst.WeightClass _weight * if _map_type == fst.MapType.TIMES_MAPPER: */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3599, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_map_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3599, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_map_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_map_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3599, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_map_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -51857,15 +51788,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3599, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3599, __pyx_L1_error) + __PYX_ERR(0, 3597, __pyx_L1_error) - /* "_pywrapfst.pyx":3598 + /* "_pywrapfst.pyx":3596 * weight=None): * cdef fst.MapType _map_type * if not fst.GetMapType(tostring(map_type), addr(_map_type)): # <<<<<<<<<<<<<< @@ -51874,7 +51805,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx */ } - /* "_pywrapfst.pyx":3601 + /* "_pywrapfst.pyx":3599 * raise FstArgError(f"Unknown map type: {map_type!r}") * cdef fst.WeightClass _weight * if _map_type == fst.MapType.TIMES_MAPPER: # <<<<<<<<<<<<<< @@ -51884,7 +51815,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx __pyx_t_2 = (__pyx_v__map_type == fst::script::MapType::TIMES); if (__pyx_t_2) { - /* "_pywrapfst.pyx":3602 + /* "_pywrapfst.pyx":3600 * cdef fst.WeightClass _weight * if _map_type == fst.MapType.TIMES_MAPPER: * _weight = _get_WeightClass_or_one(ifst.weight_type(), weight) # <<<<<<<<<<<<<< @@ -51893,13 +51824,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3602, __pyx_L1_error) + __PYX_ERR(0, 3600, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3602, __pyx_L1_error) - __pyx_t_8 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3602, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3600, __pyx_L1_error) + __pyx_t_8 = __pyx_f_10_pywrapfst__get_WeightClass_or_one(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3600, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8); - /* "_pywrapfst.pyx":3601 + /* "_pywrapfst.pyx":3599 * raise FstArgError(f"Unknown map type: {map_type!r}") * cdef fst.WeightClass _weight * if _map_type == fst.MapType.TIMES_MAPPER: # <<<<<<<<<<<<<< @@ -51909,7 +51840,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx goto __pyx_L4; } - /* "_pywrapfst.pyx":3604 + /* "_pywrapfst.pyx":3602 * _weight = _get_WeightClass_or_one(ifst.weight_type(), weight) * else: * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight) # <<<<<<<<<<<<<< @@ -51919,15 +51850,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx /*else*/ { if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3604, __pyx_L1_error) + __PYX_ERR(0, 3602, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L1_error) - __pyx_t_8 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3604, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3602, __pyx_L1_error) + __pyx_t_8 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3602, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_8); } __pyx_L4:; - /* "_pywrapfst.pyx":3605 + /* "_pywrapfst.pyx":3603 * else: * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight) * return _init_XFst( # <<<<<<<<<<<<<< @@ -51936,7 +51867,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx */ __Pyx_XDECREF((PyObject *)__pyx_r); - /* "_pywrapfst.pyx":3606 + /* "_pywrapfst.pyx":3604 * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight) * return _init_XFst( * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release()) # <<<<<<<<<<<<<< @@ -51945,23 +51876,23 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3606, __pyx_L1_error) + __PYX_ERR(0, 3604, __pyx_L1_error) } - /* "_pywrapfst.pyx":3605 + /* "_pywrapfst.pyx":3603 * else: * _weight = _get_WeightClass_or_zero(ifst.weight_type(), weight) * return _init_XFst( # <<<<<<<<<<<<<< * fst.Map(deref(ifst._fst), _map_type, delta, power, _weight).release()) * */ - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v__map_type, __pyx_v_delta, __pyx_v_power, __pyx_v__weight).release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3605, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(fst::script::Map((*__pyx_v_ifst->_fst), __pyx_v__map_type, __pyx_v_delta, __pyx_v_power, __pyx_v__weight).release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3592 + /* "_pywrapfst.pyx":3590 * * * cdef Fst _map(Fst ifst, # <<<<<<<<<<<<<< @@ -51983,7 +51914,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst__map(struct __pyx return __pyx_r; } -/* "_pywrapfst.pyx":3609 +/* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< @@ -51999,11 +51930,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_arcmap(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_arcmap *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__19; + float __pyx_v_delta = __pyx_k__20; PyObject *__pyx_v_map_type = ((PyObject *)__pyx_n_u_identity); double __pyx_v_power = ((double)1.); - /* "_pywrapfst.pyx":3613 + /* "_pywrapfst.pyx":3611 * map_type="identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -52034,7 +51965,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_arcmap(struct __p } } - /* "_pywrapfst.pyx":3653 + /* "_pywrapfst.pyx":3651 * FstArgError: Unknown map type. * """ * return _map(ifst, delta, map_type, power, weight) # <<<<<<<<<<<<<< @@ -52047,13 +51978,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_arcmap(struct __p __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = __pyx_v_power; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3609 + /* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< @@ -52117,7 +52048,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_map_type,&__pyx_n_s_power,&__pyx_n_s_weight,0}; values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_identity)); - /* "_pywrapfst.pyx":3613 + /* "_pywrapfst.pyx":3611 * map_type="identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< @@ -52148,40 +52079,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_map_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_power); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3609, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3607, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcmap") < 0)) __PYX_ERR(0, 3609, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "arcmap") < 0)) __PYX_ERR(0, 3607, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -52200,13 +52131,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3610, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3608, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__19; + __pyx_v_delta = __pyx_k__20; } __pyx_v_map_type = values[2]; if (values[3]) { - __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3612, __pyx_L3_error) + __pyx_v_power = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_power == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3610, __pyx_L3_error) } else { __pyx_v_power = ((double)1.); } @@ -52214,7 +52145,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3609, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("arcmap", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3607, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -52228,10 +52159,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3609, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3607, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_20arcmap(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_map_type, __pyx_v_power, __pyx_v_weight); - /* "_pywrapfst.pyx":3609 + /* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< @@ -52269,7 +52200,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20arcmap(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = __pyx_v_power; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3609, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_arcmap(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -52286,7 +52217,7 @@ static PyObject *__pyx_pf_10_pywrapfst_20arcmap(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "_pywrapfst.pyx":3656 +/* "_pywrapfst.pyx":3654 * * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< @@ -52304,7 +52235,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_compose *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":3659 + /* "_pywrapfst.pyx":3657 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -52332,7 +52263,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(st } } - /* "_pywrapfst.pyx":3683 + /* "_pywrapfst.pyx":3681 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -52341,22 +52272,22 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(st */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3683, __pyx_L1_error) + __PYX_ERR(0, 3681, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3683, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3681, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3687 + /* "_pywrapfst.pyx":3685 * _opts.reset( * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3687, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3687, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3685, __pyx_L1_error) - /* "_pywrapfst.pyx":3685 + /* "_pywrapfst.pyx":3683 * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -52365,7 +52296,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(st */ __pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "_pywrapfst.pyx":3688 + /* "_pywrapfst.pyx":3686 * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -52374,15 +52305,15 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(st */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3688, __pyx_L1_error) + __PYX_ERR(0, 3686, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3688, __pyx_L1_error) + __PYX_ERR(0, 3686, __pyx_L1_error) } fst::script::Compose((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":3689 + /* "_pywrapfst.pyx":3687 * _get_compose_filter(tostring(compose_filter)))) * fst.Compose(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -52390,13 +52321,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_compose(st * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3689, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3656 + /* "_pywrapfst.pyx":3654 * * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< @@ -52479,7 +52410,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3656, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -52487,28 +52418,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3656, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3656, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, 1); __PYX_ERR(0, 3654, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3656, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3656, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compose") < 0)) __PYX_ERR(0, 3656, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "compose") < 0)) __PYX_ERR(0, 3654, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -52526,10 +52457,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3659, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3657, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":3659 + /* "_pywrapfst.pyx":3657 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -52541,7 +52472,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3656, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compose", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3654, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -52555,11 +52486,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3656, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3657, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3654, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3655, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_22compose(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "_pywrapfst.pyx":3656 + /* "_pywrapfst.pyx":3654 * * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< @@ -52595,7 +52526,7 @@ static PyObject *__pyx_pf_10_pywrapfst_22compose(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3656, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_compose(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -52612,7 +52543,7 @@ static PyObject *__pyx_pf_10_pywrapfst_22compose(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pywrapfst.pyx":3692 +/* "_pywrapfst.pyx":3690 * * * cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<< @@ -52628,7 +52559,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_convert *__pyx_optional_args) { - PyObject *__pyx_v_fst_type = ((PyObject *)__pyx_kp_u__5); + PyObject *__pyx_v_fst_type = ((PyObject *)__pyx_kp_u__6); std::string __pyx_v__fst_type; std::unique_ptr __pyx_v__tfst; struct __pyx_obj_10_pywrapfst_Fst *__pyx_r = NULL; @@ -52652,17 +52583,17 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ } } - /* "_pywrapfst.pyx":3709 + /* "_pywrapfst.pyx":3707 * FstOpError: Conversion failed. * """ * cdef string _fst_type = tostring(fst_type) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FstClass] _tfst * _tfst = fst.Convert(deref(ifst._fst), _fst_type) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3709, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3707, __pyx_L1_error) __pyx_v__fst_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":3711 + /* "_pywrapfst.pyx":3709 * cdef string _fst_type = tostring(fst_type) * cdef unique_ptr[fst.FstClass] _tfst * _tfst = fst.Convert(deref(ifst._fst), _fst_type) # <<<<<<<<<<<<<< @@ -52671,11 +52602,11 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3711, __pyx_L1_error) + __PYX_ERR(0, 3709, __pyx_L1_error) } __pyx_v__tfst = fst::script::Convert((*__pyx_v_ifst->_fst), __pyx_v__fst_type); - /* "_pywrapfst.pyx":3713 + /* "_pywrapfst.pyx":3711 * _tfst = fst.Convert(deref(ifst._fst), _fst_type) * # Script-land Convert returns a null pointer to signal failure. * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -52685,16 +52616,16 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ __pyx_t_2 = (__pyx_v__tfst.get() == NULL); if (unlikely(__pyx_t_2)) { - /* "_pywrapfst.pyx":3714 + /* "_pywrapfst.pyx":3712 * # Script-land Convert returns a null pointer to signal failure. * if _tfst.get() == NULL: * raise FstOpError(f"Conversion to {fst_type!r} failed") # <<<<<<<<<<<<<< * return _init_XFst(_tfst.release()) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3714, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3714, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -52702,7 +52633,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ __pyx_t_6 += 14; __Pyx_GIVEREF(__pyx_kp_u_Conversion_to); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Conversion_to); - __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_fst_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3714, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_fst_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); @@ -52713,7 +52644,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ __pyx_t_6 += 7; __Pyx_GIVEREF(__pyx_kp_u_failed); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_failed); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3714, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -52735,15 +52666,15 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3714, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3714, __pyx_L1_error) + __PYX_ERR(0, 3712, __pyx_L1_error) - /* "_pywrapfst.pyx":3713 + /* "_pywrapfst.pyx":3711 * _tfst = fst.Convert(deref(ifst._fst), _fst_type) * # Script-land Convert returns a null pointer to signal failure. * if _tfst.get() == NULL: # <<<<<<<<<<<<<< @@ -52752,7 +52683,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ */ } - /* "_pywrapfst.pyx":3715 + /* "_pywrapfst.pyx":3713 * if _tfst.get() == NULL: * raise FstOpError(f"Conversion to {fst_type!r} failed") * return _init_XFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -52760,13 +52691,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_convert(struct __ * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_XFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3692 + /* "_pywrapfst.pyx":3690 * * * cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<< @@ -52828,7 +52759,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_fst_type,0}; - values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__5)); + values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u__6)); if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { @@ -52846,19 +52777,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fst_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3692, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convert") < 0)) __PYX_ERR(0, 3692, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convert") < 0)) __PYX_ERR(0, 3690, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -52874,7 +52805,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3692, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("convert", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3690, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -52888,7 +52819,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3692, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3690, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_24convert(__pyx_self, __pyx_v_ifst, __pyx_v_fst_type); /* function exit code */ @@ -52918,7 +52849,7 @@ static PyObject *__pyx_pf_10_pywrapfst_24convert(CYTHON_UNUSED PyObject *__pyx_s __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_10_pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_convert(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -52935,7 +52866,7 @@ static PyObject *__pyx_pf_10_pywrapfst_24convert(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pywrapfst.pyx":3718 +/* "_pywrapfst.pyx":3716 * * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< @@ -52951,12 +52882,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determinize(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_determinize *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__20; + float __pyx_v_delta = __pyx_k__21; PyObject *__pyx_v_det_type = ((PyObject *)__pyx_n_u_functional); - int64_t __pyx_v_nstate = __pyx_k__21; + int64_t __pyx_v_nstate = __pyx_k__22; int64_t __pyx_v_subsequential_label = ((int64_t)0); - /* "_pywrapfst.pyx":3723 + /* "_pywrapfst.pyx":3721 * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, * weight=None, # <<<<<<<<<<<<<< @@ -52965,7 +52896,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ PyObject *__pyx_v_weight = ((PyObject *)Py_None); - /* "_pywrapfst.pyx":3724 + /* "_pywrapfst.pyx":3722 * int64_t subsequential_label=0, * weight=None, * bool increment_subsequential_label=False): # <<<<<<<<<<<<<< @@ -53012,7 +52943,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz } } - /* "_pywrapfst.pyx":3758 + /* "_pywrapfst.pyx":3756 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -53021,12 +52952,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3758, __pyx_L1_error) + __PYX_ERR(0, 3756, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3756, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3760 + /* "_pywrapfst.pyx":3758 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if weight unspecified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -53035,43 +52966,43 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3760, __pyx_L1_error) + __PYX_ERR(0, 3758, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3760, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error) - /* "_pywrapfst.pyx":3761 + /* "_pywrapfst.pyx":3759 * # Threshold is set to semiring Zero (no pruning) if weight unspecified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3760, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3758, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":3763 + /* "_pywrapfst.pyx":3761 * weight) * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): # <<<<<<<<<<<<<< * raise FstArgError(f"Unknown determinization type: {det_type!r}") * cdef unique_ptr[fst.DeterminizeOptions] _opts */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3763, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_det_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3761, __pyx_L1_error) __pyx_t_3 = (!(fst::script::GetDeterminizeType(__pyx_t_1, (&__pyx_v__det_type)) != 0)); if (unlikely(__pyx_t_3)) { - /* "_pywrapfst.pyx":3764 + /* "_pywrapfst.pyx":3762 * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): * raise FstArgError(f"Unknown determinization type: {det_type!r}") # <<<<<<<<<<<<<< * cdef unique_ptr[fst.DeterminizeOptions] _opts * _opts.reset( */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3764, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_FstArgError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_det_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3764, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_det_type), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3764, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Unknown_determinization_type, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -53093,15 +53024,15 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3764, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3764, __pyx_L1_error) + __PYX_ERR(0, 3762, __pyx_L1_error) - /* "_pywrapfst.pyx":3763 + /* "_pywrapfst.pyx":3761 * weight) * cdef fst.DeterminizeType _det_type * if not fst.GetDeterminizeType(tostring(det_type), addr(_det_type)): # <<<<<<<<<<<<<< @@ -53110,7 +53041,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ } - /* "_pywrapfst.pyx":3766 + /* "_pywrapfst.pyx":3764 * raise FstArgError(f"Unknown determinization type: {det_type!r}") * cdef unique_ptr[fst.DeterminizeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -53119,7 +53050,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ __pyx_v__opts.reset(new fst::script::DeterminizeOptions(__pyx_v_delta, __pyx_v__weight, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v__det_type, __pyx_v_increment_subsequential_label)); - /* "_pywrapfst.pyx":3773 + /* "_pywrapfst.pyx":3771 * _det_type, * increment_subsequential_label)) * fst.Determinize(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -53128,11 +53059,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3773, __pyx_L1_error) + __PYX_ERR(0, 3771, __pyx_L1_error) } fst::script::Determinize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":3774 + /* "_pywrapfst.pyx":3772 * increment_subsequential_label)) * fst.Determinize(deref(ifst._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -53140,13 +53071,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_determiniz * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3774, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3718 + /* "_pywrapfst.pyx":3716 * * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< @@ -53215,7 +53146,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_det_type,&__pyx_n_s_nstate,&__pyx_n_s_subsequential_label,&__pyx_n_s_weight,&__pyx_n_s_increment_subsequential_label,0}; values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_functional)); - /* "_pywrapfst.pyx":3723 + /* "_pywrapfst.pyx":3721 * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, * weight=None, # <<<<<<<<<<<<<< @@ -53250,54 +53181,54 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_det_type); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_subsequential_label); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_increment_subsequential_label); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3718, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3716, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "determinize") < 0)) __PYX_ERR(0, 3718, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "determinize") < 0)) __PYX_ERR(0, 3716, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -53320,27 +53251,27 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3719, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3717, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__20; + __pyx_v_delta = __pyx_k__21; } __pyx_v_det_type = values[2]; if (values[3]) { - __pyx_v_nstate = __Pyx_PyInt_As_int64_t(values[3]); if (unlikely((__pyx_v_nstate == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3721, __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, 3719, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__21; + __pyx_v_nstate = __pyx_k__22; } 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, 3722, __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, 3720, __pyx_L3_error) } else { __pyx_v_subsequential_label = ((int64_t)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, 3724, __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, 3722, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":3724 + /* "_pywrapfst.pyx":3722 * int64_t subsequential_label=0, * weight=None, * bool increment_subsequential_label=False): # <<<<<<<<<<<<<< @@ -53352,7 +53283,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 3718, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("determinize", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 3716, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -53366,10 +53297,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3718, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3716, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_26determinize(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_det_type, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight, __pyx_v_increment_subsequential_label); - /* "_pywrapfst.pyx":3718 + /* "_pywrapfst.pyx":3716 * * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< @@ -53409,7 +53340,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26determinize(CYTHON_UNUSED PyObject *__p __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_10_pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3718, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_determinize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -53426,7 +53357,7 @@ static PyObject *__pyx_pf_10_pywrapfst_26determinize(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "_pywrapfst.pyx":3777 +/* "_pywrapfst.pyx":3775 * * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< @@ -53444,7 +53375,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_difference *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":3780 + /* "_pywrapfst.pyx":3778 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -53472,7 +53403,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference } } - /* "_pywrapfst.pyx":3805 + /* "_pywrapfst.pyx":3803 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -53481,22 +53412,22 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3805, __pyx_L1_error) + __PYX_ERR(0, 3803, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3803, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3809 + /* "_pywrapfst.pyx":3807 * _opts.reset( * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Difference(deref(ifst1._fst), * deref(ifst2._fst), */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3809, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3809, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3807, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3807, __pyx_L1_error) - /* "_pywrapfst.pyx":3807 + /* "_pywrapfst.pyx":3805 * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -53505,7 +53436,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference */ __pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "_pywrapfst.pyx":3810 + /* "_pywrapfst.pyx":3808 * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), # <<<<<<<<<<<<<< @@ -53514,10 +53445,10 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3810, __pyx_L1_error) + __PYX_ERR(0, 3808, __pyx_L1_error) } - /* "_pywrapfst.pyx":3811 + /* "_pywrapfst.pyx":3809 * _get_compose_filter(tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), * deref(ifst2._fst), # <<<<<<<<<<<<<< @@ -53526,10 +53457,10 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference */ if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3811, __pyx_L1_error) + __PYX_ERR(0, 3809, __pyx_L1_error) } - /* "_pywrapfst.pyx":3810 + /* "_pywrapfst.pyx":3808 * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Difference(deref(ifst1._fst), # <<<<<<<<<<<<<< @@ -53538,7 +53469,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference */ fst::script::Difference((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":3814 + /* "_pywrapfst.pyx":3812 * _tfst.get(), * deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -53546,13 +53477,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_difference * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3814, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3777 + /* "_pywrapfst.pyx":3775 * * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< @@ -53635,7 +53566,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -53643,28 +53574,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3777, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, 1); __PYX_ERR(0, 3775, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3777, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "difference") < 0)) __PYX_ERR(0, 3777, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "difference") < 0)) __PYX_ERR(0, 3775, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -53682,10 +53613,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3778, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":3780 + /* "_pywrapfst.pyx":3778 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -53697,7 +53628,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3777, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("difference", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3775, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -53711,11 +53642,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3777, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3778, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3775, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3776, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_28difference(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "_pywrapfst.pyx":3777 + /* "_pywrapfst.pyx":3775 * * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< @@ -53751,7 +53682,7 @@ static PyObject *__pyx_pf_10_pywrapfst_28difference(CYTHON_UNUSED PyObject *__py __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3777, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_difference(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -53768,7 +53699,7 @@ static PyObject *__pyx_pf_10_pywrapfst_28difference(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "_pywrapfst.pyx":3817 +/* "_pywrapfst.pyx":3815 * * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< @@ -53784,11 +53715,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambiguate(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_disambiguate *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__22; - int64_t __pyx_v_nstate = __pyx_k__23; + float __pyx_v_delta = __pyx_k__23; + int64_t __pyx_v_nstate = __pyx_k__24; int64_t __pyx_v_subsequential_label = ((int64_t)0); - /* "_pywrapfst.pyx":3821 + /* "_pywrapfst.pyx":3819 * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, * weight=None): # <<<<<<<<<<<<<< @@ -53823,7 +53754,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua } } - /* "_pywrapfst.pyx":3846 + /* "_pywrapfst.pyx":3844 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -53832,12 +53763,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3846, __pyx_L1_error) + __PYX_ERR(0, 3844, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3844, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3848 + /* "_pywrapfst.pyx":3846 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -53846,21 +53777,21 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 3848, __pyx_L1_error) + __PYX_ERR(0, 3846, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3848, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L1_error) - /* "_pywrapfst.pyx":3849 + /* "_pywrapfst.pyx":3847 * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.DisambiguateOptions] _opts * _opts.reset( */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3848, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3846, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":3851 + /* "_pywrapfst.pyx":3849 * weight) * cdef unique_ptr[fst.DisambiguateOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -53869,7 +53800,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua */ __pyx_v__opts.reset(new fst::script::DisambiguateOptions(__pyx_v_delta, __pyx_v__weight, __pyx_v_nstate, __pyx_v_subsequential_label)); - /* "_pywrapfst.pyx":3856 + /* "_pywrapfst.pyx":3854 * nstate, * subsequential_label)) * fst.Disambiguate(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -53878,11 +53809,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3856, __pyx_L1_error) + __PYX_ERR(0, 3854, __pyx_L1_error) } fst::script::Disambiguate((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":3857 + /* "_pywrapfst.pyx":3855 * subsequential_label)) * fst.Disambiguate(deref(ifst._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -53890,13 +53821,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_disambigua * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3857, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3817 + /* "_pywrapfst.pyx":3815 * * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< @@ -53959,7 +53890,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { 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}; - /* "_pywrapfst.pyx":3821 + /* "_pywrapfst.pyx":3819 * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, * weight=None): # <<<<<<<<<<<<<< @@ -53990,40 +53921,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_subsequential_label); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3817, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "disambiguate") < 0)) __PYX_ERR(0, 3815, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -54042,17 +53973,17 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3818, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3816, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__22; + __pyx_v_delta = __pyx_k__23; } 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, 3819, __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, 3817, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__23; + __pyx_v_nstate = __pyx_k__24; } 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, 3820, __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, 3818, __pyx_L3_error) } else { __pyx_v_subsequential_label = ((int64_t)0); } @@ -54060,7 +53991,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3817, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("disambiguate", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 3815, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -54074,10 +54005,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3817, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3815, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_30disambiguate(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_subsequential_label, __pyx_v_weight); - /* "_pywrapfst.pyx":3817 + /* "_pywrapfst.pyx":3815 * * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< @@ -54115,7 +54046,7 @@ static PyObject *__pyx_pf_10_pywrapfst_30disambiguate(CYTHON_UNUSED PyObject *__ __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_10_pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3817, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_disambiguate(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -54132,7 +54063,7 @@ static PyObject *__pyx_pf_10_pywrapfst_30disambiguate(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_pywrapfst.pyx":3860 +/* "_pywrapfst.pyx":3858 * * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type="input"): # <<<<<<<<<<<<<< @@ -54165,7 +54096,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_epsnormali } } - /* "_pywrapfst.pyx":3882 + /* "_pywrapfst.pyx":3880 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -54174,12 +54105,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_epsnormali */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3882, __pyx_L1_error) + __PYX_ERR(0, 3880, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3882, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3880, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3884 + /* "_pywrapfst.pyx":3882 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize( * deref(ifst._fst), # <<<<<<<<<<<<<< @@ -54188,20 +54119,20 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_epsnormali */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3884, __pyx_L1_error) + __PYX_ERR(0, 3882, __pyx_L1_error) } - /* "_pywrapfst.pyx":3886 + /* "_pywrapfst.pyx":3884 * deref(ifst._fst), * _tfst.get(), * _get_eps_norm_type(tostring(eps_norm_type))) # <<<<<<<<<<<<<< * return _init_MutableFst(_tfst.release()) * */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_eps_norm_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3886, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_eps_norm_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3886, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_eps_norm_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3884, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_eps_norm_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3884, __pyx_L1_error) - /* "_pywrapfst.pyx":3883 + /* "_pywrapfst.pyx":3881 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.EpsNormalize( # <<<<<<<<<<<<<< @@ -54210,7 +54141,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_epsnormali */ fst::script::EpsNormalize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_t_2); - /* "_pywrapfst.pyx":3887 + /* "_pywrapfst.pyx":3885 * _tfst.get(), * _get_eps_norm_type(tostring(eps_norm_type))) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -54218,13 +54149,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_epsnormali * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3887, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3860 + /* "_pywrapfst.pyx":3858 * * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type="input"): # <<<<<<<<<<<<<< @@ -54301,19 +54232,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3860, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3858, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_eps_norm_type); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3860, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3858, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3860, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "epsnormalize") < 0)) __PYX_ERR(0, 3858, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -54329,7 +54260,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3860, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("epsnormalize", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3858, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -54343,7 +54274,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3860, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3858, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_32epsnormalize(__pyx_self, __pyx_v_ifst, __pyx_v_eps_norm_type); /* function exit code */ @@ -54373,7 +54304,7 @@ static PyObject *__pyx_pf_10_pywrapfst_32epsnormalize(CYTHON_UNUSED PyObject *__ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.eps_norm_type = __pyx_v_eps_norm_type; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3860, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_epsnormalize(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -54390,7 +54321,7 @@ static PyObject *__pyx_pf_10_pywrapfst_32epsnormalize(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_pywrapfst.pyx":3890 +/* "_pywrapfst.pyx":3888 * * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -54406,7 +54337,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static bool __pyx_f_10_pywrapfst_equal(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_equal *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__24; + float __pyx_v_delta = __pyx_k__25; bool __pyx_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -54417,7 +54348,7 @@ static bool __pyx_f_10_pywrapfst_equal(struct __pyx_obj_10_pywrapfst_Fst *__pyx_ } } - /* "_pywrapfst.pyx":3908 + /* "_pywrapfst.pyx":3906 * True if the FSTs satisfy the above condition, else False. * """ * return fst.Equal(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< @@ -54426,16 +54357,16 @@ static bool __pyx_f_10_pywrapfst_equal(struct __pyx_obj_10_pywrapfst_Fst *__pyx_ */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3908, __pyx_L1_error) + __PYX_ERR(0, 3906, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3908, __pyx_L1_error) + __PYX_ERR(0, 3906, __pyx_L1_error) } __pyx_r = fst::script::Equal((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); goto __pyx_L0; - /* "_pywrapfst.pyx":3890 + /* "_pywrapfst.pyx":3888 * * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -54511,7 +54442,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -54519,21 +54450,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3890, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, 1); __PYX_ERR(0, 3888, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equal") < 0)) __PYX_ERR(0, 3890, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equal") < 0)) __PYX_ERR(0, 3888, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -54548,14 +54479,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst1 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_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, 3890, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__24; + __pyx_v_delta = __pyx_k__25; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3890, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equal", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3888, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -54569,8 +54500,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3890, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3890, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3888, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3888, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_34equal(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -54601,8 +54532,8 @@ static PyObject *__pyx_pf_10_pywrapfst_34equal(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; - __pyx_t_1 = __pyx_f_10_pywrapfst_equal(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_equal(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -54619,10 +54550,10 @@ static PyObject *__pyx_pf_10_pywrapfst_34equal(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "_pywrapfst.pyx":3911 +/* "_pywrapfst.pyx":3909 * * - * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< + * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< * """ * equivalent(ifst1, ifst2, delta=0.0009765625) */ @@ -54635,48 +54566,149 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static bool __pyx_f_10_pywrapfst_equivalent(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_equivalent *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__25; + float __pyx_v_delta = __pyx_k__26; + bool __pyx_v_err; + bool __pyx_v_is_equiv; bool __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("equivalent", 1); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_delta = __pyx_optional_args->delta; } } - /* "_pywrapfst.pyx":3929 - * True if the FSTs satisfy the above condition, else False. + /* "_pywrapfst.pyx":3930 + * FstOpError: Some precondition of the argument FSTs does not hold. * """ - * return fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< - * - * + * cdef bool err = False # <<<<<<<<<<<<<< + * is_equiv = fst.Equivalent(deref(ifst1._fst), + * deref(ifst2._fst), + */ + __pyx_v_err = 0; + + /* "_pywrapfst.pyx":3931 + * """ + * cdef bool err = False + * is_equiv = fst.Equivalent(deref(ifst1._fst), # <<<<<<<<<<<<<< + * deref(ifst2._fst), + * delta, addr(err)) */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3929, __pyx_L1_error) + __PYX_ERR(0, 3931, __pyx_L1_error) } + + /* "_pywrapfst.pyx":3932 + * cdef bool err = False + * is_equiv = fst.Equivalent(deref(ifst1._fst), + * deref(ifst2._fst), # <<<<<<<<<<<<<< + * delta, addr(err)) + * if err: + */ if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3929, __pyx_L1_error) + __PYX_ERR(0, 3932, __pyx_L1_error) + } + + /* "_pywrapfst.pyx":3931 + * """ + * cdef bool err = False + * is_equiv = fst.Equivalent(deref(ifst1._fst), # <<<<<<<<<<<<<< + * deref(ifst2._fst), + * delta, addr(err)) + */ + __pyx_v_is_equiv = fst::script::Equivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta, (&__pyx_v_err)); + + /* "_pywrapfst.pyx":3934 + * deref(ifst2._fst), + * delta, addr(err)) + * if err: # <<<<<<<<<<<<<< + * raise FstOpError("Argument FST did not satisfy preconditions") + * return is_equiv + */ + __pyx_t_1 = (__pyx_v_err != 0); + if (unlikely(__pyx_t_1)) { + + /* "_pywrapfst.pyx":3935 + * delta, addr(err)) + * if err: + * raise FstOpError("Argument FST did not satisfy preconditions") # <<<<<<<<<<<<<< + * return is_equiv + * + */ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstOpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + __pyx_t_5 = 0; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_5 = 1; + } + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Argument_FST_did_not_satisfy_pre}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3935, __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, 3935, __pyx_L1_error) + + /* "_pywrapfst.pyx":3934 + * deref(ifst2._fst), + * delta, addr(err)) + * if err: # <<<<<<<<<<<<<< + * raise FstOpError("Argument FST did not satisfy preconditions") + * return is_equiv + */ } - __pyx_r = fst::script::Equivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); + + /* "_pywrapfst.pyx":3936 + * if err: + * raise FstOpError("Argument FST did not satisfy preconditions") + * return is_equiv # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = __pyx_v_is_equiv; goto __pyx_L0; - /* "_pywrapfst.pyx":3911 + /* "_pywrapfst.pyx":3909 * * - * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< + * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< * """ * equivalent(ifst1, ifst2, delta=0.0009765625) */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("_pywrapfst.equivalent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; + __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -54688,7 +54720,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_36equivalent, "\n equivalent(ifst1, ifst2, delta=0.0009765625)\n\n Are the two acceptors equivalent?\n\n This operation tests whether two epsilon-free deterministic weighted\n acceptors are equivalent, that is if they accept the same strings with the\n same weights.\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n delta: Comparison/quantization delta.\n\n Returns:\n True if the FSTs satisfy the above condition, else False.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_36equivalent, "\n equivalent(ifst1, ifst2, delta=0.0009765625)\n\n Are the two acceptors equivalent?\n\n This operation tests whether two epsilon-free deterministic weighted\n acceptors are equivalent, that is if they accept the same strings with the\n same weights.\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n delta: Comparison/quantization delta.\n\n Returns:\n True if the FSTs satisfy the above condition, else False.\n\n Raises:\n FstOpError: Some precondition of the argument FSTs does not hold.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_37equivalent = {"equivalent", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_37equivalent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_36equivalent}; static PyObject *__pyx_pw_10_pywrapfst_37equivalent(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -54740,7 +54772,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3911, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3909, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -54748,21 +54780,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3911, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3909, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3911, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, 1); __PYX_ERR(0, 3909, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3911, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3909, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equivalent") < 0)) __PYX_ERR(0, 3911, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "equivalent") < 0)) __PYX_ERR(0, 3909, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -54777,14 +54809,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst1 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_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, 3911, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3909, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__25; + __pyx_v_delta = __pyx_k__26; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3911, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("equivalent", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3909, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -54798,8 +54830,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3911, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3911, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3909, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3909, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_36equivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -54830,8 +54862,8 @@ static PyObject *__pyx_pf_10_pywrapfst_36equivalent(CYTHON_UNUSED PyObject *__py __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; - __pyx_t_1 = __pyx_f_10_pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3911, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_equivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3909, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -54848,7 +54880,7 @@ static PyObject *__pyx_pf_10_pywrapfst_36equivalent(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "_pywrapfst.pyx":3932 +/* "_pywrapfst.pyx":3939 * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< @@ -54866,7 +54898,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_intersect *__pyx_optional_args) { PyObject *__pyx_v_compose_filter = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":3935 + /* "_pywrapfst.pyx":3942 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -54894,7 +54926,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect( } } - /* "_pywrapfst.pyx":3958 + /* "_pywrapfst.pyx":3965 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) # <<<<<<<<<<<<<< @@ -54903,22 +54935,22 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect( */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 3958, __pyx_L1_error) + __PYX_ERR(0, 3965, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3958, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst1->__pyx_vtab)->arc_type(__pyx_v_ifst1, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3965, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":3962 + /* "_pywrapfst.pyx":3969 * _opts.reset( * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) # <<<<<<<<<<<<<< * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3962, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3962, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_compose_filter); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3969, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_compose_filter(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3969, __pyx_L1_error) - /* "_pywrapfst.pyx":3960 + /* "_pywrapfst.pyx":3967 * _tfst.reset(new fst.VectorFstClass(ifst1.arc_type())) * cdef unique_ptr[fst.ComposeOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -54927,7 +54959,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect( */ __pyx_v__opts.reset(new fst::ComposeOptions(__pyx_v_connect, __pyx_t_2)); - /* "_pywrapfst.pyx":3963 + /* "_pywrapfst.pyx":3970 * new fst.ComposeOptions(connect, * _get_compose_filter(tostring(compose_filter)))) * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -54936,15 +54968,15 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect( */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3963, __pyx_L1_error) + __PYX_ERR(0, 3970, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3963, __pyx_L1_error) + __PYX_ERR(0, 3970, __pyx_L1_error) } fst::script::Intersect((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":3964 + /* "_pywrapfst.pyx":3971 * _get_compose_filter(tostring(compose_filter)))) * fst.Intersect(deref(ifst1._fst), deref(ifst2._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -54952,13 +54984,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_intersect( * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3964, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3932 + /* "_pywrapfst.pyx":3939 * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< @@ -55041,7 +55073,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3932, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -55049,28 +55081,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3932, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3932, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, 1); __PYX_ERR(0, 3939, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_compose_filter); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3932, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connect); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3932, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3939, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "intersect") < 0)) __PYX_ERR(0, 3932, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "intersect") < 0)) __PYX_ERR(0, 3939, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -55088,10 +55120,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[1]); __pyx_v_compose_filter = values[2]; if (values[3]) { - __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3935, __pyx_L3_error) + __pyx_v_connect = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_connect == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3942, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":3935 + /* "_pywrapfst.pyx":3942 * Fst ifst2, * compose_filter="auto", * bool connect=True): # <<<<<<<<<<<<<< @@ -55103,7 +55135,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3932, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("intersect", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3939, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -55117,11 +55149,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3932, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3933, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3939, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3940, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_38intersect(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_compose_filter, __pyx_v_connect); - /* "_pywrapfst.pyx":3932 + /* "_pywrapfst.pyx":3939 * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< @@ -55157,7 +55189,7 @@ static PyObject *__pyx_pf_10_pywrapfst_38intersect(CYTHON_UNUSED PyObject *__pyx __pyx_t_2.__pyx_n = 2; __pyx_t_2.compose_filter = __pyx_v_compose_filter; __pyx_t_2.connect = __pyx_v_connect; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3932, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_intersect(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -55174,7 +55206,7 @@ static PyObject *__pyx_pf_10_pywrapfst_38intersect(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "_pywrapfst.pyx":3967 +/* "_pywrapfst.pyx":3974 * * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -55190,7 +55222,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static bool __pyx_f_10_pywrapfst_isomorphic(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_isomorphic *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__26; + float __pyx_v_delta = __pyx_k__27; bool __pyx_r; int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -55201,7 +55233,7 @@ static bool __pyx_f_10_pywrapfst_isomorphic(struct __pyx_obj_10_pywrapfst_Fst *_ } } - /* "_pywrapfst.pyx":3988 + /* "_pywrapfst.pyx":3995 * True if the two transducers satisfy the above condition, else False. * """ * return fst.Isomorphic(deref(ifst1._fst), deref(ifst2._fst), delta) # <<<<<<<<<<<<<< @@ -55210,16 +55242,16 @@ static bool __pyx_f_10_pywrapfst_isomorphic(struct __pyx_obj_10_pywrapfst_Fst *_ */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3988, __pyx_L1_error) + __PYX_ERR(0, 3995, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 3988, __pyx_L1_error) + __PYX_ERR(0, 3995, __pyx_L1_error) } __pyx_r = fst::script::Isomorphic((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_delta); goto __pyx_L0; - /* "_pywrapfst.pyx":3967 + /* "_pywrapfst.pyx":3974 * * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< @@ -55295,7 +55327,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3967, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -55303,21 +55335,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3967, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3967, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, 1); __PYX_ERR(0, 3974, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3967, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3967, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "isomorphic") < 0)) __PYX_ERR(0, 3974, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -55332,14 +55364,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst1 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_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, 3967, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__26; + __pyx_v_delta = __pyx_k__27; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3967, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("isomorphic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 3974, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -55353,8 +55385,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3967, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3967, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 3974, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 3974, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_40isomorphic(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_delta); /* function exit code */ @@ -55385,8 +55417,8 @@ static PyObject *__pyx_pf_10_pywrapfst_40isomorphic(CYTHON_UNUSED PyObject *__py __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.delta = __pyx_v_delta; - __pyx_t_1 = __pyx_f_10_pywrapfst_isomorphic(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3967, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3967, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_isomorphic(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 3974, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -55403,7 +55435,7 @@ static PyObject *__pyx_pf_10_pywrapfst_40isomorphic(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "_pywrapfst.pyx":3991 +/* "_pywrapfst.pyx":3998 * * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< @@ -55419,10 +55451,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_prune *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__27; - int64_t __pyx_v_nstate = __pyx_k__28; + float __pyx_v_delta = __pyx_k__28; + int64_t __pyx_v_nstate = __pyx_k__29; - /* "_pywrapfst.pyx":3994 + /* "_pywrapfst.pyx":4001 * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -55453,7 +55485,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(stru } } - /* "_pywrapfst.pyx":4016 + /* "_pywrapfst.pyx":4023 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -55462,12 +55494,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(stru */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4016, __pyx_L1_error) + __PYX_ERR(0, 4023, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4016, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4017 + /* "_pywrapfst.pyx":4024 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -55476,21 +55508,21 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(stru */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 4017, __pyx_L1_error) + __PYX_ERR(0, 4024, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4017, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4024, __pyx_L1_error) - /* "_pywrapfst.pyx":4018 + /* "_pywrapfst.pyx":4025 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta) * return _init_MutableFst(_tfst.release()) */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4017, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4024, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":4019 + /* "_pywrapfst.pyx":4026 * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), * weight) * fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta) # <<<<<<<<<<<<<< @@ -55499,11 +55531,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(stru */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4019, __pyx_L1_error) + __PYX_ERR(0, 4026, __pyx_L1_error) } fst::script::Prune((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v__weight, __pyx_v_nstate, __pyx_v_delta); - /* "_pywrapfst.pyx":4020 + /* "_pywrapfst.pyx":4027 * weight) * fst.Prune(deref(ifst._fst), _tfst.get(), _weight, nstate, delta) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -55511,13 +55543,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_prune(stru * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4020, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":3991 + /* "_pywrapfst.pyx":3998 * * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< @@ -55579,7 +55611,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nstate,&__pyx_n_s_weight,0}; - /* "_pywrapfst.pyx":3994 + /* "_pywrapfst.pyx":4001 * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, * weight=None): # <<<<<<<<<<<<<< @@ -55608,33 +55640,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3991, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3998, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3991, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3998, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3991, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3998, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3991, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3998, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prune") < 0)) __PYX_ERR(0, 3991, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "prune") < 0)) __PYX_ERR(0, 3998, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -55651,20 +55683,20 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 3992, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 3999, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__27; + __pyx_v_delta = __pyx_k__28; } 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, 3993, __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, 4000, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__28; + __pyx_v_nstate = __pyx_k__29; } __pyx_v_weight = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3991, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("prune", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 3998, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -55678,10 +55710,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3991, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 3998, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_42prune(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_weight); - /* "_pywrapfst.pyx":3991 + /* "_pywrapfst.pyx":3998 * * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< @@ -55718,7 +55750,7 @@ static PyObject *__pyx_pf_10_pywrapfst_42prune(CYTHON_UNUSED PyObject *__pyx_sel __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_10_pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_prune(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -55735,7 +55767,7 @@ static PyObject *__pyx_pf_10_pywrapfst_42prune(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "_pywrapfst.pyx":4023 +/* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< @@ -55751,9 +55783,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_push *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__29; + float __pyx_v_delta = __pyx_k__30; - /* "_pywrapfst.pyx":4025 + /* "_pywrapfst.pyx":4032 * cpdef MutableFst push(Fst ifst, * float delta=fst.kDelta, * bool push_weights=False, # <<<<<<<<<<<<<< @@ -55762,7 +55794,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc */ bool __pyx_v_push_weights = ((bool)0); - /* "_pywrapfst.pyx":4026 + /* "_pywrapfst.pyx":4033 * float delta=fst.kDelta, * bool push_weights=False, * bool push_labels=False, # <<<<<<<<<<<<<< @@ -55771,7 +55803,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc */ bool __pyx_v_push_labels = ((bool)0); - /* "_pywrapfst.pyx":4027 + /* "_pywrapfst.pyx":4034 * bool push_weights=False, * bool push_labels=False, * bool remove_common_affix=False, # <<<<<<<<<<<<<< @@ -55780,7 +55812,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc */ bool __pyx_v_remove_common_affix = ((bool)0); - /* "_pywrapfst.pyx":4028 + /* "_pywrapfst.pyx":4035 * bool push_labels=False, * bool remove_common_affix=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -55821,7 +55853,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc } } - /* "_pywrapfst.pyx":4067 + /* "_pywrapfst.pyx":4075 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -55830,52 +55862,52 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4067, __pyx_L1_error) + __PYX_ERR(0, 4075, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4067, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4068 + /* "_pywrapfst.pyx":4076 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * cdef uint8_t flags = fst.GetPushFlags(push_weights, # <<<<<<<<<<<<<< * push_labels, - * remove_common_affix, + * remove_total_weight, */ - __pyx_v_flags = fst::script::GetPushFlags(__pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight); + __pyx_v_flags = fst::script::GetPushFlags(__pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_total_weight, __pyx_v_remove_common_affix); - /* "_pywrapfst.pyx":4072 - * remove_common_affix, - * remove_total_weight) + /* "_pywrapfst.pyx":4080 + * remove_total_weight, + * remove_common_affix) * fst.Push(deref(ifst._fst), # <<<<<<<<<<<<<< * _tfst.get(), * flags, */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4072, __pyx_L1_error) + __PYX_ERR(0, 4080, __pyx_L1_error) } - /* "_pywrapfst.pyx":4075 + /* "_pywrapfst.pyx":4083 * _tfst.get(), * flags, * _get_reweight_type(tostring(reweight_type)), # <<<<<<<<<<<<<< * delta) * return _init_MutableFst(_tfst.release()) */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4075, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_reweight_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4083, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_reweight_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4083, __pyx_L1_error) - /* "_pywrapfst.pyx":4072 - * remove_common_affix, - * remove_total_weight) + /* "_pywrapfst.pyx":4080 + * remove_total_weight, + * remove_common_affix) * fst.Push(deref(ifst._fst), # <<<<<<<<<<<<<< * _tfst.get(), * flags, */ fst::script::Push((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v_flags, __pyx_t_2, __pyx_v_delta); - /* "_pywrapfst.pyx":4077 + /* "_pywrapfst.pyx":4085 * _get_reweight_type(tostring(reweight_type)), * delta) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -55883,13 +55915,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_push(struc * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4077, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4023 + /* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< @@ -55916,7 +55948,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_44push, "\n push(ifst, delta=0.0009765625, push_weights=False, push_labels=False,\n remove_common_affix=False, remove_total_weight=False, reweight_type=\"to_initial\")\n\n Constructively pushes weights/labels towards initial or final states.\n\n This operation produces an equivalent transducer by pushing the weights\n and/or the labels towards the initial state or toward the final states.\n\n When pushing weights towards the initial state, the sum of the weight of the\n outgoing transitions and final weight at any non-initial state is equal to 1\n in the resulting machine. When pushing weights towards the final states, the\n sum of the weight of the incoming transitions at any state is equal to 1.\n Weights need to be left distributive when pushing towards the initial state\n and right distributive when pushing towards the final states.\n\n Pushing labels towards the initial state consists in minimizing at every\n state the length of the longest common prefix of the output labels of the\n outgoing paths. Pushing labels towards the final states consists in\n minimizing at every state the length of the longest common suffix of the\n output labels of the incoming paths.\n\n Args:\n ifst: The input FST.\n delta: Comparison/quantization delta.\n push_weights: Should weights be pushed?\n push_labels: Should labels be pushed?\n remove_common_affix: If pushing labels, should common prefix/suffix be\n removed?\n remove_total_weight: If pushing weights, should total weight be removed?\n reweight_type: Push towards initial or final states?: a string matching a\n known reweight type: one of \"to_initial\", \"to_final\"\n\n Returns:\n An equivalent pushed FST.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_44push, "\n push(ifst, delta=0.0009765625, push_weights=False, push_labels=False,\n remove_common_affix=False, remove_total_weight=False,\n reweight_type=\"to_initial\")\n\n Constructively pushes weights/labels towards initial or final states.\n\n This operation produces an equivalent transducer by pushing the weights\n and/or the labels towards the initial state or toward the final states.\n\n When pushing weights towards the initial state, the sum of the weight of the\n outgoing transitions and final weight at any non-initial state is equal to 1\n in the resulting machine. When pushing weights towards the final states, the\n sum of the weight of the incoming transitions at any state is equal to 1.\n Weights need to be left distributive when pushing towards the initial state\n and right distributive when pushing towards the final states.\n\n Pushing labels towards the initial state consists in minimizing at every\n state the length of the longest common prefix of the output labels of the\n outgoing paths. Pushing labels towards the final states consists in\n minimizing at every state the length of the longest common suffix of the\n output labels of the incoming paths.\n\n Args:\n ifst: The input FST.\n delta: Comparison/quantization delta.\n push_weights: Should weights be pushed?\n push_labels: Should labels be pushed?\n remove_common_affix: If pushing labels, should common prefix/suffix be\n removed?\n remove_total_weight: If pushing weights, should total weight be removed?\n reweight_type: Push towards initial or final states?: a string matching a\n known reweight type: one of \"to_initial\", \"to_final\"\n\n Returns:\n An equivalent pushed FST.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_45push = {"push", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_45push, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_44push}; static PyObject *__pyx_pw_10_pywrapfst_45push(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -55981,54 +56013,54 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_push_weights); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_push_labels); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_common_affix); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_total_weight); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reweight_type); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4023, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4030, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "push") < 0)) __PYX_ERR(0, 4023, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "push") < 0)) __PYX_ERR(0, 4030, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -56051,15 +56083,15 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 4024, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4031, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__29; + __pyx_v_delta = __pyx_k__30; } 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, 4025, __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, 4032, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4025 + /* "_pywrapfst.pyx":4032 * cpdef MutableFst push(Fst ifst, * float delta=fst.kDelta, * bool push_weights=False, # <<<<<<<<<<<<<< @@ -56069,10 +56101,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 4026, __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, 4033, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4026 + /* "_pywrapfst.pyx":4033 * float delta=fst.kDelta, * bool push_weights=False, * bool push_labels=False, # <<<<<<<<<<<<<< @@ -56082,10 +56114,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 4027, __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, 4034, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4027 + /* "_pywrapfst.pyx":4034 * bool push_weights=False, * bool push_labels=False, * bool remove_common_affix=False, # <<<<<<<<<<<<<< @@ -56095,10 +56127,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 4028, __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, 4035, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4028 + /* "_pywrapfst.pyx":4035 * bool push_labels=False, * bool remove_common_affix=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< @@ -56111,7 +56143,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4023, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("push", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4030, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -56125,10 +56157,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4023, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4030, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_44push(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_push_weights, __pyx_v_push_labels, __pyx_v_remove_common_affix, __pyx_v_remove_total_weight, __pyx_v_reweight_type); - /* "_pywrapfst.pyx":4023 + /* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< @@ -56168,7 +56200,7 @@ static PyObject *__pyx_pf_10_pywrapfst_44push(CYTHON_UNUSED PyObject *__pyx_self __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.reweight_type = __pyx_v_reweight_type; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4023, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_push(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -56185,7 +56217,7 @@ static PyObject *__pyx_pf_10_pywrapfst_44push(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "_pywrapfst.pyx":4080 +/* "_pywrapfst.pyx":4088 * * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< @@ -56202,16 +56234,16 @@ PyObject *__pyx_args, PyObject *__pyx_kwds ); /*proto*/ static bool __pyx_f_10_pywrapfst_randequivalent(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst1, struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst2, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_randequivalent *__pyx_optional_args) { int32_t __pyx_v_npath = ((int32_t)1); - float __pyx_v_delta = __pyx_k__30; + float __pyx_v_delta = __pyx_k__31; PyObject *__pyx_v_select = ((PyObject *)__pyx_n_u_uniform); - int32_t __pyx_v_max_length = __pyx_k__31; - uint64_t __pyx_v_seed = ((uint64_t)0); + int32_t __pyx_v_max_length = __pyx_k__32; + uint64_t __pyx_v_seed = __pyx_k__33; fst::script::RandArcSelection __pyx_v__select; std::unique_ptr > __pyx_v__opts; + uint64_t __pyx_v__seed; bool __pyx_r; std::string __pyx_t_1; fst::script::RandArcSelection __pyx_t_2; - int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -56233,18 +56265,18 @@ static bool __pyx_f_10_pywrapfst_randequivalent(struct __pyx_obj_10_pywrapfst_Fs } } - /* "_pywrapfst.pyx":4113 + /* "_pywrapfst.pyx":4121 * True if the two transducers satisfy the above condition, else False. * """ * cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts * # The three trailing options will be ignored by RandEquivalent. */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4113, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4113, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4121, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4121, __pyx_L1_error) __pyx_v__select = __pyx_t_2; - /* "_pywrapfst.pyx":4116 + /* "_pywrapfst.pyx":4124 * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts * # The three trailing options will be ignored by RandEquivalent. * _opts.reset( # <<<<<<<<<<<<<< @@ -56253,48 +56285,29 @@ static bool __pyx_f_10_pywrapfst_randequivalent(struct __pyx_obj_10_pywrapfst_Fs */ __pyx_v__opts.reset(new fst::RandGenOptions (__pyx_v__select, __pyx_v_max_length, 1, 0, 0)); - /* "_pywrapfst.pyx":4122 + /* "_pywrapfst.pyx":4130 * False, * False)) - * if seed == 0: # <<<<<<<<<<<<<< - * seed = time(NULL) - * return fst.RandEquivalent(deref(ifst1._fst), - */ - __pyx_t_3 = (__pyx_v_seed == 0); - if (__pyx_t_3) { - - /* "_pywrapfst.pyx":4123 - * False)) - * if seed == 0: - * seed = time(NULL) # <<<<<<<<<<<<<< + * cdef uint64_t _seed = fst.GetSeed(seed) # <<<<<<<<<<<<<< * return fst.RandEquivalent(deref(ifst1._fst), * deref(ifst2._fst), */ - __pyx_v_seed = time(NULL); + __pyx_v__seed = fst::script::GetSeed(__pyx_v_seed); - /* "_pywrapfst.pyx":4122 - * False, + /* "_pywrapfst.pyx":4131 * False)) - * if seed == 0: # <<<<<<<<<<<<<< - * seed = time(NULL) - * return fst.RandEquivalent(deref(ifst1._fst), - */ - } - - /* "_pywrapfst.pyx":4124 - * if seed == 0: - * seed = time(NULL) + * cdef uint64_t _seed = fst.GetSeed(seed) * return fst.RandEquivalent(deref(ifst1._fst), # <<<<<<<<<<<<<< * deref(ifst2._fst), * npath, */ if (unlikely(((PyObject *)__pyx_v_ifst1) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4124, __pyx_L1_error) + __PYX_ERR(0, 4131, __pyx_L1_error) } - /* "_pywrapfst.pyx":4125 - * seed = time(NULL) + /* "_pywrapfst.pyx":4132 + * cdef uint64_t _seed = fst.GetSeed(seed) * return fst.RandEquivalent(deref(ifst1._fst), * deref(ifst2._fst), # <<<<<<<<<<<<<< * npath, @@ -56302,20 +56315,20 @@ static bool __pyx_f_10_pywrapfst_randequivalent(struct __pyx_obj_10_pywrapfst_Fs */ if (unlikely(((PyObject *)__pyx_v_ifst2) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4125, __pyx_L1_error) + __PYX_ERR(0, 4132, __pyx_L1_error) } - /* "_pywrapfst.pyx":4124 - * if seed == 0: - * seed = time(NULL) + /* "_pywrapfst.pyx":4131 + * False)) + * cdef uint64_t _seed = fst.GetSeed(seed) * return fst.RandEquivalent(deref(ifst1._fst), # <<<<<<<<<<<<<< * deref(ifst2._fst), * npath, */ - __pyx_r = fst::script::RandEquivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_npath, (*__pyx_v__opts), __pyx_v_delta, __pyx_v_seed); + __pyx_r = fst::script::RandEquivalent((*__pyx_v_ifst1->_fst), (*__pyx_v_ifst2->_fst), __pyx_v_npath, (*__pyx_v__opts), __pyx_v_delta, __pyx_v__seed); goto __pyx_L0; - /* "_pywrapfst.pyx":4080 + /* "_pywrapfst.pyx":4088 * * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< @@ -56339,7 +56352,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_46randequivalent, "\n randequivalent(ifst1, ifst2, npath=1, delta=0.0009765625, select=\"uniform\",\n max_length=2147483647, seed=0)\n\n Are two acceptors stochastically equivalent?\n\n This operation tests whether two FSTs are equivalent by randomly generating\n paths alternatively in each of the two FSTs. For each randomly generated path,\n the algorithm computes for each of the two FSTs the sum of the weights of all\n the successful paths sharing the same input and output labels as the randomly\n generated path and checks that these two values are within `delta`.\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n npath: The number of random paths to generate.\n delta: Comparison/quantization delta.\n seed: An optional seed value for random path generation; if zero, the\n current time and process ID is used.\n select: A string matching a known random arc selection type; one of:\n \"uniform\", \"log_prob\", \"fast_log_prob\".\n max_length: The maximum length of each random path.\n\n Returns:\n True if the two transducers satisfy the above condition, else False.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_46randequivalent, "\n randequivalent(ifst1, ifst2, npath=1, delta=0.0009765625, select=\"uniform\",\n max_length=2147483647, seed=-1)\n\n Are two acceptors stochastically equivalent?\n\n This operation tests whether two FSTs are equivalent by randomly generating\n paths alternatively in each of the two FSTs. For each randomly generated path,\n the algorithm computes for each of the two FSTs the sum of the weights of all\n the successful paths sharing the same input and output labels as the randomly\n generated path and checks that these two values are within `delta`.\n\n Args:\n ifst1: The first input FST.\n ifst2: The second input FST.\n npath: The number of random paths to generate.\n delta: Comparison/quantization delta.\n seed: An optional seed value for random path generation; if not specified,\n the current time is used.\n select: A string matching a known random arc selection type; one of:\n \"uniform\", \"log_prob\", \"fast_log_prob\".\n max_length: The maximum length of each random path.\n\n Returns:\n True if the two transducers satisfy the above condition, else False.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_47randequivalent = {"randequivalent", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_47randequivalent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_46randequivalent}; static PyObject *__pyx_pw_10_pywrapfst_47randequivalent(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -56404,7 +56417,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -56412,49 +56425,49 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 4080, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, 1); __PYX_ERR(0, 4088, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_npath); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_select); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_length); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seed); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "randequivalent") < 0)) __PYX_ERR(0, 4080, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "randequivalent") < 0)) __PYX_ERR(0, 4088, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -56477,30 +56490,30 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_ifst1 = ((struct __pyx_obj_10_pywrapfst_Fst *)values[0]); __pyx_v_ifst2 = ((struct __pyx_obj_10_pywrapfst_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, 4082, __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, 4090, __pyx_L3_error) } else { __pyx_v_npath = ((int32_t)1); } if (values[3]) { - __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4083, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4091, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__30; + __pyx_v_delta = __pyx_k__31; } __pyx_v_select = values[4]; if (values[5]) { - __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[5]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4085, __pyx_L3_error) + __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[5]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4093, __pyx_L3_error) } else { - __pyx_v_max_length = __pyx_k__31; + __pyx_v_max_length = __pyx_k__32; } if (values[6]) { - __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4086, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4094, __pyx_L3_error) } else { - __pyx_v_seed = ((uint64_t)0); + __pyx_v_seed = __pyx_k__33; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, __pyx_nargs); __PYX_ERR(0, 4080, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randequivalent", 0, 2, 7, __pyx_nargs); __PYX_ERR(0, 4088, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -56514,8 +56527,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 4080, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 4081, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst1), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst1", 0))) __PYX_ERR(0, 4088, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst2), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst2", 0))) __PYX_ERR(0, 4089, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_46randequivalent(__pyx_self, __pyx_v_ifst1, __pyx_v_ifst2, __pyx_v_npath, __pyx_v_delta, __pyx_v_select, __pyx_v_max_length, __pyx_v_seed); /* function exit code */ @@ -56550,8 +56563,8 @@ static PyObject *__pyx_pf_10_pywrapfst_46randequivalent(CYTHON_UNUSED PyObject * __pyx_t_2.select = __pyx_v_select; __pyx_t_2.max_length = __pyx_v_max_length; __pyx_t_2.seed = __pyx_v_seed; - __pyx_t_1 = __pyx_f_10_pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 4080, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4080, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_randequivalent(__pyx_v_ifst1, __pyx_v_ifst2, 0, &__pyx_t_2); if (unlikely(__pyx_t_1 == ((bool)-1) && PyErr_Occurred())) __PYX_ERR(0, 4088, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -56568,7 +56581,7 @@ static PyObject *__pyx_pf_10_pywrapfst_46randequivalent(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "_pywrapfst.pyx":4132 +/* "_pywrapfst.pyx":4139 * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< @@ -56586,35 +56599,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_randgen(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_randgen *__pyx_optional_args) { int32_t __pyx_v_npath = ((int32_t)1); PyObject *__pyx_v_select = ((PyObject *)__pyx_n_u_uniform); - int32_t __pyx_v_max_length = __pyx_k__32; + int32_t __pyx_v_max_length = __pyx_k__34; - /* "_pywrapfst.pyx":4136 + /* "_pywrapfst.pyx":4143 * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), * bool weighted=False, # <<<<<<<<<<<<<< * bool remove_total_weight=False, - * uint64_t seed=0): + * uint64_t seed=fst.kDefaultSeed): */ bool __pyx_v_weighted = ((bool)0); - /* "_pywrapfst.pyx":4137 + /* "_pywrapfst.pyx":4144 * int32_t max_length=numeric_limits[int32_t].max(), * bool weighted=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< - * uint64_t seed=0): + * uint64_t seed=fst.kDefaultSeed): * """ */ bool __pyx_v_remove_total_weight = ((bool)0); - uint64_t __pyx_v_seed = ((uint64_t)0); + uint64_t __pyx_v_seed = __pyx_k__35; fst::script::RandArcSelection __pyx_v__select; std::unique_ptr > __pyx_v__opts; std::unique_ptr __pyx_v__tfst; + uint64_t __pyx_v__seed; struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_r = NULL; __Pyx_RefNannyDeclarations std::string __pyx_t_1; fst::script::RandArcSelection __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -56640,18 +56653,18 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_randgen(st } } - /* "_pywrapfst.pyx":4168 + /* "_pywrapfst.pyx":4175 * An FST containing one or more random paths. * """ * cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select)) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts * _opts.reset( */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4168, __pyx_L1_error) - __pyx_t_2 = __pyx_f_10_pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4168, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_select); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_rand_arc_selection(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4175, __pyx_L1_error) __pyx_v__select = __pyx_t_2; - /* "_pywrapfst.pyx":4170 + /* "_pywrapfst.pyx":4177 * cdef fst.RandArcSelection _select = _get_rand_arc_selection(tostring(select)) * cdef unique_ptr[fst.RandGenOptions[fst.RandArcSelection]] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -56660,76 +56673,57 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_randgen(st */ __pyx_v__opts.reset(new fst::RandGenOptions (__pyx_v__select, __pyx_v_max_length, __pyx_v_npath, __pyx_v_weighted, __pyx_v_remove_total_weight)); - /* "_pywrapfst.pyx":4177 + /* "_pywrapfst.pyx":4184 * remove_total_weight)) * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< - * if seed == 0: - * seed = time(NULL) + * cdef uint64_t _seed = fst.GetSeed(seed) + * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), _seed) */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4177, __pyx_L1_error) + __PYX_ERR(0, 4184, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4177, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4178 + /* "_pywrapfst.pyx":4185 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) - * if seed == 0: # <<<<<<<<<<<<<< - * seed = time(NULL) - * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) - */ - __pyx_t_3 = (__pyx_v_seed == 0); - if (__pyx_t_3) { - - /* "_pywrapfst.pyx":4179 - * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) - * if seed == 0: - * seed = time(NULL) # <<<<<<<<<<<<<< - * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) + * cdef uint64_t _seed = fst.GetSeed(seed) # <<<<<<<<<<<<<< + * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), _seed) * return _init_MutableFst(_tfst.release()) */ - __pyx_v_seed = time(NULL); + __pyx_v__seed = fst::script::GetSeed(__pyx_v_seed); - /* "_pywrapfst.pyx":4178 - * cdef unique_ptr[fst.VectorFstClass] _tfst + /* "_pywrapfst.pyx":4186 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) - * if seed == 0: # <<<<<<<<<<<<<< - * seed = time(NULL) - * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) - */ - } - - /* "_pywrapfst.pyx":4180 - * if seed == 0: - * seed = time(NULL) - * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) # <<<<<<<<<<<<<< + * cdef uint64_t _seed = fst.GetSeed(seed) + * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), _seed) # <<<<<<<<<<<<<< * return _init_MutableFst(_tfst.release()) * */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4180, __pyx_L1_error) + __PYX_ERR(0, 4186, __pyx_L1_error) } - fst::script::RandGen((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts), __pyx_v_seed); + fst::script::RandGen((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts), __pyx_v__seed); - /* "_pywrapfst.pyx":4181 - * seed = time(NULL) - * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) + /* "_pywrapfst.pyx":4187 + * cdef uint64_t _seed = fst.GetSeed(seed) + * fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), _seed) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_4); - __pyx_t_4 = 0; + __pyx_t_3 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4132 + /* "_pywrapfst.pyx":4139 * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< @@ -56739,7 +56733,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_randgen(st /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("_pywrapfst.randgen", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -56756,7 +56750,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10_pywrapfst_48randgen, "\n randgen(ifst, npath=1, seed=0, select=\"uniform\", max_length=2147483647,\n weighted=False, remove_total_weight=False)\n\n Randomly generate successful paths in an FST.\n\n This operation randomly generates a set of successful paths in the input FST.\n This relies on a mechanism for selecting arcs, specified using the `select`\n argument. The default selector, \"uniform\", randomly selects a transition\n using a uniform distribution. The \"log_prob\" selector randomly selects a\n transition w.r.t. the weights treated as negative log probabilities after\n normalizing for the total weight leaving the state. In all cases, finality is\n treated as a transition to a super-final state.\n\n Args:\n ifst: The input FST.\n npath: The number of random paths to generate.\n seed: An optional seed value for random path generation; if zero, the\n current time and process ID is used.\n select: A string matching a known random arc selection type; one of:\n \"uniform\", \"log_prob\", \"fast_log_prob\".\n max_length: The maximum length of each random path.\n weighted: Should the output be weighted by path count?\n remove_total_weight: Should the total weight be removed (ignored when\n `weighted` is False)?\n\n Returns:\n An FST containing one or more random paths.\n "); +PyDoc_STRVAR(__pyx_doc_10_pywrapfst_48randgen, "\n randgen(ifst, npath=1, seed=0, select=\"uniform\", max_length=2147483647,\n weighted=False, remove_total_weight=False, seed=-1)\n\n Randomly generate successful paths in an FST.\n\n This operation randomly generates a set of successful paths in the input FST.\n This relies on a mechanism for selecting arcs, specified using the `select`\n argument. The default selector, \"uniform\", randomly selects a transition\n using a uniform distribution. The \"log_prob\" selector randomly selects a\n transition w.r.t. the weights treated as negative log probabilities after\n normalizing for the total weight leaving the state. In all cases, finality is\n treated as a transition to a super-final state.\n\n Args:\n ifst: The input FST.\n npath: The number of random paths to generate.\n seed: An optional seed value for random path generation; if not specified,\n the current time is used.\n select: A string matching a known random arc selection type; one of:\n \"uniform\", \"log_prob\", \"fast_log_prob\".\n max_length: The maximum length of each random path.\n weighted: Should the output be weighted by path count?\n remove_total_weight: Should the total weight be removed (ignored when\n `weighted` is False)?\n\n Returns:\n An FST containing one or more random paths.\n "); static PyMethodDef __pyx_mdef_10_pywrapfst_49randgen = {"randgen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_49randgen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_48randgen}; static PyObject *__pyx_pw_10_pywrapfst_49randgen(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL @@ -56821,54 +56815,54 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_npath); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_select); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_length); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weighted); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_total_weight); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seed); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4132, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4139, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "randgen") < 0)) __PYX_ERR(0, 4132, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "randgen") < 0)) __PYX_ERR(0, 4139, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -56891,51 +56885,51 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 4133, __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, 4140, __pyx_L3_error) } else { __pyx_v_npath = ((int32_t)1); } __pyx_v_select = values[2]; if (values[3]) { - __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[3]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4135, __pyx_L3_error) + __pyx_v_max_length = __Pyx_PyInt_As_int32_t(values[3]); if (unlikely((__pyx_v_max_length == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4142, __pyx_L3_error) } else { - __pyx_v_max_length = __pyx_k__32; + __pyx_v_max_length = __pyx_k__34; } if (values[4]) { - __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4136, __pyx_L3_error) + __pyx_v_weighted = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_weighted == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4143, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4136 + /* "_pywrapfst.pyx":4143 * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), * bool weighted=False, # <<<<<<<<<<<<<< * bool remove_total_weight=False, - * uint64_t seed=0): + * uint64_t seed=fst.kDefaultSeed): */ __pyx_v_weighted = ((bool)0); } if (values[5]) { - __pyx_v_remove_total_weight = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_remove_total_weight == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4137, __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, 4144, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4137 + /* "_pywrapfst.pyx":4144 * int32_t max_length=numeric_limits[int32_t].max(), * bool weighted=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< - * uint64_t seed=0): + * uint64_t seed=fst.kDefaultSeed): * """ */ __pyx_v_remove_total_weight = ((bool)0); } if (values[6]) { - __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4138, __pyx_L3_error) + __pyx_v_seed = __Pyx_PyInt_As_uint64_t(values[6]); if (unlikely((__pyx_v_seed == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4145, __pyx_L3_error) } else { - __pyx_v_seed = ((uint64_t)0); + __pyx_v_seed = __pyx_k__35; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("randgen", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4139, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -56949,10 +56943,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4132, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4139, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_48randgen(__pyx_self, __pyx_v_ifst, __pyx_v_npath, __pyx_v_select, __pyx_v_max_length, __pyx_v_weighted, __pyx_v_remove_total_weight, __pyx_v_seed); - /* "_pywrapfst.pyx":4132 + /* "_pywrapfst.pyx":4139 * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< @@ -56992,7 +56986,7 @@ static PyObject *__pyx_pf_10_pywrapfst_48randgen(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2.remove_total_weight = __pyx_v_weighted; __pyx_t_2.weighted = __pyx_v_remove_total_weight; __pyx_t_2.seed = __pyx_v_seed; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4132, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_randgen(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -57009,7 +57003,7 @@ static PyObject *__pyx_pf_10_pywrapfst_48randgen(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pywrapfst.pyx":4184 +/* "_pywrapfst.pyx":4190 * * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -57028,7 +57022,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py PyObject *__pyx_v_call_arc_labeling = ((PyObject *)__pyx_n_u_input); PyObject *__pyx_v_return_arc_labeling = ((PyObject *)__pyx_n_u_neither); - /* "_pywrapfst.pyx":4187 + /* "_pywrapfst.pyx":4193 * call_arc_labeling="input", * return_arc_labeling="neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -57077,7 +57071,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py } } - /* "_pywrapfst.pyx":4228 + /* "_pywrapfst.pyx":4234 * cdef Fst _pfst * cdef vector[fst.LabelFstClassPair] _pairs * for (_label, _pfst) in pairs: # <<<<<<<<<<<<<< @@ -57089,9 +57083,9 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pairs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4234, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -57099,28 +57093,28 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4228, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4234, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 4234, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_MACROS - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4228, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4234, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 4234, __pyx_L1_error) #else - __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -57130,7 +57124,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 4228, __pyx_L1_error) + else __PYX_ERR(0, 4234, __pyx_L1_error) } break; } @@ -57142,7 +57136,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 4228, __pyx_L1_error) + __PYX_ERR(0, 4234, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -57155,15 +57149,15 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); @@ -57171,7 +57165,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4228, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 4234, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -57179,17 +57173,17 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 4228, __pyx_L1_error) + __PYX_ERR(0, 4234, __pyx_L1_error) __pyx_L6_unpacking_done:; } - __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4228, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_t_5); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 4228, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 4234, __pyx_L1_error) __pyx_v__label = __pyx_t_9; __Pyx_XDECREF_SET(__pyx_v__pfst, ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_6)); __pyx_t_6 = 0; - /* "_pywrapfst.pyx":4229 + /* "_pywrapfst.pyx":4235 * cdef vector[fst.LabelFstClassPair] _pairs * for (_label, _pfst) in pairs: * _pairs.push_back(fst.LabelFstClassPair(_label, _pfst._fst.get())) # <<<<<<<<<<<<<< @@ -57198,22 +57192,22 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py */ if (unlikely(((PyObject *)__pyx_v__pfst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4229, __pyx_L1_error) + __PYX_ERR(0, 4235, __pyx_L1_error) } try { __pyx_t_10 = __pyx_t_10cpywrapfst_LabelFstClassPair(__pyx_v__label, __pyx_v__pfst->_fst.get()); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 4229, __pyx_L1_error) + __PYX_ERR(0, 4235, __pyx_L1_error) } try { __pyx_v__pairs.push_back(__pyx_t_10); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 4229, __pyx_L1_error) + __PYX_ERR(0, 4235, __pyx_L1_error) } - /* "_pywrapfst.pyx":4228 + /* "_pywrapfst.pyx":4234 * cdef Fst _pfst * cdef vector[fst.LabelFstClassPair] _pairs * for (_label, _pfst) in pairs: # <<<<<<<<<<<<<< @@ -57223,7 +57217,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pywrapfst.pyx":4231 + /* "_pywrapfst.pyx":4237 * _pairs.push_back(fst.LabelFstClassPair(_label, _pfst._fst.get())) * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType())) # <<<<<<<<<<<<<< @@ -57232,45 +57226,45 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py */ __pyx_v__tfst.reset(new fst::script::VectorFstClass((__pyx_v__pairs[0]).second->ArcType())); - /* "_pywrapfst.pyx":4233 + /* "_pywrapfst.pyx":4239 * _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType())) * cdef fst.ReplaceLabelType _cal = _get_replace_label_type( * tostring(call_arc_labeling), # <<<<<<<<<<<<<< * epsilon_on_replace) * cdef fst.ReplaceLabelType _ral = _get_replace_label_type( */ - __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4233, __pyx_L1_error) + __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_call_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4239, __pyx_L1_error) - /* "_pywrapfst.pyx":4232 + /* "_pywrapfst.pyx":4238 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(_pairs[0].second.ArcType())) * cdef fst.ReplaceLabelType _cal = _get_replace_label_type( # <<<<<<<<<<<<<< * tostring(call_arc_labeling), * epsilon_on_replace) */ - __pyx_t_12 = __pyx_f_10_pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4232, __pyx_L1_error) + __pyx_t_12 = __pyx_f_10_pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4238, __pyx_L1_error) __pyx_v__cal = __pyx_t_12; - /* "_pywrapfst.pyx":4236 + /* "_pywrapfst.pyx":4242 * epsilon_on_replace) * cdef fst.ReplaceLabelType _ral = _get_replace_label_type( * tostring(return_arc_labeling), # <<<<<<<<<<<<<< * epsilon_on_replace) * cdef unique_ptr[fst.ReplaceOptions] _opts */ - __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4236, __pyx_L1_error) + __pyx_t_11 = __pyx_f_10_pywrapfst_tostring(__pyx_v_return_arc_labeling); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4242, __pyx_L1_error) - /* "_pywrapfst.pyx":4235 + /* "_pywrapfst.pyx":4241 * tostring(call_arc_labeling), * epsilon_on_replace) * cdef fst.ReplaceLabelType _ral = _get_replace_label_type( # <<<<<<<<<<<<<< * tostring(return_arc_labeling), * epsilon_on_replace) */ - __pyx_t_12 = __pyx_f_10_pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4235, __pyx_L1_error) + __pyx_t_12 = __pyx_f_10_pywrapfst__get_replace_label_type(__pyx_t_11, __pyx_v_epsilon_on_replace); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4241, __pyx_L1_error) __pyx_v__ral = __pyx_t_12; - /* "_pywrapfst.pyx":4239 + /* "_pywrapfst.pyx":4245 * epsilon_on_replace) * cdef unique_ptr[fst.ReplaceOptions] _opts * _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label)) # <<<<<<<<<<<<<< @@ -57279,7 +57273,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py */ __pyx_v__opts.reset(new fst::script::ReplaceOptions((__pyx_v__pairs[0]).first, __pyx_v__cal, __pyx_v__ral, __pyx_v_return_label)); - /* "_pywrapfst.pyx":4240 + /* "_pywrapfst.pyx":4246 * cdef unique_ptr[fst.ReplaceOptions] _opts * _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label)) * fst.Replace(_pairs, _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -57288,7 +57282,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py */ fst::script::Replace(__pyx_v__pairs, __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":4241 + /* "_pywrapfst.pyx":4247 * _opts.reset(new fst.ReplaceOptions(_pairs[0].first, _cal, _ral, return_label)) * fst.Replace(_pairs, _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -57296,13 +57290,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_replace(Py * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4241, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4184 + /* "_pywrapfst.pyx":4190 * * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -57394,40 +57388,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4190, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_call_arc_labeling); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4190, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_arc_labeling); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4190, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_epsilon_on_replace); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4190, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_label); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4184, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4190, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "replace") < 0)) __PYX_ERR(0, 4184, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "replace") < 0)) __PYX_ERR(0, 4190, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -57448,10 +57442,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 4187, __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, 4193, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4187 + /* "_pywrapfst.pyx":4193 * call_arc_labeling="input", * return_arc_labeling="neither", * bool epsilon_on_replace=False, # <<<<<<<<<<<<<< @@ -57461,14 +57455,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __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, 4188, __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, 4194, __pyx_L3_error) } else { __pyx_v_return_label = ((int64_t)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4184, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("replace", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4190, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -57484,7 +57478,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_10_pywrapfst_50replace(__pyx_self, __pyx_v_pairs, __pyx_v_call_arc_labeling, __pyx_v_return_arc_labeling, __pyx_v_epsilon_on_replace, __pyx_v_return_label); - /* "_pywrapfst.pyx":4184 + /* "_pywrapfst.pyx":4190 * * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< @@ -57518,7 +57512,7 @@ static PyObject *__pyx_pf_10_pywrapfst_50replace(CYTHON_UNUSED PyObject *__pyx_s __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_10_pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4184, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_replace(__pyx_v_pairs, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -57535,7 +57529,7 @@ static PyObject *__pyx_pf_10_pywrapfst_50replace(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pywrapfst.pyx":4244 +/* "_pywrapfst.pyx":4250 * * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< @@ -57567,7 +57561,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_reverse(st } } - /* "_pywrapfst.pyx":4264 + /* "_pywrapfst.pyx":4270 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -57576,12 +57570,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_reverse(st */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4264, __pyx_L1_error) + __PYX_ERR(0, 4270, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4264, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4270, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4265 + /* "_pywrapfst.pyx":4271 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Reverse(deref(ifst._fst), _tfst.get(), require_superinitial) # <<<<<<<<<<<<<< @@ -57590,11 +57584,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_reverse(st */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4265, __pyx_L1_error) + __PYX_ERR(0, 4271, __pyx_L1_error) } fst::script::Reverse((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), __pyx_v_require_superinitial); - /* "_pywrapfst.pyx":4266 + /* "_pywrapfst.pyx":4272 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Reverse(deref(ifst._fst), _tfst.get(), require_superinitial) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -57602,13 +57596,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_reverse(st * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4266, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4244 + /* "_pywrapfst.pyx":4250 * * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< @@ -57684,19 +57678,19 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4244, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4250, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_require_superinitial); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4244, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4250, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reverse") < 0)) __PYX_ERR(0, 4244, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reverse") < 0)) __PYX_ERR(0, 4250, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -57709,14 +57703,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 4244, __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, 4250, __pyx_L3_error) } else { __pyx_v_require_superinitial = ((bool)1); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4244, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reverse", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4250, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -57730,7 +57724,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4244, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4250, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_52reverse(__pyx_self, __pyx_v_ifst, __pyx_v_require_superinitial); /* function exit code */ @@ -57760,7 +57754,7 @@ static PyObject *__pyx_pf_10_pywrapfst_52reverse(CYTHON_UNUSED PyObject *__pyx_s __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_10_pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4244, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_reverse(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -57777,7 +57771,7 @@ static PyObject *__pyx_pf_10_pywrapfst_52reverse(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "_pywrapfst.pyx":4272 +/* "_pywrapfst.pyx":4278 * * * cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -57786,11 +57780,11 @@ static PyObject *__pyx_pf_10_pywrapfst_52reverse(CYTHON_UNUSED PyObject *__pyx_s */ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, std::vector *__pyx_v_distance, struct __pyx_opt_args_10_pywrapfst__shortestdistance *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__33; - int64_t __pyx_v_nstate = __pyx_k__34; + float __pyx_v_delta = __pyx_k__36; + int64_t __pyx_v_nstate = __pyx_k__37; PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":4277 + /* "_pywrapfst.pyx":4283 * int64_t nstate=fst.kNoStateId, * queue_type="auto", * bool reverse=False) except *: # <<<<<<<<<<<<<< @@ -57820,7 +57814,7 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst } } - /* "_pywrapfst.pyx":4279 + /* "_pywrapfst.pyx":4285 * bool reverse=False) except *: * cdef unique_ptr[fst.ShortestDistanceOptions] _opts * if reverse: # <<<<<<<<<<<<<< @@ -57830,7 +57824,7 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst __pyx_t_1 = (__pyx_v_reverse != 0); if (__pyx_t_1) { - /* "_pywrapfst.pyx":4282 + /* "_pywrapfst.pyx":4288 * # Only the simpler signature supports shortest distance to final states; * # `nstate` and `queue_type` arguments are ignored. * fst.ShortestDistance(deref(ifst._fst), distance, True, delta) # <<<<<<<<<<<<<< @@ -57839,11 +57833,11 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4282, __pyx_L1_error) + __PYX_ERR(0, 4288, __pyx_L1_error) } fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, 1, __pyx_v_delta); - /* "_pywrapfst.pyx":4279 + /* "_pywrapfst.pyx":4285 * bool reverse=False) except *: * cdef unique_ptr[fst.ShortestDistanceOptions] _opts * if reverse: # <<<<<<<<<<<<<< @@ -57853,7 +57847,7 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst goto __pyx_L3; } - /* "_pywrapfst.pyx":4284 + /* "_pywrapfst.pyx":4290 * fst.ShortestDistance(deref(ifst._fst), distance, True, delta) * else: * _opts.reset( # <<<<<<<<<<<<<< @@ -57862,17 +57856,17 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst */ /*else*/ { - /* "_pywrapfst.pyx":4285 + /* "_pywrapfst.pyx":4291 * else: * _opts.reset( * new fst.ShortestDistanceOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * fst.ArcFilterType.ANY_ARC_FILTER, * nstate, */ - __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4285, __pyx_L1_error) - __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4285, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4291, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4291, __pyx_L1_error) - /* "_pywrapfst.pyx":4284 + /* "_pywrapfst.pyx":4290 * fst.ShortestDistance(deref(ifst._fst), distance, True, delta) * else: * _opts.reset( # <<<<<<<<<<<<<< @@ -57881,7 +57875,7 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst */ __pyx_v__opts.reset(new fst::script::ShortestDistanceOptions(__pyx_t_3, fst::script::ArcFilterType::ANY, __pyx_v_nstate, __pyx_v_delta)); - /* "_pywrapfst.pyx":4289 + /* "_pywrapfst.pyx":4295 * nstate, * delta)) * fst.ShortestDistance(deref(ifst._fst), distance, deref(_opts)) # <<<<<<<<<<<<<< @@ -57890,13 +57884,13 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4289, __pyx_L1_error) + __PYX_ERR(0, 4295, __pyx_L1_error) } fst::script::ShortestDistance((*__pyx_v_ifst->_fst), __pyx_v_distance, (*__pyx_v__opts)); } __pyx_L3:; - /* "_pywrapfst.pyx":4272 + /* "_pywrapfst.pyx":4278 * * * cdef void _shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -57911,7 +57905,7 @@ static void __pyx_f_10_pywrapfst__shortestdistance(struct __pyx_obj_10_pywrapfst __pyx_L0:; } -/* "_pywrapfst.pyx":4292 +/* "_pywrapfst.pyx":4298 * * * def shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -57931,49 +57925,49 @@ static PyObject *__pyx_pf_10_pywrapfst_62__defaults__(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_delta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int64_t(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_nstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int64_t(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_nstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":4296 + /* "_pywrapfst.pyx":4302 * int64_t nstate=fst.kNoStateId, * queue_type="auto", * bool reverse=False): # <<<<<<<<<<<<<< * """ * shortestdistance(ifst, delta=1e-6, nstate=NO_STATE_ID, */ - __pyx_t_3 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4296, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":4292 + /* "_pywrapfst.pyx":4298 * * * def shortestdistance(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 4298, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 4298, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_n_u_auto)); __Pyx_GIVEREF(((PyObject*)__pyx_n_u_auto)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject*)__pyx_n_u_auto))) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject*)__pyx_n_u_auto))) __PYX_ERR(0, 4298, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3)) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3)) __PYX_ERR(0, 4298, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 4298, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None)) __PYX_ERR(0, 4292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None)) __PYX_ERR(0, 4298, __pyx_L1_error); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -58061,40 +58055,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4292, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4292, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4292, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_type); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4292, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reverse); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4292, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4298, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 4292, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shortestdistance") < 0)) __PYX_ERR(0, 4298, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -58113,25 +58107,25 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 4293, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4299, __pyx_L3_error) } else { __pyx_v_delta = __pyx_dynamic_args->__pyx_arg_delta; } 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, 4294, __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, 4300, __pyx_L3_error) } else { __pyx_v_nstate = __pyx_dynamic_args->__pyx_arg_nstate; } __pyx_v_queue_type = values[3]; if (values[4]) { - __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4296, __pyx_L3_error) + __pyx_v_reverse = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_reverse == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4302, __pyx_L3_error) } else { __pyx_v_reverse = ((bool)((int)0)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4292, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("shortestdistance", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 4298, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -58145,7 +58139,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4292, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4298, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_54shortestdistance(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_reverse); /* function exit code */ @@ -58180,7 +58174,7 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shortestdistance", 1); - /* "_pywrapfst.pyx":4324 + /* "_pywrapfst.pyx":4330 * """ * cdef vector[fst.WeightClass] _distance * _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) # <<<<<<<<<<<<<< @@ -58192,9 +58186,9 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject __pyx_t_1.nstate = __pyx_v_nstate; __pyx_t_1.queue_type = __pyx_v_queue_type; __pyx_t_1.reverse = __pyx_v_reverse; - __pyx_f_10_pywrapfst__shortestdistance(__pyx_v_ifst, (&__pyx_v__distance), &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4324, __pyx_L1_error) + __pyx_f_10_pywrapfst__shortestdistance(__pyx_v_ifst, (&__pyx_v__distance), &__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4330, __pyx_L1_error) - /* "_pywrapfst.pyx":4325 + /* "_pywrapfst.pyx":4331 * cdef vector[fst.WeightClass] _distance * _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) * return [Weight(ifst._fst.get().WeightType(), weight.ToString()) # <<<<<<<<<<<<<< @@ -58203,10 +58197,10 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":4326 + /* "_pywrapfst.pyx":4332 * _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) * return [Weight(ifst._fst.get().WeightType(), weight.ToString()) * for weight in _distance] # <<<<<<<<<<<<<< @@ -58220,7 +58214,7 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject ++__pyx_t_3; __pyx_7genexpr__pyx_v_weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_4); - /* "_pywrapfst.pyx":4325 + /* "_pywrapfst.pyx":4331 * cdef vector[fst.WeightClass] _distance * _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) * return [Weight(ifst._fst.get().WeightType(), weight.ToString()) # <<<<<<<<<<<<<< @@ -58229,27 +58223,27 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4325, __pyx_L1_error) + __PYX_ERR(0, 4331, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_ifst->_fst.get()->WeightType()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_v_ifst->_fst.get()->WeightType()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_PyUnicode_string_to_py_std__in_string(__pyx_7genexpr__pyx_v_weight.ToString()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 4325, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 4331, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 4325, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(0, 4331, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4325, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10_pywrapfst_Weight), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4325, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pywrapfst.pyx":4326 + /* "_pywrapfst.pyx":4332 * _shortestdistance(ifst, addr(_distance), delta, nstate, queue_type, reverse) * return [Weight(ifst._fst.get().WeightType(), weight.ToString()) * for weight in _distance] # <<<<<<<<<<<<<< @@ -58262,7 +58256,7 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4292 + /* "_pywrapfst.pyx":4298 * * * def shortestdistance(Fst ifst, # <<<<<<<<<<<<<< @@ -58284,7 +58278,7 @@ static PyObject *__pyx_pf_10_pywrapfst_54shortestdistance(CYTHON_UNUSED PyObject return __pyx_r; } -/* "_pywrapfst.pyx":4329 +/* "_pywrapfst.pyx":4335 * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< @@ -58300,12 +58294,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpath(struct __pyx_obj_10_pywrapfst_Fst *__pyx_v_ifst, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_10_pywrapfst_shortestpath *__pyx_optional_args) { - float __pyx_v_delta = __pyx_k__35; + float __pyx_v_delta = __pyx_k__38; int32_t __pyx_v_nshortest = ((int32_t)1); - int64_t __pyx_v_nstate = __pyx_k__36; + int64_t __pyx_v_nstate = __pyx_k__39; PyObject *__pyx_v_queue_type = ((PyObject *)__pyx_n_u_auto); - /* "_pywrapfst.pyx":4334 + /* "_pywrapfst.pyx":4340 * int64_t nstate=fst.kNoStateId, * queue_type="auto", * bool unique=False, # <<<<<<<<<<<<<< @@ -58314,7 +58308,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa */ bool __pyx_v_unique = ((bool)0); - /* "_pywrapfst.pyx":4335 + /* "_pywrapfst.pyx":4341 * queue_type="auto", * bool unique=False, * weight=None): # <<<<<<<<<<<<<< @@ -58356,7 +58350,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa } } - /* "_pywrapfst.pyx":4367 + /* "_pywrapfst.pyx":4373 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -58365,12 +58359,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4367, __pyx_L1_error) + __PYX_ERR(0, 4373, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4367, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4373, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4369 + /* "_pywrapfst.pyx":4375 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), # <<<<<<<<<<<<<< @@ -58379,31 +58373,31 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "weight_type"); - __PYX_ERR(0, 4369, __pyx_L1_error) + __PYX_ERR(0, 4375, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4369, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->weight_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4375, __pyx_L1_error) - /* "_pywrapfst.pyx":4370 + /* "_pywrapfst.pyx":4376 * # Threshold is set to semiring Zero (no pruning) if no weight is specified. * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(ifst.weight_type(), * weight) # <<<<<<<<<<<<<< * cdef unique_ptr[fst.ShortestPathOptions] _opts * _opts.reset( */ - __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4369, __pyx_L1_error) + __pyx_t_2 = __pyx_f_10_pywrapfst__get_WeightClass_or_zero(__pyx_t_1, __pyx_v_weight); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4375, __pyx_L1_error) __pyx_v__weight = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_2); - /* "_pywrapfst.pyx":4373 + /* "_pywrapfst.pyx":4379 * cdef unique_ptr[fst.ShortestPathOptions] _opts * _opts.reset( * new fst.ShortestPathOptions(_get_queue_type(tostring(queue_type)), # <<<<<<<<<<<<<< * nshortest, * unique, */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4373, __pyx_L1_error) - __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4373, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_queue_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4379, __pyx_L1_error) + __pyx_t_3 = __pyx_f_10_pywrapfst__get_queue_type(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4379, __pyx_L1_error) - /* "_pywrapfst.pyx":4372 + /* "_pywrapfst.pyx":4378 * weight) * cdef unique_ptr[fst.ShortestPathOptions] _opts * _opts.reset( # <<<<<<<<<<<<<< @@ -58412,7 +58406,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa */ __pyx_v__opts.reset(new fst::script::ShortestPathOptions(__pyx_t_3, __pyx_v_nshortest, __pyx_v_unique, __pyx_v_delta, __pyx_v__weight, __pyx_v_nstate)); - /* "_pywrapfst.pyx":4379 + /* "_pywrapfst.pyx":4385 * _weight, * nstate)) * fst.ShortestPath(deref(ifst._fst), _tfst.get(), deref(_opts)) # <<<<<<<<<<<<<< @@ -58421,11 +58415,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4379, __pyx_L1_error) + __PYX_ERR(0, 4385, __pyx_L1_error) } fst::script::ShortestPath((*__pyx_v_ifst->_fst), __pyx_v__tfst.get(), (*__pyx_v__opts)); - /* "_pywrapfst.pyx":4380 + /* "_pywrapfst.pyx":4386 * nstate)) * fst.ShortestPath(deref(ifst._fst), _tfst.get(), deref(_opts)) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -58433,13 +58427,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_shortestpa * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4380, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4329 + /* "_pywrapfst.pyx":4335 * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< @@ -58505,7 +58499,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ifst,&__pyx_n_s_delta,&__pyx_n_s_nshortest,&__pyx_n_s_nstate,&__pyx_n_s_queue_type,&__pyx_n_s_unique,&__pyx_n_s_weight,0}; values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_auto)); - /* "_pywrapfst.pyx":4335 + /* "_pywrapfst.pyx":4341 * queue_type="auto", * bool unique=False, * weight=None): # <<<<<<<<<<<<<< @@ -58540,54 +58534,54 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_delta); if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nshortest); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nstate); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_type); if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unique); if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_weight); if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4329, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4335, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4329, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shortestpath") < 0)) __PYX_ERR(0, 4335, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -58610,26 +58604,26 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } __pyx_v_ifst = ((struct __pyx_obj_10_pywrapfst_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, 4330, __pyx_L3_error) + __pyx_v_delta = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_delta == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 4336, __pyx_L3_error) } else { - __pyx_v_delta = __pyx_k__35; + __pyx_v_delta = __pyx_k__38; } 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, 4331, __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, 4337, __pyx_L3_error) } else { __pyx_v_nshortest = ((int32_t)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, 4332, __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, 4338, __pyx_L3_error) } else { - __pyx_v_nstate = __pyx_k__36; + __pyx_v_nstate = __pyx_k__39; } __pyx_v_queue_type = values[4]; if (values[5]) { - __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4334, __pyx_L3_error) + __pyx_v_unique = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_unique == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4340, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4334 + /* "_pywrapfst.pyx":4340 * int64_t nstate=fst.kNoStateId, * queue_type="auto", * bool unique=False, # <<<<<<<<<<<<<< @@ -58642,7 +58636,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4329, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("shortestpath", 0, 1, 7, __pyx_nargs); __PYX_ERR(0, 4335, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -58656,10 +58650,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4329, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4335, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_56shortestpath(__pyx_self, __pyx_v_ifst, __pyx_v_delta, __pyx_v_nshortest, __pyx_v_nstate, __pyx_v_queue_type, __pyx_v_unique, __pyx_v_weight); - /* "_pywrapfst.pyx":4329 + /* "_pywrapfst.pyx":4335 * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< @@ -58699,7 +58693,7 @@ static PyObject *__pyx_pf_10_pywrapfst_56shortestpath(CYTHON_UNUSED PyObject *__ __pyx_t_2.queue_type = __pyx_v_queue_type; __pyx_t_2.unique = __pyx_v_unique; __pyx_t_2.weight = __pyx_v_weight; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4329, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_shortestpath(__pyx_v_ifst, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58716,7 +58710,7 @@ static PyObject *__pyx_pf_10_pywrapfst_56shortestpath(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_pywrapfst.pyx":4383 +/* "_pywrapfst.pyx":4389 * * * cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<< @@ -58741,7 +58735,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_statemap(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("statemap", 1); - /* "_pywrapfst.pyx":4406 + /* "_pywrapfst.pyx":4412 * FstArgError: Unknown map type. * """ * return _map(ifst, fst.kDelta, map_type, 1., None) # <<<<<<<<<<<<<< @@ -58754,13 +58748,13 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_statemap(struct _ __pyx_t_2.map_type = __pyx_v_map_type; __pyx_t_2.power = 1.; __pyx_t_2.weight = Py_None; - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4406, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst__map(__pyx_v_ifst, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4383 + /* "_pywrapfst.pyx":4389 * * * cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<< @@ -58836,7 +58830,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4383, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4389, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -58844,14 +58838,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4383, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4389, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4383, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, 1); __PYX_ERR(0, 4389, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "statemap") < 0)) __PYX_ERR(0, 4383, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "statemap") < 0)) __PYX_ERR(0, 4389, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -58864,7 +58858,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4383, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("statemap", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4389, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -58878,7 +58872,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4383, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4389, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_58statemap(__pyx_self, __pyx_v_ifst, __pyx_v_map_type); /* function exit code */ @@ -58905,7 +58899,7 @@ static PyObject *__pyx_pf_10_pywrapfst_58statemap(CYTHON_UNUSED PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("statemap", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4383, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_statemap(__pyx_v_ifst, __pyx_v_map_type, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58922,7 +58916,7 @@ static PyObject *__pyx_pf_10_pywrapfst_58statemap(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "_pywrapfst.pyx":4409 +/* "_pywrapfst.pyx":4415 * * * cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<< @@ -58948,7 +58942,7 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_synchroniz int __pyx_clineno = 0; __Pyx_RefNannySetupContext("synchronize", 1); - /* "_pywrapfst.pyx":4429 + /* "_pywrapfst.pyx":4435 * """ * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) # <<<<<<<<<<<<<< @@ -58957,12 +58951,12 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_synchroniz */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "arc_type"); - __PYX_ERR(0, 4429, __pyx_L1_error) + __PYX_ERR(0, 4435, __pyx_L1_error) } - __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4429, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_10_pywrapfst_Fst *)__pyx_v_ifst->__pyx_vtab)->arc_type(__pyx_v_ifst, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4435, __pyx_L1_error) __pyx_v__tfst.reset(new fst::script::VectorFstClass(__pyx_t_1)); - /* "_pywrapfst.pyx":4430 + /* "_pywrapfst.pyx":4436 * cdef unique_ptr[fst.VectorFstClass] _tfst * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Synchronize(deref(ifst._fst), _tfst.get()) # <<<<<<<<<<<<<< @@ -58971,11 +58965,11 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_synchroniz */ if (unlikely(((PyObject *)__pyx_v_ifst) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst"); - __PYX_ERR(0, 4430, __pyx_L1_error) + __PYX_ERR(0, 4436, __pyx_L1_error) } fst::script::Synchronize((*__pyx_v_ifst->_fst), __pyx_v__tfst.get()); - /* "_pywrapfst.pyx":4431 + /* "_pywrapfst.pyx":4437 * _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) * fst.Synchronize(deref(ifst._fst), _tfst.get()) * return _init_MutableFst(_tfst.release()) # <<<<<<<<<<<<<< @@ -58983,13 +58977,13 @@ static struct __pyx_obj_10_pywrapfst_MutableFst *__pyx_f_10_pywrapfst_synchroniz * */ __Pyx_XDECREF((PyObject *)__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4431, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_10_pywrapfst__init_MutableFst(__pyx_v__tfst.release())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_10_pywrapfst_MutableFst *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4409 + /* "_pywrapfst.pyx":4415 * * * cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<< @@ -59062,12 +59056,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4409, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4415, __pyx_L3_error) else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "synchronize") < 0)) __PYX_ERR(0, 4409, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "synchronize") < 0)) __PYX_ERR(0, 4415, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; @@ -59078,7 +59072,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("synchronize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4409, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("synchronize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4415, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -59092,7 +59086,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4409, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ifst), __pyx_ptype_10_pywrapfst_Fst, 1, "ifst", 0))) __PYX_ERR(0, 4415, __pyx_L1_error) __pyx_r = __pyx_pf_10_pywrapfst_60synchronize(__pyx_self, __pyx_v_ifst); /* function exit code */ @@ -59119,7 +59113,7 @@ static PyObject *__pyx_pf_10_pywrapfst_60synchronize(CYTHON_UNUSED PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("synchronize", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4409, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_synchronize(__pyx_v_ifst, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -59136,7 +59130,7 @@ static PyObject *__pyx_pf_10_pywrapfst_60synchronize(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "_pywrapfst.pyx":4488 +/* "_pywrapfst.pyx":4491 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -59156,10 +59150,9 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py bool __pyx_v_keep_isymbols; bool __pyx_v_keep_osymbols; bool __pyx_v_keep_state_numbering; - bool __pyx_v_allow_negative_labels; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; + PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -59173,11 +59166,11 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { - 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 **__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,0}; values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)__pyx_n_u_vector)); values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)__pyx_n_u_standard)); - /* "_pywrapfst.pyx":4491 + /* "_pywrapfst.pyx":4494 * str fst_type="vector", * str arc_type="standard", * SymbolTable isymbols=None, # <<<<<<<<<<<<<< @@ -59186,7 +59179,7 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py */ values[2] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTable *)Py_None)); - /* "_pywrapfst.pyx":4492 + /* "_pywrapfst.pyx":4495 * str arc_type="standard", * SymbolTable isymbols=None, * SymbolTable osymbols=None, # <<<<<<<<<<<<<< @@ -59195,7 +59188,7 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py */ values[3] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_10_pywrapfst_SymbolTable *)Py_None)); - /* "_pywrapfst.pyx":4493 + /* "_pywrapfst.pyx":4496 * SymbolTable isymbols=None, * SymbolTable osymbols=None, * SymbolTable ssymbols=None, # <<<<<<<<<<<<<< @@ -59206,8 +59199,6 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { - case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9); - CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7); @@ -59235,80 +59226,71 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fst_type); if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_arc_type); if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_isymbols); if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_osymbols); if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ssymbols); if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_acceptor); if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_isymbols); if (value) { values[6] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_osymbols); if (value) { values[7] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_state_numbering); if (value) { values[8] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 9: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allow_negative_labels); - if (value) { values[9] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4488, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4491, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4488, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 4491, __pyx_L3_error) } } else { switch (__pyx_nargs) { - case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9); - CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8); CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7); @@ -59337,10 +59319,10 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py __pyx_v_osymbols = ((struct __pyx_obj_10_pywrapfst_SymbolTable *)values[3]); __pyx_v_ssymbols = ((struct __pyx_obj_10_pywrapfst_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, 4494, __pyx_L3_error) + __pyx_v_acceptor = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_acceptor == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 4497, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4494 + /* "_pywrapfst.pyx":4497 * SymbolTable osymbols=None, * SymbolTable ssymbols=None, * bool acceptor=False, # <<<<<<<<<<<<<< @@ -59350,61 +59332,48 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py __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, 4495, __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, 4498, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4495 + /* "_pywrapfst.pyx":4498 * SymbolTable ssymbols=None, * bool acceptor=False, * bool keep_isymbols=False, # <<<<<<<<<<<<<< * bool keep_osymbols=False, - * bool keep_state_numbering=False, + * bool keep_state_numbering=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, 4496, __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, 4499, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4496 + /* "_pywrapfst.pyx":4499 * bool acceptor=False, * bool keep_isymbols=False, * bool keep_osymbols=False, # <<<<<<<<<<<<<< - * bool keep_state_numbering=False, - * bool allow_negative_labels=False): + * bool keep_state_numbering=False): + * self._sstrm.reset(new stringstream()) */ __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, 4497, __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, 4500, __pyx_L3_error) } else { - /* "_pywrapfst.pyx":4497 + /* "_pywrapfst.pyx":4500 * bool keep_isymbols=False, * bool keep_osymbols=False, - * bool keep_state_numbering=False, # <<<<<<<<<<<<<< - * bool allow_negative_labels=False): - * self._sstrm.reset(new stringstream()) - */ - __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, 4498, __pyx_L3_error) - } else { - - /* "_pywrapfst.pyx":4498 - * bool keep_osymbols=False, - * bool keep_state_numbering=False, - * bool allow_negative_labels=False): # <<<<<<<<<<<<<< + * bool keep_state_numbering=False): # <<<<<<<<<<<<<< * self._sstrm.reset(new stringstream()) * self._fst_type = tostring(fst_type) */ - __pyx_v_allow_negative_labels = ((bool)0); + __pyx_v_keep_state_numbering = ((bool)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, __pyx_nargs); __PYX_ERR(0, 4488, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 9, __pyx_nargs); __PYX_ERR(0, 4491, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -59418,14 +59387,14 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst_type), (&PyUnicode_Type), 1, "fst_type", 1))) __PYX_ERR(0, 4489, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc_type), (&PyUnicode_Type), 1, "arc_type", 1))) __PYX_ERR(0, 4490, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4491, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4492, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4493, __pyx_L1_error) - __pyx_r = __pyx_pf_10_pywrapfst_8Compiler___cinit__(((struct __pyx_obj_10_pywrapfst_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":4488 + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fst_type), (&PyUnicode_Type), 1, "fst_type", 1))) __PYX_ERR(0, 4492, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arc_type), (&PyUnicode_Type), 1, "arc_type", 1))) __PYX_ERR(0, 4493, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_isymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "isymbols", 0))) __PYX_ERR(0, 4494, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_osymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "osymbols", 0))) __PYX_ERR(0, 4495, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ssymbols), __pyx_ptype_10_pywrapfst_SymbolTable, 1, "ssymbols", 0))) __PYX_ERR(0, 4496, __pyx_L1_error) + __pyx_r = __pyx_pf_10_pywrapfst_8Compiler___cinit__(((struct __pyx_obj_10_pywrapfst_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); + + /* "_pywrapfst.pyx":4491 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -59448,7 +59417,7 @@ static int __pyx_pw_10_pywrapfst_8Compiler_1__cinit__(PyObject *__pyx_v_self, Py return __pyx_r; } -static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_fst_type, PyObject *__pyx_v_arc_type, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_isymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_osymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, bool __pyx_v_keep_isymbols, bool __pyx_v_keep_osymbols, bool __pyx_v_keep_state_numbering, bool __pyx_v_allow_negative_labels) { +static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapfst_Compiler *__pyx_v_self, PyObject *__pyx_v_fst_type, PyObject *__pyx_v_arc_type, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_isymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_osymbols, struct __pyx_obj_10_pywrapfst_SymbolTable *__pyx_v_ssymbols, bool __pyx_v_acceptor, bool __pyx_v_keep_isymbols, bool __pyx_v_keep_osymbols, bool __pyx_v_keep_state_numbering) { int __pyx_r; std::string __pyx_t_1; int __pyx_t_2; @@ -59457,48 +59426,48 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "_pywrapfst.pyx":4499 - * bool keep_state_numbering=False, - * bool allow_negative_labels=False): + /* "_pywrapfst.pyx":4501 + * bool keep_osymbols=False, + * bool keep_state_numbering=False): * self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<< * self._fst_type = tostring(fst_type) * self._arc_type = tostring(arc_type) */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4499, __pyx_L1_error) + __PYX_ERR(0, 4501, __pyx_L1_error) } __pyx_v_self->_sstrm.reset(new std::stringstream()); - /* "_pywrapfst.pyx":4500 - * bool allow_negative_labels=False): + /* "_pywrapfst.pyx":4502 + * bool keep_state_numbering=False): * self._sstrm.reset(new stringstream()) * self._fst_type = tostring(fst_type) # <<<<<<<<<<<<<< * self._arc_type = tostring(arc_type) * self._isymbols = NULL */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4500, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_fst_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4502, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type"); - __PYX_ERR(0, 4500, __pyx_L1_error) + __PYX_ERR(0, 4502, __pyx_L1_error) } __pyx_v_self->_fst_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":4501 + /* "_pywrapfst.pyx":4503 * self._sstrm.reset(new stringstream()) * self._fst_type = tostring(fst_type) * self._arc_type = tostring(arc_type) # <<<<<<<<<<<<<< * self._isymbols = NULL * if isymbols is not None: */ - __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4501, __pyx_L1_error) + __pyx_t_1 = __pyx_f_10_pywrapfst_tostring(__pyx_v_arc_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4503, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type"); - __PYX_ERR(0, 4501, __pyx_L1_error) + __PYX_ERR(0, 4503, __pyx_L1_error) } __pyx_v_self->_arc_type = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_1); - /* "_pywrapfst.pyx":4502 + /* "_pywrapfst.pyx":4504 * self._fst_type = tostring(fst_type) * self._arc_type = tostring(arc_type) * self._isymbols = NULL # <<<<<<<<<<<<<< @@ -59507,11 +59476,11 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4502, __pyx_L1_error) + __PYX_ERR(0, 4504, __pyx_L1_error) } __pyx_v_self->_isymbols = NULL; - /* "_pywrapfst.pyx":4503 + /* "_pywrapfst.pyx":4505 * self._arc_type = tostring(arc_type) * self._isymbols = NULL * if isymbols is not None: # <<<<<<<<<<<<<< @@ -59521,7 +59490,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf __pyx_t_2 = (((PyObject *)__pyx_v_isymbols) != Py_None); if (__pyx_t_2) { - /* "_pywrapfst.pyx":4504 + /* "_pywrapfst.pyx":4506 * self._isymbols = NULL * if isymbols is not None: * self._isymbols = isymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -59530,16 +59499,16 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_isymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 4504, __pyx_L1_error) + __PYX_ERR(0, 4506, __pyx_L1_error) } - __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_isymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4504, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_isymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_isymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4506, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4504, __pyx_L1_error) + __PYX_ERR(0, 4506, __pyx_L1_error) } __pyx_v_self->_isymbols = __pyx_t_3; - /* "_pywrapfst.pyx":4503 + /* "_pywrapfst.pyx":4505 * self._arc_type = tostring(arc_type) * self._isymbols = NULL * if isymbols is not None: # <<<<<<<<<<<<<< @@ -59548,7 +59517,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ } - /* "_pywrapfst.pyx":4505 + /* "_pywrapfst.pyx":4507 * if isymbols is not None: * self._isymbols = isymbols._raw_ptr_or_raise() * self._osymbols = NULL # <<<<<<<<<<<<<< @@ -59557,11 +59526,11 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4505, __pyx_L1_error) + __PYX_ERR(0, 4507, __pyx_L1_error) } __pyx_v_self->_osymbols = NULL; - /* "_pywrapfst.pyx":4506 + /* "_pywrapfst.pyx":4508 * self._isymbols = isymbols._raw_ptr_or_raise() * self._osymbols = NULL * if osymbols is not None: # <<<<<<<<<<<<<< @@ -59571,7 +59540,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf __pyx_t_2 = (((PyObject *)__pyx_v_osymbols) != Py_None); if (__pyx_t_2) { - /* "_pywrapfst.pyx":4507 + /* "_pywrapfst.pyx":4509 * self._osymbols = NULL * if osymbols is not None: * self._osymbols = osymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -59580,16 +59549,16 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_osymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 4507, __pyx_L1_error) + __PYX_ERR(0, 4509, __pyx_L1_error) } - __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_osymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4507, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_osymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_osymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4509, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4507, __pyx_L1_error) + __PYX_ERR(0, 4509, __pyx_L1_error) } __pyx_v_self->_osymbols = __pyx_t_3; - /* "_pywrapfst.pyx":4506 + /* "_pywrapfst.pyx":4508 * self._isymbols = isymbols._raw_ptr_or_raise() * self._osymbols = NULL * if osymbols is not None: # <<<<<<<<<<<<<< @@ -59598,7 +59567,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ } - /* "_pywrapfst.pyx":4508 + /* "_pywrapfst.pyx":4510 * if osymbols is not None: * self._osymbols = osymbols._raw_ptr_or_raise() * self._ssymbols = NULL # <<<<<<<<<<<<<< @@ -59607,11 +59576,11 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4508, __pyx_L1_error) + __PYX_ERR(0, 4510, __pyx_L1_error) } __pyx_v_self->_ssymbols = NULL; - /* "_pywrapfst.pyx":4509 + /* "_pywrapfst.pyx":4511 * self._osymbols = osymbols._raw_ptr_or_raise() * self._ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -59621,7 +59590,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf __pyx_t_2 = (((PyObject *)__pyx_v_ssymbols) != Py_None); if (__pyx_t_2) { - /* "_pywrapfst.pyx":4510 + /* "_pywrapfst.pyx":4512 * self._ssymbols = NULL * if ssymbols is not None: * self._ssymbols = ssymbols._raw_ptr_or_raise() # <<<<<<<<<<<<<< @@ -59630,16 +59599,16 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_ssymbols) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_raw_ptr_or_raise"); - __PYX_ERR(0, 4510, __pyx_L1_error) + __PYX_ERR(0, 4512, __pyx_L1_error) } - __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_ssymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4510, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_10_pywrapfst_SymbolTable *)__pyx_v_ssymbols->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raw_ptr_or_raise(((struct __pyx_obj_10_pywrapfst_SymbolTableView *)__pyx_v_ssymbols)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 4512, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4510, __pyx_L1_error) + __PYX_ERR(0, 4512, __pyx_L1_error) } __pyx_v_self->_ssymbols = __pyx_t_3; - /* "_pywrapfst.pyx":4509 + /* "_pywrapfst.pyx":4511 * self._osymbols = osymbols._raw_ptr_or_raise() * self._ssymbols = NULL * if ssymbols is not None: # <<<<<<<<<<<<<< @@ -59648,7 +59617,7 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ } - /* "_pywrapfst.pyx":4511 + /* "_pywrapfst.pyx":4513 * if ssymbols is not None: * self._ssymbols = ssymbols._raw_ptr_or_raise() * self._acceptor = acceptor # <<<<<<<<<<<<<< @@ -59657,11 +59626,11 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor"); - __PYX_ERR(0, 4511, __pyx_L1_error) + __PYX_ERR(0, 4513, __pyx_L1_error) } __pyx_v_self->_acceptor = __pyx_v_acceptor; - /* "_pywrapfst.pyx":4512 + /* "_pywrapfst.pyx":4514 * self._ssymbols = ssymbols._raw_ptr_or_raise() * self._acceptor = acceptor * self._keep_isymbols = keep_isymbols # <<<<<<<<<<<<<< @@ -59670,50 +59639,37 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols"); - __PYX_ERR(0, 4512, __pyx_L1_error) + __PYX_ERR(0, 4514, __pyx_L1_error) } __pyx_v_self->_keep_isymbols = __pyx_v_keep_isymbols; - /* "_pywrapfst.pyx":4513 + /* "_pywrapfst.pyx":4515 * self._acceptor = acceptor * self._keep_isymbols = keep_isymbols * self._keep_osymbols = keep_osymbols # <<<<<<<<<<<<<< * self._keep_state_numbering = keep_state_numbering - * self._allow_negative_labels = allow_negative_labels + * */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols"); - __PYX_ERR(0, 4513, __pyx_L1_error) + __PYX_ERR(0, 4515, __pyx_L1_error) } __pyx_v_self->_keep_osymbols = __pyx_v_keep_osymbols; - /* "_pywrapfst.pyx":4514 + /* "_pywrapfst.pyx":4516 * self._keep_isymbols = keep_isymbols * self._keep_osymbols = keep_osymbols * self._keep_state_numbering = keep_state_numbering # <<<<<<<<<<<<<< - * self._allow_negative_labels = allow_negative_labels * + * cpdef Fst compile(self): */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering"); - __PYX_ERR(0, 4514, __pyx_L1_error) + __PYX_ERR(0, 4516, __pyx_L1_error) } __pyx_v_self->_keep_state_numbering = __pyx_v_keep_state_numbering; - /* "_pywrapfst.pyx":4515 - * self._keep_osymbols = keep_osymbols - * self._keep_state_numbering = keep_state_numbering - * self._allow_negative_labels = allow_negative_labels # <<<<<<<<<<<<<< - * - * cpdef Fst compile(self): - */ - if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels"); - __PYX_ERR(0, 4515, __pyx_L1_error) - } - __pyx_v_self->_allow_negative_labels = __pyx_v_allow_negative_labels; - - /* "_pywrapfst.pyx":4488 + /* "_pywrapfst.pyx":4491 * """ * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -59731,8 +59687,8 @@ static int __pyx_pf_10_pywrapfst_8Compiler___cinit__(struct __pyx_obj_10_pywrapf return __pyx_r; } -/* "_pywrapfst.pyx":4517 - * self._allow_negative_labels = allow_negative_labels +/* "_pywrapfst.pyx":4518 + * self._keep_state_numbering = keep_state_numbering * * cpdef Fst compile(self): # <<<<<<<<<<<<<< * """ @@ -59769,7 +59725,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4517, __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, 4518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10_pywrapfst_8Compiler_3compile)) { __Pyx_XDECREF((PyObject *)__pyx_r); @@ -59792,11 +59748,11 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4517, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4518, __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_10_pywrapfst_Fst))))) __PYX_ERR(0, 4517, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_10_pywrapfst_Fst))))) __PYX_ERR(0, 4518, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_10_pywrapfst_Fst *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -59815,7 +59771,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile #endif } - /* "_pywrapfst.pyx":4532 + /* "_pywrapfst.pyx":4533 * """ * cdef unique_ptr[fst.FstClass] _tfst * _tfst = fst.CompileInternal(deref(self._sstrm), # <<<<<<<<<<<<<< @@ -59824,10 +59780,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_sstrm"); - __PYX_ERR(0, 4532, __pyx_L1_error) + __PYX_ERR(0, 4533, __pyx_L1_error) } - /* "_pywrapfst.pyx":4534 + /* "_pywrapfst.pyx":4535 * _tfst = fst.CompileInternal(deref(self._sstrm), * b"", * self._fst_type, # <<<<<<<<<<<<<< @@ -59836,10 +59792,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_fst_type"); - __PYX_ERR(0, 4534, __pyx_L1_error) + __PYX_ERR(0, 4535, __pyx_L1_error) } - /* "_pywrapfst.pyx":4535 + /* "_pywrapfst.pyx":4536 * b"", * self._fst_type, * self._arc_type, # <<<<<<<<<<<<<< @@ -59848,10 +59804,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_arc_type"); - __PYX_ERR(0, 4535, __pyx_L1_error) + __PYX_ERR(0, 4536, __pyx_L1_error) } - /* "_pywrapfst.pyx":4536 + /* "_pywrapfst.pyx":4537 * self._fst_type, * self._arc_type, * self._isymbols, # <<<<<<<<<<<<<< @@ -59860,10 +59816,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_isymbols"); - __PYX_ERR(0, 4536, __pyx_L1_error) + __PYX_ERR(0, 4537, __pyx_L1_error) } - /* "_pywrapfst.pyx":4537 + /* "_pywrapfst.pyx":4538 * self._arc_type, * self._isymbols, * self._osymbols, # <<<<<<<<<<<<<< @@ -59872,10 +59828,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_osymbols"); - __PYX_ERR(0, 4537, __pyx_L1_error) + __PYX_ERR(0, 4538, __pyx_L1_error) } - /* "_pywrapfst.pyx":4538 + /* "_pywrapfst.pyx":4539 * self._isymbols, * self._osymbols, * self._ssymbols, # <<<<<<<<<<<<<< @@ -59884,10 +59840,10 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_ssymbols"); - __PYX_ERR(0, 4538, __pyx_L1_error) + __PYX_ERR(0, 4539, __pyx_L1_error) } - /* "_pywrapfst.pyx":4539 + /* "_pywrapfst.pyx":4540 * self._osymbols, * self._ssymbols, * self._acceptor, # <<<<<<<<<<<<<< @@ -59896,69 +59852,57 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_acceptor"); - __PYX_ERR(0, 4539, __pyx_L1_error) + __PYX_ERR(0, 4540, __pyx_L1_error) } - /* "_pywrapfst.pyx":4540 + /* "_pywrapfst.pyx":4541 * self._ssymbols, * self._acceptor, * self._keep_isymbols, # <<<<<<<<<<<<<< * self._keep_osymbols, - * self._keep_state_numbering, + * self._keep_state_numbering) */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_isymbols"); - __PYX_ERR(0, 4540, __pyx_L1_error) - } - - /* "_pywrapfst.pyx":4541 - * self._acceptor, - * self._keep_isymbols, - * self._keep_osymbols, # <<<<<<<<<<<<<< - * self._keep_state_numbering, - * self._allow_negative_labels) - */ - if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols"); __PYX_ERR(0, 4541, __pyx_L1_error) } /* "_pywrapfst.pyx":4542 + * self._acceptor, * self._keep_isymbols, - * self._keep_osymbols, - * self._keep_state_numbering, # <<<<<<<<<<<<<< - * self._allow_negative_labels) + * self._keep_osymbols, # <<<<<<<<<<<<<< + * self._keep_state_numbering) * self._sstrm.reset(new stringstream()) */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering"); + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_osymbols"); __PYX_ERR(0, 4542, __pyx_L1_error) } /* "_pywrapfst.pyx":4543 + * self._keep_isymbols, * self._keep_osymbols, - * self._keep_state_numbering, - * self._allow_negative_labels) # <<<<<<<<<<<<<< + * self._keep_state_numbering) # <<<<<<<<<<<<<< * self._sstrm.reset(new stringstream()) * if _tfst.get() == NULL: */ if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_allow_negative_labels"); + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "_keep_state_numbering"); __PYX_ERR(0, 4543, __pyx_L1_error) } - /* "_pywrapfst.pyx":4532 + /* "_pywrapfst.pyx":4533 * """ * cdef unique_ptr[fst.FstClass] _tfst * _tfst = fst.CompileInternal(deref(self._sstrm), # <<<<<<<<<<<<<< * b"", * self._fst_type, */ - __pyx_v__tfst = fst::script::CompileInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering, __pyx_v_self->_allow_negative_labels); + __pyx_v__tfst = fst::script::CompileInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering); /* "_pywrapfst.pyx":4544 - * self._keep_state_numbering, - * self._allow_negative_labels) + * self._keep_osymbols, + * self._keep_state_numbering) * self._sstrm.reset(new stringstream()) # <<<<<<<<<<<<<< * if _tfst.get() == NULL: * raise FstOpError("Compilation failed") @@ -59970,7 +59914,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile __pyx_v_self->_sstrm.reset(new std::stringstream()); /* "_pywrapfst.pyx":4545 - * self._allow_negative_labels) + * self._keep_state_numbering) * self._sstrm.reset(new stringstream()) * if _tfst.get() == NULL: # <<<<<<<<<<<<<< * raise FstOpError("Compilation failed") @@ -60015,7 +59959,7 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile __PYX_ERR(0, 4546, __pyx_L1_error) /* "_pywrapfst.pyx":4545 - * self._allow_negative_labels) + * self._keep_state_numbering) * self._sstrm.reset(new stringstream()) * if _tfst.get() == NULL: # <<<<<<<<<<<<<< * raise FstOpError("Compilation failed") @@ -60037,8 +59981,8 @@ static struct __pyx_obj_10_pywrapfst_Fst *__pyx_f_10_pywrapfst_8Compiler_compile __pyx_t_1 = 0; goto __pyx_L0; - /* "_pywrapfst.pyx":4517 - * self._allow_negative_labels = allow_negative_labels + /* "_pywrapfst.pyx":4518 + * self._keep_state_numbering = keep_state_numbering * * cpdef Fst compile(self): # <<<<<<<<<<<<<< * """ @@ -60110,7 +60054,7 @@ static PyObject *__pyx_pf_10_pywrapfst_8Compiler_2compile(struct __pyx_obj_10_py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compile", 1); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4517, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_10_pywrapfst_8Compiler_compile(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -65302,6 +65246,7 @@ static void __pyx_tp_dealloc_10_pywrapfst_SymbolTableView(PyObject *o) { static PyMethodDef __pyx_methods_10_pywrapfst_SymbolTableView[] = { {"__reduce__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_15SymbolTableView_5__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"find", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_15SymbolTableView_13find, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_15SymbolTableView_12find}, + {"write_text", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10_pywrapfst_15SymbolTableView_27write_text, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10_pywrapfst_15SymbolTableView_26write_text}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS @@ -67628,7 +67573,7 @@ static PyMethodDef __pyx_methods_10_pywrapfst_Compiler[] = { #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_10_pywrapfst_Compiler_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10_pywrapfst_Compiler}, - {Py_tp_doc, (void *)PyDoc_STR("\n Compiler(fst_type=\"vector\", arc_type=\"standard\", isymbols=None,\n osymbols=None, ssymbols=None, acceptor=False, keep_isymbols=False,\n keep_osymbols=False, keep_state_numbering=False,\n allow_negative_labels=False)\n\n Class used to compile FSTs from strings.\n\n This class is used to compile FSTs specified using the AT&T FSM library\n format described here:\n\n http://web.eecs.umich.edu/~radev/NLP-fall2015/resources/fsm_archive/fsm.5.html\n\n This is the same format used by the `fstcompile` executable.\n\n Compiler options (symbol tables, etc.) are set at construction time.\n\n compiler = fst.Compiler(isymbols=ascii_symbols, osymbols=ascii_symbols)\n\n Once constructed, Compiler instances behave like a file handle opened for\n writing:\n\n # /ba+/\n compiler.write(\"0 1 50 50\")\n compiler.write(\"1 2 49 49\")\n compiler.write(\"2 2 49 49\")\n compiler.write(\"2\")\n\n The `compile` method returns an actual FST instance:\n\n sheep_machine = compiler.compile()\n\n Compilation flushes the internal buffer, so the compiler instance can be\n reused to compile new machines with the same symbol tables (etc.)\n\n Args:\n fst_type: A string indicating the container type for the compiled FST.\n arc_type: A string indicating the arc type for the compiled FST.\n isymbols: An optional SymbolTable used to label input symbols.\n osymbols: An optional SymbolTable used to label output symbols.\n ssymbols: An optional SymbolTable used to label states.\n acceptor: Should the FST be rendered in acceptor format if possible?\n keep_isymbols: Should the input symbol table be stored in the FST?\n keep_osymbols: Should the output symbol table be stored in the FST?\n keep_state_numbering: Should the state numbering be preserved?\n allow_negative_labels: Should negative labels be allowed? (Not\n recommended; may cause conflicts).\n ")}, + {Py_tp_doc, (void *)PyDoc_STR("\n Compiler(fst_type=\"vector\", arc_type=\"standard\", isymbols=None,\n osymbols=None, ssymbols=None, acceptor=False, keep_isymbols=False,\n keep_osymbols=False, keep_state_numbering=False)\n\n Class used to compile FSTs from strings.\n\n This class is used to compile FSTs specified using the AT&T FSM library\n format described here:\n\n http://web.eecs.umich.edu/~radev/NLP-fall2015/resources/fsm_archive/fsm.5.html\n\n This is the same format used by the `fstcompile` executable.\n\n Compiler options (symbol tables, etc.) are set at construction time.\n\n compiler = fst.Compiler(isymbols=ascii_symbols, osymbols=ascii_symbols)\n\n Once constructed, Compiler instances behave like a file handle opened for\n writing:\n\n # /ba+/\n compiler.write(\"0 1 50 50\")\n compiler.write(\"1 2 49 49\")\n compiler.write(\"2 2 49 49\")\n compiler.write(\"2\")\n\n The `compile` method returns an actual FST instance:\n\n sheep_machine = compiler.compile()\n\n Compilation flushes the internal buffer, so the compiler instance can be\n reused to compile new machines with the same symbol tables (etc.)\n\n Args:\n fst_type: A string indicating the container type for the compiled FST.\n arc_type: A string indicating the arc type for the compiled FST.\n isymbols: An optional SymbolTable used to label input symbols.\n osymbols: An optional SymbolTable used to label output symbols.\n ssymbols: An optional SymbolTable used to label states.\n acceptor: Should the FST be rendered in acceptor format if possible?\n keep_isymbols: Should the input symbol table be stored in the FST?\n keep_osymbols: Should the output symbol table be stored in the FST?\n keep_state_numbering: Should the state numbering be preserved?\n ")}, {Py_tp_methods, (void *)__pyx_methods_10_pywrapfst_Compiler}, {Py_tp_new, (void *)__pyx_tp_new_10_pywrapfst_Compiler}, {0, 0}, @@ -67673,7 +67618,7 @@ static PyTypeObject __pyx_type_10_pywrapfst_Compiler = { 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - PyDoc_STR("\n Compiler(fst_type=\"vector\", arc_type=\"standard\", isymbols=None,\n osymbols=None, ssymbols=None, acceptor=False, keep_isymbols=False,\n keep_osymbols=False, keep_state_numbering=False,\n allow_negative_labels=False)\n\n Class used to compile FSTs from strings.\n\n This class is used to compile FSTs specified using the AT&T FSM library\n format described here:\n\n http://web.eecs.umich.edu/~radev/NLP-fall2015/resources/fsm_archive/fsm.5.html\n\n This is the same format used by the `fstcompile` executable.\n\n Compiler options (symbol tables, etc.) are set at construction time.\n\n compiler = fst.Compiler(isymbols=ascii_symbols, osymbols=ascii_symbols)\n\n Once constructed, Compiler instances behave like a file handle opened for\n writing:\n\n # /ba+/\n compiler.write(\"0 1 50 50\")\n compiler.write(\"1 2 49 49\")\n compiler.write(\"2 2 49 49\")\n compiler.write(\"2\")\n\n The `compile` method returns an actual FST instance:\n\n sheep_machine = compiler.compile()\n\n Compilation flushes the internal buffer, so the compiler instance can be\n reused to compile new machines with the same symbol tables (etc.)\n\n Args:\n fst_type: A string indicating the container type for the compiled FST.\n arc_type: A string indicating the arc type for the compiled FST.\n isymbols: An optional SymbolTable used to label input symbols.\n osymbols: An optional SymbolTable used to label output symbols.\n ssymbols: An optional SymbolTable used to label states.\n acceptor: Should the FST be rendered in acceptor format if possible?\n keep_isymbols: Should the input symbol table be stored in the FST?\n keep_osymbols: Should the output symbol table be stored in the FST?\n keep_state_numbering: Should the state numbering be preserved?\n allow_negative_labels: Should negative labels be allowed? (Not\n recommended; may cause conflicts).\n "), /*tp_doc*/ + PyDoc_STR("\n Compiler(fst_type=\"vector\", arc_type=\"standard\", isymbols=None,\n osymbols=None, ssymbols=None, acceptor=False, keep_isymbols=False,\n keep_osymbols=False, keep_state_numbering=False)\n\n Class used to compile FSTs from strings.\n\n This class is used to compile FSTs specified using the AT&T FSM library\n format described here:\n\n http://web.eecs.umich.edu/~radev/NLP-fall2015/resources/fsm_archive/fsm.5.html\n\n This is the same format used by the `fstcompile` executable.\n\n Compiler options (symbol tables, etc.) are set at construction time.\n\n compiler = fst.Compiler(isymbols=ascii_symbols, osymbols=ascii_symbols)\n\n Once constructed, Compiler instances behave like a file handle opened for\n writing:\n\n # /ba+/\n compiler.write(\"0 1 50 50\")\n compiler.write(\"1 2 49 49\")\n compiler.write(\"2 2 49 49\")\n compiler.write(\"2\")\n\n The `compile` method returns an actual FST instance:\n\n sheep_machine = compiler.compile()\n\n Compilation flushes the internal buffer, so the compiler instance can be\n reused to compile new machines with the same symbol tables (etc.)\n\n Args:\n fst_type: A string indicating the container type for the compiled FST.\n arc_type: A string indicating the arc type for the compiled FST.\n isymbols: An optional SymbolTable used to label input symbols.\n osymbols: An optional SymbolTable used to label output symbols.\n ssymbols: An optional SymbolTable used to label states.\n acceptor: Should the FST be rendered in acceptor format if possible?\n keep_isymbols: Should the input symbol table be stored in the FST?\n keep_osymbols: Should the output symbol table be stored in the FST?\n keep_state_numbering: Should the state numbering be preserved?\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ @@ -68295,6 +68240,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_Arc___setstate_cython, __pyx_k_Arc___setstate_cython, sizeof(__pyx_k_Arc___setstate_cython), 0, 0, 1, 1}, {&__pyx_kp_u_Arc_at_0x, __pyx_k_Arc_at_0x, sizeof(__pyx_k_Arc_at_0x), 0, 1, 0, 0}, {&__pyx_n_s_Arc_copy, __pyx_k_Arc_copy, sizeof(__pyx_k_Arc_copy), 0, 0, 1, 1}, + {&__pyx_kp_u_Argument_FST_did_not_satisfy_pre, __pyx_k_Argument_FST_did_not_satisfy_pre, sizeof(__pyx_k_Argument_FST_did_not_satisfy_pre), 0, 1, 0, 0}, {&__pyx_n_s_BINARY_PROPERTIES, __pyx_k_BINARY_PROPERTIES, sizeof(__pyx_k_BINARY_PROPERTIES), 0, 0, 1, 1}, {&__pyx_n_s_COACCESSIBLE, __pyx_k_COACCESSIBLE, sizeof(__pyx_k_COACCESSIBLE), 0, 0, 1, 1}, {&__pyx_n_s_COPY_PROPERTIES, __pyx_k_COPY_PROPERTIES, sizeof(__pyx_k_COPY_PROPERTIES), 0, 0, 1, 1}, @@ -68592,9 +68538,10 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_u_Write_to_string_failed, __pyx_k_Write_to_string_failed, sizeof(__pyx_k_Write_to_string_failed), 0, 1, 0, 0}, {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, - {&__pyx_n_s__310, __pyx_k__310, sizeof(__pyx_k__310), 0, 0, 1, 1}, - {&__pyx_n_s__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 0, 1, 1}, - {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, + {&__pyx_n_s__313, __pyx_k__313, sizeof(__pyx_k__313), 0, 0, 1, 1}, + {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, + {&__pyx_n_s__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 1, 1}, + {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_acceptor, __pyx_k_acceptor, sizeof(__pyx_k_acceptor), 0, 0, 1, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, @@ -68603,7 +68550,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_add_states, __pyx_k_add_states, sizeof(__pyx_k_add_states), 0, 0, 1, 1}, {&__pyx_n_s_add_symbol, __pyx_k_add_symbol, sizeof(__pyx_k_add_symbol), 0, 0, 1, 1}, {&__pyx_n_s_add_table, __pyx_k_add_table, sizeof(__pyx_k_add_table), 0, 0, 1, 1}, - {&__pyx_n_s_allow_negative_labels, __pyx_k_allow_negative_labels, sizeof(__pyx_k_allow_negative_labels), 0, 0, 1, 1}, {&__pyx_n_s_allow_nondet, __pyx_k_allow_nondet, sizeof(__pyx_k_allow_nondet), 0, 0, 1, 1}, {&__pyx_n_s_arc, __pyx_k_arc, sizeof(__pyx_k_arc), 0, 0, 1, 1}, {&__pyx_n_s_arc_type, __pyx_k_arc_type, sizeof(__pyx_k_arc_type), 0, 0, 1, 1}, @@ -68765,7 +68711,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_one, __pyx_k_one, sizeof(__pyx_k_one), 0, 0, 1, 1}, {&__pyx_n_s_opairs, __pyx_k_opairs, sizeof(__pyx_k_opairs), 0, 0, 1, 1}, {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, - {&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_osymbols, __pyx_k_osymbols, sizeof(__pyx_k_osymbols), 0, 0, 1, 1}, {&__pyx_n_s_output_symbols, __pyx_k_output_symbols, sizeof(__pyx_k_output_symbols), 0, 0, 1, 1}, @@ -68838,6 +68783,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_s_self__weight_cannot_be_converted, __pyx_k_self__weight_cannot_be_converted, sizeof(__pyx_k_self__weight_cannot_be_converted), 0, 0, 1, 0}, {&__pyx_kp_s_self__writer_cannot_be_converted, __pyx_k_self__writer_cannot_be_converted, sizeof(__pyx_k_self__writer_cannot_be_converted), 0, 0, 1, 0}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, + {&__pyx_n_s_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1}, {&__pyx_n_s_set_final, __pyx_k_set_final, sizeof(__pyx_k_set_final), 0, 0, 1, 1}, {&__pyx_n_s_set_flags, __pyx_k_set_flags, sizeof(__pyx_k_set_flags), 0, 0, 1, 1}, {&__pyx_n_s_set_input_symbols, __pyx_k_set_input_symbols, sizeof(__pyx_k_set_input_symbols), 0, 0, 1, 1}, @@ -68898,7 +68844,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_kp_u_typing_Literal_ilabel_olabel, __pyx_k_typing_Literal_ilabel_olabel, sizeof(__pyx_k_typing_Literal_ilabel_olabel), 0, 1, 0, 0}, {&__pyx_kp_u_typing_Literal_input_output, __pyx_k_typing_Literal_input_output, sizeof(__pyx_k_typing_Literal_input_output), 0, 1, 0, 0}, {&__pyx_kp_u_typing_Literal_neither_input_out, __pyx_k_typing_Literal_neither_input_out, sizeof(__pyx_k_typing_Literal_neither_input_out), 0, 1, 0, 0}, - {&__pyx_kp_u_typing_Literal_to_inital_to_fina, __pyx_k_typing_Literal_to_inital_to_fina, sizeof(__pyx_k_typing_Literal_to_inital_to_fina), 0, 1, 0, 0}, + {&__pyx_kp_u_typing_Literal_to_initial_to_fin, __pyx_k_typing_Literal_to_initial_to_fin, sizeof(__pyx_k_typing_Literal_to_initial_to_fin), 0, 1, 0, 0}, {&__pyx_kp_u_typing_Literal_uniform_log_prob, __pyx_k_typing_Literal_uniform_log_prob, sizeof(__pyx_k_typing_Literal_uniform_log_prob), 0, 1, 0, 0}, {&__pyx_kp_u_typing_Union_Weight_typing_Union, __pyx_k_typing_Union_Weight_typing_Union, sizeof(__pyx_k_typing_Union_Weight_typing_Union), 0, 1, 0, 0}, {&__pyx_n_u_uniform, __pyx_k_uniform, sizeof(__pyx_k_uniform), 0, 1, 0, 1}, @@ -68930,15 +68876,15 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { } /* #### Code section: cached_builtins ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 151, __pyx_L1_error) - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 161, __pyx_L1_error) - __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 166, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 171, __pyx_L1_error) - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1483, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 200, __pyx_L1_error) - __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 488, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 809, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 484, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1345, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 4714, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -68950,81 +68896,81 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "_pywrapfst.pyx":510 + /* "_pywrapfst.pyx":506 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 510, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 506, __pyx_L1_error) - /* "_pywrapfst.pyx":523 + /* "_pywrapfst.pyx":519 * # C++ part out-of-class and then call it from within. * * @classmethod # <<<<<<<<<<<<<< * def zero(cls, weight_type): * """ */ - __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_weight_type); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 523, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_zero, 523, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_weight_type); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_zero, 519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 519, __pyx_L1_error) - /* "_pywrapfst.pyx":532 + /* "_pywrapfst.pyx":528 * return _zero(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def one(cls, weight_type): * """ */ - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_one, 532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_one, 528, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 528, __pyx_L1_error) - /* "_pywrapfst.pyx":541 + /* "_pywrapfst.pyx":537 * return _one(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def no_weight(cls, weight_type): * """ */ - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_no_weight, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_no_weight, 537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 537, __pyx_L1_error) - /* "_pywrapfst.pyx":556 + /* "_pywrapfst.pyx":552 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< * return self._weight.get().ToString() * */ - __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_to_string, 556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_to_string, 552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 552, __pyx_L1_error) - /* "_pywrapfst.pyx":559 + /* "_pywrapfst.pyx":555 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< * """type(self) * */ - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_type, 559, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_type, 555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 555, __pyx_L1_error) - /* "_pywrapfst.pyx":566 + /* "_pywrapfst.pyx":562 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< * return self._weight.get().Member() * */ - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_member, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_member, 562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 562, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._weight cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -69032,299 +68978,299 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._weight cannot be converted to a Python object for pickling" */ - __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__51); + __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":577 + /* "_pywrapfst.pyx":573 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * plus(lhs, rhs) */ - __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 577, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_plus, 577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_tuple__53 = PyTuple_Pack(3, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__53); + __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_plus, 573, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 573, __pyx_L1_error) - /* "_pywrapfst.pyx":609 + /* "_pywrapfst.pyx":605 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * times(lhs, rhs) */ - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_times, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_times, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 605, __pyx_L1_error) - /* "_pywrapfst.pyx":641 + /* "_pywrapfst.pyx":637 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * divide(lhs, rhs) */ - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_divide, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_divide, 637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 637, __pyx_L1_error) - /* "_pywrapfst.pyx":674 + /* "_pywrapfst.pyx":670 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< * """ * power(lhs, rhs) */ - __pyx_tuple__54 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 674, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_power, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(3, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_weight_2); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__57); + __Pyx_GIVEREF(__pyx_tuple__57); + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_power, 670, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 670, __pyx_L1_error) - /* "_pywrapfst.pyx":816 + /* "_pywrapfst.pyx":812 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_SymbolTable_from_string, (self.write_to_string(),)) * */ - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 816, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 812, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 812, __pyx_L1_error) - /* "_pywrapfst.pyx":838 + /* "_pywrapfst.pyx":834 * return _raw * * cpdef int64_t available_key(self) except *: # <<<<<<<<<<<<<< * """ * available_key(self) */ - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_available_key, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_available_key, 834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 834, __pyx_L1_error) - /* "_pywrapfst.pyx":846 + /* "_pywrapfst.pyx":842 * return self._raw_ptr_or_raise().AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< * """ * checksum(self) */ - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_checksum, 846, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_checksum, 842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 842, __pyx_L1_error) - /* "_pywrapfst.pyx":854 + /* "_pywrapfst.pyx":850 * return self._raw_ptr_or_raise().CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 854, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 850, __pyx_L1_error) - /* "_pywrapfst.pyx":862 + /* "_pywrapfst.pyx":858 * return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) * * def find(self, key): # <<<<<<<<<<<<<< * """ * find(self, key) */ - __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_raw); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 862, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__60); - __Pyx_GIVEREF(__pyx_tuple__60); - __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_find, 862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_raw); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__63); + __Pyx_GIVEREF(__pyx_tuple__63); + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_find, 858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 858, __pyx_L1_error) - /* "_pywrapfst.pyx":885 + /* "_pywrapfst.pyx":881 * return _raw.FindSymbol(key) * * cpdef int64_t get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< * """ * get_nth_key(self, pos) */ - __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 885, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_nth_key, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__65); + __Pyx_GIVEREF(__pyx_tuple__65); + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_nth_key, 881, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 881, __pyx_L1_error) - /* "_pywrapfst.pyx":899 + /* "_pywrapfst.pyx":895 * return self._raw_ptr_or_raise().GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< * """ * labeled_checksum(self) */ - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_labeled_checksum, 899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_labeled_checksum, 895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 895, __pyx_L1_error) - /* "_pywrapfst.pyx":907 + /* "_pywrapfst.pyx":903 * return self._raw_ptr_or_raise().LabeledCheckSum() * * cpdef bool member(self, key) except *: # <<<<<<<<<<<<<< * """ * member(self, key) */ - __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 907, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__65); - __Pyx_GIVEREF(__pyx_tuple__65); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_member, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 907, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__68); + __Pyx_GIVEREF(__pyx_tuple__68); + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_member, 903, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 903, __pyx_L1_error) - /* "_pywrapfst.pyx":929 + /* "_pywrapfst.pyx":925 * return _raw.MemberIndex(key) * * cpdef string name(self) except *: # <<<<<<<<<<<<<< * """ * name(self) */ - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_name_2, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_name_2, 925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 925, __pyx_L1_error) - /* "_pywrapfst.pyx":937 + /* "_pywrapfst.pyx":933 * return self._raw_ptr_or_raise().Name() * * cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<< * """ * num_symbols(self) */ - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_symbols, 937, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_symbols, 933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 933, __pyx_L1_error) - /* "_pywrapfst.pyx":945 + /* "_pywrapfst.pyx":941 * return self._raw_ptr_or_raise().NumSymbols() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_source); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 945, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_tuple__72 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_source); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__72); + __Pyx_GIVEREF(__pyx_tuple__72); + __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 941, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 941, __pyx_L1_error) - /* "_pywrapfst.pyx":962 + /* "_pywrapfst.pyx":958 * raise FstIOError(f"Write failed: {source!r}") * - * cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<< + * def write_text(self, source, *, sep="\t "): # <<<<<<<<<<<<<< * """ - * write_text(self, source) + * write_text(self, source, *, sep="\t ") */ - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_text, 962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_tuple__74 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_sep); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__74); + __Pyx_GIVEREF(__pyx_tuple__74); + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_text, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 958, __pyx_L1_error) - /* "_pywrapfst.pyx":979 + /* "_pywrapfst.pyx":978 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 979, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 978, __pyx_L1_error) - /* "_pywrapfst.pyx":1073 + /* "_pywrapfst.pyx":1072 * return mutable_raw * * cpdef int64_t add_symbol(self, symbol, int64_t key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<< * """ * add_symbol(self, symbol, key=NO_SYMBOL) */ - __pyx_tuple__73 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_symbol, __pyx_n_s_key); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1073, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_symbol, 1073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_symbol, __pyx_n_s_key); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__77); + __Pyx_GIVEREF(__pyx_tuple__77); + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_symbol, 1072, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1072, __pyx_L1_error) - /* "_pywrapfst.pyx":1097 + /* "_pywrapfst.pyx":1096 * return _mutable_raw.AddSymbol(_symbol) * * cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< * """ * add_table(self, symbols) */ - __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1097, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__75); - __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_table, 1097, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_table, 1096, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1096, __pyx_L1_error) - /* "_pywrapfst.pyx":1112 + /* "_pywrapfst.pyx":1111 * deref(symbols._raw_ptr_or_raise())) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< * self._mutable_raw_ptr_or_raise().SetName(tostring(new_name)) * */ - __pyx_tuple__77 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_name); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1112, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__77); - __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_name, 1112, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_name); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_name, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1111, __pyx_L1_error) - /* "_pywrapfst.pyx":1157 + /* "_pywrapfst.pyx":1156 * return self._smart_table.get() * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_tuple__79 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__79); - __Pyx_GIVEREF(__pyx_tuple__79); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_tuple__83 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1156, __pyx_L1_error) - /* "_pywrapfst.pyx":1178 + /* "_pywrapfst.pyx":1177 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< - * def read_text(cls, source, bool allow_negative_labels=False): + * def read_text(cls, source, *, sep="\t "): * """ */ - __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_allow_negative_labels, __pyx_n_s_opts, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1178, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__81); - __Pyx_GIVEREF(__pyx_tuple__81); - __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_text, 1178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1178, __pyx_L1_error) - __pyx_tuple__83 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1178, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__83); - __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_tuple__85 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_sep, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_text, 1177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1177, __pyx_L1_error) - /* "_pywrapfst.pyx":1204 + /* "_pywrapfst.pyx":1200 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< * def read_fst(cls, source, bool input_table): * """ */ - __pyx_tuple__84 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_input_table, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_fst, 1204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_input_table, __pyx_n_s_symbols_2); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_fst, 1200, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1200, __pyx_L1_error) - /* "_pywrapfst.pyx":1266 + /* "_pywrapfst.pyx":1262 * * * cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__86); - __Pyx_GIVEREF(__pyx_tuple__86); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_SymbolTable_from_string, 1266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_SymbolTable_from_string, 1262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1262, __pyx_L1_error) - /* "_pywrapfst.pyx":1279 + /* "_pywrapfst.pyx":1275 * * * cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * compact_symbol_table(symbols) */ - __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__88); - __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compact_symbol_table, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_tuple__91 = PyTuple_Pack(1, __pyx_n_s_symbols); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compact_symbol_table, 1275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1275, __pyx_L1_error) - /* "_pywrapfst.pyx":1295 + /* "_pywrapfst.pyx":1291 * * * cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<< * SymbolTableView rhs): * """ */ - __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_lhs, __pyx_n_s_rhs); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1295, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_merge_symbol_table, 1295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_lhs, __pyx_n_s_rhs); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_merge_symbol_table, 1291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1291, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._siter cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -69332,785 +69278,785 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._siter cannot be converted to a Python object for pickling" */ - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":1417 + /* "_pywrapfst.pyx":1413 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * */ - __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 1417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 1413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1413, __pyx_L1_error) - /* "_pywrapfst.pyx":1420 + /* "_pywrapfst.pyx":1416 * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 1420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 1416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 1416, __pyx_L1_error) - /* "_pywrapfst.pyx":1428 + /* "_pywrapfst.pyx":1424 * return self._mapper.get().ArcType() * * cpdef string weight_type(self): # <<<<<<<<<<<<<< * """ * weight_type(self) */ - __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_weight_type, 1428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_weight_type, 1424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1424, __pyx_L1_error) - /* "_pywrapfst.pyx":1436 + /* "_pywrapfst.pyx":1432 * return self._mapper.get().WeightType() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 1436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 1432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1432, __pyx_L1_error) - /* "_pywrapfst.pyx":1444 + /* "_pywrapfst.pyx":1440 * return self._mapper.get().Flags() * * def properties(self, mask): # <<<<<<<<<<<<<< * """ * properties(self, mask) */ - __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1444, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__98); - __Pyx_GIVEREF(__pyx_tuple__98); - __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_properties, 1444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1440, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__101); + __Pyx_GIVEREF(__pyx_tuple__101); + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_properties, 1440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1440, __pyx_L1_error) - /* "_pywrapfst.pyx":1461 + /* "_pywrapfst.pyx":1457 * return FstProperties(self._mapper.get().Properties(mask.value)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_tuple__100 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_mapper_2); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__100); - __Pyx_GIVEREF(__pyx_tuple__100); - __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_mapper_2); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__103); + __Pyx_GIVEREF(__pyx_tuple__103); + __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1457, __pyx_L1_error) - /* "_pywrapfst.pyx":1483 + /* "_pywrapfst.pyx":1479 * return _init_EncodeMapper(_mapper.release()) * * @staticmethod # <<<<<<<<<<<<<< * def read_from_string(state): * """ */ - __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_from_string, 1483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1483, __pyx_L1_error) + __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_from_string, 1479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1479, __pyx_L1_error) - /* "_pywrapfst.pyx":1501 + /* "_pywrapfst.pyx":1497 * return _read_EncodeMapper_from_string(state) * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 1501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 1497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1497, __pyx_L1_error) - /* "_pywrapfst.pyx":1517 + /* "_pywrapfst.pyx":1513 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 1517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1513, __pyx_L1_error) - /* "_pywrapfst.pyx":1534 + /* "_pywrapfst.pyx":1530 * return _sstrm.str() * * cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< * """ * input_symbols(self) */ - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_input_symbols, 1534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_input_symbols, 1530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1530, __pyx_L1_error) - /* "_pywrapfst.pyx":1544 + /* "_pywrapfst.pyx":1540 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) * * cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< * """ * output_symbols(self) */ - __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_output_symbols, 1544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_output_symbols, 1540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1540, __pyx_L1_error) - /* "_pywrapfst.pyx":1560 + /* "_pywrapfst.pyx":1556 * self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_input_symbols(self, symbols) */ - __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_input_symbols, 1560, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_input_symbols, 1556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1556, __pyx_L1_error) - /* "_pywrapfst.pyx":1583 + /* "_pywrapfst.pyx":1579 * self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_output_symbols(self, symbols) */ - __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_output_symbols, 1583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_output_symbols, 1579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1579, __pyx_L1_error) - /* "_pywrapfst.pyx":1607 + /* "_pywrapfst.pyx":1603 * * * cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_EncodeMapper_from_string, 1607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_EncodeMapper_from_string, 1603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1603, __pyx_L1_error) - /* "_pywrapfst.pyx":1649 + /* "_pywrapfst.pyx":1645 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< * """IPython notebook magic to produce an SVG of the FST using GraphViz. * */ - __pyx_tuple__110 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sstrm, __pyx_n_s_acceptor, __pyx_n_s_e); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1649, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__110); - __Pyx_GIVEREF(__pyx_tuple__110); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_repr_svg, 1649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sstrm, __pyx_n_s_acceptor, __pyx_n_s_e); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 1645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__113); + __Pyx_GIVEREF(__pyx_tuple__113); + __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_repr_svg, 1645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 1645, __pyx_L1_error) - /* "_pywrapfst.pyx":1688 + /* "_pywrapfst.pyx":1684 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_Fst_from_string, (self.write_to_string(),)) * */ - __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 1688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reduce, 1684, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1684, __pyx_L1_error) - /* "_pywrapfst.pyx":1697 + /* "_pywrapfst.pyx":1693 * return self.print() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 1697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1697, __pyx_L1_error) + __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 1693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1693, __pyx_L1_error) - /* "_pywrapfst.pyx":1705 + /* "_pywrapfst.pyx":1701 * return self._fst.get().ArcType() * * cpdef _ArcIterator arcs(self, int64_t state): # <<<<<<<<<<<<<< * """ * arcs(self, state) */ - __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_state); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1705, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__114); - __Pyx_GIVEREF(__pyx_tuple__114); - __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcs, 1705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_state); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__117); + __Pyx_GIVEREF(__pyx_tuple__117); + __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcs, 1701, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1701, __pyx_L1_error) - /* "_pywrapfst.pyx":1719 + /* "_pywrapfst.pyx":1715 * return _ArcIterator(self, state) * * cpdef Fst copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 1719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 1715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1715, __pyx_L1_error) - /* "_pywrapfst.pyx":1727 + /* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< * source, * SymbolTableView isymbols=None, */ - __pyx_tuple__117 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_isymbols, __pyx_n_s_osymbols, __pyx_n_s_ssymbols, __pyx_n_s_acceptor, __pyx_n_s_title, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_portrait, __pyx_n_s_vertical, __pyx_n_s_ranksep, __pyx_n_s_nodesep, __pyx_n_s_fontsize, __pyx_n_s_precision, __pyx_n_s_float_format, __pyx_n_s_show_weight_one); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 1727, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__117); - __Pyx_GIVEREF(__pyx_tuple__117); - __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(17, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_draw, 1727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1727, __pyx_L1_error) - __pyx_tuple__119 = PyTuple_Pack(15, Py_None, Py_None, Py_None, Py_False, __pyx_kp_u__5, __pyx_float_8_5, __pyx_float_11_0, Py_False, Py_False, __pyx_float_0_4, __pyx_float_0_25, __pyx_int_14, __pyx_int_5, __pyx_n_u_g, Py_False); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 1727, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__119); - __Pyx_GIVEREF(__pyx_tuple__119); + __pyx_tuple__120 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_isymbols, __pyx_n_s_osymbols, __pyx_n_s_ssymbols, __pyx_n_s_acceptor, __pyx_n_s_title, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_portrait, __pyx_n_s_vertical, __pyx_n_s_ranksep, __pyx_n_s_nodesep, __pyx_n_s_fontsize, __pyx_n_s_precision, __pyx_n_s_float_format, __pyx_n_s_show_weight_one); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__120); + __Pyx_GIVEREF(__pyx_tuple__120); + __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(17, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_draw, 1723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_tuple__122 = PyTuple_Pack(15, Py_None, Py_None, Py_None, Py_False, __pyx_kp_u__6, __pyx_float_8_5, __pyx_float_11_0, Py_False, Py_False, __pyx_float_0_4, __pyx_float_0_25, __pyx_int_14, __pyx_int_5, __pyx_n_u_g, Py_False); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__122); + __Pyx_GIVEREF(__pyx_tuple__122); - /* "_pywrapfst.pyx":1806 + /* "_pywrapfst.pyx":1802 * _source) * * cpdef Weight final(self, int64_t state): # <<<<<<<<<<<<<< * """ * final(self, state) */ - __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_final, 1806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1806, __pyx_L1_error) + __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_final, 1802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1802, __pyx_L1_error) - /* "_pywrapfst.pyx":1827 + /* "_pywrapfst.pyx":1823 * return _weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< * """ * fst_type(self) */ - __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_fst_type, 1827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1827, __pyx_L1_error) + __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_fst_type, 1823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1823, __pyx_L1_error) - /* "_pywrapfst.pyx":1835 + /* "_pywrapfst.pyx":1831 * return self._fst.get().FstType() * * cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< * """ * input_symbols(self) */ - __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_input_symbols, 1835, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1835, __pyx_L1_error) + __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_input_symbols, 1831, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1831, __pyx_L1_error) - /* "_pywrapfst.pyx":1845 + /* "_pywrapfst.pyx":1841 * return _init_FstSymbolTableView(self._fst, input_side=True) * * cpdef size_t num_arcs(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_arcs(self, state) */ - __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_arcs, 1845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1845, __pyx_L1_error) + __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_arcs, 1841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1841, __pyx_L1_error) - /* "_pywrapfst.pyx":1865 + /* "_pywrapfst.pyx":1861 * return _result * * cpdef size_t num_input_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_input_epsilons(self, state) */ - __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_input_epsilons, 1865, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_input_epsilons, 1861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 1861, __pyx_L1_error) - /* "_pywrapfst.pyx":1885 + /* "_pywrapfst.pyx":1881 * return _result * * cpdef size_t num_output_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_output_epsilons(self, state) */ - __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_output_epsilons, 1885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_output_epsilons, 1881, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1881, __pyx_L1_error) - /* "_pywrapfst.pyx":1905 + /* "_pywrapfst.pyx":1901 * return _result * * cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< * """ * output_symbols(self) */ - __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_output_symbols, 1905, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 1905, __pyx_L1_error) + __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_output_symbols, 1901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 1901, __pyx_L1_error) - /* "_pywrapfst.pyx":1915 + /* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, * bool acceptor=False, bool show_weight_one=False, */ - __pyx_tuple__127 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_isymbols, __pyx_n_s_osymbols, __pyx_n_s_ssymbols, __pyx_n_s_acceptor, __pyx_n_s_show_weight_one, __pyx_n_s_missing_sym); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1915, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__127); - __Pyx_GIVEREF(__pyx_tuple__127); - __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_print, 1915, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1915, __pyx_L1_error) - __pyx_tuple__129 = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_False, Py_False, __pyx_kp_u__5); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1915, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__129); - __Pyx_GIVEREF(__pyx_tuple__129); + __pyx_tuple__130 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_isymbols, __pyx_n_s_osymbols, __pyx_n_s_ssymbols, __pyx_n_s_acceptor, __pyx_n_s_show_weight_one, __pyx_n_s_missing_sym); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 1911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__130); + __Pyx_GIVEREF(__pyx_tuple__130); + __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_print, 1911, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1911, __pyx_L1_error) + __pyx_tuple__132 = PyTuple_Pack(6, Py_None, Py_None, Py_None, Py_False, Py_False, __pyx_kp_u__6); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 1911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__132); + __Pyx_GIVEREF(__pyx_tuple__132); - /* "_pywrapfst.pyx":1962 + /* "_pywrapfst.pyx":1958 * return _sstrm.str() * * def properties(self, mask, bool test): # <<<<<<<<<<<<<< * """ * properties(self, mask, test) */ - __pyx_tuple__130 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_mask, __pyx_n_s_test); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 1962, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__130); - __Pyx_GIVEREF(__pyx_tuple__130); - __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_properties, 1962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1962, __pyx_L1_error) + __pyx_tuple__133 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_mask, __pyx_n_s_test); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 1958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__133); + __Pyx_GIVEREF(__pyx_tuple__133); + __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_properties, 1958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 1958, __pyx_L1_error) - /* "_pywrapfst.pyx":1982 + /* "_pywrapfst.pyx":1978 * return FstProperties(self._fst.get().Properties(mask.value, test)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_tuple__132 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_source); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 1982, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__132); - __Pyx_GIVEREF(__pyx_tuple__132); - __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 1982, __pyx_L1_error) + __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_source); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 1978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__135); + __Pyx_GIVEREF(__pyx_tuple__135); + __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read, 1978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1978, __pyx_L1_error) - /* "_pywrapfst.pyx":2000 + /* "_pywrapfst.pyx":1996 * return _read_Fst(source) * * @classmethod # <<<<<<<<<<<<<< * def read_from_string(cls, state): * """ */ - __pyx_tuple__134 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_state); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 2000, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__134); - __Pyx_GIVEREF(__pyx_tuple__134); - __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_from_string, 2000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_state); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__137); + __Pyx_GIVEREF(__pyx_tuple__137); + __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_from_string, 1996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 1996, __pyx_L1_error) - /* "_pywrapfst.pyx":2018 + /* "_pywrapfst.pyx":2014 * return _read_Fst_from_string(state) * * cpdef int64_t start(self): # <<<<<<<<<<<<<< * """ * start(self) */ - __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_start, 2018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 2018, __pyx_L1_error) + __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_start, 2014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2014, __pyx_L1_error) - /* "_pywrapfst.pyx":2026 + /* "_pywrapfst.pyx":2022 * return self._fst.get().Start() * * cpdef _StateIterator states(self): # <<<<<<<<<<<<<< * """ * states(self) */ - __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_states, 2026, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 2026, __pyx_L1_error) + __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_states, 2022, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2022, __pyx_L1_error) - /* "_pywrapfst.pyx":2037 + /* "_pywrapfst.pyx":2033 * return _StateIterator(self) * * cpdef bool verify(self): # <<<<<<<<<<<<<< * """ * verify(self) */ - __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_verify, 2037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 2037, __pyx_L1_error) + __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_verify, 2033, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2033, __pyx_L1_error) - /* "_pywrapfst.pyx":2048 + /* "_pywrapfst.pyx":2044 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< * """ * weight_type(self) */ - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_weight_type, 2048, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 2048, __pyx_L1_error) + __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_weight_type, 2044, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2044, __pyx_L1_error) - /* "_pywrapfst.pyx":2059 + /* "_pywrapfst.pyx":2055 * return self._fst.get().WeightType() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 2059, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 2059, __pyx_L1_error) + __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 2055, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 2055, __pyx_L1_error) - /* "_pywrapfst.pyx":2076 + /* "_pywrapfst.pyx":2072 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 2076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write_to_string, 2072, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 2072, __pyx_L1_error) - /* "_pywrapfst.pyx":2117 + /* "_pywrapfst.pyx":2113 * raise FstOpError("Incompatible or invalid weight type") * * def add_arc(self, int64_t state, Arc arc): # <<<<<<<<<<<<<< * """ * add_arc(self, state, arc) */ - __pyx_tuple__142 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_arc); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 2117, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__142); - __Pyx_GIVEREF(__pyx_tuple__142); - __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_arc, 2117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 2117, __pyx_L1_error) + __pyx_tuple__145 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_arc); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 2113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__145); + __Pyx_GIVEREF(__pyx_tuple__145); + __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_arc, 2113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 2113, __pyx_L1_error) - /* "_pywrapfst.pyx":2137 + /* "_pywrapfst.pyx":2133 * return self * * cpdef int64_t add_state(self): # <<<<<<<<<<<<<< * """ * add_state(self) */ - __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_state, 2137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_state, 2133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 2133, __pyx_L1_error) - /* "_pywrapfst.pyx":2148 + /* "_pywrapfst.pyx":2144 * return self._mfst.get().AddState() * * cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<< * """ * add_states(self, n) */ - __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 2148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__145); - __Pyx_GIVEREF(__pyx_tuple__145); - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_states, 2148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 2148, __pyx_L1_error) + __pyx_tuple__148 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__148); + __Pyx_GIVEREF(__pyx_tuple__148); + __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add_states, 2144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2144, __pyx_L1_error) - /* "_pywrapfst.pyx":2165 + /* "_pywrapfst.pyx":2161 * fst.ArcSort(self._mfst.get(), _sort_type) * * def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<< * """ * arcsort(self, sort_type="ilabel") */ - __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_sort_type); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 2165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__147); - __Pyx_GIVEREF(__pyx_tuple__147); - __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcsort, 2165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2165, __pyx_L1_error) - __pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_u_ilabel); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 2165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__149); - __Pyx_GIVEREF(__pyx_tuple__149); + __pyx_tuple__150 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_sort_type); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 2161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__150); + __Pyx_GIVEREF(__pyx_tuple__150); + __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcsort, 2161, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2161, __pyx_L1_error) + __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_u_ilabel); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 2161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__152); + __Pyx_GIVEREF(__pyx_tuple__152); - /* "_pywrapfst.pyx":2190 + /* "_pywrapfst.pyx":2186 * fst.Closure(self._mfst.get(), _get_closure_type(tostring(closure_type))) * * def closure(self, closure_type="star"): # <<<<<<<<<<<<<< * """ * closure(self, closure_type="star") */ - __pyx_tuple__150 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_closure_type); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 2190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__150); - __Pyx_GIVEREF(__pyx_tuple__150); - __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_closure, 2190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2190, __pyx_L1_error) - __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_u_star); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 2190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__152); - __Pyx_GIVEREF(__pyx_tuple__152); + __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_closure_type); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__153); + __Pyx_GIVEREF(__pyx_tuple__153); + __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_closure, 2186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2186, __pyx_L1_error) + __pyx_tuple__155 = PyTuple_Pack(1, __pyx_n_u_star); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__155); + __Pyx_GIVEREF(__pyx_tuple__155); - /* "_pywrapfst.pyx":2215 + /* "_pywrapfst.pyx":2212 * self._check_mutating_imethod() * * def concat(self, Fst fst2): # <<<<<<<<<<<<<< * """ * concat(self, fst2) */ - __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fst2); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 2215, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__153); - __Pyx_GIVEREF(__pyx_tuple__153); - __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_concat, 2215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2215, __pyx_L1_error) + __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_fst2); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 2212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__156); + __Pyx_GIVEREF(__pyx_tuple__156); + __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_concat, 2212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2212, __pyx_L1_error) - /* "_pywrapfst.pyx":2238 + /* "_pywrapfst.pyx":2235 * fst.Connect(self._mfst.get()) * * def connect(self): # <<<<<<<<<<<<<< * """ * connect(self) */ - __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_connect, 2238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2238, __pyx_L1_error) + __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_connect, 2235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 2235, __pyx_L1_error) - /* "_pywrapfst.pyx":2257 + /* "_pywrapfst.pyx":2254 * self._check_mutating_imethod() * * def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< * """ * decode(self, mapper) */ - __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_mapper); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 2257, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__156); - __Pyx_GIVEREF(__pyx_tuple__156); - __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_decode, 2257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2257, __pyx_L1_error) + __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_mapper); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 2254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__159); + __Pyx_GIVEREF(__pyx_tuple__159); + __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_decode, 2254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2254, __pyx_L1_error) - /* "_pywrapfst.pyx":2280 + /* "_pywrapfst.pyx":2277 * self._check_mutating_imethod() * * def delete_arcs(self, int64_t state, size_t n=0): # <<<<<<<<<<<<<< * """ * delete_arcs(self, state, n=0) */ - __pyx_tuple__158 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_n); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 2280, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__158); - __Pyx_GIVEREF(__pyx_tuple__158); - __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_delete_arcs, 2280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2280, __pyx_L1_error) - __pyx_tuple__160 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 2280, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__160); - __Pyx_GIVEREF(__pyx_tuple__160); + __pyx_tuple__161 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_n); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 2277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__161); + __Pyx_GIVEREF(__pyx_tuple__161); + __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_delete_arcs, 2277, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 2277, __pyx_L1_error) + __pyx_tuple__163 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 2277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__163); + __Pyx_GIVEREF(__pyx_tuple__163); - /* "_pywrapfst.pyx":2310 + /* "_pywrapfst.pyx":2307 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< * """ * delete_states(self, states=None) */ - __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_states); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 2310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__161); - __Pyx_GIVEREF(__pyx_tuple__161); - __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_delete_states, 2310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 2310, __pyx_L1_error) - __pyx_tuple__163 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 2310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__163); - __Pyx_GIVEREF(__pyx_tuple__163); + __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_states); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 2307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__164); + __Pyx_GIVEREF(__pyx_tuple__164); + __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_delete_states, 2307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 2307, __pyx_L1_error) + __pyx_tuple__166 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 2307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__166); + __Pyx_GIVEREF(__pyx_tuple__166); - /* "_pywrapfst.pyx":2333 + /* "_pywrapfst.pyx":2330 * self._check_mutating_imethod() * * def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< * """ * encode(self, mapper) */ - __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_encode, 2333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_encode, 2330, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 2330, __pyx_L1_error) - /* "_pywrapfst.pyx":2358 + /* "_pywrapfst.pyx":2355 * fst.Invert(self._mfst.get()) * * def invert(self): # <<<<<<<<<<<<<< * """ * invert(self) */ - __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_invert, 2358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 2358, __pyx_L1_error) + __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_invert, 2355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 2355, __pyx_L1_error) - /* "_pywrapfst.pyx":2380 + /* "_pywrapfst.pyx":2377 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< * """ * minimize(self, delta=1e-6, allow_nondet=False) */ - __pyx_tuple__166 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_allow_nondet); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 2380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__166); - __Pyx_GIVEREF(__pyx_tuple__166); - __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_minimize, 2380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_allow_nondet); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 2377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__169); + __Pyx_GIVEREF(__pyx_tuple__169); + __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_minimize, 2377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 2377, __pyx_L1_error) - /* "_pywrapfst.pyx":2409 + /* "_pywrapfst.pyx":2406 * return self * * cpdef _MutableArcIterator mutable_arcs(self, int64_t state): # <<<<<<<<<<<<<< * """ * mutable_arcs(self, state) */ - __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_arcs, 2409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_arcs, 2406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 2406, __pyx_L1_error) - /* "_pywrapfst.pyx":2423 + /* "_pywrapfst.pyx":2420 * return _MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< * """ * mutable_input_symbols(self) */ - __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_input_symbols, 2423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 2423, __pyx_L1_error) + __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_input_symbols, 2420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 2420, __pyx_L1_error) - /* "_pywrapfst.pyx":2433 + /* "_pywrapfst.pyx":2430 * return _init_MutableFstSymbolTableView(self._mfst, input_side=True) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< * """ * mutable_output_symbols(self) */ - __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_output_symbols, 2433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 2433, __pyx_L1_error) + __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_mutable_output_symbols, 2430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 2430, __pyx_L1_error) - /* "_pywrapfst.pyx":2443 + /* "_pywrapfst.pyx":2440 * return _init_MutableFstSymbolTableView(self._mfst, input_side=False) * * cpdef int64_t num_states(self): # <<<<<<<<<<<<<< * """ * num_states(self) */ - __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_states, 2443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_num_states, 2440, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 2440, __pyx_L1_error) - /* "_pywrapfst.pyx":2454 + /* "_pywrapfst.pyx":2451 * fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) * * def project(self, project_type): # <<<<<<<<<<<<<< * """ * project(self, project_type) */ - __pyx_tuple__172 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_project_type); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 2454, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__172); - __Pyx_GIVEREF(__pyx_tuple__172); - __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_project, 2454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_project_type); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 2451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__175); + __Pyx_GIVEREF(__pyx_tuple__175); + __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_project, 2451, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 2451, __pyx_L1_error) - /* "_pywrapfst.pyx":2484 + /* "_pywrapfst.pyx":2481 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_tuple__174 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 2484, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__174); - __Pyx_GIVEREF(__pyx_tuple__174); - __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_prune, 2484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 2484, __pyx_L1_error) + __pyx_tuple__177 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 2481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__177); + __Pyx_GIVEREF(__pyx_tuple__177); + __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_prune, 2481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 2481, __pyx_L1_error) - /* "_pywrapfst.pyx":2519 + /* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * bool remove_total_weight=False, */ - __pyx_tuple__176 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_remove_total_weight, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 2519, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__176); - __Pyx_GIVEREF(__pyx_tuple__176); - __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_push, 2519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_tuple__179 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_delta, __pyx_n_s_remove_total_weight, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 2516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__179); + __Pyx_GIVEREF(__pyx_tuple__179); + __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_push, 2516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 2516, __pyx_L1_error) - /* "_pywrapfst.pyx":2564 + /* "_pywrapfst.pyx":2562 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< * """ * relabel_pairs(self, ipairs=None, opairs=None) */ - __pyx_tuple__178 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_ipairs, __pyx_n_s_opairs); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 2564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__178); - __Pyx_GIVEREF(__pyx_tuple__178); - __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_relabel_pairs, 2564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 2564, __pyx_L1_error) - __pyx_tuple__180 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 2564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__180); - __Pyx_GIVEREF(__pyx_tuple__180); + __pyx_tuple__181 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_ipairs, __pyx_n_s_opairs); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 2562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__181); + __Pyx_GIVEREF(__pyx_tuple__181); + __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_relabel_pairs, 2562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 2562, __pyx_L1_error) + __pyx_tuple__183 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 2562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__183); + __Pyx_GIVEREF(__pyx_tuple__183); - /* "_pywrapfst.pyx":2621 + /* "_pywrapfst.pyx":2619 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< * SymbolTableView old_isymbols=None, * SymbolTableView new_isymbols=None, */ - __pyx_tuple__181 = PyTuple_Pack(9, __pyx_n_s_self, __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); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 2621, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__181); - __Pyx_GIVEREF(__pyx_tuple__181); - __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_relabel_tables, 2621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 2621, __pyx_L1_error) - __pyx_tuple__183 = PyTuple_Pack(8, Py_None, Py_None, __pyx_kp_u__5, Py_True, Py_None, Py_None, __pyx_kp_u__5, Py_True); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 2621, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__183); - __Pyx_GIVEREF(__pyx_tuple__183); + __pyx_tuple__184 = PyTuple_Pack(9, __pyx_n_s_self, __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); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 2619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__184); + __Pyx_GIVEREF(__pyx_tuple__184); + __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_relabel_tables, 2619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 2619, __pyx_L1_error) + __pyx_tuple__186 = PyTuple_Pack(8, Py_None, Py_None, __pyx_kp_u__6, Py_True, Py_None, Py_None, __pyx_kp_u__6, Py_True); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 2619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__186); + __Pyx_GIVEREF(__pyx_tuple__186); - /* "_pywrapfst.pyx":2678 + /* "_pywrapfst.pyx":2676 * self._check_mutating_imethod() * * def reserve_arcs(self, int64_t state, size_t n): # <<<<<<<<<<<<<< * """ * reserve_arcs(self, state, n) */ - __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reserve_arcs, 2678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 2678, __pyx_L1_error) + __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reserve_arcs, 2676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 2676, __pyx_L1_error) - /* "_pywrapfst.pyx":2700 + /* "_pywrapfst.pyx":2698 * self._mfst.get().ReserveStates(n) * * def reserve_states(self, int64_t n): # <<<<<<<<<<<<<< * """ * reserve_states(self, n) */ - __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reserve_states, 2700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 2700, __pyx_L1_error) + __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reserve_states, 2698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 2698, __pyx_L1_error) - /* "_pywrapfst.pyx":2724 + /* "_pywrapfst.pyx":2722 * self._check_mutating_imethod() * * def reweight(self, potentials, reweight_type="to_initial"): # <<<<<<<<<<<<<< * """ * reweight(self, potentials, reweight_type="to_initial") */ - __pyx_tuple__186 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_potentials, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 2724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__186); - __Pyx_GIVEREF(__pyx_tuple__186); - __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reweight, 2724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 2724, __pyx_L1_error) - __pyx_tuple__188 = PyTuple_Pack(1, __pyx_n_u_to_initial); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 2724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__188); - __Pyx_GIVEREF(__pyx_tuple__188); + __pyx_tuple__189 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_potentials, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 2722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__189); + __Pyx_GIVEREF(__pyx_tuple__189); + __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reweight, 2722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_tuple__191 = PyTuple_Pack(1, __pyx_n_u_to_initial); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 2722, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__191); + __Pyx_GIVEREF(__pyx_tuple__191); - /* "_pywrapfst.pyx":2768 + /* "_pywrapfst.pyx":2766 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< * queue_type="auto", * bool connect=True, */ - __pyx_tuple__189 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_queue_type, __pyx_n_s_connect, __pyx_n_s_weight, __pyx_n_s_nstate, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 2768, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__189); - __Pyx_GIVEREF(__pyx_tuple__189); - __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_rmepsilon, 2768, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 2768, __pyx_L1_error) + __pyx_tuple__192 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_queue_type, __pyx_n_s_connect, __pyx_n_s_weight, __pyx_n_s_nstate, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 2766, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__192); + __Pyx_GIVEREF(__pyx_tuple__192); + __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_rmepsilon, 2766, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 2766, __pyx_L1_error) - /* "_pywrapfst.pyx":2807 + /* "_pywrapfst.pyx":2805 * self._check_mutating_imethod() * * def set_final(self, int64_t state, weight=None): # <<<<<<<<<<<<<< * """ * set_final(self, state, weight) */ - __pyx_tuple__191 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 2807, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__191); - __Pyx_GIVEREF(__pyx_tuple__191); - __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_final, 2807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 2807, __pyx_L1_error) + __pyx_tuple__194 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 2805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__194); + __Pyx_GIVEREF(__pyx_tuple__194); + __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_final, 2805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 2805, __pyx_L1_error) - /* "_pywrapfst.pyx":2834 + /* "_pywrapfst.pyx":2832 * self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_input_symbols(self, symbols) */ - __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_input_symbols, 2834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 2834, __pyx_L1_error) + __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_input_symbols, 2832, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 2832, __pyx_L1_error) - /* "_pywrapfst.pyx":2857 + /* "_pywrapfst.pyx":2855 * self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_output_symbols(self, symbols) */ - __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_output_symbols, 2857, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 2857, __pyx_L1_error) + __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_output_symbols, 2855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 2855, __pyx_L1_error) - /* "_pywrapfst.pyx":2874 + /* "_pywrapfst.pyx":2872 * return self * * def set_properties(self, props, mask): # <<<<<<<<<<<<<< * """ * set_properties(self, props, mask) */ - __pyx_tuple__195 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_props, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 2874, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__195); - __Pyx_GIVEREF(__pyx_tuple__195); - __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_properties, 2874, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 2874, __pyx_L1_error) + __pyx_tuple__198 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_props, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 2872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__198); + __Pyx_GIVEREF(__pyx_tuple__198); + __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_properties, 2872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 2872, __pyx_L1_error) - /* "_pywrapfst.pyx":2895 + /* "_pywrapfst.pyx":2893 * raise FstIndexError("State index out of range") * * def set_start(self, int64_t state): # <<<<<<<<<<<<<< * """ * set_start(self, state) */ - __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_start, 2895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 2895, __pyx_L1_error) + __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_start, 2893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 2893, __pyx_L1_error) - /* "_pywrapfst.pyx":2918 + /* "_pywrapfst.pyx":2916 * logging.warning("Cannot topsort cyclic FST") * * def topsort(self): # <<<<<<<<<<<<<< * """ * topsort(self) */ - __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_topsort, 2918, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 2918, __pyx_L1_error) + __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_topsort, 2916, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 2916, __pyx_L1_error) - /* "_pywrapfst.pyx":2934 + /* "_pywrapfst.pyx":2932 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< * """ * union(self, *fsts2) */ - __pyx_tuple__199 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_fsts2, __pyx_n_s_fst2_2, __pyx_n_s_fsts2_2); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 2934, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__199); - __Pyx_GIVEREF(__pyx_tuple__199); - __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_union, 2934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 2934, __pyx_L1_error) + __pyx_tuple__202 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_fsts2, __pyx_n_s_fst2_2, __pyx_n_s_fsts2_2); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 2932, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__202); + __Pyx_GIVEREF(__pyx_tuple__202); + __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_union, 2932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 2932, __pyx_L1_error) - /* "_pywrapfst.pyx":3024 + /* "_pywrapfst.pyx":3022 * * * cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) * if _tfst.get() == NULL: */ - __pyx_tuple__201 = PyTuple_Pack(1, __pyx_n_s_source); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 3024, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__201); - __Pyx_GIVEREF(__pyx_tuple__201); - __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_Fst, 3024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_tuple__204 = PyTuple_Pack(1, __pyx_n_s_source); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 3022, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__204); + __Pyx_GIVEREF(__pyx_tuple__204); + __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_Fst, 3022, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 3022, __pyx_L1_error) - /* "_pywrapfst.pyx":3031 + /* "_pywrapfst.pyx":3029 * * * cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_Fst_from_string, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 3031, __pyx_L1_error) + __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_read_Fst_from_string, 3029, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 3029, __pyx_L1_error) - /* "_pywrapfst.pyx":3164 + /* "_pywrapfst.pyx":3162 * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< * return Arc(self.ilabel, self.olabel, self.weight, self.nextstate) * */ - __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 3164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 3164, __pyx_L1_error) + __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_copy, 3162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 3162, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._arc cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70118,92 +70064,92 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._arc cannot be converted to a Python object for pickling" */ - __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":3241 + /* "_pywrapfst.pyx":3239 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 3241, __pyx_L1_error) + __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 3239, __pyx_L1_error) - /* "_pywrapfst.pyx":3252 + /* "_pywrapfst.pyx":3250 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 3252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 3250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 3250, __pyx_L1_error) - /* "_pywrapfst.pyx":3263 + /* "_pywrapfst.pyx":3261 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 3263, __pyx_L1_error) + __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3261, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 3261, __pyx_L1_error) - /* "_pywrapfst.pyx":3271 + /* "_pywrapfst.pyx":3269 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< * """ * position(self) */ - __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_position, 3271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_position, 3269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 3269, __pyx_L1_error) - /* "_pywrapfst.pyx":3282 + /* "_pywrapfst.pyx":3280 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 3282, __pyx_L1_error) + __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 3280, __pyx_L1_error) - /* "_pywrapfst.pyx":3290 + /* "_pywrapfst.pyx":3288 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< * """ * seek(self, a) */ - __pyx_tuple__212 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_a); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 3290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__212); - __Pyx_GIVEREF(__pyx_tuple__212); - __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_seek, 3290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 3290, __pyx_L1_error) + __pyx_tuple__215 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_a); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 3288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__215); + __Pyx_GIVEREF(__pyx_tuple__215); + __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_seek, 3288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 3288, __pyx_L1_error) - /* "_pywrapfst.pyx":3301 + /* "_pywrapfst.pyx":3299 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< * """ * set_flags(self, flags, mask) */ - __pyx_tuple__214 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_flags, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 3301, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__214); - __Pyx_GIVEREF(__pyx_tuple__214); - __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_flags, 3301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 3301, __pyx_L1_error) + __pyx_tuple__217 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_flags, __pyx_n_s_mask); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 3299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__217); + __Pyx_GIVEREF(__pyx_tuple__217); + __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_flags, 3299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 3299, __pyx_L1_error) - /* "_pywrapfst.pyx":3324 + /* "_pywrapfst.pyx":3322 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 3322, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._fst cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70211,98 +70157,98 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._fst cannot be converted to a Python object for pickling" */ - __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":3374 + /* "_pywrapfst.pyx":3372 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 3374, __pyx_L1_error) + __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 3372, __pyx_L1_error) - /* "_pywrapfst.pyx":3385 + /* "_pywrapfst.pyx":3383 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 3385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 3385, __pyx_L1_error) + __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_flags, 3383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 3383, __pyx_L1_error) - /* "_pywrapfst.pyx":3396 + /* "_pywrapfst.pyx":3394 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 3396, __pyx_L1_error) + __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 3394, __pyx_L1_error) - /* "_pywrapfst.pyx":3404 + /* "_pywrapfst.pyx":3402 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< * """ * position(self) */ - __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_position, 3404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 3404, __pyx_L1_error) + __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_position, 3402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 3402, __pyx_L1_error) - /* "_pywrapfst.pyx":3415 + /* "_pywrapfst.pyx":3413 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 3415, __pyx_L1_error) + __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 3413, __pyx_L1_error) - /* "_pywrapfst.pyx":3423 + /* "_pywrapfst.pyx":3421 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< * """ * seek(self, a) */ - __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_seek, 3423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 3423, __pyx_L1_error) + __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_seek, 3421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 3421, __pyx_L1_error) - /* "_pywrapfst.pyx":3434 + /* "_pywrapfst.pyx":3432 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< * """ * set_flags(self, flags, mask) */ - __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_flags, 3434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 3434, __pyx_L1_error) + __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_flags, 3432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 3432, __pyx_L1_error) - /* "_pywrapfst.pyx":3458 + /* "_pywrapfst.pyx":3456 * self._aiter.get().SetValue(deref(arc._arc)) * * def set_value(self, Arc arc): # <<<<<<<<<<<<<< * """ * set_value(self, arc) */ - __pyx_tuple__226 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_arc); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 3458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__226); - __Pyx_GIVEREF(__pyx_tuple__226); - __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_value, 3458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 3458, __pyx_L1_error) + __pyx_tuple__229 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_arc); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 3456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__229); + __Pyx_GIVEREF(__pyx_tuple__229); + __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_set_value, 3456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 3456, __pyx_L1_error) - /* "_pywrapfst.pyx":3485 + /* "_pywrapfst.pyx":3483 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 3485, __pyx_L1_error) + __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 3483, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._mfst cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70310,50 +70256,50 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._mfst cannot be converted to a Python object for pickling" */ - __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":3533 + /* "_pywrapfst.pyx":3531 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 3533, __pyx_L1_error) + __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 3531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 3531, __pyx_L1_error) - /* "_pywrapfst.pyx":3544 + /* "_pywrapfst.pyx":3542 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 3542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 3542, __pyx_L1_error) - /* "_pywrapfst.pyx":3552 + /* "_pywrapfst.pyx":3550 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 3552, __pyx_L1_error) + __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 3550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 3550, __pyx_L1_error) - /* "_pywrapfst.pyx":3572 + /* "_pywrapfst.pyx":3570 * return self._siter.get().Value() * * cpdef int64_t value(self) except *: # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 3572, __pyx_L1_error) + __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_value, 3570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 3570, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._fst,self._siter cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70361,277 +70307,277 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._fst,self._siter cannot be converted to a Python object for pickling" */ - __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(1, 3, __pyx_L1_error) - /* "_pywrapfst.pyx":3609 + /* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * map_type="identity", */ - __pyx_tuple__237 = PyTuple_Pack(5, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_map_type, __pyx_n_s_power, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 3609, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__237); - __Pyx_GIVEREF(__pyx_tuple__237); - __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcmap, 3609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 3609, __pyx_L1_error) + __pyx_tuple__240 = PyTuple_Pack(5, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_map_type, __pyx_n_s_power, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 3607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__240); + __Pyx_GIVEREF(__pyx_tuple__240); + __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arcmap, 3607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 3607, __pyx_L1_error) - /* "_pywrapfst.pyx":3656 + /* "_pywrapfst.pyx":3654 * * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_tuple__239 = PyTuple_Pack(4, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_compose_filter, __pyx_n_s_connect); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 3656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__239); - __Pyx_GIVEREF(__pyx_tuple__239); - __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compose, 3656, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 3656, __pyx_L1_error) - __pyx_tuple__241 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 3656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__241); - __Pyx_GIVEREF(__pyx_tuple__241); + __pyx_tuple__242 = PyTuple_Pack(4, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_compose_filter, __pyx_n_s_connect); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 3654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__242); + __Pyx_GIVEREF(__pyx_tuple__242); + __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compose, 3654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 3654, __pyx_L1_error) + __pyx_tuple__244 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 3654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__244); + __Pyx_GIVEREF(__pyx_tuple__244); - /* "_pywrapfst.pyx":3692 + /* "_pywrapfst.pyx":3690 * * * cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<< * """ * convert(ifst, fst_type="") */ - __pyx_tuple__242 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 3692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__242); - __Pyx_GIVEREF(__pyx_tuple__242); - __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_convert, 3692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 3692, __pyx_L1_error) - __pyx_tuple__244 = PyTuple_Pack(1, __pyx_kp_u__5); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 3692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__244); - __Pyx_GIVEREF(__pyx_tuple__244); + __pyx_tuple__245 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_fst_type); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 3690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__245); + __Pyx_GIVEREF(__pyx_tuple__245); + __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_convert, 3690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 3690, __pyx_L1_error) + __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u__6); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 3690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__247); + __Pyx_GIVEREF(__pyx_tuple__247); - /* "_pywrapfst.pyx":3718 + /* "_pywrapfst.pyx":3716 * * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * det_type="functional", */ - __pyx_tuple__245 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_det_type, __pyx_n_s_nstate, __pyx_n_s_subsequential_label, __pyx_n_s_weight, __pyx_n_s_increment_subsequential_label); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 3718, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__245); - __Pyx_GIVEREF(__pyx_tuple__245); - __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_determinize, 3718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 3718, __pyx_L1_error) + __pyx_tuple__248 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_det_type, __pyx_n_s_nstate, __pyx_n_s_subsequential_label, __pyx_n_s_weight, __pyx_n_s_increment_subsequential_label); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 3716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__248); + __Pyx_GIVEREF(__pyx_tuple__248); + __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_determinize, 3716, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 3716, __pyx_L1_error) - /* "_pywrapfst.pyx":3777 + /* "_pywrapfst.pyx":3775 * * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_difference, 3777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 3777, __pyx_L1_error) - __pyx_tuple__248 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 3777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__248); - __Pyx_GIVEREF(__pyx_tuple__248); + __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_difference, 3775, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 3775, __pyx_L1_error) + __pyx_tuple__251 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 3775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__251); + __Pyx_GIVEREF(__pyx_tuple__251); - /* "_pywrapfst.pyx":3817 + /* "_pywrapfst.pyx":3815 * * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_tuple__249 = PyTuple_Pack(5, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_subsequential_label, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 3817, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__249); - __Pyx_GIVEREF(__pyx_tuple__249); - __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_disambiguate, 3817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 3817, __pyx_L1_error) + __pyx_tuple__252 = PyTuple_Pack(5, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_subsequential_label, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 3815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__252); + __Pyx_GIVEREF(__pyx_tuple__252); + __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_disambiguate, 3815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 3815, __pyx_L1_error) - /* "_pywrapfst.pyx":3860 + /* "_pywrapfst.pyx":3858 * * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type="input"): # <<<<<<<<<<<<<< * """ * epsnormalize(ifst, eps_norm_type="input") */ - __pyx_tuple__251 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_eps_norm_type); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 3860, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__251); - __Pyx_GIVEREF(__pyx_tuple__251); - __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_epsnormalize, 3860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 3860, __pyx_L1_error) - __pyx_tuple__253 = PyTuple_Pack(1, __pyx_n_u_input); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 3860, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__253); - __Pyx_GIVEREF(__pyx_tuple__253); + __pyx_tuple__254 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_eps_norm_type); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 3858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__254); + __Pyx_GIVEREF(__pyx_tuple__254); + __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_epsnormalize, 3858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 3858, __pyx_L1_error) + __pyx_tuple__256 = PyTuple_Pack(1, __pyx_n_u_input); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 3858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__256); + __Pyx_GIVEREF(__pyx_tuple__256); - /* "_pywrapfst.pyx":3890 + /* "_pywrapfst.pyx":3888 * * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< * """ * equal(ifst1, ifst2, delta=0.0009765625) */ - __pyx_tuple__254 = PyTuple_Pack(3, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 3890, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__254); - __Pyx_GIVEREF(__pyx_tuple__254); - __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_equal, 3890, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_tuple__257 = PyTuple_Pack(3, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 3888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__257); + __Pyx_GIVEREF(__pyx_tuple__257); + __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_equal, 3888, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 3888, __pyx_L1_error) - /* "_pywrapfst.pyx":3911 + /* "_pywrapfst.pyx":3909 * * - * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< + * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< * """ * equivalent(ifst1, ifst2, delta=0.0009765625) */ - __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_equivalent, 3911, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_equivalent, 3909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 3909, __pyx_L1_error) - /* "_pywrapfst.pyx":3932 + /* "_pywrapfst.pyx":3939 * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_intersect, 3932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 3932, __pyx_L1_error) - __pyx_tuple__258 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 3932, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__258); - __Pyx_GIVEREF(__pyx_tuple__258); + __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_intersect, 3939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 3939, __pyx_L1_error) + __pyx_tuple__261 = PyTuple_Pack(2, __pyx_n_u_auto, Py_True); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 3939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__261); + __Pyx_GIVEREF(__pyx_tuple__261); - /* "_pywrapfst.pyx":3967 + /* "_pywrapfst.pyx":3974 * * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< * """ * isomorphic(ifst1, ifst2, delta=0.0009765625) */ - __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_isomorphic, 3967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 3967, __pyx_L1_error) + __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_isomorphic, 3974, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 3974, __pyx_L1_error) - /* "_pywrapfst.pyx":3991 + /* "_pywrapfst.pyx":3998 * * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_tuple__260 = PyTuple_Pack(4, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 3991, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__260); - __Pyx_GIVEREF(__pyx_tuple__260); - __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_prune, 3991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_tuple__263 = PyTuple_Pack(4, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 3998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__263); + __Pyx_GIVEREF(__pyx_tuple__263); + __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_prune, 3998, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 3998, __pyx_L1_error) - /* "_pywrapfst.pyx":4023 + /* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * bool push_weights=False, */ - __pyx_tuple__262 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_push_weights, __pyx_n_s_push_labels, __pyx_n_s_remove_common_affix, __pyx_n_s_remove_total_weight, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 4023, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__262); - __Pyx_GIVEREF(__pyx_tuple__262); - __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_push, 4023, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 4023, __pyx_L1_error) + __pyx_tuple__265 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_push_weights, __pyx_n_s_push_labels, __pyx_n_s_remove_common_affix, __pyx_n_s_remove_total_weight, __pyx_n_s_reweight_type); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 4030, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__265); + __Pyx_GIVEREF(__pyx_tuple__265); + __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_push, 4030, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 4030, __pyx_L1_error) - /* "_pywrapfst.pyx":4080 + /* "_pywrapfst.pyx":4088 * * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * int32_t npath=1, */ - __pyx_tuple__264 = PyTuple_Pack(7, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_npath, __pyx_n_s_delta, __pyx_n_s_select, __pyx_n_s_max_length, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 4080, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__264); - __Pyx_GIVEREF(__pyx_tuple__264); - __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_randequivalent, 4080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 4080, __pyx_L1_error) + __pyx_tuple__267 = PyTuple_Pack(7, __pyx_n_s_ifst1, __pyx_n_s_ifst2, __pyx_n_s_npath, __pyx_n_s_delta, __pyx_n_s_select, __pyx_n_s_max_length, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 4088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__267); + __Pyx_GIVEREF(__pyx_tuple__267); + __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_randequivalent, 4088, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 4088, __pyx_L1_error) - /* "_pywrapfst.pyx":4132 + /* "_pywrapfst.pyx":4139 * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< * int32_t npath=1, * select="uniform", */ - __pyx_tuple__266 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_npath, __pyx_n_s_select, __pyx_n_s_max_length, __pyx_n_s_weighted, __pyx_n_s_remove_total_weight, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 4132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__266); - __Pyx_GIVEREF(__pyx_tuple__266); - __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_randgen, 4132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 4132, __pyx_L1_error) + __pyx_tuple__269 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_npath, __pyx_n_s_select, __pyx_n_s_max_length, __pyx_n_s_weighted, __pyx_n_s_remove_total_weight, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 4139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__269); + __Pyx_GIVEREF(__pyx_tuple__269); + __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_randgen, 4139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 4139, __pyx_L1_error) - /* "_pywrapfst.pyx":4184 + /* "_pywrapfst.pyx":4190 * * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< * call_arc_labeling="input", * return_arc_labeling="neither", */ - __pyx_tuple__268 = PyTuple_Pack(5, __pyx_n_s_pairs, __pyx_n_s_call_arc_labeling, __pyx_n_s_return_arc_labeling, __pyx_n_s_epsilon_on_replace, __pyx_n_s_return_label); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 4184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__268); - __Pyx_GIVEREF(__pyx_tuple__268); - __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_replace, 4184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 4184, __pyx_L1_error) - __pyx_tuple__270 = PyTuple_Pack(4, __pyx_n_u_input, __pyx_n_u_neither, Py_False, __pyx_int_0); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 4184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__270); - __Pyx_GIVEREF(__pyx_tuple__270); + __pyx_tuple__271 = PyTuple_Pack(5, __pyx_n_s_pairs, __pyx_n_s_call_arc_labeling, __pyx_n_s_return_arc_labeling, __pyx_n_s_epsilon_on_replace, __pyx_n_s_return_label); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 4190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__271); + __Pyx_GIVEREF(__pyx_tuple__271); + __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_replace, 4190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 4190, __pyx_L1_error) + __pyx_tuple__273 = PyTuple_Pack(4, __pyx_n_u_input, __pyx_n_u_neither, Py_False, __pyx_int_0); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 4190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__273); + __Pyx_GIVEREF(__pyx_tuple__273); - /* "_pywrapfst.pyx":4244 + /* "_pywrapfst.pyx":4250 * * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< * """ * reverse(ifst, require_superinitial=True) */ - __pyx_tuple__271 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_require_superinitial); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 4244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__271); - __Pyx_GIVEREF(__pyx_tuple__271); - __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reverse, 4244, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 4244, __pyx_L1_error) - __pyx_tuple__273 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 4244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__273); - __Pyx_GIVEREF(__pyx_tuple__273); + __pyx_tuple__274 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_require_superinitial); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 4250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__274); + __Pyx_GIVEREF(__pyx_tuple__274); + __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reverse, 4250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 4250, __pyx_L1_error) + __pyx_tuple__276 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 4250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__276); + __Pyx_GIVEREF(__pyx_tuple__276); - /* "_pywrapfst.pyx":4292 + /* "_pywrapfst.pyx":4298 * * * def shortestdistance(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_tuple__274 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 4292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__274); - __Pyx_GIVEREF(__pyx_tuple__274); - __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_shortestdistance, 4292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_tuple__277 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_reverse, __pyx_n_s_distance, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 4298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__277); + __Pyx_GIVEREF(__pyx_tuple__277); + __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_shortestdistance, 4298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 4298, __pyx_L1_error) - /* "_pywrapfst.pyx":4329 + /* "_pywrapfst.pyx":4335 * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int32_t nshortest=1, */ - __pyx_tuple__276 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nshortest, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_unique, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 4329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__276); - __Pyx_GIVEREF(__pyx_tuple__276); - __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_shortestpath, 4329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 4329, __pyx_L1_error) + __pyx_tuple__279 = PyTuple_Pack(7, __pyx_n_s_ifst, __pyx_n_s_delta, __pyx_n_s_nshortest, __pyx_n_s_nstate, __pyx_n_s_queue_type, __pyx_n_s_unique, __pyx_n_s_weight); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 4335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__279); + __Pyx_GIVEREF(__pyx_tuple__279); + __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_shortestpath, 4335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 4335, __pyx_L1_error) - /* "_pywrapfst.pyx":4383 + /* "_pywrapfst.pyx":4389 * * * cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<< * """ * state_map(ifst, map_type) */ - __pyx_tuple__278 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_map_type); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 4383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__278); - __Pyx_GIVEREF(__pyx_tuple__278); - __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_statemap, 4383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 4383, __pyx_L1_error) + __pyx_tuple__281 = PyTuple_Pack(2, __pyx_n_s_ifst, __pyx_n_s_map_type); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 4389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__281); + __Pyx_GIVEREF(__pyx_tuple__281); + __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_statemap, 4389, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 4389, __pyx_L1_error) - /* "_pywrapfst.pyx":4409 + /* "_pywrapfst.pyx":4415 * * * cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<< * """ * synchronize(ifst) */ - __pyx_tuple__280 = PyTuple_Pack(1, __pyx_n_s_ifst); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 4409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__280); - __Pyx_GIVEREF(__pyx_tuple__280); - __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_synchronize, 4409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 4409, __pyx_L1_error) + __pyx_tuple__283 = PyTuple_Pack(1, __pyx_n_s_ifst); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 4415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__283); + __Pyx_GIVEREF(__pyx_tuple__283); + __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_synchronize, 4415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 4415, __pyx_L1_error) - /* "_pywrapfst.pyx":4517 - * self._allow_negative_labels = allow_negative_labels + /* "_pywrapfst.pyx":4518 + * self._keep_state_numbering = keep_state_numbering * * cpdef Fst compile(self): # <<<<<<<<<<<<<< * """ * compile() */ - __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compile, 4517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 4517, __pyx_L1_error) + __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_compile, 4518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(0, 4518, __pyx_L1_error) /* "_pywrapfst.pyx":4549 * return _init_XFst(_tfst.release()) @@ -70640,17 +70586,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * write(expression) */ - __pyx_tuple__283 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_expression); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 4549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__283); - __Pyx_GIVEREF(__pyx_tuple__283); - __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 4549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 4549, __pyx_L1_error) + __pyx_tuple__286 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_expression); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 4549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__286); + __Pyx_GIVEREF(__pyx_tuple__286); + __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_write, 4549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 4549, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70658,7 +70604,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(1, 3, __pyx_L1_error) /* "_pywrapfst.pyx":4596 * return f"<{self.far_type()} FarReader at 0x{id(self):x}>" @@ -70667,10 +70613,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def open(cls, *sources): * """ */ - __pyx_tuple__287 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_sources, __pyx_n_s_sources_2, __pyx_n_s_tfar, __pyx_n_s_reader, __pyx_n_s_source); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 4596, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__287); - __Pyx_GIVEREF(__pyx_tuple__287); - __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_open, 4596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 4596, __pyx_L1_error) + __pyx_tuple__290 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_sources, __pyx_n_s_sources_2, __pyx_n_s_tfar, __pyx_n_s_reader, __pyx_n_s_source); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 4596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__290); + __Pyx_GIVEREF(__pyx_tuple__290); + __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_open, 4596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 4596, __pyx_L1_error) /* "_pywrapfst.pyx":4624 * return reader @@ -70679,7 +70625,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * arc_type(self) */ - __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 4624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 4624, __pyx_L1_error) + __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 4624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 4624, __pyx_L1_error) /* "_pywrapfst.pyx":4632 * return self._reader.get().ArcType() @@ -70688,7 +70634,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * done(self) */ - __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 4632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 4632, __pyx_L1_error) + __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_done, 4632, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 4632, __pyx_L1_error) /* "_pywrapfst.pyx":4643 * return self._reader.get().Done() @@ -70697,7 +70643,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * error(self) */ - __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_error, 4643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 4643, __pyx_L1_error) + __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_error, 4643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 4643, __pyx_L1_error) /* "_pywrapfst.pyx":4654 * return self._reader.get().Error() @@ -70706,7 +70652,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return fst.GetFarTypeString(self._reader.get().Type()) * */ - __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_far_type, 4654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 4654, __pyx_L1_error) + __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_far_type, 4654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 4654, __pyx_L1_error) /* "_pywrapfst.pyx":4657 * return fst.GetFarTypeString(self._reader.get().Type()) @@ -70715,7 +70661,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * find(self, key) */ - __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_find, 4657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 4657, __pyx_L1_error) + __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_find, 4657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 4657, __pyx_L1_error) /* "_pywrapfst.pyx":4672 * return self._reader.get().Find(tostring(key)) @@ -70724,7 +70670,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * get_fst(self) */ - __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_fst, 4672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 4672, __pyx_L1_error) + __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_fst, 4672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(0, 4672, __pyx_L1_error) /* "_pywrapfst.pyx":4683 * return _init_XFst(new fst.FstClass(deref(self._reader.get().GetFstClass()))) @@ -70733,7 +70679,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * get_key(self) */ - __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_key, 4683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 4683, __pyx_L1_error) + __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_get_key, 4683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 4683, __pyx_L1_error) /* "_pywrapfst.pyx":4694 * return self._reader.get().GetKey() @@ -70742,7 +70688,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * next(self) */ - __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 4694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 4694, __pyx_L1_error) + __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_next, 4694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(0, 4694, __pyx_L1_error) /* "_pywrapfst.pyx":4702 * self._reader.get().Next() @@ -70751,14 +70697,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * reset(self) */ - __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 4702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(0, 4702, __pyx_L1_error) + __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_reset, 4702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(0, 4702, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._reader cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70766,7 +70712,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._reader cannot be converted to a Python object for pickling" */ - __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(1, 3, __pyx_L1_error) /* "_pywrapfst.pyx":4755 * return f"<{self.far_type()} FarWriter at 0x{id(self):x}>" @@ -70775,13 +70721,13 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def create(cls, source, arc_type="standard", far_type="default"): * """ */ - __pyx_tuple__300 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_arc_type, __pyx_n_s_far_type, __pyx_n_s_tfar, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 4755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__300); - __Pyx_GIVEREF(__pyx_tuple__300); - __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_create, 4755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 4755, __pyx_L1_error) - __pyx_tuple__302 = PyTuple_Pack(2, __pyx_n_u_standard, __pyx_n_u_default); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 4755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__302); - __Pyx_GIVEREF(__pyx_tuple__302); + __pyx_tuple__303 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_source, __pyx_n_s_arc_type, __pyx_n_s_far_type, __pyx_n_s_tfar, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__303); + __Pyx_GIVEREF(__pyx_tuple__303); + __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_create, 4755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 4755, __pyx_L1_error) + __pyx_tuple__305 = PyTuple_Pack(2, __pyx_n_u_standard, __pyx_n_u_default); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__305); + __Pyx_GIVEREF(__pyx_tuple__305); /* "_pywrapfst.pyx":4793 * self._writer.reset() @@ -70790,10 +70736,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * add(self, key, ifst) */ - __pyx_tuple__303 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_ifst); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 4793, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__303); - __Pyx_GIVEREF(__pyx_tuple__303); - __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add, 4793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 4793, __pyx_L1_error) + __pyx_tuple__306 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_ifst); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 4793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__306); + __Pyx_GIVEREF(__pyx_tuple__306); + __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_add, 4793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 4793, __pyx_L1_error) /* "_pywrapfst.pyx":4814 * raise FstOpError("Incompatible or invalid arc type") @@ -70802,7 +70748,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * arc_type(self) */ - __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 4814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(0, 4814, __pyx_L1_error) + __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_arc_type, 4814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 4814, __pyx_L1_error) /* "_pywrapfst.pyx":4822 * return self._writer.get().ArcType() @@ -70811,7 +70757,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * error(self) */ - __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_error, 4822, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 4822, __pyx_L1_error) + __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_error, 4822, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 4822, __pyx_L1_error) /* "_pywrapfst.pyx":4833 * return self._writer.get().Error() @@ -70820,14 +70766,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * far_type(self) */ - __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_far_type, 4833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 4833, __pyx_L1_error) + __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_extensions__pywrapfst_pyx, __pyx_n_s_far_type, 4833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(0, 4833, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "self._writer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(1, 1, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -70835,7 +70781,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._writer cannot be converted to a Python object for pickling" */ - __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -70971,15 +70917,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst_Weight.type = (std::string (*)(struct __pyx_obj_10_pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_6Weight_type; __pyx_vtable_10_pywrapfst_Weight.member = (bool (*)(struct __pyx_obj_10_pywrapfst_Weight *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_6Weight_member; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_Weight = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Weight_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Weight)) __PYX_ERR(0, 467, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Weight_spec, __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Weight = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Weight_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Weight)) __PYX_ERR(0, 463, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Weight_spec, __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_Weight = &__pyx_type_10_pywrapfst_Weight; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_Weight->tp_print = 0; @@ -70989,13 +70935,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_Weight->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Weight, __pyx_vtabptr_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Weight, __pyx_vtabptr_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight_2, (PyObject *) __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Weight_2, (PyObject *) __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 467, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Weight) < 0) __PYX_ERR(0, 463, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst_SymbolTableView = &__pyx_vtable_10_pywrapfst_SymbolTableView; __pyx_vtable_10_pywrapfst_SymbolTableView._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_15SymbolTableView__raw; @@ -71010,18 +70956,17 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst_SymbolTableView.name = (std::string (*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_15SymbolTableView_name; __pyx_vtable_10_pywrapfst_SymbolTableView.num_symbols = (size_t (*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_15SymbolTableView_num_symbols; __pyx_vtable_10_pywrapfst_SymbolTableView.write = (void (*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_15SymbolTableView_write; - __pyx_vtable_10_pywrapfst_SymbolTableView.write_text = (void (*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_15SymbolTableView_write_text; __pyx_vtable_10_pywrapfst_SymbolTableView.write_to_string = (PyObject *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_15SymbolTableView_write_to_string; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_SymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_SymbolTableView_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_SymbolTableView)) __PYX_ERR(0, 794, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_SymbolTableView_spec, __pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_SymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_SymbolTableView_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_SymbolTableView)) __PYX_ERR(0, 790, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_SymbolTableView_spec, __pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 790, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_SymbolTableView = &__pyx_type_10_pywrapfst_SymbolTableView; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 794, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 790, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_SymbolTableView->tp_print = 0; @@ -71031,21 +70976,21 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_SymbolTableView->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_vtabptr_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 794, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_vtabptr_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 790, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 794, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 790, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 794, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst_SymbolTableView) < 0) __PYX_ERR(0, 790, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView = &__pyx_vtable_10_pywrapfst__EncodeMapperSymbolTableView; __pyx_vtable_10_pywrapfst__EncodeMapperSymbolTableView.__pyx_base = *__pyx_vtabptr_10_pywrapfst_SymbolTableView; __pyx_vtable_10_pywrapfst__EncodeMapperSymbolTableView.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_28_EncodeMapperSymbolTableView__raw; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView)) __PYX_ERR(0, 997, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView_spec, __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView)) __PYX_ERR(0, 996, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView_spec, __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 996, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView = &__pyx_type_10_pywrapfst__EncodeMapperSymbolTableView; #endif @@ -71053,7 +70998,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView->tp_base = __pyx_ptype_10_pywrapfst_SymbolTableView; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 996, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView->tp_print = 0; @@ -71063,21 +71008,21 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView, __pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView, __pyx_vtabptr_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 996, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 996, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapperSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__EncodeMapperSymbolTableView) < 0) __PYX_ERR(0, 996, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst__FstSymbolTableView = &__pyx_vtable_10_pywrapfst__FstSymbolTableView; __pyx_vtable_10_pywrapfst__FstSymbolTableView.__pyx_base = *__pyx_vtabptr_10_pywrapfst_SymbolTableView; __pyx_vtable_10_pywrapfst__FstSymbolTableView.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_19_FstSymbolTableView__raw; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst__FstSymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__FstSymbolTableView_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst__FstSymbolTableView)) __PYX_ERR(0, 1021, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__FstSymbolTableView_spec, __pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst__FstSymbolTableView)) __PYX_ERR(0, 1020, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__FstSymbolTableView_spec, __pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__FstSymbolTableView = &__pyx_type_10_pywrapfst__FstSymbolTableView; #endif @@ -71085,7 +71030,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__FstSymbolTableView->tp_base = __pyx_ptype_10_pywrapfst_SymbolTableView; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__FstSymbolTableView->tp_print = 0; @@ -71095,11 +71040,11 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__FstSymbolTableView->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__FstSymbolTableView, __pyx_vtabptr_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__FstSymbolTableView, __pyx_vtabptr_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FstSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__FstSymbolTableView) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst__MutableSymbolTable = &__pyx_vtable_10_pywrapfst__MutableSymbolTable; __pyx_vtable_10_pywrapfst__MutableSymbolTable.__pyx_base = *__pyx_vtabptr_10_pywrapfst_SymbolTableView; __pyx_vtable_10_pywrapfst__MutableSymbolTable.__pyx_base._raw = (fst::SymbolTable const *(*)(struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_19_MutableSymbolTable__raw; @@ -71109,12 +71054,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst__MutableSymbolTable.add_table = (void (*)(struct __pyx_obj_10_pywrapfst__MutableSymbolTable *, struct __pyx_obj_10_pywrapfst_SymbolTableView *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_19_MutableSymbolTable_add_table; __pyx_vtable_10_pywrapfst__MutableSymbolTable.set_name = (void (*)(struct __pyx_obj_10_pywrapfst__MutableSymbolTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_19_MutableSymbolTable_set_name; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst__MutableSymbolTable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__MutableSymbolTable_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst__MutableSymbolTable)) __PYX_ERR(0, 1044, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableSymbolTable_spec, __pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1044, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst__MutableSymbolTable)) __PYX_ERR(0, 1043, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableSymbolTable_spec, __pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__MutableSymbolTable = &__pyx_type_10_pywrapfst__MutableSymbolTable; #endif @@ -71122,7 +71067,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__MutableSymbolTable->tp_base = __pyx_ptype_10_pywrapfst_SymbolTableView; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1044, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__MutableSymbolTable->tp_print = 0; @@ -71132,21 +71077,21 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__MutableSymbolTable->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_vtabptr_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1044, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_vtabptr_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1044, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *) __pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1044, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableSymbolTable, (PyObject *) __pyx_ptype_10_pywrapfst__MutableSymbolTable) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView = &__pyx_vtable_10_pywrapfst__MutableFstSymbolTableView; __pyx_vtable_10_pywrapfst__MutableFstSymbolTableView.__pyx_base = *__pyx_vtabptr_10_pywrapfst__MutableSymbolTable; __pyx_vtable_10_pywrapfst__MutableFstSymbolTableView.__pyx_base._mutable_raw = (fst::SymbolTable *(*)(struct __pyx_obj_10_pywrapfst__MutableSymbolTable *))__pyx_f_10_pywrapfst_26_MutableFstSymbolTableView__mutable_raw; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__MutableFstSymbolTableView_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView)) __PYX_ERR(0, 1116, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableFstSymbolTableView_spec, __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView)) __PYX_ERR(0, 1115, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableFstSymbolTableView_spec, __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1115, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView = &__pyx_type_10_pywrapfst__MutableFstSymbolTableView; #endif @@ -71154,7 +71099,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView->tp_base = __pyx_ptype_10_pywrapfst__MutableSymbolTable; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1115, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView->tp_print = 0; @@ -71164,21 +71109,21 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView, __pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView, __pyx_vtabptr_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1115, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1115, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1116, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFstSymbolTableView, (PyObject *) __pyx_ptype_10_pywrapfst__MutableFstSymbolTableView) < 0) __PYX_ERR(0, 1115, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_SymbolTable = &__pyx_vtable_10_pywrapfst_SymbolTable; __pyx_vtable_10_pywrapfst_SymbolTable.__pyx_base = *__pyx_vtabptr_10_pywrapfst__MutableSymbolTable; __pyx_vtable_10_pywrapfst_SymbolTable.__pyx_base._mutable_raw = (fst::SymbolTable *(*)(struct __pyx_obj_10_pywrapfst__MutableSymbolTable *))__pyx_f_10_pywrapfst_11SymbolTable__mutable_raw; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst_SymbolTable = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_SymbolTable_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst_SymbolTable)) __PYX_ERR(0, 1131, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_SymbolTable_spec, __pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst_SymbolTable)) __PYX_ERR(0, 1130, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_SymbolTable_spec, __pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_SymbolTable = &__pyx_type_10_pywrapfst_SymbolTable; #endif @@ -71186,7 +71131,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_SymbolTable->tp_base = __pyx_ptype_10_pywrapfst__MutableSymbolTable; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_SymbolTable->tp_print = 0; @@ -71196,21 +71141,21 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_SymbolTable->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_vtabptr_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_vtabptr_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *) __pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTable_2, (PyObject *) __pyx_ptype_10_pywrapfst_SymbolTable) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst__SymbolTableIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__SymbolTableIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__SymbolTableIterator)) __PYX_ERR(0, 1327, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__SymbolTableIterator_spec, __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__SymbolTableIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__SymbolTableIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__SymbolTableIterator)) __PYX_ERR(0, 1323, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__SymbolTableIterator_spec, __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__SymbolTableIterator = &__pyx_type_10_pywrapfst__SymbolTableIterator; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__SymbolTableIterator->tp_print = 0; @@ -71220,9 +71165,9 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__SymbolTableIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *) __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymbolTableIterator, (PyObject *) __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__SymbolTableIterator) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst_EncodeMapper = &__pyx_vtable_10_pywrapfst_EncodeMapper; __pyx_vtable_10_pywrapfst_EncodeMapper.arc_type = (std::string (*)(struct __pyx_obj_10_pywrapfst_EncodeMapper *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_12EncodeMapper_arc_type; @@ -71235,15 +71180,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst_EncodeMapper._set_input_symbols = (void (*)(struct __pyx_obj_10_pywrapfst_EncodeMapper *, struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_12EncodeMapper__set_input_symbols; __pyx_vtable_10_pywrapfst_EncodeMapper._set_output_symbols = (void (*)(struct __pyx_obj_10_pywrapfst_EncodeMapper *, struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_12EncodeMapper__set_output_symbols; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_EncodeMapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_EncodeMapper_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_EncodeMapper)) __PYX_ERR(0, 1359, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_EncodeMapper_spec, __pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_EncodeMapper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_EncodeMapper_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_EncodeMapper)) __PYX_ERR(0, 1355, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_EncodeMapper_spec, __pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_EncodeMapper = &__pyx_type_10_pywrapfst_EncodeMapper; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_EncodeMapper->tp_print = 0; @@ -71255,7 +71200,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1359, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1355, __pyx_L1_error) if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) { __pyx_wrapperbase_10_pywrapfst_12EncodeMapper_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_10_pywrapfst_12EncodeMapper_4__call__.doc = __pyx_doc_10_pywrapfst_12EncodeMapper_4__call__; @@ -71263,11 +71208,11 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_vtabptr_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_vtabptr_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *) __pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EncodeMapper, (PyObject *) __pyx_ptype_10_pywrapfst_EncodeMapper) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_Fst = &__pyx_vtable_10_pywrapfst_Fst; __pyx_vtable_10_pywrapfst_Fst._local_render_svg = (std::string (*)(std::string const &))__pyx_f_10_pywrapfst_3Fst__local_render_svg; __pyx_vtable_10_pywrapfst_Fst.arc_type = (std::string (*)(struct __pyx_obj_10_pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_3Fst_arc_type; @@ -71289,15 +71234,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst_Fst.write = (void (*)(struct __pyx_obj_10_pywrapfst_Fst *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_3Fst_write; __pyx_vtable_10_pywrapfst_Fst.write_to_string = (PyObject *(*)(struct __pyx_obj_10_pywrapfst_Fst *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_3Fst_write_to_string; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_Fst = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Fst_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Fst)) __PYX_ERR(0, 1627, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Fst_spec, __pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Fst = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Fst_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Fst)) __PYX_ERR(0, 1623, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Fst_spec, __pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_Fst = &__pyx_type_10_pywrapfst_Fst; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_Fst->tp_print = 0; @@ -71307,11 +71252,11 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_Fst->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Fst, __pyx_vtabptr_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Fst, __pyx_vtabptr_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *) __pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fst, (PyObject *) __pyx_ptype_10_pywrapfst_Fst) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_MutableFst = &__pyx_vtable_10_pywrapfst_MutableFst; __pyx_vtable_10_pywrapfst_MutableFst.__pyx_base = *__pyx_vtabptr_10_pywrapfst_Fst; __pyx_vtable_10_pywrapfst_MutableFst._check_mutating_imethod = (void (*)(struct __pyx_obj_10_pywrapfst_MutableFst *))__pyx_f_10_pywrapfst_10MutableFst__check_mutating_imethod; @@ -71345,12 +71290,12 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst_MutableFst._set_output_symbols = (void (*)(struct __pyx_obj_10_pywrapfst_MutableFst *, struct __pyx_obj_10_pywrapfst_SymbolTableView *))__pyx_f_10_pywrapfst_10MutableFst__set_output_symbols; __pyx_vtable_10_pywrapfst_MutableFst._topsort = (void (*)(struct __pyx_obj_10_pywrapfst_MutableFst *))__pyx_f_10_pywrapfst_10MutableFst__topsort; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_Fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2094, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_Fst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst_MutableFst = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_MutableFst_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst_MutableFst)) __PYX_ERR(0, 2094, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_MutableFst_spec, __pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2094, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst_MutableFst)) __PYX_ERR(0, 2090, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_MutableFst_spec, __pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_MutableFst = &__pyx_type_10_pywrapfst_MutableFst; #endif @@ -71358,7 +71303,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_MutableFst->tp_base = __pyx_ptype_10_pywrapfst_Fst; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2094, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_MutableFst->tp_print = 0; @@ -71368,20 +71313,20 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_MutableFst->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_MutableFst, __pyx_vtabptr_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2094, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_MutableFst, __pyx_vtabptr_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2094, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *) __pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2094, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableFst, (PyObject *) __pyx_ptype_10_pywrapfst_MutableFst) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_VectorFst = &__pyx_vtable_10_pywrapfst_VectorFst; __pyx_vtable_10_pywrapfst_VectorFst.__pyx_base = *__pyx_vtabptr_10_pywrapfst_MutableFst; #if CYTHON_USE_TYPE_SPECS - __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_MutableFst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2959, __pyx_L1_error) + __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_10_pywrapfst_MutableFst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_10_pywrapfst_VectorFst = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_VectorFst_spec, __pyx_t_1); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_ptype_10_pywrapfst_VectorFst)) __PYX_ERR(0, 2959, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_VectorFst_spec, __pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (unlikely(!__pyx_ptype_10_pywrapfst_VectorFst)) __PYX_ERR(0, 2957, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_VectorFst_spec, __pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_VectorFst = &__pyx_type_10_pywrapfst_VectorFst; #endif @@ -71389,7 +71334,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_VectorFst->tp_base = __pyx_ptype_10_pywrapfst_MutableFst; #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_VectorFst->tp_print = 0; @@ -71399,23 +71344,23 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_VectorFst->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_VectorFst, __pyx_vtabptr_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_VectorFst, __pyx_vtabptr_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VectorFst, (PyObject *) __pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VectorFst, (PyObject *) __pyx_ptype_10_pywrapfst_VectorFst) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) __pyx_vtabptr_10_pywrapfst_Arc = &__pyx_vtable_10_pywrapfst_Arc; __pyx_vtable_10_pywrapfst_Arc.copy = (struct __pyx_obj_10_pywrapfst_Arc *(*)(struct __pyx_obj_10_pywrapfst_Arc *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_3Arc_copy; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_Arc = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Arc_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Arc)) __PYX_ERR(0, 3141, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Arc_spec, __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Arc = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Arc_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Arc)) __PYX_ERR(0, 3139, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Arc_spec, __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_Arc = &__pyx_type_10_pywrapfst_Arc; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_Arc->tp_print = 0; @@ -71425,13 +71370,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_Arc->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Arc, __pyx_vtabptr_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Arc, __pyx_vtabptr_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *) __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Arc, (PyObject *) __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3141, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Arc) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst__ArcIterator = &__pyx_vtable_10_pywrapfst__ArcIterator; __pyx_vtable_10_pywrapfst__ArcIterator.done = (bool (*)(struct __pyx_obj_10_pywrapfst__ArcIterator *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_12_ArcIterator_done; @@ -71443,15 +71388,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst__ArcIterator.set_flags = (void (*)(struct __pyx_obj_10_pywrapfst__ArcIterator *, uint8_t, uint8_t, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_12_ArcIterator_set_flags; __pyx_vtable_10_pywrapfst__ArcIterator._value = (struct __pyx_obj_10_pywrapfst_Arc *(*)(struct __pyx_obj_10_pywrapfst__ArcIterator *))__pyx_f_10_pywrapfst_12_ArcIterator__value; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst__ArcIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__ArcIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__ArcIterator)) __PYX_ERR(0, 3211, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__ArcIterator_spec, __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__ArcIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__ArcIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__ArcIterator)) __PYX_ERR(0, 3209, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__ArcIterator_spec, __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__ArcIterator = &__pyx_type_10_pywrapfst__ArcIterator; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__ArcIterator->tp_print = 0; @@ -71461,13 +71406,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__ArcIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_vtabptr_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_vtabptr_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *) __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ArcIterator, (PyObject *) __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3211, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__ArcIterator) < 0) __PYX_ERR(0, 3209, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst__MutableArcIterator = &__pyx_vtable_10_pywrapfst__MutableArcIterator; __pyx_vtable_10_pywrapfst__MutableArcIterator.done = (bool (*)(struct __pyx_obj_10_pywrapfst__MutableArcIterator *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_19_MutableArcIterator_done; @@ -71480,15 +71425,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst__MutableArcIterator._set_value = (void (*)(struct __pyx_obj_10_pywrapfst__MutableArcIterator *, struct __pyx_obj_10_pywrapfst_Arc *))__pyx_f_10_pywrapfst_19_MutableArcIterator__set_value; __pyx_vtable_10_pywrapfst__MutableArcIterator._value = (struct __pyx_obj_10_pywrapfst_Arc *(*)(struct __pyx_obj_10_pywrapfst__MutableArcIterator *))__pyx_f_10_pywrapfst_19_MutableArcIterator__value; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst__MutableArcIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__MutableArcIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__MutableArcIterator)) __PYX_ERR(0, 3341, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableArcIterator_spec, __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__MutableArcIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__MutableArcIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__MutableArcIterator)) __PYX_ERR(0, 3339, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__MutableArcIterator_spec, __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__MutableArcIterator = &__pyx_type_10_pywrapfst__MutableArcIterator; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__MutableArcIterator->tp_print = 0; @@ -71498,13 +71443,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__MutableArcIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_vtabptr_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_vtabptr_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *) __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MutableArcIterator, (PyObject *) __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3341, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__MutableArcIterator) < 0) __PYX_ERR(0, 3339, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst__StateIterator = &__pyx_vtable_10_pywrapfst__StateIterator; __pyx_vtable_10_pywrapfst__StateIterator.done = (bool (*)(struct __pyx_obj_10_pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_14_StateIterator_done; @@ -71513,15 +71458,15 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_10_pywrapfst__StateIterator._value = (int64_t (*)(struct __pyx_obj_10_pywrapfst__StateIterator *))__pyx_f_10_pywrapfst_14_StateIterator__value; __pyx_vtable_10_pywrapfst__StateIterator.value = (int64_t (*)(struct __pyx_obj_10_pywrapfst__StateIterator *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_14_StateIterator_value; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst__StateIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__StateIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__StateIterator)) __PYX_ERR(0, 3505, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__StateIterator_spec, __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_ptype_10_pywrapfst__StateIterator = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst__StateIterator_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst__StateIterator)) __PYX_ERR(0, 3503, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst__StateIterator_spec, __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst__StateIterator = &__pyx_type_10_pywrapfst__StateIterator; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst__StateIterator->tp_print = 0; @@ -71531,27 +71476,27 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst__StateIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__StateIterator, __pyx_vtabptr_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst__StateIterator, __pyx_vtabptr_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *) __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StateIterator, (PyObject *) __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst__StateIterator) < 0) __PYX_ERR(0, 3503, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst_Compiler = &__pyx_vtable_10_pywrapfst_Compiler; __pyx_vtable_10_pywrapfst_Compiler.compile = (struct __pyx_obj_10_pywrapfst_Fst *(*)(struct __pyx_obj_10_pywrapfst_Compiler *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_8Compiler_compile; __pyx_vtable_10_pywrapfst_Compiler.write = (void (*)(struct __pyx_obj_10_pywrapfst_Compiler *, PyObject *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_8Compiler_write; #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst_Compiler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Compiler_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Compiler)) __PYX_ERR(0, 4437, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Compiler_spec, __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + __pyx_ptype_10_pywrapfst_Compiler = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst_Compiler_spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst_Compiler)) __PYX_ERR(0, 4443, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst_Compiler_spec, __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst_Compiler = &__pyx_type_10_pywrapfst_Compiler; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst_Compiler->tp_print = 0; @@ -71561,13 +71506,13 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_10_pywrapfst_Compiler->tp_getattro = __Pyx_PyObject_GenericGetAttr; } #endif - if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Compiler, __pyx_vtabptr_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_ptype_10_pywrapfst_Compiler, __pyx_vtabptr_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + if (__Pyx_MergeVtables(__pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *) __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Compiler, (PyObject *) __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4437, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_Compiler) < 0) __PYX_ERR(0, 4443, __pyx_L1_error) #endif __pyx_vtabptr_10_pywrapfst_FarReader = &__pyx_vtable_10_pywrapfst_FarReader; __pyx_vtable_10_pywrapfst_FarReader.arc_type = (std::string (*)(struct __pyx_obj_10_pywrapfst_FarReader *, int __pyx_skip_dispatch))__pyx_f_10_pywrapfst_9FarReader_arc_type; @@ -71640,15 +71585,15 @@ static int __Pyx_modinit_type_init_code(void) { if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10_pywrapfst_FarWriter) < 0) __PYX_ERR(0, 4729, __pyx_L1_error) #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst___pyx_scope_struct____iter___spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__)) __PYX_ERR(0, 3361, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst___pyx_scope_struct____iter___spec, __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10_pywrapfst___pyx_scope_struct____iter___spec, NULL); if (unlikely(!__pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__)) __PYX_ERR(0, 3359, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10_pywrapfst___pyx_scope_struct____iter___spec, __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3359, __pyx_L1_error) #else __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__ = &__pyx_type_10_pywrapfst___pyx_scope_struct____iter__; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3361, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 3359, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 __pyx_ptype_10_pywrapfst___pyx_scope_struct____iter__->tp_print = 0; @@ -71885,7 +71830,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__pywrapfst(PyObject *__pyx_pyinit_ __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); - __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to _pywrapfst pseudovariable */ + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_pywrapfst" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } @@ -71897,10 +71842,8 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__pywrapfst(PyObject *__pyx_pyinit_ CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); - __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_b); - __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) - Py_INCREF(__pyx_cython_runtime); + __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -71977,542 +71920,542 @@ if (!__Pyx_RefNanny) { if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - /* "_pywrapfst.pyx":100 + /* "_pywrapfst.pyx":95 * * # Python imports. * import logging # <<<<<<<<<<<<<< * import enum * import numbers */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_logging, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_logging, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(0, 100, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":101 + /* "_pywrapfst.pyx":96 * # Python imports. * import logging * import enum # <<<<<<<<<<<<<< * import numbers * import os */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_enum, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_enum, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_2) < 0) __PYX_ERR(0, 101, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_2) < 0) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":102 + /* "_pywrapfst.pyx":97 * import logging * import enum * import numbers # <<<<<<<<<<<<<< * import os * import subprocess */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numbers, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numbers, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_2) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_2) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":103 + /* "_pywrapfst.pyx":98 * import enum * import numbers * import os # <<<<<<<<<<<<<< * import subprocess * import sys */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":104 + /* "_pywrapfst.pyx":99 * import numbers * import os * import subprocess # <<<<<<<<<<<<<< * import sys * */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_subprocess, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_subprocess, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_2) < 0) __PYX_ERR(0, 104, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_subprocess, __pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":105 + /* "_pywrapfst.pyx":100 * import os * import subprocess * import sys # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":112 + /* "_pywrapfst.pyx":107 * # These defintions only ensure that these are defined to avoid attribute errors, * # but don't actually contain the type definitions. Those are in _pywrapfst.pyi. * import typing # <<<<<<<<<<<<<< * * ArcMapType = """typing.Literal["identity", "input_epsilon", "invert", */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_typing, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_typing, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_2) < 0) __PYX_ERR(0, 112, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_typing, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":114 + /* "_pywrapfst.pyx":109 * import typing * * ArcMapType = """typing.Literal["identity", "input_epsilon", "invert", # <<<<<<<<<<<<<< * "output_epsilon", "plus", "power", "quantize", * "rmweight", "superfinal", "times", "to_log", */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_kp_u_typing_Literal_identity_input_ep) < 0) __PYX_ERR(0, 114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ArcMapType, __pyx_kp_u_typing_Literal_identity_input_ep) < 0) __PYX_ERR(0, 109, __pyx_L1_error) - /* "_pywrapfst.pyx":119 + /* "_pywrapfst.pyx":114 * # NOTE: Both spellings of "to_std" * "to_log64", "to_std", "to_standard"]""" * ClosureType = """Literal["star", "plus"]""" # <<<<<<<<<<<<<< * ComposeFilter = """typing.Literal["alt_sequence", "auto", "match", "no_match", * "null", "sequence", "trivial"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ClosureType, __pyx_kp_u_Literal_star_plus) < 0) __PYX_ERR(0, 119, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ClosureType, __pyx_kp_u_Literal_star_plus) < 0) __PYX_ERR(0, 114, __pyx_L1_error) - /* "_pywrapfst.pyx":120 + /* "_pywrapfst.pyx":115 * "to_log64", "to_std", "to_standard"]""" * ClosureType = """Literal["star", "plus"]""" * ComposeFilter = """typing.Literal["alt_sequence", "auto", "match", "no_match", # <<<<<<<<<<<<<< * "null", "sequence", "trivial"]""" * DeterminizeType = """typing.Literal["functional", "nonfunctional", */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_kp_u_typing_Literal_alt_sequence_auto) < 0) __PYX_ERR(0, 120, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComposeFilter, __pyx_kp_u_typing_Literal_alt_sequence_auto) < 0) __PYX_ERR(0, 115, __pyx_L1_error) - /* "_pywrapfst.pyx":122 + /* "_pywrapfst.pyx":117 * ComposeFilter = """typing.Literal["alt_sequence", "auto", "match", "no_match", * "null", "sequence", "trivial"]""" * DeterminizeType = """typing.Literal["functional", "nonfunctional", # <<<<<<<<<<<<<< * "disambiguate"]""" * DrawFloatFormat = """typing.Literal["e", "f", "g"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_kp_u_typing_Literal_functional_nonfun) < 0) __PYX_ERR(0, 122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeterminizeType, __pyx_kp_u_typing_Literal_functional_nonfun) < 0) __PYX_ERR(0, 117, __pyx_L1_error) - /* "_pywrapfst.pyx":124 + /* "_pywrapfst.pyx":119 * DeterminizeType = """typing.Literal["functional", "nonfunctional", * "disambiguate"]""" * DrawFloatFormat = """typing.Literal["e", "f", "g"]""" # <<<<<<<<<<<<<< * EpsNormalizeType = """typing.Literal["input", "output"]""" * FarType = """typing.Literal[ */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DrawFloatFormat, __pyx_kp_u_typing_Literal_e_f_g) < 0) __PYX_ERR(0, 124, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DrawFloatFormat, __pyx_kp_u_typing_Literal_e_f_g) < 0) __PYX_ERR(0, 119, __pyx_L1_error) - /* "_pywrapfst.pyx":125 + /* "_pywrapfst.pyx":120 * "disambiguate"]""" * DrawFloatFormat = """typing.Literal["e", "f", "g"]""" * EpsNormalizeType = """typing.Literal["input", "output"]""" # <<<<<<<<<<<<<< * FarType = """typing.Literal[ * "fst", */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EpsNormalizeType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EpsNormalizeType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 120, __pyx_L1_error) - /* "_pywrapfst.pyx":126 + /* "_pywrapfst.pyx":121 * DrawFloatFormat = """typing.Literal["e", "f", "g"]""" * EpsNormalizeType = """typing.Literal["input", "output"]""" * FarType = """typing.Literal[ # <<<<<<<<<<<<<< * "fst", * "stlist", */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_kp_u_typing_Literal_fst_stlist_sttabl) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FarType, __pyx_kp_u_typing_Literal_fst_stlist_sttabl) < 0) __PYX_ERR(0, 121, __pyx_L1_error) - /* "_pywrapfst.pyx":132 + /* "_pywrapfst.pyx":127 * "default" * ]""" * ProjectType = """typing.Literal["input", "output"]""" # <<<<<<<<<<<<<< * QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state", * "top"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProjectType, __pyx_kp_u_typing_Literal_input_output) < 0) __PYX_ERR(0, 127, __pyx_L1_error) - /* "_pywrapfst.pyx":133 + /* "_pywrapfst.pyx":128 * ]""" * ProjectType = """typing.Literal["input", "output"]""" * QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state", # <<<<<<<<<<<<<< * "top"]""" * RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_kp_u_typing_Literal_auto_fifo_lifo_sh) < 0) __PYX_ERR(0, 133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_QueueType, __pyx_kp_u_typing_Literal_auto_fifo_lifo_sh) < 0) __PYX_ERR(0, 128, __pyx_L1_error) - /* "_pywrapfst.pyx":135 + /* "_pywrapfst.pyx":130 * QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state", * "top"]""" * RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" # <<<<<<<<<<<<<< * ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" - * ReweightType = """typing.Literal["to_inital", "to_final"]""" + * ReweightType = """typing.Literal["to_initial", "to_final"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_kp_u_typing_Literal_uniform_log_prob) < 0) __PYX_ERR(0, 135, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RandArcSelection, __pyx_kp_u_typing_Literal_uniform_log_prob) < 0) __PYX_ERR(0, 130, __pyx_L1_error) - /* "_pywrapfst.pyx":136 + /* "_pywrapfst.pyx":131 * "top"]""" * RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" * ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" # <<<<<<<<<<<<<< - * ReweightType = """typing.Literal["to_inital", "to_final"]""" + * ReweightType = """typing.Literal["to_initial", "to_final"]""" * SortType = """typing.Literal["ilabel", "olabel"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_kp_u_typing_Literal_neither_input_out) < 0) __PYX_ERR(0, 136, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplaceLabelType, __pyx_kp_u_typing_Literal_neither_input_out) < 0) __PYX_ERR(0, 131, __pyx_L1_error) - /* "_pywrapfst.pyx":137 + /* "_pywrapfst.pyx":132 * RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" * ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" - * ReweightType = """typing.Literal["to_inital", "to_final"]""" # <<<<<<<<<<<<<< + * ReweightType = """typing.Literal["to_initial", "to_final"]""" # <<<<<<<<<<<<<< * SortType = """typing.Literal["ilabel", "olabel"]""" * StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReweightType, __pyx_kp_u_typing_Literal_to_inital_to_fina) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReweightType, __pyx_kp_u_typing_Literal_to_initial_to_fin) < 0) __PYX_ERR(0, 132, __pyx_L1_error) - /* "_pywrapfst.pyx":138 + /* "_pywrapfst.pyx":133 * ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" - * ReweightType = """typing.Literal["to_inital", "to_final"]""" + * ReweightType = """typing.Literal["to_initial", "to_final"]""" * SortType = """typing.Literal["ilabel", "olabel"]""" # <<<<<<<<<<<<<< * StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_kp_u_typing_Literal_ilabel_olabel) < 0) __PYX_ERR(0, 138, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SortType, __pyx_kp_u_typing_Literal_ilabel_olabel) < 0) __PYX_ERR(0, 133, __pyx_L1_error) - /* "_pywrapfst.pyx":139 - * ReweightType = """typing.Literal["to_inital", "to_final"]""" + /* "_pywrapfst.pyx":134 + * ReweightType = """typing.Literal["to_initial", "to_final"]""" * SortType = """typing.Literal["ilabel", "olabel"]""" * StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" # <<<<<<<<<<<<<< * * WeightLike = "typing.Union[Weight, typing.Union[str, int, float]]" */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_kp_u_typing_Literal_arc_sum_arc_uniqu) < 0) __PYX_ERR(0, 139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_StateMapType, __pyx_kp_u_typing_Literal_arc_sum_arc_uniqu) < 0) __PYX_ERR(0, 134, __pyx_L1_error) - /* "_pywrapfst.pyx":141 + /* "_pywrapfst.pyx":136 * StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" * * WeightLike = "typing.Union[Weight, typing.Union[str, int, float]]" # <<<<<<<<<<<<<< * * ## Custom exceptions. */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_kp_u_typing_Union_Weight_typing_Union) < 0) __PYX_ERR(0, 141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_WeightLike, __pyx_kp_u_typing_Union_Weight_typing_Union) < 0) __PYX_ERR(0, 136, __pyx_L1_error) - /* "_pywrapfst.pyx":146 + /* "_pywrapfst.pyx":141 * * * class FstError(Exception): # <<<<<<<<<<<<<< * * pass */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])); __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 146, __pyx_L1_error); - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 141, __pyx_L1_error); + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstError, __pyx_n_s_FstError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstError, __pyx_n_s_FstError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3 != __pyx_t_2) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 146, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 141, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstError, __pyx_t_2) < 0) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstError, __pyx_t_2) < 0) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":151 + /* "_pywrapfst.pyx":146 * * * class FstArgError(FstError, ValueError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 151, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 146, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_FstArgError, __pyx_n_s_FstArgError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_FstArgError, __pyx_n_s_FstArgError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_3 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 151, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 146, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_FstArgError, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_FstArgError, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_4) < 0) __PYX_ERR(0, 151, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstArgError, __pyx_t_4) < 0) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":156 + /* "_pywrapfst.pyx":151 * * * class FstBadWeightError(FstError, ValueError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 156, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_builtin_ValueError)) __PYX_ERR(0, 151, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstBadWeightError, __pyx_n_s_FstBadWeightError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstBadWeightError, __pyx_n_s_FstBadWeightError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 156, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 151, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstBadWeightError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstBadWeightError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_5) < 0) __PYX_ERR(0, 156, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstBadWeightError, __pyx_t_5) < 0) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":161 + /* "_pywrapfst.pyx":156 * * * class FstIndexError(FstError, IndexError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_IndexError); __Pyx_GIVEREF(__pyx_builtin_IndexError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_IndexError)) __PYX_ERR(0, 161, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_IndexError)) __PYX_ERR(0, 156, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstIndexError, __pyx_n_s_FstIndexError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_FstIndexError, __pyx_n_s_FstIndexError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3 != __pyx_t_2) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 161, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 156, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstIndexError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FstIndexError, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_2) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIndexError, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":166 + /* "_pywrapfst.pyx":161 * * * class FstIOError(FstError, IOError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_IOError); __Pyx_GIVEREF(__pyx_builtin_IOError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_builtin_IOError)) __PYX_ERR(0, 166, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_builtin_IOError)) __PYX_ERR(0, 161, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_FstIOError, __pyx_n_s_FstIOError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_n_s_FstIOError, __pyx_n_s_FstIOError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_3 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 161, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_FstIOError, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_FstIOError, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_4) < 0) __PYX_ERR(0, 166, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstIOError, __pyx_t_4) < 0) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":171 + /* "_pywrapfst.pyx":166 * * * class FstOpError(FstError, RuntimeError): # <<<<<<<<<<<<<< * * pass */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FstError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error); __Pyx_INCREF(__pyx_builtin_RuntimeError); __Pyx_GIVEREF(__pyx_builtin_RuntimeError); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_builtin_RuntimeError)) __PYX_ERR(0, 171, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_builtin_RuntimeError)) __PYX_ERR(0, 166, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstOpError, __pyx_n_s_FstOpError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstOpError, __pyx_n_s_FstOpError, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 171, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 166, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstOpError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstOpError, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_5) < 0) __PYX_ERR(0, 171, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstOpError, __pyx_t_5) < 0) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":510 + /* "_pywrapfst.pyx":506 * raise FstBadWeightError("Invalid weight") * * cpdef Weight copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 510, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":523 + /* "_pywrapfst.pyx":519 * # C++ part out-of-class and then call it from within. * * @classmethod # <<<<<<<<<<<<<< * def zero(cls, weight_type): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_11zero, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_zero, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_11zero, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_zero, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero, __pyx_t_3) < 0) __PYX_ERR(0, 523, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero, __pyx_t_3) < 0) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero, __pyx_t_2) < 0) __PYX_ERR(0, 523, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_zero, __pyx_t_2) < 0) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":532 + /* "_pywrapfst.pyx":528 * return _zero(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def one(cls, weight_type): * """ */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_13one, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_one, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_13one, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_one, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one, __pyx_t_2) < 0) __PYX_ERR(0, 532, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one, __pyx_t_2) < 0) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one, __pyx_t_3) < 0) __PYX_ERR(0, 532, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_one, __pyx_t_3) < 0) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":541 + /* "_pywrapfst.pyx":537 * return _one(weight_type) * * @classmethod # <<<<<<<<<<<<<< * def no_weight(cls, weight_type): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_15no_weight, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_no_weight, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_15no_weight, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_no_weight, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight, __pyx_t_3) < 0) __PYX_ERR(0, 541, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight, __pyx_t_3) < 0) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight, __pyx_t_2) < 0) __PYX_ERR(0, 541, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_no_weight, __pyx_t_2) < 0) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":556 + /* "_pywrapfst.pyx":552 * return not w1 == w2 * * cpdef string to_string(self): # <<<<<<<<<<<<<< * return self._weight.get().ToString() * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_21to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_21to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_to_string, __pyx_t_2) < 0) __PYX_ERR(0, 556, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_to_string, __pyx_t_2) < 0) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":559 + /* "_pywrapfst.pyx":555 * return self._weight.get().ToString() * * cpdef string type(self): # <<<<<<<<<<<<<< * """type(self) * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_23type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_23type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 559, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); - /* "_pywrapfst.pyx":566 + /* "_pywrapfst.pyx":562 * return self._weight.get().Type() * * cpdef bool member(self): # <<<<<<<<<<<<<< * return self._weight.get().Member() * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_25member, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_member, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_25member, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight_member, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_member, __pyx_t_2) < 0) __PYX_ERR(0, 566, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Weight, __pyx_n_s_member, __pyx_t_2) < 0) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Weight); @@ -72521,7 +72464,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._weight cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_27__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -72532,375 +72475,384 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._weight cannot be converted to a Python object for pickling" */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_6Weight_29__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Weight___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":577 + /* "_pywrapfst.pyx":573 * * * def plus(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * plus(lhs, rhs) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_1plus, 0, __pyx_n_s_plus, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_1plus, 0, __pyx_n_s_plus, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_2) < 0) __PYX_ERR(0, 577, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_plus, __pyx_t_2) < 0) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":609 + /* "_pywrapfst.pyx":605 * * * def times(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * times(lhs, rhs) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3times, 0, __pyx_n_s_times, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3times, 0, __pyx_n_s_times, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_2) < 0) __PYX_ERR(0, 609, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_times, __pyx_t_2) < 0) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":641 + /* "_pywrapfst.pyx":637 * * * def divide(Weight lhs, Weight rhs): # <<<<<<<<<<<<<< * """ * divide(lhs, rhs) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_5divide, 0, __pyx_n_s_divide, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_5divide, 0, __pyx_n_s_divide, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_2) < 0) __PYX_ERR(0, 641, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_divide, __pyx_t_2) < 0) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":674 + /* "_pywrapfst.pyx":670 * * * def power(Weight w, size_t n): # <<<<<<<<<<<<<< * """ * power(lhs, rhs) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_7power, 0, __pyx_n_s_power, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_7power, 0, __pyx_n_s_power, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_2) < 0) __PYX_ERR(0, 674, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_power, __pyx_t_2) < 0) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":816 + /* "_pywrapfst.pyx":812 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_SymbolTable_from_string, (self.write_to_string(),)) * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_reduce, __pyx_t_2) < 0) __PYX_ERR(0, 816, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_reduce, __pyx_t_2) < 0) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":838 + /* "_pywrapfst.pyx":834 * return _raw * * cpdef int64_t available_key(self) except *: # <<<<<<<<<<<<<< * """ * available_key(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_7available_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_available_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_7available_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_available_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_available_key, __pyx_t_2) < 0) __PYX_ERR(0, 838, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_available_key, __pyx_t_2) < 0) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":846 + /* "_pywrapfst.pyx":842 * return self._raw_ptr_or_raise().AvailableKey() * * cpdef bytes checksum(self): # <<<<<<<<<<<<<< * """ * checksum(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_9checksum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_checksum, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_9checksum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_checksum, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_checksum, __pyx_t_2) < 0) __PYX_ERR(0, 846, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_checksum, __pyx_t_2) < 0) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":854 + /* "_pywrapfst.pyx":850 * return self._raw_ptr_or_raise().CheckSum() * * cpdef SymbolTable copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_11copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_11copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 854, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":862 + /* "_pywrapfst.pyx":858 * return _init_SymbolTable(WrapUnique(self._raw_ptr_or_raise().Copy())) * * def find(self, key): # <<<<<<<<<<<<<< * """ * find(self, key) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_13find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_find, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_13find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_find, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_find, __pyx_t_2) < 0) __PYX_ERR(0, 862, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_find, __pyx_t_2) < 0) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":885 + /* "_pywrapfst.pyx":881 * return _raw.FindSymbol(key) * * cpdef int64_t get_nth_key(self, ssize_t pos) except *: # <<<<<<<<<<<<<< * """ * get_nth_key(self, pos) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_15get_nth_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_get_nth_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_15get_nth_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_get_nth_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_get_nth_key, __pyx_t_2) < 0) __PYX_ERR(0, 885, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_get_nth_key, __pyx_t_2) < 0) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":899 + /* "_pywrapfst.pyx":895 * return self._raw_ptr_or_raise().GetNthKey(pos) * * cpdef bytes labeled_checksum(self): # <<<<<<<<<<<<<< * """ * labeled_checksum(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_17labeled_checksum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_labeled_checksum, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_17labeled_checksum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_labeled_checksum, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_labeled_checksum, __pyx_t_2) < 0) __PYX_ERR(0, 899, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_labeled_checksum, __pyx_t_2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":907 + /* "_pywrapfst.pyx":903 * return self._raw_ptr_or_raise().LabeledCheckSum() * * cpdef bool member(self, key) except *: # <<<<<<<<<<<<<< * """ * member(self, key) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_19member, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_member, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_19member, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_member, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_member, __pyx_t_2) < 0) __PYX_ERR(0, 907, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_member, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":929 + /* "_pywrapfst.pyx":925 * return _raw.MemberIndex(key) * * cpdef string name(self) except *: # <<<<<<<<<<<<<< * """ * name(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_21name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_name, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_21name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_name, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 929, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":937 + /* "_pywrapfst.pyx":933 * return self._raw_ptr_or_raise().Name() * * cpdef size_t num_symbols(self) except *: # <<<<<<<<<<<<<< * """ * num_symbols(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_23num_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_num_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_23num_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_num_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_num_symbols, __pyx_t_2) < 0) __PYX_ERR(0, 937, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_num_symbols, __pyx_t_2) < 0) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":945 + /* "_pywrapfst.pyx":941 * return self._raw_ptr_or_raise().NumSymbols() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_25write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_25write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 945, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":962 + /* "_pywrapfst.pyx":958 * raise FstIOError(f"Write failed: {source!r}") * - * cpdef void write_text(self, source) except *: # <<<<<<<<<<<<<< + * def write_text(self, source, *, sep="\t "): # <<<<<<<<<<<<<< * """ - * write_text(self, source) + * write_text(self, source, *, sep="\t ") */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_27write_text, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write_text, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write_text, __pyx_t_2) < 0) __PYX_ERR(0, 962, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sep, __pyx_kp_u__4) < 0) __PYX_ERR(0, 958, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_27write_text, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write_text, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_3, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write_text, __pyx_t_3) < 0) __PYX_ERR(0, 958, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":979 + /* "_pywrapfst.pyx":978 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_29write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write_to_string, __pyx_t_2) < 0) __PYX_ERR(0, 979, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15SymbolTableView_29write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableView_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTableView, __pyx_n_s_write_to_string, __pyx_t_3) < 0) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTableView); - /* "_pywrapfst.pyx":1073 + /* "_pywrapfst.pyx":1072 * return mutable_raw * * cpdef int64_t add_symbol(self, symbol, int64_t key=fst.kNoSymbol) except *: # <<<<<<<<<<<<<< * """ * add_symbol(self, symbol, key=NO_SYMBOL) */ - __pyx_k__4 = fst::kNoSymbol; - __pyx_t_2 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_k__5 = fst::kNoSymbol; + __pyx_t_3 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_1add_symbol, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_add_symbol, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_add_symbol, __pyx_t_2) < 0) __PYX_ERR(0, 1073, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_1add_symbol, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_add_symbol, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_add_symbol, __pyx_t_3) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableSymbolTable); - /* "_pywrapfst.pyx":1097 + /* "_pywrapfst.pyx":1096 * return _mutable_raw.AddSymbol(_symbol) * * cpdef void add_table(self, SymbolTableView symbols) except *: # <<<<<<<<<<<<<< * """ * add_table(self, symbols) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_3add_table, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_add_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_add_table, __pyx_t_2) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_3add_table, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_add_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1096, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_add_table, __pyx_t_3) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableSymbolTable); - /* "_pywrapfst.pyx":1112 + /* "_pywrapfst.pyx":1111 * deref(symbols._raw_ptr_or_raise())) * * cpdef void set_name(self, new_name) except *: # <<<<<<<<<<<<<< * self._mutable_raw_ptr_or_raise().SetName(tostring(new_name)) * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_5set_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_set_name, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_set_name, __pyx_t_2) < 0) __PYX_ERR(0, 1112, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableSymbolTable_5set_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableSymbolTable_set_name, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableSymbolTable, __pyx_n_s_set_name, __pyx_t_3) < 0) __PYX_ERR(0, 1111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableSymbolTable); - /* "_pywrapfst.pyx":1157 + /* "_pywrapfst.pyx":1156 * return self._smart_table.get() * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_5read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1157, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_5read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - /* "_pywrapfst.pyx":1178 + /* "_pywrapfst.pyx":1177 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< - * def read_text(cls, source, bool allow_negative_labels=False): + * def read_text(cls, source, *, sep="\t "): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_7read_text, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read_text, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_sep, __pyx_kp_u__4) < 0) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_7read_text, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read_text, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__83); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text, __pyx_t_3) < 0) __PYX_ERR(0, 1178, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_3, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text, __pyx_t_3) < 0) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text, __pyx_t_2) < 0) __PYX_ERR(0, 1178, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_text, __pyx_t_2) < 0) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - /* "_pywrapfst.pyx":1204 + /* "_pywrapfst.pyx":1200 * return _init_SymbolTable(move(_symbols)) * * @classmethod # <<<<<<<<<<<<<< * def read_fst(cls, source, bool input_table): * """ */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_9read_fst, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read_fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11SymbolTable_9read_fst, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTable_read_fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst, __pyx_t_2) < 0) __PYX_ERR(0, 1204, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst, __pyx_t_2) < 0) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst, __pyx_t_3) < 0) __PYX_ERR(0, 1204, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_SymbolTable, __pyx_n_s_read_fst, __pyx_t_3) < 0) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_SymbolTable); - /* "_pywrapfst.pyx":1266 + /* "_pywrapfst.pyx":1262 * * * cpdef SymbolTable _read_SymbolTable_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9_read_SymbolTable_from_string, 0, __pyx_n_s_read_SymbolTable_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9_read_SymbolTable_from_string, 0, __pyx_n_s_read_SymbolTable_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_SymbolTable_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1266, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_SymbolTable_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":1279 + /* "_pywrapfst.pyx":1275 * * * cpdef SymbolTable compact_symbol_table(SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * compact_symbol_table(symbols) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11compact_symbol_table, 0, __pyx_n_s_compact_symbol_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_11compact_symbol_table, 0, __pyx_n_s_compact_symbol_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_compact_symbol_table, __pyx_t_3) < 0) __PYX_ERR(0, 1279, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_compact_symbol_table, __pyx_t_3) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":1295 + /* "_pywrapfst.pyx":1291 * * * cpdef SymbolTable merge_symbol_table(SymbolTableView lhs, # <<<<<<<<<<<<<< * SymbolTableView rhs): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_13merge_symbol_table, 0, __pyx_n_s_merge_symbol_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_13merge_symbol_table, 0, __pyx_n_s_merge_symbol_table, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_symbol_table, __pyx_t_3) < 0) __PYX_ERR(0, 1295, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge_symbol_table, __pyx_t_3) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 @@ -72908,7 +72860,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._siter cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_20_SymbolTableIterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableIterator___reduce_cy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_20_SymbolTableIterator_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableIterator___reduce_cy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -72919,1977 +72871,1977 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._siter cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_20_SymbolTableIterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableIterator___setstate, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_20_SymbolTableIterator_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymbolTableIterator___setstate, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":1417 + /* "_pywrapfst.pyx":1413 * # Registers the class for pickling. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_7__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_7__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(0, 1417, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1420 + /* "_pywrapfst.pyx":1416 * return (_read_EncodeMapper_from_string, (self.write_to_string(),)) * * cpdef string arc_type(self): # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_9arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_9arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_arc_type, __pyx_t_3) < 0) __PYX_ERR(0, 1420, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_arc_type, __pyx_t_3) < 0) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1428 + /* "_pywrapfst.pyx":1424 * return self._mapper.get().ArcType() * * cpdef string weight_type(self): # <<<<<<<<<<<<<< * """ * weight_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_11weight_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_11weight_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_weight_type, __pyx_t_3) < 0) __PYX_ERR(0, 1428, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_weight_type, __pyx_t_3) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1436 + /* "_pywrapfst.pyx":1432 * return self._mapper.get().WeightType() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_13flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_13flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 1436, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1444 + /* "_pywrapfst.pyx":1440 * return self._mapper.get().Flags() * * def properties(self, mask): # <<<<<<<<<<<<<< * """ * properties(self, mask) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_15properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_15properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_properties, __pyx_t_3) < 0) __PYX_ERR(0, 1444, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_properties, __pyx_t_3) < 0) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1461 + /* "_pywrapfst.pyx":1457 * return FstProperties(self._mapper.get().Properties(mask.value)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_17read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_17read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1461, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1461, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1483 + /* "_pywrapfst.pyx":1479 * return _init_EncodeMapper(_mapper.release()) * * @staticmethod # <<<<<<<<<<<<<< * def read_from_string(state): * """ */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_19read_from_string, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_19read_from_string, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1483, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1483, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1501 + /* "_pywrapfst.pyx":1497 * return _read_EncodeMapper_from_string(state) * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_21write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_21write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_write, __pyx_t_3) < 0) __PYX_ERR(0, 1501, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_write, __pyx_t_3) < 0) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1517 + /* "_pywrapfst.pyx":1513 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_23write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_23write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_write_to_string, __pyx_t_3) < 0) __PYX_ERR(0, 1517, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_write_to_string, __pyx_t_3) < 0) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1534 + /* "_pywrapfst.pyx":1530 * return _sstrm.str() * * cpdef _EncodeMapperSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< * """ * input_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_25input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_25input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1534, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1544 + /* "_pywrapfst.pyx":1540 * return _init_EncodeMapperSymbolTableView(self._mapper, input_side=True) * * cpdef _EncodeMapperSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< * """ * output_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_27output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_27output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1544, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1560 + /* "_pywrapfst.pyx":1556 * self._mapper.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_input_symbols(self, symbols) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_29set_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_set_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_29set_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_set_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_set_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1560, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_set_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1583 + /* "_pywrapfst.pyx":1579 * self._mapper.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_output_symbols(self, symbols) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_31set_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_set_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12EncodeMapper_31set_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_EncodeMapper_set_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_set_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1583, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_EncodeMapper, __pyx_n_s_set_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_EncodeMapper); - /* "_pywrapfst.pyx":1607 + /* "_pywrapfst.pyx":1603 * * * cpdef EncodeMapper _read_EncodeMapper_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15_read_EncodeMapper_from_string, 0, __pyx_n_s_read_EncodeMapper_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_15_read_EncodeMapper_from_string, 0, __pyx_n_s_read_EncodeMapper_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_EncodeMapper_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1607, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_EncodeMapper_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":1649 + /* "_pywrapfst.pyx":1645 * return proc.communicate(dot.encode("utf8"))[0] * * def _repr_svg_(self): # <<<<<<<<<<<<<< * """IPython notebook magic to produce an SVG of the FST using GraphViz. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_1_repr_svg_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst__repr_svg, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_1_repr_svg_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst__repr_svg, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_repr_svg, __pyx_t_3) < 0) __PYX_ERR(0, 1649, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_repr_svg, __pyx_t_3) < 0) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1688 + /* "_pywrapfst.pyx":1684 * # can't be derived by _init_XFst. * * def __reduce__(self): # <<<<<<<<<<<<<< * return (_read_Fst_from_string, (self.write_to_string(),)) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst___reduce, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1697 + /* "_pywrapfst.pyx":1693 * return self.print() * * cpdef string arc_type(self): # <<<<<<<<<<<<<< * """ * arc_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_11arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1697, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_11arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_arc_type, __pyx_t_3) < 0) __PYX_ERR(0, 1697, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_arc_type, __pyx_t_3) < 0) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1705 + /* "_pywrapfst.pyx":1701 * return self._fst.get().ArcType() * * cpdef _ArcIterator arcs(self, int64_t state): # <<<<<<<<<<<<<< * """ * arcs(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_13arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_13arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 1705, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1719 + /* "_pywrapfst.pyx":1715 * return _ArcIterator(self, state) * * cpdef Fst copy(self): # <<<<<<<<<<<<<< * """ * copy(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_15copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_15copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 1719, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 1715, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1727 + /* "_pywrapfst.pyx":1723 * return _init_XFst(new fst.FstClass(deref(self._fst))) * * cpdef void draw(self, # <<<<<<<<<<<<<< * source, * SymbolTableView isymbols=None, */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_17draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_draw, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_17draw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_draw, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__119); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 1727, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__122); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_draw, __pyx_t_3) < 0) __PYX_ERR(0, 1723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1806 + /* "_pywrapfst.pyx":1802 * _source) * * cpdef Weight final(self, int64_t state): # <<<<<<<<<<<<<< * """ * final(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_19final, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_final, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_19final, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_final, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_final, __pyx_t_3) < 0) __PYX_ERR(0, 1806, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_final, __pyx_t_3) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1827 + /* "_pywrapfst.pyx":1823 * return _weight * * cpdef string fst_type(self): # <<<<<<<<<<<<<< * """ * fst_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_21fst_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_fst_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_21fst_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_fst_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_fst_type, __pyx_t_3) < 0) __PYX_ERR(0, 1827, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_fst_type, __pyx_t_3) < 0) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1835 + /* "_pywrapfst.pyx":1831 * return self._fst.get().FstType() * * cpdef _FstSymbolTableView input_symbols(self): # <<<<<<<<<<<<<< * """ * input_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_23input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1835, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_23input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1835, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1845 + /* "_pywrapfst.pyx":1841 * return _init_FstSymbolTableView(self._fst, input_side=True) * * cpdef size_t num_arcs(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_arcs(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_25num_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_25num_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 1845, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1865 + /* "_pywrapfst.pyx":1861 * return _result * * cpdef size_t num_input_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_input_epsilons(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_27num_input_epsilons, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_input_epsilons, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_27num_input_epsilons, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_input_epsilons, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_input_epsilons, __pyx_t_3) < 0) __PYX_ERR(0, 1865, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_input_epsilons, __pyx_t_3) < 0) __PYX_ERR(0, 1861, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1885 + /* "_pywrapfst.pyx":1881 * return _result * * cpdef size_t num_output_epsilons(self, int64_t state) except *: # <<<<<<<<<<<<<< * """ * num_output_epsilons(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_29num_output_epsilons, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_output_epsilons, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_29num_output_epsilons, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_num_output_epsilons, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_output_epsilons, __pyx_t_3) < 0) __PYX_ERR(0, 1885, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_num_output_epsilons, __pyx_t_3) < 0) __PYX_ERR(0, 1881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1905 + /* "_pywrapfst.pyx":1901 * return _result * * cpdef _FstSymbolTableView output_symbols(self): # <<<<<<<<<<<<<< * """ * output_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_31output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1905, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_31output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1905, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 1901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1915 + /* "_pywrapfst.pyx":1911 * return _init_FstSymbolTableView(self._fst, input_side=False) * * cpdef string print(self, SymbolTableView isymbols=None, # <<<<<<<<<<<<<< * SymbolTableView osymbols=None, SymbolTableView ssymbols=None, * bool acceptor=False, bool show_weight_one=False, */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_33print, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_print, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_33print, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_print, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__129); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_print, __pyx_t_3) < 0) __PYX_ERR(0, 1915, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__132); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_print, __pyx_t_3) < 0) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1962 + /* "_pywrapfst.pyx":1958 * return _sstrm.str() * * def properties(self, mask, bool test): # <<<<<<<<<<<<<< * """ * properties(self, mask, test) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_35properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1962, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_35properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_properties, __pyx_t_3) < 0) __PYX_ERR(0, 1962, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_properties, __pyx_t_3) < 0) __PYX_ERR(0, 1958, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":1982 + /* "_pywrapfst.pyx":1978 * return FstProperties(self._fst.get().Properties(mask.value, test)) * * @classmethod # <<<<<<<<<<<<<< * def read(cls, source): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_37read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_37read, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1982, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1982, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1982, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read, __pyx_t_2) < 0) __PYX_ERR(0, 1978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2000 + /* "_pywrapfst.pyx":1996 * return _read_Fst(source) * * @classmethod # <<<<<<<<<<<<<< * def read_from_string(cls, state): * """ */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_39read_from_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_39read_from_string, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_read_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 2000, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string, __pyx_t_2) < 0) __PYX_ERR(0, 1996, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 2000, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_read_from_string, __pyx_t_3) < 0) __PYX_ERR(0, 1996, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2018 + /* "_pywrapfst.pyx":2014 * return _read_Fst_from_string(state) * * cpdef int64_t start(self): # <<<<<<<<<<<<<< * """ * start(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_41start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_start, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2018, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_41start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_start, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_start, __pyx_t_3) < 0) __PYX_ERR(0, 2018, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_start, __pyx_t_3) < 0) __PYX_ERR(0, 2014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2026 + /* "_pywrapfst.pyx":2022 * return self._fst.get().Start() * * cpdef _StateIterator states(self): # <<<<<<<<<<<<<< * """ * states(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_43states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2026, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_43states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_states, __pyx_t_3) < 0) __PYX_ERR(0, 2026, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_states, __pyx_t_3) < 0) __PYX_ERR(0, 2022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2037 + /* "_pywrapfst.pyx":2033 * return _StateIterator(self) * * cpdef bool verify(self): # <<<<<<<<<<<<<< * """ * verify(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_45verify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_verify, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_45verify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_verify, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_verify, __pyx_t_3) < 0) __PYX_ERR(0, 2037, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_verify, __pyx_t_3) < 0) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2048 + /* "_pywrapfst.pyx":2044 * return fst.Verify(deref(self._fst)) * * cpdef string weight_type(self): # <<<<<<<<<<<<<< * """ * weight_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_47weight_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_47weight_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_weight_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_weight_type, __pyx_t_3) < 0) __PYX_ERR(0, 2048, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_weight_type, __pyx_t_3) < 0) __PYX_ERR(0, 2044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2059 + /* "_pywrapfst.pyx":2055 * return self._fst.get().WeightType() * * cpdef void write(self, source) except *: # <<<<<<<<<<<<<< * """ * write(self, source) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_49write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2059, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_49write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_write, __pyx_t_3) < 0) __PYX_ERR(0, 2059, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_write, __pyx_t_3) < 0) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2076 + /* "_pywrapfst.pyx":2072 * raise FstIOError(f"Write failed: {source!r}") * * cpdef bytes write_to_string(self): # <<<<<<<<<<<<<< * """ * write_to_string(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_51write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Fst_51write_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fst_write_to_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_write_to_string, __pyx_t_3) < 0) __PYX_ERR(0, 2076, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Fst, __pyx_n_s_write_to_string, __pyx_t_3) < 0) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Fst); - /* "_pywrapfst.pyx":2117 + /* "_pywrapfst.pyx":2113 * raise FstOpError("Incompatible or invalid weight type") * * def add_arc(self, int64_t state, Arc arc): # <<<<<<<<<<<<<< * """ * add_arc(self, state, arc) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_1add_arc, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_arc, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2117, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_1add_arc, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_arc, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_arc, __pyx_t_3) < 0) __PYX_ERR(0, 2117, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_arc, __pyx_t_3) < 0) __PYX_ERR(0, 2113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2137 + /* "_pywrapfst.pyx":2133 * return self * * cpdef int64_t add_state(self): # <<<<<<<<<<<<<< * """ * add_state(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_3add_state, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_state, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_3add_state, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_state, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_state, __pyx_t_3) < 0) __PYX_ERR(0, 2137, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_state, __pyx_t_3) < 0) __PYX_ERR(0, 2133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2148 + /* "_pywrapfst.pyx":2144 * return self._mfst.get().AddState() * * cpdef void add_states(self, size_t n): # <<<<<<<<<<<<<< * """ * add_states(self, n) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_5add_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2148, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_5add_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_add_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_states, __pyx_t_3) < 0) __PYX_ERR(0, 2148, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_add_states, __pyx_t_3) < 0) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2165 + /* "_pywrapfst.pyx":2161 * fst.ArcSort(self._mfst.get(), _sort_type) * * def arcsort(self, sort_type="ilabel"): # <<<<<<<<<<<<<< * """ * arcsort(self, sort_type="ilabel") */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_7arcsort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_arcsort, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2165, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_7arcsort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_arcsort, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__149); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_arcsort, __pyx_t_3) < 0) __PYX_ERR(0, 2165, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__152); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_arcsort, __pyx_t_3) < 0) __PYX_ERR(0, 2161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2190 + /* "_pywrapfst.pyx":2186 * fst.Closure(self._mfst.get(), _get_closure_type(tostring(closure_type))) * * def closure(self, closure_type="star"): # <<<<<<<<<<<<<< * """ * closure(self, closure_type="star") */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_9closure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_closure, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_9closure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_closure, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__152); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_closure, __pyx_t_3) < 0) __PYX_ERR(0, 2190, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__155); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_closure, __pyx_t_3) < 0) __PYX_ERR(0, 2186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2215 + /* "_pywrapfst.pyx":2212 * self._check_mutating_imethod() * * def concat(self, Fst fst2): # <<<<<<<<<<<<<< * """ * concat(self, fst2) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_11concat, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_concat, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2215, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_11concat, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_concat, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_concat, __pyx_t_3) < 0) __PYX_ERR(0, 2215, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_concat, __pyx_t_3) < 0) __PYX_ERR(0, 2212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2238 + /* "_pywrapfst.pyx":2235 * fst.Connect(self._mfst.get()) * * def connect(self): # <<<<<<<<<<<<<< * """ * connect(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_13connect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_connect, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2238, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_13connect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_connect, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_connect, __pyx_t_3) < 0) __PYX_ERR(0, 2238, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_connect, __pyx_t_3) < 0) __PYX_ERR(0, 2235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2257 + /* "_pywrapfst.pyx":2254 * self._check_mutating_imethod() * * def decode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< * """ * decode(self, mapper) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_15decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_decode, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2257, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_15decode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_decode, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_decode, __pyx_t_3) < 0) __PYX_ERR(0, 2257, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_decode, __pyx_t_3) < 0) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2280 + /* "_pywrapfst.pyx":2277 * self._check_mutating_imethod() * * def delete_arcs(self, int64_t state, size_t n=0): # <<<<<<<<<<<<<< * """ * delete_arcs(self, state, n=0) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_17delete_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_delete_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_17delete_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_delete_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__160); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_delete_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 2280, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__163); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_delete_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 2277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2310 + /* "_pywrapfst.pyx":2307 * self._check_mutating_imethod() * * def delete_states(self, states=None): # <<<<<<<<<<<<<< * """ * delete_states(self, states=None) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_19delete_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_delete_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_19delete_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_delete_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__163); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_delete_states, __pyx_t_3) < 0) __PYX_ERR(0, 2310, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__166); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_delete_states, __pyx_t_3) < 0) __PYX_ERR(0, 2307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2333 + /* "_pywrapfst.pyx":2330 * self._check_mutating_imethod() * * def encode(self, EncodeMapper mapper): # <<<<<<<<<<<<<< * """ * encode(self, mapper) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_21encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_encode, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_21encode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_encode, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_encode, __pyx_t_3) < 0) __PYX_ERR(0, 2333, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_encode, __pyx_t_3) < 0) __PYX_ERR(0, 2330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2358 + /* "_pywrapfst.pyx":2355 * fst.Invert(self._mfst.get()) * * def invert(self): # <<<<<<<<<<<<<< * """ * invert(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_23invert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_invert, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2358, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_23invert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_invert, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_invert, __pyx_t_3) < 0) __PYX_ERR(0, 2358, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_invert, __pyx_t_3) < 0) __PYX_ERR(0, 2355, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2374 + /* "_pywrapfst.pyx":2371 * * cdef void _minimize(self, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * bool allow_nondet=False) except *: * # This runs in-place when the second argument is null. */ - __pyx_k__6 = fst::kShortestDelta; + __pyx_k__7 = fst::kShortestDelta; - /* "_pywrapfst.pyx":2380 + /* "_pywrapfst.pyx":2377 * self._check_mutating_imethod() * * def minimize(self, float delta=fst.kShortestDelta, bool allow_nondet=False): # <<<<<<<<<<<<<< * """ * minimize(self, delta=1e-6, allow_nondet=False) */ - __pyx_k__7 = fst::kShortestDelta; - __pyx_t_3 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_k__8 = fst::kShortestDelta; + __pyx_t_3 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 2380, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 2377, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_False)) __PYX_ERR(0, 2380, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_False)) __PYX_ERR(0, 2377, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_25minimize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_minimize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_25minimize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_minimize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_minimize, __pyx_t_3) < 0) __PYX_ERR(0, 2380, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_minimize, __pyx_t_3) < 0) __PYX_ERR(0, 2377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2409 + /* "_pywrapfst.pyx":2406 * return self * * cpdef _MutableArcIterator mutable_arcs(self, int64_t state): # <<<<<<<<<<<<<< * """ * mutable_arcs(self, state) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_27mutable_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_27mutable_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 2409, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_arcs, __pyx_t_3) < 0) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2423 + /* "_pywrapfst.pyx":2420 * return _MutableArcIterator(self, state) * * def mutable_input_symbols(self): # <<<<<<<<<<<<<< * """ * mutable_input_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_29mutable_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_29mutable_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 2423, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_input_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 2420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2433 + /* "_pywrapfst.pyx":2430 * return _init_MutableFstSymbolTableView(self._mfst, input_side=True) * * def mutable_output_symbols(self): # <<<<<<<<<<<<<< * """ * mutable_output_symbols(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_31mutable_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_output_symbol, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2433, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_31mutable_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_mutable_output_symbol, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 2433, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_mutable_output_symbols, __pyx_t_3) < 0) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2443 + /* "_pywrapfst.pyx":2440 * return _init_MutableFstSymbolTableView(self._mfst, input_side=False) * * cpdef int64_t num_states(self): # <<<<<<<<<<<<<< * """ * num_states(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_33num_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_num_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_33num_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_num_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_num_states, __pyx_t_3) < 0) __PYX_ERR(0, 2443, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_num_states, __pyx_t_3) < 0) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2454 + /* "_pywrapfst.pyx":2451 * fst.Project(self._mfst.get(), _get_project_type(tostring(project_type))) * * def project(self, project_type): # <<<<<<<<<<<<<< * """ * project(self, project_type) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_35project, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_project, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_35project, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_project, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_project, __pyx_t_3) < 0) __PYX_ERR(0, 2454, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_project, __pyx_t_3) < 0) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2475 + /* "_pywrapfst.pyx":2472 * * cdef void _prune(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * weight=None) except *: */ - __pyx_k__8 = fst::kDelta; + __pyx_k__9 = fst::kDelta; - /* "_pywrapfst.pyx":2476 + /* "_pywrapfst.pyx":2473 * cdef void _prune(self, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * weight=None) except *: * # Threshold is set to semiring Zero (no pruning) if no weight is specified. */ - __pyx_k__9 = fst::kNoStateId; + __pyx_k__10 = fst::kNoStateId; - /* "_pywrapfst.pyx":2485 + /* "_pywrapfst.pyx":2482 * * def prune(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * weight=None): */ - __pyx_k__10 = fst::kDelta; + __pyx_k__11 = fst::kDelta; - /* "_pywrapfst.pyx":2486 + /* "_pywrapfst.pyx":2483 * def prune(self, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * weight=None): * """ */ - __pyx_k__11 = fst::kNoStateId; + __pyx_k__12 = fst::kNoStateId; - /* "_pywrapfst.pyx":2485 + /* "_pywrapfst.pyx":2482 * * def prune(self, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * weight=None): */ - __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":2486 + /* "_pywrapfst.pyx":2483 * def prune(self, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * weight=None): * """ */ - __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2486, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":2484 + /* "_pywrapfst.pyx":2481 * self._check_mutating_imethod() * * def prune(self, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2484, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 2484, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 2481, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 2484, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 2481, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(0, 2484, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(0, 2481, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_37prune, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_prune, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2484, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_37prune, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_prune, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_prune, __pyx_t_2) < 0) __PYX_ERR(0, 2484, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_prune, __pyx_t_2) < 0) __PYX_ERR(0, 2481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2511 + /* "_pywrapfst.pyx":2508 * * cdef void _push(self, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * bool remove_total_weight=False, * reweight_type="to_initial"): */ - __pyx_k__12 = fst::kShortestDelta; + __pyx_k__13 = fst::kShortestDelta; - /* "_pywrapfst.pyx":2520 + /* "_pywrapfst.pyx":2517 * * def push(self, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * bool remove_total_weight=False, * reweight_type="to_initial"): */ - __pyx_k__13 = fst::kShortestDelta; + __pyx_k__14 = fst::kShortestDelta; - /* "_pywrapfst.pyx":2519 + /* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * bool remove_total_weight=False, */ - __pyx_t_2 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":2521 + /* "_pywrapfst.pyx":2518 * def push(self, * float delta=fst.kShortestDelta, * bool remove_total_weight=False, # <<<<<<<<<<<<<< * reweight_type="to_initial"): * """ */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_False)) __PYX_ERR(0, 2519, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_False)) __PYX_ERR(0, 2516, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_to_initial); __Pyx_GIVEREF(__pyx_n_u_to_initial); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_to_initial)) __PYX_ERR(0, 2519, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_to_initial)) __PYX_ERR(0, 2516, __pyx_L1_error); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":2519 + /* "_pywrapfst.pyx":2516 * remove_total_weight) * * def push(self, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * bool remove_total_weight=False, */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_39push, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_push, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2519, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_39push, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_push, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_push, __pyx_t_2) < 0) __PYX_ERR(0, 2519, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_push, __pyx_t_2) < 0) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2564 + /* "_pywrapfst.pyx":2562 * self._check_mutating_imethod() * * def relabel_pairs(self, ipairs=None, opairs=None): # <<<<<<<<<<<<<< * """ * relabel_pairs(self, ipairs=None, opairs=None) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_41relabel_pairs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_relabel_pairs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2564, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_41relabel_pairs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_relabel_pairs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__180); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_relabel_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 2564, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__183); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_relabel_pairs, __pyx_t_2) < 0) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2621 + /* "_pywrapfst.pyx":2619 * self._check_mutating_imethod() * * def relabel_tables(self, # <<<<<<<<<<<<<< * SymbolTableView old_isymbols=None, * SymbolTableView new_isymbols=None, */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_43relabel_tables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_relabel_tables, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2621, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_43relabel_tables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_relabel_tables, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__183); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_relabel_tables, __pyx_t_2) < 0) __PYX_ERR(0, 2621, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__186); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_relabel_tables, __pyx_t_2) < 0) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2678 + /* "_pywrapfst.pyx":2676 * self._check_mutating_imethod() * * def reserve_arcs(self, int64_t state, size_t n): # <<<<<<<<<<<<<< * """ * reserve_arcs(self, state, n) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_45reserve_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reserve_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2678, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_45reserve_arcs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reserve_arcs, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reserve_arcs, __pyx_t_2) < 0) __PYX_ERR(0, 2678, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reserve_arcs, __pyx_t_2) < 0) __PYX_ERR(0, 2676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2700 + /* "_pywrapfst.pyx":2698 * self._mfst.get().ReserveStates(n) * * def reserve_states(self, int64_t n): # <<<<<<<<<<<<<< * """ * reserve_states(self, n) */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_47reserve_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reserve_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2700, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_47reserve_states, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reserve_states, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reserve_states, __pyx_t_2) < 0) __PYX_ERR(0, 2700, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reserve_states, __pyx_t_2) < 0) __PYX_ERR(0, 2698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2724 + /* "_pywrapfst.pyx":2722 * self._check_mutating_imethod() * * def reweight(self, potentials, reweight_type="to_initial"): # <<<<<<<<<<<<<< * """ * reweight(self, potentials, reweight_type="to_initial") */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_49reweight, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reweight, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2724, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_49reweight, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_reweight, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__188); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reweight, __pyx_t_2) < 0) __PYX_ERR(0, 2724, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__191); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_reweight, __pyx_t_2) < 0) __PYX_ERR(0, 2722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2754 + /* "_pywrapfst.pyx":2752 * bool connect=True, * weight=None, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta) except *: * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), */ - __pyx_k__14 = fst::kNoStateId; + __pyx_k__15 = fst::kNoStateId; - /* "_pywrapfst.pyx":2755 + /* "_pywrapfst.pyx":2753 * weight=None, * int64_t nstate=fst.kNoStateId, * float delta=fst.kShortestDelta) except *: # <<<<<<<<<<<<<< * cdef fst.WeightClass _weight = _get_WeightClass_or_zero(self.weight_type(), * weight) */ - __pyx_k__15 = fst::kShortestDelta; + __pyx_k__16 = fst::kShortestDelta; - /* "_pywrapfst.pyx":2772 + /* "_pywrapfst.pyx":2770 * bool connect=True, * weight=None, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta): * """ */ - __pyx_k__16 = fst::kNoStateId; + __pyx_k__17 = fst::kNoStateId; - /* "_pywrapfst.pyx":2773 + /* "_pywrapfst.pyx":2771 * weight=None, * int64_t nstate=fst.kNoStateId, * float delta=fst.kShortestDelta): # <<<<<<<<<<<<<< * """ * rmepsilon(self, queue_type="auto", connect=True, weight=None, */ - __pyx_k__17 = fst::kShortestDelta; + __pyx_k__18 = fst::kShortestDelta; - /* "_pywrapfst.pyx":2772 + /* "_pywrapfst.pyx":2770 * bool connect=True, * weight=None, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta): * """ */ - __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2772, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":2773 + /* "_pywrapfst.pyx":2771 * weight=None, * int64_t nstate=fst.kNoStateId, * float delta=fst.kShortestDelta): # <<<<<<<<<<<<<< * """ * rmepsilon(self, queue_type="auto", connect=True, weight=None, */ - __pyx_t_4 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2773, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "_pywrapfst.pyx":2768 + /* "_pywrapfst.pyx":2766 * self._check_mutating_imethod() * * def rmepsilon(self, # <<<<<<<<<<<<<< * queue_type="auto", * bool connect=True, */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2768, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_auto); __Pyx_GIVEREF(__pyx_n_u_auto); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_auto)) __PYX_ERR(0, 2768, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_auto)) __PYX_ERR(0, 2766, __pyx_L1_error); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 2768, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(0, 2766, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None)) __PYX_ERR(0, 2768, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None)) __PYX_ERR(0, 2766, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2)) __PYX_ERR(0, 2768, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2)) __PYX_ERR(0, 2766, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_4)) __PYX_ERR(0, 2768, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_4)) __PYX_ERR(0, 2766, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_51rmepsilon, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_rmepsilon, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2768, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_51rmepsilon, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_rmepsilon, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_rmepsilon, __pyx_t_4) < 0) __PYX_ERR(0, 2768, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_rmepsilon, __pyx_t_4) < 0) __PYX_ERR(0, 2766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2807 + /* "_pywrapfst.pyx":2805 * self._check_mutating_imethod() * * def set_final(self, int64_t state, weight=None): # <<<<<<<<<<<<<< * """ * set_final(self, state, weight) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_53set_final, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_final, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2807, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_53set_final, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_final, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__163); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_final, __pyx_t_4) < 0) __PYX_ERR(0, 2807, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__166); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_final, __pyx_t_4) < 0) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2834 + /* "_pywrapfst.pyx":2832 * self._mfst.get().SetInputSymbols(symbols._raw_ptr_or_raise()) * * def set_input_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_input_symbols(self, symbols) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_55set_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2834, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_55set_input_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_input_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_input_symbols, __pyx_t_4) < 0) __PYX_ERR(0, 2834, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_input_symbols, __pyx_t_4) < 0) __PYX_ERR(0, 2832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2857 + /* "_pywrapfst.pyx":2855 * self._mfst.get().SetOutputSymbols(symbols._raw_ptr_or_raise()) * * def set_output_symbols(self, SymbolTableView symbols): # <<<<<<<<<<<<<< * """ * set_output_symbols(self, symbols) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_57set_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2857, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_57set_output_symbols, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_output_symbols, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_output_symbols, __pyx_t_4) < 0) __PYX_ERR(0, 2857, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_output_symbols, __pyx_t_4) < 0) __PYX_ERR(0, 2855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2874 + /* "_pywrapfst.pyx":2872 * return self * * def set_properties(self, props, mask): # <<<<<<<<<<<<<< * """ * set_properties(self, props, mask) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_59set_properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2874, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_59set_properties, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_properties, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_properties, __pyx_t_4) < 0) __PYX_ERR(0, 2874, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_properties, __pyx_t_4) < 0) __PYX_ERR(0, 2872, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2895 + /* "_pywrapfst.pyx":2893 * raise FstIndexError("State index out of range") * * def set_start(self, int64_t state): # <<<<<<<<<<<<<< * """ * set_start(self, state) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_61set_start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_start, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2895, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_61set_start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_set_start, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_start, __pyx_t_4) < 0) __PYX_ERR(0, 2895, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_set_start, __pyx_t_4) < 0) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2918 + /* "_pywrapfst.pyx":2916 * logging.warning("Cannot topsort cyclic FST") * * def topsort(self): # <<<<<<<<<<<<<< * """ * topsort(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_63topsort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_topsort, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2918, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_63topsort, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_topsort, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_topsort, __pyx_t_4) < 0) __PYX_ERR(0, 2918, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_topsort, __pyx_t_4) < 0) __PYX_ERR(0, 2916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":2934 + /* "_pywrapfst.pyx":2932 * return self * * def union(self, *fsts2): # <<<<<<<<<<<<<< * """ * union(self, *fsts2) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_65union, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_union, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2934, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_10MutableFst_65union, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableFst_union, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_union, __pyx_t_4) < 0) __PYX_ERR(0, 2934, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_MutableFst, __pyx_n_s_union, __pyx_t_4) < 0) __PYX_ERR(0, 2932, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_MutableFst); - /* "_pywrapfst.pyx":3024 + /* "_pywrapfst.pyx":3022 * * * cpdef Fst _read_Fst(source): # <<<<<<<<<<<<<< * cdef unique_ptr[fst.FstClass] _tfst = fst.FstClass.Read(path_tostring(source)) * if _tfst.get() == NULL: */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_17_read_Fst, 0, __pyx_n_s_read_Fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_17_read_Fst, 0, __pyx_n_s_read_Fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_Fst, __pyx_t_4) < 0) __PYX_ERR(0, 3024, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_Fst, __pyx_t_4) < 0) __PYX_ERR(0, 3022, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3031 + /* "_pywrapfst.pyx":3029 * * * cpdef Fst _read_Fst_from_string(string state): # <<<<<<<<<<<<<< * cdef stringstream _sstrm * _sstrm << state */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_read_Fst_from_string, 0, __pyx_n_s_read_Fst_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3031, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_read_Fst_from_string, 0, __pyx_n_s_read_Fst_from_string, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_Fst_from_string, __pyx_t_4) < 0) __PYX_ERR(0, 3031, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_Fst_from_string, __pyx_t_4) < 0) __PYX_ERR(0, 3029, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3044 + /* "_pywrapfst.pyx":3042 * * * NO_LABEL = fst.kNoLabel # <<<<<<<<<<<<<< * NO_STATE_ID = fst.kNoStateId * NO_SYMBOL = fst.kNoSymbol */ - __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoLabel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_4) < 0) __PYX_ERR(0, 3044, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_LABEL, __pyx_t_4) < 0) __PYX_ERR(0, 3042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3045 + /* "_pywrapfst.pyx":3043 * * NO_LABEL = fst.kNoLabel * NO_STATE_ID = fst.kNoStateId # <<<<<<<<<<<<<< * NO_SYMBOL = fst.kNoSymbol * */ - __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_4) < 0) __PYX_ERR(0, 3045, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_STATE_ID, __pyx_t_4) < 0) __PYX_ERR(0, 3043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3046 + /* "_pywrapfst.pyx":3044 * NO_LABEL = fst.kNoLabel * NO_STATE_ID = fst.kNoStateId * NO_SYMBOL = fst.kNoSymbol # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int64_t(fst::kNoSymbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_4) < 0) __PYX_ERR(0, 3046, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_SYMBOL, __pyx_t_4) < 0) __PYX_ERR(0, 3044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3051 + /* "_pywrapfst.pyx":3049 * ## FST properties. * * class FstProperties(enum.Flag): # <<<<<<<<<<<<<< * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3051, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 3051, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstProperties, __pyx_n_s_FstProperties, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_FstProperties, __pyx_n_s_FstProperties, (PyObject *) NULL, __pyx_n_s_pywrapfst_2, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3051, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 3049, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3052 + /* "_pywrapfst.pyx":3050 * * class FstProperties(enum.Flag): * EXPANDED = fst.kExpanded # <<<<<<<<<<<<<< * MUTABLE = fst.kMutable * ERROR = fst.kError */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3052, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExpanded); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EXPANDED, __pyx_t_4) < 0) __PYX_ERR(0, 3052, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EXPANDED, __pyx_t_4) < 0) __PYX_ERR(0, 3050, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3053 + /* "_pywrapfst.pyx":3051 * class FstProperties(enum.Flag): * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable # <<<<<<<<<<<<<< * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3053, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kMutable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 3053, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_MUTABLE, __pyx_t_4) < 0) __PYX_ERR(0, 3051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3054 + /* "_pywrapfst.pyx":3052 * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable * ERROR = fst.kError # <<<<<<<<<<<<<< * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3054, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 3054, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ERROR, __pyx_t_4) < 0) __PYX_ERR(0, 3052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3055 + /* "_pywrapfst.pyx":3053 * MUTABLE = fst.kMutable * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor # <<<<<<<<<<<<<< * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 3055, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 3053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3056 + /* "_pywrapfst.pyx":3054 * ERROR = fst.kError * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor # <<<<<<<<<<<<<< * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAcceptor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 3056, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_ACCEPTOR, __pyx_t_4) < 0) __PYX_ERR(0, 3054, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3057 + /* "_pywrapfst.pyx":3055 * ACCEPTOR = fst.kAcceptor * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic # <<<<<<<<<<<<<< * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3057, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3057, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3058 + /* "_pywrapfst.pyx":3056 * NOT_ACCEPTOR = fst.kNotAcceptor * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic # <<<<<<<<<<<<<< * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3058, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonIDeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3058, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NON_I_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3056, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3059 + /* "_pywrapfst.pyx":3057 * I_DETERMINISTIC = fst.kIDeterministic * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic # <<<<<<<<<<<<<< * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3059, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3059, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3060 + /* "_pywrapfst.pyx":3058 * NON_I_DETERMINISTIC = fst.kNonIDeterministic * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic # <<<<<<<<<<<<<< * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3060, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNonODeterministic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3060, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NON_O_DETERMINISTIC, __pyx_t_4) < 0) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3061 + /* "_pywrapfst.pyx":3059 * O_DETERMINISTIC = fst.kODeterministic * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons # <<<<<<<<<<<<<< * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3061, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3061, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3059, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3062 + /* "_pywrapfst.pyx":3060 * NON_O_DETERMINISTIC = fst.kNonODeterministic * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons # <<<<<<<<<<<<<< * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3062, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3062, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3063 + /* "_pywrapfst.pyx":3061 * EPSILONS = fst.kEpsilons * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons # <<<<<<<<<<<<<< * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3063, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3063, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3064 + /* "_pywrapfst.pyx":3062 * NO_EPSILONS = fst.kNoEpsilons * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons # <<<<<<<<<<<<<< * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3064, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoIEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3064, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_I_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3065 + /* "_pywrapfst.pyx":3063 * I_EPSILONS = fst.kIEpsilons * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons # <<<<<<<<<<<<<< * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3065, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3066 + /* "_pywrapfst.pyx":3064 * NO_I_EPSILONS = fst.kNoIEpsilons * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons # <<<<<<<<<<<<<< * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3066, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNoOEpsilons); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3066, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NO_O_EPSILONS, __pyx_t_4) < 0) __PYX_ERR(0, 3064, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3067 + /* "_pywrapfst.pyx":3065 * O_EPSILONS = fst.kOEpsilons * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted # <<<<<<<<<<<<<< * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3067, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3067, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3068 + /* "_pywrapfst.pyx":3066 * NO_O_EPSILONS = fst.kNoOEpsilons * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted # <<<<<<<<<<<<<< * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotILabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3068, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_I_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3069 + /* "_pywrapfst.pyx":3067 * I_LABEL_SORTED = fst.kILabelSorted * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted # <<<<<<<<<<<<<< * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3069, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3069, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3070 + /* "_pywrapfst.pyx":3068 * NOT_I_LABEL_SORTED = fst.kNotILabelSorted * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted # <<<<<<<<<<<<<< * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotOLabelSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3070, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_O_LABEL_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3071 + /* "_pywrapfst.pyx":3069 * O_LABEL_SORTED = fst.kOLabelSorted * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted # <<<<<<<<<<<<<< * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3071, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3071, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3072 + /* "_pywrapfst.pyx":3070 * NOT_O_LABEL_SORTED = fst.kNotOLabelSorted * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted # <<<<<<<<<<<<<< * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3072, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweighted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_UNWEIGHTED, __pyx_t_4) < 0) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3073 + /* "_pywrapfst.pyx":3071 * WEIGHTED = fst.kWeighted * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic # <<<<<<<<<<<<<< * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3073, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3073, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3074 + /* "_pywrapfst.pyx":3072 * UNWEIGHTED = fst.kUnweighted * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic # <<<<<<<<<<<<<< * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3074, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3074, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3075 + /* "_pywrapfst.pyx":3073 * CYCLIC = fst.kCyclic * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic # <<<<<<<<<<<<<< * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3075, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialCyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3075, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INITIAL_CYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3073, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3076 + /* "_pywrapfst.pyx":3074 * ACYCLIC = fst.kAcyclic * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic # <<<<<<<<<<<<<< * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3076, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kInitialAcyclic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3076, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INITIAL_ACYCLIC, __pyx_t_4) < 0) __PYX_ERR(0, 3074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3077 + /* "_pywrapfst.pyx":3075 * INITIAL_CYCLIC = fst.kInitialCyclic * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted # <<<<<<<<<<<<<< * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3077, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3078 + /* "_pywrapfst.pyx":3076 * INITIAL_ACYCLIC = fst.kInitialAcyclic * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted # <<<<<<<<<<<<<< * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3078, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotTopSorted); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3078, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_TOP_SORTED, __pyx_t_4) < 0) __PYX_ERR(0, 3076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3079 + /* "_pywrapfst.pyx":3077 * TOP_SORTED = fst.kTopSorted * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible # <<<<<<<<<<<<<< * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3079, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3079, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3080 + /* "_pywrapfst.pyx":3078 * NOT_TOP_SORTED = fst.kNotTopSorted * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible # <<<<<<<<<<<<<< * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3080, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_ACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3081 + /* "_pywrapfst.pyx":3079 * ACCESSIBLE = fst.kAccessible * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible # <<<<<<<<<<<<<< * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3081, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3081, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3079, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3082 + /* "_pywrapfst.pyx":3080 * NOT_ACCESSIBLE = fst.kNotAccessible * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible # <<<<<<<<<<<<<< * STRING = fst.kString * NOT_STRING = fst.kNotString */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotCoAccessible); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3082, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_COACCESSIBLE, __pyx_t_4) < 0) __PYX_ERR(0, 3080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3083 + /* "_pywrapfst.pyx":3081 * COACCESSIBLE = fst.kCoAccessible * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString # <<<<<<<<<<<<<< * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3083, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3083, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3081, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3084 + /* "_pywrapfst.pyx":3082 * NOT_COACCESSIBLE = fst.kNotCoAccessible * STRING = fst.kString * NOT_STRING = fst.kNotString # <<<<<<<<<<<<<< * WEIGHTED_CYCLES = fst.kWeightedCycles * UNWEIGHTED_CYCLES = fst.kUnweightedCycles */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3084, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNotString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3084, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NOT_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3085 + /* "_pywrapfst.pyx":3083 * STRING = fst.kString * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles # <<<<<<<<<<<<<< * UNWEIGHTED_CYCLES = fst.kUnweightedCycles * # TODO(wolfsonkin): Figure out how to keep the composite properties (all the */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3085, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3085, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3086 + /* "_pywrapfst.pyx":3084 * NOT_STRING = fst.kNotString * WEIGHTED_CYCLES = fst.kWeightedCycles * UNWEIGHTED_CYCLES = fst.kUnweightedCycles # <<<<<<<<<<<<<< * # TODO(wolfsonkin): Figure out how to keep the composite properties (all the * # below properties) out of the `repr`, but still available as an attribute on */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3086, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kUnweightedCycles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3086, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_UNWEIGHTED_CYCLES, __pyx_t_4) < 0) __PYX_ERR(0, 3084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3090 + /* "_pywrapfst.pyx":3088 * # below properties) out of the `repr`, but still available as an attribute on * # the class. I think this could be done with `property`. * NULL_PROPERTIES = fst.kNullProperties # <<<<<<<<<<<<<< * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNullProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3090, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NULL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3091 + /* "_pywrapfst.pyx":3089 * # the class. I think this could be done with `property`. * NULL_PROPERTIES = fst.kNullProperties * COPY_PROPERTIES = fst.kCopyProperties # <<<<<<<<<<<<<< * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kCopyProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_COPY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3091, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_COPY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3089, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3092 + /* "_pywrapfst.pyx":3090 * NULL_PROPERTIES = fst.kNullProperties * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties # <<<<<<<<<<<<<< * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kIntrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3092, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_INTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3093 + /* "_pywrapfst.pyx":3091 * COPY_PROPERTIES = fst.kCopyProperties * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties # <<<<<<<<<<<<<< * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kExtrinsicProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3093, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3094 + /* "_pywrapfst.pyx":3092 * INTRINSIC_PROPERTIES = fst.kIntrinsicProperties * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties # <<<<<<<<<<<<<< * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3094, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetStartProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3094, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_START_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3095 + /* "_pywrapfst.pyx":3093 * EXTRINSIC_PROPERTIES = fst.kExtrinsicProperties * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties # <<<<<<<<<<<<<< * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3095, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_FINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3093, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3096 + /* "_pywrapfst.pyx":3094 * SET_START_PROPERTIES = fst.kSetStartProperties * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties # <<<<<<<<<<<<<< * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3096, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddStateProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3096, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3097 + /* "_pywrapfst.pyx":3095 * SET_FINAL_PROPERTIES = fst.kSetFinalProperties * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties # <<<<<<<<<<<<<< * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3097, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3098 + /* "_pywrapfst.pyx":3096 * ADD_STATE_PROPERTIES = fst.kAddStateProperties * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties # <<<<<<<<<<<<<< * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3098, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kSetArcProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_SET_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3096, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3099 + /* "_pywrapfst.pyx":3097 * ADD_ARC_PROPERTIES = fst.kAddArcProperties * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties # <<<<<<<<<<<<<< * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3099, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteStatesProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3099, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_DELETE_STATE_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3100 + /* "_pywrapfst.pyx":3098 * SET_ARC_PROPERTIES = fst.kSetArcProperties * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties # <<<<<<<<<<<<<< * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kDeleteArcsProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3100, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_DELETE_ARC_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3098, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3101 + /* "_pywrapfst.pyx":3099 * DELETE_STATE_PROPERTIES = fst.kDeleteStatesProperties * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties # <<<<<<<<<<<<<< * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3101, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kStateSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3099, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3101, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_STATE_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3099, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3102 + /* "_pywrapfst.pyx":3100 * DELETE_ARC_PROPERTIES = fst.kDeleteArcsProperties * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties # <<<<<<<<<<<<<< * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3102, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kArcSortProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3102, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ARC_SORT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3103 + /* "_pywrapfst.pyx":3101 * STATE_SORT_PROPERTIES = fst.kStateSortProperties * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties # <<<<<<<<<<<<<< * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3103, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kILabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3103, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_I_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3104 + /* "_pywrapfst.pyx":3102 * ARC_SORT_PROPERTIES = fst.kArcSortProperties * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties # <<<<<<<<<<<<<< * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3104, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kOLabelInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3104, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_O_LABEL_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3105 + /* "_pywrapfst.pyx":3103 * I_LABEL_INVARIANT_PROPERTIES = fst.kILabelInvariantProperties * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties # <<<<<<<<<<<<<< * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3105, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kWeightInvariantProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3105, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_WEIGHT_INVARIANT_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3106 + /* "_pywrapfst.pyx":3104 * O_LABEL_INVARIANT_PROPERTIES = fst.kOLabelInvariantProperties * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties # <<<<<<<<<<<<<< * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3106, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kAddSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3106, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_ADD_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3107 + /* "_pywrapfst.pyx":3105 * WEIGHT_INVARIANT_PROPERTIES = fst.kWeightInvariantProperties * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties # <<<<<<<<<<<<<< * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3107, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kRmSuperFinalProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3107, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RM_SUPERFINAL_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3108 + /* "_pywrapfst.pyx":3106 * ADD_SUPERFINAL_PROPERTIES = fst.kAddSuperFinalProperties * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties # <<<<<<<<<<<<<< * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3108, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kBinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3108, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_BINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3109 + /* "_pywrapfst.pyx":3107 * RM_SUPERFINAL_PROPERTIES = fst.kRmSuperFinalProperties * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties # <<<<<<<<<<<<<< * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3109, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3109, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3110 + /* "_pywrapfst.pyx":3108 * BINARY_PROPERTIES = fst.kBinaryProperties * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties # <<<<<<<<<<<<<< * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties * FST_PROPERTIES = fst.kFstProperties */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kPosTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3110, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_POS_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3111 + /* "_pywrapfst.pyx":3109 * TRINARY_PROPERTIES = fst.kTrinaryProperties * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties # <<<<<<<<<<<<<< * FST_PROPERTIES = fst.kFstProperties * */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3111, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kNegTrinaryProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3111, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_NEG_TRINARY_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3112 + /* "_pywrapfst.pyx":3110 * POS_TRINARY_PROPERTIES = fst.kPosTrinaryProperties * NEG_TRINARY_PROPERTIES = fst.kNegTrinaryProperties * FST_PROPERTIES = fst.kFstProperties # <<<<<<<<<<<<<< * * for name, member in FstProperties.__members__.items(): */ - __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3112, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::kFstProperties); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_FST_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3112, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_FST_PROPERTIES, __pyx_t_4) < 0) __PYX_ERR(0, 3110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3051 + /* "_pywrapfst.pyx":3049 * ## FST properties. * * class FstProperties(enum.Flag): # <<<<<<<<<<<<<< * EXPANDED = fst.kExpanded * MUTABLE = fst.kMutable */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstProperties, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3051, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_FstProperties, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 3051, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_FstProperties, __pyx_t_4) < 0) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3114 + /* "_pywrapfst.pyx":3112 * FST_PROPERTIES = fst.kFstProperties * * for name, member in FstProperties.__members__.items(): # <<<<<<<<<<<<<< @@ -74897,16 +74849,16 @@ if (!__Pyx_RefNanny) { * */ __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3114, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FstProperties); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_members); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3114, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_members); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 3114, __pyx_L1_error) + __PYX_ERR(0, 3112, __pyx_L1_error) } - __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3114, __pyx_L1_error) + __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); @@ -74915,168 +74867,168 @@ if (!__Pyx_RefNanny) { while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, &__pyx_t_5, NULL, __pyx_t_8); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3114, __pyx_L1_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 3114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_member, __pyx_t_5) < 0) __PYX_ERR(0, 3114, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_member, __pyx_t_5) < 0) __PYX_ERR(0, 3112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":3115 + /* "_pywrapfst.pyx":3113 * * for name, member in FstProperties.__members__.items(): * globals()[name] = member # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_member); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3115, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_member); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error) + __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 3115, __pyx_L1_error) + __PYX_ERR(0, 3113, __pyx_L1_error) } - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_t_4, __pyx_t_5) < 0))) __PYX_ERR(0, 3115, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_t_4, __pyx_t_5) < 0))) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3121 + /* "_pywrapfst.pyx":3119 * * * ARC_I_LABEL_VALUE = fst.kArcILabelValue # <<<<<<<<<<<<<< * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcILabelValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3121, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_I_LABEL_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3122 + /* "_pywrapfst.pyx":3120 * * ARC_I_LABEL_VALUE = fst.kArcILabelValue * ARC_O_LABEL_VALUE = fst.kArcOLabelValue # <<<<<<<<<<<<<< * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcOLabelValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_O_LABEL_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3123 + /* "_pywrapfst.pyx":3121 * ARC_I_LABEL_VALUE = fst.kArcILabelValue * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue # <<<<<<<<<<<<<< * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcWeightValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3123, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_WEIGHT_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3124 + /* "_pywrapfst.pyx":3122 * ARC_O_LABEL_VALUE = fst.kArcOLabelValue * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue # <<<<<<<<<<<<<< * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcNextStateValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3124, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NEXT_STATE_VALUE, __pyx_t_3) < 0) __PYX_ERR(0, 3122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3125 + /* "_pywrapfst.pyx":3123 * ARC_WEIGHT_VALUE = fst.kArcWeightValue * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache # <<<<<<<<<<<<<< * ARC_VALUE_FLAGS = fst.kArcValueFlags * ARC_FLAGS = fst.kArcFlags */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcNoCache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcNoCache); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_3) < 0) __PYX_ERR(0, 3125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_NO_CACHE, __pyx_t_3) < 0) __PYX_ERR(0, 3123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3126 + /* "_pywrapfst.pyx":3124 * ARC_NEXT_STATE_VALUE = fst.kArcNextStateValue * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags # <<<<<<<<<<<<<< * ARC_FLAGS = fst.kArcFlags * */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3126, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcValueFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3126, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_VALUE_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3127 + /* "_pywrapfst.pyx":3125 * ARC_NO_CACHE = fst.kArcNoCache * ARC_VALUE_FLAGS = fst.kArcValueFlags * ARC_FLAGS = fst.kArcFlags # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3127, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kArcFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3127, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ARC_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3133 + /* "_pywrapfst.pyx":3131 * * * ENCODE_LABELS = fst.kEncodeLabels # <<<<<<<<<<<<<< * ENCODE_WEIGHTS = fst.kEncodeWeights * ENCODE_FLAGS = fst.kEncodeFlags */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeLabels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_3) < 0) __PYX_ERR(0, 3133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_LABELS, __pyx_t_3) < 0) __PYX_ERR(0, 3131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3134 + /* "_pywrapfst.pyx":3132 * * ENCODE_LABELS = fst.kEncodeLabels * ENCODE_WEIGHTS = fst.kEncodeWeights # <<<<<<<<<<<<<< * ENCODE_FLAGS = fst.kEncodeFlags * */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3134, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeWeights); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_3) < 0) __PYX_ERR(0, 3134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_WEIGHTS, __pyx_t_3) < 0) __PYX_ERR(0, 3132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3135 + /* "_pywrapfst.pyx":3133 * ENCODE_LABELS = fst.kEncodeLabels * ENCODE_WEIGHTS = fst.kEncodeWeights * ENCODE_FLAGS = fst.kEncodeFlags # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_uint8_t(fst::kEncodeFlags); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3135, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ENCODE_FLAGS, __pyx_t_3) < 0) __PYX_ERR(0, 3133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3164 + /* "_pywrapfst.pyx":3162 * self._arc.reset(new fst.ArcClass(ilabel, olabel, _weight, nextstate)) * * cpdef Arc copy(self): # <<<<<<<<<<<<<< * return Arc(self.ilabel, self.olabel, self.weight, self.nextstate) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_5copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3164, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_5copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc_copy, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Arc, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 3164, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Arc, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(0, 3162, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Arc); @@ -75085,7 +75037,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._arc cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75096,112 +75048,112 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._arc cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_3Arc_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Arc___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3241 + /* "_pywrapfst.pyx":3239 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3241, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3241, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3252 + /* "_pywrapfst.pyx":3250 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_11flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_11flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3263 + /* "_pywrapfst.pyx":3261 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_13next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3263, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_13next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3263, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3271 + /* "_pywrapfst.pyx":3269 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< * """ * position(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_15position, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_position, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_15position, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_position, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(0, 3271, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3282 + /* "_pywrapfst.pyx":3280 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_17reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3282, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_17reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3282, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3290 + /* "_pywrapfst.pyx":3288 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< * """ * seek(self, a) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_19seek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_seek, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3290, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_19seek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_seek, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_seek, __pyx_t_3) < 0) __PYX_ERR(0, 3290, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_seek, __pyx_t_3) < 0) __PYX_ERR(0, 3288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3301 + /* "_pywrapfst.pyx":3299 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< * """ * set_flags(self, flags, mask) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_21set_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_set_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3301, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_21set_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_set_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_set_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3301, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_set_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); - /* "_pywrapfst.pyx":3324 + /* "_pywrapfst.pyx":3322 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_23value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_23value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3324, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__ArcIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__ArcIterator); @@ -75210,7 +75162,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._aiter,self._fst cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75221,125 +75173,125 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._fst cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_12_ArcIterator_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ArcIterator___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3374 + /* "_pywrapfst.pyx":3372 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_10done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3374, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_10done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3374, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3385 + /* "_pywrapfst.pyx":3383 * return self._aiter.get().Done() * * cpdef uint8_t flags(self): # <<<<<<<<<<<<<< * """ * flags(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_12flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3385, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_12flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3385, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3396 + /* "_pywrapfst.pyx":3394 * return self._aiter.get().Flags() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_14next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3396, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_14next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3396, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3404 + /* "_pywrapfst.pyx":3402 * self._aiter.get().Next() * * cpdef size_t position(self): # <<<<<<<<<<<<<< * """ * position(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_16position, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_position, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3404, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_16position, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_position, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(0, 3404, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_position, __pyx_t_3) < 0) __PYX_ERR(0, 3402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3415 + /* "_pywrapfst.pyx":3413 * return self._aiter.get().Position() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_18reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3415, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_18reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3415, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3423 + /* "_pywrapfst.pyx":3421 * self._aiter.get().Reset() * * cpdef void seek(self, size_t a): # <<<<<<<<<<<<<< * """ * seek(self, a) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_20seek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_seek, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_20seek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_seek, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_seek, __pyx_t_3) < 0) __PYX_ERR(0, 3423, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_seek, __pyx_t_3) < 0) __PYX_ERR(0, 3421, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3434 + /* "_pywrapfst.pyx":3432 * self._aiter.get().Seek(a) * * cpdef void set_flags(self, uint8_t flags, uint8_t mask): # <<<<<<<<<<<<<< * """ * set_flags(self, flags, mask) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_22set_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_set_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3434, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_22set_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_set_flags, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_set_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3434, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_set_flags, __pyx_t_3) < 0) __PYX_ERR(0, 3432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3458 + /* "_pywrapfst.pyx":3456 * self._aiter.get().SetValue(deref(arc._arc)) * * def set_value(self, Arc arc): # <<<<<<<<<<<<<< * """ * set_value(self, arc) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_24set_value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_set_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3458, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_24set_value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_set_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_set_value, __pyx_t_3) < 0) __PYX_ERR(0, 3458, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_set_value, __pyx_t_3) < 0) __PYX_ERR(0, 3456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); - /* "_pywrapfst.pyx":3485 + /* "_pywrapfst.pyx":3483 * return _init_Arc(self._aiter.get().Value()) * * def value(self): # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_26value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3485, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_26value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3485, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__MutableArcIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__MutableArcIterator); @@ -75348,7 +75300,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._aiter,self._mfst cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_28__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator___reduce_cyt, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_28__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator___reduce_cyt, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75359,60 +75311,60 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._aiter,self._mfst cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_30__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator___setstate_c, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_19_MutableArcIterator_30__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_MutableArcIterator___setstate_c, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3533 + /* "_pywrapfst.pyx":3531 * return result * * cpdef bool done(self): # <<<<<<<<<<<<<< * """ * done(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3533, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3533, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__StateIterator); - /* "_pywrapfst.pyx":3544 + /* "_pywrapfst.pyx":3542 * return self._siter.get().Done() * * cpdef void next(self): # <<<<<<<<<<<<<< * """ * next(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_11next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_11next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3544, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 3542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__StateIterator); - /* "_pywrapfst.pyx":3552 + /* "_pywrapfst.pyx":3550 * self._siter.get().Next() * * cpdef void reset(self): # <<<<<<<<<<<<<< * """ * reset(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_13reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3552, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_13reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3552, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__StateIterator); - /* "_pywrapfst.pyx":3572 + /* "_pywrapfst.pyx":3570 * return self._siter.get().Value() * * cpdef int64_t value(self) except *: # <<<<<<<<<<<<<< * """ * value(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_15value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__234)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3572, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_15value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator_value, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3572, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst__StateIterator, __pyx_n_s_value, __pyx_t_3) < 0) __PYX_ERR(0, 3570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst__StateIterator); @@ -75421,7 +75373,7 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._fst,self._siter cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -75432,781 +75384,811 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._fst,self._siter cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__236)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_14_StateIterator_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StateIterator___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3593 + /* "_pywrapfst.pyx":3591 * * cdef Fst _map(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * map_type="identity", * double power=1., */ - __pyx_k__18 = fst::kDelta; + __pyx_k__19 = fst::kDelta; - /* "_pywrapfst.pyx":3610 + /* "_pywrapfst.pyx":3608 * * cpdef Fst arcmap(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * map_type="identity", * double power=1., */ - __pyx_k__19 = fst::kDelta; + __pyx_k__20 = fst::kDelta; - /* "_pywrapfst.pyx":3609 + /* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * map_type="identity", */ - __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3610, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":3613 + /* "_pywrapfst.pyx":3611 * map_type="identity", * double power=1., * weight=None): # <<<<<<<<<<<<<< * """ * arcmap(ifst, delta=0.0009765625, map_type="identity", power=1., weight=None) */ - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3609, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 3609, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 3607, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_identity); __Pyx_GIVEREF(__pyx_n_u_identity); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_identity)) __PYX_ERR(0, 3609, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_identity)) __PYX_ERR(0, 3607, __pyx_L1_error); __Pyx_INCREF(__pyx_float_1_); __Pyx_GIVEREF(__pyx_float_1_); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_float_1_)) __PYX_ERR(0, 3609, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_float_1_)) __PYX_ERR(0, 3607, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, Py_None)) __PYX_ERR(0, 3609, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, Py_None)) __PYX_ERR(0, 3607, __pyx_L1_error); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3609 + /* "_pywrapfst.pyx":3607 * * * cpdef Fst arcmap(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * map_type="identity", */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_21arcmap, 0, __pyx_n_s_arcmap, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__238)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3609, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_21arcmap, 0, __pyx_n_s_arcmap, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcmap, __pyx_t_3) < 0) __PYX_ERR(0, 3609, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_arcmap, __pyx_t_3) < 0) __PYX_ERR(0, 3607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3656 + /* "_pywrapfst.pyx":3654 * * * cpdef MutableFst compose(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_23compose, 0, __pyx_n_s_compose, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3656, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_23compose, 0, __pyx_n_s_compose, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__241); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose, __pyx_t_3) < 0) __PYX_ERR(0, 3656, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__244); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_compose, __pyx_t_3) < 0) __PYX_ERR(0, 3654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3692 + /* "_pywrapfst.pyx":3690 * * * cpdef Fst convert(Fst ifst, fst_type=""): # <<<<<<<<<<<<<< * """ * convert(ifst, fst_type="") */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_25convert, 0, __pyx_n_s_convert, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3692, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_25convert, 0, __pyx_n_s_convert, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__244); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert, __pyx_t_3) < 0) __PYX_ERR(0, 3692, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__247); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_convert, __pyx_t_3) < 0) __PYX_ERR(0, 3690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":3719 + /* "_pywrapfst.pyx":3717 * * cpdef MutableFst determinize(Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * det_type="functional", * int64_t nstate=fst.kNoStateId, */ - __pyx_k__20 = fst::kShortestDelta; + __pyx_k__21 = fst::kShortestDelta; - /* "_pywrapfst.pyx":3721 + /* "_pywrapfst.pyx":3719 * float delta=fst.kShortestDelta, * det_type="functional", * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * int64_t subsequential_label=0, * weight=None, */ - __pyx_k__21 = fst::kNoStateId; + __pyx_k__22 = fst::kNoStateId; - /* "_pywrapfst.pyx":3719 + /* "_pywrapfst.pyx":3717 * * cpdef MutableFst determinize(Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * det_type="functional", * int64_t nstate=fst.kNoStateId, */ - __pyx_t_3 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3719, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":3721 + /* "_pywrapfst.pyx":3719 * float delta=fst.kShortestDelta, * det_type="functional", * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * int64_t subsequential_label=0, * weight=None, */ - __pyx_t_5 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3721, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "_pywrapfst.pyx":3718 + /* "_pywrapfst.pyx":3716 * * * cpdef MutableFst determinize(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * det_type="functional", */ - __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3718, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 3716, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_functional); __Pyx_GIVEREF(__pyx_n_u_functional); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_functional)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_functional)) __PYX_ERR(0, 3716, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5)) __PYX_ERR(0, 3716, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_int_0)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_int_0)) __PYX_ERR(0, 3716, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None)) __PYX_ERR(0, 3716, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, Py_False)) __PYX_ERR(0, 3718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, Py_False)) __PYX_ERR(0, 3716, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_27determinize, 0, __pyx_n_s_determinize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__246)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3718, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_27determinize, 0, __pyx_n_s_determinize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_determinize, __pyx_t_5) < 0) __PYX_ERR(0, 3718, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_determinize, __pyx_t_5) < 0) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":3777 + /* "_pywrapfst.pyx":3775 * * * cpdef MutableFst difference(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_29difference, 0, __pyx_n_s_difference, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3777, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_29difference, 0, __pyx_n_s_difference, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__248); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference, __pyx_t_5) < 0) __PYX_ERR(0, 3777, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__251); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_difference, __pyx_t_5) < 0) __PYX_ERR(0, 3775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":3818 + /* "_pywrapfst.pyx":3816 * * cpdef MutableFst disambiguate(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, */ - __pyx_k__22 = fst::kDelta; + __pyx_k__23 = fst::kDelta; - /* "_pywrapfst.pyx":3819 + /* "_pywrapfst.pyx":3817 * cpdef MutableFst disambiguate(Fst ifst, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * int64_t subsequential_label=0, * weight=None): */ - __pyx_k__23 = fst::kNoStateId; + __pyx_k__24 = fst::kNoStateId; - /* "_pywrapfst.pyx":3818 + /* "_pywrapfst.pyx":3816 * * cpdef MutableFst disambiguate(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * int64_t subsequential_label=0, */ - __pyx_t_5 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3818, __pyx_L1_error) + __pyx_t_5 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "_pywrapfst.pyx":3819 + /* "_pywrapfst.pyx":3817 * cpdef MutableFst disambiguate(Fst ifst, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * int64_t subsequential_label=0, * weight=None): */ - __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3819, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "_pywrapfst.pyx":3817 + /* "_pywrapfst.pyx":3815 * * * cpdef MutableFst disambiguate(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3817, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 3817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 3815, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 3817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(0, 3817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(0, 3815, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, Py_None)) __PYX_ERR(0, 3817, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, Py_None)) __PYX_ERR(0, 3815, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_31disambiguate, 0, __pyx_n_s_disambiguate, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__250)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3817, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_31disambiguate, 0, __pyx_n_s_disambiguate, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_disambiguate, __pyx_t_4) < 0) __PYX_ERR(0, 3817, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_disambiguate, __pyx_t_4) < 0) __PYX_ERR(0, 3815, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3860 + /* "_pywrapfst.pyx":3858 * * * cpdef MutableFst epsnormalize(Fst ifst, eps_norm_type="input"): # <<<<<<<<<<<<<< * """ * epsnormalize(ifst, eps_norm_type="input") */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_33epsnormalize, 0, __pyx_n_s_epsnormalize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__252)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_33epsnormalize, 0, __pyx_n_s_epsnormalize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__253); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_epsnormalize, __pyx_t_4) < 0) __PYX_ERR(0, 3860, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__256); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_epsnormalize, __pyx_t_4) < 0) __PYX_ERR(0, 3858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3890 + /* "_pywrapfst.pyx":3888 * * * cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< * """ * equal(ifst1, ifst2, delta=0.0009765625) */ - __pyx_k__24 = fst::kDelta; - __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_k__25 = fst::kDelta; + __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3888, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_35equal, 0, __pyx_n_s_equal, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_35equal, 0, __pyx_n_s_equal, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_equal, __pyx_t_4) < 0) __PYX_ERR(0, 3890, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_equal, __pyx_t_4) < 0) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3911 + /* "_pywrapfst.pyx":3909 * * - * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< + * cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta) except *: # <<<<<<<<<<<<<< * """ * equivalent(ifst1, ifst2, delta=0.0009765625) */ - __pyx_k__25 = fst::kDelta; - __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_k__26 = fst::kDelta; + __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3911, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_37equivalent, 0, __pyx_n_s_equivalent, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__256)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3911, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_37equivalent, 0, __pyx_n_s_equivalent, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_equivalent, __pyx_t_4) < 0) __PYX_ERR(0, 3911, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_equivalent, __pyx_t_4) < 0) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3932 + /* "_pywrapfst.pyx":3939 * * * cpdef MutableFst intersect(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * compose_filter="auto", */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_39intersect, 0, __pyx_n_s_intersect, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3932, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_39intersect, 0, __pyx_n_s_intersect, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__260)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__258); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_intersect, __pyx_t_4) < 0) __PYX_ERR(0, 3932, __pyx_L1_error) + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__261); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_intersect, __pyx_t_4) < 0) __PYX_ERR(0, 3939, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3967 + /* "_pywrapfst.pyx":3974 * * * cpdef bool isomorphic(Fst ifst1, Fst ifst2, float delta=fst.kDelta): # <<<<<<<<<<<<<< * """ * isomorphic(ifst1, ifst2, delta=0.0009765625) */ - __pyx_k__26 = fst::kDelta; - __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3967, __pyx_L1_error) + __pyx_k__27 = fst::kDelta; + __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3967, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3967, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 3974, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_41isomorphic, 0, __pyx_n_s_isomorphic, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3967, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_41isomorphic, 0, __pyx_n_s_isomorphic, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__262)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_isomorphic, __pyx_t_4) < 0) __PYX_ERR(0, 3967, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_isomorphic, __pyx_t_4) < 0) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pywrapfst.pyx":3992 + /* "_pywrapfst.pyx":3999 * * cpdef MutableFst prune(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * weight=None): */ - __pyx_k__27 = fst::kDelta; + __pyx_k__28 = fst::kDelta; - /* "_pywrapfst.pyx":3993 + /* "_pywrapfst.pyx":4000 * cpdef MutableFst prune(Fst ifst, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * weight=None): * """ */ - __pyx_k__28 = fst::kNoStateId; + __pyx_k__29 = fst::kNoStateId; - /* "_pywrapfst.pyx":3992 + /* "_pywrapfst.pyx":3999 * * cpdef MutableFst prune(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * weight=None): */ - __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3992, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "_pywrapfst.pyx":3993 + /* "_pywrapfst.pyx":4000 * cpdef MutableFst prune(Fst ifst, * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * weight=None): * """ */ - __pyx_t_3 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3993, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":3991 + /* "_pywrapfst.pyx":3998 * * * cpdef MutableFst prune(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 3991, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 3998, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 3991, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 3998, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None)) __PYX_ERR(0, 3991, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None)) __PYX_ERR(0, 3998, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_43prune, 0, __pyx_n_s_prune, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_43prune, 0, __pyx_n_s_prune, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_prune, __pyx_t_3) < 0) __PYX_ERR(0, 3991, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_prune, __pyx_t_3) < 0) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":4024 + /* "_pywrapfst.pyx":4031 * * cpdef MutableFst push(Fst ifst, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * bool push_weights=False, * bool push_labels=False, */ - __pyx_k__29 = fst::kDelta; + __pyx_k__30 = fst::kDelta; - /* "_pywrapfst.pyx":4023 + /* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * bool push_weights=False, */ - __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4024, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":4028 + /* "_pywrapfst.pyx":4035 * bool push_labels=False, * bool remove_common_affix=False, * bool remove_total_weight=False, # <<<<<<<<<<<<<< * reweight_type="to_initial"): * """ */ - __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4023, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, Py_False)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, Py_False)) __PYX_ERR(0, 4030, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_False)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_False)) __PYX_ERR(0, 4030, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, Py_False)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, Py_False)) __PYX_ERR(0, 4030, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, Py_False)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, Py_False)) __PYX_ERR(0, 4030, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_to_initial); __Pyx_GIVEREF(__pyx_n_u_to_initial); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_n_u_to_initial)) __PYX_ERR(0, 4023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_n_u_to_initial)) __PYX_ERR(0, 4030, __pyx_L1_error); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":4023 + /* "_pywrapfst.pyx":4030 * * * cpdef MutableFst push(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kDelta, * bool push_weights=False, */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_45push, 0, __pyx_n_s_push, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4023, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_45push, 0, __pyx_n_s_push, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__266)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_push, __pyx_t_3) < 0) __PYX_ERR(0, 4023, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_push, __pyx_t_3) < 0) __PYX_ERR(0, 4030, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pywrapfst.pyx":4083 + /* "_pywrapfst.pyx":4091 * Fst ifst2, * int32_t npath=1, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), */ - __pyx_k__30 = fst::kDelta; + __pyx_k__31 = fst::kDelta; - /* "_pywrapfst.pyx":4085 + /* "_pywrapfst.pyx":4093 * float delta=fst.kDelta, * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), # <<<<<<<<<<<<<< - * uint64_t seed=0) except *: + * uint64_t seed=fst.kDefaultSeed) except *: * """ */ - __pyx_k__31 = std::numeric_limits ::max(); + __pyx_k__32 = std::numeric_limits ::max(); - /* "_pywrapfst.pyx":4083 + /* "_pywrapfst.pyx":4094 + * select="uniform", + * int32_t max_length=numeric_limits[int32_t].max(), + * uint64_t seed=fst.kDefaultSeed) except *: # <<<<<<<<<<<<<< + * """ + * randequivalent(ifst1, ifst2, npath=1, delta=0.0009765625, select="uniform", + */ + __pyx_k__33 = fst::script::kDefaultSeed; + + /* "_pywrapfst.pyx":4091 * Fst ifst2, * int32_t npath=1, * float delta=fst.kDelta, # <<<<<<<<<<<<<< * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), */ - __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4083, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(fst::kDelta); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_pywrapfst.pyx":4085 + /* "_pywrapfst.pyx":4093 * float delta=fst.kDelta, * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), # <<<<<<<<<<<<<< - * uint64_t seed=0) except *: + * uint64_t seed=fst.kDefaultSeed) except *: * """ */ - __pyx_t_5 = __Pyx_PyInt_From_int32_t(std::numeric_limits ::max()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4085, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int32_t(std::numeric_limits ::max()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "_pywrapfst.pyx":4080 + /* "_pywrapfst.pyx":4094 + * select="uniform", + * int32_t max_length=numeric_limits[int32_t].max(), + * uint64_t seed=fst.kDefaultSeed) except *: # <<<<<<<<<<<<<< + * """ + * randequivalent(ifst1, ifst2, npath=1, delta=0.0009765625, select="uniform", + */ + __pyx_t_4 = __Pyx_PyInt_From_uint64_t(fst::script::kDefaultSeed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4094, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "_pywrapfst.pyx":4088 * * * cpdef bool randequivalent(Fst ifst1, # <<<<<<<<<<<<<< * Fst ifst2, * int32_t npath=1, */ - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4080, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 4080, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 4088, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 4080, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 4088, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_uniform); __Pyx_GIVEREF(__pyx_n_u_uniform); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_n_u_uniform)) __PYX_ERR(0, 4080, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_uniform)) __PYX_ERR(0, 4088, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5)) __PYX_ERR(0, 4080, __pyx_L1_error); - __Pyx_INCREF(__pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_int_0)) __PYX_ERR(0, 4080, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5)) __PYX_ERR(0, 4088, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_4)) __PYX_ERR(0, 4088, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_47randequivalent, 0, __pyx_n_s_randequivalent, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4080, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_47randequivalent, 0, __pyx_n_s_randequivalent, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__268)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4088, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_randequivalent, __pyx_t_4) < 0) __PYX_ERR(0, 4088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_randequivalent, __pyx_t_5) < 0) __PYX_ERR(0, 4080, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":4135 + /* "_pywrapfst.pyx":4142 * int32_t npath=1, * select="uniform", * int32_t max_length=numeric_limits[int32_t].max(), # <<<<<<<<<<<<<< * bool weighted=False, * bool remove_total_weight=False, */ - __pyx_k__32 = std::numeric_limits ::max(); + __pyx_k__34 = std::numeric_limits ::max(); - /* "_pywrapfst.pyx":4132 - * - * - * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< + /* "_pywrapfst.pyx":4145 + * bool weighted=False, + * bool remove_total_weight=False, + * uint64_t seed=fst.kDefaultSeed): # <<<<<<<<<<<<<< + * """ + * randgen(ifst, npath=1, seed=0, select="uniform", max_length=2147483647, + */ + __pyx_k__35 = fst::script::kDefaultSeed; + + /* "_pywrapfst.pyx":4142 * int32_t npath=1, * select="uniform", + * int32_t max_length=numeric_limits[int32_t].max(), # <<<<<<<<<<<<<< + * bool weighted=False, + * bool remove_total_weight=False, */ - __pyx_t_5 = __Pyx_PyInt_From_int32_t(std::numeric_limits ::max()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyInt_From_int32_t(std::numeric_limits ::max()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); - /* "_pywrapfst.pyx":4137 - * int32_t max_length=numeric_limits[int32_t].max(), + /* "_pywrapfst.pyx":4145 * bool weighted=False, - * bool remove_total_weight=False, # <<<<<<<<<<<<<< - * uint64_t seed=0): + * bool remove_total_weight=False, + * uint64_t seed=fst.kDefaultSeed): # <<<<<<<<<<<<<< * """ + * randgen(ifst, npath=1, seed=0, select="uniform", max_length=2147483647, */ - __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_int_1); - __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 4132, __pyx_L1_error); - __Pyx_INCREF(__pyx_n_u_uniform); - __Pyx_GIVEREF(__pyx_n_u_uniform); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_uniform)) __PYX_ERR(0, 4132, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5)) __PYX_ERR(0, 4132, __pyx_L1_error); - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, Py_False)) __PYX_ERR(0, 4132, __pyx_L1_error); - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_False)) __PYX_ERR(0, 4132, __pyx_L1_error); - __Pyx_INCREF(__pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_int_0)) __PYX_ERR(0, 4132, __pyx_L1_error); - __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyInt_From_uint64_t(fst::script::kDefaultSeed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":4132 + /* "_pywrapfst.pyx":4139 * * * cpdef MutableFst randgen(Fst ifst, # <<<<<<<<<<<<<< * int32_t npath=1, * select="uniform", */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_49randgen, 0, __pyx_n_s_randgen, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4132, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_randgen, __pyx_t_5) < 0) __PYX_ERR(0, 4132, __pyx_L1_error) + __Pyx_INCREF(__pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 4139, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_u_uniform); + __Pyx_GIVEREF(__pyx_n_u_uniform); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_uniform)) __PYX_ERR(0, 4139, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4)) __PYX_ERR(0, 4139, __pyx_L1_error); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, Py_False)) __PYX_ERR(0, 4139, __pyx_L1_error); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 4, Py_False)) __PYX_ERR(0, 4139, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2)) __PYX_ERR(0, 4139, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_49randgen, 0, __pyx_n_s_randgen, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__270)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_randgen, __pyx_t_2) < 0) __PYX_ERR(0, 4139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":4184 + /* "_pywrapfst.pyx":4190 * * * cpdef MutableFst replace(pairs, # <<<<<<<<<<<<<< * call_arc_labeling="input", * return_arc_labeling="neither", */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_51replace, 0, __pyx_n_s_replace, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4184, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__270); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_replace, __pyx_t_5) < 0) __PYX_ERR(0, 4184, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_51replace, 0, __pyx_n_s_replace, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__273); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_replace, __pyx_t_2) < 0) __PYX_ERR(0, 4190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":4244 + /* "_pywrapfst.pyx":4250 * * * cpdef MutableFst reverse(Fst ifst, bool require_superinitial=True): # <<<<<<<<<<<<<< * """ * reverse(ifst, require_superinitial=True) */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_53reverse, 0, __pyx_n_s_reverse, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__273); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse, __pyx_t_5) < 0) __PYX_ERR(0, 4244, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_53reverse, 0, __pyx_n_s_reverse, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__276); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reverse, __pyx_t_2) < 0) __PYX_ERR(0, 4250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":4274 + /* "_pywrapfst.pyx":4280 * cdef void _shortestdistance(Fst ifst, * vector[fst.WeightClass] *distance, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * queue_type="auto", */ - __pyx_k__33 = fst::kShortestDelta; + __pyx_k__36 = fst::kShortestDelta; - /* "_pywrapfst.pyx":4275 + /* "_pywrapfst.pyx":4281 * vector[fst.WeightClass] *distance, * float delta=fst.kShortestDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * queue_type="auto", * bool reverse=False) except *: */ - __pyx_k__34 = fst::kNoStateId; + __pyx_k__37 = fst::kNoStateId; - /* "_pywrapfst.pyx":4292 + /* "_pywrapfst.pyx":4298 * * * def shortestdistance(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_55shortestdistance, 0, __pyx_n_s_shortestdistance, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults), 0)) __PYX_ERR(0, 4292, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_55shortestdistance, 0, __pyx_n_s_shortestdistance, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4298, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults), 0)) __PYX_ERR(0, 4298, __pyx_L1_error) - /* "_pywrapfst.pyx":4293 + /* "_pywrapfst.pyx":4299 * * def shortestdistance(Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * int64_t nstate=fst.kNoStateId, * queue_type="auto", */ - __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_5)->__pyx_arg_delta = fst::kShortestDelta; + __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_delta = fst::kShortestDelta; - /* "_pywrapfst.pyx":4294 + /* "_pywrapfst.pyx":4300 * def shortestdistance(Fst ifst, * float delta=fst.kShortestDelta, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * queue_type="auto", * bool reverse=False): */ - __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_5)->__pyx_arg_nstate = fst::kNoStateId; - __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_10_pywrapfst_62__defaults__); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_5) < 0) __PYX_ERR(0, 4292, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_nstate = fst::kNoStateId; + __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_10_pywrapfst_62__defaults__); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestdistance, __pyx_t_2) < 0) __PYX_ERR(0, 4298, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pywrapfst.pyx":4330 + /* "_pywrapfst.pyx":4336 * * cpdef MutableFst shortestpath(Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * int32_t nshortest=1, * int64_t nstate=fst.kNoStateId, */ - __pyx_k__35 = fst::kShortestDelta; + __pyx_k__38 = fst::kShortestDelta; - /* "_pywrapfst.pyx":4332 + /* "_pywrapfst.pyx":4338 * float delta=fst.kShortestDelta, * int32_t nshortest=1, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * queue_type="auto", * bool unique=False, */ - __pyx_k__36 = fst::kNoStateId; + __pyx_k__39 = fst::kNoStateId; - /* "_pywrapfst.pyx":4330 + /* "_pywrapfst.pyx":4336 * * cpdef MutableFst shortestpath(Fst ifst, * float delta=fst.kShortestDelta, # <<<<<<<<<<<<<< * int32_t nshortest=1, * int64_t nstate=fst.kNoStateId, */ - __pyx_t_5 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4330, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = PyFloat_FromDouble(fst::kShortestDelta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); - /* "_pywrapfst.pyx":4332 + /* "_pywrapfst.pyx":4338 * float delta=fst.kShortestDelta, * int32_t nshortest=1, * int64_t nstate=fst.kNoStateId, # <<<<<<<<<<<<<< * queue_type="auto", * bool unique=False, */ - __pyx_t_4 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(fst::kNoStateId); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); - /* "_pywrapfst.pyx":4329 + /* "_pywrapfst.pyx":4335 * * * cpdef MutableFst shortestpath(Fst ifst, # <<<<<<<<<<<<<< * float delta=fst.kShortestDelta, * int32_t nshortest=1, */ - __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 4329, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 4335, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_1)) __PYX_ERR(0, 4329, __pyx_L1_error); - __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4)) __PYX_ERR(0, 4329, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1)) __PYX_ERR(0, 4335, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5)) __PYX_ERR(0, 4335, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_auto); __Pyx_GIVEREF(__pyx_n_u_auto); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_auto)) __PYX_ERR(0, 4329, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_n_u_auto)) __PYX_ERR(0, 4335, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, Py_False)) __PYX_ERR(0, 4329, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_False)) __PYX_ERR(0, 4335, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, Py_None)) __PYX_ERR(0, 4329, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, Py_None)) __PYX_ERR(0, 4335, __pyx_L1_error); + __pyx_t_2 = 0; __pyx_t_5 = 0; - __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_57shortestpath, 0, __pyx_n_s_shortestpath, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestpath, __pyx_t_4) < 0) __PYX_ERR(0, 4329, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_57shortestpath, 0, __pyx_n_s_shortestpath, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_shortestpath, __pyx_t_5) < 0) __PYX_ERR(0, 4335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":4383 + /* "_pywrapfst.pyx":4389 * * * cpdef Fst statemap(Fst ifst, map_type): # <<<<<<<<<<<<<< * """ * state_map(ifst, map_type) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_59statemap, 0, __pyx_n_s_statemap, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_statemap, __pyx_t_4) < 0) __PYX_ERR(0, 4383, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_59statemap, 0, __pyx_n_s_statemap, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_statemap, __pyx_t_5) < 0) __PYX_ERR(0, 4389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":4409 + /* "_pywrapfst.pyx":4415 * * * cpdef MutableFst synchronize(Fst ifst): # <<<<<<<<<<<<<< * """ * synchronize(ifst) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_61synchronize, 0, __pyx_n_s_synchronize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_synchronize, __pyx_t_4) < 0) __PYX_ERR(0, 4409, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_61synchronize, 0, __pyx_n_s_synchronize, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_synchronize, __pyx_t_5) < 0) __PYX_ERR(0, 4415, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pywrapfst.pyx":4517 - * self._allow_negative_labels = allow_negative_labels + /* "_pywrapfst.pyx":4518 + * self._keep_state_numbering = keep_state_numbering * * cpdef Fst compile(self): # <<<<<<<<<<<<<< * """ * compile() */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_3compile, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler_compile, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Compiler, __pyx_n_s_compile, __pyx_t_4) < 0) __PYX_ERR(0, 4517, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_3compile, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler_compile, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Compiler, __pyx_n_s_compile, __pyx_t_5) < 0) __PYX_ERR(0, 4518, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Compiler); /* "_pywrapfst.pyx":4549 @@ -76216,10 +76198,10 @@ if (!__Pyx_RefNanny) { * """ * write(expression) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_5write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__284)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Compiler, __pyx_n_s_write, __pyx_t_4) < 0) __PYX_ERR(0, 4549, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_5write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler_write, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_Compiler, __pyx_n_s_write, __pyx_t_5) < 0) __PYX_ERR(0, 4549, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_Compiler); /* "(tree fragment)":1 @@ -76227,10 +76209,10 @@ if (!__Pyx_RefNanny) { * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -76238,10 +76220,10 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_8Compiler_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Compiler___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "_pywrapfst.pyx":4596 * return f"<{self.far_type()} FarReader at 0x{id(self):x}>" @@ -76250,18 +76232,18 @@ if (!__Pyx_RefNanny) { * def open(cls, *sources): * """ */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_5open, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_open, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__288)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4596, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open, __pyx_t_4) < 0) __PYX_ERR(0, 4596, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_5open, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_open, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open, __pyx_t_5) < 0) __PYX_ERR(0, 4596, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); - __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4596, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4596, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open, __pyx_t_4) < 0) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_open, __pyx_t_3) < 0) __PYX_ERR(0, 4596, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4624 @@ -76271,10 +76253,10 @@ if (!__Pyx_RefNanny) { * """ * arc_type(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_7arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_arc_type, __pyx_t_3) < 0) __PYX_ERR(0, 4624, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_7arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_arc_type, __pyx_t_4) < 0) __PYX_ERR(0, 4624, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4632 @@ -76284,10 +76266,10 @@ if (!__Pyx_RefNanny) { * """ * done(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__290)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4632, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_done, __pyx_t_3) < 0) __PYX_ERR(0, 4632, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_9done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_done, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_done, __pyx_t_4) < 0) __PYX_ERR(0, 4632, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4643 @@ -76297,10 +76279,10 @@ if (!__Pyx_RefNanny) { * """ * error(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_11error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_error, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4643, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_error, __pyx_t_3) < 0) __PYX_ERR(0, 4643, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_11error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_error, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_error, __pyx_t_4) < 0) __PYX_ERR(0, 4643, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4654 @@ -76310,10 +76292,10 @@ if (!__Pyx_RefNanny) { * return fst.GetFarTypeString(self._reader.get().Type()) * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_13far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_far_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4654, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_far_type, __pyx_t_3) < 0) __PYX_ERR(0, 4654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_13far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_far_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_far_type, __pyx_t_4) < 0) __PYX_ERR(0, 4654, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4657 @@ -76323,10 +76305,10 @@ if (!__Pyx_RefNanny) { * """ * find(self, key) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_15find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_find, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_find, __pyx_t_3) < 0) __PYX_ERR(0, 4657, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_15find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_find, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_find, __pyx_t_4) < 0) __PYX_ERR(0, 4657, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4672 @@ -76336,10 +76318,10 @@ if (!__Pyx_RefNanny) { * """ * get_fst(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_17get_fst, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_get_fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_get_fst, __pyx_t_3) < 0) __PYX_ERR(0, 4672, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_17get_fst, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_get_fst, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_get_fst, __pyx_t_4) < 0) __PYX_ERR(0, 4672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4683 @@ -76349,10 +76331,10 @@ if (!__Pyx_RefNanny) { * """ * get_key(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_19get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_get_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_get_key, __pyx_t_3) < 0) __PYX_ERR(0, 4683, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_19get_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_get_key, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_get_key, __pyx_t_4) < 0) __PYX_ERR(0, 4683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4694 @@ -76362,10 +76344,10 @@ if (!__Pyx_RefNanny) { * """ * next(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_21next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 4694, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_21next, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_next, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_next, __pyx_t_4) < 0) __PYX_ERR(0, 4694, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "_pywrapfst.pyx":4702 @@ -76375,10 +76357,10 @@ if (!__Pyx_RefNanny) { * """ * reset(self) */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_23reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_reset, __pyx_t_3) < 0) __PYX_ERR(0, 4702, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_23reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader_reset, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarReader, __pyx_n_s_reset, __pyx_t_4) < 0) __PYX_ERR(0, 4702, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarReader); /* "(tree fragment)":1 @@ -76386,10 +76368,10 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._reader cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_31__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -76397,10 +76379,10 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._reader cannot be converted to a Python object for pickling" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarReader_33__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarReader___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "_pywrapfst.pyx":4755 * return f"<{self.far_type()} FarWriter at 0x{id(self):x}>" @@ -76409,20 +76391,20 @@ if (!__Pyx_RefNanny) { * def create(cls, source, arc_type="standard", far_type="default"): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_5create, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_create, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__302); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_create, __pyx_t_3) < 0) __PYX_ERR(0, 4755, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); - __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4755, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_5create, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_create, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__305); if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_create, __pyx_t_4) < 0) __PYX_ERR(0, 4755, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); + __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_create); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_create, __pyx_t_5) < 0) __PYX_ERR(0, 4755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); /* "_pywrapfst.pyx":4793 * self._writer.reset() @@ -76431,10 +76413,10 @@ if (!__Pyx_RefNanny) { * """ * add(self, key, ifst) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_7add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_add, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4793, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 4793, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_7add, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_add, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_add, __pyx_t_5) < 0) __PYX_ERR(0, 4793, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); /* "_pywrapfst.pyx":4814 @@ -76444,10 +76426,10 @@ if (!__Pyx_RefNanny) { * """ * arc_type(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_9arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_arc_type, __pyx_t_4) < 0) __PYX_ERR(0, 4814, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_9arc_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_arc_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_arc_type, __pyx_t_5) < 0) __PYX_ERR(0, 4814, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); /* "_pywrapfst.pyx":4822 @@ -76457,10 +76439,10 @@ if (!__Pyx_RefNanny) { * """ * error(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_11error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_error, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4822, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_error, __pyx_t_4) < 0) __PYX_ERR(0, 4822, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_11error, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_error, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4822, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_error, __pyx_t_5) < 0) __PYX_ERR(0, 4822, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); /* "_pywrapfst.pyx":4833 @@ -76470,10 +76452,10 @@ if (!__Pyx_RefNanny) { * """ * far_type(self) */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_13far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_far_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4833, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_far_type, __pyx_t_4) < 0) __PYX_ERR(0, 4833, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_13far_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter_far_type, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10_pywrapfst_FarWriter, __pyx_n_s_far_type, __pyx_t_5) < 0) __PYX_ERR(0, 4833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_10_pywrapfst_FarWriter); /* "(tree fragment)":1 @@ -76481,10 +76463,10 @@ if (!__Pyx_RefNanny) { * raise TypeError, "self._writer cannot be converted to a Python object for pickling" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter___reduce_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): @@ -76492,10 +76474,10 @@ if (!__Pyx_RefNanny) { * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "self._writer cannot be converted to a Python object for pickling" */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10_pywrapfst_9FarWriter_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FarWriter___setstate_cython, NULL, __pyx_n_s_pywrapfst_2, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "_pywrapfst.pyx":4847 * @@ -76506,14 +76488,14 @@ if (!__Pyx_RefNanny) { FST_FLAGS_fst_error_fatal = 0; /* "_pywrapfst.pyx":1 - * #cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, c_api_binop_methods=True, nonecheck=True # <<<<<<<<<<<<<< - * # Copyright 2016-2020 Google LLC + * #cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, nonecheck=True # <<<<<<<<<<<<<< + * # Copyright 2016-2024 Google LLC * # */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /*--- Wrapped vars code ---*/ @@ -76703,14 +76685,20 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject #endif /* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } +#endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { @@ -76722,6 +76710,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; +#endif } /* GetBuiltinName */ @@ -76752,7 +76741,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, return __Pyx_PyObject_FormatAndDecref(s, f); } static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { - PyObject *result = PyObject_Format(s, f); + PyObject *result; + if (unlikely(!s)) return NULL; + result = PyObject_Format(s, f); Py_DECREF(s); return result; } @@ -76798,7 +76789,7 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_co if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); } else { - #if PY_VERSION_HEX >= 0x030D0000 + #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); @@ -76871,9 +76862,15 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) { return NULL; } + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + #endif if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && @@ -76950,8 +76947,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -76970,8 +76972,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); + #if PY_MAJOR_VERSION < 3 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; + #else + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + #endif result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { @@ -77036,7 +77043,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL - #if Py_VERSION_HEX < 0x03090000 + #if PY_VERSION_HEX < 0x03090000 vectorcallfunc f = _PyVectorcall_Function(func); #else vectorcallfunc f = PyVectorcall_Function(func); @@ -77263,7 +77270,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { @@ -77502,6 +77509,24 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO } return NULL; // not found (no exception set) } +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_as_number; - if (likely(nb) && likely(nb->nb_float)) { - float_value = nb->nb_float(obj); - if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { - __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetName(Py_TYPE(float_value)); - PyErr_Format(PyExc_TypeError, - "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")", - float_value_type_name); - __Pyx_DECREF_TypeName(float_value_type_name); - Py_DECREF(float_value); - goto bad; - } - } else { - float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj); - } -#endif - if (likely(float_value)) { - double value = PyFloat_AS_DOUBLE(float_value); - Py_DECREF(float_value); - return value; - } + return PyNumber_Float(obj); } -bad: - return (double)-1; + if (unlikely(val == -1 && PyErr_Occurred())) { + return NULL; + } +#if CYTHON_USE_PYLONG_INTERNALS +no_error: +#endif + return PyFloat_FromDouble(val); } /* RaiseArgTupleInvalid */ @@ -78289,7 +78307,7 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, } } #else - if (is_list || PySequence_Check(o)) { + if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif @@ -78658,38 +78676,38 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs #endif return -1; } -#if !CYTHON_USE_TYPE_SLOTS - if (dictoffset == 0) { - PyErr_Format(PyExc_TypeError, - "extension type '%s.200s': " - "unable to validate whether bases have a __dict__ " - "when CYTHON_USE_TYPE_SLOTS is off " - "(likely because you are building in the limited API). " - "Therefore, all extension types with multiple bases " - "must add 'cdef dict __dict__' in this compilation mode", - type_name); -#if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); -#endif - return -1; - } -#else - if (dictoffset == 0 && b->tp_dictoffset) + if (dictoffset == 0) { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, " - "but base type '" __Pyx_FMT_TYPENAME "' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - type_name, b_name); - __Pyx_DECREF_TypeName(b_name); + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY) + dictoffset_return: +#endif #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(b0); + Py_DECREF(b0); #endif - return -1; + return -1; + } } -#endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif @@ -79170,7 +79188,7 @@ static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject * #endif static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { #if PY_MAJOR_VERSION < 3 - PyObject *module, *from_list, *star = __pyx_n_s__37; + PyObject *module, *from_list, *star = __pyx_n_s__40; CYTHON_UNUSED_VAR(parts_tuple); from_list = PyList_New(1); if (unlikely(!from_list)) @@ -79577,10 +79595,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj /* FetchSharedCythonModule */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME); - if (unlikely(!abi_module)) return NULL; - Py_INCREF(abi_module); - return abi_module; + return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME); } /* FetchCommonType */ @@ -81169,8 +81184,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject Py_DECREF(replace); return result; } - #if __PYX_LIMITED_VERSION_HEX < 0x030780000 PyErr_Clear(); + #if __PYX_LIMITED_VERSION_HEX < 0x030780000 { PyObject *compiled = NULL, *result = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; @@ -81190,6 +81205,8 @@ static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject if (result) Py_INCREF(result); return result; } + #else + return NULL; #endif } static void __Pyx_AddTraceback(const char *funcname, int c_line, @@ -81528,7 +81545,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -81801,7 +81818,7 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -81937,13 +81954,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int64_t), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int64_t)); if (!py_bytes) goto limited_bad; @@ -81951,16 +81968,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -82136,7 +82155,7 @@ static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -82272,13 +82291,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; @@ -82286,16 +82305,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -82334,13 +82355,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(uint64_t), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint64_t)); if (!py_bytes) goto limited_bad; @@ -82348,16 +82369,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -82396,13 +82419,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(uint8_t), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(uint8_t)); if (!py_bytes) goto limited_bad; @@ -82410,16 +82433,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint8_t(uint8_t value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -82595,7 +82620,7 @@ static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -82868,7 +82893,7 @@ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -83004,13 +83029,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(int32_t), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t)); if (!py_bytes) goto limited_bad; @@ -83018,16 +83043,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -83066,13 +83093,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; -#if !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else PyObject *from_bytes, *result = NULL; PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL; - from_bytes = PyObject_GetAttrString((PyObject*)&PyInt_Type, "from_bytes"); + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; @@ -83080,16 +83107,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { if (!order_str) goto limited_bad; arg_tuple = PyTuple_Pack(2, py_bytes, order_str); if (!arg_tuple) goto limited_bad; - kwds = PyDict_New(); - if (!kwds) goto limited_bad; - if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(!is_unsigned ? Py_True : Py_False))) goto limited_bad; + if (!is_unsigned) { + kwds = PyDict_New(); + if (!kwds) goto limited_bad; + if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad; + } result = PyObject_Call(from_bytes, arg_tuple, kwds); limited_bad: - Py_XDECREF(from_bytes); - Py_XDECREF(py_bytes); - Py_XDECREF(order_str); - Py_XDECREF(arg_tuple); Py_XDECREF(kwds); + Py_XDECREF(arg_tuple); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); return result; #endif } @@ -83105,7 +83134,7 @@ __Pyx_PyType_GetName(PyTypeObject* tp) if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { PyErr_Clear(); Py_XDECREF(name); - name = __Pyx_NewRef(__pyx_n_s__310); + name = __Pyx_NewRef(__pyx_n_s__313); } return name; } @@ -83281,7 +83310,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -83554,7 +83583,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { #endif if (likely(v)) { int ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) +#if PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)v, @@ -83774,12 +83803,21 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj #endif /* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } +#endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2 + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { @@ -83789,6 +83827,7 @@ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); +#endif } /* CoroutineBase */ @@ -84076,9 +84115,22 @@ PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { PyErr_SetNone(PyExc_StopIteration); } else { +#if PY_VERSION_HEX < 0x030d00A1 _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif } - Py_CLEAR(result); + Py_DECREF(result); + result = NULL; } return result; #endif @@ -84859,7 +84911,7 @@ static int __pyx_Generator_init(PyObject *module) { } /* CheckBinaryVersion */ -static unsigned long __Pyx_get_runtime_version() { +static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 return Py_Version & ~0xFFUL; #else diff --git a/extensions/_pywrapfst.pxd b/extensions/_pywrapfst.pxd index f5f402b..771e24c 100644 --- a/extensions/_pywrapfst.pxd +++ b/extensions/_pywrapfst.pxd @@ -1,5 +1,5 @@ #cython: language_level=3 -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. @@ -131,8 +129,6 @@ cdef class SymbolTableView: cpdef void write(self, source) except * - cpdef void write_text(self, source) except * - cpdef bytes write_to_string(self) @@ -182,8 +178,8 @@ cdef _EncodeMapperSymbolTableView _init_EncodeMapperSymbolTableView( shared_ptr[fst.EncodeMapperClass] encoder, bool input_side) -cdef _FstSymbolTableView _init_FstSymbolTableView(shared_ptr[fst.FstClass] ifst, - bool input_side) +cdef _FstSymbolTableView _init_FstSymbolTableView( + shared_ptr[fst.FstClass] ifst, bool input_side) cdef _MutableFstSymbolTableView _init_MutableFstSymbolTableView( @@ -604,7 +600,6 @@ cdef class Compiler: cdef bool _keep_isymbols cdef bool _keep_osymbols cdef bool _keep_state_numbering - cdef bool _allow_negative_labels cpdef Fst compile(self) diff --git a/extensions/_pywrapfst.pyx b/extensions/_pywrapfst.pyx index 5b57d7b..bc85f76 100644 --- a/extensions/_pywrapfst.pyx +++ b/extensions/_pywrapfst.pyx @@ -1,5 +1,5 @@ -#cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, c_api_binop_methods=True, nonecheck=True -# Copyright 2016-2020 Google LLC +#cython: c_string_encoding=utf8, c_string_type=unicode, language_level=3, nonecheck=True +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. @@ -82,9 +80,6 @@ from cython.operator cimport address as addr # &foo from cython.operator cimport dereference as deref # *foo from cython.operator cimport preincrement as inc # ++foo -# C imports. -from libc.time cimport time - # C++ imports. from libcpp cimport bool from libcpp.cast cimport static_cast @@ -134,7 +129,7 @@ QueueType = """typing.Literal["auto", "fifo", "lifo", "shortest", "state", "top"]""" RandArcSelection = """typing.Literal["uniform", "log_prob", "fast_log_prob"]""" ReplaceLabelType = """typing.Literal["neither", "input", "output", "both"]""" -ReweightType = """typing.Literal["to_inital", "to_final"]""" +ReweightType = """typing.Literal["to_initial", "to_final"]""" SortType = """typing.Literal["ilabel", "olabel"]""" StateMapType = """typing.Literal["arc_sum", "arc_unique", "identity"]""" @@ -322,7 +317,8 @@ cdef fst.DeterminizeType _get_determinize_type(const string &det_type) except *: raise FstArgError(f"Unknown determinization type: {det_type!r}") return _det_type -cdef fst.EpsNormalizeType _get_eps_norm_type(const string &eps_norm_type) except *: +cdef fst.EpsNormalizeType _get_eps_norm_type( + const string &eps_norm_type) except *: """Matches string with the appropriate EpsNormalizeType enum value. Args: @@ -959,9 +955,9 @@ cdef class SymbolTableView: if not self._raw_ptr_or_raise().Write(path_tostring(source)): raise FstIOError(f"Write failed: {source!r}") - cpdef void write_text(self, source) except *: + def write_text(self, source, *, sep="\t "): """ - write_text(self, source) + write_text(self, source, *, sep="\t ") Writes symbol table to text file. @@ -969,11 +965,14 @@ cdef class SymbolTableView: Args: source: The string location of the output file. + sep: Characters to be used as a separator between fields in a textual + SymbolTable file, encoded as a string. Only the first byte is used. Raises: FstIOError: Write failed. """ - if not self._raw_ptr_or_raise().WriteText(path_tostring(source)): + if not self._raw_ptr_or_raise().WriteText(path_tostring(source), + tostring(sep)): raise FstIOError(f"Write failed: {source!r}") cpdef bytes write_to_string(self): @@ -1176,9 +1175,9 @@ cdef class SymbolTable(_MutableSymbolTable): return _init_SymbolTable(move(_symbols)) @classmethod - def read_text(cls, source, bool allow_negative_labels=False): + def read_text(cls, source, *, sep="\t "): """ - SymbolTable.read_text(source) + SymbolTable.read_text(source, *, sep="\t ") Reads symbol table from text file. @@ -1186,17 +1185,14 @@ cdef class SymbolTable(_MutableSymbolTable): Args: source: The string location of the input text file. - allow_negative_labels: Should negative labels be allowed? (Not - recommended; may cause conflicts). + sep: Characters to be used as a separator between fields in a textual + SymbolTable file, encoded as a string. Only the first byte is used. Returns: A new SymbolTable instance. """ - cdef unique_ptr[fst.SymbolTableTextOptions] _opts - _opts.reset(new fst.SymbolTableTextOptions(allow_negative_labels)) cdef unique_ptr[fst.SymbolTable] _symbols - _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), - deref(_opts))) + _symbols.reset(fst.SymbolTable.ReadText(path_tostring(source), tostring(sep))) if _symbols.get() == NULL: raise FstIOError(f"Read failed: {source!r}") return _init_SymbolTable(move(_symbols)) @@ -2200,7 +2196,8 @@ cdef class MutableFst(Fst): itself with semiring One if `closure_type` is "star". Args: - closure_type: If "star", do not accept the empty string. If "plus", accept the empty string. + closure_type: If "star", do not accept the empty string. If "plus", accept + the empty string. Returns: self. @@ -2521,7 +2518,8 @@ cdef class MutableFst(Fst): bool remove_total_weight=False, reweight_type="to_initial"): """ - push(self, delta=1-e6, remove_total_weight=False, reweight_type="to_initial") + push(self, delta=1-e6, remove_total_weight=False, + reweight_type="to_initial") Pushes weights towards the initial or final states. @@ -3908,7 +3906,7 @@ cpdef bool equal(Fst ifst1, Fst ifst2, float delta=fst.kDelta): return fst.Equal(deref(ifst1._fst), deref(ifst2._fst), delta) -cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): +cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta) except *: """ equivalent(ifst1, ifst2, delta=0.0009765625) @@ -3925,8 +3923,17 @@ cpdef bool equivalent(Fst ifst1, Fst ifst2, float delta=fst.kDelta): Returns: True if the FSTs satisfy the above condition, else False. + + Raises: + FstOpError: Some precondition of the argument FSTs does not hold. """ - return fst.Equivalent(deref(ifst1._fst), deref(ifst2._fst), delta) + cdef bool err = False + is_equiv = fst.Equivalent(deref(ifst1._fst), + deref(ifst2._fst), + delta, addr(err)) + if err: + raise FstOpError("Argument FST did not satisfy preconditions") + return is_equiv cpdef MutableFst intersect(Fst ifst1, @@ -4029,7 +4036,8 @@ cpdef MutableFst push(Fst ifst, reweight_type="to_initial"): """ push(ifst, delta=0.0009765625, push_weights=False, push_labels=False, - remove_common_affix=False, remove_total_weight=False, reweight_type="to_initial") + remove_common_affix=False, remove_total_weight=False, + reweight_type="to_initial") Constructively pushes weights/labels towards initial or final states. @@ -4067,8 +4075,8 @@ cpdef MutableFst push(Fst ifst, _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) cdef uint8_t flags = fst.GetPushFlags(push_weights, push_labels, - remove_common_affix, - remove_total_weight) + remove_total_weight, + remove_common_affix) fst.Push(deref(ifst._fst), _tfst.get(), flags, @@ -4083,10 +4091,10 @@ cpdef bool randequivalent(Fst ifst1, float delta=fst.kDelta, select="uniform", int32_t max_length=numeric_limits[int32_t].max(), - uint64_t seed=0) except *: + uint64_t seed=fst.kDefaultSeed) except *: """ randequivalent(ifst1, ifst2, npath=1, delta=0.0009765625, select="uniform", - max_length=2147483647, seed=0) + max_length=2147483647, seed=-1) Are two acceptors stochastically equivalent? @@ -4101,8 +4109,8 @@ cpdef bool randequivalent(Fst ifst1, ifst2: The second input FST. npath: The number of random paths to generate. delta: Comparison/quantization delta. - seed: An optional seed value for random path generation; if zero, the - current time and process ID is used. + seed: An optional seed value for random path generation; if not specified, + the current time is used. select: A string matching a known random arc selection type; one of: "uniform", "log_prob", "fast_log_prob". max_length: The maximum length of each random path. @@ -4119,14 +4127,13 @@ cpdef bool randequivalent(Fst ifst1, 1, False, False)) - if seed == 0: - seed = time(NULL) + cdef uint64_t _seed = fst.GetSeed(seed) return fst.RandEquivalent(deref(ifst1._fst), deref(ifst2._fst), npath, deref(_opts), delta, - seed) + _seed) cpdef MutableFst randgen(Fst ifst, @@ -4135,10 +4142,10 @@ cpdef MutableFst randgen(Fst ifst, int32_t max_length=numeric_limits[int32_t].max(), bool weighted=False, bool remove_total_weight=False, - uint64_t seed=0): + uint64_t seed=fst.kDefaultSeed): """ randgen(ifst, npath=1, seed=0, select="uniform", max_length=2147483647, - weighted=False, remove_total_weight=False) + weighted=False, remove_total_weight=False, seed=-1) Randomly generate successful paths in an FST. @@ -4153,8 +4160,8 @@ cpdef MutableFst randgen(Fst ifst, Args: ifst: The input FST. npath: The number of random paths to generate. - seed: An optional seed value for random path generation; if zero, the - current time and process ID is used. + seed: An optional seed value for random path generation; if not specified, + the current time is used. select: A string matching a known random arc selection type; one of: "uniform", "log_prob", "fast_log_prob". max_length: The maximum length of each random path. @@ -4175,9 +4182,8 @@ cpdef MutableFst randgen(Fst ifst, remove_total_weight)) cdef unique_ptr[fst.VectorFstClass] _tfst _tfst.reset(new fst.VectorFstClass(ifst.arc_type())) - if seed == 0: - seed = time(NULL) - fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), seed) + cdef uint64_t _seed = fst.GetSeed(seed) + fst.RandGen(deref(ifst._fst), _tfst.get(), deref(_opts), _seed) return _init_MutableFst(_tfst.release()) @@ -4439,8 +4445,7 @@ cdef class Compiler: """ Compiler(fst_type="vector", arc_type="standard", isymbols=None, osymbols=None, ssymbols=None, acceptor=False, keep_isymbols=False, - keep_osymbols=False, keep_state_numbering=False, - allow_negative_labels=False) + keep_osymbols=False, keep_state_numbering=False) Class used to compile FSTs from strings. @@ -4481,8 +4486,6 @@ cdef class Compiler: keep_isymbols: Should the input symbol table be stored in the FST? keep_osymbols: Should the output symbol table be stored in the FST? keep_state_numbering: Should the state numbering be preserved? - allow_negative_labels: Should negative labels be allowed? (Not - recommended; may cause conflicts). """ def __cinit__(self, @@ -4494,8 +4497,7 @@ cdef class Compiler: bool acceptor=False, bool keep_isymbols=False, bool keep_osymbols=False, - bool keep_state_numbering=False, - bool allow_negative_labels=False): + bool keep_state_numbering=False): self._sstrm.reset(new stringstream()) self._fst_type = tostring(fst_type) self._arc_type = tostring(arc_type) @@ -4512,7 +4514,6 @@ cdef class Compiler: self._keep_isymbols = keep_isymbols self._keep_osymbols = keep_osymbols self._keep_state_numbering = keep_state_numbering - self._allow_negative_labels = allow_negative_labels cpdef Fst compile(self): """ @@ -4539,8 +4540,7 @@ cdef class Compiler: self._acceptor, self._keep_isymbols, self._keep_osymbols, - self._keep_state_numbering, - self._allow_negative_labels) + self._keep_state_numbering) self._sstrm.reset(new stringstream()) if _tfst.get() == NULL: raise FstOpError("Compilation failed") diff --git a/extensions/cdrewrite.h b/extensions/cdrewrite.h index 0322f1e..4de420d 100644 --- a/extensions/cdrewrite.h +++ b/extensions/cdrewrite.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CDREWRITE_H_ #define PYNINI_CDREWRITE_H_ @@ -29,8 +27,8 @@ #include #include -#include #include +#include #include #include #include @@ -40,8 +38,10 @@ #include #include #include +#include #include #include +#include #include #include "checkprops.h" #include "cross.h" @@ -49,9 +49,9 @@ namespace fst { -enum CDRewriteDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT, SIMULTANEOUS }; +enum class CDRewriteDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT, SIMULTANEOUS }; -enum CDRewriteMode { OBLIGATORY, OPTIONAL }; +enum class CDRewriteMode { OBLIGATORY, OPTIONAL }; namespace internal { @@ -90,18 +90,19 @@ class CDRewriteRule { // Builds the transducer representing the context-dependent rewrite rule. // sigma is an FST specifying (the closure of) the alphabet for the resulting - // transducer. The dir argument can be LEFT_TO_RIGHT, RIGHT_TO_LEFT or - // SIMULTANEOUS; mode can be OBLIGATORY or OPTIONAL; sigma must be an - // unweighted acceptor representing a bifix code. + // transducer. The dir argument can be CDRewriteDirection::LEFT_TO_RIGHT, + // CDRewriteDirection::RIGHT_TO_LEFT or CDRewriteDirection::SIMULTANEOUS; mode + // can be CDRewriteMode::OBLIGATORY or CDRewriteMode::OPTIONAL; sigma must be + // an unweighted acceptor representing a bifix code. // // The error bit on the output FST is set if any argument does not satisfy the // preconditions. void Compile(const Fst &sigma, MutableFst *fst, - CDRewriteDirection dir = LEFT_TO_RIGHT, - CDRewriteMode mode = OBLIGATORY); + CDRewriteDirection dir = CDRewriteDirection::LEFT_TO_RIGHT, + CDRewriteMode mode = CDRewriteMode::OBLIGATORY); private: - enum MarkerType { MARK = 1, CHECK = 2, CHECK_COMPLEMENT = 3}; + enum class MarkerType { MARK = 1, CHECK = 2, CHECK_COMPLEMENT = 3 }; void MakeMarker(VectorFst *fst, const VectorFst &sigma, MarkerType type, @@ -190,7 +191,7 @@ void CDRewriteRule::MakeMarker( // When num_states == 0, *fst is really Complement(sigma) and we build the // result upon sigma (== Complement(Complement(sigma))) directly in each case. switch (type) { - case MARK: + case MarkerType::MARK: // Type 1: Insert (or delete) markers after each match. if (num_states == 0) { *fst = sigma; @@ -214,7 +215,7 @@ void CDRewriteRule::MakeMarker( } } break; - case CHECK: + case MarkerType::CHECK: // Type 2: Check that each marker is preceded by a match. if (num_states == 0) { *fst = sigma; @@ -230,7 +231,7 @@ void CDRewriteRule::MakeMarker( } } break; - case CHECK_COMPLEMENT: + case MarkerType::CHECK_COMPLEMENT: // Type 3: Check that each marker is not preceded by a match. if (num_states == 0) { *fst = sigma; @@ -391,24 +392,24 @@ void CDRewriteRule::MakeReplace(MutableFst *fst, std::vector> initial_loops; std::vector> all_loops; switch (mode_) { - case OBLIGATORY: + case CDRewriteMode::OBLIGATORY: all_loops.emplace_back(lbrace1_, 0); all_loops.emplace_back(lbrace2_, 0); all_loops.emplace_back(rbrace_, 0); switch (dir_) { - case LEFT_TO_RIGHT: + case CDRewriteDirection::LEFT_TO_RIGHT: initial_pair = {lbrace1_, lbrace1_}; final_pair = {rbrace_, 0}; initial_loops.emplace_back(lbrace2_, lbrace2_); initial_loops.emplace_back(rbrace_, 0); break; - case RIGHT_TO_LEFT: + case CDRewriteDirection::RIGHT_TO_LEFT: initial_pair = {rbrace_, 0}; final_pair = {lbrace1_, lbrace1_}; initial_loops.emplace_back(lbrace2_, lbrace2_); initial_loops.emplace_back(rbrace_, 0); break; - case SIMULTANEOUS: + case CDRewriteDirection::SIMULTANEOUS: initial_pair = {lbrace1_, 0}; final_pair = {rbrace_, 0}; initial_loops.emplace_back(lbrace2_, 0); @@ -416,19 +417,19 @@ void CDRewriteRule::MakeReplace(MutableFst *fst, break; } break; - case OPTIONAL: + case CDRewriteMode::OPTIONAL: all_loops.emplace_back(rbrace_, 0); initial_loops.emplace_back(rbrace_, 0); switch (dir_) { - case LEFT_TO_RIGHT: + case CDRewriteDirection::LEFT_TO_RIGHT: initial_pair = {0, lbrace1_}; final_pair = {rbrace_, 0}; break; - case RIGHT_TO_LEFT: + case CDRewriteDirection::RIGHT_TO_LEFT: initial_pair = {rbrace_, 0}; final_pair = {0, lbrace1_}; break; - case SIMULTANEOUS: + case CDRewriteDirection::SIMULTANEOUS: initial_pair = {lbrace1_, 0}; final_pair = {rbrace_, 0}; break; @@ -479,9 +480,10 @@ typename Arc::Label CDRewriteRule::MaxLabel(const Fst &fst) { // Builds the transducer representing the context-dependent rewrite rule. sigma // is an FST specifying (the closure of) the alphabet for the resulting -// transducer. dir can be LEFT_TO_RIGHT, RIGHT_TO_LEFT or SIMULTANEOUS. mode can -// be OBLIGATORY or OPTIONAL. sigma must be an unweighted acceptor representing -// a bifix code. +// transducer. dir can be CDRewriteDirection::LEFT_TO_RIGHT, +// CDRewriteDirection::RIGHT_TO_LEFT or CDRewriteDirection::SIMULTANEOUS. mode +// can be CDRewriteMode::OBLIGATORY or CDRewriteMode::OPTIONAL. sigma must be an +// unweighted acceptor representing a bifix code. // // The error bit on the output FST is set if any argument does not satisfy the // preconditions. @@ -546,29 +548,30 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, } MakeReplace(&replace, mutable_sigma); switch (dir_) { - case LEFT_TO_RIGHT: { + case CDRewriteDirection::LEFT_TO_RIGHT: { // Builds r filter. VectorFst r; - MakeFilter(*rho_, mutable_sigma, &r, MARK, {{0, rbrace_}}, true); + MakeFilter(*rho_, mutable_sigma, &r, MarkerType::MARK, {{0, rbrace_}}, + true); switch (mode_) { - case OBLIGATORY: { + case CDRewriteMode::OBLIGATORY: { VectorFst phi_rbrace; // Appends > after phi_, matches all >. ArcMap(*phi_, &phi_rbrace, imapper); IgnoreMarkers(&phi_rbrace, {{rbrace_, rbrace_}}); AppendMarkers(&phi_rbrace, {{rbrace_, rbrace_}}); // Builds f filter. VectorFst f; - MakeFilter(phi_rbrace, sigma_rbrace, &f, MARK, + MakeFilter(phi_rbrace, sigma_rbrace, &f, MarkerType::MARK, {{0, lbrace1_}, {0, lbrace2_}}, true); // Builds l1 filter. VectorFst l1; - MakeFilter(*lambda_, mutable_sigma, &l1, CHECK, {{lbrace1_, 0}}, - false); + MakeFilter(*lambda_, mutable_sigma, &l1, MarkerType::CHECK, + {{lbrace1_, 0}}, false); IgnoreMarkers(&l1, {{lbrace2_, lbrace2_}}); ArcSort(&l1, ILabelCompare()); // Builds l2 filter. VectorFst l2; - MakeFilter(*lambda_, mutable_sigma, &l2, CHECK_COMPLEMENT, + MakeFilter(*lambda_, mutable_sigma, &l2, MarkerType::CHECK_COMPLEMENT, {{lbrace2_, 0}}, false); // Builds (((r o f) o replace) o l1) o l2. VectorFst c; @@ -578,11 +581,11 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, Compose(c, l2, fst); break; } - case OPTIONAL: { + case CDRewriteMode::OPTIONAL: { // Builds l filter. VectorFst l; - MakeFilter(*lambda_, mutable_sigma, &l, CHECK, {{lbrace1_, 0}}, - false); + MakeFilter(*lambda_, mutable_sigma, &l, MarkerType::CHECK, + {{lbrace1_, 0}}, false); // Builds (r o replace) o l. VectorFst c; Compose(r, replace, &c); @@ -592,30 +595,31 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, } break; } - case RIGHT_TO_LEFT: { + case CDRewriteDirection::RIGHT_TO_LEFT: { // Builds l filter. VectorFst l; - MakeFilter(*lambda_, mutable_sigma, &l, MARK, {{0, rbrace_}}, false); + MakeFilter(*lambda_, mutable_sigma, &l, MarkerType::MARK, {{0, rbrace_}}, + false); switch (mode_) { - case OBLIGATORY: { + case CDRewriteMode::OBLIGATORY: { VectorFst rbrace_phi; // Prepends > before phi, matches all > ArcMap(*phi_, &rbrace_phi, imapper); IgnoreMarkers(&rbrace_phi, {{rbrace_, rbrace_}}); PrependMarkers(&rbrace_phi, {{rbrace_, rbrace_}}); // Builds f filter. VectorFst f; - MakeFilter(rbrace_phi, sigma_rbrace, &f, MARK, + MakeFilter(rbrace_phi, sigma_rbrace, &f, MarkerType::MARK, {{0, lbrace1_}, {0, lbrace2_}}, false); // Builds r1 filter. VectorFst r1; - MakeFilter(*rho_, mutable_sigma, &r1, CHECK, {{lbrace1_, 0}}, true); + MakeFilter(*rho_, mutable_sigma, &r1, MarkerType::CHECK, + {{lbrace1_, 0}}, true); IgnoreMarkers(&r1, {{lbrace2_, lbrace2_}}); ArcSort(&r1, icomp); // Builds r2 filter. VectorFst r2; - MakeFilter(*rho_, mutable_sigma, &r2, CHECK_COMPLEMENT, - {{lbrace2_, 0}}, - true); + MakeFilter(*rho_, mutable_sigma, &r2, MarkerType::CHECK_COMPLEMENT, + {{lbrace2_, 0}}, true); // Builds (((l o f) o replace) o r1) o r2. VectorFst c; Compose(l, f, &c); @@ -624,10 +628,11 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, Compose(c, r2, fst); break; } - case OPTIONAL: { + case CDRewriteMode::OPTIONAL: { // Builds r filter. VectorFst r; - MakeFilter(*rho_, mutable_sigma, &r, CHECK, {{lbrace1_, 0}}, true); + MakeFilter(*rho_, mutable_sigma, &r, MarkerType::CHECK, + {{lbrace1_, 0}}, true); // Builds (l o replace) o r. VectorFst c; Compose(l, replace, &c); @@ -637,29 +642,30 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, } break; } - case SIMULTANEOUS: { + case CDRewriteDirection::SIMULTANEOUS: { // Builds r filter. VectorFst r; - MakeFilter(*rho_, mutable_sigma, &r, MARK, {{0, rbrace_}}, true); + MakeFilter(*rho_, mutable_sigma, &r, MarkerType::MARK, {{0, rbrace_}}, + true); switch (mode_) { - case OBLIGATORY: { + case CDRewriteMode::OBLIGATORY: { VectorFst phi_rbrace; // Appends > after phi, matches all >. ArcMap(*phi_, &phi_rbrace, imapper); IgnoreMarkers(&phi_rbrace, {{rbrace_, rbrace_}}); AppendMarkers(&phi_rbrace, {{rbrace_, rbrace_}}); // Builds f filter. VectorFst f; - MakeFilter(phi_rbrace, sigma_rbrace, &f, MARK, + MakeFilter(phi_rbrace, sigma_rbrace, &f, MarkerType::MARK, {{0, lbrace1_}, {0, lbrace2_}}, true); // Builds l1 filter. VectorFst l1; - MakeFilter(*lambda_, mutable_sigma, &l1, CHECK, + MakeFilter(*lambda_, mutable_sigma, &l1, MarkerType::CHECK, {{lbrace1_, lbrace1_}}, false); IgnoreMarkers(&l1, {{lbrace2_, lbrace2_}, {rbrace_, rbrace_}}); ArcSort(&l1, icomp); // Builds l2 filter. VectorFst l2; - MakeFilter(*lambda_, mutable_sigma, &l2, CHECK_COMPLEMENT, + MakeFilter(*lambda_, mutable_sigma, &l2, MarkerType::CHECK_COMPLEMENT, {{lbrace2_, lbrace2_}}, false); IgnoreMarkers(&l2, {{lbrace1_, lbrace1_}, {rbrace_, rbrace_}}); ArcSort(&l2, icomp); @@ -671,11 +677,11 @@ void CDRewriteRule::Compile(const Fst &sigma, MutableFst *fst, Compose(c, replace, fst); break; } - case OPTIONAL: { + case CDRewriteMode::OPTIONAL: { // Builds l filter. VectorFst l; - MakeFilter(*lambda_, mutable_sigma, &l, CHECK, {{0, lbrace1_}}, - false); + MakeFilter(*lambda_, mutable_sigma, &l, MarkerType::CHECK, + {{0, lbrace1_}}, false); IgnoreMarkers(&l, {{rbrace_, rbrace_}}); static const ILabelCompare icomp; ArcSort(&l, icomp); @@ -846,21 +852,21 @@ bool CDRewriteRule::HasArcWithLabel(const Fst &fst, Label label) { // phi, lambda, and rho must be unweighted acceptors and psi must be a // weighted transducer when phiXpsi is true and a weighted acceptor // otherwise. sigma is an FST specifying (the closure of) the alphabet -// for the resulting transducer. dir can be LEFT_TO_RIGHT, RIGHT_TO_LEFT or -// SIMULTANEOUS. mode can be OBLIGATORY or OPTIONAL. sigma must be an unweighted -// acceptor representing a bifix code. +// for the resulting transducer. dir can be CDRewriteDirection::LEFT_TO_RIGHT, +// CDRewriteDirection::RIGHT_TO_LEFT or CDRewriteDirection::SIMULTANEOUS. mode +// can be CDRewriteMode::OBLIGATORY or CDRewriteMode::OPTIONAL. sigma must be an +// unweighted acceptor representing a bifix code. // // The error bit on the output FST is set if any argument does not satisfy the // preconditions. template -void CDRewriteCompile(const Fst &phi, const Fst &psi, - const Fst &lambda, const Fst &rho, - const Fst &sigma, MutableFst *fst, - CDRewriteDirection dir = LEFT_TO_RIGHT, - CDRewriteMode mode = OBLIGATORY, - bool phiXpsi = true, - typename Arc::Label initial_boundary_marker = kNoLabel, - typename Arc::Label final_boundary_marker = kNoLabel) { +void CDRewriteCompile( + const Fst &phi, const Fst &psi, const Fst &lambda, + const Fst &rho, const Fst &sigma, MutableFst *fst, + CDRewriteDirection dir = CDRewriteDirection::LEFT_TO_RIGHT, + CDRewriteMode mode = CDRewriteMode::OBLIGATORY, bool phiXpsi = true, + typename Arc::Label initial_boundary_marker = kNoLabel, + typename Arc::Label final_boundary_marker = kNoLabel) { internal::CDRewriteRule cdrule(phi, psi, lambda, rho, phiXpsi, initial_boundary_marker, final_boundary_marker); @@ -873,20 +879,21 @@ void CDRewriteCompile(const Fst &phi, const Fst &psi, // // phi, lambda, and rho must be unweighted acceptors and psi must be a // weighted acceptor. sigma is an FST specifying (the closure of) the alphabet -// for the resulting transducer. dir can be LEFT_TO_RIGHT, RIGHT_TO_LEFT or -// SIMULTANEOUS. mode can be OBLIGATORY or OPTIONAL. sigma must be an unweighted -// acceptor representing a bifix code. +// for the resulting transducer. dir can be CDRewriteDirection::LEFT_TO_RIGHT, +// CDRewriteDirection::RIGHT_TO_LEFT or CDRewriteDirection::SIMULTANEOUS. mode +// can be CDRewriteMode::OBLIGATORY or CDRewriteMode::OPTIONAL. sigma must be an +// unweighted acceptor representing a bifix code. // // The error bit on the output FST is set if any argument does not satisfy the // preconditions. template -void CDRewriteCompile(const Fst &phi, const Fst &psi, - const Fst &lambda, const Fst &rho, - const Fst &sigma, MutableFst *fst, - CDRewriteDirection dir = LEFT_TO_RIGHT, - CDRewriteMode mode = OBLIGATORY, - typename Arc::Label initial_boundary_marker = kNoLabel, - typename Arc::Label final_boundary_marker = kNoLabel) { +void CDRewriteCompile( + const Fst &phi, const Fst &psi, const Fst &lambda, + const Fst &rho, const Fst &sigma, MutableFst *fst, + CDRewriteDirection dir = CDRewriteDirection::LEFT_TO_RIGHT, + CDRewriteMode mode = CDRewriteMode::OBLIGATORY, + typename Arc::Label initial_boundary_marker = kNoLabel, + typename Arc::Label final_boundary_marker = kNoLabel) { CDRewriteCompile(phi, psi, lambda, rho, sigma, fst, dir, mode, false, initial_boundary_marker, final_boundary_marker); } @@ -899,19 +906,21 @@ void CDRewriteCompile(const Fst &phi, const Fst &psi, // // Lambda, and rho must be unweighted acceptors. sigma is an FST specifying (the // closure of) the alphabet for the resulting transducer. dir can be -// LEFT_TO_RIGHT, RIGHT_TO_LEFT or SIMULTANEOUS. mode can be OBLIGATORY or -// OPTIONAL. sigma must be an unweighted acceptor representing a bifix code. +// CDRewriteDirection::LEFT_TO_RIGHT, CDRewriteDirection::RIGHT_TO_LEFT or +// CDRewriteDirection::SIMULTANEOUS. mode can be CDRewriteMode::OBLIGATORY or +// CDRewriteMode::OPTIONAL. sigma must be an unweighted acceptor representing a +// bifix code. // // The error bit on the output FST is set if any argument does not satisfy the // preconditions. template -void CDRewriteCompile(const Fst &tau, const Fst &lambda, - const Fst &rho, const Fst &sigma, - MutableFst *fst, - CDRewriteDirection dir = LEFT_TO_RIGHT, - CDRewriteMode mode = OBLIGATORY, - typename Arc::Label initial_boundary_marker = kNoLabel, - typename Arc::Label final_boundary_marker = kNoLabel) { +void CDRewriteCompile( + const Fst &tau, const Fst &lambda, const Fst &rho, + const Fst &sigma, MutableFst *fst, + CDRewriteDirection dir = CDRewriteDirection::LEFT_TO_RIGHT, + CDRewriteMode mode = CDRewriteMode::OBLIGATORY, + typename Arc::Label initial_boundary_marker = kNoLabel, + typename Arc::Label final_boundary_marker = kNoLabel) { VectorFst phi(tau); Project(&phi, ProjectType::INPUT); ArcMap(&phi, RmWeightMapper()); diff --git a/extensions/cdrewritescript.cc b/extensions/cdrewritescript.cc index 11df469..afa16bb 100644 --- a/extensions/cdrewritescript.cc +++ b/extensions/cdrewritescript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "cdrewritescript.h" #include +#include +#include #include +#include "cdrewrite.h" namespace fst { namespace script { diff --git a/extensions/cdrewritescript.h b/extensions/cdrewritescript.h index edeefe0..fb91c7b 100644 --- a/extensions/cdrewritescript.h +++ b/extensions/cdrewritescript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CDREWRITESCRIPT_H_ #define PYNINI_CDREWRITESCRIPT_H_ @@ -21,7 +19,8 @@ #include #include -#include +#include +#include #include #include "cdrewrite.h" diff --git a/extensions/checkprops.h b/extensions/checkprops.h index 2a878cd..14a04b9 100644 --- a/extensions/checkprops.h +++ b/extensions/checkprops.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CHECKPROPS_H_ #define PYNINI_CHECKPROPS_H_ @@ -20,6 +18,7 @@ #include #include +#include namespace fst { namespace internal { diff --git a/extensions/cios.pxd b/extensions/cios.pxd index 4c5c80d..78a0139 100644 --- a/extensions/cios.pxd +++ b/extensions/cios.pxd @@ -1,5 +1,5 @@ #cython: language_level=3 -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. diff --git a/extensions/cmemory.pxd b/extensions/cmemory.pxd index 709ba30..f3f1b75 100644 --- a/extensions/cmemory.pxd +++ b/extensions/cmemory.pxd @@ -1,5 +1,5 @@ #cython: language_level=3 -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. diff --git a/extensions/concatrange.h b/extensions/concatrange.h index 0b8c540..9b8c019 100644 --- a/extensions/concatrange.h +++ b/extensions/concatrange.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CONCATRANGE_H_ #define PYNINI_CONCATRANGE_H_ @@ -24,9 +22,10 @@ #include #include -#include #include +#include #include +#include #include namespace fst { @@ -82,7 +81,6 @@ void SetStartFinal(MutableFst *fst) { // /x{,N}/ ConcatRange(x, 0, N) template void ConcatRange(MutableFst *fst, int32_t lower = 0, int32_t upper = 0) { - if (fst->Start() == kNoStateId) return; if (lower < 0 || upper < 0) { fst->SetProperties(kError, kError); FSTERROR() << "ConcatRange: range bounds must be positive, got {" << lower @@ -104,10 +102,15 @@ void ConcatRange(MutableFst *fst, int32_t lower = 0, int32_t upper = 0) { const auto reserved = size * lower + size + 1; fst->ReserveStates(reserved); } - // The last element in the concatenation is star-closed; remaining - // concatenations are copies of the input. - Closure(fst, CLOSURE_STAR); - for (; lower > 0; --lower) Concat(*copy, fst); + // If `lower` is zero, simply defer to star-closing. Otherwise, + // the last element in the concatenation is plus-closed; remaining + // `lower-1` concatenations are copies of the input. + if (lower == 0) { + Closure(fst, CLOSURE_STAR); + } else { + Closure(fst, CLOSURE_PLUS); + for (; lower > 1; --lower) Concat(*copy, fst); + } } else if (lower == 0) { // Finite upper bound, lower bound includes zero. { diff --git a/extensions/concatrangescript.cc b/extensions/concatrangescript.cc index 6c6bfbd..207970c 100644 --- a/extensions/concatrangescript.cc +++ b/extensions/concatrangescript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "concatrangescript.h" #include +#include #include namespace fst { diff --git a/extensions/concatrangescript.h b/extensions/concatrangescript.h index 7f71269..a21d9f9 100644 --- a/extensions/concatrangescript.h +++ b/extensions/concatrangescript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CONCATRANGESCRIPT_H_ #define PYNINI_CONCATRANGESCRIPT_H_ @@ -21,6 +19,7 @@ #include #include +#include #include #include "concatrange.h" diff --git a/extensions/cpynini.pxd b/extensions/cpynini.pxd index 9b0dfeb..c183aba 100644 --- a/extensions/cpynini.pxd +++ b/extensions/cpynini.pxd @@ -1,5 +1,5 @@ #cython: language_level=3 -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. @@ -79,8 +77,7 @@ cdef extern from "" \ bool ReadLabelTriples[L](const string &, vector[pair[L, L]] *, - vector[L] *, - bool) + vector[L] *) # TODO(kbg): The last argument is actually const but externally Cython 0.28 # freaks out if it is so annotated. Re-annotate it const once this has been @@ -164,7 +161,7 @@ cdef extern from "" \ cdef extern from "" namespace "fst" nogil: - bool ReadLabelPairs[L](const string &, vector[pair[L, L]] *, bool) + bool ReadLabelPairs[L](const string &, vector[pair[L, L]] *) bool WriteLabelPairs[L](const string &, const vector[pair[L, L]] &) @@ -172,14 +169,18 @@ cdef extern from "" namespace "fst" nogil: cdef extern from "cdrewrite.h" \ namespace "fst" nogil: - enum CDRewriteDirection: - LEFT_TO_RIGHT - RIGHT_TO_LEFT - SIMULTANEOUS + # TODO(wolfsonkin): Don't do this hack if Cython gets proper enum class + # support: https://github.com/cython/cython/issues/1603 + ctypedef enum CDRewriteDirection: + LEFT_TO_RIGHT "fst::CDRewriteDirection::LEFT_TO_RIGHT" + RIGHT_TO_LEFT "fst::CDRewriteDirection::RIGHT_TO_LEFT" + SIMULTANEOUS "fst::CDRewriteDirection::SIMULTANEOUS" - enum CDRewriteMode: - OBLIGATORY - OPTIONAL + # TODO(wolfsonkin): Don't do this hack if Cython gets proper enum class + # support: https://github.com/cython/cython/issues/1603 + ctypedef enum CDRewriteMode: + OBLIGATORY "fst::CDRewriteMode::OBLIGATORY" + OPTIONAL "fst::CDRewriteMode::OPTOINAL" cdef extern from "cdrewritescript.h" \ diff --git a/extensions/cpywrapfst.pxd b/extensions/cpywrapfst.pxd index 14ab8d9..dbed2b5 100644 --- a/extensions/cpywrapfst.pxd +++ b/extensions/cpywrapfst.pxd @@ -1,5 +1,5 @@ #cython: language_level=3 -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. @@ -185,9 +183,6 @@ cdef extern from "" namespace "fst" nogil: REWEIGHT_TO_INITIAL REWEIGHT_TO_FINAL - cdef cppclass SymbolTableTextOptions: - - SymbolTableTextOptions(bool) # This is actually a nested class, but Cython doesn't need to know that. cdef cppclass SymbolTableIterator "fst::SymbolTable::iterator": @@ -210,7 +205,6 @@ cdef extern from "" namespace "fst" nogil: bool operator!=(const SymbolTableIterator &, const SymbolTableIterator &) - # Symbol tables. cdef cppclass SymbolTable: @@ -229,7 +223,7 @@ cdef extern from "" namespace "fst" nogil: SymbolTable *ReadStream "Read"(istream &, const string &) @staticmethod - SymbolTable *ReadText(const string &, const SymbolTableTextOptions &) + SymbolTable *ReadText(const string &, const string &) int64_t AddSymbol(const string &, int64_t) @@ -265,9 +259,7 @@ cdef extern from "" namespace "fst" nogil: bool Write(const string &) - bool WriteText(ostream &) - - bool WriteText(const string &) + bool WriteText(const string &, const string &) SymbolTableIterator begin() @@ -292,7 +284,8 @@ cdef extern from "" namespace "fst" nogil: UTF8 "fst::TokenType::UTF8" -cdef extern from "" namespace "fst::script" nogil: +cdef extern from "" namespace "fst::script" \ + nogil: cdef cppclass WeightClass: @@ -518,7 +511,8 @@ ctypedef pair[int64_t, const FstClass *] LabelFstClassPair ctypedef pair[int64_t, int64_t] LabelPair -cdef extern from "" namespace "fst::script" nogil: +cdef extern from "" namespace "fst::script" \ + nogil: # TODO(wolfsonkin): Don't do this hack if Cython gets proper enum class # support: https://github.com/cython/cython/issues/1603 @@ -550,7 +544,6 @@ cdef extern from "" namespace "fst::script" nogil: bool, bool, bool, - bool, bool) cdef void Compose(FstClass &, FstClass &, MutableFstClass *, @@ -617,7 +610,7 @@ cdef extern from "" namespace "fst::script" nogil: cdef bool Equal(const FstClass &, const FstClass &, float) - cdef bool Equivalent(const FstClass &, const FstClass &, float) + cdef bool Equivalent(const FstClass &, const FstClass &, float, bool *) cdef void Intersect(const FstClass &, const FstClass &, @@ -686,7 +679,8 @@ cdef extern from "" namespace "fst::script" nogil: ctypedef enum RandArcSelection: UNIFORM_ARC_SELECTOR "fst::script::RandArcSelection::UNIFORM" LOG_PROB_ARC_SELECTOR "fst::script::RandArcSelection::LOG_PROB" - FAST_LOG_PROB_ARC_SELECTOR "fst::script::RandArcSelection::FAST_LOG_PROB" + FAST_LOG_PROB_ARC_SELECTOR \ + "fst::script::RandArcSelection::FAST_LOG_PROB" cdef bool RandEquivalent(const FstClass &, const FstClass &, @@ -769,6 +763,8 @@ cdef extern from "" namespace "fst::script" nogil: cdef extern from "" namespace "fst::script" nogil: + cdef uint64_t kDefaultSeed + cdef bool GetArcSortType(const string &, ArcSortType *) cdef bool GetComposeFilter(const string &, ComposeFilter *) @@ -789,6 +785,8 @@ cdef extern from "" namespace "fst::script" nogil: cdef bool GetReweightType(const string &, ReweightType *) + cdef uint64_t GetSeed(uint64_t) + cdef bool GetTokenType(const string &, TokenType *) diff --git a/extensions/cross.h b/extensions/cross.h index d58553d..00378cb 100644 --- a/extensions/cross.h +++ b/extensions/cross.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CROSS_H_ #define PYNINI_CROSS_H_ diff --git a/extensions/crossscript.cc b/extensions/crossscript.cc index 36d472c..048c0f4 100644 --- a/extensions/crossscript.cc +++ b/extensions/crossscript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "crossscript.h" +#include #include #include diff --git a/extensions/crossscript.h b/extensions/crossscript.h index feb6bca..c98b648 100644 --- a/extensions/crossscript.h +++ b/extensions/crossscript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_CROSSSCRIPT_H_ #define PYNINI_CROSSSCRIPT_H_ @@ -20,6 +18,8 @@ #include #include +#include +#include #include #include "cross.h" diff --git a/extensions/defaults.cc b/extensions/defaults.cc index 7d60fa4..c9af091 100644 --- a/extensions/defaults.cc +++ b/extensions/defaults.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "defaults.h" -#include +#include +#include + namespace fst { namespace internal { diff --git a/extensions/defaults.h b/extensions/defaults.h index 53bb4e9..7ccf8a7 100644 --- a/extensions/defaults.h +++ b/extensions/defaults.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_DEFAULTS_H_ #define PYNINI_DEFAULTS_H_ @@ -27,6 +25,7 @@ #include #include + namespace fst { namespace internal { diff --git a/extensions/getters.cc b/extensions/getters.cc index 14703f9..0465a32 100644 --- a/extensions/getters.cc +++ b/extensions/getters.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,21 +11,22 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "getters.h" +#include "cdrewrite.h" +#include + namespace fst { namespace script { bool GetCDRewriteDirection(std::string_view str, CDRewriteDirection *rd) { if (str == "ltr") { - *rd = LEFT_TO_RIGHT; + *rd = CDRewriteDirection::LEFT_TO_RIGHT; } else if (str == "rtl") { - *rd = RIGHT_TO_LEFT; + *rd = CDRewriteDirection::RIGHT_TO_LEFT; } else if (str == "sim") { - *rd = SIMULTANEOUS; + *rd = CDRewriteDirection::SIMULTANEOUS; } else { return false; } @@ -34,9 +35,9 @@ bool GetCDRewriteDirection(std::string_view str, CDRewriteDirection *rd) { bool GetCDRewriteMode(std::string_view str, CDRewriteMode *rm) { if (str == "obl") { - *rm = OBLIGATORY; + *rm = CDRewriteMode::OBLIGATORY; } else if (str == "opt") { - *rm = OPTIONAL; + *rm = CDRewriteMode::OPTIONAL; } else { return false; } diff --git a/extensions/getters.h b/extensions/getters.h index e984d87..fe6d849 100644 --- a/extensions/getters.h +++ b/extensions/getters.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_GETTERS_H_ #define PYNINI_GETTERS_H_ diff --git a/extensions/lenientlycompose.h b/extensions/lenientlycompose.h index a282000..2cb269f 100644 --- a/extensions/lenientlycompose.h +++ b/extensions/lenientlycompose.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_LENIENTLYCOMPOSE_H_ #define PYNINI_LENIENTLYCOMPOSE_H_ @@ -29,6 +27,7 @@ #include #include #include +#include #include #include #include "checkprops.h" diff --git a/extensions/lenientlycomposescript.cc b/extensions/lenientlycomposescript.cc index b6d0c50..1d06f0e 100644 --- a/extensions/lenientlycomposescript.cc +++ b/extensions/lenientlycomposescript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "lenientlycomposescript.h" +#include +#include +#include #include namespace fst { diff --git a/extensions/lenientlycomposescript.h b/extensions/lenientlycomposescript.h index 25432e4..e9897b5 100644 --- a/extensions/lenientlycomposescript.h +++ b/extensions/lenientlycomposescript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_LENIENTLYCOMPOSESCRIPT_H_ #define PYNINI_LENIENTLYCOMPOSESCRIPT_H_ @@ -20,6 +18,9 @@ #include #include +#include +#include +#include #include #include "lenientlycompose.h" diff --git a/extensions/optimize.h b/extensions/optimize.h index 5e792a1..c9c5446 100644 --- a/extensions/optimize.h +++ b/extensions/optimize.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_OPTIMIZE_H_ #define PYNINI_OPTIMIZE_H_ @@ -28,12 +26,12 @@ #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/extensions/optimizescript.cc b/extensions/optimizescript.cc index 3c1f829..9e10513 100644 --- a/extensions/optimizescript.cc +++ b/extensions/optimizescript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "optimizescript.h" diff --git a/extensions/optimizescript.h b/extensions/optimizescript.h index 000c2e0..829c1f5 100644 --- a/extensions/optimizescript.h +++ b/extensions/optimizescript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_OPTIMIZESCRIPT_H_ #define PYNINI_OPTIMIZESCRIPT_H_ @@ -20,6 +18,7 @@ #include #include +#include #include #include "optimize.h" diff --git a/extensions/paths.h b/extensions/paths.h index 796e040..77aa4f4 100644 --- a/extensions/paths.h +++ b/extensions/paths.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_PATHS_H_ #define PYNINI_PATHS_H_ @@ -32,8 +30,11 @@ #include #include +#include #include +#include #include +#include namespace fst { diff --git a/extensions/pathsscript.cc b/extensions/pathsscript.cc index f02d029..d58e3d3 100644 --- a/extensions/pathsscript.cc +++ b/extensions/pathsscript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "pathsscript.h" +#include +#include #include #include diff --git a/extensions/pathsscript.h b/extensions/pathsscript.h index 4317eb0..f540248 100644 --- a/extensions/pathsscript.h +++ b/extensions/pathsscript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_PATHSSCRIPT_H_ #define PYNINI_PATHSSCRIPT_H_ @@ -24,8 +22,13 @@ #include #include +#include +#include +#include #include +#include #include +#include #include "paths.h" namespace fst { @@ -47,7 +50,7 @@ class StringPathIteratorImplBase { virtual std::string OString() const = 0; virtual void Reset() = 0; virtual WeightClass Weight() const = 0; - virtual ~StringPathIteratorImplBase() {} + virtual ~StringPathIteratorImplBase() = default; }; // Templated implementation. diff --git a/extensions/prefix_tree.h b/extensions/prefix_tree.h index 169ea38..c9f1349 100644 --- a/extensions/prefix_tree.h +++ b/extensions/prefix_tree.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,24 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_PREFIX_TREE_H_ #define PYNINI_PREFIX_TREE_H_ #include -#include #include #include #include -#include -#include -#include +#include #include #include -#include namespace fst { namespace internal { diff --git a/extensions/rewrite.h b/extensions/rewrite.h deleted file mode 100644 index 91eeb03..0000000 --- a/extensions/rewrite.h +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2016-2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -#ifndef PYNINI_REWRITE_H_ -#define PYNINI_REWRITE_H_ - -// Functions for applying rewrite rules to strings or FSTs. Unlike the naive -// approach, the lattices produced by composing the string and the FST rule -// are optimized (e.g., with epsilon-removal and pruned determinization) so -// that the output strings are unique. - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "paths.h" -#include "stringprint.h" - -// Generic rewrite utilities for string inputs. - -namespace fst { -namespace internal { - -// Post-composition check and cleanup. -template -inline bool CheckNonEmptyAndCleanup(MutableFst *lattice) { - if (lattice->Start() == kNoStateId) return false; - // Projects output side if not already known to be an acceptor. - if (lattice->Properties(kAcceptor, /*test=*/false) != kAcceptor) { - Project(lattice, ProjectType::OUTPUT); - } - // Removes epsilons if not already known to be epsilon-free. - if (lattice->Properties(kNoEpsilons, /*test=*/false) != kNoEpsilons) { - RmEpsilon(lattice); - } - return true; -} - -} // namespace internal - -// Constructs a weighted, epsilon-free lattice of output strings given a -// input FST and a rule FST. -// -// Callers may wish to arc-sort the input side of the rule ahead of time. -template -bool RewriteLattice(const Fst &input, const Fst &rule, - MutableFst *lattice) { - static const ComposeOptions opts(true, ALT_SEQUENCE_FILTER); - Compose(input, rule, lattice, opts); - return internal::CheckNonEmptyAndCleanup(lattice); -} - -// Same, but supports PDT composition. -template -bool RewriteLattice( - const Fst &input, const Fst &rule, MutableFst *lattice, - const std::vector> - &pdt_parens) { - static const PdtComposeOptions opts(true, PdtComposeFilter::EXPAND); - Compose(input, rule, pdt_parens, lattice, opts); - return internal::CheckNonEmptyAndCleanup(lattice); -} - -// Same, but supports MPDT composition. -template -bool RewriteLattice( - const Fst &input, const Fst &rule, MutableFst *lattice, - const std::vector> - &pdt_parens, - const std::vector &mpdt_assignments) { - static const MPdtComposeOptions opts(true, PdtComposeFilter::EXPAND); - Compose(input, rule, pdt_parens, mpdt_assignments, lattice, opts); - return internal::CheckNonEmptyAndCleanup(lattice); -} - -// Given an epsilon-free lattice of output strings (such as produced by -// RewriteLattice), attempts to determinize it, pruning non-optimal paths if -// `optimal_only` is true. This is only valid in a semiring with the path -// property. -// -// To prevent unexpected blowup during determinization, a state threshold is -// also used and a warning is logged if this exact threshold is reached. The -// threshold is a multiplier of the size of the input lattice (by default, 4), -// plus a small constant factor. This is intended to be a sensible default -// and is not an inherently meaningful value in and of itself. -template -void LatticeToDfa(MutableFst *lattice, bool optimal_only, - typename Arc::StateId state_multiplier = 4) { - using StateId = typename Arc::StateId; - using Weight = typename Arc::Weight; - const auto &weight_threshold = optimal_only ? Weight::One() : Weight::Zero(); - const StateId state_threshold = 256 + state_multiplier * lattice->NumStates(); - const DeterminizeOptions opts(kDelta, weight_threshold, state_threshold); - Determinize(*lattice, lattice, opts); - // Warns if we actually hit the state threshold; if so, we do not have the - // full set of (optimal) rewrites; there may be cycles of unweighted - // insertions, or the state threshold may just be too low. - if (lattice->NumStates() == state_threshold) { - LOG(WARNING) << "Unexpectedly hit state threshold; consider a higher value " - "for state_multiplier"; - } -} - -// Given an epsilon-free lattice of output strings (such as produced by -// RewriteLattice), extracts n-shortest unique strings. This is only valid in a -// semiring with the path property. -template -void LatticeToShortest(MutableFst *lattice, int32_t nshortest = 1) { - VectorFst shortest; - // By requesting unique solutions we request on-the-fly determinization. - ShortestPath(*lattice, &shortest, nshortest, /*unique=*/true); - *lattice = shortest; -} - -// Given an epsilon-free lattice of output strings (such as produced by -// RewriteLattice), extracts a single top string. This is only valid in a -// semiring with the path property. -template -bool LatticeToTopString(const Fst &lattice, std::string *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr) { - VectorFst ofst; - ShortestPath(lattice, &ofst); - return StringPrint(ofst, output, ttype, syms); -} - -// Attempts to extract a single top rewrite from a optimized DFA, logging a -// warning and returning false if there's a tie. This is only valid in a -// semiring with the path property. -template -bool LatticeToOneTopString(const Fst &lattice, std::string *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr) { - StringPathIterator paths(lattice, ttype, syms, /*check_acyclic=*/false); - if (paths.Error() || paths.Done()) return false; - *output = paths.OString(); - // Checks for uniqueness. - paths.Next(); - if (!paths.Done()) { - LOG(ERROR) << "Multiple top rewrites found: '" << *output << "' and '" - << paths.OString() << "' (weight: " << paths.Weight() << ")"; - return false; - } - return true; -} - -// Clears vector and writes lattice labels to it. -template -bool LatticeToLabels(const Fst &lattice, - std::vector> *output) { - output->clear(); - PathIterator paths(lattice); - if (paths.Error()) return false; - for (; !paths.Done(); paths.Next()) output->emplace_back(paths.OLabels()); - return true; -} - -// Clears vector and writes lattice strings to it. -template -bool LatticeToStrings(const Fst &lattice, std::vector *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr) { - output->clear(); - // We have to do this check manually since StringPathIterator's check is - // potentially fatal. - if (lattice.Properties(kAcyclic, true) != kAcyclic) { - LOG(ERROR) << "Lattice is unexpectedly cyclic"; - return false; - } - // Input token type and symbol table will be ignored. - StringPathIterator paths(lattice, ttype, syms, /*check_acyclic=*/false); - if (paths.Error()) return false; - for (; !paths.Done(); paths.Next()) { - // Constructs these in-place. - output->emplace_back(); - paths.OString(&output->back()); - } - return true; -} - -// Top rewrite. -template -bool TopRewrite(const Fst &input, const Fst &rule, - std::string *output, TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr) { - VectorFst lattice; - return RewriteLattice(input, rule, &lattice) && - LatticeToTopString(lattice, output, ttype, syms); -} - -// Top rewrite, returning false and logging if there's a tie. -template -bool OneTopRewrite(const Fst &input, const Fst &rule, - std::string *output, TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr, - typename Arc::StateId state_multiplier = 4) { - VectorFst lattice; - if (!RewriteLattice(input, rule, &lattice)) return false; - LatticeToDfa(&lattice, /*optimal_only=*/true, state_multiplier); - return LatticeToOneTopString(lattice, output, ttype, syms); -} - -// All rewrites. -template -bool Rewrites(const Fst &input, const Fst &rule, - std::vector *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr, - typename Arc::StateId state_multiplier = 4) { - VectorFst lattice; - if (!RewriteLattice(input, rule, &lattice)) return false; - LatticeToDfa(&lattice, /*optimal_only=*/false, state_multiplier); - return LatticeToStrings(lattice, output, ttype, syms); -} - -// The same, but with repeated string fields. -// All optimal rewrites. -template -bool TopRewrites(const Fst &input, const Fst &rule, - std::vector *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr, - typename Arc::StateId state_multiplier = 4) { - VectorFst lattice; - if (!RewriteLattice(input, rule, &lattice)) return false; - LatticeToDfa(&lattice, /*optimal_only=*/true, state_multiplier); - return LatticeToStrings(lattice, output, ttype, syms); -} - -// The same, but with repeated string fields. -// The top n rewrites. -template -bool TopRewrites(const Fst &input, const Fst &rule, int32_t nshortest, - std::vector *output, - TokenType ttype = TokenType::BYTE, - const SymbolTable *syms = nullptr) { - VectorFst lattice; - if (!RewriteLattice(input, rule, &lattice)) return false; - LatticeToShortest(&lattice, nshortest); - return LatticeToStrings(lattice, output, ttype, syms); -} - -// The same, but with repeated string fields. -// Determines whether a rule allows an input/output pair. -template -bool Matches(const Fst &input, const Fst &output, - const Fst &rule) { - VectorFst lattice; - if (!RewriteLattice(input, rule, &lattice)) return false; - static const OLabelCompare ocomp; - ArcSort(&lattice, ocomp); - static const IntersectOptions opts(true, SEQUENCE_FILTER); - Intersect(lattice, output, &lattice, opts); - return lattice.Start() != kNoStateId; -} - -} // namespace fst - -#endif // PYNINI_REWRITE_H_ - diff --git a/extensions/string-view-fst.h b/extensions/string-view-fst.h index 36286c3..531fb12 100644 --- a/extensions/string-view-fst.h +++ b/extensions/string-view-fst.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - -#ifndef PYNINI_STRING_VIEW_FST_H_ -#define PYNINI_STRING_VIEW_FST_H_ +#ifndef NLP_FST_UTIL_STRING_STRING_VIEW_FST_H_ +#define NLP_FST_UTIL_STRING_STRING_VIEW_FST_H_ +#include #include +#include #include -#include +#include #include +#include +#include #include -#include #include namespace fst { @@ -49,7 +50,7 @@ class ByteViewer { }; template -class UTF8Viewer { +class Utf8Viewer { public: using Label = typename Arc::Label; using StateId = typename Arc::StateId; @@ -61,10 +62,10 @@ class UTF8Viewer { // from various Astral Planes. Naturally, it is always safer to use this with // larger Label precision (e.g., 64 bits). static_assert(sizeof(Label) >= 2, - "UTF8Viewer requires at least 16 bits of label precision"); + "Utf8Viewer requires at least 16 bits of label precision"); Arc operator()(std::string_view view, StateId byte_offset) const { - const auto label_size = UTF8Viewer::GetLabelAndSize(view, byte_offset); + const auto label_size = Utf8Viewer::GetLabelAndSize(view, byte_offset); return Arc(label_size.first, label_size.first, byte_offset + label_size.second); } @@ -105,20 +106,26 @@ class ArcIterator> : public ArcIteratorBase { public: using StateId = typename Arc::StateId; - explicit ArcIterator(const StringViewFst &fst, StateId state) : - viewer_(), - has_arcs_(fst.NumArcs(state)), - arc_(viewer_(fst.GetImpl()->view(), state)), - done_(!has_arcs_ || arc_.ilabel < 0) {} + explicit ArcIterator(const StringViewFst &fst, StateId state) + : has_arcs_(fst.NumArcs(state)), + done_(!has_arcs_), + // Contents of `arc_` don't matter if we're `done_`. + arc_(done_ ? Arc() : Viewer()(fst.GetImpl()->view(), state)) {} bool Done() const final { return done_; } - const Arc &Value() const final { return arc_; } + const Arc &Value() const final { + DCHECK(!done_); + return arc_; + } - void Next() final { done_ = true; } + void Next() final { + DCHECK(!done_); + done_ = true; + } void Seek(size_t s) final { - done_ = (s != 0) || !has_arcs_ || arc_.ilabel < 0; + done_ = (s != 0) || !has_arcs_; } void Reset() final { Seek(0); } @@ -130,10 +137,9 @@ class ArcIterator> : public ArcIteratorBase { size_t Position() const final { return done_ ? 1 : 0; } private: - Viewer viewer_; // Stateless. const bool has_arcs_; - const Arc arc_; bool done_; + const Arc arc_; }; namespace internal { @@ -207,8 +213,8 @@ class StringViewFstImpl : public FstImpl { // StringViewFst is essentially stateless except for the arc currently being // viewed. // -// UTF8View provides a UTF-32 codepoint per arc, and ByteView provides a byte -// per arc. +// Utf8Viewer provides a UTF-32 codepoint per arc, and ByteViewer provides a +// byte per arc. template class StringViewFst : public ImplToExpandedFst> { @@ -250,10 +256,16 @@ class StringViewFst StringViewFst &operator=(const StringViewFst &) = delete; }; -using StdByteStringViewFst = StringViewFst>; -using StdUTF8StringViewFst = StringViewFst>; +template +using ByteStringViewFst = StringViewFst>; + +template +using Utf8StringViewFst = StringViewFst>; + +using StdByteStringViewFst = ByteStringViewFst; +using StdUtf8StringViewFst = Utf8StringViewFst; } // namespace fst -#endif // PYNINI_STRING_VIEW_FST_H_ +#endif // NLP_FST_UTIL_STRING_STRING_VIEW_FST_H_ diff --git a/extensions/stringcompile.cc b/extensions/stringcompile.cc index 60d56f6..37fb170 100644 --- a/extensions/stringcompile.cc +++ b/extensions/stringcompile.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringcompile.h" #include +#include +#include #include #include #include + #include #include #include diff --git a/extensions/stringcompile.h b/extensions/stringcompile.h index 3b20218..2340c27 100644 --- a/extensions/stringcompile.h +++ b/extensions/stringcompile.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGCOMPILE_H_ #define PYNINI_STRINGCOMPILE_H_ @@ -20,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -30,10 +29,12 @@ #include #include + #include #include #include + // This module contains a singleton class which can compile strings into string // FSTs, keeping track of so-called generated labels. // diff --git a/extensions/stringcompilescript.cc b/extensions/stringcompilescript.cc index 2566963..0fd2cdb 100644 --- a/extensions/stringcompilescript.cc +++ b/extensions/stringcompilescript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringcompilescript.h" #include +#include +#include +#include +#include #include +#include namespace fst { namespace script { diff --git a/extensions/stringcompilescript.h b/extensions/stringcompilescript.h index b5bcea6..3f3a64d 100644 --- a/extensions/stringcompilescript.h +++ b/extensions/stringcompilescript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,19 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGCOMPILESCRIPT_H_ #define PYNINI_STRINGCOMPILESCRIPT_H_ #include +#include +#include +#include +#include #include #include +#include #include "stringcompile.h" namespace fst { diff --git a/extensions/stringfile.cc b/extensions/stringfile.cc index fe74f41..3a01271 100644 --- a/extensions/stringfile.cc +++ b/extensions/stringfile.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringfile.h" +#include + #include "stringutil.h" namespace fst { diff --git a/extensions/stringfile.h b/extensions/stringfile.h index e88b466..1d9c372 100644 --- a/extensions/stringfile.h +++ b/extensions/stringfile.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGFILE_H_ #define PYNINI_STRINGFILE_H_ @@ -32,8 +30,8 @@ namespace internal { class StringFile { public: // Opens a file input stream using the provided filename. - explicit StringFile(const std::string &source) - : istrm_(source), linenum_(0), source_(source) { + explicit StringFile(std::string_view source) + : linenum_(0), source_(source), istrm_(source_) { Next(); } @@ -52,18 +50,16 @@ class StringFile { bool Error() const { return !istrm_.is_open() || istrm_.bad(); } private: - std::ifstream istrm_; std::string line_; size_t linenum_; const std::string source_; + std::ifstream istrm_; }; // File iterator expecting multiple columns separated by tab. class ColumnStringFile { public: - explicit ColumnStringFile(const std::string &source) : sf_(source) { - Parse(); - } + explicit ColumnStringFile(std::string_view source) : sf_(source) { Parse(); } void Reset(); diff --git a/extensions/stringmap.h b/extensions/stringmap.h index 96f6cd5..6a5e030 100644 --- a/extensions/stringmap.h +++ b/extensions/stringmap.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGMAP_H_ #define PYNINI_STRINGMAP_H_ @@ -26,7 +24,6 @@ #include #include -#include #include #include #include @@ -34,6 +31,7 @@ #include "stringcompile.h" #include "stringfile.h" + #include #include @@ -97,6 +95,7 @@ class StringMapCompiler { PTree ptree_; }; +// StringType could reasonably be `std::string` or `std::string_view`. template bool StringMapLineIsAcceptor(std::vector line) { switch (line.size()) { @@ -151,8 +150,12 @@ inline bool StringMapCheckRepresentableAsAcceptor( return true; } -template -bool StringMapCheckRepresentableAsAcceptor(std::vector lines, +// `LineType` is (currently) any type with a `StringMapLineIsAcceptor` overload, +// which currently includes `std::vector`, +// ``std::vector`, and `std::tuple` (given some `Weight` type). +template +bool StringMapCheckRepresentableAsAcceptor(std::vector lines, TokenType input_token_type, TokenType output_token_type, const SymbolTable *input_symbols, @@ -268,10 +271,7 @@ bool StringMapCompile( const SymbolTable *output_symbols = nullptr) { internal::StringMapCompiler compiler( input_token_type, output_token_type, input_symbols, output_symbols); - for (const auto &line : lines) { - const auto &istring = std::get<0>(line); - const auto &ostring = std::get<1>(line); - const auto &weight = std::get<2>(line); + for (const auto &[istring, ostring, weight] : lines) { if (!compiler.Add(istring, ostring, weight)) { LOG(ERROR) << "StringMapCompile: Ill-formed line: `(" << istring << ", " << ostring << ", " << weight << ")`"; @@ -312,7 +312,7 @@ bool StringMapCompileWithAcceptorCheck( // and also the (token_type, symbols) is the same for input and output. template bool StringFileCompile( - const std::string &source, MutableFst *fst, + std::string_view source, MutableFst *fst, TokenType input_token_type = TokenType::BYTE, TokenType output_token_type = TokenType::BYTE, const SymbolTable *input_symbols = nullptr, diff --git a/extensions/stringmapscript.cc b/extensions/stringmapscript.cc index 8cbf84c..06d55b0 100644 --- a/extensions/stringmapscript.cc +++ b/extensions/stringmapscript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,14 +11,18 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringmapscript.h" #include +#include +#include +#include +#include +#include #include +#include namespace fst { namespace script { diff --git a/extensions/stringmapscript.h b/extensions/stringmapscript.h index 07fad46..162a1a1 100644 --- a/extensions/stringmapscript.h +++ b/extensions/stringmapscript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGMAPSCRIPT_H_ #define PYNINI_STRINGMAPSCRIPT_H_ @@ -23,7 +21,11 @@ #include #include +#include +#include +#include #include +#include #include #include #include "stringmap.h" diff --git a/extensions/stringprint.h b/extensions/stringprint.h index a84c218..1a99559 100644 --- a/extensions/stringprint.h +++ b/extensions/stringprint.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGPRINT_H_ #define PYNINI_STRINGPRINT_H_ @@ -24,6 +22,7 @@ namespace fst { +// Prints a string FST to a std::string. template bool StringPrint(const Fst &fst, std::string *str, TokenType token_type = TokenType::BYTE, @@ -32,6 +31,27 @@ bool StringPrint(const Fst &fst, std::string *str, return printer(fst, str); } +// Same as above but overloaded to also compute the path weight. +template +bool StringPrint(const Fst &fst, std::string *str, + typename Arc::Weight *weight, + TokenType token_type = TokenType::BYTE, + const SymbolTable *symbols = nullptr) { + const StringPrinter printer(token_type, symbols); + return printer(fst, str, weight); +} + +// Same as above but converts the weight to a float, for legacy compatibility. +template +bool StringPrint(const Fst &fst, std::string *str, float *weight, + TokenType token_type = TokenType::BYTE, + const SymbolTable *symbols = nullptr) { + typename Arc::Weight typed_weight; + if (!StringPrint(fst, str, &typed_weight, token_type, symbols)) return false; + *weight = typed_weight.Value(); + return true; +} + } // namespace fst #endif // PYNINI_STRINGPRINT_H_ diff --git a/extensions/stringprintscript.cc b/extensions/stringprintscript.cc index cd1fb31..2a623aa 100644 --- a/extensions/stringprintscript.cc +++ b/extensions/stringprintscript.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,13 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringprintscript.h" #include +#include +#include +#include +#include + namespace fst { namespace script { diff --git a/extensions/stringprintscript.h b/extensions/stringprintscript.h index 554ae64..58b1a55 100644 --- a/extensions/stringprintscript.h +++ b/extensions/stringprintscript.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,16 +11,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGPRINTSCRIPT_H_ #define PYNINI_STRINGPRINTSCRIPT_H_ #include +#include #include +#include #include +#include #include #include "stringprint.h" diff --git a/extensions/stringutil.cc b/extensions/stringutil.cc index 41743d7..da0d076 100644 --- a/extensions/stringutil.cc +++ b/extensions/stringutil.cc @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,11 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #include "stringutil.h" +#include #include #include @@ -24,8 +23,8 @@ namespace fst { namespace { -void StringReplace(std::string *full, const std::string &before, - const std::string &after) { +void StringReplace(std::string *full, std::string_view before, + std::string_view after) { size_t pos = 0; while ((pos = full->find(before, pos)) != std::string::npos) { full->replace(pos, before.size(), after); diff --git a/extensions/stringutil.h b/extensions/stringutil.h index fc25856..c20eed6 100644 --- a/extensions/stringutil.h +++ b/extensions/stringutil.h @@ -1,4 +1,4 @@ -// Copyright 2016-2020 Google LLC +// Copyright 2016-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - #ifndef PYNINI_STRINGUTIL_H_ #define PYNINI_STRINGUTIL_H_ diff --git a/pynini.egg-info/PKG-INFO b/pynini.egg-info/PKG-INFO index 90b206f..a53d72e 100644 --- a/pynini.egg-info/PKG-INFO +++ b/pynini.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pynini -Version: 2.1.5.post2 +Version: 2.1.6 Summary: Finite-state grammar compilation Home-page: http://pynini.opengrm.org Author: Kyle Gorman @@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Other Environment Classifier: Environment :: Console @@ -102,12 +103,13 @@ running `bazel build //:all` anywhere in the source tree. ## Testing To confirm successful installation, run `pip install -r requirements`, then -`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`. +`python tests/pynini_test.py`. If all tests pass, the final line will read `OK`; +a successful run will log some errors to STDERR (this is working as expected). ## Python version support Pynini 2.0.0 and onward support Python 3. Pynini 2.1 versions (onward) drop -Python 2 support. +Python 2 support. The current release supports Python 3.6--3.12. # License diff --git a/pynini.egg-info/SOURCES.txt b/pynini.egg-info/SOURCES.txt index b10a94f..51d94d7 100644 --- a/pynini.egg-info/SOURCES.txt +++ b/pynini.egg-info/SOURCES.txt @@ -9,7 +9,6 @@ README.md WORKSPACE.bazel pyproject.toml requirements.txt -setup.cfg setup.py bazel/BUILD.bazel bazel/cython.BUILD.bazel @@ -49,7 +48,6 @@ extensions/paths.h extensions/pathsscript.cc extensions/pathsscript.h extensions/prefix_tree.h -extensions/rewrite.h extensions/string-view-fst.h extensions/stringcompile.cc extensions/stringcompile.h @@ -105,6 +103,7 @@ pynini/lib/py.typed pynini/lib/pynutil.py pynini/lib/rewrite.py pynini/lib/rule_cascade.py +pynini/lib/stringfile.py pynini/lib/tagger.py pynini/lib/utf8.py pywrapfst/BUILD.bazel @@ -131,6 +130,7 @@ tests/pynini_test.py tests/pynutil_test.py tests/rewrite_test.py tests/rule_cascade_test.py +tests/stringfile_test.py tests/t9_test.py tests/tagger_test.py tests/utf8_test.py diff --git a/pynini/__init__.py b/pynini/__init__.py index c21ee7e..51295a2 100644 --- a/pynini/__init__.py +++ b/pynini/__init__.py @@ -2,4 +2,4 @@ # Increment after every release. -__version__ = "2.1.5.post2" +__version__ = "2.1.6" diff --git a/pynini/__init__.pyi b/pynini/__init__.pyi index 79552e0..4d432cc 100644 --- a/pynini/__init__.pyi +++ b/pynini/__init__.pyi @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. @@ -45,20 +43,14 @@ from _pywrapfst import SortType from _pywrapfst import StateMapType from _pywrapfst import WeightLike -from typing import Type, TypeVar, Union, Tuple, Any, Optional, List, Iterable, Iterator, ContextManager, Callable +from typing import Type, TypeVar, Union, Tuple, Any, Optional, List, Literal, \ + Iterable, Iterator, ContextManager, Callable # Custom exceptions. class FstStringCompilationError(FstArgError, ValueError): ... # Custom types -# TODO(wolfsonkin): Drop version check once Python 3.8 is our minimum version. -import sys -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - _TokenTypeFlag = Literal["byte", "utf8"] CDRewriteDirection = Literal["ltr", "rtl", "sim"] CDRewriteMode = Literal["obl", "opt"] @@ -111,9 +103,6 @@ class Fst(_VectorFst): other: Union[int, Tuple[int, Union[int, ellipsis]]]) -> Fst: ... def __matmul__(self, other: FstLike) -> Fst: ... def __or__(self, other: FstLike) -> Fst: ... - # NOTE: Cython automatically generates the reversed overloads. - def __req__(self, other: FstLike) -> bool: ... - def __rne__(self, other: FstLike) -> bool: ... def __radd__(self, other: FstLike) -> Fst: ... def __rsub__(self, other: FstLike) -> Fst: ... def __rmatmul__(self, other: FstLike) -> Fst: ... @@ -222,9 +211,9 @@ def shortestdistance( queue_type: QueueType = ..., reverse: bool = ...) -> List[Weight]: ... -# # Two-argument constructive FST operations. If just one of the two FST -# # arguments has been compiled, the arc type of the compiled argument is used to -# # determine the arc type of the not-yet-compiled argument. +# Two-argument constructive FST operations. If just one of the two FST +# arguments has been compiled, the arc type of the compiled argument is used +# to determine the arc type of the not-yet-compiled argument. # NOTE: These are copy-pasta from _pywrapfst.pyx but with # `s/ifst(\d): Fst/fst\1: FstLike/` and `s/-> MutableFst/-> Fst/`. @@ -315,7 +304,10 @@ class MPdtParentheses: def __len__(self) -> int: ... def __iter__(self) -> Iterator[Tuple[_Label, _Label, _Label]]: ... def copy(self) -> MPdtParentheses: ... - def add_triple(self, push: _Label, pop: _Label, assignment: _Label) -> None: ... + def add_triple(self, + push: _Label, + pop: _Label, + assignment: _Label) -> None: ... @classmethod def read(cls, filename: _Filename) -> MPdtParentheses: ... def write(self, filename: _Filename) -> None: ... @@ -381,8 +373,7 @@ class Far: # Adds support for use as a PEP-343 context manager. def __enter__(self) -> Far: ... # TODO(wolfsonkin): Add typing to this. - # See https://github.com/python/typeshed/blob/master/stdlib/2and3/builtins.pyi#L1664 - # for more detail. + # For more details, see https://github.com/python/typeshed/blob/master/stdlib/2and3/builtins.pyi#L1664. def __exit__(self, exc, value, tb): ... ## PYTHON IMPORTS. @@ -411,7 +402,8 @@ from _pywrapfst import ACCESSIBLE from _pywrapfst import ACYCLIC from _pywrapfst import ADD_ARC_PROPERTIES from _pywrapfst import ADD_STATE_PROPERTIES -from _pywrapfst import ADD_SUPERFINAL_PROPERTIES +from _pywrapfst import \ + ADD_SUPERFINAL_PROPERTIES from _pywrapfst import ARC_SORT_PROPERTIES from _pywrapfst import BINARY_PROPERTIES from _pywrapfst import COACCESSIBLE @@ -430,7 +422,8 @@ from _pywrapfst import INITIAL_CYCLIC from _pywrapfst import INTRINSIC_PROPERTIES from _pywrapfst import I_DETERMINISTIC from _pywrapfst import I_EPSILONS -from _pywrapfst import I_LABEL_INVARIANT_PROPERTIES +from _pywrapfst import \ + I_LABEL_INVARIANT_PROPERTIES from _pywrapfst import I_LABEL_SORTED from _pywrapfst import MUTABLE from _pywrapfst import NEG_TRINARY_PROPERTIES @@ -449,10 +442,12 @@ from _pywrapfst import NO_O_EPSILONS from _pywrapfst import NULL_PROPERTIES from _pywrapfst import O_DETERMINISTIC from _pywrapfst import O_EPSILONS -from _pywrapfst import O_LABEL_INVARIANT_PROPERTIES +from _pywrapfst import \ + O_LABEL_INVARIANT_PROPERTIES from _pywrapfst import O_LABEL_SORTED from _pywrapfst import POS_TRINARY_PROPERTIES -from _pywrapfst import RM_SUPERFINAL_PROPERTIES +from _pywrapfst import \ + RM_SUPERFINAL_PROPERTIES from _pywrapfst import SET_ARC_PROPERTIES from _pywrapfst import SET_FINAL_PROPERTIES from _pywrapfst import SET_START_PROPERTIES @@ -464,7 +459,8 @@ from _pywrapfst import UNWEIGHTED from _pywrapfst import UNWEIGHTED_CYCLES from _pywrapfst import WEIGHTED from _pywrapfst import WEIGHTED_CYCLES -from _pywrapfst import WEIGHT_INVARIANT_PROPERTIES +from _pywrapfst import \ + WEIGHT_INVARIANT_PROPERTIES # Arc iterator properties. from _pywrapfst import ARC_FLAGS diff --git a/pynini/examples/case.py b/pynini/examples/case.py index b68614e..3873622 100644 --- a/pynini/examples/case.py +++ b/pynini/examples/case.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Sketch of Finnish case suffix rules. diff --git a/pynini/examples/chatspeak.py b/pynini/examples/chatspeak.py index 77bd6b9..35d952a 100644 --- a/pynini/examples/chatspeak.py +++ b/pynini/examples/chatspeak.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Grammar to handle the "channel" part of source-channel chatspeak normalizer. diff --git a/pynini/examples/chatspeak_model.py b/pynini/examples/chatspeak_model.py index 9c09e18..9a3ad1a 100644 --- a/pynini/examples/chatspeak_model.py +++ b/pynini/examples/chatspeak_model.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Combination of Chatspeak model with LM.""" diff --git a/pynini/examples/dates.py b/pynini/examples/dates.py index f1790ba..653483a 100644 --- a/pynini/examples/dates.py +++ b/pynini/examples/dates.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Grammar for extracting possible dates from running test (en_us).""" diff --git a/pynini/examples/g2p.py b/pynini/examples/g2p.py index 0b82ddb..87355b3 100644 --- a/pynini/examples/g2p.py +++ b/pynini/examples/g2p.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Sketch of Spanish grapheme-to-phoneme conversion. diff --git a/pynini/examples/numbers.py b/pynini/examples/numbers.py index d9242ce..6db8d11 100644 --- a/pynini/examples/numbers.py +++ b/pynini/examples/numbers.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Simple number name grammar for (American) English, to 10 million (exclusive). diff --git a/pynini/examples/plurals.py b/pynini/examples/plurals.py index 17cf13a..ef5f33c 100644 --- a/pynini/examples/plurals.py +++ b/pynini/examples/plurals.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Sketch of English noun plurals using priority union.""" diff --git a/pynini/examples/t9.py b/pynini/examples/t9.py index 8202d1f..168a34f 100644 --- a/pynini/examples/t9.py +++ b/pynini/examples/t9.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Simple implementation of a T9 processor. diff --git a/pynini/examples/weather.py b/pynini/examples/weather.py index b4b8f73..de4d4fe 100644 --- a/pynini/examples/weather.py +++ b/pynini/examples/weather.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Grammar for generating simple weather expressions given tabular input.""" diff --git a/pynini/export/export.py b/pynini/export/export.py index 7f0f9c8..50a646a 100644 --- a/pynini/export/export.py +++ b/pynini/export/export.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Helper classes for generating FAR files with Pynini.""" import os diff --git a/pynini/export/grm.py b/pynini/export/grm.py index 162a12b..4ae5ae0 100644 --- a/pynini/export/grm.py +++ b/pynini/export/grm.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Interface for generating a FAR file from a Pynini file. Given an output FAR file (FST archive) via --output, a Pynini file produces this @@ -43,7 +41,7 @@ def generator_main(exporter: grm.Exporter): from pynini.export import export -flags.DEFINE_string('output', None, 'The output FAR file.') +_OUTPUT = flags.DEFINE_string('output', None, 'The output FAR file.') FLAGS = flags.FLAGS # Expose this definition as `grm.Exporter`. @@ -65,7 +63,7 @@ def main(unused_argv): if unused_argv: raise app.UsageError( f'Unexpected command line arguments: {unused_argv}') - exporter = export.Exporter(FLAGS.output) + exporter = export.Exporter(_OUTPUT.value) generator_main(exporter) exporter.close() except: diff --git a/pynini/export/grm_example.py b/pynini/export/grm_example.py index 393746d..f77a317 100644 --- a/pynini/export/grm_example.py +++ b/pynini/export/grm_example.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Test pynini file using the grm.""" import pynini diff --git a/pynini/export/grm_py_build_defs.bzl b/pynini/export/grm_py_build_defs.bzl index 5c36bb5..729bf50 100644 --- a/pynini/export/grm_py_build_defs.bzl +++ b/pynini/export/grm_py_build_defs.bzl @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,17 +11,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Targets for compiling Pynini files into far files.""" load("@org_openfst//:src/extensions/far/build_defs.bzl", "convert_far_types") -def _compile_grm_py_bin_target(name, deps, data, is_multi_target): +def _compile_grm_py_bin_target(name, src, deps, data, is_multi_target): """Defines a target that builds the binary from a given Pynini file. Args: - name: The name of the Pynini file (without extension). + name: The name of the target. + src: The Pynini file input. deps: The dependencies used in the Pynini file. is_multi_target: True, if the Pynini generates multiple outputs. data: Extra data dependencies used in the Pynini file. @@ -38,7 +37,7 @@ def _compile_grm_py_bin_target(name, deps, data, is_multi_target): lib_name = "_" + name + "_lib" native.py_library( name = lib_name, - srcs = [name + ".py"], + srcs = [src], deps = deps + [ "@org_opengrm_pynini//pynini/export:%sgrm" % template_prefix, ], @@ -50,8 +49,8 @@ def _compile_grm_py_bin_target(name, deps, data, is_multi_target): bin_name = "_" + name + "_bin" native.py_binary( name = bin_name, - srcs = [name + ".py"], - main = name + ".py", + srcs = [src], + main = src, deps = [":" + lib_name], visibility = ["//visibility:private"], srcs_version = "PY3", @@ -61,6 +60,7 @@ def _compile_grm_py_bin_target(name, deps, data, is_multi_target): def compile_grm_py( name, + src = None, far_type = None, fst_type = None, deps = None, @@ -73,6 +73,7 @@ def compile_grm_py( Args: name: The BUILD rule name and the file prefix for the generated output. + src: Pynini file input. Defaults to name + ".py". far_type: An optional string specifying the FAR format. fst_type: An optional string specifying the format of the FSTs in the FAR archive. The type must be supported by @@ -83,10 +84,11 @@ def compile_grm_py( followed by ".far". **kwds: Attributes common to all BUILD rules, e.g., testonly, visibility. """ + src = src or (name + ".py") out = out or (name + ".far") if not out.endswith(".far"): fail("Output filename \"{}\" must end with \".far\".".format(out)) - bin_name = _compile_grm_py_bin_target(name, deps, data, False) + bin_name = _compile_grm_py_bin_target(name, src, deps, data, False) # Pynini produces far_type=sttable, fst_type=vector output by default. convert_far = far_type or (fst_type and fst_type != "vector") @@ -101,7 +103,7 @@ def compile_grm_py( native.genrule( name = genrule_name, - exec_tools = [bin_name], + tools = [bin_name], outs = [genrule_out], cmd = "$(location %s)" % bin_name + " --output \"$@\"", message = "Compiling Pynini file %s.py ==> %s in rule" % (name, genrule_out), @@ -121,6 +123,7 @@ def compile_grm_py( def compile_multi_grm_py( name, outs, + src = None, far_type = None, fst_type = None, deps = None, @@ -135,6 +138,7 @@ def compile_multi_grm_py( outs: A dictionary mapping designators to files, where designator is the designating name used in the Pynini file to refer to the corresponding file. The designated files must have extension ".far". + src: Pynini file input. Defaults to name + ".py". far_type: An optional string specifying the FAR format. fst_type: An optional string specifying the format of the FSTs in the FAR archives. The type must be supported by @@ -145,7 +149,8 @@ def compile_multi_grm_py( """ if not outs: fail("Must specify at least one mapping in `outs`.") - bin_name = _compile_grm_py_bin_target(name, deps, data, True) + src = src or (name + ".py") + bin_name = _compile_grm_py_bin_target(name, src, deps, data, True) # Pynini produces far_type=sttable, fst_type=vector output by default. convert_far = far_type or (fst_type and fst_type != "vector") @@ -177,7 +182,7 @@ def compile_multi_grm_py( native.genrule( name = genrule_name, - exec_tools = [bin_name], + tools = [bin_name], outs = genrule_outs, cmd = ("$(location %s)" % bin_name + " --outputs " + ",".join(genrule_outs_strings)), diff --git a/pynini/export/multi_grm.py b/pynini/export/multi_grm.py index c21abbc..cfe73dd 100644 --- a/pynini/export/multi_grm.py +++ b/pynini/export/multi_grm.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Interface for generating multiple FAR files from a Pynini file. Given a number of output FAR files (FST archive) via --output in the form @@ -45,9 +43,9 @@ def generator_main(exporter_map: multi_grm.ExporterMapping): from pynini.export import export -flags.DEFINE_string('outputs', None, - ('The output FAR files in the form ' - 'designator1=file1,designator2=file2,...')) +_OUTPUTS = flags.DEFINE_string('outputs', None, + ('The output FAR files in the form ' + 'designator1=file1,designator2=file2,...')) FLAGS = flags.FLAGS ExporterMapping = Mapping[str, export.Exporter] @@ -92,7 +90,7 @@ def main(unused_argv): if unused_argv: raise app.UsageError( f'Unexpected command line arguments: {unused_argv}') - target_file_pair = _get_target_file_map(FLAGS.outputs) + target_file_pair = _get_target_file_map(_OUTPUTS.value) if not target_file_pair: raise app.UsageError( '--outputs must specify at least one name=file pair.') diff --git a/pynini/export/multi_grm_example.py b/pynini/export/multi_grm_example.py index a66a552..a810b24 100644 --- a/pynini/export/multi_grm_example.py +++ b/pynini/export/multi_grm_example.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Test pynini file using the multi_grm.""" import pynini diff --git a/pynini/lib/byte.py b/pynini/lib/byte.py index 2c2edda..8fc0891 100644 --- a/pynini/lib/byte.py +++ b/pynini/lib/byte.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Constants for ASCII bytestrings, mirroring functionality.""" diff --git a/pynini/lib/edit_transducer.py b/pynini/lib/edit_transducer.py index b0ad2fe..5137613 100644 --- a/pynini/lib/edit_transducer.py +++ b/pynini/lib/edit_transducer.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Edit transducer classes. @@ -22,14 +20,13 @@ Here, we provide three concrete classes: -* EditTransducer: Constructs the transducer from an input alphabet and - cost matrix. Provides a protected `_create_lattice` method for lattice - construction, which may be overridden by derived classes. -* LevenshteinDistance: Also adds a method for computing - Levenshtein distance from the lattice. -* LevenshteinAutomaton: Uses the edit transducer and an - input vocabulary to construct a right-factored lexicon from which one can - compute the closest matches. +* EditTransducer: Constructs the transducer from an input alphabet and cost + matrix. +* LevenshteinDistance: Also adds a method for computing Levenshtein distance + from the lattice. +* LevenshteinAutomaton: Uses the edit transducer and an input vocabulary to + construct a right-factored lexicon from which one can compute the closest + match(es). """ from typing import Iterable, List @@ -118,7 +115,7 @@ def _right_factor(ifst: pynini.Fst) -> pynini.Fst: return ofst.relabel_pairs(ipairs=pairs) @staticmethod - def check_wellformed_lattice(lattice: pynini.Fst) -> None: + def check_lattice(lattice: pynini.Fst) -> None: """Raises an error if the lattice is empty. Args: @@ -130,8 +127,7 @@ def check_wellformed_lattice(lattice: pynini.Fst) -> None: if lattice.start() == pynini.NO_STATE_ID: raise Error("Lattice is empty") - def create_lattice(self, iexpr: pynini.FstLike, - oexpr: pynini.FstLike) -> pynini.Fst: + def lattice(self, iexpr: pynini.FstLike, oexpr: pynini.FstLike) -> pynini.Fst: """Creates edit lattice for a pair of input/output strings or acceptors. Args: @@ -142,7 +138,7 @@ def create_lattice(self, iexpr: pynini.FstLike, A lattice FST. """ lattice = (iexpr @ self._e_i) @ (self._e_o @ oexpr) - EditTransducer.check_wellformed_lattice(lattice) + EditTransducer.check_lattice(lattice) return lattice @@ -162,11 +158,11 @@ def distance(self, iexpr: pynini.FstLike, oexpr: pynini.FstLike) -> float: Returns: Minimum edit distance according to the edit transducer. """ - lattice = self.create_lattice(iexpr, oexpr) + lattice = self.lattice(iexpr, oexpr) # The shortest cost from all final states to the start state is # equivalent to the cost of the shortest path. - start = lattice.start() - return float(pynini.shortestdistance(lattice, reverse=True)[start]) + return float( + pynini.shortestdistance(lattice, reverse=True)[lattice.start()]) class LevenshteinAutomaton(LevenshteinDistance): @@ -179,6 +175,17 @@ def __init__(self, delete_cost: float = DEFAULT_DELETE_COST, substitute_cost: float = DEFAULT_SUBSTITUTE_COST, bound: int = 0): + """Constructor. + + Args: + alphabet: edit alphabet (an iterable of strings). + lexicon: lexicon (an iterable of strings). + insert_cost: the cost for the insertion operation. + delete_cost: the cost for the deletion operation. + substitute_cost: the cost for the substitution operation. + bound: the number of permissible edits, or `0` (the default) if there is + no upper bound. + """ super(LevenshteinAutomaton, self).__init__(alphabet, insert_cost, delete_cost, substitute_cost, bound) @@ -187,8 +194,7 @@ def __init__(self, self._l_o = self._e_o @ compiled_lexicon self._l_o.optimize(True) - def _create_levenshtein_automaton_lattice( - self, query: pynini.FstLike) -> pynini.Fst: + def lattice(self, query: pynini.FstLike) -> pynini.Fst: """Constructs a lattice for a query string. Args: @@ -198,7 +204,7 @@ def _create_levenshtein_automaton_lattice( A lattice FST. """ lattice = (query @ self._e_i) @ self._l_o - EditTransducer.check_wellformed_lattice(lattice) + EditTransducer.check_lattice(lattice) return lattice def closest_match(self, query: pynini.FstLike) -> str: @@ -217,7 +223,7 @@ def closest_match(self, query: pynini.FstLike) -> str: Returns: The closest string in the lexicon. """ - lattice = self._create_levenshtein_automaton_lattice(query) + lattice = self.lattice(query) return pynini.shortestpath(lattice).string() def closest_matches(self, query: pynini.FstLike) -> List[str]: @@ -235,8 +241,9 @@ def closest_matches(self, query: pynini.FstLike) -> List[str]: Returns: A list of the closest strings in the lexicon. """ - lattice = self._create_levenshtein_automaton_lattice(query) + lattice = self.lattice(query) lattice.project("output").rmepsilon() # Prunes all paths whose weights are worse than the best path. - return list(pynini.determinize(lattice, weight=0).paths().ostrings()) + lattice = pynini.determinize(lattice, weight=0) + return list(lattice.paths().ostrings()) diff --git a/pynini/lib/features.py b/pynini/lib/features.py index 620074d..0a6c026 100644 --- a/pynini/lib/features.py +++ b/pynini/lib/features.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Implementation of features mirroring functionality in Thrax.""" diff --git a/pynini/lib/paradigms.py b/pynini/lib/paradigms.py index d66b433..8baf2b7 100644 --- a/pynini/lib/paradigms.py +++ b/pynini/lib/paradigms.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. r"""Implementation of paradigms, mirroring and extending functionality in Thrax. @@ -540,3 +538,7 @@ def feature_label_encoder(self) -> pynini.Fst: def rules(self) -> Optional[List[pynini.Fst]]: return self._rules + @property + def deleter(self) -> pynini.FstLike: + return self._deleter + diff --git a/pynini/lib/pynutil.py b/pynini/lib/pynutil.py index e41aaa6..5776a5f 100644 --- a/pynini/lib/pynutil.py +++ b/pynini/lib/pynutil.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Simple utility functions. @@ -30,6 +28,21 @@ def add_weight(expr: pynini.FstLike, weight: pynini.WeightLike) -> pynini.Fst: """Attaches a weight to an automaton. + If neither expression nor weight are typed (i.e., neither has a `weight_type` + attribute), the arc and weight types of the default context ("standard" and + the associated "tropical", respectively, unless otherwise specified) are + used. + + If the expression is typed but the weight is not, the expression's weight + type is used to type the weight object to prevent weight mismatch. + + If the expression is untyped but the weight is typed, the weight types must + match the weight type of the default context ("tropical" unless otherwise + specified) or a weight mismatch exception will be thrown. + + If both the expression and the weight are typed, their weight types must + match or a weight mismatch exception will be thrown. + Args: expr: an automaton or string. weight: a weight or string. @@ -37,7 +50,16 @@ def add_weight(expr: pynini.FstLike, Returns: An FST. """ - return pynini.accep("", weight=weight).concat(expr) + if hasattr(expr, "weight_type"): + if hasattr(weight, "weight_type"): + weight_fst = weight + else: + weight_fst = pynini.accep("", arc_type=expr.arc_type(), weight=weight) + elif hasattr(weight, "weight_type"): + weight_fst = weight + else: + weight_fst = pynini.accep("", weight=weight) + return weight_fst.concat(expr) def insert(expr: pynini.FstLike, diff --git a/pynini/lib/rewrite.py b/pynini/lib/rewrite.py index 0e3563d..79f99d0 100644 --- a/pynini/lib/rewrite.py +++ b/pynini/lib/rewrite.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Rewriter functions for Pynini. diff --git a/pynini/lib/rule_cascade.py b/pynini/lib/rule_cascade.py index 2812b0a..e2c3980 100644 --- a/pynini/lib/rule_cascade.py +++ b/pynini/lib/rule_cascade.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Rule cascade object for Pynini. diff --git a/pynini/lib/stringfile.py b/pynini/lib/stringfile.py new file mode 100644 index 0000000..148d717 --- /dev/null +++ b/pynini/lib/stringfile.py @@ -0,0 +1,61 @@ +# Copyright 2016-2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Utility file for automatically generating Stringfiles for Pynini and Thrax. + +This file exposes a `stringfile.escape` function which can be used to escape a +string literal for use as a field in a stringfile as well as a +`stringfile.writeline` and `stringfile.writelines` to use in a similar way to +`csv.writer.writerow` and `csv.writer.writerows`. +""" + +from typing import IO, Iterable + +import logging + +import pynini + +_special_chars_map = str.maketrans({"#": "\\#"}) + + +def escape(string: str) -> str: + """Escapes #-comments and backslashes and square brackets for stringfiles.""" + return pynini.escape(string).translate(_special_chars_map) + + +def writeline(file: IO[str], line: Iterable[str]) -> None: + """Appends a stringfile line onto the end of an existing writable file. + + Args: + file: The file (or file-like object) to append to. + line: A string iterable of length between 1 and 3 inclusive of fields to + place into the stringfile. + """ + escaped_fields = [escape(field) for field in line] + if not 1 <= len(escaped_fields) <= 3: + logging.error("Line `%s` has unexpected number of fields, %d", + ",".join(line), len(escaped_fields)) + print("\t".join(escaped_fields), file=file) + + +def writelines(file: IO[str], lines: Iterable[Iterable[str]]) -> None: + """Appends stringfile lines onto the end of an existing writable file. + + Args: + file: The file (or file-like object) to append to. + lines: An iterable of length 1 to 3 inclusive string iterables of fields to + place into the stringfile (See `writeline`). + """ + for line in lines: + writeline(file, line) + diff --git a/pynini/lib/tagger.py b/pynini/lib/tagger.py index 58529da..5567388 100644 --- a/pynini/lib/tagger.py +++ b/pynini/lib/tagger.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. r"""Tagger automaton class. diff --git a/pynini/lib/utf8.py b/pynini/lib/utf8.py index b67e0fb..e27625a 100644 --- a/pynini/lib/utf8.py +++ b/pynini/lib/utf8.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Rules to recognise RFC3629-compliant utf8 characters at the byte level.""" diff --git a/pyproject.toml b/pyproject.toml index 5b98abe..b6031b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# Copyright 2016-2023 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ requires = ["Cython>=3.0.6", "setuptools>=32.0.0", "wheel"] [project] name = "pynini" -version = "2.1.5.post2" +version = "2.1.6" description = "Finite-state grammar compilation" readme = "README.md" requires-python = ">= 3.6" @@ -39,6 +39,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Development Status :: 5 - Production/Stable", "Environment :: Other Environment", "Environment :: Console", diff --git a/pywrapfst/__init__.pyi b/pywrapfst/__init__.pyi index 074c8d3..c6d529e 100644 --- a/pywrapfst/__init__.pyi +++ b/pywrapfst/__init__.pyi @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,14 +11,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # See www.openfst.org for extensive documentation on this weighted # finite-state transducer library. import enum import os -from typing import Optional, Union, overload, TypeVar, Tuple, Any, Type, Iterable, Iterator, List +from typing import Optional, Union, overload, TypeVar, Tuple, Any, Type, Iterable, Iterator, List, Literal ## Custom exceptions. class FstError(Exception): ... @@ -36,14 +34,6 @@ _StateId = int _ArcIteratorPropertiesType = int _EncodeMapperPropertiesType = int - -# TODO(wolfsonkin): Drop version check once Python 3.8 is our minimum version. -import sys -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - ArcMapType = Literal["identity", "input_epsilon", "invert", "output_epsilon", "plus", "power", "quantize", "rmweight", "superfinal", "times", "to_log", @@ -71,7 +61,7 @@ ProjectType = Literal["input", "output"] QueueType = Literal["auto", "fifo", "lifo", "shortest", "state", "top"] RandArcSelection = Literal["uniform", "log_prob", "fast_log_prob"] ReplaceLabelType = Literal["neither", "input", "output", "both"] -ReweightType = Literal["to_inital", "to_final"] +ReweightType = Literal["to_initial", "to_final"] SortType = Literal["ilabel", "olabel"] StateMapType = Literal["arc_sum", "arc_unique", "identity"] @@ -122,7 +112,10 @@ class SymbolTableView: def name(self) -> str: ... def num_symbols(self) -> int: ... def write(self, source: _Filename) -> None: ... - def write_text(self, source: _Filename) -> None: ... + def write_text(self, + source: _Filename, + *, + sep: str = ...) -> None: ... def write_to_string(self) -> bytes: ... class _EncodeMapperSymbolTableView(SymbolTableView): @@ -147,7 +140,8 @@ class SymbolTable(_MutableSymbolTable): @classmethod def read_text(cls, source: _Filename, - allow_negative_labels: bool = ...) -> SymbolTable: ... + *, + sep: str = ...) -> SymbolTable: ... @classmethod def read_fst(cls, source: _Filename, input_table: bool) -> SymbolTable: ... diff --git a/setup.py b/setup.py index 351aa64..3804ff3 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2016-2023 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ ] if sys.platform.startswith("darwin"): COMPILE_ARGS.append("-stdlib=libc++") - COMPILE_ARGS.append("-mmacosx-version-min=10.7") + COMPILE_ARGS.append("-mmacosx-version-min=10.12") LIBRARIES = ["fstfarscript", "fstfar", "fstscript", "fst", "m", "dl"] @@ -114,6 +114,8 @@ def main() -> None: "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Development Status :: 5 - Production/Stable", "Environment :: Other Environment", "Environment :: Console", diff --git a/tests/byte_test.py b/tests/byte_test.py index 73c0170..f6e35e0 100644 --- a/tests/byte_test.py +++ b/tests/byte_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for byte.py.""" diff --git a/tests/case_test.py b/tests/case_test.py index f2508e8..e8bf68f 100644 --- a/tests/case_test.py +++ b/tests/case_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests of Finnish case suffixes.""" diff --git a/tests/chatspeak_model_test.py b/tests/chatspeak_model_test.py index cbdef93..a369966 100644 --- a/tests/chatspeak_model_test.py +++ b/tests/chatspeak_model_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for the chatspeak model in combination with the LM.""" diff --git a/tests/chatspeak_test.py b/tests/chatspeak_test.py index f38f1bb..e47a0ba 100644 --- a/tests/chatspeak_test.py +++ b/tests/chatspeak_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for the chatspeak model.""" diff --git a/tests/dates_test.py b/tests/dates_test.py index 9fcaff3..cbb2858 100644 --- a/tests/dates_test.py +++ b/tests/dates_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for the Date extractor.""" diff --git a/tests/edit_transducer_test.py b/tests/edit_transducer_test.py index 09943fa..93c7acd 100644 --- a/tests/edit_transducer_test.py +++ b/tests/edit_transducer_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests edit transducer classes (specifically, the Levenshtein automaton).""" diff --git a/tests/export_test.py b/tests/export_test.py index bf9ff72..dccd2a8 100644 --- a/tests/export_test.py +++ b/tests/export_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Tests for exporter.""" import os diff --git a/tests/features_test.py b/tests/features_test.py index aaf9a62..f6ee86e 100644 --- a/tests/features_test.py +++ b/tests/features_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for Features, Categories and FeatureVectors.""" diff --git a/tests/g2p_test.py b/tests/g2p_test.py index 5d3924a..d13c591 100644 --- a/tests/g2p_test.py +++ b/tests/g2p_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests of Spanish g2p rules.""" diff --git a/tests/grm_test.py b/tests/grm_test.py index f8bfaff..f69af7f 100644 --- a/tests/grm_test.py +++ b/tests/grm_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Tests for grm.""" import os diff --git a/tests/multi_grm_test.py b/tests/multi_grm_test.py index 0449e9d..028dead 100644 --- a/tests/multi_grm_test.py +++ b/tests/multi_grm_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - """Tests for multi_grm.""" import os diff --git a/tests/numbers_test.py b/tests/numbers_test.py index 6220875..2452c43 100644 --- a/tests/numbers_test.py +++ b/tests/numbers_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests of (American) English number names.""" diff --git a/tests/paradigms_test.py b/tests/paradigms_test.py index 4852f36..1a6e840 100644 --- a/tests/paradigms_test.py +++ b/tests/paradigms_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for Paradigms.""" diff --git a/tests/plurals_test.py b/tests/plurals_test.py index 554ab24..72c0791 100644 --- a/tests/plurals_test.py +++ b/tests/plurals_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests of English plurals.""" diff --git a/tests/pynini_test.py b/tests/pynini_test.py index b7c5e04..654f092 100644 --- a/tests/pynini_test.py +++ b/tests/pynini_test.py @@ -25,9 +25,7 @@ import tempfile import unittest -# This module is designed to be import-safe. -from pynini import * - +import pynini import pywrapfst SEED = 212 @@ -37,10 +35,10 @@ class CDRewriteTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.sigstar = union(*string.ascii_letters) + cls.sigstar = pynini.union(*string.ascii_letters) cls.sigstar.closure() cls.sigstar.optimize() - cls.coronal = union("L", "N", "R", "T", "D") + cls.coronal = pynini.union("L", "N", "R", "T", "D") # Non-static helper. def TestRule(self, rule, istring, ostring): @@ -48,27 +46,32 @@ def TestRule(self, rule, istring, ostring): # A -> B / C __ D. def testAGoesToBInTheContextOfCAndD(self): - a_to_b = cdrewrite(cross("A", "B"), "C", "D", self.sigstar) + a_to_b = pynini.cdrewrite(pynini.cross("A", "B"), "C", "D", self.sigstar) self.TestRule(a_to_b, "CADCAD", "CBDCBD") # A -> B / C __ #. def testAGoesToBInTheContextOfCAndHash(self): - a_to_b = cdrewrite(cross("A", "B"), "C", "[EOS]", self.sigstar) + a_to_b = pynini.cdrewrite( + pynini.cross("A", "B"), "C", "[EOS]", self.sigstar + ) self.TestRule(a_to_b, "CA", "CB") self.TestRule(a_to_b, "CAB", "CAB") # Pre-Latin rhotacism: # s > r / V __ V. def testRhotacism(self): - vowel = union("A", "E", "I", "O", "V") - rhotacism = cdrewrite(cross("S", "R"), vowel, vowel, self.sigstar) + vowel = pynini.union("A", "E", "I", "O", "V") + rhotacism = pynini.cdrewrite( + pynini.cross("S", "R"), vowel, vowel, self.sigstar + ) self.TestRule(rhotacism, "LASES", "LARES") # Classical-Latin "Pre-s deletion": # [+cor] -> 0 / __ [+str] (condition: LTR) def testPreSDeletion(self): - pre_s_deletion = cdrewrite( - cross(self.coronal, ""), "", "S[EOS]", self.sigstar) + pre_s_deletion = pynini.cdrewrite( + pynini.cross(self.coronal, ""), "", "S[EOS]", self.sigstar + ) pre_s_deletion.optimize() self.TestRule(pre_s_deletion, "CONCORDS", "CONCORS") self.TestRule(pre_s_deletion, "PVLTS", "PVLS") # cf. gen.sg. PVLTIS @@ -78,53 +81,71 @@ def testPreSDeletion(self): # The same, but incorrectly applied RTL. def testPreSDeletionRTL(self): - pre_s_deletion_wrong = cdrewrite( - cross(self.coronal, ""), "", "S[EOS]", self.sigstar, direction="rtl") + pre_s_deletion_wrong = pynini.cdrewrite( + pynini.cross(self.coronal, ""), + "", + "S[EOS]", + self.sigstar, + direction="rtl", + ) # Should be CONCORS. self.TestRule(pre_s_deletion_wrong, "CONCORDS", "CONCOS") # Prothesis in loanwords in Hindi (informally): # 0 -> i / # __ [+str] [-cor, +con] def testProthesis(self): - non_coronal_consonant = union("M", "P", "B", "K", "G") - prothesis = cdrewrite( - cross("", "I"), "[BOS]", "S" + non_coronal_consonant, self.sigstar) + non_coronal_consonant = pynini.union("M", "P", "B", "K", "G") + prothesis = pynini.cdrewrite( + pynini.cross("", "I"), + "[BOS]", + "S" + non_coronal_consonant, + self.sigstar, + ) self.TestRule(prothesis, "SKUUL", "ISKUUL") # "school" # TD-deletion in English: # [+cor, +obst, -cont] -> 0 / [+cons] __ # (conditions: LTR, optional) def testTDDeletion(self): - cons = union("M", "P", "B", "F", "V", "N", "S", "Z", "T", "D", "L", "K", - "G") # etc. - td_deletion = cdrewrite( - cross(union("T", "D"), ""), + cons = pynini.union( + "M", "P", "B", "F", "V", "N", "S", "Z", "T", "D", "L", "K", "G" + ) + td_deletion = pynini.cdrewrite( + pynini.cross(pynini.union("T", "D"), ""), cons, "[EOS]", self.sigstar, direction="ltr", - mode="opt") + mode="opt", + ) # Asserts that both are possible. self.assertEqual( - optimize(project("FIST" @ td_deletion, "output")), - optimize(union("FIS", "FIST"))) + pynini.project("FIST" @ td_deletion, "output").optimize(), + pynini.union("FIS", "FIST").optimize(), + ) def testLambdaTransducerRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = cdrewrite(cross("A", "B"), cross("C", "D"), "E", self.sigstar) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.cdrewrite( + pynini.cross("A", "B"), pynini.cross("C", "D"), "E", self.sigstar + ) def testRhoTransducerRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = cdrewrite(cross("A", "B"), "C", cross("D", "E"), self.sigstar) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.cdrewrite( + pynini.cross("A", "B"), "C", pynini.cross("D", "E"), self.sigstar + ) def testWeightedLambdaRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = cdrewrite( - cross("A", "B"), accep("C", weight=2), "D", self.sigstar) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.cdrewrite( + pynini.cross("A", "B"), pynini.accep("C", weight=2), "D", self.sigstar + ) def testWeightedRhoRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = cdrewrite( - cross("A", "B"), "C", accep("D", weight=2), self.sigstar) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.cdrewrite( + pynini.cross("A", "B"), "C", pynini.accep("D", weight=2), self.sigstar + ) class ClosureTest(unittest.TestCase): @@ -133,24 +154,41 @@ def testRangeClosure(self): m = 3 n = 7 cheese = "Red Windsor" - ac = accep(cheese) + ac = pynini.accep(cheese) ac.closure(m, n) # Doesn't accept <3 copies. for i in range(m): - self.assertEqual(compose(ac, cheese * i).num_states(), 0) + self.assertEqual(pynini.compose(ac, cheese * i).num_states(), 0) # Accepts between 3-7 copies. for i in range(m, n + 1): - self.assertNotEqual(compose(ac, cheese * i).num_states(), 0) + self.assertNotEqual(pynini.compose(ac, cheese * i).num_states(), 0) # Doesn't accept more than 7 copies. - self.assertEqual(compose(ac, cheese * (n + 1)).num_states(), 0) + self.assertEqual(pynini.compose(ac, cheese * (n + 1)).num_states(), 0) + + +class CrossTest(unittest.TestCase): + + def testPrecompiledLogCrossProduct(self): + upper = pynini.accep("Smoked Austrian", arc_type="log") + lower = pynini.accep("No", arc_type="log") + tr = pynini.cross(upper, lower) + self.assertEqual(tr.arc_type(), "log") + + def testImplicitLeftLogCrossProducts(self): + tr = pynini.cross("Smoked Austrian", pynini.accep("No", arc_type="log")) + self.assertEqual(tr.arc_type(), "log") + + def testImplicitRightLogCrossProducts(self): + tr = pynini.cross(pynini.accep("Smoked Austrian", arc_type="log"), "No") + self.assertEqual(tr.arc_type(), "log") class DifferenceTest(unittest.TestCase): def testDifferenceWithUnion(self): - ab = union("a", "b") - abc = union(ab, "c") - self.assertEqual(difference(abc, ab).optimize(), "c") + ab = pynini.union("a", "b") + abc = pynini.union(ab, "c") + self.assertEqual(pynini.difference(abc, ab).optimize(), "c") class DowncastTest(unittest.TestCase): @@ -165,11 +203,11 @@ def setUpClass(cls): def testDowncastTypesAreCorrect(self): self.assertIsInstance(self.f, pywrapfst.VectorFst) - f_downcast = Fst.from_pywrapfst(self.f) - self.assertIsInstance(f_downcast, Fst) + f_downcast = pynini.Fst.from_pywrapfst(self.f) + self.assertIsInstance(f_downcast, pynini.Fst) def testDowncastedMutationTriggersDeepCopy(self): - f_downcast = Fst.from_pywrapfst(self.f) + f_downcast = pynini.Fst.from_pywrapfst(self.f) f_downcast.delete_states() self.assertEqual(f_downcast.num_states(), 0) self.assertNotEqual(self.f.num_states(), 0) @@ -179,10 +217,10 @@ class EqualTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.f = accep("Danish Blue") + cls.f = pynini.accep("Danish Blue") def testEqual(self): - self.assertTrue(equal(self.f, self.f.copy())) + self.assertTrue(pynini.equal(self.f, self.f.copy())) def testEqualOperator(self): self.assertTrue(self.f == self.f.copy()) @@ -195,9 +233,9 @@ class ExceptionsTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.exchange = cross("Liptauer", "No") - cls.f = Fst() - cls.s = SymbolTable() + cls.exchange = pynini.cross("Liptauer", "No") + cls.f = pynini.Fst() + cls.s = pynini.SymbolTable() cls.map_file = "tests/testdata/str.map" def testBadDestinationIndexAddArcDoesNotRaiseFstIndexError(self): @@ -205,137 +243,141 @@ def testBadDestinationIndexAddArcDoesNotRaiseFstIndexError(self): s = f.add_state() f.set_start(s) f.set_final(s) - f.add_arc(s, Arc(0, 0, 0, -1)) + f.add_arc(s, pynini.Arc(0, 0, 0, -1)) self.assertFalse(f.verify()) def testBadIndexFinalRaisesFstIndexError(self): - with self.assertRaises(FstIndexError): + with self.assertRaises(pynini.FstIndexError): unused_weight = self.f.final(-1) def testBadIndexNumArcsRaisesFstIndexError(self): - with self.assertRaises(FstIndexError): + with self.assertRaises(pynini.FstIndexError): unused_n = self.f.num_arcs(-1) def testBadIndexNumInputEpsilonsRaisesFstIndexError(self): - with self.assertRaises(FstIndexError): + with self.assertRaises(pynini.FstIndexError): unused_n = self.f.num_input_epsilons(-1) def testBadIndexNumOutputEpsilonsRaisesFstIndexError(self): - with self.assertRaises(FstIndexError): + with self.assertRaises(pynini.FstIndexError): unused_n = self.f.num_output_epsilons(-1) def testBadIndexDeleteArcsRaisesFstIndexError(self): f = self.f.copy() - with self.assertRaises(FstIndexError): + with self.assertRaises(pynini.FstIndexError): f.delete_arcs(-1) def testBadIndicesDeleteStatesRaisesFstIndexError(self): f = self.f.copy() - with self.assertRaises(FstIndexError): - f.delete_states((-1, -2)) + with self.assertRaises(pynini.FstIndexError): + f.delete_states([-1, -2]) def testBadSourceIndexAddArcRaisesFstIndexError(self): f = self.f.copy() - with self.assertRaises(FstIndexError): - f.add_arc(-1, Arc(0, 0, 0, 0)) + with self.assertRaises(pynini.FstIndexError): + f.add_arc(-1, pynini.Arc(0, 0, 0, 0)) def testGarbageComposeFilterComposeRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = compose(self.f, self.f, compose_filter="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.compose(self.f, self.f, compose_filter="nonexistent") def testGarbageComposeFilterDifferenceRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = difference(self.f, self.f, compose_filter="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.difference(self.f, self.f, compose_filter="nonexistent") def testGarbageQueueTypeRmepsilonRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = rmepsilon(self.f, queue_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.rmepsilon(self.f, queue_type="nonexistent") def testGarbageQueueTypeShortestDistanceRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_sd = shortestdistance(self.f, queue_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_sd = pynini.shortestdistance(self.f, queue_type="nonexistent") def testGarbageQueueTypeShortestPathRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = shortestpath(self.f, queue_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.shortestpath(self.f, queue_type="nonexistent") def testGarbageSelectTypeRandgenRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = randgen(self.f, select="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.randgen(self.f, select="nonexistent") def testGarbageInputTokenTypeStringFileRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = string_file(self.map_file, input_token_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.string_file( + self.map_file, input_token_type="nonexistent" + ) def testGarbageOutputTokenTypeStringFileRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = string_file(self.map_file, output_token_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.string_file( + self.map_file, output_token_type="nonexistent" + ) def testNonexistentStringFileRaisesFstIOError(self): - with self.assertRaises(FstIOError): - unused_f = string_file("nonexistent") + with self.assertRaises(pynini.FstIOError): + unused_f = pynini.string_file("nonexistent") def testGarbageInputTokenTypeStringMapRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = string_map([], input_token_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.string_map([], input_token_type="nonexistent") def testGarbageOutputTokenTypeStringMapRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_f = string_map([], output_token_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_f = pynini.string_map([], output_token_type="nonexistent") def testGarbageInputTokenTypeStringPathIteratorRaisesFstArgError(self): - with self.assertRaises(FstArgError): + with self.assertRaises(pynini.FstArgError): unused_sp = self.f.paths(input_token_type="nonexistent") def testGarbageOutputTokenTypeStringPathIteratorRaisesFstArgError(self): - with self.assertRaises(FstArgError): + with self.assertRaises(pynini.FstArgError): unused_sp = self.f.paths(output_token_type="nonexistent") def testTransducerDifferenceRaisesFstArgError(self): - with self.assertRaises(FstOpError): - unused_f = difference(self.exchange, self.exchange) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.difference(self.exchange, self.exchange) def testWrongWeightTypeAddArcRaisesFstOpError(self): f = self.f.copy() s = f.add_state() f.set_start(s) f.set_final(s) - with self.assertRaises(FstOpError): - f.add_arc(s, Arc(0, 0, Weight.one("log"), 0)) + with self.assertRaises(pynini.FstOpError): + f.add_arc(s, pynini.Arc(0, 0, pynini.Weight.one("log"), 0)) def testWrongWeightTypeDeterminizeRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = determinize(self.f, weight=Weight.one("log")) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.determinize(self.f, weight=pynini.Weight.one("log")) def testWrongWeightTypeDisambiguateRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = disambiguate(self.f, weight=Weight.one("log")) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.disambiguate(self.f, weight=pynini.Weight.one("log")) def testWrongWeightTypePruneRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = prune(self.f, weight=Weight.one("log")) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.prune(self.f, weight=pynini.Weight.one("log")) def testWrongWeightTypeRmepsilonRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_f = rmepsilon(self.f, weight=Weight.one("log")) + with self.assertRaises(pynini.FstOpError): + unused_f = pynini.rmepsilon(self.f, weight=pynini.Weight.one("log")) def testWrongWeightTypeSetFinalRaisesFstOpError(self): f = self.f.copy() s = f.add_state() f.set_start(s) - with self.assertRaises(FstOpError): - f.set_final(s, Weight.one("log")) + with self.assertRaises(pynini.FstOpError): + f.set_final(s, pynini.Weight.one("log")) def testGarbageWeightTypeRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_w = Weight("nonexistent", 1) + with self.assertRaises(pynini.FstArgError): + unused_w = pynini.Weight("nonexistent", 1) class GeneratedSymbolsTest(unittest.TestCase): def testBosIndex(self): bos_index = 0xF8FE # Defined in stringcompile.h. - f = accep("[BOS]") + f = pynini.accep("[BOS]") aiter = f.arcs(f.start()) self.assertFalse(aiter.done()) arc = aiter.value() @@ -346,7 +388,7 @@ def testBosIndex(self): def testEosIndex(self): eos_index = 0xF8FF # Defined in stringcompile.h. - f = accep("[EOS]") + f = pynini.accep("[EOS]") aiter = f.arcs(f.start()) arc = aiter.value() self.assertEqual(eos_index, arc.ilabel) @@ -356,8 +398,8 @@ def testEosIndex(self): def testGeneratedSymbols(self): cheese = "Parmesan" - unused_f = accep(f"[{cheese}]") - syms = generated_symbols() + unused_f = pynini.accep(f"[{cheese}]") + syms = pynini.generated_symbols() self.assertTrue(syms.member(cheese)) @@ -365,7 +407,7 @@ class IOTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.f = Fst() + cls.f = pynini.Fst() # Non-static helper. def TestFstAndTypeEquality(self, g): @@ -376,18 +418,18 @@ def testFileIO(self): tmp = os.path.join(tempfile.gettempdir(), "tmp.fst") self.f.write(tmp) try: - g = Fst.read(tmp) + g = pynini.Fst.read(tmp) self.TestFstAndTypeEquality(g) finally: os.remove(tmp) def testGarbageReadRaisesFstIOError(self): - with self.assertRaises(FstIOError): - unused_f = Fst.read("nonexistent") + with self.assertRaises(pynini.FstIOError): + unused_f = pynini.Fst.read("nonexistent") def testStringIO(self): sink = self.f.write_to_string() - g = Fst.read_from_string(sink) + g = pynini.Fst.read_from_string(sink) self.TestFstAndTypeEquality(g) def testPickleIO(self): @@ -399,29 +441,43 @@ class LenientlyComposeTest(unittest.TestCase): @classmethod def setUpClass(cls): - cls.sigstar = union(*string.ascii_letters + " ").closure().optimize() - cls.cheese_geography = string_map( - (("Red Leicester", "England"), ("Tilsit", "Russia"), ("Caerphilly", - "Wales"), - ("Bel Paese", "Italy"), ("Red Windsor", "England"), ("Stilton", - "England"), - ("Emmental", "Switzerland"), ("Norwegian Jarlsberg", "Norway"), - ("Liptauer", "Germany"), ("Lancashire", "England"), ("White Stilton", - "England"), - ("Danish Blue", "Denmark"), ("Double Gloucester", "England"), - ("Cheshire", "England"), ("Dorset Blue Vinney", "England"), - ("Brie", "France"), ("Roquefort", "France"), ("Port Salut", "France"))) + cls.sigstar = pynini.union(*string.ascii_letters + " ").closure().optimize() + cls.cheese_geography = pynini.string_map(( + ("Red Leicester", "England"), + ("Tilsit", "Russia"), + ("Caerphilly", "Wales"), + ("Bel Paese", "Italy"), + ("Red Windsor", "England"), + ("Stilton", "England"), + ("Emmental", "Switzerland"), + ("Norwegian Jarlsberg", "Norway"), + ("Liptauer", "Germany"), + ("Lancashire", "England"), + ("White Stilton", "England"), + ("Danish Blue", "Denmark"), + ("Double Gloucester", "England"), + ("Cheshire", "England"), + ("Dorset Blue Vinney", "England"), + ("Brie", "France"), + ("Roquefort", "France"), + ("Port Salut", "France"), + )) def testLenientCompositionOfOutOfDomainStringWithTransducerIsIdentity(self): cheese = "Wisconsin Cheddar" self.assertEqual( - leniently_compose(cheese, self.cheese_geography, self.sigstar), cheese) + pynini.leniently_compose(cheese, self.cheese_geography, self.sigstar), + cheese, + ) def testLenientCompositionOfInDomainStringWithTransducerIsTransduced(self): cheese = "Lancashire" self.assertEqual( - leniently_compose(cheese, self.cheese_geography, - self.sigstar).project("output").optimize(), "England") + pynini.leniently_compose(cheese, self.cheese_geography, self.sigstar) + .project("output") + .optimize(), + "England", + ) class StringTest(unittest.TestCase): @@ -433,151 +489,170 @@ def setUpClass(cls): cls.reply = "I'm afraid we're fresh out of Red Leicester sir" cls.imported_cheese = "Pont l'Evêque" cls.accep_props = ( - ACCEPTOR | I_DETERMINISTIC | O_DETERMINISTIC | I_LABEL_SORTED - | O_LABEL_SORTED | UNWEIGHTED | ACYCLIC | INITIAL_ACYCLIC | TOP_SORTED - | ACCESSIBLE | COACCESSIBLE | STRING | UNWEIGHTED_CYCLES) + pynini.ACCEPTOR + | pynini.I_DETERMINISTIC + | pynini.O_DETERMINISTIC + | pynini.I_LABEL_SORTED + | pynini.O_LABEL_SORTED + | pynini.UNWEIGHTED + | pynini.ACYCLIC + | pynini.INITIAL_ACYCLIC + | pynini.TOP_SORTED + | pynini.ACCESSIBLE + | pynini.COACCESSIBLE + | pynini.STRING + | pynini.UNWEIGHTED_CYCLES + ) def testUnbracketedBytestringUnweightedAcceptorCompilation(self): - cheese = accep(self.cheese) + cheese = pynini.accep(self.cheese) self.assertEqual(cheese, self.cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testUnbracketedBytestringUnweightedTransducerCompilation(self): - exchange = cross(self.cheese, self.reply) + exchange = pynini.cross(self.cheese, self.reply) exchange.project("input") exchange.rmepsilon() self.assertEqual(exchange, self.cheese) def testUnbracketedBytestringWeightedAcceptorCompilation(self): - cheese = accep(self.cheese, weight=Weight.one("tropical")) + cheese = pynini.accep(self.cheese, weight=pynini.Weight.one("tropical")) self.assertEqual(cheese, self.cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testUnbracketedBytestringWeightedTransducerCompilation(self): - exchange = cross(self.cheese, self.reply) + exchange = pynini.cross(self.cheese, self.reply) exchange.project("input") exchange.rmepsilon() self.assertEqual(exchange, self.cheese) def testUnbracketedBytestringCastingWeightedAcceptorCompilation(self): - cheese = accep(self.cheese, weight=0) + cheese = pynini.accep(self.cheese, weight=0) self.assertEqual(cheese, self.cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testBracketedCharsBytestringAcceptorCompilation(self): - cheese = accep("".join("[{:d}]".format(ord(ch)) for ch in self.cheese)) + cheese = pynini.accep( + "".join("[{:d}]".format(ord(ch)) for ch in self.cheese) + ) self.assertEqual(cheese, self.cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testUnicodeBytestringAcceptorCompilation(self): - cheese = accep(self.imported_cheese) + cheese = pynini.accep(self.imported_cheese) self.assertEqual(cheese, self.imported_cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testAsciiUtf8AcceptorCompilation(self): - cheese = accep(self.cheese, token_type="utf8") + cheese = pynini.accep(self.cheese, token_type="utf8") self.assertEqual(cheese, self.cheese) self.assertEqual( cheese.properties(self.accep_props, True), self.accep_props) def testEscapedBracketsBytestringAcceptorCompilation(self): - ac = accep(r"[\[Camembert\] is a]\[cheese\]") + ac = pynini.accep(r"[\[Camembert\] is a]\[cheese\]") # Should have 3 states accepting generated symbols, 8 accepting a byte, # and 1 final state. self.assertEqual(ac.num_states(), 12) def testGarbageWeightAcceptorRaisesFstBadWeightError(self): - with self.assertRaises(FstBadWeightError): - unused_ac = accep(self.cheese, weight="nonexistent") + with self.assertRaises(pynini.FstBadWeightError): + unused_ac = pynini.accep(self.cheese, weight="nonexistent") def testGarbageArcTypeAcceptorRaisesFstArgError(self): - with self.assertRaises(FstArgError): - unused_ac = accep(self.cheese, arc_type="nonexistent") + with self.assertRaises(pynini.FstArgError): + unused_ac = pynini.accep(self.cheese, arc_type="nonexistent") def testUnbalancedBracketsAcceptorRaisesFstStringCompilationError(self): - with self.assertRaises(FstStringCompilationError): - unused_ac = accep(self.cheese + "]") + with self.assertRaises(pynini.FstStringCompilationError): + unused_ac = pynini.accep(self.cheese + "]") def testUnbalancedBracketsTransducerRaisesFstStringCompilationError(self): - with self.assertRaises(FstStringCompilationError): - unused_tr = cross(self.cheese, "[" + self.reply) + with self.assertRaises(pynini.FstStringCompilationError): + unused_tr = pynini.cross(self.cheese, "[" + self.reply) def testCrossProductTransducerCompilation(self): - cheese = accep(self.cheese) - reply = accep(self.reply) - exchange = cross(cheese, reply) + cheese = pynini.accep(self.cheese) + reply = pynini.accep(self.reply) + exchange = pynini.cross(cheese, reply) exchange.project("input") exchange.rmepsilon() self.assertEqual(exchange, self.cheese) def testAsciiByteStringify(self): - self.assertEqual(accep(self.cheese).string(), self.cheese) + self.assertEqual(pynini.accep(self.cheese).string(), self.cheese) def testAsciiUtf8Stringify(self): self.assertEqual( - accep(self.cheese, token_type="utf8").string("utf8"), self.cheese) + pynini.accep(self.cheese, token_type="utf8").string("utf8"), self.cheese + ) def testUtf8ByteStringify(self): self.assertEqual( - accep(self.imported_cheese).string(), self.imported_cheese) + pynini.accep(self.imported_cheese).string(), self.imported_cheese + ) def testAsciiByteStringifyAfterSymbolTableDeletion(self): - ac = accep(self.cheese) + ac = pynini.accep(self.cheese) ac.set_output_symbols(None) self.assertEqual(ac.string(), self.cheese) def testUtf8Utf8Stringify(self): self.assertEqual( - accep(self.imported_cheese, token_type="utf8").string("utf8"), - self.imported_cheese) + pynini.accep(self.imported_cheese, token_type="utf8").string("utf8"), + self.imported_cheese, + ) def testUnicodeByteStringify(self): self.assertEqual( - accep(self.imported_cheese).string(), self.imported_cheese) + pynini.accep(self.imported_cheese).string(), self.imported_cheese + ) def testUnicodeUtf8Stringify(self): self.assertEqual( - accep(self.imported_cheese, token_type="utf8").string("utf8"), - self.imported_cheese) + pynini.accep(self.imported_cheese, token_type="utf8").string("utf8"), + self.imported_cheese, + ) def testUtf8StringifyAfterSymbolTableDeletion(self): - ac = accep(self.imported_cheese, token_type="utf8") + ac = pynini.accep(self.imported_cheese, token_type="utf8") ac.set_output_symbols(None) self.assertEqual(ac.string("utf8"), self.imported_cheese) def testStringifyOnNonkStringFstRaisesFstOpError(self): - with self.assertRaises(FstOpError): - unused_ac = union(self.cheese, self.imported_cheese).string() + with self.assertRaises(pynini.FstOpError): + unused_ac = pynini.union(self.cheese, self.imported_cheese).string() def testCompositionOfStringAndLogArcWorks(self): cheese = "Greek Feta" - self.assertEqual(cheese @ accep(cheese, arc_type="log"), cheese) + self.assertEqual(cheese @ pynini.accep(cheese, arc_type="log"), cheese) def testCompositionOfLogArcAndStringWorks(self): cheese = "Tilsit" - self.assertEqual(accep(cheese, arc_type="log") @ cheese, cheese) + self.assertEqual(pynini.accep(cheese, arc_type="log") @ cheese, cheese) def testCompositionOfStringAndLog64ArcWorks(self): cheese = "Greek Feta" - self.assertEqual(cheese @ accep(cheese, arc_type="log64"), cheese) + self.assertEqual(cheese @ pynini.accep(cheese, arc_type="log64"), cheese) def testCompositionOfLog64ArcAndStringWorks(self): cheese = "Tilsit" - self.assertEqual(accep(cheese, arc_type="log64") @ cheese, cheese) + self.assertEqual(pynini.accep(cheese, arc_type="log64") @ cheese, cheese) - def testLogWeightToStandardAcceptorRaisesFstStringCompilationError(self): - with self.assertRaises(FstOpError): - unused_ac = accep("Sage Derby", weight=Weight.one("log")) + def testLogWeightToStandardAcceptorRaisesFstOpError(self): + with self.assertRaises(pynini.FstOpError): + unused_ac = pynini.accep("Sage Derby", weight=pynini.Weight.one("log")) - def testLog64WeightToLogAcceptorRaisesFstStringCompilationError(self): - with self.assertRaises(FstOpError): - unused_ac = accep( - "Wensleydale", arc_type="log", weight=Weight.one("log64")) + def testLog64WeightToLogAcceptorRaisesFstOpError(self): + with self.assertRaises(pynini.FstOpError): + unused_ac = pynini.accep( + "Wensleydale", arc_type="log", weight=pynini.Weight.one("log64") + ) class StringFileTest(unittest.TestCase): @@ -588,42 +663,43 @@ def setUpClass(cls): cls.map_file = "tests/testdata/str.map" def ContainsMapping(self, istring, mapper, ostring): - lattice = compose(istring, mapper, compose_filter="alt_sequence") + lattice = pynini.compose(istring, mapper, compose_filter="alt_sequence") lattice.project("output").rmepsilon().arcsort("olabel") - lattice = compose(mapper, ostring, compose_filter="sequence") - self.assertNotEqual(lattice.start(), NO_STATE_ID) + lattice = pynini.compose(mapper, ostring, compose_filter="sequence") + self.assertNotEqual(lattice.start(), pynini.NO_STATE_ID) def testByteToByteStringFile(self): - mapper = string_file(self.map_file) + mapper = pynini.string_file(self.map_file) self.ContainsMapping("[Bel Paese]", mapper, "Sorry") self.ContainsMapping("Cheddar", mapper, "Cheddar") self.ContainsMapping("Caithness", mapper, "Pont-l'Évêque") self.ContainsMapping("Pont-l'Évêque", mapper, "Camembert") def testByteToUtf8StringFile(self): - utf8 = functools.partial(accep, token_type="utf8") - mapper = string_file(self.map_file, output_token_type="utf8") + utf8 = functools.partial(pynini.accep, token_type="utf8") + mapper = pynini.string_file(self.map_file, output_token_type="utf8") self.ContainsMapping("[Bel Paese]", mapper, utf8("Sorry")) self.ContainsMapping("Cheddar", mapper, utf8("Cheddar")) self.ContainsMapping("Caithness", mapper, utf8("Pont-l'Évêque")) self.ContainsMapping("Pont-l'Évêque", mapper, utf8("Camembert")) def testUtf8ToUtf8StringFile(self): - utf8 = functools.partial(accep, token_type="utf8") - mapper = string_file( - self.map_file, input_token_type="utf8", output_token_type="utf8") + utf8 = functools.partial(pynini.accep, token_type="utf8") + mapper = pynini.string_file( + self.map_file, input_token_type="utf8", output_token_type="utf8" + ) self.ContainsMapping(utf8("[Bel Paese]"), mapper, utf8("Sorry")) self.ContainsMapping(utf8("Pont-l'Évêque"), mapper, utf8("Camembert")) def testByteToSymbolStringFile(self): - syms = SymbolTable() + syms = pynini.SymbolTable() syms.add_symbol("") syms.add_symbol("Sorry") syms.add_symbol("Cheddar") syms.add_symbol("Pont-l'Évêque") syms.add_symbol("Camembert") - mapper = string_file(self.map_file, output_token_type=syms) - symc = functools.partial(accep, token_type=syms) + mapper = pynini.string_file(self.map_file, output_token_type=syms) + symc = functools.partial(pynini.accep, token_type=syms) self.ContainsMapping("[Bel Paese]", mapper, symc("Sorry")) self.ContainsMapping("Pont-l'Évêque", mapper, symc("Camembert")) @@ -638,42 +714,43 @@ def setUpClass(cls): ("Pont-l'Évêque", "Camembert")] def ContainsMapping(self, istring, mapper, ostring): - lattice = compose(istring, mapper, compose_filter="alt_sequence") + lattice = pynini.compose(istring, mapper, compose_filter="alt_sequence") lattice.project("output").rmepsilon().arcsort("olabel") - lattice = compose(mapper, ostring, compose_filter="sequence") - self.assertNotEqual(lattice.start(), NO_STATE_ID) + lattice = pynini.compose(mapper, ostring, compose_filter="sequence") + self.assertNotEqual(lattice.start(), pynini.NO_STATE_ID) def testByteToByteStringMap(self): - mapper = string_map(self.lines) + mapper = pynini.string_map(self.lines) self.ContainsMapping("[Bel Paese]", mapper, "Sorry") self.ContainsMapping("Cheddar", mapper, "Cheddar") self.ContainsMapping("Caithness", mapper, "Pont-l'Évêque") self.ContainsMapping("Pont-l'Évêque", mapper, "Camembert") def testByteToUtf8StringMap(self): - mapper = string_map(self.lines, output_token_type="utf8") - utf8 = functools.partial(accep, token_type="utf8") + mapper = pynini.string_map(self.lines, output_token_type="utf8") + utf8 = functools.partial(pynini.accep, token_type="utf8") self.ContainsMapping("[Bel Paese]", mapper, utf8("Sorry")) self.ContainsMapping("Cheddar", mapper, utf8("Cheddar")) self.ContainsMapping("Caithness", mapper, utf8("Pont-l'Évêque")) self.ContainsMapping("Pont-l'Évêque", mapper, utf8("Camembert")) def testUtf8ToUtf8StringMap(self): - mapper = string_map( - self.lines, input_token_type="utf8", output_token_type="utf8") - utf8 = functools.partial(accep, token_type="utf8") + mapper = pynini.string_map( + self.lines, input_token_type="utf8", output_token_type="utf8" + ) + utf8 = functools.partial(pynini.accep, token_type="utf8") self.ContainsMapping(utf8("[Bel Paese]"), mapper, utf8("Sorry")) self.ContainsMapping(utf8("Pont-l'Évêque"), mapper, utf8("Camembert")) def testByteToSymbolStringMap(self): - syms = SymbolTable() + syms = pynini.SymbolTable() syms.add_symbol("") syms.add_symbol("Sorry") syms.add_symbol("Cheddar") syms.add_symbol("Pont-l'Évêque") syms.add_symbol("Camembert") - mapper = string_map(self.lines, output_token_type=syms) - symc = functools.partial(accep, token_type=syms) + mapper = pynini.string_map(self.lines, output_token_type=syms) + symc = functools.partial(pynini.accep, token_type=syms) self.ContainsMapping("[Bel Paese]", mapper, symc("Sorry")) self.ContainsMapping("Pont-l'Évêque", mapper, symc("Camembert")) @@ -691,7 +768,7 @@ def setUpClass(cls): ("Red Windsor", "Normally, sir, yes, but today the van broke down.", "3"), ("Stilton", "Sorry", "2")] - cls.f = string_map(cls.triples) + cls.f = pynini.string_map(cls.triples) def testStringPathIteratorIStrings(self): self.assertCountEqual(self.f.paths().istrings(), @@ -711,7 +788,7 @@ def testStringPathsWeights(self): def testStringPathsAfterFstDeletion(self): cheeses = ("Pipo Crem'", "Fynbo") - f = union(*cheeses) + f = pynini.union(*cheeses) sp = f.paths() del f # Should be garbage-collected immediately. self.assertCountEqual(sp.ostrings(), cheeses) @@ -721,37 +798,20 @@ def testStringPathLabelsWithEpsilons(self): # of the first FST to the initial state of the second FST with an # epsilon-arc, a fact we take advantage of here. cheeses = ("Ilchester", "Limburger") - f = union(*cheeses) + f = pynini.union(*cheeses) self.assertCountEqual(cheeses, f.paths().ostrings()) class SymbolTableTest(unittest.TestCase): def testPickleIO(self): - f = SymbolTable() + f = pynini.SymbolTable() f.add_symbol("") f.add_symbol("Dorset Blue Vinney") g = pickle.loads(pickle.dumps(f)) self.assertEqual(f.labeled_checksum(), g.labeled_checksum()) -class TransducerTest(unittest.TestCase): - - def testPrecompiledLogCrossProduct(self): - upper = accep("Smoked Austrian", arc_type="log") - lower = accep("No", arc_type="log") - tr = cross(upper, lower) - self.assertEqual(tr.arc_type(), "log") - - def testImplicitLeftLogCrossProducts(self): - tr = cross("Smoked Austrian", accep("No", arc_type="log")) - self.assertEqual(tr.arc_type(), "log") - - def testImplicitRightLogCrossProducts(self): - tr = cross(accep("Smoked Austrian", arc_type="log"), "No") - self.assertEqual(tr.arc_type(), "log") - - class WeightTest(unittest.TestCase): @classmethod @@ -760,19 +820,19 @@ def setUpClass(cls): one_half = -math.log(1.5) two = -math.log(2) cls.delta = 1. / 1024. - cls.tropical_zero = Weight.zero("tropical") - cls.tropical_half = Weight("tropical", half) - cls.tropical_one = Weight.one("tropical") - cls.log_zero = Weight.zero("log") - cls.log_half = Weight("log", half) - cls.log_one = Weight.one("log") - cls.log_one_half = Weight("log", one_half) - cls.log_two = Weight("log", two) - cls.log64_zero = Weight.zero("log64") - cls.log64_half = Weight("log64", half) - cls.log64_one = Weight.one("log64") - cls.log64_one_half = Weight("log64", one_half) - cls.log64_two = Weight("log64", two) + cls.tropical_zero = pynini.Weight.zero("tropical") + cls.tropical_half = pynini.Weight("tropical", half) + cls.tropical_one = pynini.Weight.one("tropical") + cls.log_zero = pynini.Weight.zero("log") + cls.log_half = pynini.Weight("log", half) + cls.log_one = pynini.Weight.one("log") + cls.log_one_half = pynini.Weight("log", one_half) + cls.log_two = pynini.Weight("log", two) + cls.log64_zero = pynini.Weight.zero("log64") + cls.log64_half = pynini.Weight("log64", half) + cls.log64_one = pynini.Weight.one("log64") + cls.log64_one_half = pynini.Weight("log64", one_half) + cls.log64_two = pynini.Weight("log64", two) # Helper. @@ -783,222 +843,222 @@ def assertApproxEquals(self, w1, w2): def testTropicalZeroPlusZeroEqualsZero(self): zero = self.tropical_zero - self.assertEqual(plus(zero, zero), zero) + self.assertEqual(pynini.plus(zero, zero), zero) def testTropicalOnePlusOneEqualsOne(self): one = self.tropical_one - self.assertEqual(plus(one, one), one) + self.assertEqual(pynini.plus(one, one), one) def testTropicalOnePlusZeroEqualsOne(self): one = self.tropical_one zero = self.tropical_zero - self.assertEqual(plus(one, zero), one) - self.assertEqual(plus(zero, one), one) + self.assertEqual(pynini.plus(one, zero), one) + self.assertEqual(pynini.plus(zero, one), one) def testTropicalHalfPlusHalfEqualsHalf(self): half = self.tropical_half - self.assertEqual(plus(half, half), half) + self.assertEqual(pynini.plus(half, half), half) def testTropicalZeroTimesZeroEqualsZero(self): zero = self.tropical_zero - self.assertEqual(times(zero, zero), zero) + self.assertEqual(pynini.times(zero, zero), zero) def testTropicalOneTimesOneEqualsOne(self): one = self.tropical_one - self.assertEqual(times(one, one), one) + self.assertEqual(pynini.times(one, one), one) def testTropicalOneTimesZeroEqualsZero(self): one = self.tropical_one zero = self.tropical_zero - self.assertEqual(times(one, zero), zero) - self.assertEqual(times(zero, one), zero) + self.assertEqual(pynini.times(one, zero), zero) + self.assertEqual(pynini.times(zero, one), zero) def testTropicalHalfTimesOneEqualsHalf(self): half = self.tropical_half one = self.tropical_one - self.assertEqual(times(half, one), half) - self.assertEqual(times(one, half), half) + self.assertEqual(pynini.times(half, one), half) + self.assertEqual(pynini.times(one, half), half) def testTropicalZeroDivideOneEqualsZero(self): zero = self.tropical_zero one = self.tropical_one - self.assertEqual(divide(zero, one), zero) + self.assertEqual(pynini.divide(zero, one), zero) def testTropicalOneDivideZeroRaisesFstBadWeightError(self): zero = self.tropical_zero one = self.tropical_one - with self.assertRaises(FstBadWeightError): - unused_w = divide(one, zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = pynini.divide(one, zero) def testTropicalZeroDivideZeroRaisesFstBadWeightError(self): zero = self.tropical_zero - with self.assertRaises(FstBadWeightError): - unused_w = divide(zero, zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = pynini.divide(zero, zero) def testTropicalOneDivideOneEqualsOne(self): one = self.tropical_one - self.assertEqual(divide(one, one), one) + self.assertEqual(pynini.divide(one, one), one) def testTropicalOneToTheTenthPowerEqualsOne(self): one = self.tropical_one - self.assertEqual(power(one, 10), one) + self.assertEqual(pynini.power(one, 10), one) def testTropicalZeroToTheZerothPowerEqualsOne(self): zero = self.tropical_zero one = self.tropical_one - self.assertEqual(power(zero, 0), one) + self.assertEqual(pynini.power(zero, 0), one) # Log weights. def testLogZeroPlusZeroEqualsZero(self): zero = self.log_zero - self.assertEqual(plus(zero, zero), zero) + self.assertEqual(pynini.plus(zero, zero), zero) def testLogOnePlusOneEqualsTwo(self): one = self.log_one two = self.log_two - self.assertApproxEquals(plus(one, one), two) + self.assertApproxEquals(pynini.plus(one, one), two) def testLogOnePlusZeroEqualsOne(self): one = self.log_one zero = self.log_zero - self.assertEqual(plus(one, zero), one) - self.assertEqual(plus(zero, one), one) + self.assertEqual(pynini.plus(one, zero), one) + self.assertEqual(pynini.plus(zero, one), one) def testLogHalfPlusHalfEqualsOneHalf(self): half = self.log_half one = self.log_one one_half = self.log_one_half - self.assertApproxEquals(plus(half, one), one_half) + self.assertApproxEquals(pynini.plus(half, one), one_half) def testLogZeroTimesZeroEqualsZero(self): zero = self.log_zero - self.assertEqual(times(zero, zero), zero) + self.assertEqual(pynini.times(zero, zero), zero) def testLogOneTimesOneEqualsOne(self): one = self.log_one - self.assertEqual(times(one, one), one) + self.assertEqual(pynini.times(one, one), one) def testLogOneTimesZeroEqualsZero(self): one = self.log_one zero = self.log_zero - self.assertEqual(times(one, zero), zero) - self.assertEqual(times(zero, one), zero) + self.assertEqual(pynini.times(one, zero), zero) + self.assertEqual(pynini.times(zero, one), zero) def testLogHalfTimesOneEqualsHalf(self): half = self.log_half one = self.log_one - self.assertEqual(times(half, one), half) - self.assertEqual(times(one, half), half) + self.assertEqual(pynini.times(half, one), half) + self.assertEqual(pynini.times(one, half), half) def testLogZeroDivideOneEqualsZero(self): zero = self.log_zero one = self.log_one - self.assertEqual(divide(zero, one), zero) + self.assertEqual(pynini.divide(zero, one), zero) def testLogOneDivideZeroRaisesBadWeightError(self): zero = self.log_zero one = self.log_one - with self.assertRaises(FstBadWeightError): - unused_w = self.assertEqual(divide(one, zero), zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = self.assertEqual(pynini.divide(one, zero), zero) def testLogZeroDivideZeroRaisesFstBadWeightError(self): zero = self.log_zero - with self.assertRaises(FstBadWeightError): - unused_w = self.assertEqual(divide(zero, zero), zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = self.assertEqual(pynini.divide(zero, zero), zero) def testLogOneDivideOneEqualsOne(self): one = self.log_one - self.assertEqual(divide(one, one), one) + self.assertEqual(pynini.divide(one, one), one) def testLogOneToTheTenthPowerEqualsOne(self): one = self.log_one - self.assertEqual(power(one, 10), one) + self.assertEqual(pynini.power(one, 10), one) def testLogZeroToTheZerothPowerEqualsOne(self): zero = self.log_zero one = self.log_one - self.assertEqual(power(zero, 0), one) + self.assertEqual(pynini.power(zero, 0), one) # Log64 weights. def testLog64ZeroPlusZeroEqualsZero(self): zero = self.log64_zero - self.assertEqual(plus(zero, zero), zero) + self.assertEqual(pynini.plus(zero, zero), zero) def testLog64OnePlusOneEqualsTwo(self): one = self.log64_one two = self.log64_two - self.assertApproxEquals(plus(one, one), two) + self.assertApproxEquals(pynini.plus(one, one), two) def testLog64OnePlusZeroEqualsOne(self): one = self.log64_one zero = self.log64_zero - self.assertEqual(plus(one, zero), one) - self.assertEqual(plus(zero, one), one) + self.assertEqual(pynini.plus(one, zero), one) + self.assertEqual(pynini.plus(zero, one), one) def testLog64HalfPlusHalfEqualsOneHalf(self): half = self.log64_half one = self.log64_one one_half = self.log64_one_half - self.assertApproxEquals(plus(half, one), one_half) + self.assertApproxEquals(pynini.plus(half, one), one_half) def testLog64ZeroTimesZeroEqualsZero(self): zero = self.log64_zero - self.assertEqual(times(zero, zero), zero) + self.assertEqual(pynini.times(zero, zero), zero) def testLog64OneTimesOneEqualsOne(self): one = self.log64_one - self.assertEqual(times(one, one), one) + self.assertEqual(pynini.times(one, one), one) def testLog64OneTimesZeroEqualsZero(self): one = self.log64_one zero = self.log64_zero - self.assertEqual(times(one, zero), zero) - self.assertEqual(times(zero, one), zero) + self.assertEqual(pynini.times(one, zero), zero) + self.assertEqual(pynini.times(zero, one), zero) def testLog64HalfTimesOneEqualsHalf(self): half = self.log64_half one = self.log64_one - self.assertEqual(times(half, one), half) - self.assertEqual(times(one, half), half) + self.assertEqual(pynini.times(half, one), half) + self.assertEqual(pynini.times(one, half), half) def testLog64ZeroDivideOneEqualsZero(self): zero = self.log64_zero one = self.log64_one - self.assertEqual(divide(zero, one), zero) + self.assertEqual(pynini.divide(zero, one), zero) def testLog64OneDivideZeroRaisesBadWeightError(self): zero = self.log64_zero one = self.log64_one - with self.assertRaises(FstBadWeightError): - unused_w = self.assertEqual(divide(one, zero), zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = self.assertEqual(pynini.divide(one, zero), zero) def testLog64ZeroDivideZeroRaisesFstBadWeightError(self): zero = self.log64_zero - with self.assertRaises(FstBadWeightError): - unused_w = self.assertEqual(divide(zero, zero), zero) + with self.assertRaises(pynini.FstBadWeightError): + unused_w = self.assertEqual(pynini.divide(zero, zero), zero) def testLog64OneDivideOneEqualsOne(self): one = self.log64_one - self.assertEqual(divide(one, one), one) + self.assertEqual(pynini.divide(one, one), one) def testLog64ToTheTenthPowerEqualsOne(self): one = self.log64_one - self.assertEqual(power(one, 10), one) + self.assertEqual(pynini.power(one, 10), one) def testLog64ToTheZerothPowerEqualsOne(self): zero = self.log64_zero one = self.log64_one - self.assertEqual(power(zero, 0), one) + self.assertEqual(pynini.power(zero, 0), one) class WorkedExampleTest(unittest.TestCase): def testWorkedExample(self): pairs = zip(string.ascii_lowercase, string.ascii_uppercase) - self.upcaser = string_map(pairs).closure() - self.downcaser = invert(self.upcaser) + self.upcaser = pynini.string_map(pairs).closure() + self.downcaser = pynini.invert(self.upcaser) awords = "You do have some cheese do you".lower().split() for aword in awords: result = (aword @ self.upcaser).project("output").optimize() diff --git a/tests/pynutil_test.py b/tests/pynutil_test.py index 2a66d1e..764d8c3 100644 --- a/tests/pynutil_test.py +++ b/tests/pynutil_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests pynutil.""" @@ -26,8 +24,6 @@ class UtilitiesTest(absltest.TestCase): - # TD-deletion in English, expressed as a mandatory rule. - def testUnweightedInsert(self): inserter = pynutil.insert("Cheddar") self.assertEqual(rewrite.one_top_rewrite("", inserter), "Cheddar") @@ -47,6 +43,38 @@ def testWeightedDelete(self): deleter = pynutil.delete("Cheddar", 2) self.assertEqual(self.total_weight(deleter), 2) + def testAddUntypedWeightToUntypedExpression(self): + # Mismatch is impossible here. + cheese = pynutil.add_weight("Cheddar", 2) + self.assertEqual(cheese.weight_type(), "tropical") + + def testAddUntypedWeightToTypedExpression(self): + # Mismatch is impossible here. + cheese = pynini.accep("Cheddar", arc_type="log") + cheese = pynutil.add_weight(cheese, 2) + self.assertEqual(cheese.weight_type(), "log") + + def testAddTypedWeightToUntypedExpression(self): + # No mismatch because tropical comes from the default context. + weight = pynini.Weight("tropical", 2) + cheese = pynutil.add_weight("Cheddar", weight) + self.assertEqual(cheese.weight_type(), "tropical") + # Mismatch occurs here. + weight = pynini.Weight("log", 2) + with self.assertRaises(pynini.FstOpError): + unused_cheese = pynutil.add_weight("Cheddar", weight) + + def testAddTypedWeightToTypedExpression(self): + # No mismatch. + cheese = pynini.accep("Cheddar", arc_type="log") + weight = pynini.Weight("log", 2) + cheese = pynutil.add_weight(cheese, weight) + self.assertEqual(cheese.weight_type(), "log") + # Mismatch occurs here. + weight = pynini.Weight("tropical", 2) + with self.assertRaises(pynini.FstOpError): + unused_cheese = pynutil.add_weight(cheese, weight) + def testJoin(self): joined = pynutil.join("a", " ") for i in range(1, 10): diff --git a/tests/rewrite_test.py b/tests/rewrite_test.py index 9f86519..c37f82e 100644 --- a/tests/rewrite_test.py +++ b/tests/rewrite_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests rewrite functions.""" diff --git a/tests/rule_cascade_test.py b/tests/rule_cascade_test.py index 60ad981..a33f7ad 100644 --- a/tests/rule_cascade_test.py +++ b/tests/rule_cascade_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests rule cascade.""" diff --git a/tests/stringfile_test.py b/tests/stringfile_test.py new file mode 100644 index 0000000..1536d1a --- /dev/null +++ b/tests/stringfile_test.py @@ -0,0 +1,119 @@ +# Copyright 2016-2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Tests for the automatic stringfile creation utility.""" + +import io + +import logging + +import pynini +from pynini.lib import stringfile +from absl.testing import absltest + + +class StringfileEscapeTest(absltest.TestCase): + + def test_empty_string(self): + self.assertEqual(stringfile.escape(""), "") + + def test_non_special_chars(self): + self.assertEqual(stringfile.escape(r"abc"), r"abc") + + def test_brackets(self): + self.assertEqual(stringfile.escape(r"[abc]"), r"\[abc\]") + + def test_backslash(self): + self.assertEqual(stringfile.escape("a\\slash\\"), "a\\\\slash\\\\") + + def test_hashtag(self): + self.assertEqual(stringfile.escape(r"#awesome"), r"\#awesome") + + def test_escaped_backslash_before_hashtag(self): + self.assertEqual(stringfile.escape("\\\\#"), "\\\\\\\\\\#") + + def test_unescaped_backslash_before_hashtag(self): + self.assertEqual(stringfile.escape("\\#"), "\\\\\\#") + + +class StringfileWriteTest(absltest.TestCase): + + def test_write_line(self): + with io.StringIO() as f: + stringfile.writeline(f, ["#awesome", "#lo mejor", "4"]) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 1) + self.assertEqual(lines[0], "\\#awesome\t\\#lo mejor\t4\n") + + def test_too_few_fields(self): + with io.StringIO() as f: + with self.assertLogs(level=logging.ERROR): + stringfile.writeline(f, []) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 1) + self.assertEqual(lines[0], "\n") + + def test_too_many_fields(self): + with io.StringIO() as f: + with self.assertLogs(level=logging.ERROR): + stringfile.writeline(f, ["#awesome", "#lo mejor", "4", "too many"]) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 1) + self.assertEqual(lines[0], "\\#awesome\t\\#lo mejor\t4\ttoo many\n") + + def test_write_two_column_line(self): + with io.StringIO() as f: + stringfile.writeline(f, ["#awesome", "#lo mejor"]) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 1) + self.assertEqual(lines[0], "\\#awesome\t\\#lo mejor\n") + + def test_write_one_column_line(self): + with io.StringIO() as f: + stringfile.writeline(f, ["#awesome"]) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 1) + self.assertEqual(lines[0], "\\#awesome\n") + + def test_write_lines(self): + with io.StringIO() as f: + stringfile.writelines(f, [("#awesome", "#lo mejor", "4"), + ("[bracketed]", "סוגריים מרובעים", "5")]) + f.seek(0) + lines = f.readlines() + self.assertLen(lines, 2) + self.assertEqual(lines[0], "\\#awesome\t\\#lo mejor\t4\n") + self.assertEqual(lines[1], "\\[bracketed\\]\tסוגריים מרובעים\t5\n") + + def test_roundtrip(self): + lines = [("#awesome", "#lo mejor", "4"), + ("[bracketed]", "סוגריים מרובעים", "5"), + ("\\\\#", "words", "0")] + temp = self.create_tempfile() + with temp.open_text("wt") as f: + stringfile.writelines(f, lines) + + fst = pynini.string_file(temp.full_path) + self.assertEqual(lines, + [(istring, ostring, str(weight)) + for istring, ostring, weight in fst.paths().items()]) + + +if __name__ == "__main__": + absltest.main() + diff --git a/tests/t9_test.py b/tests/t9_test.py index 3257ac2..5aab8d5 100644 --- a/tests/t9_test.py +++ b/tests/t9_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for the T9 model.""" diff --git a/tests/tagger_test.py b/tests/tagger_test.py index ecba470..186600c 100644 --- a/tests/tagger_test.py +++ b/tests/tagger_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests of the tagger automaton class.""" diff --git a/tests/utf8_test.py b/tests/utf8_test.py index 57bf36d..e8b93ee 100644 --- a/tests/utf8_test.py +++ b/tests/utf8_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for utf8.py.""" diff --git a/tests/weather_test.py b/tests/weather_test.py index f3f9d86..92abb2f 100644 --- a/tests/weather_test.py +++ b/tests/weather_test.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Google LLC +# Copyright 2016-2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# - # For general information on the Pynini grammar compilation library, see # pynini.opengrm.org. """Tests for the weather generator.""" diff --git a/third_party/Dockerfile b/third_party/Dockerfile index 6600d59..3df413d 100644 --- a/third_party/Dockerfile +++ b/third_party/Dockerfile @@ -32,8 +32,8 @@ from quay.io/pypa/manylinux_2_28_x86_64 AS common # The versions we want in the wheels. -ENV FST_VERSION "1.8.2.post1" -ENV PYNINI_VERSION "2.1.5.post2" +ENV FST_VERSION "1.8.3" +ENV PYNINI_VERSION "2.1.6" # *********************************************************************** # *** Image providing all the requirements for building Pynini wheels *** diff --git a/third_party/bazel/python_configure.bzl b/third_party/bazel/python_configure.bzl index 6b656a7..bae948a 100644 --- a/third_party/bazel/python_configure.bzl +++ b/third_party/bazel/python_configure.bzl @@ -3,19 +3,17 @@ `python_configure` depends on the following environment variables: - * `PYTHON2_BIN_PATH`: location of python binary. - * `PYTHON2_LIB_PATH`: Location of python libraries. + * `PYTHON3_BIN_PATH`: location of python binary. + * `PYTHON3_LIB_PATH`: Location of python libraries. """ _BAZEL_SH = "BAZEL_SH" -_PYTHON2_BIN_PATH = "PYTHON2_BIN_PATH" -_PYTHON2_LIB_PATH = "PYTHON2_LIB_PATH" _PYTHON3_BIN_PATH = "PYTHON3_BIN_PATH" _PYTHON3_LIB_PATH = "PYTHON3_LIB_PATH" _HEADERS_HELP = ( - "Are Python headers installed? Try installing python-dev or " + - "python3-dev on Debian-based systems. Try python-devel or python3-devel " + + "Are Python headers installed? Try installing " + + "python3-dev on Debian-based systems. Try python3-devel " + "on Redhat-based systems." ) @@ -64,7 +62,6 @@ def _execute( result.stderr.strip(), error_details if error_details else "", ])) - return None else: return result @@ -153,7 +150,7 @@ def _symlink_genrule_for_dir( "\n".join(outs), ) -def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): +def _get_python_bin(repository_ctx, bin_path_key, default_bin_path, allow_absent): """Gets the python bin path.""" python_bin = repository_ctx.os.environ.get(bin_path_key, default_bin_path) if not repository_ctx.path(python_bin).exists: @@ -164,11 +161,13 @@ def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): python_bin_path = python_bin if python_bin_path != None: return str(python_bin_path) - _fail("Cannot find python in PATH, please make sure " + - "python is installed and add its directory in PATH, or --define " + - "%s='/something/else'.\nPATH=%s" % - (bin_path_key, repository_ctx.os.environ.get("PATH", ""))) - return None + if not allow_absent: + _fail("Cannot find python in PATH, please make sure " + + "python is installed and add its directory in PATH, or --define " + + "%s='/something/else'.\nPATH=%s" % + (bin_path_key, repository_ctx.os.environ.get("PATH", ""))) + else: + return None def _get_bash_bin(repository_ctx): """Gets the bash bin path.""" @@ -186,7 +185,6 @@ def _get_bash_bin(repository_ctx): "%s='/path/to/bash'.\nPATH=%s" % (_BAZEL_SH, repository_ctx.os.environ.get("PATH", "")), ) - return None def _get_python_lib(repository_ctx, python_bin, lib_path_key): """Gets the python lib path.""" @@ -201,14 +199,14 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key): " python_paths = os.getenv('PYTHONPATH').split(':')\n" + "try:\n" + " library_paths = site.getsitepackages()\n" + "except AttributeError:\n" + - " from distutils.sysconfig import get_python_lib\n" + - " library_paths = [get_python_lib()]\n" + + " import sysconfig\n" + + " library_paths = [sysconfig.get_path('purelib')]\n" + "all_paths = set(python_paths + library_paths)\n" + "paths = []\n" + "for path in all_paths:\n" + " if os.path.isdir(path):\n" + " paths.append(path)\n" + "if len(paths) >=1:\n" + " print(paths[0])\n" + "END" ) - cmd = "%s - %s" % (python_bin, print_lib) + cmd = '"%s" - %s' % (python_bin, print_lib) result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) return result.stdout.strip("\n") @@ -219,13 +217,17 @@ def _check_python_lib(repository_ctx, python_lib): if result.return_code == 1: _fail("Invalid python library path: %s" % python_lib) -def _check_python_bin(repository_ctx, python_bin, bin_path_key): +def _check_python_bin(repository_ctx, python_bin, bin_path_key, allow_absent): """Checks the python bin path.""" cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin) result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) if result.return_code == 1: - _fail("--define %s='%s' is not executable. Is it the python binary?" % - (bin_path_key, python_bin)) + if not allow_absent: + _fail("--define %s='%s' is not executable. Is it the python binary?" % + (bin_path_key, python_bin)) + else: + return None + return True def _get_python_include(repository_ctx, python_bin): """Gets the python include path.""" @@ -235,14 +237,13 @@ def _get_python_include(repository_ctx, python_bin): python_bin, "-c", "from __future__ import print_function;" + - "from distutils import sysconfig;" + - "print(sysconfig.get_python_inc())", + "import sysconfig;" + + "print(sysconfig.get_path('include'))", ], error_msg = "Problem getting python include path for {}.".format(python_bin), error_details = ( "Is the Python binary path set up right? " + "(See ./configure or " + - python_bin + ".) " + "Is distutils installed? " + - _HEADERS_HELP + python_bin + ".) " + _HEADERS_HELP ), ) include_path = result.stdout.splitlines()[0] @@ -252,7 +253,7 @@ def _get_python_include(repository_ctx, python_bin): python_bin, "-c", "import os;" + - "main_header = os.path.join('{}', 'Python.h');".format(include_path) + + "main_header = os.path.join(r'{}', 'Python.h');".format(include_path) + "assert os.path.exists(main_header), main_header + ' does not exist.'", ], error_msg = "Unable to find Python headers for {}".format(python_bin), @@ -282,19 +283,28 @@ def _create_single_version_package( variety_name, bin_path_key, default_bin_path, - lib_path_key): + lib_path_key, + allow_absent): """Creates the repository containing files set up to build with Python.""" - python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path) - _check_python_bin(repository_ctx, python_bin, bin_path_key) - python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) - _check_python_lib(repository_ctx, python_lib) - python_include = _get_python_include(repository_ctx, python_bin) - python_include_rule = _symlink_genrule_for_dir( - repository_ctx, - python_include, - "{}_include".format(variety_name), - "{}_include".format(variety_name), - ) + empty_include_rule = "filegroup(\n name=\"{}_include\",\n srcs=[],\n)".format(variety_name) + + python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path, allow_absent) + if (python_bin == None or + _check_python_bin(repository_ctx, + python_bin, + bin_path_key, + allow_absent) == None) and allow_absent: + python_include_rule = empty_include_rule + else: + python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) + _check_python_lib(repository_ctx, python_lib) + python_include = _get_python_include(repository_ctx, python_bin) + python_include_rule = _symlink_genrule_for_dir( + repository_ctx, + python_include, + "{}_include".format(variety_name), + "{}_include".format(variety_name), + ) python_import_lib_genrule = "" # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib @@ -331,29 +341,20 @@ def _create_single_version_package( def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" - _create_single_version_package( - repository_ctx, - "_python2", - _PYTHON2_BIN_PATH, - "python", - _PYTHON2_LIB_PATH, - ) _create_single_version_package( repository_ctx, "_python3", _PYTHON3_BIN_PATH, - "python3", + "python3" if not _is_windows(repository_ctx) else "python.exe", _PYTHON3_LIB_PATH, + False ) _tpl(repository_ctx, "BUILD") -# pylint:disable=no-effect python_configure = repository_rule( implementation = _python_autoconf_impl, environ = [ _BAZEL_SH, - _PYTHON2_BIN_PATH, - _PYTHON2_LIB_PATH, _PYTHON3_BIN_PATH, _PYTHON3_LIB_PATH, ], @@ -370,8 +371,7 @@ python_configure = repository_rule( ) """Detects and configures the local Python. -It is expected that the system have both a working Python 2 and python 3 -installation +It expects the system have a working Python 3 installation. Add the following to your WORKSPACE FILE: