-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapertium-tsz.tsz.rlx
39 lines (30 loc) · 1.35 KB
/
apertium-tsz.tsz.rlx
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
# Firstly, we need to define what tags should be considered sentence delimiters. For this example, only full stop is set as delimiter.
DELIMITERS = "<.>" ;
# We can define sets for common tag clusters
LIST Case = (n sg) (n pl) ; # A set that matches either a Noun Singular or a Noun Plural
LIST ALL = (n) (v) (vbser) (vaux) (adj) (adv) (prn) (num) (det) (cnjsub) ;
LIST MTI = "míti" ;
LIST WKA = "wéka" ;
LIST SGI = "segíri" ;
LIST UKI = "uéjki" ;
# LIST V = v;
LIST N = n;
# LIST O = obj;
# LIST INF = nf;
SECTION
# if there is an word ending in -ni following 'want', it is an infinitive verb, not object
REMOVE (n) IF (-1 MTI) ;
# if there is an word ending in -ni following 'love', it is an infinitive verb, not object
REMOVE (n) IF (-1 WKA) ;
# if there is an word ending in -ni following 'keep on', it is an infinitive verb, not object
REMOVE (n) IF (-1 SGI) ;
# if there is an word ending in -ni following 'want', it is an infinitive verb, not object
REMOVE (n) IF (-1 UKI) ;
# if there is an word ending in -ni following 'want', it is an infinitive verb, not object
REMOVE (n) IF (-1 N) ;
# Resources:
# http://visl.sdu.dk/cg3.html
# http://groups.google.com/group/constraint-grammar
# http://kevindonnelly.org.uk/2010/05/constraint-grammar-tutorial/
# http://wiki.apertium.org/wiki/Constraint_Grammar
# http://wiki.apertium.org/wiki/Apertium_and_Constraint_Grammar