Does anyone know of a good (preferably free or better yet open source) API for natural language processing in French? I have a small dataset (pre-classified into "positive" and "negative" sentiment) on a particular subject, but I'd prefer not to write and train my own classifier algorithm (partly because the classification precision will be mediocre because the dataset is only 5000 phrases or so).

  • No certain your algorithm can take care of pronounciation : all words affective have two opposite meaning : "salaud" from a female in love can be positive, and totally negative when you want to injury somebody - And "bonheur" is not really positive for mystic or oriental thinking, it is not an aim
    – Personne
    Commented Apr 9, 2015 at 21:45
  • 1
    I believe Patrick Paroubek has done some work on sentiment analysis, you could contact him for pointers. Also if you feel you don't have enough data, a student of his did his PhD thesis on gathering data for sentiment analysis from Twitter based on the occurrence of positive and negative smileys.
    – Evpok
    Commented Apr 10, 2015 at 19:16

4 Answers 4


Almost all the current approaches in sentiment analysis require a lexicon to detect classes (positive/negative or more refined ones). And the big problem is: this lexicon has to be adapted to new corpora, so it's extremely hard to find an existing classifier that will work on your data, because it won't have the correct lexicon to handle it.

You'll certainly have to work a little bit yourself if you want to obtain correct results.

Some ongoing competitions should deliver interesting approaches and resources in a close future: DEFT 2015. But it's still a bit early to exploit them.

  • Good point about the influence of the lexicon on classifier accuracy. You're right, the topic of the corpus I have is esoteric, so a conventional lexicon would perform poorly.
    – Escher
    Commented Apr 12, 2015 at 21:21

You can use FEEL: a French Expanded Emotion Lexicon. http://advanse.lirmm.fr/feel.php It contains more than 14 000 distinct French terms associated with either the conveyed polarity and the expressed emotion(s). It follows the Ekman emotional typology (Ekman, 1992) with 2 polarities and 6 basic emotions classes.

We have learned sentiment classification models on DEFT 2007 and DEFT 2015 benchamrks. We were ranked first, third and fifth on the different benchmarks. We have made this models online on a dedicated web platform. http://advanse.lirmm.fr:8081/sentiment-analysis-webpage/index You just have to upload a file containing french text documents to obtains the expressed sentiments. You may also use the models locally by downloading a jar file.


Semantics is a difficult topic in NLP... Stanford has some great NLP tools that I suggest you take a look at, though they don't have anything for semantic analysis as far as I can tell.

If this is for a large, ongoing project I implore you to write your own classifier! Though it would take a non-trivial amount of time and effort in the research and development it would be of great benefit to the NLP community!

If you take the above approach, you could use existing word-tagging libraries (Stanford has one for French), combined with something like Lexique's French lexicon, and add your own semantic entries to the lexicon; then, train a Bayes classifier on your dataset. It's not a perfect approach, but a good start in the right direction!

Edit You mention in your question that you don't want to write your own classifier because your dataset isn't large enough. I challenge that statement by telling you that a recent research project at my university trained a Bayes classifier to 75% accuracy to detect sarcasm with only 150 samples!

  • 1
    stanford does have something for sentiment analysis: nlp.stanford.edu/sentiment/index.html it's not state of the art anymore but it's very close.
    – m09
    Commented Apr 10, 2015 at 19:35
  • @m09 Nice! I didn't see that on their page, that'll be a great source for OP to build off of other existing NLP tools :) Commented Apr 10, 2015 at 20:15
  • 1
    Point taken on classifier precision. It's not for a large project, so maybe I'll settle for a reduced accuracy rate.
    – Escher
    Commented Apr 12, 2015 at 21:17

Bonjour, Vous pouvez essayer Lettria. Les sentiments sont traite par calcul: Par exemple: il est tres bon = 1.5 Il est bon = 0.5 il n est pas bon = -0.5 Plus d erreur de faux positifs ou de negation

  • Un petit développement serait le bienvenu.
    – Toto
    Commented Jul 17, 2018 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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