Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EF display of French dates #144

Open
karcherg opened this issue Jun 21, 2022 · 1 comment
Open

EF display of French dates #144

karcherg opened this issue Jun 21, 2022 · 1 comment
Assignees

Comments

@karcherg
Copy link

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.

@kermitt2 kermitt2 self-assigned this Jun 21, 2022
@kermitt2 kermitt2 reopened this Jun 21, 2022
@kermitt2
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants