Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / scripts / testTT.groovy @ 479

History | View | Annotate | Download (17.5 kB)

1
/**
2
 * Main.
3
 *
4
 * @param args the args
5
 */
6
// Copyright © 2010-2013 ENS de Lyon.
7
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
8
// Lyon 2, University of Franche-Comté, University of Nice
9
// Sophia Antipolis, University of Paris 3.
10
// 
11
// The TXM platform is free software: you can redistribute it
12
// and/or modify it under the terms of the GNU General Public
13
// License as published by the Free Software Foundation,
14
// either version 2 of the License, or (at your option) any
15
// later version.
16
// 
17
// The TXM platform is distributed in the hope that it will be
18
// useful, but WITHOUT ANY WARRANTY; without even the implied
19
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20
// PURPOSE. See the GNU General Public License for more
21
// details.
22
// 
23
// You should have received a copy of the GNU General
24
// Public License along with the TXM platform. If not, see
25
// http://www.gnu.org/licenses.
26
// 
27
// 
28
// 
29
// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun. 06 mai 2013) $
30
// $LastChangedRevision: 2386 $
31
// $LastChangedBy: mdecorde $ 
32
//
33
package org.txm.scripts;
34

    
35
import java.util.ArrayList;
36
import org.txm.utils.treetagger.TreeTagger;
37
import org.txm.utils.*;
38
import org.txm.importer.*;
39
import org.txm.importer.RGAQCJ.*;
40
import java.io.File;
41
import java.text.DateFormat;
42
import java.util.Date;
43
import java.text.DecimalFormat;
44
// TODO: Auto-generated Javadoc
45

    
46
/**
47
 * test TT wrapper
48
 * add NLP annotation
49
 * build result matrix.
50
 *
51
 * @return the java.lang. object
52
 */
