Running Stanford corenlp server with French models

Ok, after a lot of readings and unsuccessful tries, I found a way to make it work (for v3.6.0). Here are the details, if they can be of any interest to someone else:

  1. Dowload the code and french models from http://stanfordnlp.github.io/CoreNLP/index.html#download. Unzip the code .zip and copy the french model .jar to that directory (do not remove the english models, they have different names anyway)

  2. cd to that directory and then run the server with:

    java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer
    

(it's a pity that the -prop flag doesn't help here)

  1. Call the API repeating the properties listed in the StanfordCoreNLP-french.properties:

    wget --header="Content-Type: text/plain; charset=UTF-8"
         --post-data 'Bonjour le monde.' 
         'localhost:9000/?properties={
           "annotators": "tokenize,ssplit,pos,parse", 
           "parse.model":"edu/stanford/nlp/models/lexparser/frenchFactored.ser.gz", 
           "pos.model":"edu/stanford/nlp/models/pos-tagger/french/french.tagger", 
           "tokenize.language":"fr", 
           "outputFormat": "json"}' 
      -O -
    

    which finally gives a 200 response using the French models!

(NB: don't know how to make it work with the UI (same for utf-8 support))