Statistics
| Revision:

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

History | View | Annotate | Download (17.7 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: 2016-03-29 09:51:35 +0200 (mar. 29 mars 2016) $
30
// $LastChangedRevision: 3185 $
31
// $LastChangedBy: mdecorde $ 
32
//
33
package org.txm.scripts;
34

    
35
/**
36
 * test tnt Wrapper :
37
 *  add NLP annotations
38
 *  build result matrix
39
 *  
40
 */
41

    
42
import org.txm.utils.*;
43
import org.txm.importer.*;
44
import org.txm.importer.RGAQCJ.*;
45

    
46
// TODO: Auto-generated Javadoc
47
/* (non-Javadoc)
48
 * @see groovy.lang.Script#run()
49
 */
50
String rootDir = "~/xml/rgaqcj/TnT/";
51
String modelsDir = rootDir+"models/";
52
String textsDir = rootDir+"texts/";
53
String projsDir = rootDir+"proj/";
54
String srcDir = rootDir+"src/"
55
String xslDir = rootDir+"xsl/"
56
String anaDir = rootDir+"anainline/"
57
new File(modelsDir).mkdir();
58
new File(textsDir).mkdir();
59
new File(projsDir).mkdir();
60

    
61
def texts =["roland","artu","qjm","commyn1","jehpar","rgaqcj"]
62
//def texts =["commyn1","jehpar"]
63
String initiales = "RAQCJZ"
64

    
65
//import src
66
def srcfiles = ["roland.xml","artu.xml","qjm.xml","commyn1.xml","jehpar.xml"];
67
def anafiles = ["roland-ana.xml","artu-ana.xml","qjm-ana.xml","commyn1-ana.xml","jehpar-ana.xml"];
68
def xslfiles = ["bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl","bfm2txm-w.xsl"];
69
/*
70
 for(int i=0 ; i < xslfiles.size() ; i++)
71
 {
72
 String xslfile = xslDir+xslfiles[i];
73
 String infile = srcDir+srcfiles[i];
74
 String outfile = anaDir+anafiles[i];
75
 println("create xml-txm from "+srcfiles[i]);
76
 ApplyXsl a = new ApplyXsl(xslfile);
77
 a.process(infile,outfile);
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
 */
83
//build CWBDecode wrapper
84
ProcessBuilderBuilder.build(new File("src/groovy/org/txm/scripts/cwb-decode-wrapper-definition.xml"), new File("src/groovy/org/textometrie/scripts/CwbDecode.groovy"));
85
GroovyClassLoader gcl = new GroovyClassLoader();
86
gcl.addClasspath(".");
87

    
88
String registryPath = rootDir+"/registry";
89
String cwbdecodeexecDir = "~/Bureau/trunkCWB/cwb-3.0/utils/"
90

    
91
Class clazz = gcl.parseClass(new File("src/groovy/org/txm/scripts/CwbDecode.groovy"));
92
def cwbdecodewrapper = clazz.newInstance(cwbdecodeexecDir);
93
def pAttributesTrain = ["word","cat"];
94
def pAttributesTag = ["word"];
95
def sAttributes = ["s"];
96
cwbdecodewrapper.setC();
97
cwbdecodewrapper.setP(pAttributesTag);
98
cwbdecodewrapper.setS(sAttributes);
99
cwbdecodewrapper.setr(registryPath);
100
cwbdecodewrapper.debug(true);
101
int[] nbmots = [0,35306,134170,173526,198929,228149];
102

    
103
//create file to proj on
104
for(int i = 0 ; i < texts.size() ; i++)
105
{
106
        String text = texts[i];
107
        println("creation TTsrc "+text);
108
        
109
        //build src files
110
        cwbdecodewrapper.setP(pAttributesTag);
111
        
112
        if(!(initiales[i]+"").equals("Z"))
113
        {
114
                if(i > 0)
115
                        cwbdecodewrapper.sets(nbmots[i]+1)
116
                else
117
                        cwbdecodewrapper.sets(nbmots[i])
118
                cwbdecodewrapper.sete(nbmots[i+1])
119
        }
120
        else
121
        {
122
                cwbdecodewrapper.unsets();
123
                cwbdecodewrapper.unsete();
124
        }
125
        FileOutputStream fos = new FileOutputStream(textsDir+texts[i]+".t");
126
        PrintStream ps = new PrintStream(fos);
127
        def out = System.out;
128
        System.setOut(ps);
129
        
130
        if(System.getProperty("os.name").contains("Windows"))
131
                cwbdecodewrapper.cwbdecodeexe("RGAQCJ")
132
        else
133
                cwbdecodewrapper.cwbdecode("RGAQCJ")
134
        System.setOut(out);
135
        
136
        //build train files
137
        cwbdecodewrapper.setP(pAttributesTrain);
138
        
139
        fos = new FileOutputStream(modelsDir+texts[i]+".t");
140
        ps = new PrintStream(fos);
141
        System.setOut(ps);
142
        
143
        if(System.getProperty("os.name").contains("Windows"))
144
                cwbdecodewrapper.cwbdecodeexe("RGAQCJ")
145
        else
146
                cwbdecodewrapper.cwbdecode("RGAQCJ")
147
        System.setOut(out);
148
        
149
}
150

    
151
//need to replace <s> by nothing and </s> by \n
152
String encoding = "UTF-8"
153
for(String text : texts)
154
{
155
        //patch src files
156
        File f = new File(textsDir,text+".t");
157
        File temp = new File("tempFileCVScleaner")
158
        println("patch texts files "+f+": rmv <s> and replace </s>");
159
        Reader reader = new InputStreamReader(new FileInputStream(f),encoding);
160
        Writer writer = new FileWriter(temp);
161
        reader.eachLine 
162
                        {
163
                                if(it.trim().startsWith("</s"))
164
                                        writer.write("\n")
165
                                else if(it.trim().startsWith("<s"))
166
                                        writer.write("")
167
                                else
168
                                        writer.write(it+"\n")
169
                        }
170
        reader.close();
171
        writer.close();
172
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
173
}
174
//need to replace <s> by nothing and </s> by \n
175
for(String text : texts)
176
{
177
        //patch training files
178
        File f = new File(modelsDir,text+".t");
179
        File temp = new File("tempFileCVScleaner")
180
        println("patch models files "+f+": rmv <s> and replace </s>");
181
        Reader reader = new InputStreamReader(new FileInputStream(f),encoding);
182
        Writer writer = new FileWriter(temp);
183
        reader.eachLine 
184
                        {
185
                                if(it.trim().startsWith("</s"))
186
                                        writer.write("\n")
187
                                else if(it.trim().startsWith("<s"))
188
                                        writer.write("")
189
                                else
190
                                        writer.write(it+"\n")
191
                        }
192
        reader.close();
193
        writer.close();
194
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
195
}
196

    
197
//build Tnt Wrapper
198
//ProcessBuilderBuilder.build(new File("src/groovy/org/txm/scripts/tnt-wrapper-definition.xml"), new File("src/groovy/org/textometrie/scripts/TnT.groovy"));
199
gcl = new GroovyClassLoader();
200
gcl.addClasspath(".");
201
String tntexecDir = "~/Bureau/tnt/"
202
clazz = gcl.parseClass(new File("src/groovy/org/txm/scripts/TnT.groovy"));
203
def tntwrapper = clazz.newInstance(tntexecDir);
204

    
205
def ttrezfiles = [];
206
for(String text : texts)
207
{
208
        println "Apprentissage de "+text+"..."
209
        tntwrapper.tntpara(new File(modelsDir,text+".t"));
210
        //new File(text+".123").renameTo(new File(modelsDir,text+".123"));
211
        //new File(text+".lex").renameTo(new File(modelsDir,text+".lex"));
212
        for(String target : texts)
213
        {
214
                println "Projection de "+target+" sur "+target+"..."
215
                for(int mode=3 ; mode <=3 ; mode++)
216
                {
217
                        println("Mode "+mode+"...")
218
                        tntwrapper.setu(2);
219
                        
220
                        FileOutputStream fos = new FileOutputStream(projsDir+"model_"+text+"_target_"+target+"_mode"+mode+".t");
221
                        ttrezfiles.add("model_"+text+"_target_"+target+"_mode"+mode+".t")
222
                        PrintStream ps = new PrintStream(fos);
223
                        def out = System.out;
224
                        System.setOut(ps);
225
                        
226
                        tntwrapper.tnt(text,new File(textsDir,target+".t"));
227
                        
228
                        System.setOut(out);        
229
                }
230
        }
231
}
232

    
233
//def ttrezfiles = ["model_roland_targetroland_mode2.t", "model_roland_targetroland_mode3.t", "model_roland_targetartu_mode2.t", "model_roland_targetartu_mode3.t", "model_roland_targetqjm_mode2.t", "model_roland_targetqjm_mode3.t", "model_roland_targetcommyn1_mode2.t", "model_roland_targetcommyn1_mode3.t", "model_roland_targetjehpar_mode2.t", "model_roland_targetjehpar_mode3.t", "model_roland_targetrgaqcj_mode2.t", "model_roland_targetrgaqcj_mode3.t", "model_artu_targetroland_mode2.t","model_artu_targetroland_mode3.t", "model_artu_targetartu_mode2.t", "model_artu_targetartu_mode3.t", "model_artu_targetqjm_mode2.t", "model_artu_targetqjm_mode3.t", "model_artu_targetcommyn1_mode2.t", "model_artu_targetcommyn1_mode3.t", "model_artu_targetjehpar_mode2.t", "model_artu_targetjehpar_mode3.t", "model_artu_targetrgaqcj_mode2.t", "model_artu_targetrgaqcj_mode3.t", "model_qjm_targetroland_mode2.t, model_qjm_targetroland_mode3.t, model_qjm_targetartu_mode2.t, model_qjm_targetartu_mode3.t, model_qjm_targetqjm_mode2.t, model_qjm_targetqjm_mode3.t, model_qjm_targetcommyn1_mode2.t, model_qjm_targetcommyn1_mode3.t, model_qjm_targetjehpar_mode2.t, model_qjm_targetjehpar_mode3.t, model_qjm_targetrgaqcj_mode2.t, model_qjm_targetrgaqcj_mode3.t, model_commyn1_targetroland_mode2.t, model_commyn1_targetroland_mode3.t, model_commyn1_targetartu_mode2.t, model_commyn1_targetartu_mode3.t, model_commyn1_targetqjm_mode2.t, model_commyn1_targetqjm_mode3.t, model_commyn1_targetcommyn1_mode2.t, model_commyn1_targetcommyn1_mode3.t, model_commyn1_targetjehpar_mode2.t, model_commyn1_targetjehpar_mode3.t, model_commyn1_targetrgaqcj_mode2.t, model_commyn1_targetrgaqcj_mode3.t, model_jehpar_targetroland_mode2.t, model_jehpar_targetroland_mode3.t, model_jehpar_targetartu_mode2.t, model_jehpar_targetartu_mode3.t, model_jehpar_targetqjm_mode2.t, model_jehpar_targetqjm_mode3.t, model_jehpar_targetcommyn1_mode2.t, model_jehpar_targetcommyn1_mode3.t, model_jehpar_targetjehpar_mode2.t, model_jehpar_targetjehpar_mode3.t, model_jehpar_targetrgaqcj_mode2.t, model_jehpar_targetrgaqcj_mode3.t, model_rgaqcj_targetroland_mode2.t, model_rgaqcj_targetroland_mode3.t, model_rgaqcj_targetartu_mode2.t, model_rgaqcj_targetartu_mode3.t, model_rgaqcj_targetqjm_mode2.t, model_rgaqcj_targetqjm_mode3.t, model_rgaqcj_targetcommyn1_mode2.t, model_rgaqcj_targetcommyn1_mode3.t", "model_rgaqcj_targetjehpar_mode2.t", "model_rgaqcj_targetjehpar_mode3.t", "model_rgaqcj_targetrgaqcj_mode2.t", "model_rgaqcj_targetrgaqcj_mode3.t"];
234
println ttrezfiles;
235
//Build process infos
236
//remove lines which starts with %%
237
for(String text : ttrezfiles)
238
{
239
        //def encoding ="UTF-8"
240
        println "patch proj file"+text+" : remove %% lines and blank lines AND replace n\t by only one \t";
241
        File f = new File(projsDir,text);
242
        File temp = new File("tempFileCVScleaner")
243
        Reader reader = new InputStreamReader(new FileInputStream(f),encoding);
244
        Writer writer = new FileWriter(temp);
245
        reader.eachLine 
246
                        {
247
                                if(it.trim().startsWith("%%") || it.length() == 0)
248
                                        writer.write("")
249
                                else
250
                                        writer.write(it.replaceAll("(\t)+","\t")+"\n")
251
                        }
252
        reader.close();
253
        writer.close();
254
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
255
}
256

    
257
for(String text : texts)
258
{
259
        //def encoding ="UTF-8"
260
        println "patch model file"+text+" : remove blank lines";
261
        File f = new File(modelsDir,text+".t");
262
        File temp = new File("tempFileCVScleaner")
263
        Reader reader = new InputStreamReader(new FileInputStream(f),encoding);
264
        Writer writer = new FileWriter(temp);
265
        reader.eachLine 
266
                        {
267
                                if(it.length() == 0)
268
                                        writer.write("")
269
                                else
270
                                        writer.write(it+"\n")
271
                        }
272
        reader.close();
273
        writer.close();
274
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
275
}
276

    
277
HSQLFunctions.clearAll();
278
//import proj table into hsql
279
for(int i=0; i < ttrezfiles.size();i++)
280
{
281
        String csvfile = rootDir+"proj/"+ttrezfiles[i];
282
        def argsname = ["form","cat"];
283
        def types = ["VARCHAR(30)","VARCHAR(30)"];
284
        int linenumber = HSQLFunctions.ImportOrderedCSVTable(ttrezfiles[i].replace(".",""), argsname,types,new File(csvfile),"\t","UTF-8");
285
        println("create Table "+ttrezfiles[i].replace(".","")+" : "+linenumber+" lines");
286
}
287

    
288
for(String text : texts)
289
{
290
        File f = new File(modelsDir,text+".t");
291
        def argsname = ["form","cat"];
292
        def types = ["VARCHAR(30)","VARCHAR(30)"];
293
        int linenumber = HSQLFunctions.ImportOrderedCSVTable("lexbrut_"+text.replace(".",""), argsname,types,f,"\t","UTF-8");
294
        println("create Table lexbrut_"+text.replace(".","")+" : "+linenumber+" lines");
295
}
296

    
297
//calc richesses lexicales
298
LinkedHashMap<String,ArrayList<String>> richesses = new LinkedHashMap<String,ArrayList<String>>();
299
richesses.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
300

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

    
304
LinkedHashMap<String,ArrayList<String>> richessesocc = new LinkedHashMap<String,ArrayList<String>>();
305
richessesocc.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
306

    
307
LinkedHashMap<String,ArrayList<String>> richessesoccCat = new LinkedHashMap<String,ArrayList<String>>();
308
richessesoccCat.put("Text", ["TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
309
for(String text : texts)
310
{
311
        richesses.put(text, new ArrayList<String>());
312
        richessesCat.put(text, new ArrayList<String>());
313
        richessesocc.put(text, new ArrayList<String>());
314
        richessesoccCat.put(text, new ArrayList<String>());
315
}
316

    
317
for(String text : texts)
318
{
319
        for(String model : texts)
320
        {
321
                if(text.matches(model))
322
                {
323
                        richesses.get(text).add( "0" ) ;
324
                        richessesCat.get(text).add( "0") ;        
325
                        richessesocc.get(text).add( "0" ) ;        
326
                        richessesoccCat.get(text).add( "0" ) ;        
327
                }
328
                else
329
                {
330
                        String query = "SELECT count(*) FROM ((SELECT DISTINCT form FROM lexbrut_"+text+" ) MINUS (SELECT DISTINCT form FROM lexbrut_"+model+"))"
331
                        println(query);
332
                        String query2 = "SELECT count(*) FROM ((SELECT DISTINCT cat FROM lexbrut_"+text+" ) MINUS (SELECT DISTINCT cat FROM lexbrut_"+model+"))"
333
                        println(query2);
334
                        String query3 = "SELECT count(form) FROM lexbrut_"+text+" WHERE form NOT IN (SELECT form FROM lexbrut_"+model+")"
335
                        println(query3);
336
                        String query4 = "SELECT count(cat) FROM lexbrut_"+text+" WHERE cat NOT IN (SELECT cat FROM lexbrut_"+model+")"
337
                        println(query4);
338
                        HSQLFunctions.getGroovySql().eachRow(query) {
339
                                def rich = it.getAt(0);
340
                                println("rich form :"+ rich);
341
                                richesses.get(text).add( ""+rich ) ;        
342
                        }
343
                        
344
                        HSQLFunctions.getGroovySql().eachRow(query2) {
345
                                def rich = it.getAt(0);
346
                                println("rich cat :"+ rich);
347
                                richessesCat.get(text).add( ""+rich ) ;        
348
                        }
349
                        
350
                        
351
                        HSQLFunctions.getGroovySql().eachRow(query3) {
352
                                def rich = it.getAt(0);
353
                                println("richocc form :"+ rich);
354
                                richessesocc.get(text).add( ""+rich ) ;        
355
                        }
356
                        
357
                        HSQLFunctions.getGroovySql().eachRow(query4) {
358
                                def rich = it.getAt(0);
359
                                println("richocc cat :"+ rich);
360
                                richessesoccCat.get(text).add( ""+rich ) ;        
361
                        }
362
                }
363
        }
364
}
365

    
366
LinkedHashMap<String,ArrayList<String>> matrix = new LinkedHashMap<String,ArrayList<String>>();
367

    
368
matrix.put("Text", ["T    ","Vf    ","Vc    ","TTrola","TTartu","TTqjm","TTcomm","TTjehpar","TTrgaqcj"]);
369
for(String text : texts)
370
{
371
        matrix.put(text, new ArrayList<String>());
372
}
373

    
374
ArrayList<Integer> countOccForm = new ArrayList<Integer>();
375
ArrayList<Integer> countOccCat = new ArrayList<Integer>();
376
ArrayList<Integer> countLexForm = new ArrayList<Integer>();
377
ArrayList<Integer> countLexCat = new ArrayList<Integer>();
378

    
379
for(String text : texts)
380
{
381
        println("count occ and voc : lexbrut_"+text)
382
        String query1 = "SELECT count(*) FROM (SELECT form from lexbrut_"+text+")";
383
        String query2 = "SELECT count(*) FROM (SELECT cat from lexbrut_"+text+")";
384
        String query3 = "SELECT count(*) FROM (SELECT DISTINCT form from lexbrut_"+text+")";
385
        String query4 = "SELECT count(*) FROM (SELECT DISTINCT cat from lexbrut_"+text+")";
386
        
387
        HSQLFunctions.getGroovySql().eachRow(query1) {
388
                def rich = it.getAt(0);
389
                println("count occ form :"+ rich);
390
                countOccForm.add( ""+rich ) ;        
391
        }
392
        HSQLFunctions.getGroovySql().eachRow(query2) {
393
                def rich = it.getAt(0);
394
                println("coutn occ cat :"+ rich);
395
                countOccCat.add( ""+rich ) ;        
396
        }
397
        HSQLFunctions.getGroovySql().eachRow(query3) {
398
                def rich = it.getAt(0);
399
                println("count lex form :"+ rich);
400
                countLexForm.add( ""+rich ) ;        
401
        }
402
        HSQLFunctions.getGroovySql().eachRow(query4) {
403
                def rich = it.getAt(0);
404
                println("count lex cat :"+ rich);
405
                countLexCat.add( ""+rich ) ;        
406
        }
407
        //println("col1 et 2 : "+nbOccurencesTxt.get("lexbrut_"+text)+" "+nbFormLexique.get("lex_"+text))
408
        matrix.get(text).add( "0") ;
409
        matrix.get(text).add( "0") ;
410
        matrix.get(text).add( "0") ;
411
}
412

    
413
for(String text : texts)
414
{
415
        int textindex = 0;
416
        for(String target : texts)
417
        {
418
                //get occurences ordonnées de la gold
419
                        //get occurences ordonnées de la projection
420
                        //compar
421
                String proj = "model_"+text+"_target_"+target+"_mode"+3+"t"
422
                println("comp "+proj+" VS lexbrut_"+target);
423
                String query = "SELECT count(*) FROM ((SELECT n,form,cat FROM lexbrut_"+target+" ) MINUS (SELECT n,form,cat FROM "+proj+"))"
424
                //HSQLFunctions.executeQuery(query);
425
                //println(query)
426
                int ttotal=0;
427
                int total ;
428
                HSQLFunctions.getGroovySql().eachRow(query) {
429
                        def dif = it.getAt(0);
430
                        /*if((""+initiales[id]) != "Z")
431
                         {
432
                         total = nbmots[id+1] - nbmots[id];
433
                         ttotal += total;
434
                         }
435
                         else
436
                         total= ttotal;
437
                         */
438
                        
439
                        //total = nbOccurencesTxt.get("lexbrut_"+initiales[id])
440
                        println("textindex : "+textindex);
441
                        total = Integer.parseInt(countOccForm[textindex]);
442
                        println("dif "+dif+"/ tot "+total+" = "+((float)dif/(float)total));
443
                        Float perf = ((float)dif/(float)total)*100f;                        
444
                        matrix.get(target).add( ""+perf ) ;
445
                }
446
                textindex++;
447
        }
448
        
449
}
450

    
451
println("Matrice d'erreur : ");
452
for(String k : matrix.keySet())
453
{
454
        print(k)
455
        for(String f : matrix.get(k))
456
                print("\t"+f)
457
        println()
458
}
459
println("richesse lexiques en Form : ");
460
for(String k : richesses.keySet())
461
{
462
        print(k)
463
        for(String f : richesses.get(k))
464
                print("\t"+f)
465
        println()
466
}
467
println("richesse lexiques en Cat : ");
468
for(String k : richessesCat.keySet())
469
{
470
        print(k)
471
        for(String f : richessesCat.get(k))
472
                print("\t"+f)
473
        println()
474
}
475

    
476
println("richesse occurance en Form : ");
477
for(String k : richessesocc.keySet())
478
{
479
        print(k)
480
        for(String f : richessesocc.get(k))
481
                print("\t"+f)
482
        println()
483
}
484
println("richesse occurance en Cat : ");
485
for(String k : richessesoccCat.keySet())
486
{
487
        print(k)
488
        for(String f : richessesoccCat.get(k))
489
                print("\t"+f)
490
        println()
491
}
492

    
493
println("RichBrutes        roland        artu        qjm        comm        jehpar        rgaqcj");
494
print("Focc")
495
for(int i=0;i < countOccForm.size() ; i++)
496
        print("\t"+countOccForm[i]); 
497
print("\nCocc")
498
for(int i=0;i < countOccCat.size() ; i++)
499
        print("\t"+countOccCat[i]); 
500
print("\nFvoc")
501
for(int i=0;i < countLexForm.size() ; i++)
502
        print("\t"+countLexForm[i]); 
503
print("\nCvoc")
504
for(int i=0;i < countLexCat.size() ; i++)
505
        print("\t"+countLexCat[i]); 
506
println()
507