53
String rootDir = "~/xml/rgaqcj/";
54
new File(rootDir+"/models/").mkdir();
55
new File(rootDir+"/lexicon/").mkdir();
56
new File(rootDir+"/proj/").mkdir();
57
new File(rootDir+"/ttlearn/").mkdir();
58
new File(rootDir+"/ttsrc/").mkdir();
59
new File(rootDir+"/pos/").mkdir();
60
new File(rootDir+"/injection/").mkdir();
61
new File(rootDir+"/anainline/").mkdir();
62
new File(rootDir+"/xml-txm/").mkdir();
63

    
64
//create srcana.xml from src.xml
65
def srcfiles = ["roland.xml","artu.xml","qjm.xml","commyn1.xml","jehpar.xml"];
66
def anafiles = ["roland-ana.xml","artu-ana.xml","qjm-ana.xml","commyn1-ana.xml","jehpar-ana.xml"];
67
def xslfiles = ["bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl"];
68
//bfmgraal2txm-w.xsl
69
for(int i=0 ; i < xslfiles.size() ; i++)
70
{
71
        String xslfile = rootDir+"xsl/"+xslfiles[i];
72
        String infile = rootDir+"src/"+srcfiles[i];
73
        String outfile = rootDir+"anainline/"+anafiles[i];
74
        println("create xml-txm from "+srcfiles[i]);
75
        ApplyXsl a = new ApplyXsl(xslfile);
76
        a.process(infile,outfile);
77
}
78

    
79
//Import to CWB
80
def cwbLoc ="~/Bureau/textometrie/CWB/cwb-3.0/utils/";//chemin vers executable cqp
81
BuildXmlRGAQCJ.process( anafiles,  rootDir, cwbLoc)
82
println("build wtc RGAQCJ");
83
println("encode + makeall");
84

    
85
//create TT TRAIN files
86
def ttlearnfiles = ["roland-learn.tt","artu-learn.tt","qjm-learn.tt","commyn1-learn.tt","jehpar-learn.tt","rgaqcj-learn.tt"];
87
String initiales = "RAQCJZ"
88

    
89
//ProcessBuilderBuilder.build(new File("src/groovy/org/txm/scripts/cwb-decode-wrapper-definition.xml"), new File("src/groovy/org/textometrie/scripts/CwbDecode.groovy"));
90
GroovyClassLoader gcl = new GroovyClassLoader();
91
gcl.addClasspath(".");
92

    
93
String registryPath = rootDir+"/registry";
94
String cwbdecodeexecDir = "~/Bureau/trunkCWB/cwb-3.0/utils/"
95

    
96
Class clazz = gcl.parseClass(new File("src/groovy/org/txm/scripts/CwbDecode.groovy"));
97
def aScript = clazz.newInstance(cwbdecodeexecDir);
98

    
99
aScript.setC()
100
def pAttributesTrain = ["word","cat"];
101
def pAttributesLex = ["word","cat","LEMMA"];
102
def pAttributesTag = ["word"];
103
def sAttributes = ["s"];
104
aScript.setP(pAttributesTag)
105
aScript.setS(sAttributes)
106
aScript.setr(registryPath)
107
aScript.debug(true);
108
int[] nbmots = [0,35306,134170,173526,198929,228149]
109

    
110
for(int i=0 ; i < initiales.length() ; i++)
111
{
112
        println("creation TTsrc "+ttlearnfiles[i]);
113
        FileOutputStream fos = new FileOutputStream(rootDir+"/ttsrc/"+ttlearnfiles[i]);
114
        PrintStream ps = new PrintStream(fos);
115
        def out = System.out;
116
        if(!(initiales[i]+"").matches("Z"))
117
        {
118
                if(i > 0)
119
                        aScript.sets(nbmots[i]+1)
120
                else
121
                        aScript.sets(nbmots[i])
122
                aScript.sete(nbmots[i+1])
123
        }
124
        else
125
        {
126
                aScript.unsets();
127
                aScript.unsete();
128
        }
129
        System.setOut(ps);
130
        
131
        if(System.getProperty("os.name").contains("Windows"))
132
                aScript.cwbdecodeexe("RGAQCJ")
133
        else
134
                aScript.cwbdecode("RGAQCJ")
135
        
136
        System.setOut(out);
137
}
138

    
139

    
140
aScript.unsetS()
141
aScript.setP(pAttributesTrain)
142
for(int i=0 ; i < initiales.length() ; i++)
143
{
144
        println("creation TTlearn "+ttlearnfiles[i]);
145
        FileOutputStream fos = new FileOutputStream(rootDir+"/ttlearn/"+ttlearnfiles[i]);
146
        PrintStream ps = new PrintStream(fos);
147
        def out = System.out;
148
        if(!(initiales[i]+"").matches("Z"))
149
        {
150
                if(i > 0)
151
                        aScript.sets(nbmots[i]+1)
152
                else
153
                        aScript.sets(nbmots[i])
154
                aScript.sete(nbmots[i+1])
155
        }
156
        else
157
        {
158
                aScript.unsets();
159
                aScript.unsete();
160
        }
161
        System.setOut(ps);
162
        
163
        if(System.getProperty("os.name").contains("Windows"))
164
                aScript.cwbdecodeexe("RGAQCJ")
165
        else
166
                aScript.cwbdecode("RGAQCJ")
167
        
168
        System.setOut(out);
169
}
170
aScript.setP(pAttributesLex)
171
HSQLFunctions.clearAll();
172
HashMap<String,Integer> nbFormLexique = new HashMap<String,Integer>()
173
HashMap<String,Integer> nbOccurencesTxt = new HashMap<String,Integer>()
174
for(int i=0 ; i < initiales.length() ; i++)
175
{
176
        println("creation lex brut lex_"+initiales[i]);
177
        FileOutputStream fos = new FileOutputStream(rootDir+"lexicon/lex_"+initiales[i]);
178
        PrintStream ps = new PrintStream(fos);
179
        def out = System.out;
180
        if(!(initiales[i]+"").matches("Z"))
181
        {
182
                if(i > 0)
183
                        aScript.sets(nbmots[i]+1)
184
                else
185
                        aScript.sets(nbmots[i])
186
                aScript.sete(nbmots[i+1])
187
        }
188
        else
189
        {
190
                aScript.unsets();
191
                aScript.unsete();
192
        }
193
        System.setOut(ps);
194
        
195
        if(System.getProperty("os.name").contains("Windows"))
196
                aScript.cwbdecodeexe("RGAQCJ")
197
        else
198
                aScript.cwbdecode("RGAQCJ")
199
        
200
        System.setOut(out);
201
        def argsname = ["form","cat","lemme"];
202
        def types = ["VARCHAR(30)","VARCHAR(30)","VARCHAR(30)"];
203
        File lexfile = new File(rootDir+"lexicon/lex_"+initiales[i]);
204
        int nbMot = HSQLFunctions.ImportOrderedCSVTable("lexbrut_"+initiales[i], argsname,types,lexfile,"\t","UTF-8");
205
        nbOccurencesTxt.put("lexbrut_"+initiales[i],nbMot);
206
        //HSQLFunctions.ImportCSVTable("lex_"+initiales[i], argsname,types,lexfile,"\t","ISO-8859-1");
207
        
208
        argsname = ["cat","lemme"];
209
        int nbForm = HSQLFunctions.toRefHierarchicalFile( "lexbrut_"+initiales[i], lexfile.getAbsolutePath(),"form",argsname,"UTF-8");
210
        nbFormLexique.put("lex_"+initiales[i],nbForm);
211
}
212
aScript.unsets();
213
aScript.unsete();
214
println("creation lex brut RGAQCJ");
215
FileOutputStream fos = new FileOutputStream(rootDir+"/lexicon/rgaqcj-brut");
216
PrintStream ps = new PrintStream(fos);
217
def out = System.out;
218
System.setOut(ps);
219

    
220
if(System.getProperty("os.name").contains("Windows"))
221
        aScript.cwbdecodeexe("RGAQCJ")
