1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
pack1
public void lemmatiser(String mot)
{
SAXBuilder sxb = new SAXBuilder();
try
{
documentres = sxb.build(new File(mot+".xml"));
racine = documentres.getRootElement();
Element texte=racine.getChild("texte");
Element phrase=racine.getChild("phrase");
List<?> unite_lexicale = phrase.getChildren("unite_lexicale");
Iterator<?> lexc = unite_lexicale.iterator();
while (lexc.hasNext())
{
Element cour = (Element) lexc.next();
Element unite =cour.getChild("unite");
String unit=unite.getText();
System.out.println("La forme flechie est: "+unit);
Element mot_intermediaire =cour.getChild("mot_intermediaire");
List<?> caracteristiques =mot_intermediaire.getChildren("caracteristiques");
Iterator<?> carac = caracteristiques.iterator();
while(carac.hasNext())
{
Element cour1 = (Element) carac.next();
Element categorie=cour1.getChild("categorie");
Element racine=cour1.getChild("racine");
racin=racine.getText();
System.out.println("Son racine est "+racin);
vect.addElement(racin);
// vect.elementAt(1); |