<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.apertium.org/w/index.php?action=history&amp;feed=atom&amp;title=Matching_unknown_words</id>
	<title>Matching unknown words - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.apertium.org/w/index.php?action=history&amp;feed=atom&amp;title=Matching_unknown_words"/>
	<link rel="alternate" type="text/html" href="https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;action=history"/>
	<updated>2026-04-19T05:23:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=32880&amp;oldid=prev</id>
		<title>Bech: Category:Documentation in English</title>
		<link rel="alternate" type="text/html" href="https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=32880&amp;oldid=prev"/>
		<updated>2012-03-24T11:06:08Z</updated>

		<summary type="html">&lt;p&gt;Category:Documentation in English&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:06, 24 March 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;[[Category:Writing transfer rules]]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;[[Category:Writing transfer rules]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Category:Documentation in English]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bech</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=30342&amp;oldid=prev</id>
		<title>Unhammer: cat</title>
		<link rel="alternate" type="text/html" href="https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=30342&amp;oldid=prev"/>
		<updated>2011-12-21T13:56:30Z</updated>

		<summary type="html">&lt;p&gt;cat&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 13:56, 21 December 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;^any&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;{^foo&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;$}$ ^unk{^*bar$}$&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;^any&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;{^foo&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;$}$ ^unk{^*bar$}$&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;[[Category:Writing transfer rules]]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Unhammer</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=30341&amp;oldid=prev</id>
		<title>Jimregan: Created page with &#039;From time to time, the question comes up of how to match unknown words in transfer. In interchunk, this is quite easy, as each unknown word has the chunk lemma &#039;unknown&#039;, but it&#039;…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.apertium.org/w/index.php?title=Matching_unknown_words&amp;diff=30341&amp;oldid=prev"/>
		<updated>2011-12-21T13:32:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;From time to time, the question comes up of how to match unknown words in transfer. In interchunk, this is quite easy, as each unknown word has the chunk lemma &amp;#039;unknown&amp;#039;, but it&amp;#039;…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;From time to time, the question comes up of how to match unknown words in transfer. In interchunk, this is quite easy, as each unknown word has the chunk lemma &amp;#039;unknown&amp;#039;, but it&amp;#039;s un- or under-documented how this should be done using apertium-transfer.&lt;br /&gt;
&lt;br /&gt;
The answer is to use a &amp;lt;code&amp;gt;cat-item&amp;lt;/code&amp;gt; with an empty &amp;lt;code&amp;gt;tags&amp;lt;/code&amp;gt; attribute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     &amp;lt;cat-item tags=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;transfer default=&amp;quot;chunk&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;section-def-cats&amp;gt;&lt;br /&gt;
   &amp;lt;def-cat n=&amp;quot;any&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cat-item tags=&amp;quot;*&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/def-cat&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;def-cat n=&amp;quot;unk&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cat-item tags=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/def-cat&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/section-def-cats&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;section-def-attrs&amp;gt;&lt;br /&gt;
 &amp;lt;/section-def-attrs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;section-def-vars&amp;gt;&lt;br /&gt;
 &amp;lt;/section-def-vars&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;section-rules&amp;gt;&lt;br /&gt;
   &amp;lt;rule&amp;gt;&lt;br /&gt;
     &amp;lt;pattern&amp;gt;&lt;br /&gt;
       &amp;lt;pattern-item n=&amp;quot;any&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/pattern&amp;gt;&lt;br /&gt;
     &amp;lt;action&amp;gt;&lt;br /&gt;
       &amp;lt;out&amp;gt;&lt;br /&gt;
         &amp;lt;chunk name=&amp;quot;any&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;tags&amp;gt;&lt;br /&gt;
             &amp;lt;tag&amp;gt;&amp;lt;clip pos=&amp;quot;1&amp;quot; side=&amp;quot;tl&amp;quot; part=&amp;quot;tags&amp;quot;/&amp;gt;&amp;lt;/tag&amp;gt;&lt;br /&gt;
           &amp;lt;/tags&amp;gt;&lt;br /&gt;
           &amp;lt;lu&amp;gt;&amp;lt;clip pos=&amp;quot;1&amp;quot; side=&amp;quot;tl&amp;quot; part=&amp;quot;whole&amp;quot;/&amp;gt;&amp;lt;/lu&amp;gt;&lt;br /&gt;
         &amp;lt;/chunk&amp;gt;&lt;br /&gt;
       &amp;lt;/out&amp;gt;&lt;br /&gt;
     &amp;lt;/action&amp;gt;&lt;br /&gt;
   &amp;lt;/rule&amp;gt;&lt;br /&gt;
   &amp;lt;rule&amp;gt;&lt;br /&gt;
     &amp;lt;pattern&amp;gt;&lt;br /&gt;
       &amp;lt;pattern-item n=&amp;quot;unk&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/pattern&amp;gt;&lt;br /&gt;
     &amp;lt;action&amp;gt;&lt;br /&gt;
       &amp;lt;out&amp;gt;&lt;br /&gt;
         &amp;lt;chunk name=&amp;quot;unk&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;tags&amp;gt;&lt;br /&gt;
             &amp;lt;tag&amp;gt;&amp;lt;clip pos=&amp;quot;1&amp;quot; side=&amp;quot;tl&amp;quot; part=&amp;quot;tags&amp;quot;/&amp;gt;&amp;lt;/tag&amp;gt;&lt;br /&gt;
           &amp;lt;/tags&amp;gt;&lt;br /&gt;
           &amp;lt;lu&amp;gt;&amp;lt;clip pos=&amp;quot;1&amp;quot; side=&amp;quot;tl&amp;quot; part=&amp;quot;whole&amp;quot;/&amp;gt;&amp;lt;/lu&amp;gt;&lt;br /&gt;
         &amp;lt;/chunk&amp;gt;&lt;br /&gt;
       &amp;lt;/out&amp;gt;&lt;br /&gt;
     &amp;lt;/action&amp;gt;&lt;br /&gt;
   &amp;lt;/rule&amp;gt;&lt;br /&gt;
 &amp;lt;/section-rules&amp;gt;&lt;br /&gt;
&amp;lt;/transfer&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;tags&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; be present (otherwise, the opening brace of the chunk is omitted).&lt;br /&gt;
&lt;br /&gt;
Use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;#039;^foo&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;$ ^*bar$&amp;#039;|apertium-transfer -n unk.t1x unk.bin &lt;br /&gt;
^any&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;{^foo&amp;lt;n&amp;gt;&amp;lt;sg&amp;gt;$}$ ^unk{^*bar$}$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jimregan</name></author>
		
	</entry>
</feed>