222
else
223
        aScript.cwbdecode("RGAQCJ")
224

    
225
System.setOut(out);
226

    
227
println("create lexiq from csv");
228

    
229
//train
230
//def ttlearnfiles = ["roland-learn.tt","qgraal_cm-learn.tt","artu-learn.tt","qjm-learn.tt","commyn1-learn.tt","jehpar-learn.tt","rgaqcj-learn.tt"];
231
def modelfiles = ["roland.par","artu.par","qjm.par","commyn1.par","jehpar.par","rgaqcj.par"];
232

    
233
def lexfiles = ["lex_R","lex_A","lex_Q","lex_C","lex_J","lex_Z"];
234
def openclassfiles = ["open_class_R.txt","open_class_A.txt","open_class_Q.txt","open_class_C.txt","open_class_J.txt","open_class_Z.txt"];
235
//def lexiconfile = rootDir+"/lexicon/"+"lexfra-rgaqcj.txt";
236

    
237

    
238
for(int i=0; i < ttlearnfiles.size();i++)
239
{
240
        String infile = rootDir+"/ttlearn/"+ttlearnfiles[i];
241
        String outfile = rootDir+"/models/"+modelfiles[i];
242
        String lexiconfile = rootDir+"/lexicon/"+lexfiles[i];
243
        String openclassfile = rootDir+"/lexicon/"+openclassfiles[i];
244
        TreeTagger tt = new TreeTagger("~/Bureau/treetagger/bin/");
245
        println("learn "+ttlearnfiles[i] +" >> "+modelfiles[i]);
246
        tt.settoken();
247
        tt.setquiet();
248
        //tt.setlemma();
249
        tt.setsgml();
250
        tt.setst("PONfrt");
251
        tt.setproto();
252
        tt.setutf8();
253
        tt.traintreetagger( lexiconfile, openclassfile, infile, outfile)
254
}
255

    
256
//projection
257
def ttsrcfiles = ["roland-learn.tt","artu-learn.tt","qjm-learn.tt","commyn1-learn.tt","jehpar-learn.tt","rgaqcj-learn.tt"];
258
def ttrezfiles = [];
259
for(int i=0; i < ttsrcfiles.size();i++)
260
{
261
        for(int j=0; j < modelfiles.size();j++)
262
        {
263
                String infile = rootDir+"/ttsrc/"+ttsrcfiles[i];
264
                String modelfile =  rootDir+"/models/"+modelfiles[j];
265
                String outfile = ttsrcfiles[i].substring(0,3)+"_"+modelfiles[j].substring(0,3)+".tt";
266
                ttrezfiles.add(outfile);
267
                println("proj "+modelfiles[j]+ " on " +ttsrcfiles[i] +" >> "+outfile);
268
                
269
                TreeTagger tt = new TreeTagger("~/Bureau/treetagger/bin/");
270
                tt.settoken();
271
                tt.setquiet();
272
                tt.setsgml();
273
                tt.seteostag("<s>");
274
                tt.treetagger( modelfile, infile, rootDir+"proj/"+outfile)
275
        }
276
}
277

    
278

    
279

    
280
/*
281
 //create ana-pos.xml files
282
 def posfiles = ["roland-pos","artu-pos","qjm-pos","commyn1-pos","jehpar-pos","rgaqcj-pos"];
283
 String encoding ="ISO-8859-1";
284
 String person ="Serge Heiden"; 
285
 String software = "tree-tagger cmd line with options ..."; 
286
 String cmdLine = "tree-tagger -token ...";
287
 String title ="POS annotation";
288
 def types = ["POS","lemma"];
289
 String idform ="fro";
290
 for(int i=0; i < ttsrcfiles.size();i++)
291
 {
292
 for(int j = 0; j< ttsrcfiles.size();j++)
293
 {
294
 int c = j +i*ttsrcfiles.size(); // id ttrez
295
 File ttfile = new File(rootDir+"/tt/",ttrezfiles[c]);
296
 File posfile = new File(rootDir+"/pos/",posfiles[i]+"-"+modelfiles[j].substring(0,3)+".xml");
297
 println("TTrez > ana-pos : "+ttfile+" to : "+posfile );
298
 c++;
299
 def transfo = new TTrezToXml();
300
 transfo.setAnnotationTypes( types, idform);
301
 transfo.setResp( person, software, cmdLine);
302
 transfo.process( ttfile, posfile, encoding );
303
 }
304
 }        
305
 //injection annotations
306
 String respPerson ="sheiden"
307
 String respId = "";
308
 String respDate = DateFormat.getDateInstance(DateFormat.FULL, Locale.UK).format(new Date());
309
 String respCDATA = "";
310
 for(int i=0; i < anafiles.size();i++)
311
 {
312
 for(int j = 0; j < 6 ; j++)
313
 {
314
 File srcfile = new File(rootDir+"/anainline/",anafiles[i]);
315
 File posfile = new File(rootDir+"/pos/",posfiles[i]+"-"+modelfiles[j].substring(0,3)+".xml");
316
 println("annote file : "+srcfile+" with : "+posfile );
317
 def builder = new AnnotationInjection(srcfile.toURL(), posfile.toURL(), solotags);
318
 builder.setResp(respId,respPerson, respDate, respCDATA);
319
 builder.transfomFile(rootDir+"/injection/",anafiles[i]);
320
 }
321
 }        
322
 */
