Liste de liens :
Liste de liens :
Améliorer l'annotation lexicale automatique.
Cela concerne :
Dans TXM 0.8.1, la tokenisation est réalisée par TXM et l'annotation des mots est réalisée par TreeTagger. Il n'y a pas de segmentation en phrases.
Deux approches en cours d'examen,
(le zip est la fermeture éclair qui aligne deux séries de crochets pour se refermer)
def word = corpusEngine.cpos2Str("$corpusName.word", (start..end) as int[]).join(' ') def txt = LangFormater.format(word, corpus.getLang())
L'alignement 'tokens TXM' / 'tokens outils' en d) consiste à calculer les différences entre deux séquences :
Le calcul de leur 'Longest Common Subsequence' (1) correspond à l'établissement de la séquence des correspondances majoritaires, composée typiquement de mots simples (tokens TXM et tokens outils identiques).
Le calcul de leur diff (2), dont on peut trouver une implémentation Java en (3), et que j'ai utilisée pour écrire la macro prototype LCSMacro.groovy ci-dessous, permet d'établir les relations de fusion et de segmentation de tokens TXM.
Macro LCSMacro.groovy
// Copyright © 2021 ENS de Lyon // Licensed under the terms of the GNU General Public License version 3 (http://www.gnu.org/licenses/gpl-3.0.html) // @author sheiden // STANDARD DECLARATIONS package org.txm.macro import org.kohsuke.args4j.* import groovy.transform.Field import org.txm.rcp.swt.widget.parameters.* @Field @Option(name="A", usage="input string A", widget="String", required=true, def="ABCDE") def A @Field @Option(name="B", usage="input string B", widget="String", required=true, def="ACDC") def B if (!ParametersDialog.open(this)) return input1 = A.toCharArray() input2 = B.toCharArray() M = input1.length N = input2.length def lcsLength(char[] input1, char[] input2) { opt = new int[M][N]; for (int i = 1; i < input1.length; i++) { for (int j = 1; j < input2.length; j++) { if (input1[i] == input2[j]) { opt[i][j] = opt[i - 1][j - 1] + 1; } else { opt[i][j] = Math.max(opt[i][j - 1], opt[i - 1][j]); } } } return opt; } strOut = "" strOut1 = "" strOut2 = "" strLCS = "" def printDiff(opt, input1, input2, i, j) { if ((i >= 0) && (j >= 0) && (input1[i] == input2[j])) { printDiff(opt, input1, input2, i - 1, j - 1); strOut += " " + input1[i] strOut1 += " " + input1[i] strOut2 += " " + input1[i] strLCS += input1[i] } else if ((j > 0) && ((i == 0) || (opt[i][j - 1] >= opt[i - 1][j]))) { printDiff(opt, input1, input2, i, j - 1) strOut += " +" + input2[j] strOut1 += " " strOut2 += " +" + input2[j] } else if ((i > 0) && ((j == 0) || (opt[i][j - 1] < opt[i - 1][j]))) { printDiff(opt, input1, input2, i - 1, j) strOut += " -" + input1[i] strOut1 += " -" + input1[i] strOut2 += " " } else { strOut += "" strOut1 += "" strOut2 += "" } } opt = lcsLength(input1, input2) printDiff(opt, input1, input2, M - 1, N - 1) println "A = "+A+" ("+A.length()+")" println "B = "+B+" ("+B.length()+")" println "LCS = "+strLCS+" ("+strLCS.length()+")" println "op(A) = "+strOut1 println "op(B) = "+strOut2 println "diff(A, B) = "+strOut
qui produit le résultat :
A = ABCDE (5) B = ACDC (4) LCS = ACD (3) op(A) = A -B C D -E op(B) = A C D +C diff(A, B) = A -B C D -E +C
Pascal Denis & Benoît Sagot, (Coupling an annotated corpus and a morphosyntactic lexicon for state-of-the-art POS tagging with less human effort. In Proceedings of PACLIC 2009, Hong Kong, China). http://pauillac.inria.fr/~pdenis/papers/paclic09.pdf
Helmut Schmid and Florian Laws: "Estimation of Conditional Probabilities with Decision Trees and an Application to Fine-Grained POS Tagging" [[http://www.cis.uni-muenchen.de/~schmid/papers/Schmid-Laws.pdf]]
de TreeTagger vers Multext et assistance à la correction de lemmes : https://www.ims.uni-stuttgart.de/en/research/resources/tools/lemma-correction [voir le lien “Ressourcen” / “Lemma-Korrektur”]
http://nlp.stanford.edu/downloads/tagger.shtml
Cette technologie est distribuée avec un modèle Arabe appelé 'arabic.tagger'. Il a été construit à partir de l'intégralité de l'Arabic TreeBank parties 1 à 3.
Performances : When trained on the train part of the ATB p1-3 split done for the 2005 JHU Summer Workshop (Diab split), using (augmented) Bies tags, it gets the following performance:
Corpus d'apprentissage : Arabic TreeBank parties 1 à 3 :
Tokenization
Le format précis du texte arabe en entrée n'est pas indiqué, mais j'ai trouvé ce mail de Christopher Manning dans java-nlp-user : “everything that appears on the Stanford Arabic Parser IAQ page also applies to the POS tagger (required tokenization, normalization, POS tag set used, etc.)”. Ce mail contient un fichier texte exemple en Arabe et le fichier résultat du tagger.
On trouve donc beaucoup plus de détails dans la documentation de l'autre outil apparenté, l'analyseur syntaxique de Stanford :
Résultat :
Jeu d'étiquettes
Voir http://www.ircs.upenn.edu/arabic/Jan03release/arabic-POStags-collapse-to-PennPOStags.txt
Autres références à regarder
AraMorph est un implémentation Java open-source de l'algorithme Buckwalter.
Il tokenise et propose toutes les analyses de décomposition en préfixe-racine-suffixe.
Il gère l'UTF-8.
Il comprend des classes d'intégration dans Lucene pour l'analyse, l'indexation et l'interrogation.
Il y a un lemmatiseur en ligne http://oracc.museum.upenn.edu/util/atfproc.html.
Du projet http://oracc.museum.upenn.edu qui comprend les langues :
Autres ressources à exploiter
http://nlp.stanford.edu/downloads/tagger.shtml
Cette technologie est distribuée avec deux modèles pour le Chinois appelés 'chinese-distsim.tagger' et 'chinese-nodistsim.tagger'.
Ils utilisent le jeu d'étiquettes de la Penn Chinese Treebank.
Performances
Le segmenteur et le tagger pour le chinois sont téléchargeable ici.
Note: one bad report on this one.
Sans différentier le latin classique du néo-latin.
http://nlp.stanford.edu/software/segmenter.shtml#Download
http://nlp.stanford.edu/downloads/tagger.shtml
packages utiles :
2 Macros :
StanfordSegmenter
Il faut copier :
Lien de téléchargement des modèles (250Mo) : http://nlp.stanford.edu/software/stanford-segmenter-2014-01-04.zip
Paramètres de la macro :
StanfordTagger
Il faut copier
Lien de download des modèles (110Mo) : http://nlp.stanford.edu/downloads/stanford-postagger-full-2014-01-04.zip
Paramètres de la macro :
TreeTagger a été interfacé pour les modules d'import.
Une extension TreeTagger permet d'apprendre et de projeter sur un corpus TXM.