summaryrefslogtreecommitdiff
path: root/next-lib/src/interlingua/MorphoIna.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2009-03-13 16:05:13 +0000
committeraarne <aarne@cs.chalmers.se>2009-03-13 16:05:13 +0000
commit9b636333297ef49caece5ddb523e4bef7b8aea83 (patch)
treee06ad1f15622e671b42d86af23224c4465400456 /next-lib/src/interlingua/MorphoIna.gf
parente66b27aa5b6939694af4a1aa02b1f6e49dc7f636 (diff)
interlingua updated for new resource
Diffstat (limited to 'next-lib/src/interlingua/MorphoIna.gf')
-rw-r--r--next-lib/src/interlingua/MorphoIna.gf64
1 files changed, 64 insertions, 0 deletions
diff --git a/next-lib/src/interlingua/MorphoIna.gf b/next-lib/src/interlingua/MorphoIna.gf
new file mode 100644
index 000000000..3ad94282a
--- /dev/null
+++ b/next-lib/src/interlingua/MorphoIna.gf
@@ -0,0 +1,64 @@
+--# -path=.:../../prelude
+
+--1 A Simple Interlingua Resource Morphology
+--
+-- Aarne Ranta 2003--2005
+-- JP Bernardy 2007
+--
+-- This resource morphology contains definitions needed in the resource
+-- syntax. To build a lexicon, it is better to use $ParadigmsIna$, which
+-- gives a higher-level access to this module.
+
+resource MorphoIna = ResIna ** open Prelude, (Predef=Predef) in {
+
+ flags optimize=all ;
+
+--2 Nouns
+--
+-- For conciseness and abstraction, we define a worst-case macro for
+-- noun inflection. It is used for defining special case that
+-- only need one string as argument.
+
+oper
+ CommonNoun : Type = {s : Number => Str}; -- nouns are inflected in number
+
+ nounGen : Str -> Str -> CommonNoun = \mec,mecs ->
+ {s = table {Sg => mec;
+ Pl => mecs
+ };
+ };
+
+ nounReg : Str -> CommonNoun = \cas ->
+ let s = case last cas of {
+ "a" | "e" | "i" | "o" | "u" => "s" ;
+ "c" => "hes";
+ _ => "es"
+ }
+ in nounGen cas (cas + s) ;
+
+--2 Determiners
+
+ mkDeterminer : Number -> Str -> {s : Case => Str ; n : Number} = \n,s ->
+ {s = \\c=>casePrep "" c ++ s ; n = n} ;
+
+ mkIDeterminer : Number -> Str -> {s : Str ; n : Number} = \n,s ->
+ {s = s ; n = n} ;
+
+--2 Adjectives
+--
+-- To form the adjectival and the adverbial forms, 3 strings are needed
+-- in the worst case. (bon, melior, optime)
+
+ Adjective = {s : AForm => Str} ;
+
+-- However, most adjectives can be inflected using the final character.
+
+ regAdjective : Str -> Adjective = \clar ->
+ mkAdjective clar ("plus" ++ clar) ("le" ++ "plus" ++ clar) ;
+
+--3 Verbs
+
+ -- defined in resina
+
+} ;
+