Outils pour utilisateurs

Outils du site


public:specs_dictionnaire

Dictionnaire

Remarque : cette spécification est écrite en anglais parce que son contenu vient d'un mail écrit dans cette langue cherchant à trouver des composants open-source réutilisables.

Objectif

'a)' entries correspond to the first development target, 'b)' to the next one, etc.

List of functionalities and specifications:

Import:

  • a) import a dictionary from TSV format (to create a dictionary)
  • import a dictionary from XML format (to create a dictionary)
  • import dictionary data from XML format (to update a dictionary)
  • import data from an OCR dictionary (to update a dictionary)
  • a) import data from a TXM corpus lexicon or index into a dictionary (to create or update a dictionary)
  • import user data from installed LibreOffice local dictionary (to update a dictionary)

Export:

  • export a dictionary into an XML format
  • a) export a dictionary into a TSV format

User Interface:

  • b) provide an editing UI for dictionary entries creation or update (browse, search, view, edit, copy, paste, delete)

Operations:

  • merge dictionaries
  • a) intersect dictionaries

Implementation:

  • a) provide an efficient persistency and search/browse underlying software component (for example relational database backend)

Components linking:

  • b) connect dictionary data to tokenizing components
  • c) export or transfer dictionary data to a lemmatizer (tokenization + pos tagging + lemmatization) learning component
  • etc.

Méthode

  • start to provide a dictionary software component very soon
  • start with the trivial tabular model <one word per line, one word property per column> because the push is given by the need to develop open-source lemmatizers, TreeTagger&Melt architecture is the reference model (tabular lexicon + tagged golden corpus for learning) → language model to lemmatize
  • probably need to develop bi-lingual support later (TXM imports TMX corpora)
  • probably need to develop compound words support later (Unitex is the reference model: simple words lexicon+compound words lexicon+local grammars)
  • probably need to augment the tabular model in something richer later (several tables, hierarchical, network, etc.)
  • etc.

V1 - Palafra

Implémenter les fonctionnalités nécessaires pour la recette Palafra.

État de la plateforme

Avancement dans l'élaboration de la solution

Solution

État de l'art

Softwares

We should look for software components implementing such data and operations to which we could delegate dictionary management or that we could use, adapt, augment, etc.
The preferred components would be:

  • under open-source license
  • Java based (if the best component is C++ based, a Java - tight or SQL etc. - loose connector could do)
  • aware of standard external (serialized like in XML) representations
  • bonus: be able to host on line dictionaries (typically with RESTfull API access and access control)

Suggestions by PB:

  • FLEx “integrates dictionary development with basic corpus analysis”
  • KorAP (Next Generation Corpus Analysis Platform)

Implemented Standards

Chercher des implémentations de formats standard (ou des implémentations capables de les interpréter en import-export), en s'intéressant surtout aux formats les plus élémentaires.

En partant de la liste suivante issue d'un article de la revue JTEI, d'après un mail récent de M. Holmes dans TEI-L : https://listserv.brown.edu/archives/cgi-bin/wa?A2=ind1510&L=TEI-L&P=R20490&1=TEI-L&9=A&I=-3&J=on

A great number of divergent formats have coexisted: Multilex and 
Genelex (GENEric LEXicon) are systems that are associated with the 
Expert Advisory Group on Language Engineering Standards (EAGLES). Other 
formats used in digital dictionary projects are OLIF (Open Lexicon 
Interchange Format), MILE (Multilingual ISLE Lexical Entry), LIFT 
(Lexicon Interchange Format), OWL (Web Ontology Language) and DICT 
(Dictionary Server Protocol)..."
<https://jtei.revues.org/522#tocto1n3>

(Of course there are even more, including LMF.)

Spécifications

Interface d'accès aux fonctions

Pour manipuler des dictionaires dans TXM, il faut installer l'extension “Dictionary” qui rajoute plusieurs commandes dans le menu principal “Dictionary” :

  • List : liste tous les dictionnaires
    • Pas de paramètre
  • Print : affiche dans la console le contenu d'un dictionnaire
    • Paramètres :
      • name : le nom du dictionnaire à afficher
  • Import : import un dictionnaire depuis un fichier TSV
    • Paramètres :
      • tsvFile : le fichier TSV à importer, le nom du dictionnaire à afficher est créé à partir du nom du fichier sans l'extension
  • Import from Index : créé un dictionnaire depuis un Index sélectionné dans la vue Corpus
    • Paramètres :
      • name : le nom du dictionnaire à créer/peupler
  • Recode : recode une propriété du dictionnaire à l'aide de règles de conversion
    • conversionFile : le fichier TSV de conversion
    • type : la propriété à lire
    • newType : le propriété à créer ou mettre à jour

SQL

Un gestionnaire de dictionnaire donne accès à la création et la liste des dictionnaires. Un dictionnaire est identifié par un nom unique auquel lui est associé une table SQL (HSQL), les propriétés des entrées du dictionnaire sont codées dans des colonnes de la table.

JPA

Un dictionnaire :

  • contient
    • des entrées :
      • ont un identifiant unique
      • est exporté sous forme de ligne
    • des propriétés : triplets uniques
      • ont un identifiant d'entrée
      • ont un identifiant de type
      • ont une valeur
        • porte son type de donnée : chaine, entier…
      • est exporté sous forme de contenu de cellule
    • des types :
      • ont un identifiant unique
      • est exporté sous forme de colonne
  • permet de créer, modifier, sélectionner…

Implémentation dans une class DictionaryFactory, une classe Dictionary et 3 classes JPA (qui étendent la classe Entity) :

  • DictionaryFactory : gère les dictionnaires
    • création et ouverture
    • libération de mémoire
    • fermeture
    • liste des dictionnaires ouverts
  • Dictionary
    • a un nom unique
    • contient un EntityManager JPA (accès en lecture, écriture aux données persistées)
  • Entry
    • id de type long
  • EntryProperty
    • ref de type long
    • type de type String
    • value de type Serializable (peut contenir String, Integer…)
  • EntryPropertyType
    • id de type String

Prototypes

Version finale

Documentation

Utilisateur

Développeur

Recette

Protocole de test

Alpha

Beta

État courant

Qui Quand Quoi

public/specs_dictionnaire.txt · Dernière modification : 19/07/2016 15:17 de alexei.lavrentev@ens-lyon.fr