*11/11/22: Spam-fighting code gone haywire was causing various failures/slowdowns on the forum. It has been addressed.
You need to be a registered user to participate in the discussions. Log In or Register
You can use the formatting commands describes in TextFormattingRules in your comment.
If you want to post some code, surround it with <verbatim> and </verbatim> tags.
Auto-linking of WikiWords is now disabled in comments, so you can type VectorFst and it won't result in a broken link.
You now need to use <br> to force new lines in your comment (unless inside verbatim tags). However, a blank line will automatically create a new paragraph.
I have been getting random segmentation faults in the CyclicMinimizer and this time instead of the ostrich algorithm I decided to solve it.
A comment in the code claims that moving out of the top of priority queue is safe. However, after investigating, it turned out that the heap indeed tried to compare the element being removed. I have swapped it out to manually calling push_heap, pop_heap, etc., so now we can move the element out after any heap operation, just before it's removed from the end of the heap.
Below is my patch that seems to fix the bug:
<verbatim>
diff --git a/src/include/fst/minimize.h b/src/include/fst/minimize.h
index 7e59f9c..69518c9 100644
a/src/include/fst/minimize.h
+++ b/src/include/fst/minimize.h
@@ -181,9 +181,7 @@ class CyclicMinimizer {
}
};
- using ArcIterQueue =
- std::priority_queue<RevArcIterPtr, std::vector<RevArcIterPtr>,
- ArcIterCompare>;
+ using ArcIterQueue = std::vector<RevArcIterPtr>;
private:
// Prepartitions the space into equivalence classes. We ensure that final and
@@ -241,30 +239,26 @@ class CyclicMinimizer {
P_.Initialize(Tr_.NumStates() - 1);
// Prepares initial partition.
PrePartition(fst);
- // Allocates arc iterator queue.
- aiter_queue_ = std::make_unique<ArcIterQueue>();
}
// Partitions all classes with destination C.
void Split(ClassId C) {
+
// Prepares priority queue: opens arc iterator for each state in C, and
// inserts into priority queue.
for (PartitionIterator<StateId> siter(P_, C); siter.Done(); siter.Next()) {
const auto s = siter.Value();
if (Tr_.NumArcs(s + 1)) {
- aiter_queue_->push(std::make_unique<RevArcIter>(Tr_, s + 1));
+ aiter_queue_.push_back(std::make_unique<RevArcIter>(Tr_, s + 1));
}
}
+ std::make_heap(aiter_queue_.begin(), aiter_queue_.end(), ArcIterCompare{});
// Now pops arc iterator from queue, splits entering equivalence class, and
// re-inserts updated iterator into queue.
Label prev_label = -1;
- while (aiter_queue_->empty()) {
- // NB: There is no way to "move" out of a std::priority_queue given that
- // the `top` accessor is a const ref. We const-cast to move out the
- // unique_ptr out of the priority queue. This is fine and doesn't cause an
- // issue with the invariants of the pqueue since we immediately pop after.
- RevArcIterPtr aiter =
- std::move(const_cast<RevArcIterPtr &>(aiter_queue_->top()));
- aiter_queue_->pop();
+ while (aiter_queue_.empty()) {
+ std::pop_heap(aiter_queue_.begin(), aiter_queue_.end(), ArcIterCompare{});
+ RevArcIterPtr aiter = std::move(aiter_queue_.back());
+ aiter_queue_.pop_back();
if (aiter->Done()) continue;
const auto &arc = aiter->Value();
auto from_state = aiter->Value().nextstate - 1;
@@ -274,7 +268,10 @@ class CyclicMinimizer {
if (P_.ClassSize(from_class) > 1) P_.SplitOn(from_state);
prev_label = from_label;
aiter->Next();
- if (aiter->Done()) aiter_queue_->push(std::move(aiter));
+ if (aiter->Done()) {
+ aiter_queue_.push_back(std::move(aiter));
+ std::push_heap(aiter_queue_.begin(), aiter_queue_.end(), ArcIterCompare{});
+ }
}
P_.FinalizeSplit(&L_);
}
@@ -298,7 +295,7 @@ class CyclicMinimizer {
VectorFst<RevArc> Tr_;
// Priority queue of open arc iterators for all states in the splitter
// equivalence class.
- std::unique_ptr<ArcIterQueue> aiter_queue_;
+ ArcIterQueue aiter_queue_;
};
// Computes equivalence classes for acyclic FST.
</verbatim>
I have installed OpenFst v1.8.3 on Ubuntu 24.04 and enabled Python (v3.12). However, when running
<verbatim>WEIGHT_TYPE = pywrapfst.Fst().weight_type()</verbatim>
I get the following error:
<verbatim>File "pywrapfst.pyx", line 1681, in pywrapfst.Fst.__init__
AttributeError: 'pywrapfst.Fst' object has no attribute '_class__'. Did you mean: '__class__'?</verbatim>
Note the single underscore for class. How do I solve this? Thanks.
Are you open to accepting patches to enable this project to be compiled/used on a windows system through MSYS2 (gcc or clang as compilers, mingw as the bulk of the adaptation layer)?
We are not in theory opposed to anything to do with Windows support, but we don't have any means currently to test Windows support, except that OpenFst is now built for Windows on Conda-Forge CI.
As to how best to tackle the Windows compilation issue I plead ignorance.
build command is ./configure --enable-python and make it throw error with logs
pywrapfst.cpp:196:12: fatal error: longintrepr.h not found
due to cython generate code pywrapfst.cpp is not compatible to python3.11 please update it
Hello,
i came across an issue with SymbolTable::Copy() const correctness recently.
I have noticed that SymbolTable::Copy() makes a shallow copy of the data present in SymbolTableImpl. The method signature is `virtual SymbolTable* SymbolTable::Copy() const`, so if i call (const SymbolTable*)->Copy() i get a SymbolTable*. And, accidentelly, I was changing the content of the original table.
I'd suggest to have there methods:
`virtual SymbolTable* SymbolTable::Copy()`
`virtual const SymbolTable* SymbolTable::Copy() const`
Or just the 1st that just removes the 'const' modifier.
Would it make sense for you as well?
Best regards,
Karel
I've tried compiling OpenFST 1.8.2 with the Python extension but got errors. I've ran:
./configure --enable-python && make -j
I've attached the compilation output here:
https://pastebin.com/m6aV29m8
What am I missing?
I got an error when confguring due to python version checks failing. I notived that the configure script checks python versions suboptimally. Here is a suggestion for a better check:
Instead of:
ac_supports_python_ver=`$PYTHON -c "import sys; ver = sys.version.split ()[0]; print (ver >= '3.6')"`
it is probably better to do:
ac_supports_python_ver=`$PYTHON -c "import sys; from packaging import version; ver = sys.version.split ()[0]; print (version.parse(ver) >= version.parse('3.6'))"`
Based on the README I've been able to get a program that links against the libfst.so library running. I'd like to create an executable that doesn't depend on the .so file being in the expected place at runtime to work. Is this possible? is there a libfst.o file somewhere I can link against? What would the Makefile of such an executable look like?
I've recently moved from openfst 1.6.2 to version 1.7.2, and I have a test case falling: fstcompile produces an empty output when one of the word is too long.
I've noticed it starts to happen when the text line has more than 8096 characters.
Code to reproduce the issue (set num=8080 to see the error):
#!/bin/bash
num=$1
word=$(for i in $(seq 1 $num); do echo -n 'a'; done)
echo "<eps> 0" > words.txt
echo "$word 24" >> words.txt
phone=jnk_S
echo "<eps> 0" > phones.txt
echo "$phone 186" >> phones.txt
echo -e "0\t0\t$phone\t$word\t4.265" > L.txt
wc L.txt
echo -e "0\t0" >> L.fst
fstcompile --isymbols=phones.txt --osymbols=words.txt L.txt L.fst
echo "Printing L.fst"
fstprint L.fst
I've recently moved from openfst 1.6.2 to version 1.7.2, and I have a test case falling: fstcompile produces an empty output when one of the word is too long.
I've noticed it starts to happen when the text line has more than 8096 characters.
Code to reproduce the issue (set num=8080 to see the error):
#!/bin/bash
num=$1
word=$(for i in $(seq 1 $num); do echo -n 'a'; done)
echo "<eps> 0" > words.txt
echo "$word 24" >> words.txt
phone=jnk_S
echo "<eps> 0" > phones.txt
echo "$phone 186" >> phones.txt
echo -e "0\t0\t$phone\t$word\t4.265" > L.txt
wc L.txt
echo -e "0\t0" >> L.fst
fstcompile --isymbols=phones.txt --osymbols=words.txt L.txt L.fst
echo "Printing L.fst"
fstprint L.fst
Does fstspecial support chaining calls? For example, if my FST uses both sigma and rho symbols, I chain it like this:
fstspecial --sigma_fst_sigma_label=1 --fst_type=sigma model.fst | fstspecial --rho_fst_rho_label=2 --fst_type=rho > model1.fst
However, it seems like model1.fst ignores sigma labels and only handles arcs with the rho label. What am I missing? Thank you.
It supports chaining in the narrowest sense but adding a rho matcher in the second step overwrites the sigma mature in the first step. I don't think there's any way to implement an FST with both rho and sigma arcs yet.
I have tried to build/test the library using Bazel (by invoking "bazel build/test ..." at the workspace root), and found following rules:
- :linearscript
- :linear-fst
require a dependency to :pdt, but the rules do not have it. As far as I checked, all other rules can be built correctly.
It seems this is a trivial bug that can be fixed soon.
Given an FST and alphabet which includes a blank char (''), I want to find the N unique shortest paths:
- Unique in the sense that there are no two paths with equal labels concatenation - e.g., ['a', '', 'b'] and ['a', 'b', ''] are considered equal.
- The output should be a list of labels including blank chars. All the paths from start node to end node in the input FST are of the same length, and the shortest path output should maintain this property.
ShortestPath takes an unique argument. However, as the documentation suggests "epsilons treated as regular symbols", therefore I cannot define blank as epsilon and use ShortestPath on the FST directly.
One idea I had, is to define blank as the epsilon symbol, remove all the epsilon symbols (using RmEpsilon), find the N unique shortest paths, and try to search each of the shortest paths in the original FST to re-construct paths with blank symbols. However, I am not sure how I can do the last part.
I don't see any way to do this, sorry. Yes, removing epsilons is necessary if you're calling the `unique` option of ShortestPath and you want unique strings rather than unique paths.
Hi there. Me again
Current composition with ngram fst in openfst is pretty slow due to the branching/writeback issues and due to the irregular reachable interval search.
The following patch greatly speedups the composition in runtime:
https://github.com/alphacep/openfst/commit/65e9de91b35a7238ffa035ed8bb2594a50dbdc5a
with more intelligent binary search pattern and it also removes lazy field in the iterator since writes conflict with branching and slowdown cpu pipeline a lot.
Please consider
Compiling this simple code:
#include <fst/symbol-table.h>
Ends in many deprecation warnings like this:
<verbatim>
In file included from test.cc:1:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h: In constructor ‘fst::SymbolTableReadOptions::SymbolTableReadOptions()’:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:68:28: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
| SymbolTableReadOptions() {} | ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:77:40: note: declared here
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:68:28: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
| SymbolTableReadOptions() {} | ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:77:40: note: declared here
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:68:28: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
| SymbolTableReadOptions() {} | ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:77:40: note: declared here
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:68:28: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
| SymbolTableReadOptions() {} | ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:77:40: note: declared here
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h: In constructor ‘fst::SymbolTableReadOptions::SymbolTableReadOptions(std::vector<std::pair<long int, long int> >, const string&)’:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:74:38: warning: ‘string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:74:73: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:74:73: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:74:73: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:74:73: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h: In destructor ‘fst::SymbolTableReadOptions::~SymbolTableReadOptions()’:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:67:31: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:77:40: note: declared here
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:67:31: warning: ‘fst::SymbolTableReadOptions::string_hash_ranges’ is deprecated: Do not use `string_hash_ranges`; it is ignored. [-Wdeprecated-declarations]
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h: In static member function ‘static fst::SymbolTable* fst::SymbolTable::Read(std::istream&, const string&)’:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:428:28: note: synthesized method ‘fst::SymbolTableReadOptions::~SymbolTableReadOptions()’ first required here
428 | SymbolTableReadOptions opts;
| ^~~~
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:430:27: warning: ‘static fst::SymbolTable* fst::SymbolTable::Read(std::istream&, const fst::SymbolTableReadOptions&)’ is deprecated: Use `Read(std::istream&, const std::string&)` instead. [-Wdeprecated-declarations]
430 | return Read(strm, opts);
| ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:420:23: note: declared here
420 | static SymbolTable *Read(std::istream &strm,
| ^~~~
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:430:27: warning: ‘static fst::SymbolTable* fst::SymbolTable::Read(std::istream&, const fst::SymbolTableReadOptions&)’ is deprecated: Use `Read(std::istream&, const std::string&)` instead. [-Wdeprecated-declarations]
430 | return Read(strm, opts);
| ^
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h:420:23: note: declared here
420 | static SymbolTable *Read(std::istream &strm,
| ^~~~
</verbatim>
Looks like this part was deprecated too early since it is used in the header code actively, for example in:
/home/shmyrev/travis/kaldi/tools/openfst/include/fst/symbol-table.h: In static member function ‘static fst::SymbolTable* fst::SymbolTable::Read(std::istream&, const string&)’:
It would be nice to rework this part.
Pynini 2.1.3 with OpenFST 1.8.0: pynini_test.py Failures and Errors
Hi,
I successfully downloaded the source and installed Pynini 2.1.3 after successfully installing OpenFST 1.8.0 using gcc version 10.2.0 (Debian 10.2.0-9) with Python 3.6.9.
I compiled OpenFST with the following options:
/openfst-1.8.0$
sudo ./configure --enable-far=yes --enable-pdt=yes --enable-mpdt=yes --enable-static=no --cache-file=config.cache --enable-grm=yes --enable-bin=yes
I followed the instructions in the Pynini README and ran the pynini_test.py after completing the install of Pynini. It looks like 145 tests were run in total with the following 4 failures and 6 errors.
To confirm successful installation, run `python pynini_test.py`; if all tests succeed, the final line will read `OK`.
/pynini-2.1.3/tests$ python pynini_test.py
..ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
....ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
...ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
.ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
...EE...ERROR: Verify: FST destination state ID of arc at position 0 of state 0 is negative
.ERROR: State ID -1 not valid
.....E..E....ERROR: GenericRegister::GetEntry: nonexistent.so: cannot open shared object file: No such file or directory
ERROR: WeightClass: Unknown weight type: nonexistent
.ERROR: ComplementFst: Argument not an unweighted epsilon-free deterministic acceptor
ERROR: DifferenceFst: 1st argument not an acceptor
.ERROR: AddArc: FST and weight with non-matching weight types: tropical and log
.ERROR: Determinize: FST and weight with non-matching weight types: tropical and log
.ERROR: Disambiguate: FST and weight with non-matching weight types: tropical and log
.ERROR: Prune: FST and weight with non-matching weight types: tropical and log
.ERROR: RmEpsilon: FST and weight with non-matching weight types: tropical and log
.ERROR: SetFinal: FST and weight with non-matching weight types: tropical and log
.....ERROR: ReadFstClass: Can't open file: nonexistent
.....FFFF.....EE..............ERROR: GenericRegister::GetEntry: nonexistent-arc.so: cannot open shared object file: No such file or directory
ERROR: CreateFstClass: Unknown arc type: nonexistent
.ERROR: StrToWeight: Bad weight: nonexistent
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: log and log64
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: tropical and log
.ERROR: StringFstToOutputLabels: State 1 has multiple outgoing arcs
.ERROR: StringToLabels: Unmatched ]
ERROR: Failed to compile string `Red Leicester]`, with token_type: byte
.ERROR: StringToLabels: Unmatched [
ERROR: Failed to compile string `[I'm afraid we're fresh out of Red Leicester sir`, with token_type: byte
...........................................................
==================================================================
ERROR: testDowncastTypesAreCorrect (main.DowncastTest)
Traceback (most recent call last):
File "pynini_test.py", line 168, in testDowncastTypesAreCorrect
f_downcast = Fst.from_pywrapfst(self.f)
TypeError: Argument 'fst' has incorrect type (expected _pywrapfst.Fst, got pywrapfst.VectorFst)
==================================================================
ERROR: testDowncastedMutationTriggersDeepCopy (main.DowncastTest)
Traceback (most recent call last):
File "pynini_test.py", line 172, in testDowncastedMutationTriggersDeepCopy
f_downcast = Fst.from_pywrapfst(self.f)
TypeError: Argument 'fst' has incorrect type (expected _pywrapfst.Fst, got pywrapfst.VectorFst)
==================================================================
ERROR: testGarbageInputTokenTypeStringPathIteratorRaisesFstArgError (main.ExceptionsTest)
Traceback (most recent call last):
File "pynini_test.py", line 284, in testGarbageInputTokenTypeStringPathIteratorRaisesFstArgError
unused_sp = StringPathIterator(self.f, input_token_type="nonexistent")
NameError: name 'StringPathIterator' is not defined
==================================================================
ERROR: testGarbageOutputTokenTypeStringPathIteratorRaisesFstArgError (main.ExceptionsTest)
Traceback (most recent call last):
File "pynini_test.py", line 288, in testGarbageOutputTokenTypeStringPathIteratorRaisesFstArgError
unused_sp = StringPathIterator(self.f, output_token_type="nonexistent")
NameError: name 'StringPathIterator' is not defined
==================================================================
ERROR: testStringPathLabelsWithEpsilons (main.StringPathIteratorTest)
Traceback (most recent call last):
File "pynini_test.py", line 720, in testStringPathLabelsWithEpsilons
sp = StringPathIterator(f)
NameError: name 'StringPathIterator' is not defined
==================================================================
ERROR: testStringPathsAfterFstDeletion (main.StringPathIteratorTest)
Traceback (most recent call last):
File "pynini_test.py", line 710, in testStringPathsAfterFstDeletion
sp = StringPathIterator(f)
NameError: name 'StringPathIterator' is not defined
==================================================================
FAIL: testByteToByteStringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 593, in testByteToByteStringFile
self.ContainsMapping("[Bel Paese]", mapper, "Sorry")
File "pynini_test.py", line 589, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testByteToSymbolStringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 622, in testByteToSymbolStringFile
self.ContainsMapping("[Bel Paese]", mapper, symc("Sorry"))
File "pynini_test.py", line 589, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testByteToUtf8StringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 601, in testByteToUtf8StringFile
self.ContainsMapping("[Bel Paese]", mapper, utf8("Sorry"))
File "pynini_test.py", line 589, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testUtf8ToUtf8StringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 610, in testUtf8ToUtf8StringFile
self.ContainsMapping(utf8("[Bel Paese]"), mapper, utf8("Sorry"))
File "pynini_test.py", line 589, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
Ran 145 tests in 0.058s
FAILED (failures=4, errors=6)
Thank you,
Michael
Update:
I rebuilt the Pynini 2.1.3 from source code and confirmed all the extensions were compiled:
/pynini-2.1.3$ python setup.py build_ext --debug install
I eliminated the Pynini tests/pynini_test.py unit test pywrapfst errors by removing the pywrapfst.so that was built and deployed by the openfst installation process:
/usr/local/lib/python3.6/site-packages$ rm -rf pywrapfst.so
I assume I should not have used the --enable-python configure flag when I installed openfst 1.8.0.
The 'import pywrapfst' in pynini_test.py now appears to be resolved from the Pynini 2.1.3 egg:
/usr/local/lib/python3.6/site-packagespynini-2.1.3-py3.6-linux-x86_64.egg
I fixed the 'StringPathIterator not defined' errors by changing way the StringPathIterator constructor is called pynini_tests.py:
def testGarbageInputTokenTypeStringPathIteratorRaisesFstArgError(self):
with self.assertRaises(FstArgError):
#unused_sp = StringPathIterator(self.f, input_token_type="nonexistent")
unused_sp = Fst.paths(self.f, input_token_type="nonexistent")
Why doesn't 'import pynini' allow calling the StringPathIterator() constructor directly instead of through the Fst instance?
I am still getting the same 4 unit test failures from pynini_test.py that I reported earlier:
mhenderson2@solr-1-vm:/mnt/disks/data/pynini-2.1.3/tests$ sudo python pynini_test.py
..ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
....ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
...ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
.
ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
........ERROR: Verify: FST destination state ID of arc at position 0 of state 0 is negative
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.
ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.............
ERROR: GenericRegister::GetEntry: nonexistent.so: cannot open shared object file: No such file or directory
ERROR: WeightClass: Unknown weight type: nonexistent
.ERROR: ComplementFst: Argument not an unweighted epsilon-free deterministic acceptor
ERROR: DifferenceFst: 1st argument not an acceptor
.
ERROR: AddArc: FST and weight with non-matching weight types: tropical and log
.
ERROR: Determinize: FST and weight with non-matching weight types: tropical and log
.ERROR: Disambiguate: FST and weight with non-matching weight types: tropical and log
.ERROR: Prune: FST and weight with non-matching weight types: tropical and log
.ERROR: RmEpsilon: FST and weight with non-matching weight types: tropical and log
.ERROR: SetFinal: FST and weight with non-matching weight types: tropical and log
.....ERROR: ReadFstClass: Can't open file: nonexistent
.....FFFF.....................
ERROR: GenericRegister::GetEntry: nonexistent-arc.so: cannot open shared object file: No such file or directory
ERROR: CreateFstClass: Unknown arc type: nonexistent
.ERROR: StrToWeight: Bad weight: nonexistent
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: log and log64
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: tropical and log
.ERROR: StringFstToOutputLabels: State 1 has multiple outgoing arcs
.ERROR: StringToLabels: Unmatched ]
ERROR: Failed to compile string `Red Leicester]`, with token_type: byte
.ERROR: StringToLabels: Unmatched [
ERROR: Failed to compile string `[I'm afraid we're fresh out of Red Leicester sir`, with token_type: byte
...........................................................
==================================================================
FAIL: testByteToByteStringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 595, in testByteToByteStringFile
self.ContainsMapping("[Bel Paese]", mapper, "Sorry")
File "pynini_test.py", line 591, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testByteToSymbolStringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 624, in testByteToSymbolStringFile
self.ContainsMapping("[Bel Paese]", mapper, symc("Sorry"))
File "pynini_test.py", line 591, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testByteToUtf8StringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 603, in testByteToUtf8StringFile
self.ContainsMapping("[Bel Paese]", mapper, utf8("Sorry"))
File "pynini_test.py", line 591, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
==================================================================
FAIL: testUtf8ToUtf8StringFile (main.StringFileTest)
Traceback (most recent call last):
File "pynini_test.py", line 612, in testUtf8ToUtf8StringFile
self.ContainsMapping(utf8("[Bel Paese]"), mapper, utf8("Sorry"))
File "pynini_test.py", line 591, in ContainsMapping
self.assertNotEqual(lattice.start(), NO_STATE_ID)
AssertionError: -1 == -1
Ran 145 tests in 0.058s
FAILED (failures=4)
Has anyone else tried building, installing and running pynini_test.py with any success??
Thank you,
Michael
An additional follow up note:
The testdata directory was missing from the Pynini 2.1.3 distribution so I copied it from the Pynini 2.1.2 distribution:
/pynini-2.1.3/tests/testdata/str.map
More of the unit tests are passing now in pynini_test.py but there are still errors being reported from the CDRewriteRule tests:
/pynini-2.1.3/tests$ sudo python pynini_test.py
..ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
....ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
...ERROR: CDRewriteRule::Compile: lambda must be a unweighted acceptor
.ERROR: CDRewriteRule::Compile: rho must be a unweighted acceptor
........ERROR: Verify: FST destination state ID of arc at position 0 of state 0 is negative
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.ERROR: State ID -1 not valid
.............ERROR: GenericRegister::GetEntry: nonexistent.so: cannot open shared object file: No such file or directory
ERROR: WeightClass: Unknown weight type: nonexistent
.ERROR: ComplementFst: Argument not an unweighted epsilon-free deterministic acceptor
ERROR: DifferenceFst: 1st argument not an acceptor
.ERROR: AddArc: FST and weight with non-matching weight types: tropical and log
.ERROR: Determinize: FST and weight with non-matching weight types: tropical and log
.ERROR: Disambiguate: FST and weight with non-matching weight types: tropical and log
.ERROR: Prune: FST and weight with non-matching weight types: tropical and log
.ERROR: RmEpsilon: FST and weight with non-matching weight types: tropical and log
.ERROR: SetFinal: FST and weight with non-matching weight types: tropical and log
.....ERROR: ReadFstClass: Can't open file: nonexistent
..............................ERROR: GenericRegister::GetEntry: nonexistent-arc.so: cannot open shared object file: No such file or directory
ERROR: CreateFstClass: Unknown arc type: nonexistent
.ERROR: StrToWeight: Bad weight: nonexistent
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: log and log64
.ERROR: CompileSymbolString: FST and weight with non-matching weight types: tropical and log
.ERROR: StringFstToOutputLabels: State 1 has multiple outgoing arcs
.ERROR: StringToLabels: Unmatched ]
ERROR: Failed to compile string `Red Leicester]`, with token_type: byte
.ERROR: StringToLabels: Unmatched [
ERROR: Failed to compile string `[I am afraid we are fresh out of Red Leicester sir`, with token_type: byte
...........................................................
Ran 145 tests in 0.060s
OK
Has anyone seen these errors reported related to the CDRewriteRule unit tests in pynini_test.py?
Thank you,
Michael
Hi Michael, sorry but I can't replicate. Could you try the Conda or PyPI installation path instead? (Conda works for Mac OS X and Linux; a fat PyPI precompiled binary with all dependencies is available for Linux x86_64 too.)
FYI: the "ERROR" logs are not failed tests: those are tests that (deliberately) raise error messages.
Hello,
I am trying to build 'pywrapfst' library for python using openfst 1.7.9.
After building it, when i 'import pywrapfst' from python 3.6, i get following error:
ImportError: /mnt/matylda5/iveselyk/SOFTWARE/openfst-1.7.9/lib/python3.6/site-packages/pywrapfst.so: undefined symbol: _ZTVN3fst8internal15SymbolTableImplE
Could it be that something important was not added into the *.so file?
I use this configure run:
OPENFST_CONFIGURE="--enable-static --enable-shared --enable-far --enable-ngram-fsts --enable-lookahead-fsts --with-pic --enable-python"
./configure --prefix=$PWD ${OPENFST_CONFIGURE} CXXFLAGS="-g -O2" LDFLAGS="-L/usr/local/lib64 -L/usr/lib64" LIBS="-ldl" PYTHON="python3.6"
And I add the dir with pywrapfst.so to $PYTHONPATH.
Thank you.
KV
I just realized the pywrapfst.so was loading outdated system-wide version of openfst libs.
I do a local compilation in my user folder (i don't have root permission).
Adding "-Wl,-rpath=$FST_LIB" to $LDFLAGS in ./configure call solved the problem.
Thanks,
KV
Does “fst::script::CompileFstInternal” have memory leakage?
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1) , Buster Raspbian,
<verbatim>
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/pi/jasper/openfst-1.7.7/src/script'
make[2]: Leaving directory '/home/pi/jasper/openfst-1.7.7/src/script'
Making install in bin
make[2]: Entering directory '/home/pi/jasper/openfst-1.7.7/src/bin'
/bin/bash ../../libtool --tag=CXX --mode=link g++ -std=c++11 -fno-exceptions -g -O2 -Wl,-no-as-needed -lm -ldl -o fstarcsort fstarcsort.o fstarcsort-main.o ../script/libfstscript.la ../lib/libfst.la -ldl
libtool: link: g++ -std=c++11 -fno-exceptions -g -O2 -Wl,-no-as-needed -o .libs/fstarcsort fstarcsort.o fstarcsort-main.o -lm ../script/.libs/libfstscript.so ../lib/.libs/libfst.so -ldl
/usr/bin/ld: ../script/.libs/libfstscript.so: undefined reference to `__atomic_fetch_or_8'
/usr/bin/ld: ../script/.libs/libfstscript.so: undefined reference to `__atomic_load_8'
/usr/bin/ld: ../script/.libs/libfstscript.so: undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
make[2]: * [Makefile:806: fstarcsort] Error 1
make[2]: Leaving directory '/home/pi/jasper/openfst-1.7.7/src/bin'
make[1]: * [Makefile:370: install-recursive] Error 1
make[1]: Leaving directory '/home/pi/jasper/openfst-1.7.7/src'
make: * [Makefile:426: install-recursive] Error 1
</verbatim>
I initially started trying to install a 1.3.4 version but after much poking, prodding and cussing, all my current attempts are with, I've tried the editing make.am files by removing the -lm marker after the LDADD and adding the line: AM_LDFLAGS = -Wl,-no-as-needed -lm -ldl, didn't help
The chunk below in configure.ac fails on cross-compiling with
<verbatim>
configure: error: in `/opt/kaldi/tools/openfst-1.7.7':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
</verbatim>
it would be nice to check cross-compiling mode and skip it at least.
<verbatim>
# Flags may be changed after configuring, so this is checked again by
# weight_test.cc. The check here is to save time in the common case,
# or when someone does not run `make check`.
AC_RUN_IFELSE([AC_LANG_PROGRAM([
#include <cstdio>
template <typename T>
bool FloatEqIsReflexive(T m) {
volatile T x = 1.111;
</verbatim>
Hi, all. I want to get the state table in ComposeFstImpl and I don't want to revise the code of openfst directly. So is there an easy way to write some code outside to get it?
If you want access to the state table, you construct it yourself, pass a pointer to it to construct a ComposeFstOptions struct, and then pass that ComposeFstOptions struct to ComposeFst(Impl). There's an example of this in OpenGrm-BaumWelch: http://opengrm.org/doxygen/baumwelch/html/cascade_8h_source.html
look up failed in shared object: olabel_lookahead-fst.so
Hi,all
I config openfst-1.6.1 with option --enable-lookahead-fsts and build&install recently. I got a error when read a Hclr.fst by the code "hcl_fst = fst::StdFst::Read(hcl_fst_rxfilename)",the error as list:<br>
<br>ERROR:GenericRegister::GetEntry:lookup failed in shared object:olabel_lookahead-fst.so.<br>
<br>ERROR:Fst::Read:Unknown FST type olabel_lookahead(arc type = standard): <unspecified>.Could anybody tell me what can i do to solve this?
The following program dumps core in AddSymbol in openfst-1.7.6 but works correctly in openfst-1.7.5 (and 1.6.7).
<verbatim>
#include <fst/symbol-table.h>
int main() {
fst::SymbolTable *syms = fst::SymbolTable::ReadText("some.syms");
syms->WriteText(std::cout);
int64 i0 = syms->AddSymbol("foo");
syms->WriteText(std::cout);
}
</verbatim>
<verbatim>
> g++ --version
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
</verbatim>
I use 'make -j 16' to compile thrax, appearing the following error.How to do?
n file included from walker/loader.cc:47:0:
./../include/thrax/stringfile.h: In member function 'bool thrax::function::StringFile<Arc>::ConvertStringToLabels(const string&, std::vector<typename Arc::Label>*, int, const fst::SymbolTable*) const':
./../include/thrax/stringfile.h:190:7: error: 'SplitToVector' is not a member of 'fst'
fst::SplitToVector(c_str, separator.c_str(), &vec, true);
My computer information:
"macOS catalina version 10.15.2
xcode: 11.3.1
clang: 11.0.0
python: 3.7 (install by homebrew)"
Instruction I followed:
"./configure --enable-python --enable-far
make
make install"
Everything is great but I cannot import pywrapfst
Then I use "pip3 install openfst" and get following error
Installing collected packages: openfst
Running setup.py install for openfst ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-install-3l5b46rq/openfst/setup.py'"'"'; file__='"'"'/private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-install-3l5b46rq/openfst/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-record-8e3n_zsl/install-record.txt --single-version-externally-managed --compile
cwd
/private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-install-3l5b46rq/openfst/ Complete output (526 lines): running install running build running build_ext building 'pywrapfst' extension creating build creating build/temp.macosx-10.15-x86_64-3.7 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pywrapfst.cc -o build/temp.macosx-10.15-x86_64-3.7/pywrapfst.o -std=c++11 -Wno-unneeded-internal-declaration -Wno-unused-function In file included from pywrapfst.cc:595: In file included from /usr/local/include/fst/fstlib.h:28: In file included from /usr/local/include/fst/expanded-fst.h:19: In file included from /usr/local/include/fst/fst.h:30: /usr/local/include/fst/symbol-table.h:243:24: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (pos < 0 || pos >= symbols_.Size()) return kNoSymbol; ~~~ ^ ~~~~~~~~~~~~~~~ /usr/local/include/fst/symbol-table.h:515:36: warning: comparison of integers of different signs: 'const ssize_t' (aka 'const long') and 'const size_t' (aka 'const unsigned long') [-Wsign-compare] bool Done() const { return (pos_ = nsymbols_); } ~~~~ ^ ~~~~~~~~~ /usr/local/include/fst/symbol-table.h:526:14: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (pos_ < nsymbols_) iter_item_.SetPosition(pos_); ~~~~ ^ ~~~~~~~~~ In file included from pywrapfst.cc:595: In file included from /usr/local/include/fst/fstlib.h:34: /usr/local/include/fst/const-fst.h:406:25: warning: comparison of integers of different signs: 'int64' (aka 'long long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (hdr.NumStates() num_states) { ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ /usr/local/include/fst/const-fst.h:410:23: warning: comparison of integers of different signs: 'int64' (aka 'long long') and 'size_t' (aka 'unsigned long') [-Wsign-compare] if (hdr.NumArcs() = num_arcs) { ~~~~~~~~~~~~~ ^ ~~~~~~~~ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:89:5: warning: unused variable 'arc_dispatched_operation_ArcSortArgsArcSortArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(ArcSort, Arc, ArcSortArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:156:1: note: expanded from here arc_dispatched_operation_ArcSortArgsArcSortArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:90:5: warning: unused variable 'arc_dispatched_operation_ClosureArgsClosureArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Closure, Arc, ClosureArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:161:1: note: expanded from here arc_dispatched_operation_ClosureArgsClosureArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:91:5: warning: unused variable 'arc_dispatched_operation_CompileFstArgsCompileFstInternalArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(CompileFstInternal, Arc, CompileFstArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:166:1: note: expanded from here arc_dispatched_operation_CompileFstArgsCompileFstInternalArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:92:5: warning: unused variable 'arc_dispatched_operation_ComposeArgsComposeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Compose, Arc, ComposeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:171:1: note: expanded from here arc_dispatched_operation_ComposeArgsComposeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:93:5: warning: unused variable 'arc_dispatched_operation_ConcatArgs1ConcatArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Concat, Arc, ConcatArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:176:1: note: expanded from here arc_dispatched_operation_ConcatArgs1ConcatArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:94:5: warning: unused variable 'arc_dispatched_operation_ConcatArgs2ConcatArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Concat, Arc, ConcatArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:181:1: note: expanded from here arc_dispatched_operation_ConcatArgs2ConcatArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:95:5: warning: unused variable 'arc_dispatched_operation_ConcatArgs3ConcatArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Concat, Arc, ConcatArgs3); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:186:1: note: expanded from here arc_dispatched_operation_ConcatArgs3ConcatArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:96:5: warning: unused variable 'arc_dispatched_operation_MutableFstClassConnectArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Connect, Arc, MutableFstClass); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:191:1: note: expanded from here arc_dispatched_operation_MutableFstClassConnectArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:97:5: warning: unused variable 'arc_dispatched_operation_ConvertArgsConvertArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Convert, Arc, ConvertArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:196:1: note: expanded from here arc_dispatched_operation_ConvertArgsConvertArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:98:5: warning: unused variable 'arc_dispatched_operation_DecodeArgsDecodeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Decode, Arc, DecodeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:201:1: note: expanded from here arc_dispatched_operation_DecodeArgsDecodeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:99:5: warning: unused variable 'arc_dispatched_operation_DeterminizeArgsDeterminizeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Determinize, Arc, DeterminizeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:206:1: note: expanded from here arc_dispatched_operation_DeterminizeArgsDeterminizeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:100:5: warning: unused variable 'arc_dispatched_operation_DifferenceArgsDifferenceArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Difference, Arc, DifferenceArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:211:1: note: expanded from here arc_dispatched_operation_DifferenceArgsDifferenceArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:101:5: warning: unused variable 'arc_dispatched_operation_DisambiguateArgsDisambiguateArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Disambiguate, Arc, DisambiguateArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:216:1: note: expanded from here arc_dispatched_operation_DisambiguateArgsDisambiguateArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:102:5: warning: unused variable 'arc_dispatched_operation_DrawArgsDrawArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Draw, Arc, DrawArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:221:1: note: expanded from here arc_dispatched_operation_DrawArgsDrawArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:103:5: warning: unused variable 'arc_dispatched_operation_EncodeArgsEncodeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Encode, Arc, EncodeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:226:1: note: expanded from here arc_dispatched_operation_EncodeArgsEncodeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:104:5: warning: unused variable 'arc_dispatched_operation_EpsNormalizeArgsEpsNormalizeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(EpsNormalize, Arc, EpsNormalizeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:4:1: note: expanded from here arc_dispatched_operation_EpsNormalizeArgsEpsNormalizeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:105:5: warning: unused variable 'arc_dispatched_operation_EqualArgsEqualArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Equal, Arc, EqualArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:9:1: note: expanded from here arc_dispatched_operation_EqualArgsEqualArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:106:5: warning: unused variable 'arc_dispatched_operation_EquivalentArgsEquivalentArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Equivalent, Arc, EquivalentArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:14:1: note: expanded from here arc_dispatched_operation_EquivalentArgsEquivalentArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:107:5: warning: unused variable 'arc_dispatched_operation_InitArcIteratorClassArgsInitArcIteratorClassArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(InitArcIteratorClass, Arc, ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:19:1: note: expanded from here arc_dispatched_operation_InitArcIteratorClassArgsInitArcIteratorClassArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:109:5: warning: unused variable 'arc_dispatched_operation_InitMutableArcIteratorClassArgsInitMutableArcIteratorClassArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(InitMutableArcIteratorClass, Arc, ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:24:1: note: expanded from here arc_dispatched_operation_InitMutableArcIteratorClassArgsInitMutableArcIteratorClassArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:111:5: warning: unused variable 'arc_dispatched_operation_InitStateIteratorClassArgsInitStateIteratorClassArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(InitStateIteratorClass, Arc, ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:29:1: note: expanded from here arc_dispatched_operation_InitStateIteratorClassArgsInitStateIteratorClassArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:113:5: warning: unused variable 'arc_dispatched_operation_InfoArgsInfoArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Info, Arc, InfoArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:34:1: note: expanded from here arc_dispatched_operation_InfoArgsInfoArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:114:5: warning: unused variable 'arc_dispatched_operation_IntersectArgsIntersectArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Intersect, Arc, IntersectArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:39:1: note: expanded from here arc_dispatched_operation_IntersectArgsIntersectArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:115:5: warning: unused variable 'arc_dispatched_operation_MutableFstClassInvertArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Invert, Arc, MutableFstClass); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:44:1: note: expanded from here arc_dispatched_operation_MutableFstClassInvertArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:116:5: warning: unused variable 'arc_dispatched_operation_IsomorphicArgsIsomorphicArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Isomorphic, Arc, IsomorphicArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:49:1: note: expanded from here arc_dispatched_operation_IsomorphicArgsIsomorphicArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:120:5: warning: unused variable 'arc_dispatched_operation_MapArgsMapArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Map, Arc, MapArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:54:1: note: expanded from here arc_dispatched_operation_MapArgsMapArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:121:5: warning: unused variable 'arc_dispatched_operation_MinimizeArgsMinimizeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Minimize, Arc, MinimizeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:59:1: note: expanded from here arc_dispatched_operation_MinimizeArgsMinimizeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:122:5: warning: unused variable 'arc_dispatched_operation_PrintArgsPrintArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Print, Arc, PrintArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:64:1: note: expanded from here arc_dispatched_operation_PrintArgsPrintArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:123:5: warning: unused variable 'arc_dispatched_operation_ProjectArgsProjectArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Project, Arc, ProjectArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:69:1: note: expanded from here arc_dispatched_operation_ProjectArgsProjectArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:124:5: warning: unused variable 'arc_dispatched_operation_PruneArgs1PruneArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Prune, Arc, PruneArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:74:1: note: expanded from here arc_dispatched_operation_PruneArgs1PruneArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:125:5: warning: unused variable 'arc_dispatched_operation_PruneArgs2PruneArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Prune, Arc, PruneArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:79:1: note: expanded from here arc_dispatched_operation_PruneArgs2PruneArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:126:5: warning: unused variable 'arc_dispatched_operation_PushArgs1PushArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Push, Arc, PushArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:84:1: note: expanded from here arc_dispatched_operation_PushArgs1PushArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:127:5: warning: unused variable 'arc_dispatched_operation_PushArgs2PushArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Push, Arc, PushArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:89:1: note: expanded from here arc_dispatched_operation_PushArgs2PushArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:128:5: warning: unused variable 'arc_dispatched_operation_RandEquivalentArgsRandEquivalentArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(RandEquivalent, Arc, RandEquivalentArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:3:1: note: expanded from here arc_dispatched_operation_RandEquivalentArgsRandEquivalentArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:129:5: warning: unused variable 'arc_dispatched_operation_RandGenArgsRandGenArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(RandGen, Arc, RandGenArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:8:1: note: expanded from here arc_dispatched_operation_RandGenArgsRandGenArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:130:5: warning: unused variable 'arc_dispatched_operation_RelabelArgs1RelabelArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Relabel, Arc, RelabelArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:13:1: note: expanded from here arc_dispatched_operation_RelabelArgs1RelabelArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:131:5: warning: unused variable 'arc_dispatched_operation_RelabelArgs2RelabelArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Relabel, Arc, RelabelArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:18:1: note: expanded from here arc_dispatched_operation_RelabelArgs2RelabelArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:132:5: warning: unused variable 'arc_dispatched_operation_ReplaceArgsReplaceArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Replace, Arc, ReplaceArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:23:1: note: expanded from here arc_dispatched_operation_ReplaceArgsReplaceArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:133:5: warning: unused variable 'arc_dispatched_operation_ReverseArgsReverseArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Reverse, Arc, ReverseArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:28:1: note: expanded from here arc_dispatched_operation_ReverseArgsReverseArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:134:5: warning: unused variable 'arc_dispatched_operation_ReweightArgsReweightArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Reweight, Arc, ReweightArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:33:1: note: expanded from here arc_dispatched_operation_ReweightArgsReweightArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:135:5: warning: unused variable 'arc_dispatched_operation_RmEpsilonArgsRmEpsilonArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(RmEpsilon, Arc, RmEpsilonArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:38:1: note: expanded from here arc_dispatched_operation_RmEpsilonArgsRmEpsilonArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:136:5: warning: unused variable 'arc_dispatched_operation_ShortestDistanceArgs1ShortestDistanceArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(ShortestDistance, Arc, ShortestDistanceArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:43:1: note: expanded from here arc_dispatched_operation_ShortestDistanceArgs1ShortestDistanceArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:137:5: warning: unused variable 'arc_dispatched_operation_ShortestDistanceArgs2ShortestDistanceArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(ShortestDistance, Arc, ShortestDistanceArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:48:1: note: expanded from here arc_dispatched_operation_ShortestDistanceArgs2ShortestDistanceArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:138:5: warning: unused variable 'arc_dispatched_operation_ShortestPathArgsShortestPathArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(ShortestPath, Arc, ShortestPathArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:53:1: note: expanded from here arc_dispatched_operation_ShortestPathArgsShortestPathArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:139:5: warning: unused variable 'arc_dispatched_operation_SynchronizeArgsSynchronizeArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Synchronize, Arc, SynchronizeArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:58:1: note: expanded from here arc_dispatched_operation_SynchronizeArgsSynchronizeArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:140:5: warning: unused variable 'arc_dispatched_operation_TopSortArgsTopSortArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(TopSort, Arc, TopSortArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:63:1: note: expanded from here arc_dispatched_operation_TopSortArgsTopSortArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:141:5: warning: unused variable 'arc_dispatched_operation_UnionArgs1UnionArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Union, Arc, UnionArgs1); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:68:1: note: expanded from here arc_dispatched_operation_UnionArgs1UnionArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:142:5: warning: unused variable 'arc_dispatched_operation_UnionArgs2UnionArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Union, Arc, UnionArgs2); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:73:1: note: expanded from here arc_dispatched_operation_UnionArgs2UnionArc_registerer ^ In file included from pywrapfst.cc:596: /usr/local/include/fst/script/fstscript.h:143:5: warning: unused variable 'arc_dispatched_operation_VerifyArgsVerifyArc_registerer' [-Wunused-variable] REGISTER_FST_OPERATION(Verify, Arc, VerifyArgs); ^ /usr/local/include/fst/script/script-impl.h:150:7: note: expanded from macro 'REGISTER_FST_OPERATION' arc_dispatched_operation_##ArgPack##Op##Arc##_registerer ^ <scratch space>:78:1: note: expanded from here arc_dispatched_operation_VerifyArgsVerifyArc_registerer ^ pywrapfst.cc:17194:16: error: no member named 'DrawFst' in namespace 'fst::script' fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_v_self->_fst.get()->InputSymbols(), __pyx_v_self->_fst.get()->OutputSymbols(), NULL, (__pyx_v_self->_fst.get()->Properties(fst::kAcceptor, 1) == fst::kAcceptor), __pyx_k__24, 8.5, 11.0, 1, 0, 0.4, 0.25, 14, 5, __pyx_k_g, 0, (&__pyx_v_sstrm), __pyx_k_repr_svg); ~~~~~~~~~~~~~^ pywrapfst.cc:18796:16: error: no member named 'DrawFst' in namespace 'fst::script' fst::script::DrawFst((*__pyx_v_self->_fst), __pyx_t_21, __pyx_t_22, __pyx_v_ssymbols_ptr, __pyx_v_acceptor, __pyx_t_17, __pyx_v_width, __pyx_v_height, __pyx_v_portrait, __pyx_v_vertical, __pyx_v_ranksep, __pyx_v_nodesep, __pyx_v_fontsize, __pyx_v_precision, __pyx_t_23, __pyx_v_show_weight_one, __pyx_v_ostrm.get(), __pyx_v_filename_string); ~~~~~~~~~~~~~^ 54 warnings and 2 errors generated. error: command 'clang' failed with exit status 1 ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-install-3l5b46rq/openfst/setup.py'"'"'; file__='"'"'/private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-install-3l5b46rq/openfst/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/5d/hq7yj4_x1wngp7zqmxs2ylw80000gn/T/pip-record-8e3n_zsl/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
If you compile with `--enable-pywrapfst` and `make install` completes, then it has installed `pywrapfst.so` somewhere on your system. (It uses autoconf macros to guess where to install.) You have to track it down (though it'll be logged by the installation) and make sure it's in your Python import path.
Don't install from pip if you built Pywrapfst yourself.
I need to make some code that will compile with old and new versions of OpenFST. Is there an OpenFST version number defined somewhere in the header files so I can deail with non-backwards compatible changes (i.e., moving FstImpl to the internal namespace in 1.6.0)?
Using openfst while also using pytorch in a project is extremely annoying due to both using FLAGS_v. I've got around it by making changes but it would be nice if this problem could be fixed at the source.
I compiled openfst version 1.7.2 with cygwin like this:
export CFLAGS=-D_POSIX_SOURCE
export CXXFLAGS="-O -D_POSIX_SOURCE"
./configure --enable-grm
make LDFLAGS=-no-undefined
make install
However, when I try to run the command line tools, all the program flags are missing. Here I want to use the --symbols flag but it is not recognized and not found in the help too:
$farcompilestrings.exe --help
Compiles a set of strings as FSTs and stores them in a finite-state archive.
Usage:farcompilestrings [in1.txt [[in2.txt ...] out.far]]
PROGRAM FLAGS:
LIBRARY FLAGS:
Flags from: flags.cc
--help: type = bool, default = false
show usage information
--helpshort: type = bool, default = false
show brief usage information
--tmpdir: type = string, default = "/tmp"
temporary directory
.........................................................
I found that his was a known issue and was fixed in 1.6.8, however I have this behavior with that version too. I wasn't able to test 1.7.3 due to a compiling error.
Any idea what I am missing here?
The first step of minimization is to normalize the distribution of the weights along the paths using weight pushing. Weight pushing itself calls ShortestDistance which does not terminate on this example because there are cycles with (strictly) negative weights.
Since there are no cycles with (strictly) positive weights in this Fst, one could negate all the weights, minimize and negate all the weights in the result, essentially minimizing in the (max, +) semiring:
Hi,
As far as I can see not SortedMatcher nor HashMatcher don't handle epsilon transitions. Both don't see explicit transitions. Should I remove all epsilon transition before matching or write my own matcher? In case of latter why "default" matchers behave such a way?
Best,
Andrey
The default matcher is SortedMatcher when at least one side of the composition is arc-sorted, and it does support epsilons (if matching on the input side then epsilsons match an imlicit self loop in addition to any actually epsilon transitions, and respectively when matching on the output side).
Hi,
How can I build an acceptor to properly handle ranges, e.g. "a[b..c]d"?
Of course the obvious solution would be to generate enough arcs to handle every value within a range, but it can be optimized, e.g. with the custom arc type. Any suggestions?
Best,
Andrey
You could create a matcher (see doc) that treats certain labels as ranges. Labels need to be integers but you encode the label range in there (e.g. high bits for begin vs low bits for end).
This could then be used with composition to effect the range interpretation. It'd be somewhat similar to how e.g. RhoMatcher is written where a new label represents the complement of the other labels on transitions at a state.
Hi,
Why epsilon is hardcoded to 0? Given unicode code points are in range `[0x0 .. 0x10ffff]` it seems to be impossible to correctly process min code point? Am I right?
Best,
Andrey
Hi,
I have to migrate a Python software using pynini to a public cloud.
I wish I could use Function as a Service, but that requires all dependencies to be available on PyPI.
Do you plan to make pynini available on PyPI?
Thanks a lot,
Benoit
There are two ways to do this:
* I could put the source up there anyways but it won't work unless you have both current headers and libs installed in the normal location.
* Alternatively I coudl set it up so that it first downloads and compiled a current OpenFst as part of the process. I looked into doing this and I couldn't find any useful documentation on how to go about this, but I would welcome help.
In the meantime some of my colleagues have had good look setting it up inside Docker.
Pynini is now available on Conda-Forge for Linux and Mac OS X. This system builds the code and performs continuous integration testing, so that installation is as simple as downloading and moving the assets to the correct paths. (There's nothing similar for PyPI.) If you have Conda (Anaconda or Miniconda) installed, issue the following command:
conda install -c conda-forge pynini
Vagrant environment for a quick OpenFST /OpenGRM setup
Recently I published a Vagrant environment for a quick OpenFST/OpenGRM setup at https://github.com/wincentbalin/opengrm-vagrant. The whole package compilation process was put into a separate shell script.
If you already use Vagrant and need a quick automated setup of OpenFST/OpenGRM libraries and tools, feel free to check it out!
Same problem
As far as I understand you simply need newer gcc, that old one doesn't work. the patch like this helps with older gcc but breaks newer ones:
a/src/include/fst/weight.h
+++ b/src/include/fst/weight.h
@@ -202,7 +202,7 @@ class NaturalLess<W, typename std::enable_if<!IsIdempotent<W>::value>::type> {
// Power is the iterated product for arbitrary semirings such that Power(w, 0)
// is One() for the semiring, and Power(w, n) = Times(Power(w, n - 1), w).
template <class Weight>
-Weight Power(const Weight &weight, size_t n) {
+constexpr Weight Power(const Weight &weight, size_t n) {
auto result = Weight::One();
for (size_t i = 0; i < n; ++i) result = Times(result, weight);
return result;
I'm trying to build OpenFST 1.7.0 for use on a Raspberry Pi. I'm using the following configure:
./configure --enable-static --enable-shared --enable-far --enable-lookahead-fsts --enable-const-fsts --enable-pdt --enable-ngram-fsts --enable-linear-fsts --prefix=/usr
and getting the following error back:
In file included from ./../include/fst/arc.h:16:0,
from ./../include/fst/fst.h:26,
from fst.cc:6:
./../include/fst/float-weight.h:229:1: error: non-constant condition for static assertion
static_assert(TropicalWeight::NoWeight().Member(), "NoWeight not member");
^~~~~~~~~~~~~
./../include/fst/float-weight.h:229:49: in constexpr expansion of ‘fst::TropicalWeightTpl<T>::NoWeight<float>().fst::TropicalWeightTpl<T>::Member<float>()’
./../include/fst/float-weight.h:208:20: error: ‘(+QNaNf >= -3.40282347e+38f)’ is not a constant expression
return Value() > Limits::NegInfinity();
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Makefile:460: recipe for target 'fst.lo' failed
At first I thought this was an architecture issue, but when I tried building on an x86_32 and my primary x86_64 system I got the exact same issue. I've searched the internet and read through the INSTALL, README and NEWS, but don't see anything specifically addressing this. Do I need to be passing an additional argument to the compiler?
Thanks!
Additional: I guess I can't edit a post after submitting it.
The error occurs during "make" not during configure.
<verbatim>
In file included from ./../include/fst/arc.h:16:0,
from ./../include/fst/fst.h:26,
from fst.cc:6:
./../include/fst/float-weight.h:229:1: error: non-constant condition for static assertion
static_assert(TropicalWeight::NoWeight().Member(), "NoWeight not member");
^~~~~~~~~~~~~
./../include/fst/float-weight.h:229:49: in constexpr expansion of ‘fst::TropicalWeightTpl<T>::NoWeight<float>().fst::TropicalWeightTpl<T>::Member<float>()’
./../include/fst/float-weight.h:208:20: error: ‘(+QNaNf >= -3.40282347e+38f)’ is not a constant expression
return Value() > Limits::NegInfinity();
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Makefile:460: recipe for target 'fst.lo' failed
</verbatim>
You can just comment out those lines in float-weight.h if they're missing. The C++11 spec says all the pieces ought to be available, so your compiler is probably non-conformant.
Aaron, could you tell us what compiler and C++ library you are using? If $CXX refers to your c++ compiler, you could run
$CXX --version
echo "#include <cstddef>" | $CXX -E -x c++ -std=c++11 -v - 2>&1
to get the compiler version and information about the standard library.
Thanks for that link. Very helpful!
As Kyle mentioned above, you can simply comment out or remove the static_assert lines in float-weight.h. That should be entirely harmless, and we'll most likely (re)move those lines very soon.
With the static_assert's present, the best working hypothesis is that there is some misunderstanding or disagreement about which expressions are in fact constexpr in C++11. Your compilation fails for static_assert(TropicalWeight::NoWeight().Member(), "NoWeight not member"), which involves the expanded subexpression (+QNaNf >= -3.40282347e+38f) which the compiler considers to not be a constant expression. Either way, that's a problem. If the compiler is right, that's most definitely a problem; if the compiler is wrong, it still requires a workaround.
Thanks for getting back to me, Martin!
I have tried with different versions of GCC and can reproduce the issue on GCC 8.2.1, 7.4.0, 6.5.0 and 5.5.0. Basically, I have not been able to compile it with any of the versions I have tried. Which compiler are you using?
To make it easier to test different versions of the compiler, I have created a Dockerfile for the project. The file along with usage instructions can be found here: https://gist.github.com/DewaldDeJager/ef2a5845866f8008d6540b7dd72eb4cd
I am the maintainer of OpenFst on the Arch User Repository and the packaging script downloads OpenFst directly from the website to the user's computer. As such, it is impractical for me to remove the static asserts from the source code before the code gets compiled on the user's computer.
Thank you for the help =)
@KyleGorman Unfortunately not really. I could pull a patched version of float-weight.h but for security reasons it would be best if I could pull the patch from the OpenFst website and verify it with the checksums.
@MartinJansche@KyleGorman Any news? Is there any public facing Git repo with the source? I'm even willing to make the patch myself. All I've found is an outdated mirror on Martin's GitHub profile.
On a side note, is there anything that can be done to stop these annoying spam forum posts? Perhaps a CAPTCHA step during registration?
Access control: