BAO3 permet d'extraire des patrons à partir des fichiers étiquetés créés grâce aux BAO1 et BAO2. Afin d’extraire des patrons, on va utiliser trois différentes méthodes :
le script perl, XQuery et XSLT.
Étant donné que les fichiers étant nombreux, les méthodes sont présentées ci-dessous avec les fichiers de la rubrique 3208 (une) uniquement. Les fichiers de la partie des résultats contiennent les patrons extraits avec le script Perl. Les patrons recherchés sont :
NOM ADJ, VERB DET NOM et DET NOM PREP NOM.
Méthode 1 : Perl
Cette méthode est faite sur le fichiers .txt produit par Udpipe dans le BAO2, la commande du script:
perl BAO3.pl sortie-udpipe-3208.txt NOUN ADJ > Resultat_NOM_ADJ.txt
Le script : BAO3.pl
Résultat de NOM ADJ: Resultat_NOM_ADJ.txt
Résultat de VERB DET NOM: Resultat_VERB_DET_NOM.txt
Résultat de DET NOM PREP NOM: Resultat_DET_NOM_PREP_NOM.txt
Méthode 2 : BaseX
Cette méthode est faite d’abord sur le fichier xml Treetagger, ici on manipule sur le fichier .xml obtenu dans BAO2 : sortie-treetagger-3208.txt.xml
BaseX_Requete_NOM_ADJ_treetagger.txt
BaseX_Resultat_NOM_ADJ_treetagger.txt
BaseX_Requete_VERB_DET_NOM_treetagger.txt
BaseX_Resultat_VERB_DET_NOM_treetagger.txt
BaseX_Requete_DET_NOM_PREP_NOM_treetagger.txt
BaseX_Resultat_DET_NOM_PREP_NOM_treetagger.txt
Cette méthode est faite ensuite sur le fichier xml Udpipe, ici on manipule sur le fichier .xml obtenu en utilisant le script udpipe2xml-version-sans-titrevsdescription-v2.pl, et on obtient le fichier: sortie-udpipe-3208.txt.xml
BaseX_Requete_NOM_ADJ_Udpipe.txt
BaseX_Resultat_NOM_ADJ_Udpipe.txt
BaseX_Requete_VERB_DET_NOM_Udpipe.txt
BaseX_Resultat_VERB_DET_NOM_Udpipe.txt
Méthode 3 : XSLT
Cette méthode est faite d’abord sur le fichier xml Treetagger, ici on manipule sur le fichier .xml obtenu dans BAO2 : sortie-treetagger-3208.txt.xml
La commande :
xsltproc NOM_ADJ_Treetagger.xsl sortie-treetagger-3208.txt.xml > Treetagger_NOM_ADJ_xslt.txt
Résultat : Treetagger_NOM_ADJ_xslt.txt
La commande:
xsltproc VERB_DET_NOM_Treetagger.xsl sortie-treetagger-3208.txt.xml > Treetagger_VERB_DET_NOM_xslt.txt
Xslt : VERB_DET_NOM_Treetagger.xsl
Résultat : Treetagger_VERB_DET_NOM_xslt.txt
La commande:
xsltproc DET_NOM_PREP_NOM_Treetagger.xsl sortie-treetagger-3208.txt.xml > Treetagger_DET_NOM_PREP_NOM_xslt.txt
Xslt : Treetagger_DET_NOM_PREP_NOM.xsl
Résultat : Treetagger_DET_NOM_PREP_NOM_xslt.txt
Cette méthode est faite ensuite sur le fichier xml produit par Udpipe : sortie-udpipe-3208.txt.xml
La commande :
xsltproc NOM_ADJ_Udpipe.xsl sortie-udpipe-3208.txt.xml > Udpipe_NOM_ADJ_xslt.txt
Résultat : Udpipe_NOM_ADJ_xslt.txt
La commande :
xsltproc VERB_DET_NOM_Udpipe.xsl sortie-udpipe-3208.txt.xml > Udpipe_VERB_DET_NOM_xslt.txt
Xslt : VERB_DET_NOM_Udpipe.xsl
Résultat : Udpipe_VERB_DET_NOM_xslt.txt
La commande :
xsltproc DET_NOM_PREP_NOM_Udpipe.xsl sortie-udpipe-3208.txt.xml > Udpipe_DET_NOM_PREP_NOM_xslt.txt
Xslt : DET_NOM_PREP_NOM_Udpipe.xsl
Résultat : Udpipe_DET_NOM_PREP_NOM_xslt.txt