I am looking for a way to extract the potential subject and object from a question in French.

For the moment, I am building some handmade rules. Alternatively, I started to think of using an already trained model for the task. I wanted to use StanfordNLP parser but unfortunately it is not free for commercial use.

So, here comes the questions:

  1. Are they ML models used for this task?

  2. Are they labeled data sets (in french) which can help create ML models used for this task?

[Edit] I am looking mainly for open source tools/ libraries.

  • $\begingroup$ Have you seen this post: stackoverflow.com/questions/37297399/…? I would try the same thing for French. Spacy has support for French as well spacy.io/usage/models. I'd recommend the "fr_core_news_md" mode rather the small model. $\endgroup$ – TwinPenguins Nov 30 '18 at 9:38
  • $\begingroup$ I don't think that spacy's parser can be used for french : spacy.io/api/annotation#section-dependency-parsing $\endgroup$ – ChiPlusPlus Nov 30 '18 at 10:27
  • $\begingroup$ Consider also using Google's Cloud Natural Language. For testing use the text box under Try the API. For example, I tried "Qu'est-ce qu'il lui fait?" and the Syntax analysis resulted in telling me that "qu'" is dobj, "il" is nsubj, and "lui" is nobj. I do not speak French so I can't help you further with this :) $\endgroup$ – mapto Nov 30 '18 at 15:07
  • $\begingroup$ Thank you for the suggestion but I am looking for open source libraries. $\endgroup$ – ChiPlusPlus Nov 30 '18 at 16:29
  • $\begingroup$ Did you check for dependency parsing? $\endgroup$ – Bharath Kumar L Dec 5 '18 at 4:47

Google SyntaxNe has pre-trained models for French. It is open source and can be customized for a specific use-case.


With this, you can create a dependency tree for questions and evaluate fitness for this application.

  • $\begingroup$ Does it support python or is it only usable via command lines? $\endgroup$ – ChiPlusPlus Dec 19 '18 at 8:53
  • $\begingroup$ Command line examples are for demo, it is meant to be used from Python or other languages that interface with Tensorflow. $\endgroup$ – Shamit Verma Dec 25 '18 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.