summaryrefslogtreecommitdiff
path: root/old-lib/resource/interlingua/MorphoIna.gf
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2009-06-22 15:39:08 +0000
committeraarne <aarne@chalmers.se>2009-06-22 15:39:08 +0000
commite89fdae2fa1626348d8025824a7469252fa85e42 (patch)
treec7d46bbd0494043b4bd6f917a25a7687517d0547 /old-lib/resource/interlingua/MorphoIna.gf
parent3049b59b35b25381a7c6787444165c200d66e08b (diff)
next-lib renamed to lib, lib to old-lib
Diffstat (limited to 'old-lib/resource/interlingua/MorphoIna.gf')
-rw-r--r--old-lib/resource/interlingua/MorphoIna.gf64
1 files changed, 64 insertions, 0 deletions
diff --git a/old-lib/resource/interlingua/MorphoIna.gf b/old-lib/resource/interlingua/MorphoIna.gf
new file mode 100644
index 000000000..3ad94282a
--- /dev/null
+++ b/old-lib/resource/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
+
+} ;
+