Blame view

tools/lia_ltbox/lia_tagg/README.txt 10.9 KB
e6be5137b   Jean-François Rey   reinitialized pro...
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
  
       --------------------------------------------------------
       LIA_TAGG: a statistical POS tagger + syntactic bracketer
       --------------------------------------------------------
   
       Copyright (C) 2001 FREDERIC BECHET
   
       ..................................................................
   
       This file is part of LIA_TAGG
   
       LIA_TAGG is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License, or
       (at your option) any later version.
   
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.
   
       You should have received a copy of the GNU General Public License
       along with this program; if not, write to the Free Software
       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
       ..................................................................
   
       Contact :
                 FREDERIC BECHET - LIA - UNIVERSITE D'AVIGNON
                 AGROPARC BP1228 84911  AVIGNON  CEDEX 09  FRANCE
                 frederic.bechet@lia.univ-avignon.fr
       ..................................................................
   
   --------
   VERS 1.1
   --------
  
   ------
   README
   ------
  
    I   : Content of the package LIA_TAGG
    II  : Installation
    III : Useful scripts
    IV  : An example
    V   : Data format
    VI  : Warning
   
  
  I - Content of the package LIA_TAGG
  -----------------------------------
  
  Once you have uncompress and untar the file 'lia_tagg.tar.gz',
  a directory 'lia_tagg' is created, containing the following
  files and directories:
  
    - Makefile : compiling sources and data files of LIA_TAGG
    - README   : this present file
    - /bin     : directory which will contain the executable files
    - /data    : directory containing the ressources for French and English tagging
    - /doc     : documentation about LIA_TAGG as follows
    - /object  : object files generated
    - /script  : script command for using LIA_TAGG
    - /src     : source files contained in the following directories
  	- format		   : tokenization
  	- libgram		   : n-gram LM
  	- tagg			   : POS tagging + text accentuation
  	- bracket		   : syntactic bracketing
  
  
  
  
  II - Installation
  -----------------
  
  LIA_TAGG is composed of a set of modules all written in
  standard C, using only standard libraries. It has been
  successfully compiled on the following UNIX environments:
  - HP-UX
  - SUN-SOLARIS
  - IRIX
  - LINUX
  
  1) To install the package, you must first set the environment
     variable: 'LIA_TAGG' with the path of the root directory 'lia_tagg'.
  
     For example, in c-shell:
  
     setenv LIA_TAGG /usr/tools/lia_tagg
     
     Then you have to set the language (French or English). To do so, set the
     environment variable 'LIA_TAGG_LANG' to either 'french' or 'english'.
     
  2) Then edit the file 'Makefile' in order to change, if
     necessary the C-compiler and the compilation options
     which will be used to compile the package.
  
  3) Compile the package with the command: 'make all'
  
  4) Compile the resources. If you want only the French (resp. English) ressources,
     just type 'make ressource.french' (resp. 'make ressource.english').
     If you want both, type: 'make ressource.all'
  
  That's all !!
  
  If you want to suppress the compiled files, just execute:
  
  make clean
  make clean_ressource
  
  
  
  
  III - Useful scripts
  --------------------
  
  LIA_TAGG contains a set of scripts in order to clean, format, tagg and bracket
  French or English texts. Here are a quick overview of each command:
  
  
  lia_clean               : "clean" a raw text, tokenize the words, split the text into
                            sentences, remove the capital letter at the beginning of each
  			  sentence if necessary and output one word on each line.
  
  lia_tagg  [-guess]      : tagg each word with its POS, one word on each line, 1st field=word,
                            2nd field=POS. For the French tagger, a guesser is provided
                            (a program that guesses a POS for all non proper-name unknown words).
                            To activate this option add '-guess' to the command 'lia_tagg'.
                            WARNING: this option is valid ONLY for the French language.
  
  lia_tagg+lemm [-guess]  : same as 'lia_tagg' but add a field with the lemm (for French only at the moment)
  
  lia_tagg+reacc [-guess] : same as 'lia_tagg' but tries to put back the accent for non-accentutate
                            texts. WARNING: this option is valid ONLY for the French language.
  lia_bracket [1/2/3]     : bracketter that cut a sentence according to a shallow parsing process
                            that matches POS patterns into syntactic phrases. Three different output
                            are proposed (option 1 (default), 2 or 3)
  
  lia_tagg2name           : take as input a text processed by 'lia_tagg' or 'lia_tagg+reacc' and
                            output the potential proper-name expressions based on simple rules using
                            POS information as well as graphical ones.
                            Example: lia_clean | lia_tagg | lia_tagg2name
  
  IV - An example
  ---------------
  
  Each step in the text processing will be now illustrated on this
  small raw text example in French:
  --
  Ceci est un test. De plus en plus, le 1 janvier tombe un lundi. Il couttent
  vrraiment 1,08 euros. Il eleve un debat deja eleve sur le TALN.
  --
  
  
  1) Formatting the text
  This is done with the script: $LIA_TAGG/script/lia_nett
  - input = stdin
  - output= stdout
  
  This script tokenize the text according to the lexicon used by the
  POS tagger. Then, the text is split into sentences, marked by the
  tags <s> (beginning of a sentence) and </s> (end of a sentence).
  The eventual capital letter of each first word of a sentence is then
  removed.
  Finally, digit strings are converted into words with respect to the symbol ','
  (French ONLY) and the output text contains one word on each line.
  
  This is the result of this script on the previous text:
  
  <s>
  eci
  est
  un
  test
  .
  </s>
  <s>
  de_plus_en_plus
  ,
  le
  premier
  janvier
  tombe
  un
  lundi
  .
  </s>
  <s>
  il
  couttent
  vrraiment
  un
  virgule
  zéro
  huit
  euros
  .
  </s>
  <s>
  il
  eleve
  un
  debat
  deja
  eleve
  sur
  le
  TALN
  .
  </s>
  
  
  2) POS tagging + accentuation
  This is done by the script: $LIA_TAGG/script/lia_tagg+reacc -guess
     - input  : stdin
     - output : stdout
  This script takes the output of 'lia_nett' and process a POS tagging and
  a text accentuation. The out-of-vocabulary words are processed by a POS guesser
  (for example, the words 'couttent' and 'vrraiment' in the previous example),
  except for unknown proper-names (capitalize words within a sentence) which
  remain with the tag 'MOTINC'.
  
  This is the result of this script on the output of 'lia_nett':
  
  <s> ZTRM
  eci ADV
  est VE3S
  un DETMS
  test NMS
  . YPFOR
  </s> ZTRM
  <s> ZTRM
  de_plus_en_plus ADV
  , YPFAI
  le DETMS
  premier AMS
  janvier NMS
  tombe V3S
  un DETMS
  lundi NMS
  . YPFOR
  </s> ZTRM
  <s> ZTRM
  il PPER3MS
  couttent V3S
  vrraiment ADV
  un DETMS
  virgule CHIF
  zéro CHIF
  huit CHIF
  euros NMP
  . YPFOR
  </s> ZTRM
  <s> ZTRM
  il PPER3MS
  élève V3S
  un DETMS
  débat NMS
  déjà ADV
  élevé AMS
  sur PREP
  le DETMS
  TALN MOTINC
  . YPFOR
  </s> ZTRM
  
  
  3) Bracketting
  This is done by the script: $LIA_TAGG/script/lia_bracket
     - input  : stdin
     - output : stdout
  This script takes the output of 'lia_tagg' and perform a bracketting process according
  to syntactic phrase patterns. This is the result of this script on the output of 'lia_tagg+reacc':
  
  [<s>]                                       ZTRM        [ZTRM]
  [eci]                                     MOTINC        [MOTINC]
  [est]                                         VS        [VE3S]
  [un test]                                    NMS        [DETMS NMS]
  [.]                                        YPFOR        [YPFOR]
  [</s>]                                      ZTRM        [ZTRM]
  [<s>]                                       ZTRM        [ZTRM]
  [,]                                        YPFAI        [YPFAI]
  [le premier janvier]                         NMS        [DETMS AMS NMS]
  [tombe]                                       VS        [V3S]
  [un lundi]                                   NMS        [DETMS NMS]
  [.]                                        YPFOR        [YPFOR]
  [</s>]                                      ZTRM        [ZTRM]
  [<s>]                                       ZTRM        [ZTRM]
  [il]                                     PPER3MS        [PPER3MS]
  [couttent]                                MOTINC        [MOTINC]
  [vrraiment]                               MOTINC        [MOTINC]
  [un]                                       DETMS        [DETMS]
  [virgule zéro huit]                         CHIF        [CHIF CHIF CHIF]
  [euros]                                   MOTINC        [MOTINC]
  [.]                                        YPFOR        [YPFOR]
  [</s>]                                      ZTRM        [ZTRM]
  [<s>]                                       ZTRM        [ZTRM]
  [il]                                     PPER3MS        [PPER3MS]
  [élève]                                       VS        [V3S]
  [un débat déjà élevé]                        NMS        [DETMS NMS ADV AMS]
  [sur]                                       PREP        [PREP]
  [le]                                       DETMS        [DETMS]
  [TALN]                                    MOTINC        [MOTINC]
  [.]                                        YPFOR        [YPFOR]
  [</s>]                                      ZTRM        [ZTRM]
  
  
  
  V - Data format
  ---------------
  
  LIA_TAGG uses several kind of resources:
  
  1- Lexicons
  2 Part-Of-Speech resources
  
  You can update any of these resources and the following
  quick description of each of them should answer most of the
  questions. BUT, don't forget to compile again the resources
  each time you modify one of the data files.
  
  
  1- Lexicons
  
  There is 1 lexicons used by LIA_TAGG (except the POS resources):
  - list_chif_virgule
    List of words possibly following a digit string
    Format of each line: word
  
  
  2- Part-Of-Speech resources
  
  The main editable resource of the POS tagging is the dictionary. The one
  given with LIA_TAGG contains 10K words, and is stored in the text file: lex10K
  The format of the dictionary is as follows:
  
  - one word on each line
  - format of each line:
  word POS1 freq(word,POS1) lemma(word,{POS1) POS2 freq(word,POS2) lemma(word,POS2) ....
  
  For example:
  assise AFS 213 assis NFS 733 assise VPPFS 320 asseoir
  
  To add a new word, just add a new line at this file, and if you
  don't have a corpus for estimating the frequency of each
  couple (word,POS), just put '1' instead.
  
  VI - Warning
  
  Be careful of the accent encoding of the files !!
  Check that the accents of the rule file 'french01.pron' are
  correct (ASCII  ISO8859-1). If not, you have to use an
  accent transcoder to correct them. This transcoding MUST
  be applied to ALL the files in the directories /data
  and /src
  
  Contact
  -------
  
  If you have any problem or question, contact me at :
  
  frederic.bechet@lia.univ-avignon.fr