The code in the wipo branch is not segfaulting, it's just an old moses version. I can put my recent attempts to make it run with current master into a separate branch (that's segfaulting). It's best if you start there when you try to fix it. I will let you know once I pushed it. Probably this evening.
W dniu 2014-11-27 11:57, Raj Dabre napisał(a): > Hello Marcin, > > You just saved me a lot of time since I was planning to write this code from > scratch. Many thanks for that. I will try to fix the reasons for the > segfaults. > > Many thanks again! > > Regards. > > On Thu, Nov 27, 2014 at 7:43 PM, Marcin Junczys-Dowmunt <[email protected]> > wrote: > > Hi, > > I tried to port it to the newest Moses version, but I still get segfaults. > This used to work with Moses 1.* before the feature function format was > changed. However, since the binary format of the compact phrase table has not > changed since then, just use the old interface. > > Checkout the "wipo" branch (not wipoNew!) and compile with > > ./bjam --with-cmph=/usr/include -j8 > --with-java=/usr/lib/jvm/java-7-openjdk-amd64 > > You see you need to specifiy the location of your Java includes, specifically > the directories jni.h resides in. This should build the stuff in misc/jni/* > including java classes and stuff. You need ant for that. Then you can run the > query tool like this: > > echo "test" | ./bin/JniQueryPt_example.sh /some_path/phrase-table.0-0.minphr > 4 > > You need to specify the path and the number of scores in the phrase table. > Look inside JniQueryPt_example.sh how to call the jar and inside > misc/jni/java/example.java how to call the code directly from Java. I > apologize for the code, I am not a Java programmer, so this may be crude. > > Best, > > Marcin > > W dniu 2014-11-26 12:00, Raj Dabre napisał(a): > > Hello Marcin, > > Yes please. It would save me lots of time. Thanks. > > Regards. > > On Wed, Nov 26, 2014 at 6:50 PM, Marcin Junczys-Dowmunt <[email protected]> > wrote: > > Hi, > > I have a JNI interface to my compact phrase table somewhere, I guess I can > put that in contrib within a day or two if there is interest. > > best, > > Marcin > > W dniu 2014-11-26 10:45, Barry Haddow napisał(a): > > Hi Raj > > The format of these tables is not described anywhere. You'd have to read > the code in moses/TranslationModel/PhraseDictionaryTree.cpp, and then > try to convert it it Java. > > A better plan would be to use JNI to call the C++ code -- a similar > approach has been followed in the python interface in contrib/python. > This would insulate you from the low-level details, and from changes in > the format, > > cheers - Barry > > On 26/11/14 03:22, Raj Dabre wrote: > Hello All, I know that Moses allows for binarization of a phrase table which > can be read on demand at decoding time. We get 5 files named: > phrase-table.binphr.* I want to write my own routine in Java to read phrase > pairs from these on demand. Can anyone guide me ? PS: If an explanation of > the same for binary reordering tables can be done then it would be great too. > Thanks in advance. -- Raj Dabre. Research Student, Graduate School of > Informatics, Kyoto University. CSE MTech, IITB., 2011-2014 > _______________________________________________ Moses-support mailing list > [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support > [1] _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support [1] -- Raj Dabre. Research Student, Graduate School of Informatics, Kyoto University. CSE MTech, IITB., 2011-2014 -- Raj Dabre. Research Student, Graduate School of Informatics, Kyoto University. CSE MTech, IITB., 2011-2014 Links: ------ [1] http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
