I wrote a little patch to enable charniak parser to be compiled on modern linux distributions. It's available from my web page. <br><br>On Wednesday, August 17, 2011, Pawel Mazur <<a href="mailto:pawel.mazur@mq.edu.au">pawel.mazur@mq.edu.au</a>> wrote:<br>
> Hi,<br>><br>> On Mac OS X you can compile the Charniak parser (parser05Aug16) using gcc/g++ v. 4.2.1 (the default one in my installation of OS X 10.6.8).<br>> You only need to add<br>> #include "GotIter.h"<br>
> to parser05Aug16/PARSE/BchartSm.C<br>> To compile the content of the TRAIN directory, you need to change a part of the line 310 in rCounts.C from<br>> (int)sbrk(0)<br>> to<br>> (long)sbrk(0)<br>><br>><br>
> In the case of the Charniak-Johnson reranking parser (reranking-parserAug06) you need to:<br>> - change the line 128 of first-stage/PARSE/parseIn.C from<br>> int id = (int)arg;<br>> to<br>> int id = (long)arg;<br>
> - run 'make clean' before 'make' to recompile second-stage/programs/features/best-parses<br>><br>> You can also rename features.gz to features.gz.Z and cvlm-l1c10P1-weights.gz to cvlm-l1c10P1-weights.gz.Z and make the relevant changes in parse.sh;<br>
> without this step the parser is working, but zcat complains about missing gz.Z files; doing this step stopped the messages to appear.<br>> Alternatively, you can use gzcat instead of zcat in Makefiles.<br>><br>
> I thank Brett Powley for these hints.<br>><br>> regards,<br>> Pawel<br>><br>><br>><br>><br>> On 22/06/2010, at 8:38 PM, Leon Derczynski wrote:<br>><br>>> Hi,<br>>><br>>> Problem solved - using gcc/g++ 3.3 (and associated stdlib), the parser compiles.<br>
>><br>>> All the best,<br>>><br>>><br>>> Leon<br>>><br>>> -------- Original Message --------<br>>> Subject: Re: [Corpora-List] Charniak parser<br>>> Date: Tue, 22 Jun 2010 20:15:27 +0200<br>
>> From: Roman Klinger <<a href="mailto:roman.klinger@scai.fraunhofer.de">roman.klinger@scai.fraunhofer.de</a>><br>>> To: Leon Derczynski <<a href="mailto:L.Derczynski@dcs.shef.ac.uk">L.Derczynski@dcs.shef.ac.uk</a>><br>
>> References: <<a href="mailto:4C20FD0B.60206@dcs.shef.ac.uk">4C20FD0B.60206@dcs.shef.ac.uk</a>><br>>><br>>> Hi,<br>>><br>>> On 06/22/2010 08:12 PM, Leon Derczynski wrote:<br>>>> Thank you for your answer! I've replied directly as I'm not sure the list is the right place to<br>
>>> discuss compilation issues, I may be wrong.<br>>><br>>> Perhaps not in detail, but others may be interested. We can post the<br>>> solution if we get one.<br>>><br>>> Which GCC version are you using? I used 3.3. Got similar errors with 4.*.<br>
>><br>>> I am not a C expert, therefore I am not sure if this is your problem,<br>>> but give it a try :-).<br>>><br>>> Best,<br>>> Roman<br>>><br>>><br>>><br>>>><br>
>>> I am also using this version (from <a href="http://bllip.cs.brown.edu/download/reranking-parserAug06.tar.gz">http://bllip.cs.brown.edu/download/reranking-parserAug06.tar.gz</a>);<br>>>> my C++ skill ranks between very low and zero. I've had problems with declarations likely just<br>
>>> missing from my path, which I can fix, and manifest as:<br>>>><br>>>> BchartSm.C: In member function ‘double Bchart::pHypgt(const std::string&, int)’:<br>>>> BchartSm.C:554: error: ‘strpbrk’ was not declared in this scope<br>
>>> make[1]: *** [BchartSm.o] Error 1<br>>>> make[1]: Leaving directory `/home/leon/charniak/reranking-parser/first-stage/PARSE'<br>>>><br>>>> However, after adding include lines for stdlib.h and string.h to BchartSm.C, I am stumped by:<br>
>>><br>>>> BchartSm.C: In member function ‘double Bchart::pHypgt(const std::string&, int)’:<br>>>> BchartSm.C:555: error: invalid conversion from ‘const char*’ to ‘char*’<br>>>> make[1]: *** [BchartSm.o] Error 1<br>
>>><br>>>> It really seems as though I have some other misconfiguration, if you have compiled the same code<br>>>> without issues. If you have any clue as to what it may be, I would be extremely grateful to hear it.<br>
>>><br>>>> All the best,<br>>>><br>>>><br>>>> Leon<br>>>><br>>>> ----------<br>>>><br>>>> Hi Leon,<br>>>> On 06/22/2010 07:26 PM, Leon Derczynski wrote:<br>
>>>> I am looking for a working version of the Charniak parser.<br>>>><br>>>> You mean the reranking parser published on <a href="http://bllip.cs.brown.edu/resources.shtml">http://bllip.cs.brown.edu/resources.shtml</a> right?<br>
>>><br>>>><br>>>>> I have scoured a few sites, tried and<br>>>>> failed to build a few versions from the web and applied various patches, without much success.<br>>>> [...]<br>
>>><br>>>><br>>>>> Can anybody help?<br>>>><br>>>> I am using this parser, without any problems. Therefore, it is difficult to guess, what your problem<br>>>> is. Compilation worked without any issues.<br>
>>><br>>>> Could you specify what does not work for you?<br>>>><br>>>> Best,<br>>>><br>>>> Roman<br>>><br>>><br>>> --<br>>> Roman Klinger<br>>> Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)<br>
>> Department of Bioinformatics<br>>> Schloss Birlinghoven<br>>> D-53754 Sankt Augustin<br>>> Tel.: +49-2241-14-2360<br>>> Fax.: +49-2241-14-4-2360<br>>> email: <a href="mailto:roman.klinger@scai.fhg.de">roman.klinger@scai.fhg.de</a><br>
>> <a href="http://www.scai.fraunhofer.de/klinger.html">http://www.scai.fraunhofer.de/klinger.html</a><br>>><br>>> _______________________________________________<br>>> Corpora mailing list<br>>> <a href="mailto:Corpora@uib.no">Corpora@uib.no</a><br>
>> <a href="http://mailman.uib.no/listinfo/corpora">http://mailman.uib.no/listinfo/corpora</a><br>><br>><br>> _______________________________________________<br>> UNSUBSCRIBE from this page: <a href="http://mailman.uib.no/options/corpora">http://mailman.uib.no/options/corpora</a><br>
> Corpora mailing list<br>> <a href="mailto:Corpora@uib.no">Corpora@uib.no</a><br>> <a href="http://mailman.uib.no/listinfo/corpora">http://mailman.uib.no/listinfo/corpora</a><br>><br><br>-- <br>Linguist, Desi Linguist<br>
<a href="http://www.desilinguist.org" target="_blank">http://www.desilinguist.org</a><br>