323
//remove <s> from ttrezfiles
324
String encoding = "UTF-8"
325
for(int i=0; i < ttrezfiles.size();i++)
326
{
327
        String csvfile = rootDir+"proj/"+ttrezfiles[i];
328
        File f = new File(csvfile);
329
        File temp = new File("tempFileCVScleaner")
330
        println("fix <s> "+f);
331
        Reader reader = new InputStreamReader(new FileInputStream(csvfile),encoding);
332
        Writer writer = new FileWriter(temp);
333
        reader.eachLine 
334
                        {
335
                                if(!it.startsWith("<s") && !it.startsWith("</s"))
336
                                        writer.write(it+"\n")
337
                        }
338
        reader.close();
339
        writer.close();
340
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
341
}
342

    
343
//Build process infos
344
//import table into hsql
345
for(int i=0; i < ttrezfiles.size();i++)
346
{
347
        String csvfile = rootDir+"proj/"+ttrezfiles[i];
348
        def argsname = ["form","cat"];
349
        def types = ["VARCHAR(30)","VARCHAR(30)"];
350
        HSQLFunctions.ImportOrderedCSVTable(ttrezfiles[i].replace(".",""), argsname,types,new File(csvfile),"\t","UTF-8");
351
        println("create Table "+ttrezfiles[i].replace(".",""));
352
}
353

    
354
//calc richesses lexicales
355
LinkedHashMap<String,ArrayList<String>> richesses = new LinkedHashMap<String,ArrayList<String>>();
356
richesses.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
357

    
358
LinkedHashMap<String,ArrayList<String>> richessesCat = new LinkedHashMap<String,ArrayList<String>>();
359
richessesCat.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
360

    
361
LinkedHashMap<String,ArrayList<String>> richessesocc = new LinkedHashMap<String,ArrayList<String>>();
362
richesses.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
363

    
364
LinkedHashMap<String,ArrayList<String>> richessesoccCat = new LinkedHashMap<String,ArrayList<String>>();
365
richessesCat.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
366
for(int i=0;i < initiales.size();i++)
367
{
368
        richesses.put(""+initiales[i], new ArrayList<String>());
369
        richessesCat.put(""+initiales[i], new ArrayList<String>());
370
        richessesocc.put(""+initiales[i], new ArrayList<String>());
371
        richessesoccCat.put(""+initiales[i], new ArrayList<String>());
372
}
373
for(int i=0; i < initiales.size();i++)
374
{
375
        for(int j=0; j < initiales.size();j++)
376
        {
377
                String query = "SELECT count(*) FROM ((SELECT DISTINCT form FROM lexbrut_"+initiales[i]+" ) MINUS (SELECT DISTINCT form FROM lexbrut_"+initiales[j]+"))"
378
                println(query);
379
                String query2 = "SELECT count(*) FROM ((SELECT DISTINCT cat FROM lexbrut_"+initiales[i]+" ) MINUS (SELECT DISTINCT cat FROM lexbrut_"+initiales[j]+"))"
380
                println(query2);
381
                String query3 = "SELECT count(form) FROM lexbrut_"+initiales[i]+" WHERE form NOT IN (SELECT form FROM lexbrut_"+initiales[j]+")"
382
                println(query3);
383
                String query4 = "SELECT count(cat) FROM lexbrut_"+initiales[i]+" WHERE cat NOT IN (SELECT cat FROM lexbrut_"+initiales[j]+")"
384
                println(query4);
385
                HSQLFunctions.getGroovySql().eachRow(query) {
386
                        def rich = it.getAt(0);
387
                        println("rich form :"+ rich);
388
                        richesses.get(""+initiales[i]).add( ""+rich ) ;        
389
                }
390
                
391
                HSQLFunctions.getGroovySql().eachRow(query2) {
392
                        def rich = it.getAt(0);
393
                        println("rich cat :"+ rich);
394
                        richessesCat.get(""+initiales[i]).add( ""+rich ) ;        
395
                }
396
                
397
                
398
                HSQLFunctions.getGroovySql().eachRow(query3) {
399
                        def rich = it.getAt(0);
400
                        println("richocc form :"+ rich);
401
                        richessesocc.get(""+initiales[i]).add( ""+rich ) ;        
402
                }
403
                
404
                HSQLFunctions.getGroovySql().eachRow(query4) {
405
                        def rich = it.getAt(0);
406
                        println("richocc cat :"+ rich);
407
                        richessesoccCat.get(""+initiales[i]).add( ""+rich ) ;        
408
                }
409
        }
410
}
411

    
412
LinkedHashMap<String,ArrayList<String>> matrix = new LinkedHashMap<String,ArrayList<String>>();
413

    
414
matrix.put("Text", ["T    ","Vf    ","Vc    ","TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
415
for(int i=0;i < initiales.size();i++)
416
{
417
        matrix.put(""+initiales[i], new ArrayList<String>());
418
}
419

    
420
ArrayList<Integer> countOccForm = new ArrayList<Integer>();
421
ArrayList<Integer> countOccCat = new ArrayList<Integer>();
422
ArrayList<Integer> countLexForm = new ArrayList<Integer>();
423
ArrayList<Integer> countLexCat = new ArrayList<Integer>();
424

    
425
for(int i=0;i < initiales.size() ; i++ )
426
{
427
        String query1 = "SELECT count(*) FROM (SELECT form from lexbrut_"+initiales[i]+")";
428
        String query2 = "SELECT count(*) FROM (SELECT cat from lexbrut_"+initiales[i]+")";
429
        String query3 = "SELECT count(*) FROM (SELECT DISTINCT form from lexbrut_"+initiales[i]+")";
430
        String query4 = "SELECT count(*) FROM (SELECT DISTINCT cat from lexbrut_"+initiales[i]+")";
431
        
432
        HSQLFunctions.getGroovySql().eachRow(query1) {
433
                def rich = it.getAt(0);
434
                println("count occ form :"+ rich);
435
                countOccForm.add( ""+rich ) ;        
436
        }
437
        HSQLFunctions.getGroovySql().eachRow(query2) {
438
                def rich = it.getAt(0);
439
                println("coutn occ cat :"+ rich);
440
                countOccCat.add( ""+rich ) ;        
441
        }
442
        HSQLFunctions.getGroovySql().eachRow(query3) {
443
                def rich = it.getAt(0);
444
                println("count lex form :"+ rich);
445
                countLexForm.add( ""+rich ) ;        
446
        }
447
        HSQLFunctions.getGroovySql().eachRow(query4) {
448
                def rich = it.getAt(0);
449
                println("count lex cat :"+ rich);
450
                countLexCat.add( ""+rich ) ;        
451
        }
452
        println("col1 et 2 : "+nbOccurencesTxt.get("lexbrut_"+initiales[i])+" "+nbFormLexique.get("lex_"+initiales[i]))
453
        matrix.get(""+initiales[i]).add( ""+nbOccurencesTxt.get("lexbrut_"+initiales[i]) ) ;
454
        matrix.get(""+initiales[i]).add( ""+nbFormLexique.get("lex_"+initiales[i]) ) ;
455
        matrix.get(""+initiales[i]).add( "0" ) ;
456
}
457
for(int i=0; i < ttrezfiles.size();i++)
458
{
459
        //get occurences ordonnées de la gold
460
                //get occurences ordonnées de la projection
461
                //compare
462
        
463
        int id = i/ttsrcfiles.size();
464
        
465
        println("comp "+ttrezfiles[i]+" VS lexbrut_"+initiales[id]);
466
        String query = "SELECT count(*) FROM ((SELECT n,form,cat FROM lexbrut_"+initiales[id]+" ) MINUS (SELECT n,form,cat FROM "+ttrezfiles[i].replace(".","")+"))"
467
        //HSQLFunctions.executeQuery(query);
468
        //println(query)
469
        int ttotal=0;
470
        int total ;
471
        HSQLFunctions.getGroovySql().eachRow(query) {
472
                def dif = it.getAt(0);
473
                if((""+initiales[id]) != "Z")
474
                {
475
                        total = nbmots[id+1] - nbmots[id];
476
                        ttotal += total;
477
                }
478
                else
479
                        total= ttotal;
480
                
481
                total = nbOccurencesTxt.get("lexbrut_"+initiales[id])
482
                println("dif "+dif+"/ tot "+total+" = "+((float)dif/(float)total));
483
                Float perf = ((float)dif/(float)total)*100f;                        
484
                matrix.get(""+initiales[id]).add( ""+perf ) ;
485
        }
486
        
487
        /*        HSQLFunctions.getGroovySql().eachRow("SELECT count(*) from "+table+" WHERE form NOT IN (SELECT form FROM "+ttrezfiles[i].replace(".","")+")") {
488
         def dif = it.getAt(0);
489
         int total = nbmots[i+1] - nbmots[i];
490
         richesses.put(""+initiales[i],""+(dif/total)) ;
491
         }*/
492
}
493
println("Matrice d'erreur : ");
494
for(String k : matrix.keySet())
495
{
496
        print(k)
497
        for(String f : matrix.get(k))
498
                print("\t"+f)
499
        println()
500
}
501
println("richesse lexiques en Form : ");
502
for(String k : richesses.keySet())
503
{
504
        print(k)
505
        for(String f : richesses.get(k))
506
                print("\t"+f)
507
        println()
508
}
509
println("richesse lexiques en Cat : ");
510
for(String k : richessesCat.keySet())
511
{
512
        print(k)
513
        for(String f : richessesCat.get(k))
514
                print("\t"+f)
515
        println()
516
}
517

    
518
println("richesse occurance en Form : ");
519
for(String k : richessesocc.keySet())
520
{
521
        print(k)
522
        for(String f : richessesocc.get(k))
523
                print("\t"+f)
524
        println()
525
}
526
println("richesse occurance en Cat : ");
527
for(String k : richessesoccCat.keySet())
528
{
529
        print(k)
530
        for(String f : richessesoccCat.get(k))
531
                print("\t"+f)
532
        println()
533
}
534

    
535
println("RichBrutes        roland        artu        qjm        comm        jehpar        rgaqcj");
536
print("Focc")
537
for(int i=0;i < countOccForm.size() ; i++)
538
        print("\t"+countOccForm[i]); 
539
print("\nCocc")
540
for(int i=0;i < countOccCat.size() ; i++)
541
        print("\t"+countOccCat[i]); 
542
print("\nFvoc")
543
for(int i=0;i < countLexForm.size() ; i++)
544
        print("\t"+countLexForm[i]); 
545
print("\nCvoc")
546
for(int i=0;i < countLexCat.size() ; i++)
547
        print("\t"+countLexCat[i]); 
548
println()
549