Using Stanford parser

I thought that Stanford parser use “\n” as sentence separator but it doesn’t seem to be true😛.

So I add the option “-sentence newline” to the command line.

java -mx1500m -cp “$scriptdir/stanford-parser.jar:” edu.stanford.nlp.parser.lexparser.LexicalizedParser -sentences newline -outputFormat “typedDependencies” -outputFormatOptions ‘xml’ $scriptdir/englishPCFG.ser.gz $*

I should do this since 2 days ago T_T.

P.S. I cannot build Stanford parser 1.6.1 by Ant or Make. I try to add -Xlint:unchecked and -Xlint:deprecation bla bla bla and it did not help. Finally I imported the source tree to Eclipse and it can be built. I still do not understand but I don’t care anymore ^_^.

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s