0

I have no experience using java, i am trying to use lingpipe on windows (on linux everything worked perfectly) with command shell commands. But keep getting an error message.

these are the commands:

cd lingpipe\lingpipe-4.1.2-website\demos\generic\bin cmd_pos_en_general_brown.bat -inFile=C:\lingpipe\test.txt -outFile=C:\lingpipe\testout.xml

as shown in this tutorial: http://alias-i.com/lingpipe/web/demo-pos.html on the section of Part-of-Speech Demo via Shell Command.

The error message is:

C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CLASS=com.aliasi.demo.demos.PosDemo
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set ARGS="com.aliasi.tokenizer.IndoEuropeanTokenizerFactory,com.aliasi.sentences.IndoEuropeanSentenceModel,/models/pos-en-general-brown.HiddenMarkovModel,250000,250000,General English"

C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CMD=com.aliasi.demo.framework.DemoCommand

C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CP=../../;../lingpipe-demos.jar;../../../lingpipe-4.1.2.jar;../../lib/nekohtml-1.9.14.jar;../../lib/xercesImpl-2.9.1.jar;../../lib/xml-apis-2.9.1.jar

C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>java -cp ../../;../lingpipe-demos.jar;../../../lingpipe-4.1.2.jar;../../lib/nekohtml-1.9.14.jar;../../lib/xercesImpl-2.9.1.jar;../../lib/xml-apis-2.9.1.jar com.aliasi.demo.framework.DemoCommand -demoConstructor=com.aliasi.demo.demos.PosDemo -demoConstructorArgs="com.aliasi.tokenizer.IndoEuropeanTokenizerFactory,com.aliasi.sentences.IndoEuropeanSentenceModel,/models/pos-en-general-brown.HiddenMarkovModel,250000,250000,General English" -inFile C:\lingpipe\test.txt -outFile C:\lingpipe\testout.xml
IOException processing  inFile=*HAS_PROPERTY_VALUE* outFile=*HAS_PROPERTY_VALUE*
Exception msg=java.io.FileNotFoundException: *HAS_PROPERTY_VALUE* (The filename, directory name, or volume label syntax is incorrect)
java.io.FileNotFoundException: *HAS_PROPERTY_VALUE* (The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.aliasi.demo.framework.DemoCommand.processFile(DemoCommand.java:107)
        at com.aliasi.demo.framework.DemoCommand.run(DemoCommand.java:80)
        at com.aliasi.demo.framework.DemoCommand.main(DemoCommand.java:139)

ps: The inputfile already exists, the output file is supposed to be created automatically by the command.

  • The value `*HAS_PROPERTY_VALUE*` is not a valid filename. BTW: You title _"Java's LingPipe"_ implies that LingPipe (whatever that is) is part of Java, it is not. – Mark Rotteveel May 25 '18 at 11:44
  • I'm guessing that `/models/pos...` is wrong unless you built it into one of the jars. We're not really supporting LingPipe any more, and the command-line invocations were always just demos. The code behind them is very simple to work through. – Bob Carpenter May 25 '18 at 23:08

0 Answers0