I am trying to use wikiprep (https://github.com/avian2/wikiprep) to parse wikipedia dump (in Feb 2014) and generate a XXX.hgw.xml file from the dump.
I followed the usage on Github site above: installed all Perl modules as prerequisites; Build and install wikiprep successfully (wikiprep program appeared in perl5/bin directory). When I execute wikiprep
, it says:
Use of the encoding pragma is deprecated at /home/tutran/perl5/bin/wikiprep line 32. Use of the encoding pragma is deprecated at /home/tutran/perl5/lib/perl5/Wikiprep/languages.pm line 7. syntax error at /home/tutran/perl5/lib/perl5/Wikiprep/Disambig.pm line 9, near "->import qw/ extractWikiLinks /" Compilation failed in require at /home/tutran/perl5/bin/wikiprep line 52. BEGIN failed--compilation aborted at /home/tutran/perl5/bin/wikiprep line 52.
This the line 9:
Wikiprep::Link->import qw/ extractWikiLinks /;
Expected output: options I can use with wikiprep. I also cannot make test for the program. I installed it on Ubuntu 14.04 LTS. My Perl version is 5.18.02.
I don't know anything about perl language so I can't do anything with the "syntax error" here!
In /usr/local/bin/ wikiprep change line 135 i'e (Wikiprep::Templates->import qw( %templates includeTemplates );) to : Wikiprep::Templates->import(qw( %templates includeTemplates ));
and in file /usr/local/share/perl/5.18.2/Wikiprep/Disambig.pm change Wikiprep::Link->import qw/ extractWikiLinks /; to Wikiprep::Link->import(qw/ extractWikiLinks /);