File: Reparse.rtx

package info (click to toggle)
apertium-recursive 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,132 kB
  • sloc: cpp: 8,682; python: 178; makefile: 30; sh: 9
file content (42 lines) | stat: -rw-r--r-- 729 bytes parent folder | download
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
!!!!!!!!!!!!!!!
!!  ATTRIBUTE CATEGORIES
!!!!!!!!!!!!!!!

function = "@→N" "@→P" "@ADVL" ;
number = sg du pl ;
case = acc nom gen loc ine ela com ess ill ;

!!!!!!!!!!!!!!!
!! OUTPUT PATTERNS
!!!!!!!!!!!!!!!

NP: _.number.case.function ;
PP: _ ;

Name: _.number.case.function ;
N: _.number.case.function ;
n: <n>.number.case;

post: _ ;

np: <np>.number.case ;


!!!!!!!!!!!!!!!
!! REDUCTION RULES
!!!!!!!!!!!!!!!

N ->    "N:n"  %n { %1 } ;

Name ->   "N:np"     %np { %1 }
	| "NP:N Name" N %Name {1 _ %2 } !gonagas Harald
	| "NP:N Name" np %Name {1 _ %2 } !
	| "NP:N Name" Name %N {1 _ %2 } ! ! Verdens Gang aviisii
	;

NP -> "NP: N" %N { %1 } ;


PP -> "PP N post" N %post { 1 _ %2 }
    | "lone post"   %post { 1 }
    ;