NatLibFi / FintoAI

Finto AI suggests subjects for a given text. It's based on Annif, a tool for automated subject indexing.
https://ai.finto.fi
7 stars 0 forks source link

Detect language of text #9

Open osma opened 1 year ago

osma commented 1 year ago

A possible enhancement for the Finto AI user interface would be to detect the language of input text. This would be easy to implement if the corresponding functionality is added to the Annif REST API: see https://github.com/NatLibFi/Annif/issues/631

How best to add this feature to the UI needs a bit more thought. I can think of two approaches:

  1. Make this functionality completely separate from the subject indexing. Basically, a button (or other widget) that the user clicks on and then the UI shows the detected language.
  2. Integrate with the subject indexing functionality. For example, first detect the language, then narrow down the available projects based on the language (example: if the text is detected as English, show only projects intended for English language).
juhoinkinen commented 1 month ago

Annif (code in main branch) has now the language detection method in the API (https://github.com/NatLibFi/Annif/issues/631/, https://github.com/NatLibFi/Annif/pull/659), so this feature could be implemented.

juhoinkinen commented 4 weeks ago

I started experimenting with this.

In user interface the most natural approach was to modify the first menu to be only for the vocabulary (items would be YSO (<version-name>), YKL, KAUNO and KOKO (in the future)), and to add a menu below for the language of the text (the default selection is automatic detection)

In the text language menu manually selectable should be only the languages supported by the selected projects, others could be absent or preferably grayed out, like English and Swedish for KAUNO).

image

juhoinkinen commented 2 weeks ago

Actually, a checkbox for automatic language detection beside the text language menu is better (layout to be refined):

image