Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 0f59c43d821902385f0623255621244d > files > 121

aspell-manual-0.60.6.1-8.mga5.x86_64.rpm

<html lang="en">
<head>
<title>Working With Affix Info in Word Lists - GNU Aspell 0.60.6.1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="Aspell 0.60.6.1 spell checker user's manual.">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Working-With-Dictionaries.html#Working-With-Dictionaries" title="Working With Dictionaries">
<link rel="prev" href="Creating-an-Individual-Word-List.html#Creating-an-Individual-Word-List" title="Creating an Individual Word List">
<link rel="next" href="Format-of-the-Personal-and-Replacement-Dictionaries.html#Format-of-the-Personal-and-Replacement-Dictionaries" title="Format of the Personal and Replacement Dictionaries">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is the user's manual for Aspell

GNU Aspell is a spell checker designed to eventually replace Ispell.
It can either be used as a library or as an independent spell checker.

Copyright (C) 2000--2011 Kevin Atkinson.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.1 or any later version published by the Free Software
     Foundation; with no Invariant Sections, no Front-Cover Texts and
     no Back-Cover Texts.  A copy of the license is included in the
     section entitled "GNU Free Documentation License".
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Working-With-Affix-Info-in-Word-Lists"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Format-of-the-Personal-and-Replacement-Dictionaries.html#Format-of-the-Personal-and-Replacement-Dictionaries">Format of the Personal and Replacement Dictionaries</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Creating-an-Individual-Word-List.html#Creating-an-Individual-Word-List">Creating an Individual Word List</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Working-With-Dictionaries.html#Working-With-Dictionaries">Working With Dictionaries</a>
<hr>
</div>

<h3 class="section">5.6 Working With Affix Info in Word Lists</h3>

<h4 class="subsection">5.6.1 The Munch Command</h4>

<p>The <samp><span class="command">munch</span></samp> command takes a list of words from standard input
and outputs a list of possible root words and affixes.  The root may,
however, be invalid as it does not check them against the existing
dictionary.  For example the command:
<pre class="example">     echo brother | aspell -l en munch
<br>produces<br>
     brother broth/R brothe/R
</pre>
   <h4 class="subsection">5.6.2 The Expand Command</h4>

<p>The <samp><span class="command">expand</span></samp> command is the reverse of <samp><span class="command">munch</span></samp>, it
expands affix flags to produce a list of words.  For example:
<pre class="example">     echo both/R | aspell -l en expand
<br>produces<br>
     both bother
</pre>
   <p>The formal usage is:
<pre class="example">     aspell expand [<var>level</var>] [<var>limit</var>]
</pre>
   <p class="noindent">Where <var>level</var> is the expansion level.  Valid values are between 1
and 3.  Level 1 is the default if not otherwise specified.  Level 2
causes the original root/affix to be included, for example:
<pre class="example">     both/R both bother
</pre>
   <p class="noindent">Level 3 causes multiple lines to be printed, one for each generated
word, with the original root/affix combination followed by the word it
creates:
<pre class="example">     both/R both
     both/R bother
</pre>
   <p class="noindent">Levels larger than 3 may also be supported, but should not be used as
they may eventually be removed.

   <p>If a <var>limit</var> parameter is given then only expansions which affect
the first <var>limit</var> letters will be expanded.  If a base word is not
completely expanded for a given affix flag that flag will be left on
the word.  Note that prefixes are always expanded.

<h4 class="subsection">5.6.3 The Munch-list Command</h4>

<p>The <samp><span class="command">munch-list</span></samp> command will reduce the size of word list via
affix compression.  It will reduce a list of words to a minimal (or
close to it) set of roots and affixes that will match the same list of
words.  The list of words is read from standard input and the result,
the &ldquo;munched&rdquo; list, is written to standard out.  It's usage is:

<pre class="example">     aspell munch-list [keep] [single|multi] [simple] &lt; <var>infile</var> &gt; <var>outfile</var>
</pre>
   <p class="noindent">where <samp><span class="option">simple</span></samp>, <samp><span class="option">single</span></samp>, <samp><span class="option">multi</span></samp>, and
<samp><span class="option">keep</span></samp> are literal values.

   <p>The default algorithm used should give near optimum results.  In some
cases the set of words returned is, provably, the minimum number
possible.  In the typical case the number of words returned is within
1% of the optimum number.

   <p>By default Aspell will remove redundant affix flags.  The <samp><span class="option">keep</span></samp>
flag will avoid removing them, which can be useful if you want to
include all possible expansions for each base word.

   <p>When cross products are involved it may be beneficial to list a base
word more than once.  Unfortunately, the current version of Aspell can
not correctly handle multiple base words in a dictionary.  Therefore,
the current default behavior is to only include the one with the most
expansions.  All of them can be included via the <samp><span class="option">multi</span></samp> flag. 
Once Aspell is able to handle multiple base words the default will be
to include them all.  The <samp><span class="option">single</span></samp> flag can be used to only
include one of them.

   <p>The <samp><span class="option">simple</span></samp> flag will select an alternate faster algorithm. 
This algorithm is very similar to the <samp><span class="command">munch</span></samp> command
distributed with MySpell (the Open Office spell checker), however, it
doesn't give nearly as good results.  It does okay for the English
word list but not for some other languages such as German; the normal
algorithm reduced a list of 312,002 German words to 79,420 base words
while the simple algorithm only reduced it to 115,927 words.  This
algorithm may disappear in a future version of Aspell.

   </body></html>