kermitt2 / entity-fishing

A machine learning tool for fishing entities

Home Page:http://nerd.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EF display of French dates

karcherg opened this issue · comments

When using Entity-Fishing and disambiguate - text endpoint, in French, it seems to miss dates

Using the query:

{
    "text": "",
    "shortText": "Emmanuel Macron a été réélu.",
    "termVector": [],
    "language": {
        "lang": "fr"
    },
    "entities": [],
    "mentions": [
        "ner",
        "wikipedia"
    ],
    "nbest": false,
    "sentence": false
}

I get for Emmanuel Macron:

Emmanuel Macron, né le à Amiens (France), est un haut fonctionnaire, banquier d'affaires et homme d'État français. Il est président de la République française depuis le .

Dates are not returned, as it should give (from https://fr.wikipedia.org/wiki?curid=6298771):

Emmanuel Macron, né le 21 décembre 1977 à Amiens (France), est un haut fonctionnaire et homme d'État français. Il est président de la République française depuis le 14 mai 2017.

Hi @karcherg

Thanks for the issue !

The dates here are expressed as template argument. In general the templates are hidden because they are ad hoc, and I don't think it is possible to have a generic serialization of all the template instances in an expected way for "normal" text.

Commit d5c02cb fixes the issue by allowing "date" template serialization for these specific template arguments (given all template "date" in different languages, it might have some impact with unexpected extra string).

At least for French, it looks good:

Emmanuel Macron ( ), né le 21 décembre 1977 à [[Amiens]] ([[France]]), est un [[Haute fonction publique française|haut fonctionnaire]] et [[homme d'État]] [[France|français]]. Il est [[président de la République française]] depuis le 14 mai 2017.