summaryrefslogtreecommitdiff
path: root/next-lib/src/spanish/MorphoSpa.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 /next-lib/src/spanish/MorphoSpa.gf
parent3049b59b35b25381a7c6787444165c200d66e08b (diff)
next-lib renamed to lib, lib to old-lib
Diffstat (limited to 'next-lib/src/spanish/MorphoSpa.gf')
-rw-r--r--next-lib/src/spanish/MorphoSpa.gf125
1 files changed, 0 insertions, 125 deletions
diff --git a/next-lib/src/spanish/MorphoSpa.gf b/next-lib/src/spanish/MorphoSpa.gf
deleted file mode 100644
index a78e45e03..000000000
--- a/next-lib/src/spanish/MorphoSpa.gf
+++ /dev/null
@@ -1,125 +0,0 @@
---# -path=.:../romance:../common:../../prelude
-
---1 A Simple Spanish Resource Morphology
---
--- Aarne Ranta 2002 -- 2005
---
--- This resource morphology contains definitions needed in the resource
--- syntax. To build a lexicon, it is better to use $ParadigmsSpa$, which
--- gives a higher-level access to this module.
-
-resource MorphoSpa = CommonRomance, ResSpa **
- open PhonoSpa, Prelude, Predef in {
-
- flags optimize=all ;
-
-
---2 Nouns
---
--- The following macro is useful for creating the forms of number-dependent
--- tables, such as common nouns.
-
-oper
- numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
- table {Sg => vino ; Pl => vini} ;
-
--- For example:
-
- nomVino : Str -> Number => Str = \vino ->
- numForms vino (vino + "s") ;
-
- nomPilar : Str -> Number => Str = \pilar ->
- numForms pilar (pilar + "es") ;
-
- nomTram : Str -> Number => Str = \tram ->
- numForms tram tram ;
-
--- Common nouns are inflected in number and have an inherent gender.
-
- mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
- {s = mecmecs ; g = gen} ;
-
- mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
- mkNoun (numForms mec mecs) ;
-
- mkNomReg : Str -> Noun = \mec ->
- case last mec of {
- "o" | "e" => mkNoun (nomVino mec) Masc ;
- "a" => mkNoun (nomVino mec) Fem ;
- "z" => mkNounIrreg mec (init mec + "ces") Fem ;
- _ => mkNoun (nomPilar mec) Masc
- } ;
-
---2 Adjectives
---
--- Adjectives are conveniently seen as gender-dependent nouns.
--- Here are some patterns. First one that describes the worst case.
-
- mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente ->
- {s = table {
- AF Masc n => numForms solo soli ! n ;
- AF Fem n => numForms sola sole ! n ;
- AA => solamente
- }
- } ;
-
--- Then the regular and invariant patterns.
-
- adjSolo : Str -> Adj = \solo ->
- let
- sol = Predef.tk 1 solo
- in
- mkAdj solo (sol + "a") (sol + "os") (sol + "as") (sol + "amente") ;
-
- adjUtil : Str -> Str -> Adj = \util,utiles ->
- mkAdj util util utiles utiles (util + "mente") ;
-
- adjBlu : Str -> Adj = \blu ->
- mkAdj blu blu blu blu blu ; ---
-
- mkAdjReg : Str -> Adj = \solo ->
- case last solo of {
- "o" => adjSolo solo ;
- "e" => adjUtil solo (solo + "s") ;
- _ => adjUtil solo (solo + "es")
----- _ => adjBlu solo
- } ;
-
---2 Personal pronouns
---
--- All the eight personal pronouns can be built by the following macro.
--- The use of "ne" as atonic genitive is debatable.
--- We follow the rule that the atonic nominative is empty.
-
- mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
- Gender -> Number -> Person -> Pronoun =
- \il,le,lui,Lui,son,sa,ses,see,g,n,p ->
- let
- alui : Case -> Str = \x -> prepCase x ++ Lui ;
- in {
- s = table {
- Nom => {c1 = [] ; c2 = [] ; comp = il ; ton = Lui} ;
- Acc => {c1 = le ; c2 = [] ; comp = [] ; ton = Lui} ;
- CPrep P_a => {c1 = [] ; c2 = lui ; comp = [] ; ton = alui (CPrep P_a)} ;
- c => {c1 = [] ; c2 = [] ; comp, ton = alui c}
- } ;
- poss = \\n,g => case <n,g> of {
- <Sg,Masc> => son ;
- <Sg,Fem> => sa ;
- <Pl,Masc> => ses ;
- <Pl,Fem> => see
- } ;
-
- a = {g = g ; n = n ; p = p} ;
- hasClit = True
- } ;
-
-
---2 Determiners
---
--- Determiners, traditionally called indefinite pronouns, are inflected
--- in gender and number, like adjectives.
-
- pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
-
-}