File: apertium-oci-fra.oci-fra.t3x

package info (click to toggle)
apertium-oci-fra 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 53,616 kB
  • sloc: xml: 675; makefile: 542
file content (109 lines) | stat: -rw-r--r-- 2,560 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0" encoding="UTF-8"?>
<postchunk>
  <section-def-cats>
    <def-cat n="SUBJ">
      <cat-item name="subj"/>
    </def-cat>

    <def-cat n="sent">
      <cat-item name="punt"/>
    </def-cat>
  </section-def-cats>

  <section-def-attrs>
    <def-attr n="chunk">
      <attr-item tags="SN"/>
      <attr-item tags="SV"/>
    </def-attr>

    <def-attr n="pers">
      <attr-item tags="p1"/>
      <attr-item tags="p2"/>
      <attr-item tags="p3"/>
    </def-attr>

    <def-attr n="gen">
      <attr-item tags="m"/>
      <attr-item tags="f"/>
      <attr-item tags="mf"/>
      <attr-item tags="nt"/>
      <attr-item tags="GD"/>
    </def-attr>

    <def-attr n="nbr">
      <attr-item tags="sg"/>
      <attr-item tags="pl"/>
      <attr-item tags="sp"/>
      <attr-item tags="ND"/>
    </def-attr>

  </section-def-attrs>


  <section-def-vars>
    <def-var n="paraula"/>
  </section-def-vars>

  <section-def-macros>
    <def-macro n="subjecte" npar="1">
      <choose>
        <when>
          <test>
            <and>
              <equal><clip pos="1" part="pers"/><lit-tag v="p3"/></equal>
              <equal><clip pos="1" part="gen"/><lit-tag v="GD"/></equal>
            </and>
          </test>
          <let><clip pos="1" part="gen"/><lit-tag v="m"/></let>
        </when>
        <when>
          <test>
            <equal><clip pos="1" part="gen"/><lit-tag v="GD"/></equal>
          </test>
          <let><clip pos="1" part="gen"/><lit-tag v="mf"/></let>
        </when>
      </choose>
    </def-macro>
  </section-def-macros>

  <section-rules>
    <rule comment="CHUNK: SUBJ">
      <pattern>
        <pattern-item n="SUBJ"/>
      </pattern>
      <action>
        <call-macro n="subjecte">
          <with-param pos="1"/>
        </call-macro>
        <out>
          <lu>
            <clip pos="1" part="whole"/>
          </lu>
        </out>
      </action>
    </rule>

    <rule comment="CHUNK:">
      <pattern>
        <pattern-item n="sent"/>
      </pattern>
      <action>
        <out>
          <lu>
            <clip pos="1" part="whole"/>
          </lu>
        </out>
      </action>
    </rule>
  </section-rules>
</postchunk>

<!--
Resources:
    https://wiki.apertium.org/wiki/Chunking:_A_full_example
    https://wiki.apertium.org/wiki/Chunking
    https://wiki.apertium.org/wiki/Apertium_New_Language_Pair_HOWTO#Transfer_rules
    https://wiki.apertium.org/wiki/A_long_introduction_to_transfer_rules
    https://wiki.apertium.org/wiki/Transfer#Adding_structural_transfer_.28grammar.29_rules
-->