Apertium has moved from SourceForge to GitHub.
If you have any questions, please come and talk to us on #apertium on irc.freenode.net or contact the GitHub migration team.

User:Firespeaker/Transfer rule example

From Apertium
< User:Firespeaker(Difference between revisions)
Jump to: navigation, search
m (Determiner Noun)
(Determiner Noun)
Line 11: Line 11:
 
<table class="wikitable" style="tab-size: 3;">
 
<table class="wikitable" style="tab-size: 3;">
 
<tr><th>rule</th><th></th><th></th></tr>
 
<tr><th>rule</th><th></th><th></th></tr>
<tr rowspan="4"><td>
+
<tr rowspan="2.5"><td><pre>
<pre>
+
<rule comment="REGLA: det noun">
<rule comment="REGLA: det noun">
+
<pattern>
<pattern>
+
<pattern-item n="definites"/>
<pattern-item n="definites"/>
+
<pattern-item n="noun"/>
<pattern-item n="noun"/>
+
</pattern>
</pattern>
+
<action>
<action>
+
<out>
<out>
+
<chunk name="n" case="caseFirstWord">
<chunk name="n" case="caseFirstWord">
+
<tags>
<tags>
+
<tag><lit-tag v="SN"/></tag>
<tag><lit-tag v="SN"/></tag>
+
<tag><lit-tag v="def"/></tag>
<tag><lit-tag v="def"/></tag>
+
<tag><clip pos="2" side="tl" part="a_num"/></tag>
<tag><clip pos="2" side="tl" part="a_num"/></tag>
+
<tag><lit-tag v="CD"/></tag>
<tag><lit-tag v="CD"/></tag>
+
</tags>
</tags>
+
<lu>
<lu>
+
<clip pos="2" side="tl" part="lem"/>
<clip pos="2" side="tl" part="lem"/>
+
<clip pos="2" side="tl" part="pos"/>
<clip pos="2" side="tl" part="pos"/>
+
<clip pos="2" side="tl" part="a_num"/>
<clip pos="2" side="tl" part="a_num"/>
+
<lit-tag v="4"/><!-- case -->
<lit-tag v="4"/><!-- case -->
+
</lu>
</lu>
+
</chunk>
</chunk>
+
</out>
</out>
+
</action>
</action>
+
</rule></pre></td></tr>
</rule>
 
</pre></td></tr>
 
 
<tr><td>relevant categories:</td><td></td></tr>
 
<tr><td>relevant categories:</td><td></td></tr>
 
<tr><td>relevant attributes:</td><td><pre>
 
<tr><td>relevant attributes:</td><td><pre>
<def-attr n="a_num">
+
<def-attr n="a_num">
<attr-item tags="sg"/>
+
<attr-item tags="sg"/>
<attr-item tags="pl"/>
+
<attr-item tags="pl"/>
<attr-item tags="ND"/>
+
<attr-item tags="ND"/>
</def-attr>
+
</def-attr></pre></td></tr>
</pre></td></tr>
 
 
<tr><td>pattern matches:</td><td>I did not see <b>the houses</b>.</td></tr>
 
<tr><td>pattern matches:</td><td>I did not see <b>the houses</b>.</td></tr>
   

Revision as of 20:59, 11 April 2019

Contents

Input text

  • "I did not see the houses."

Output of tagger

Chunker

Determiner Noun

rule
<rule comment="REGLA: det noun">
	<pattern>
		<pattern-item n="definites"/>
		<pattern-item n="noun"/>
	</pattern>
	<action>
		<out>
			<chunk name="n" case="caseFirstWord">
				<tags>
					<tag><lit-tag v="SN"/></tag>
					<tag><lit-tag v="def"/></tag>
					<tag><clip pos="2" side="tl" part="a_num"/></tag>
					<tag><lit-tag v="CD"/></tag>
				</tags>
				<lu>
					<clip pos="2" side="tl" part="lem"/>
					<clip pos="2" side="tl" part="pos"/>
					<clip pos="2" side="tl" part="a_num"/>
					<lit-tag v="4"/><!-- case -->
				</lu>
			</chunk>
		</out>
	</action>
</rule>
relevant categories:
relevant attributes:
<def-attr n="a_num">
	<attr-item tags="sg"/>
	<attr-item tags="pl"/>
	<attr-item tags="ND"/>
</def-attr>
pattern matches:I did not see the houses.
Personal tools