, H2 = Internal::mod_range_hashing, H = Internal::default_ranged_hash, RehashPolicy = Internal::prime_rehash_policy, bool cache_hash_code = false, bool mutable_iterators = true, bool unique_keys = true]' discards qualifiers
make[3]: * [replace.lo] Error 1
BTW, I know about this:
http://openfst.cs.nyu.edu/twiki/bin/view/FST/CompilingOnMacOSX
did the relevant updates, and was fine compiling 1.1
I'll look into this but in the meantime I recommend you use the first work-around mentioned on the page: using gcc 4.2 from Fink instead of Apple's old gcc version.
Richard and I traced down the issue to an other bug in gcc 4.0 TR1 implementation. An updated hashtable
header file is available at FST.CompilingOnMacOSX.
Application of RTNs?
OpenFst provides the Replace() and ReplaceFst() operations that take an RTN (an Fst wherein some of the output labels are references to subnetworks, i.e. are non-terminals) and replaces each such reference with a copy of the referred-to subnetwork. The replacement operations appear to function well, turning an RTN into a normal Fst. Is there any support for applying an RTN to input without first performing a Replace()ment? Thanks.
ReplaceFst is a delayed representation. Copying it into a VectorFst will perform the replacement. Composing your input with the ReplaceFst is what you want.
Mindtuning for PDT?
A colleague and I are trying to understand the experimental library for Push Down Transducers (PDTs) in OpenFst 1.2. What does this mean: "some transitions are open or close parentheses"? Could some kind soul post a small example showing what the transition labels really look like? Thanks
Each pair of opening and closing parentheses represents a stack symbol. The opening parenthesis corresponds to pushing that stack symbol on the stack, the closing parenthesis corresponds to poping that symbol from the stack.
pre-determinization
Are there any tool in openfst that i can use to predeterminization any fst?
Unfortunately, I don't know of any such tool.
fstepsnormalize
When calling fstepsnormalize for the composed fst for L and G, the memory increases regularly to the available size of my server (48GB) and killed by the Linux system. The sizes of my L and G fsts are 4MB and 31MB respectively.
is there anyone encounter the same problem?
fstcompose output
Hi,
I have two fst file, both of them are right. when they are composed by fstcompose the output file size is 66k and when i use fstprint and convert it to text mode, there is nothing there and file is empty.
can you give me any hint about this problem?
Thanks so much
Ali
You can use 'fstinfo' or traverse the fst using state/arcs iterators using c++ lib.
Expose the guts and you'll know whats going on.
Thanks i found the problem
BlueSky - 29 Oct 2010 - 05:15
Hi, I am new with fst, I have the same problem. I am trying to compose 2fsts, the fist one is "cot" and the second one {cat, car,come}. I could not get any composition's output. I used the fst info, the input/output symbol table are none. Although, some arcs should be composed.
Thanks a lot, Memo
Compiling openfst-1.2 on cygwin
Has anyone compiled openfst-1.2 (recently released) on cygwin?
As suggested a year ago for openfst-1.1, I did:
./configure CXX=g++-4.exe CC=gcc-4.exe --prefix=$HOME/local
make
#make install # <--- I haven't made it here though.
Make aborts with the error message:
g++-4.exe -g -O2 -o fstarcsort.exe fstarcsort.o -ldl ../lib/.libs/libfst.a ../script/.libs/libfstscript.a /usr/lib/gcc/i686-pc-cygwin/4.3.4/libstdc++.dll.a -L/usr/lib/gcc/i686-pc-cygwin/4.3.4 -L/usr/lib/gcc/i686-pc-cygwin/4.3.4
../script/.libs/libfstscript.a(fst-class.o):fst-class.cc:(.text$_ZN3fst16CompatPropertiesEyy[fst::CompatProperties(unsigned long long, unsigned long long)]+0x143): undefined reference to `fst::PropertyNames'
~~~----ETCETERA----~~~
collect2: ld returned 1 exit status
make[3]: *** [fstarcsort.exe] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
so it looks as if the linker doesn't find the definition of CompatProperties.
I must add that the following warning occurs twice during Make:
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
Once here:
/bin/sh ../../libtool --tag=CXX --mode=link g++-4.exe -g -O2 -version-info 0:0:0 -o libfst.la -rpath /usr/local/lib compat.lo flags.lo fst.lo properties.lo symbol-table.lo util.lo
and once again here:
/bin/sh ../../libtool --tag=CXX --mode=link g++-4.exe -g -O2 -version-info 0:0:0 -o libfstscript.la -rpath /usr/local/lib arcsort.lo closure.lo compile.lo compose.lo concat.lo connect.lo convert.lo decode.lo determinize.lo difference.lo draw.lo encode.lo epsnormalize.lo equal.lo equivalent.lo fst-class.lo info.lo intersect.lo invert.lo map.lo minimize.lo print.lo project.lo prune.lo push.lo randequivalent.lo randgen.lo relabel.lo replace.lo reverse.lo reweight.lo rmepsilon.lo script-impl.lo shortest-distance.lo shortest-path.lo synchronize.lo text-io.lo topsort.lo union.lo weight-class.lo
I am getting this problem too. Currently I am investigating whether adding -no-undefined to all the *_la_LDFLAGS variables in the Makefiles in the subdirectories will fix this problem.
Dan
BTW, this didn't work.
yeah, setting LDFLAGS="-no-undefined" took care of the warnings, but an error of similar nature remains.
A co-worker suggested adding the following options to configure: --enable-static --disable-shared
BTW, this didn't work. It seems it still tried to build the shared libraries. Somehow configure didn't correctly accept the options.
PaulDixon - 21 Aug 2010 - 00:21
I have most of version 1.2 compiling under VS2010, just the far and pushdown transducers are missing. I put the port so far here:
www.furui.cs.titech.ac.jp/~dixonp/openfstwin-1.2-210810.zip
It includes prebuilt 32-bit binaries that should also work under cygwin. It's all 1.2 code the 1.1 directory name still needs to be changed.
Thanks, Paul.
Following up on the cygwin issue:
A co-worker was able to work-around this problem as follows by manually changing some of the compile commands. For example,
Not sure what it is. It looks like some stuff is missing from the lib archives. But I was able to compile arcsort by hand, the others are probably the same.
Instead of (from src/bin): /bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -lm -ldl -o fstarcsort.exe fstarcsort.o ../lib/libfst.la ../script/libfstscript.la I went to that dir and did by hand: /bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -lm -ldl -o fstarcsort.exe fstarcsort.o ../script/libfstscript.la ../lib/*.o ../lib/libfst.la
I've just started experimenting with ReplaceFst(). The following script defines three Fsts, with cyclic dependencies. The line
if (ReplaceFst<StdArc>(pairlabelfsts, slabel).CyclicDependencies()) { ...}
returns true, apparently detecting the cyclic dependencies correctly.
Question: Have I used the proper idioms for testing for cyclic dependencies and doing the actual replacement?
#include <fst/fstlib.h>
#include <iostream>
using namespace fst ;
int main() {
std::cout << "Hello, world!\n" ;
int a = 97 ; // code point values
int b = 98 ;
// example with cyclic dependencies
// StdVectorFst is a typedef for VectorFst<StdArc>
StdVectorFst fst1, fst2, fst3 ;
// define fst1, a subnetwork (will be arbitrarily associated with -1)
fst1.AddState() ; // return 0
fst1.SetStart(0) ;
fst1.AddState() ; // returns 1
fst1.AddState() ; // returns 2
fst1.SetFinal(2, StdArc::Weight::One()) ;
fst1.AddArc(0, StdArc(a, a, StdArc::Weight::One(), 1)) ;
// fst1 refers to fst2 (associated below with -2)
fst1.AddArc(1, StdArc(0, -2, StdArc::Weight::One(), 2)) ;
// src i o w dest
// define fst2, a subnetwork (will be arbitrarily associated with -2)
fst2.AddState() ; // return 0
fst2.SetStart(0) ;
fst2.AddState() ; // return 1
fst2.AddState() ; // return 2
fst2.SetFinal(2, StdArc::Weight::One()) ;
fst2.AddArc(0, StdArc(b, b, StdArc::Weight::One(), 1)) ;
// fst2 refers to fst1 (associated below with -1)
fst2.AddArc(1, StdArc(0, -1, StdArc::Weight::One(), 2)) ;
// define fst3, the base network (will be arbitrarily associated with -3)
fst3.AddState() ; // return 0
fst3.SetStart(0) ;
fst3.AddState() ; // return 1
fst3.AddState() ; // return 2
fst3.SetFinal(2, StdArc::Weight::One()) ;
// add arcs with "references" to subnetworks
// output-side -1 will be associated with fst1
// output-side -2 will be associated with fst2
// The label references to subnetworks are on the Output Side.
// The corresponding Input-Side labels can be anything (here 0 for epsilon).
fst3.AddArc(0, StdArc(0, -1, StdArc::Weight::One(), 1)) ;
fst3.AddArc(1, StdArc(0, -2, StdArc::Weight::One(), 2)) ;
// src i o w dest
// set up the vector associating arbitrary numbers with the three networks
// -1 refers to fst1
vector< pair< StdArc::Label, const Fst<StdArc> * > > pairlabelfsts ;
pairlabelfsts.push_back(pair< StdArc::Label, const Fst<StdArc> *>(-1, &fst1) ) ;
// -2 refers to fst2
pairlabelfsts.push_back(pair< StdArc::Label, const Fst<StdArc> *>(-2, &fst2) ) ;
// -3 is the base network
pairlabelfsts.push_back(pair< StdArc::Label, const Fst<StdArc> *>(-3, &fst3) ) ;
StdArc::Label slabel = -3 ; // specifies the "base" Fst, which is fst3
fst3.Write("before.fst") ; // the network with references
// Using delayed ReplaceFst
if (ReplaceFst<StdArc>(pairlabelfsts, slabel).CyclicDependencies()) {
std::cout << "Has cyclic dependencies.\n" ;
} else {
std::cout << "No cyclic dependencies.\n" ;
StdVectorFst expandedFst ; // the result
// slabel (here -3) is used to find the base Fst supplied in pairlabelfsts
expandedFst = ReplaceFst<StdArc>(pairlabelfsts, slabel) ;
expandedFst.Write("intermediate.fst") ; // the network just after ReplaceFst()
RmEpsilon(&expandedFst) ;
expandedFst.Write("after.fst") ; // the network after RmEpsilon()
}
std::cout << "Good-bye, world!\n" ;
}
Yes, this looks correct to me.
Best, Cyril
Multithreading in OpenFST
AlbertPark - 09 Jul 2010 - 18:30
Hi,
I am currently using the OpenFST library, and I was thinking of multithreading my program, and I was curious as to whether the OpenFST library currently supports multithreading. Thank you!
Albert
AlbertPark - 21 Jul 2010 - 04:13
As I haven't gotten a response yet, this is a self-reply to my question.
I've gone through looking at the implementation and from what I can tell the OpenFST library currently is not multithreading safe. I've resorted to doing a deep copy of FSTs for each thread. Unfortunately, doing a deep copy was not as straightforward as I thought it would be, or at least I couldn't figure out how to do it elegantly and quickly (The FST I am reading in is very large, and trying to read in the FST multiple times takes much longer than I want). I tried doing a deep copy using Map() with the IdentityMapper as mentioned in a previous post, but found that this only does deep copies of the arcs (given the copy constructor of the Arc and Weight do deep copies), and does a shallow copy of the symbol table, which creates problems for multithreading (when multiple threads try to access the symbol table at once).
I'm not sure if there is an easier way to do this, but here is what I did to change the OpenFST code to support deep copying of the symbol table. I added a new enum code in map.h to MAP_SYMBOLS_ACTION as well as a couple of lines of code for supporting symbol table deep copying, added a function to do a deep copy of the symbol table to symbol-table.h. Finally, I added a Mapper almost identical to the identity mapper, but returns the new enum code for InputSymbolsAction() and OutputSymbolsAction().
Hope this helps anybody trying to multithread!
OpenFst is meant to be thread compatible/safe in the sense that if you use the method Copy(true) to copy FSTs then different threads can read the each of those. This is a 'deep'
copy only as deep as needed for this to work. NOTE HOWEVER IT IS NECESSARY TO IMPLEMENT the classes in lock.h in a non-trivial way at your site. Do so and the behavior as described will work.
BTW, these comments may apply more to OpenFst 1.2 - very soon to be released. Don't remember how complete 1.1 was in this respect.
memory problem in fstcompose
Hi,
i use openfst in HTS 2.1.1 . i just compile two fst by a symbol table in AT&T format:
0
#_f0 1
#_m0_s2 2
#_m0_s3 3
#_m0_s4 4
#_m0_s5 5
#_m0_s6 6
e$_f0 7
e$_m1_s2 8
e$_m1_s3 9
e$_m1_s4 10
e$_m1_s5 11
e$_m1_s6 12
.
.
.
ow_f6037 170654
s$_f6037 170655
k_f6037 170656
u_f6037 170657
i_f6037 170658
s_f6037 170659
v_f6037 170660
h_f6037 170661
c$_f6037 170662
j_f6037 170663
z$_f6037 170664
its size is about 2.5Mb. then i run the below command successfully:
fstcompile --isymbols=a.sym --osymbols=a.sym tmp1.fst
fstcompile --isymbols=a.sym --osymbols=a.sym tmp2.fst
then i want to compose them and run this:
fstcompose tmp2.fst tmp3.fst tmp4.fst
when the symbol number is little the composition is done but in some symbol files the symbol number is very large, for example 170655. in this case, the memory is fulled rapidly and the CPU doesn't work any more.
this is my system properties:
CPU: Pentium 4 Dual core 2.26GHz
Ram: 4G
Swap: 15G
OS: CentOS 5.3
could you please give me suggestions about the case?
Thanks a lot
-Ali
PaulDixon - 08 Jul 2010 - 21:52
Have you tried arc sorting the fsts before composing?
fstarcsort -sort_type=olabel tmp2.fst > sort2.fst
fstarcsort -sort_type=ilabel tmp3.fst > sort3.fst
fstcompose sort2.fst sort3.fst > tmp4.fst
I tested your solution, but the problem remains yet.
i think my fst model is big. the size of tmp2.fst and tmp3.fst are 147MB and 1.5M.
Do you think my Ram memory enough to this process?
if your answer is no, approximately, how much Ram does need ?
Thanks for your attention
-Ali
i encounter almost the same problem. when fstepsnormalize running, it takes more than 50GB, and killed by the system. the gram fsm 31MB, lexicon fsm 4MB.
did you figure out what the problem was ?
Hi,
I make a composition of 3 transducers F o G o H and I extract the ShortedPath on the resulting transducer. Is there a way to have access to the arcs in F, G and H corresponding to the arcs in the ShortestPath transducer ? I would like to have access to the output symbols of the arcs in F for example.
thank you,
--
Chris
DoganCan - 27 Apr 2010 - 09:59
Hi Chris,
There may be better solutions to your problem provided by the library but a quick solution is:
1. remove the weights of the shortestpath fst, S = shortest(F o G o H), and project it onto the input and output labels
fstmap -map_type=rmweight s.fst | fstproject > s.in.fst
fstmap -map_type=rmweight s.fst | fstproject -project_output > s.out.fst
2. compose shortest input with F and project the result onto the output labels to get the candidate paths in F
compose shortest output with H and project the result onto the input labels to get the candidate paths in H
fstcompose s.in.fst f.fst | fstproject -project_output > f.out.fst
fstcompose h.fst s.out.fst | fstproject > h.in.fst
3. compose the candidate paths with G (F_out o G o H_in) to obtain the paths in G that survive during the composition
fstcompose f.out.fst g.fst | fstcompose - h.in.fst > internal.fst
4. finally apply shortestpath to this fst to obtain the path in G internal to the shortest path in F o G o H
fstshortestpath internal.fst > shortest.internal.fst
This final transducer should provide the internal path you need. Note that the weights of this transducer are those obtained during the composition not the original weights of G.
Best, Dogan
Hi, I'm also struggling with this and unfortunately the solution you provided doesn't seem to be working for me. Let's say F and H are strings of length 1000 and G is a simple two-state transducer. I'm interested in the internal path between the two states of the transducer G within S. In your solution f.out.fst is still of length 1000 and so is h.in.fst. It seems natural to me, that the composition in step 3 therefore leads to another large transducer and the shortestpath in step 4 is just as complex as the original transducer S. But I'm not totally sure if this is maybe even a different problem.
Best,
Roland
DoganCan - 14 May 2010 - 18:05
Hi Roland,
I am not entirely sure that I got your problem. I mean the internal path in G should be as complex as S.
Can you post a simple example where the above procedure fails?
Best, Dogan
Hm, I probably misunderstood you. Take my example from above. I compare two sequences using a transducer, so F and H are acceptors, G is a transducer. Now I am not only interested in the shortest path in terms of input and output symbols and the shortest distance, but also in the state path within transducer G that lead to that distance. All the fstshortestpath gives me, is the shortest path with states numbered from 1 to 1000, but I would be interested in which of those steps went through state 1 in transducer G and which through state 2 (or how many states the transducer has). This is not evident from the output of fstshortestpath if the transducer G is not deterministic.
I hope that clears things up a bit, I thought this was what you were referring to when talking about "internal paths".
Best,
Roland
transducing phoneme lattices using WFSTs
BusyBeaver - 03 Apr 2010 - 11:38
Dear Community,
I'd like to convert phoneme lattices into WFSTs and use a grammar transducer to obtain a word lattice out of it.
The thing is, that I want to keep additional information e.g. time stamps, acoustic scores, etc. while doing so.
Note, that I do not want to obtain any likelihoods on paths in the first place. Instead, I would traverse the final lattice using those accumulated values to determine a likelihood for each transition and user-defined scaling factors myself.
I see two possibilities to keep track on times/scores - by storing them on arcs or using the string semiring to push just arbitrary information in the weights.
When I use the string semiring, I could simply push there as much as I want to,and do a composition with my grammar.
But then I am somewhat restricted: composition is not supported, because the string semiring is not commutative. I was thinking to rewrite the weighted composition algorithm from the paper, just change the weighting part, since I do not care about the order of elements within my strings anyways.
But maybe I could keep my input fst as log/tropical semiring type and attach my scores/time stamps in the arcs. Would it then be possible to use the existing composition algorithm and still copy my attached information into the resulting FST?
Maybe it is all much easier than what I thought of here right now, then I'd be glad if you give me some hints
Thanks a lot in advance,
Stefan
Probabilities as weights
NoChips - 17 Mar 2010 - 16:35
Hi
As far as I know the default arcs StdArc is using Tropical weight.
How can I change that into Probabilty weight, so that transition weights are multiplied and not summed up?
I was looking for something predefined, but couldn't find anything...
Thank you in advance!
PaulDixon - 18 Mar 2010 - 04:14
You could use the LogArc type and convert to probabilities when needed.
There is a counting utility that includes a real semiring implementation and arc registration with the standard command line tools [here][1]
[1]: http://www.furui.cs.titech.ac.jp/~dixonp/wfstcount.zip]
Deleting arcs in an Fst
Assume that I iterate through the states and arcs of an Fst, using the available iterators. Based on values of fields in the arcs (ilabel, olabel) I need to delete some particular arcs. How can I do that safely?
I tried the following: 1) I called AddState() to add a new "sink" state to the FST, 2) In the Mutable Arc Iterator, for all the arcs to be deleted, I reset the nextstate to the sink state, then 3) I called Connect(). As the sink state is non-final, and has no exit arcs, Connect() deletes the sink state and all the arcs leading to it. It seems to work.
Indeed this would work. If you use VectorFst you could also use the DeleteStates method instead of Connect to delete the "sink" state.
hi, sorry to bother you, but how to reset a arc's nextstate to the sink state? For example, the original arc is (sate1, state2), how to reset it to (state1, "sink")?
arcsum.h and arcmerge.h minor bug?
PhilSours - 05 Mar 2010 - 17:29
In ArcSumCompare and ArcMergeCompare, the 4th line:
if (x.olabel < y.olabel) return false;
should probably be:
if (x.olabel > y.olabel) return false;
Memory footprint of an Fst
Given a pointer to an Fst, is there an easy way to calculate its total memory footprint?
hbka reference paper
NewestUser - 26 Jan 2010 - 05:05
Hi, I have been reviewing the hbka paper referenced on the background material section of the site,
http://www.cs.nyu.edu/~mohri/postscript/hbka.pdf
and the figure for the minimization example, pg. 8, fig. 5(c) seems quite wrong. particularly the 'minimized' version is not equivalent to the original transducer. in the other reference
http://www.cs.nyu.edu/~mohri/pub/csl01.pdf
an identical transducer, albeit with different weights on a couple of the arcs, appears very differently in its minimized form.
i verified that the second version referenced in the latter link produces the expected output but it would be nice to confirm this, or alternatively to understand why they are different.
There is a "typo" in Fig 5(c). There should have been transitions labeled by d (with weight 4) and e (with weight 5) from state 0 to state 1.
NewestUser - 26 Jan 2010 - 22:28
thanks for the clarification. i was getting worried that i was very confused about something.
Problems with fstshortestpath
JoeWang - 15 Jan 2010 - 03:56
HI, all. I run fstshortestpath on a toy composed WFST, however I got the error message:
ERROR: FstMainRegister::GetMain: log-arc.so: cannot open shared object file: No such file or directory
ERROR: fstshortestpath: Bad or unknown arc type "log" for this operation (ShortestPathMain)
I have checked my $LD_LIBRARY_PATH, it already includes /usr/local/lib, how come it still cannot find the shared object?
Thanks in advance
Hi,
The issue is that the shortest path algorithm does not work over the log semiring.
Hence support for LogArc
is not compiled into the fstshortestpath
utility and the code tries to locate a shared object containg the definition of that arc type.
Best, Cyril
Is it possible to use fstcompile to construct an acceptor instead of a transducer?
JoeWang - 12 Jan 2010 - 22:09
Hi, all,
Is it possible to use fstcompile to construct an acceptor (i.e. symbol/weight) instead of a transducer (i.e. ilabel:olabel/weight)? Thanks in advance.
PaulDixon - 13 Jan 2010 - 00:46
Use the -acceptor=true command line switch
JoeWang - 13 Jan 2010 - 02:43
Thanks, Paul.
Missing installation files for creating a user-defined arc type?
PaulDixon - 12 Jan 2010 - 01:11
When creating a new arc type some of the files (the *-main.h files) needed to compile the shared object don't seem to be copied as part of the installation. A workaround is to add compiler include path to the files in the openfst-1.1/ src/bin/ dir.
For the shared object to be detected and loaded a name of the form arc-type.so worked but arc_type.so did not.
I put sample code for a real semiring arc type here
Looks good, but with openfst 1.2.5 there do not seem to be any *-main.h files... it is possible that REGISTER_FST_OPERATIONS (namespace fst::script) has replaced REGISTER_FST_MAINS, but I have so far failed to find a combination which works when using the resultant shared library with fstprint. (Building using gcc 4.1.2 on OpenSusE 10.2)
Indeed, the registration mechanism was change in 1.2 and the *-main.h files are gone.
The contain of my-arc.cc
(the source for my-arc.so
) should look like:
#include "nlp/fst/lib/fst-inl.h"
#include "nlp/fst/lib/const-fst-inl.h"
#include "nlp/fst/script/register.h"
#include "nlp/fst/script/fstscript.h"
#include "my-arc.h"
namespace fst {
namespace script {
REGISTER_FST(VectorFst, MyArc);
REGISTER_FST(ConstFst, MyArc);
REGISTER_FST_CLASSES(MyArc);
REGISTER_FST_OPERATIONS(MyArc);
}
}
Hope this will work for you.
Cyril
Thankyou for getting back to me so promptly. I am afraid above does not work for me as I do not seem to have any inl.h files in either the installed directories or the downloaded sources or the fst build directories ...
This is a copy paste mistake. You just need to delete the -inl
's, the lib/
's and the nlp/
's. This gives:
#include <fst/fst.h>
#include <fst/const-fst.h>
#include <fst/script/register.h>
#include <fst/script/fstscript.h>
Eureka! It works. Thankyou.
Problems on Ubuntu Linux 9.10
JoeWang - 11 Jan 2010 - 04:40
Hi,
I have successfully maked openfst-1.1 on Ubuntu Linux 9.10. However, when I use fstcompile to run the first example, I got the error message from the shell: "fstcompile: error while loading shared libraries: libfst.so.0: cannot open shared object file: No such file or directory" which shows that libfst.so.0 doesn't exist, I checked under /usr/local/lib, it does exist. I am quite confused, can somebody help me? Thanks very much
Try adding /usr/local/lib
to your LD_LIBRARY_PATH
environment variable:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Best, Cyril
JoeWang - 12 Jan 2010 - 02:28
Thanks, Cyril. It works
Relabel() and epsilon Properties
I think that I've found a problem with Relabel(), when hard symbols (stored on arcs as non-zero integers) are relabeled with epsilons (stored on arcs as zeros). E.g. I tried
vector < pair<StdArc::Label, StdArc::Label> > vect ;
vect.push_back(pair<StdArc::Label, StdArc::Label> ( (StdArc::Label) 5,
(StdArc::Label) 0 )) ;
Relabel(fstp, vect, vect) ;
where fstp is a pointer to a StdVectorFst. ilabels and olabels originally labeled 5 are relabeled correctly as 0, possibly introducing input-side, output-side and double-sided epsilons; but (here's the problem) the Properties kIEpsilons, kNoIEpsilons, kOEpsilons, kNoOEpsilons, kEpsilons and kNoEpsilons are not updated.
At least that's what seems to be happening.
Please ignore the previous message. The error was mine.
Access control: