////
///  genfisuffix - a Finnish affix table generator for ispell
//   Copyright (C) 2000  Pauli Virtanen <pauli.virtanen@saunalahti.fi>
//
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program; if not, write to the Free Software
//   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
//   The program's output is also subject to this license, and considered
//   program source code.
//
//////////////////////////////////////////////////////////////////////////////

 What
 ----

This program generates Finnish affix patterns for ispell.


 Why
 ---

Why autogeneration? That is because in Finnish there are 5 possessive
suffixes (and 1 additional), and 5 suffix particles. These can be combined
up to and over 25 different ways (since also suffix particles can be
combined together). Typing all of these by hand would of course be very
hard, so I chose to make the computer do it for me. (That's what they are
for, isn't it?)


 Usage
 -----

Options available are:

        -s, --suffix-particles
This option turns on the generation of suffix particles, except
in the adjective comparison patterns. Turning on suffix particles
is suggested, as they are commonly used in Finnish.

        -p, --possessive-suffixes
This option turns on the generation of possessive suffixes.
This is usually wanted, because possessive suffixes are used
fairly often in Finnish.

        -a, --all-suffix-particles
This option turns on the generation of possessive suffixed word
forms with suffix particles attached to them.

 
 About the source
 ----------------

This program needs a working STL template library to compile.
(Though it uses only string and vector classes.)

I have tried to make it easy to write new affixes. Thus the code is absolutely
*not* optimized. If you try to compile this with optimizations turned on,
be prepared to wait for a long time. (Optimizations are disabled by default).
However, the program runs still fast enough.

(When inlining is turned on the compiler (I guess) tries to expand the Suffix
 class tables to inline code, and that takes quite a bit of time.)

All files of interest are in the src/finnish subdirectory.


 Contributing
 ------------

Help and helpful comments are, of course, appreciated. If you find an error
in this program, please let me know.

Especially the noun inflection patterns would (currently) need more work.


 Bibliography
 ------------

Finnish grammar. Fred Karlsson (1983), Werner Sderstrm Oy, Juva.



 Status of the generated affix patterns
 --------------------------------------

 * Suffix particles:
   These have also a flag of their own:
	- Input: One word
		 L and M for any word to which attach suffix particles.

	- Output: -kin, -ko, -kaan, -han, -pa, -kinko, -kinhan, -kohan, -kaanko

	- Flaws: All of these may not suit all words (i.e. verbs and pronouns).

 * Possessive suffixes:
   All flags output all possessive suffixes, where they are appropiate.
   (See also flags P and Q).


 * Nouns:
        - Input: Four flags, three for each noun
                 S and T for back and front vowel inessive, both singular and
                         plural (-ssa)
                 P and Q for back and front vowel (singular) 1st possessive 
                         suffixed basic form. (-ni)

        - Output: Many noun forms:
                  S and T output local cases, plural basic form, singular
                          genitive and plural instructive
                  P and Q output possessive suffixed forms, essive, and
                          illative for words ending in a short vowel.

        - Flaws: Basic form, partitive forms, plural genitive, plural illative
                 and comitative aren't produced.
                 
                 Singular illative isn't always produced.

        - Status: Not very complete.
                  Can do about 60%-80% of possible word forms.

 * Adjective comparison:
        - Input: Four flags, two for each adjective
                H and I for back and front vowel adjective -mpi comparative
                        form.
		I and J for back and front vowel adjective -in superlative
                        form.
        
        - Output: All comparison forms. (comparative and superlative)

        - Flaws: None known.

        - Status: Fairly complete.
                  Can do all possible adjective comparison forms.

 * Verbs:
        - Input: Six flags, three for each verb:
                 U and V take back and front vowel 1st infinitive
                         (-a,-)
                 W and X take back and front vowel active present participe
                         (-va,-v)
                 Y and Z take back and front vowel active present singular 1st
                         form (-n)
 
        - Output: Given all wanted input it outputs all Finnish verb forms.
                  (But see flaws below.)

        - Flaws: Can't determine the past forms of some verbs, whose
                 declination stem ends in '-Ca' or '-C', where C is
                 a consonant.

                 Also some verbs (such as kyd and olla) have expectional
                 forms which these flags cannot form. 


        - Status: Fairly complete.
                  Can do over 95% of finnish verb forms.

                  It won't, however, derive new words from verbs, because
                  that would generate much output, and could create
                  words not existing in Finnish.



  Pauli Virtanen <pauli.virtanen@saunalahti.fi>

