Statistics
| Revision:

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

History | View | Annotate | Download (17.6 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.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.scripts.importer.*;
44
import org.txm.scripts.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
 BuildXmlRGAQCJ.process( anafiles,  rootDir)
81
 */
82
//build CWBDecode wrapper
83
ProcessBuilderBuilder.build(new File("src/groovy/org/txm/scripts/cwb-decode-wrapper-definition.xml"), new File("src/groovy/org/textometrie/scripts/CwbDecode.groovy"));
84
GroovyClassLoader gcl = new GroovyClassLoader();
85
gcl.addClasspath(".");
86

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

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

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

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

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

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

    
232
//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"];
233
println ttrezfiles;
234
//Build process infos
235
//remove lines which starts with %%
236
for(String text : ttrezfiles)
237
{
238
        //def encoding ="UTF-8"
239
        println "patch proj file"+text+" : remove %% lines and blank lines AND replace n\t by only one \t";
240
        File f = new File(projsDir,text);
241
        File temp = new File("tempFileCVScleaner")
242
        Reader reader = new InputStreamReader(new FileInputStream(f),encoding);
243
        Writer writer = new FileWriter(temp);
244
        reader.eachLine 
245
                        {
246
                                if(it.trim().startsWith("%%") || it.length() == 0)
247
                                        writer.write("")
248
                                else
249
                                        writer.write(it.replaceAll("(\t)+","\t")+"\n")
250
                        }
251
        reader.close();
252
        writer.close();
253
        if (!(f.delete() && temp.renameTo(f))) println "Warning can't rename file "+temp+" to "+f
254
}
255

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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