Search code examples
parsingstanford-nlpfrench

Stanford Parser : frenchFactored.ser.gz


I am using the Stanford Parser (Version 3.6.0) for French. My command line is

java -cp stanford-parser.jar:* edu.stanford.nlp.parser.lexparser.LexicalizedParser -maxlength 30 -outputFormat conll2007 frenchFactored.ser.gz test_french.txt > test_french.conll10

But I don't get the functions in the output, see :

1 Je _ CLS CLS _ 2 NULL _ _

2 mange _ V V _ 0 root _ _

3 des _ P P _ 2 NULL _ _

4 pommes _ N N _ 3 NULL _ _

5 . _ PUNC PUNC _ 2 NULL _ _

What could have I miss in the command line?


Solution

  • There is a deep learning based French dependency parser in Stanford CoreNLP 3.6.0.

    Download Stanford CoreNLP 3.6.0 here:

    http://stanfordnlp.github.io/CoreNLP/download.html

    Also make sure to get the French models jar that is also available on that page.

    And then run this command to use the French dependency parser, make sure to have the French models jar in your CLASSPATH:

    java -Xmx6g -cp "*:stanford-corenlp-full-2015-12-09/*" edu.stanford.nlp.pipeline.StanfordCoreNLP -props StanfordCoreNLP-french.properties -file sample-french-document.txt -outputFormat text