-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.txt
More file actions
48 lines (39 loc) · 905 Bytes
/
test.txt
File metadata and controls
48 lines (39 loc) · 905 Bytes
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
# Ceci est un fichier de règles pour la tokenisation du français.
# . l'état actuel
# @ les tokens qui ne sont pas dans les sets mentionnées
# ^ n'écrit pas (^. reste sur place et n'écrit pas, ^state n'écrit pas et change d'état)
# % écrit avant de changer d'état (concaténation)
# : état final
# * état initial
sep(' ' '\n' '\t');
apos("'" '’');
# La ponctuation forte
PoncForte:('.' '?' '!'){
sep = ^Sep;
PoncFaible = PoncFaible;
PoncForte = .;
@ = Fo;
};
# La ponctuation faible
PoncFaible:(',' ';' ':' '“' '”' '"' '«' '»' "bla \" tritri \' tu \\ \n \n"){
sep = ^Sep;
PoncFaible = PoncFaible;
PoncForte = PoncForte;
@ = Fo;
};
# Les caractères formant les mots
Fo:{
sep = ^Sep;
PoncFaible = PoncFaible;
PoncForte = PoncForte;
apos = %Fo;
@ = .;
};
PoncFaible('a');
# Les séparateurs
Sep:*{
sep = ^.;
wpunc = PoncFaible;
PoncForte = PoncForte;
@ = Fo;
};