Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ffpriv_exterior_local_cases.c

Go to the documentation of this file.
00001 /*
00002  * finflect - Algorithms and tools for inflecting Finnish nouns
00003  * Copyright (C) 2004, 2005  The FinFlect Team
00004  * 
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  * 
00019  * 
00020  * For the complete legal text of the GNU Lesser General Public License,
00021  * see the file LICENSE. For a complete list of authors and copyright
00022  * holders, see the file AUTHORS.
00023  */
00024 
00025 /**
00026  * @file ffpriv_exterior_local_cases.c Implements functions for inflecting words
00027  * in exterior local cases. They're declared in ffpriv_exterior_local_cases.h.
00028  */
00029  
00030 #include "ffpriv_exterior_local_cases.h"
00031 #include "ffpriv_genitive_stem.h"
00032 #include "ffpriv_plural_stem.h"
00033 #include "ffutil.h"
00034 
00035 ffint32 ffpriv_adessive_singular(ffword* word)
00036 {
00037   ffint32 err;
00038   
00039   if ( (err = ffpriv_genitive_stem(word)) ) {
00040     return err;
00041   } else {
00042     return ffstring_append(&word->data, ffpriv_vowel_harmony(&word->data, "lla", "llä"));
00043   }
00044 }
00045 
00046 ffint32 ffpriv_adessive_plural(ffword* word)
00047 {
00048   word->metadata.cg = 0;
00049   ffpriv_plural_stem(word);
00050   ffstring_append(&word->data, ffpriv_vowel_harmony(&word->data, "lla", "llä"));
00051   return 0;
00052 }
00053 
00054 
00055 ffint32 ffpriv_ablative_singular(ffword* word)
00056 {
00057   ffint32 err;
00058   
00059   if ( (err = ffpriv_genitive_stem(word)) ) {
00060     return err;
00061   } else {
00062     return ffstring_append(&word->data, ffpriv_vowel_harmony(&word->data, "lta", "ltä"));
00063   }
00064 }
00065 
00066 ffint32 ffpriv_ablative_plural(ffword* word)
00067 {
00068   word->metadata.cg = 0;
00069   ffpriv_plural_stem(word);
00070   ffstring_append(&word->data, ffpriv_vowel_harmony(&word->data, "lta", "ltä"));
00071   return 0;
00072 }
00073 
00074 ffint32 ffpriv_allative_singular(ffword* word)
00075 {
00076   ffint32 err;
00077   
00078   if ( (err = ffpriv_genitive_stem(word)) ) {
00079     return err;
00080   } else {
00081     return ffstring_append(&word->data,"lle");
00082   }
00083 }
00084 
00085 ffint32 ffpriv_allative_plural(ffword* word)
00086 {
00087   word->metadata.cg = 0;
00088   ffpriv_plural_stem(word);
00089   ffstring_append(&word->data, "lle");
00090   return 0;
00091 }

Generated on Sun May 15 21:50:47 2005 for FinFlect by  doxygen 1.4.1