mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -71,6 +71,7 @@ fun
|
|||||||
|
|
||||||
cat
|
cat
|
||||||
Timeunit ;
|
Timeunit ;
|
||||||
|
Hour ;
|
||||||
Weekday ;
|
Weekday ;
|
||||||
Month ;
|
Month ;
|
||||||
Monthday ;
|
Monthday ;
|
||||||
@@ -79,6 +80,34 @@ cat
|
|||||||
fun
|
fun
|
||||||
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
||||||
|
|
||||||
|
oneHour : Hour ;
|
||||||
|
twoHour : Hour ;
|
||||||
|
threeHour : Hour ;
|
||||||
|
fourHour : Hour ;
|
||||||
|
fiveHour : Hour ;
|
||||||
|
sixHour : Hour ;
|
||||||
|
sevenHour : Hour ;
|
||||||
|
eightHour : Hour ;
|
||||||
|
nineHour : Hour ;
|
||||||
|
tenHour : Hour ;
|
||||||
|
elevenHour : Hour ;
|
||||||
|
twelveHour : Hour ;
|
||||||
|
thirteenHour : Hour ;
|
||||||
|
fourteenHour : Hour ;
|
||||||
|
fifteenHour : Hour ;
|
||||||
|
sixteenHour : Hour ;
|
||||||
|
seventeenHour : Hour ;
|
||||||
|
eighteenHour : Hour ;
|
||||||
|
nineteenHour : Hour ;
|
||||||
|
twentyHour : Hour ;
|
||||||
|
twentyOneHour : Hour ;
|
||||||
|
twentyTwoHour : Hour ;
|
||||||
|
twentyThreeHour : Hour ;
|
||||||
|
twentyFourHour : Hour ;
|
||||||
|
|
||||||
|
timeHour : Hour -> Adv ; -- at three (o'clock / am / pm)
|
||||||
|
timeHourMinute : Hour -> Card -> Adv ; -- at forty past six
|
||||||
|
|
||||||
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
||||||
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
||||||
weekdayLastAdv : Weekday -> Adv ; -- last Monday
|
weekdayLastAdv : Weekday -> Adv ; -- last Monday
|
||||||
|
|||||||
7
src/api/CombinatorsSom.gf
Normal file
7
src/api/CombinatorsSom.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:alltenses:prelude:src/somali
|
||||||
|
|
||||||
|
resource CombinatorsSom = Combinators with
|
||||||
|
(Cat = CatSom),
|
||||||
|
(Structural = StructuralSom),
|
||||||
|
(Noun = NounSom),
|
||||||
|
(Constructors = ConstructorsSom) ** open MissingSom in {} ;
|
||||||
3
src/api/ConstructorsSom.gf
Normal file
3
src/api/ConstructorsSom.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--# -path=.:alltenses:prelude:../somali
|
||||||
|
|
||||||
|
resource ConstructorsSom = Constructors with (Grammar = GrammarSom) ** open MissingSom in {} ;
|
||||||
5
src/api/SymbolicSom.gf
Normal file
5
src/api/SymbolicSom.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
--# -path=.:../somali:../common:../abstract:../prelude
|
||||||
|
|
||||||
|
resource SymbolicSom = Symbolic with
|
||||||
|
(Symbol = SymbolSom),
|
||||||
|
(Grammar = GrammarSom) ** open MissingSom in {} ;
|
||||||
5
src/api/SyntaxSom.gf
Normal file
5
src/api/SyntaxSom.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
|
instance SyntaxSom of Syntax =
|
||||||
|
ConstructorsSom, CatSom, StructuralSom, CombinatorsSom ;
|
||||||
|
|
||||||
3
src/api/TrySom.gf
Normal file
3
src/api/TrySom.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--# -path=.:../somali:../common:../abstract:../prelude
|
||||||
|
|
||||||
|
resource TrySom = SyntaxSom, LexiconSom, ParadigmsSom - [mkAdv,mkAdN,mkDet,mkQuant,mkPConj] ;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -path=.:../abstract
|
--# -path=.:../abstract
|
||||||
|
|
||||||
concrete ConstructionEng of Construction = CatEng **
|
concrete ConstructionEng of Construction = CatEng **
|
||||||
open SyntaxEng, SymbolicEng, ParadigmsEng, (L = LexiconEng), (E = ExtendEng), (G = GrammarEng), (R = ResEng), (S = StructuralEng), Prelude in {
|
open SyntaxEng, SymbolicEng, ParadigmsEng, (L = LexiconEng), (E = ExtendEng), (G = GrammarEng), (R = ResEng), (Sy = SyntaxEng), (S = StructuralEng), Prelude in {
|
||||||
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -62,16 +62,60 @@ oper from_where_IAdv : IAdv = lin IAdv (ss "from where") ;
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
Timeunit = N ;
|
||||||
|
Hour = {s : Str ; am : Bool} ;
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
lin
|
|
||||||
timeunitAdv n time =
|
|
||||||
let n_card : Card = n ;
|
|
||||||
n_hours_NP : NP = mkNP n_card time ;
|
|
||||||
in SyntaxEng.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
|
||||||
|
|
||||||
|
lin
|
||||||
|
timeunitAdv n time =
|
||||||
|
let n_card : Card = n ;
|
||||||
|
n_hours_NP : NP = mkNP n_card time ;
|
||||||
|
in Sy.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
||||||
|
|
||||||
|
oneHour = mkHour "1" True ;
|
||||||
|
twoHour = mkHour "2" True ;
|
||||||
|
threeHour = mkHour "3" True ;
|
||||||
|
fourHour = mkHour "4" True ;
|
||||||
|
fiveHour = mkHour "5" True ;
|
||||||
|
sixHour = mkHour "6" True ;
|
||||||
|
sevenHour = mkHour "7" True ;
|
||||||
|
eightHour = mkHour "8" True ;
|
||||||
|
nineHour = mkHour "9" True ;
|
||||||
|
tenHour = mkHour "10" True ;
|
||||||
|
elevenHour = mkHour "11" True ;
|
||||||
|
twelveHour = mkHour "12" False ;
|
||||||
|
thirteenHour = mkHour "1" False ;
|
||||||
|
fourteenHour = mkHour "2" False ;
|
||||||
|
fifteenHour = mkHour "3" False ;
|
||||||
|
sixteenHour = mkHour "4" False ;
|
||||||
|
seventeenHour = mkHour "5" False ;
|
||||||
|
eighteenHour = mkHour "6" False ;
|
||||||
|
nineteenHour = mkHour "7" False ;
|
||||||
|
twentyHour = mkHour "8" False ;
|
||||||
|
twentyOneHour = mkHour "9" False ;
|
||||||
|
twentyTwoHour = mkHour "10" False ;
|
||||||
|
twentyThreeHour = mkHour "11" False ;
|
||||||
|
twentyFourHour = mkHour "12" True ;
|
||||||
|
|
||||||
|
timeHour h = Sy.mkAdv at_Prep (symb (h.s ++ ampm ! h.am)) ;
|
||||||
|
timeHourMinute h m = let
|
||||||
|
min = m.s ! True ! R.Nom
|
||||||
|
in
|
||||||
|
Sy.mkAdv at_Prep (symb (h.s ++ min ++ ampm ! h.am)) ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkHour : Str -> Bool -> {s : Str ; am : Bool} ;
|
||||||
|
mkHour n am = Sy.mkUtt (Sy.mkCard n) ** {am = am} ;
|
||||||
|
|
||||||
|
at_Prep : Prep ;
|
||||||
|
at_Prep = mkPrep "at" ;
|
||||||
|
|
||||||
|
ampm : Bool => Str ;
|
||||||
|
ampm = table {True => "a.m." ; False => "p.m."} ;
|
||||||
|
|
||||||
|
lin
|
||||||
weekdayPunctualAdv w = SyntaxEng.mkAdv on_Prep (mkNP w) ; -- on Sunday
|
weekdayPunctualAdv w = SyntaxEng.mkAdv on_Prep (mkNP w) ; -- on Sunday
|
||||||
weekdayHabitualAdv w = SyntaxEng.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays
|
weekdayHabitualAdv w = SyntaxEng.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays
|
||||||
weekdayNextAdv w = SyntaxEng.mkAdv (mkPrep "next") (mkNP w) ; -- next Sunday
|
weekdayNextAdv w = SyntaxEng.mkAdv (mkPrep "next") (mkNP w) ; -- next Sunday
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
concrete ConstructionPor of Construction = CatPor **
|
concrete ConstructionPor of Construction = CatPor **
|
||||||
open SyntaxPor, SymbolicPor, ParadigmsPor, BeschPor,
|
open SyntaxPor, SymbolicPor, ParadigmsPor, BeschPor,
|
||||||
(L = LexiconPor), (E = ExtraPor), (B = IrregBeschPor), (R = ResPor),
|
(L = LexiconPor), (E = ExtraPor), (B = IrregBeschPor), (R = ResPor),
|
||||||
(S = SyntaxPor), (C = CommonRomance),
|
(S = SyntaxPor), (C = CommonRomance), CommonRomance,
|
||||||
Prelude in {
|
Prelude in {
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
@@ -52,12 +52,17 @@ lin
|
|||||||
|
|
||||||
lincat
|
lincat
|
||||||
Timeunit = N ;
|
Timeunit = N ;
|
||||||
|
Hour = {s : Str ; pe : Period ; n : Number} ;
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
oper
|
|
||||||
noPrep : Prep = mkPrep [] ;
|
param
|
||||||
|
Period = Manha | Tarde | Noite | None ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
noPrep : Prep = mkPrep [] ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
timeunitAdv n time =
|
timeunitAdv n time =
|
||||||
@@ -65,6 +70,54 @@ oper
|
|||||||
n_hours_NP : NP = mkNP n_card time ;
|
n_hours_NP : NP = mkNP n_card time ;
|
||||||
in S.mkAdv for_Prep n_hours_NP | S.mkAdv to_Prep n_hours_NP ;--| S.mkAdv (n_hours_NP.s ! R.Nom) ;
|
in S.mkAdv for_Prep n_hours_NP | S.mkAdv to_Prep n_hours_NP ;--| S.mkAdv (n_hours_NP.s ! R.Nom) ;
|
||||||
|
|
||||||
|
oneHour = mkHour "1" Manha Sg ;
|
||||||
|
twoHour = mkHour "2" Manha Pl ;
|
||||||
|
threeHour = mkHour "3" Manha Pl ;
|
||||||
|
fourHour = mkHour "4" Manha Pl ;
|
||||||
|
fiveHour = mkHour "5" Manha Pl ;
|
||||||
|
sixHour = mkHour "6" Manha Pl ;
|
||||||
|
sevenHour = mkHour "7" Manha Pl ;
|
||||||
|
eightHour = mkHour "8" Manha Pl ;
|
||||||
|
nineHour = mkHour "9" Manha Pl ;
|
||||||
|
tenHour = mkHour "10" Manha Pl ;
|
||||||
|
elevenHour = mkHour "11" Manha Pl ;
|
||||||
|
twelveHour = {s = "meio-dia" ; pe = None ; n = Sg} ;
|
||||||
|
thirteenHour = mkHour "13" Tarde Pl ;
|
||||||
|
fourteenHour = mkHour "14" Tarde Pl ;
|
||||||
|
fifteenHour = mkHour "15" Tarde Pl ;
|
||||||
|
sixteenHour = mkHour "16" Tarde Pl ;
|
||||||
|
seventeenHour = mkHour "17" Tarde Pl ;
|
||||||
|
eighteenHour = mkHour "18" Tarde Pl ;
|
||||||
|
nineteenHour = mkHour "19" Noite Pl ;
|
||||||
|
twentyHour = mkHour "20" Noite Pl ;
|
||||||
|
twentyOneHour = mkHour "21" Noite Pl ;
|
||||||
|
twentyTwoHour = mkHour "22" Noite Pl ;
|
||||||
|
twentyThreeHour = mkHour "23" Noite Pl ;
|
||||||
|
twentyFourHour = {s = "meia-noite" ; pe = None ; n = Sg} ;
|
||||||
|
|
||||||
|
timeHour h = mkAdv (a ! h.n ++ h.s ++ period ! h.pe) ;
|
||||||
|
|
||||||
|
timeHourMinute h m = let
|
||||||
|
min = m.s ! Masc
|
||||||
|
in
|
||||||
|
mkAdv (a ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
mkHour : Str -> Period -> Number -> {s : Str ; pe : Period ; n : Number} ;
|
||||||
|
mkHour num pe n = S.mkUtt (S.mkCard num) ** {pe = pe ; n = n} ;
|
||||||
|
|
||||||
|
period : Period => Str ;
|
||||||
|
period = table {
|
||||||
|
Manha => "da manhã" ;
|
||||||
|
Tarde => "da tarde" ;
|
||||||
|
Noite => "da noite" ;
|
||||||
|
None => ""
|
||||||
|
} ;
|
||||||
|
|
||||||
|
a : Number => Str ;
|
||||||
|
a = numForms "à" "às" ;
|
||||||
|
|
||||||
|
lin
|
||||||
weekdayPunctualAdv w = lin Adv {s = w.s ! C.Sg} ; -- lundi
|
weekdayPunctualAdv w = lin Adv {s = w.s ! C.Sg} ; -- lundi
|
||||||
weekdayHabitualAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det w) ; -- il lunedí ----
|
weekdayHabitualAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det w) ; -- il lunedí ----
|
||||||
weekdayLastAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det (mkCN (mkA "passado") w)) ; -- il lunedí scorso
|
weekdayLastAdv w = SyntaxPor.mkAdv noPrep (mkNP the_Det (mkCN (mkA "passado") w)) ; -- il lunedí scorso
|
||||||
|
|||||||
56
src/somali/AdjectiveSom.gf
Normal file
56
src/somali/AdjectiveSom.gf
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
-- The principal ways of forming an adjectival phrase are
|
||||||
|
-- positive, comparative, relational, reflexive-relational, and
|
||||||
|
-- elliptic-relational.
|
||||||
|
|
||||||
|
-- : A -> AP ;
|
||||||
|
PositA a = a ;
|
||||||
|
|
||||||
|
-- : A -> NP -> AP ;
|
||||||
|
-- ComparA a np = a ** {
|
||||||
|
-- s = \\agr => np.s ! Abs ++ "ka" ++ a.s ! AF Compar ;
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
-- : A2 -> NP -> AP ; -- married to her
|
||||||
|
-- ComplA2 a2 np = a2 ** { } ;
|
||||||
|
|
||||||
|
-- : A2 -> AP ; -- married to itself
|
||||||
|
-- ReflA2 a2 = a2 ** { } ;
|
||||||
|
|
||||||
|
-- : A2 -> AP ; -- married
|
||||||
|
UseA2 = PositA ;
|
||||||
|
|
||||||
|
-- : A -> AP ; -- warmer
|
||||||
|
--UseComparA a = a ** {} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||||
|
-- CAdvAP adv ap np = ap ** { } ;
|
||||||
|
|
||||||
|
-- The superlative use is covered in $Ord$.
|
||||||
|
|
||||||
|
-- : Ord -> AP ; -- warmest
|
||||||
|
-- AdjOrd ord = ord ** {} ;
|
||||||
|
|
||||||
|
-- Sentence and question complements defined for all adjectival
|
||||||
|
-- phrases, although the semantics is only clear for some adjectives.
|
||||||
|
|
||||||
|
-- : AP -> SC -> AP ; -- good that she is here
|
||||||
|
-- SentAP ap sc = ap ** { } ;
|
||||||
|
|
||||||
|
-- An adjectival phrase can be modified by an *adadjective*, such as "very".
|
||||||
|
|
||||||
|
-- : AdA -> AP -> AP ;
|
||||||
|
-- AdAP ada ap = ap ** { } ;
|
||||||
|
|
||||||
|
|
||||||
|
-- It can also be postmodified by an adverb, typically a prepositional phrase.
|
||||||
|
|
||||||
|
-- : AP -> Adv -> AP ; -- warm by nature
|
||||||
|
-- AdvAP ap adv = ap ** {} ;
|
||||||
|
|
||||||
|
}
|
||||||
38
src/somali/AdverbSom.gf
Normal file
38
src/somali/AdverbSom.gf
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
concrete AdverbSom of Adverb = CatSom ** open ResSom, ParamSom, Prelude in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
-- : A -> Adv ;
|
||||||
|
--PositAdvAdj adj = { } ;
|
||||||
|
|
||||||
|
-- : CAdv -> A -> NP -> Adv ; -- more warmly than John
|
||||||
|
-- ComparAdvAdj cadv a np = { } ;
|
||||||
|
|
||||||
|
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||||
|
|
||||||
|
-- : Prep -> NP -> Adv ;
|
||||||
|
PrepNP prep np = {s = prep.s ! np.a ; s2 = np.s ! Abs} ; ---- ?
|
||||||
|
|
||||||
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|
||||||
|
--AdAdv : AdA -> Adv -> Adv ; -- very quickly
|
||||||
|
AdAdv ada adv = adv ** { s = ada.s ++ adv.s } ;
|
||||||
|
-- Like adverbs, adadjectives can be produced by adjectives.
|
||||||
|
|
||||||
|
-- : A -> AdA ; -- extremely
|
||||||
|
-- PositAdAAdj a = { } ;
|
||||||
|
-- Subordinate clauses can function as adverbs.
|
||||||
|
|
||||||
|
-- : Subj -> S -> Adv ;
|
||||||
|
-- SubjS subj s = {} ;
|
||||||
|
|
||||||
|
-- Comparison adverbs also work as numeral adverbs.
|
||||||
|
|
||||||
|
--AdnCAdv : CAdv -> AdN ; -- less (than five)
|
||||||
|
--AdnCAdv cadv = {s = } ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
gt PrepNP in_Prep (DetCN (DetQuant DefArt ?) (UseN ?) | l -bind
|
||||||
|
gt PrepNP from_Prep (DetCN (DetQuant DefArt ?) (UseN ?)) | l -bind
|
||||||
|
-}
|
||||||
6
src/somali/AllSom.gf
Normal file
6
src/somali/AllSom.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete AllSom of AllSomAbs =
|
||||||
|
LangSom,
|
||||||
|
ExtendSom
|
||||||
|
** {} ;
|
||||||
6
src/somali/AllSomAbs.gf
Normal file
6
src/somali/AllSomAbs.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:../abstract:../common:prelude
|
||||||
|
|
||||||
|
abstract AllSomAbs =
|
||||||
|
Lang,
|
||||||
|
Extend
|
||||||
|
** {} ;
|
||||||
128
src/somali/CatSom.gf
Normal file
128
src/somali/CatSom.gf
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
|
||||||
|
--2 Sentences and clauses
|
||||||
|
-- Constructed in SentenceSom, and also in IdiomSom
|
||||||
|
|
||||||
|
S = ResSom.Sentence ;
|
||||||
|
QS = ResSom.Sentence ;
|
||||||
|
RS = { s : Agreement => Str } ;
|
||||||
|
-- relative sentence. Tense and polarity fixed,
|
||||||
|
-- but agreement may depend on the CN/NP it modifies.
|
||||||
|
|
||||||
|
Cl = ResSom.Clause ;
|
||||||
|
ClSlash = ResSom.ClSlash ;
|
||||||
|
SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at"
|
||||||
|
Imp = { s : Str } ; -- imperative e.g. "look at this"
|
||||||
|
|
||||||
|
--2 Questions and interrogatives
|
||||||
|
|
||||||
|
-- Constructed in QuestionSom.
|
||||||
|
|
||||||
|
QCl = ResSom.Clause ;
|
||||||
|
IP = ResSom.NounPhrase ;
|
||||||
|
IComp = { s : Str } ; -- interrogative complement of copula e.g. "where"
|
||||||
|
IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many"
|
||||||
|
IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--2 Relative clauses and pronouns
|
||||||
|
|
||||||
|
-- Constructed in RelativeSom.
|
||||||
|
|
||||||
|
RCl = ResSom.RClause ;
|
||||||
|
RP = { s : Str } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--2 Verb phrases
|
||||||
|
|
||||||
|
-- Constructed in VerbSom.
|
||||||
|
|
||||||
|
VP = ResSom.VerbPhrase ;
|
||||||
|
VPSlash = ResSom.VPSlash ;
|
||||||
|
Comp = ResSom.Complement ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Adjectival phrases
|
||||||
|
|
||||||
|
-- Constructed in AdjectiveSom.
|
||||||
|
|
||||||
|
AP = ResSom.AdjPhrase ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Nouns and noun phrases
|
||||||
|
|
||||||
|
-- Constructed in NounSom.
|
||||||
|
-- Many atomic noun phrases e.g. "everybody"
|
||||||
|
-- are constructed in StructuralSom.
|
||||||
|
-- The determiner structure is
|
||||||
|
-- ``` Predet (QuantSg | QuantPl Num) Ord
|
||||||
|
-- as defined in NounSom.
|
||||||
|
|
||||||
|
CN = ResSom.CNoun ;
|
||||||
|
NP = ResSom.NounPhrase ;
|
||||||
|
Pron = ResSom.Pronoun ; --Pronouns need enough info to turn it into NP or Quant.
|
||||||
|
Det = ResSom.Determiner ;
|
||||||
|
Predet = {s : Str} ;
|
||||||
|
Quant = ResSom.Quant ;
|
||||||
|
Num = { s : Str ; n : Number ; isNum : Bool } ;
|
||||||
|
Card, Ord = { s : Str ; n : Number } ;
|
||||||
|
DAP = ResSom.Determiner ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Numerals
|
||||||
|
|
||||||
|
-- Constructed in NumeralSom.
|
||||||
|
|
||||||
|
Numeral = { s : Str ; n : Number } ;
|
||||||
|
Digits = { s : CardOrd => Str ; n : Number } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--2 Structural words
|
||||||
|
|
||||||
|
-- Constructed in StructuralSom.
|
||||||
|
Conj = { s1,s2 : Str ; n : Number } ;
|
||||||
|
Subj = { s : Str ; isPre : Bool } ; --ba+dut vs. dut+en
|
||||||
|
Prep = ResSom.Prep ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--2 Words of open classes
|
||||||
|
|
||||||
|
-- These are constructed in LexiconSom and in
|
||||||
|
-- additional lexicon modules.
|
||||||
|
|
||||||
|
V,
|
||||||
|
V2,
|
||||||
|
V3,
|
||||||
|
VV, -- verb-phrase-complement verb e.g. "want"
|
||||||
|
VS, -- sentence-complement verb e.g. "claim"
|
||||||
|
VQ, -- question-complement verb e.g. "wonder"
|
||||||
|
VA, -- adjective-complement verb e.g. "look"
|
||||||
|
V2V, -- verb with NP and V complement e.g. "cause"
|
||||||
|
V2S, -- verb with NP and S complement e.g. "tell"
|
||||||
|
V2Q, -- verb with NP and Q complement e.g. "ask"
|
||||||
|
V2A = ResSom.Verb ; -- verb with NP and AP complement e.g. "paint"
|
||||||
|
|
||||||
|
A = ResSom.Adjective ;
|
||||||
|
A2 = ResSom.Adjective2 ;
|
||||||
|
|
||||||
|
N = ResSom.Noun ;
|
||||||
|
N2 = ResSom.Noun2 ;
|
||||||
|
N3 = ResSom.Noun3 ;
|
||||||
|
PN = ResSom.PNoun ;
|
||||||
|
|
||||||
|
Adv = ResSom.Adverb ;
|
||||||
|
|
||||||
|
linref
|
||||||
|
-- Cl = linCl ;
|
||||||
|
VP = linVP ;
|
||||||
|
CN = linCN ;
|
||||||
|
}
|
||||||
116
src/somali/ConjunctionSom.gf
Normal file
116
src/somali/ConjunctionSom.gf
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
concrete ConjunctionSom of Conjunction =
|
||||||
|
CatSom ** open ResSom, Coordination, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
{- Conjunction for category X needs four things:
|
||||||
|
lincat [X]
|
||||||
|
lin BaseX
|
||||||
|
lin ConsX
|
||||||
|
lin ConjX
|
||||||
|
|
||||||
|
For example, if X is defined as
|
||||||
|
|
||||||
|
lincat X = {s : Number => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
then [X] will split its s field into two, and retain its other fields as is:
|
||||||
|
|
||||||
|
lincat [X] = {s1,s2 : Number => Str ; g : Gender} ;
|
||||||
|
|
||||||
|
Let us look at a simple case: Adv is of type {s : Str}
|
||||||
|
Then [Adv] is {s1,s2 : Str}.
|
||||||
|
BaseAdv, ConsAdv and ConjAdv can all use functions defined in prelude/Coordination:
|
||||||
|
|
||||||
|
BaseAdv = twoSS ;
|
||||||
|
ConsAdv = consrSS comma ;
|
||||||
|
ConjAdv = conjunctSS ;
|
||||||
|
|
||||||
|
--}
|
||||||
|
|
||||||
|
|
||||||
|
-- Adverb and other simple {s : Str} types.
|
||||||
|
lincat
|
||||||
|
[Adv],[AdV],[IAdv] = {s1,s2 : Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseAdv, BaseAdV, BaseIAdv = twoSS ;
|
||||||
|
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
||||||
|
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
--RS depends on agreement, otherwise exactly like previous.
|
||||||
|
lincat
|
||||||
|
[RS] = {s1,s2 : Agr => Str } ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseRS x y = twoTable Agr x y ;
|
||||||
|
ConsRS xs x = consrTable Agr comma xs x ;
|
||||||
|
ConjRS co xs = conjunctDistrTable Agr co xs ;
|
||||||
|
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[S] = {} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseS x y = y ** { } ;
|
||||||
|
ConsS x xs =
|
||||||
|
xs ** { } ;
|
||||||
|
ConjS co xs = {} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[AP] = {} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseAP x y = twoTable Agr x y ** y ; --choose all the other fields from second argument
|
||||||
|
ConsAP as a = consrTable Agr comma as a ** as ;
|
||||||
|
ConjAP co as = conjunctDistrTable Agr co as ** as ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[CN] = { } ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseCN = {} ;
|
||||||
|
ConsCN = {} ;
|
||||||
|
ConjCN co cs = conjunctDistrTable Agr co cs ** cs ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
[DAP] = Determiner ** { pref2 : Str } ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseDAP x y = x ** { pref2 = y.pref } ;
|
||||||
|
ConsDAP xs x = xs ** { pref2 = x.pref } ;
|
||||||
|
ConjDet conj xs = xs ** { pref = conj.s1 ++ xs.pref ++ conj.s2 ++ xs.pref2 } ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Noun phrases
|
||||||
|
lincat
|
||||||
|
[NP] = { s1,s2 : Case => Str } ** NPLight ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseNP x y = twoTable Case x y ** consNP x y ;
|
||||||
|
ConsNP xs x = consrTable Case comma xs x ** consNP xs x ;
|
||||||
|
ConjNP conj xs = conjunctNPTable conj xs ** conjNP xs conj ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
--NP without the s field; just to avoid copypaste and make things easier to change
|
||||||
|
NPLight : Type = { } ;
|
||||||
|
|
||||||
|
consNP : NPLight -> NPLight -> NPLight = \x,y ->
|
||||||
|
x ** { agr = conjAgr x.agr (getNum y.agr) } ;
|
||||||
|
|
||||||
|
conjNP : NPLight -> Conj -> NPLight = \xs,conj ->
|
||||||
|
xs ** { agr = conjAgr xs.agr conj.nbr } ;
|
||||||
|
|
||||||
|
-- Like conjunctTable from prelude/Coordination.gf,
|
||||||
|
-- but forces the first argument into absolutive.
|
||||||
|
conjunctNPTable : Conj -> ListTable Case -> {s : Case => Str} = \co,xs ->
|
||||||
|
{ s = table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ++ xs.s2 ! cas } } ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Number -> Agr = \a,n ->
|
||||||
|
case n of { Pl => plAgr a ; _ => a } ;
|
||||||
|
|
||||||
|
conjNbr : Number -> Number -> Number = \n,m ->
|
||||||
|
case n of { Pl => Pl ; _ => m } ;
|
||||||
|
-}
|
||||||
|
}
|
||||||
119
src/somali/ConstructionSom.gf
Normal file
119
src/somali/ConstructionSom.gf
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
concrete ConstructionSom of Construction = CatSom ** open ParadigmsSom in {
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Timeunit = N ;
|
||||||
|
Weekday = N ;
|
||||||
|
Monthday = NP ;
|
||||||
|
Month = N ;
|
||||||
|
Year = NP ;
|
||||||
|
{-
|
||||||
|
lin
|
||||||
|
|
||||||
|
timeunitAdv n time =
|
||||||
|
let n_card : Card = n ;
|
||||||
|
n_hours_NP : NP = mkNP n_card time ;
|
||||||
|
in SyntaxSom.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
||||||
|
|
||||||
|
weekdayPunctualAdv w = ; -- on Sunday
|
||||||
|
weekdayHabitualAdv w = ; -- on Sundays
|
||||||
|
weekdayNextAdv w = -- next Sunday
|
||||||
|
weekdayLastAdv w = -- last Sunday
|
||||||
|
|
||||||
|
monthAdv m = mkAdv in_Prep (mkNP m) ;
|
||||||
|
yearAdv y = mkAdv in_Prep y ;
|
||||||
|
dayMonthAdv d m = ; -- on 17 May
|
||||||
|
monthYearAdv m y = ; -- in May 2012
|
||||||
|
dayMonthYearAdv d m y = ; -- on 17 May 2013
|
||||||
|
|
||||||
|
intYear = symb ;
|
||||||
|
intMonthday = symb ;
|
||||||
|
|
||||||
|
lincat Language = N ;
|
||||||
|
|
||||||
|
lin InLanguage l = mkAdv ???_Prep (mkNP l) ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
weekdayN w = w ;
|
||||||
|
monthN m = m ;
|
||||||
|
|
||||||
|
weekdayPN w = mkPN w ;
|
||||||
|
monthPN m = mkPN m ;
|
||||||
|
|
||||||
|
languageCN l = mkCN l ;
|
||||||
|
languageNP l = mkNP l ;
|
||||||
|
|
||||||
|
|
||||||
|
oper mkLanguage : Str -> N = \s -> mkN s ;
|
||||||
|
|
||||||
|
----------------------------------------------
|
||||||
|
---- lexicon of special names
|
||||||
|
|
||||||
|
lin second_Timeunit = mkN "second" ;
|
||||||
|
lin minute_Timeunit = mkN "minute" ;
|
||||||
|
lin hour_Timeunit = mkN "hour" ;
|
||||||
|
lin day_Timeunit = mkN "day" ;
|
||||||
|
lin week_Timeunit = mkN "week" ;
|
||||||
|
lin month_Timeunit = mkN "month" ;
|
||||||
|
lin year_Timeunit = mkN "year" ;
|
||||||
|
|
||||||
|
lin monday_Weekday = mkN "Monday" ;
|
||||||
|
lin tuesday_Weekday = mkN "Tuesday" ;
|
||||||
|
lin wednesday_Weekday = mkN "Wednesday" ;
|
||||||
|
lin thursday_Weekday = mkN "Thursday" ;
|
||||||
|
lin friday_Weekday = mkN "Friday" ;
|
||||||
|
lin saturday_Weekday = mkN "Saturday" ;
|
||||||
|
lin sunday_Weekday = mkN "Sunday" ;
|
||||||
|
|
||||||
|
lin january_Month = mkN "January" ;
|
||||||
|
lin february_Month = mkN "February" ;
|
||||||
|
lin march_Month = mkN "March" ;
|
||||||
|
lin april_Month = mkN "April" ;
|
||||||
|
lin may_Month = mkN "May" ;
|
||||||
|
lin june_Month = mkN "June" ;
|
||||||
|
lin july_Month = mkN "July" ;
|
||||||
|
lin august_Month = mkN "August" ;
|
||||||
|
lin september_Month = mkN "September" ;
|
||||||
|
lin october_Month = mkN "October" ;
|
||||||
|
lin november_Month = mkN "November" ;
|
||||||
|
lin december_Month = mkN "December" ;
|
||||||
|
|
||||||
|
lin afrikaans_Language = mkLanguage "Afrikaans" ;
|
||||||
|
lin amharic_Language = mkLanguage "Amharic" ;
|
||||||
|
lin arabic_Language = mkLanguage "Arabic" ;
|
||||||
|
lin bulgarian_Language = mkLanguage "Bulgarian" ;
|
||||||
|
lin catalan_Language = mkLanguage "Catalan" ;
|
||||||
|
lin chinese_Language = mkLanguage "Chinese" ;
|
||||||
|
lin danish_Language = mkLanguage "Danish" ;
|
||||||
|
lin dutch_Language = mkLanguage "Dutch" ;
|
||||||
|
lin english_Language = mkLanguage "Euslish" ;
|
||||||
|
lin estonian_Language = mkLanguage "Estonian" ;
|
||||||
|
lin finnish_Language = mkLanguage "Finnish" ;
|
||||||
|
lin french_Language = mkLanguage "French" ;
|
||||||
|
lin german_Language = mkLanguage "German" ;
|
||||||
|
lin greek_Language = mkLanguage "Greek" ;
|
||||||
|
lin hebrew_Language = mkLanguage "Hebrew" ;
|
||||||
|
lin hindi_Language = mkLanguage "Hindi" ;
|
||||||
|
lin japanese_Language = mkLanguage "Japanese" ;
|
||||||
|
lin italian_Language = mkLanguage "Italian" ;
|
||||||
|
lin latin_Language = mkLanguage "Latin" ;
|
||||||
|
lin latvian_Language = mkLanguage "Latvian" ;
|
||||||
|
lin maltese_Language = mkLanguage "Maltese" ;
|
||||||
|
lin nepali_Language = mkLanguage "Nepali" ;
|
||||||
|
lin norwegian_Language = mkLanguage "Norwegian" ;
|
||||||
|
lin persian_Language = mkLanguage "Persian" ;
|
||||||
|
lin polish_Language = mkLanguage "Polish" ;
|
||||||
|
lin punjabi_Language = mkLanguage "Punjabi" ;
|
||||||
|
lin romanian_Language = mkLanguage "Romanian" ;
|
||||||
|
lin russian_Language = mkLanguage "Russian" ;
|
||||||
|
lin sindhi_Language = mkLanguage "Sindhi" ;
|
||||||
|
lin spanish_Language = mkLanguage "Spanish" ;
|
||||||
|
lin swahili_Language = mkLanguage "Swahili" ;
|
||||||
|
lin swedish_Language = mkLanguage "Swedish" ;
|
||||||
|
lin thai_Language = mkLanguage "Thai" ;
|
||||||
|
lin turkish_Language = mkLanguage "Turkish" ;
|
||||||
|
lin urdu_Language = mkLanguage "Urdu" ;
|
||||||
|
|
||||||
|
—}
|
||||||
|
}
|
||||||
|
-}
|
||||||
|
}
|
||||||
7
src/somali/ExtendSom.gf
Normal file
7
src/somali/ExtendSom.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
|
concrete ExtendSom of Extend = {} ;
|
||||||
|
-- CatSom ** ExtendFunctor
|
||||||
|
-- with (Grammar=GrammarSom)
|
||||||
|
-- ** open Prelude, ResSom in {
|
||||||
|
-- } ;
|
||||||
20
src/somali/GrammarSom.gf
Normal file
20
src/somali/GrammarSom.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
concrete GrammarSom of Grammar =
|
||||||
|
NounSom,
|
||||||
|
VerbSom,
|
||||||
|
AdjectiveSom,
|
||||||
|
AdverbSom,
|
||||||
|
NumeralSom,
|
||||||
|
SentenceSom,
|
||||||
|
QuestionSom,
|
||||||
|
RelativeSom,
|
||||||
|
ConjunctionSom,
|
||||||
|
PhraseSom,
|
||||||
|
TextX - [Adv],
|
||||||
|
StructuralSom,
|
||||||
|
IdiomSom,
|
||||||
|
TenseX - [Adv]
|
||||||
|
** {
|
||||||
|
|
||||||
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|
||||||
|
} ;
|
||||||
48
src/somali/IdiomSom.gf
Normal file
48
src/somali/IdiomSom.gf
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
--1 Idiom: Idiomatic Expressions
|
||||||
|
|
||||||
|
concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in {
|
||||||
|
|
||||||
|
-- This module defines constructions that are formed in fixed ways,
|
||||||
|
-- often different even in closely related languages.
|
||||||
|
|
||||||
|
--lin
|
||||||
|
|
||||||
|
-- : VP -> Cl ; -- it is hot
|
||||||
|
--ImpersCl = ;
|
||||||
|
|
||||||
|
-- : VP -> Cl ; -- one sleeps
|
||||||
|
--GenericCl = ;
|
||||||
|
{-
|
||||||
|
CleftNP : NP -> RS -> Cl ; -- it is I who did it
|
||||||
|
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
|
||||||
|
-}
|
||||||
|
-- : NP -> Cl ; -- there is a house
|
||||||
|
-- ExistNP np =
|
||||||
|
-- let vp = UseComp (CompNP np)
|
||||||
|
-- in ;
|
||||||
|
|
||||||
|
{- ExistIP : IP -> QCl ; -- which houses are there
|
||||||
|
|
||||||
|
-- 7/12/2012 generalizations of these
|
||||||
|
|
||||||
|
ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris
|
||||||
|
ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris
|
||||||
|
-}
|
||||||
|
-- : VP -> VP ;
|
||||||
|
--ProgrVP vp = vp ** { } ;
|
||||||
|
|
||||||
|
-- : VP -> Utt ; -- let's go
|
||||||
|
--ImpPl1 vp = { } ;
|
||||||
|
{-
|
||||||
|
|
||||||
|
ImpP3 : NP -> VP -> Utt ; -- let John walk
|
||||||
|
|
||||||
|
-- 3/12/2013 non-reflexive uses of "self"
|
||||||
|
|
||||||
|
SelfAdvVP : VP -> VP ; -- is at home himself
|
||||||
|
SelfAdVVP : VP -> VP ; -- is himself at home
|
||||||
|
SelfNP : NP -> NP ; -- the president himself (is at home)
|
||||||
|
-}
|
||||||
|
|
||||||
|
}
|
||||||
4
src/somali/LangSom.gf
Normal file
4
src/somali/LangSom.gf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
concrete LangSom of Lang =
|
||||||
|
GrammarSom,
|
||||||
|
LexiconSom,
|
||||||
|
ConstructionSom ;
|
||||||
418
src/somali/LexiconSom.gf
Normal file
418
src/somali/LexiconSom.gf
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
concrete LexiconSom of Lexicon = CatSom **
|
||||||
|
open ParadigmsSom in {
|
||||||
|
|
||||||
|
----
|
||||||
|
-- A
|
||||||
|
|
||||||
|
-- lin add_V3 =
|
||||||
|
-- lin airplane_N = mkN "" ;
|
||||||
|
-- lin alas_Interj = mkInterj "" ;
|
||||||
|
-- lin already_Adv = mkA "" ;
|
||||||
|
lin animal_N = mkN "xayawaan" ;
|
||||||
|
-- lin answer_V2S = mkV2 "" ;
|
||||||
|
-- lin apartment_N = mkN "" ;
|
||||||
|
-- lin apple_N = mkN "" ;
|
||||||
|
-- lin art_N = mkN "" ;
|
||||||
|
-- lin ashes_N = mkN "" ;
|
||||||
|
-- lin ask_V2Q = mkV2 "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- B
|
||||||
|
|
||||||
|
-- lin baby_N = mkN "" ;
|
||||||
|
-- lin back_N = mkN "" ;
|
||||||
|
-- lin bad_A = mkA "" ;
|
||||||
|
-- lin bank_N = mkN "" ;
|
||||||
|
-- lin bark_N = mkN "" ;
|
||||||
|
-- lin beautiful_A = mkA "" ;
|
||||||
|
-- lin become_VA = mkVA "" ;
|
||||||
|
-- lin beer_N = mkN "" ;
|
||||||
|
-- lin beg_V2V = mkV2 "" ;
|
||||||
|
-- lin belly_N = mkN "" ;
|
||||||
|
lin big_A = mkA "weyn" ;
|
||||||
|
-- lin bike_N = mkN "" ;
|
||||||
|
lin bird_N = mkN "shimbir" fem ;
|
||||||
|
-- lin bite_V2 = mkV2 "" ;
|
||||||
|
-- lin black_A = mkA "" ;
|
||||||
|
-- lin blood_N = mkN "" ;
|
||||||
|
-- lin blow_V = mkV "" ;
|
||||||
|
-- lin blue_A = mkA "" ;
|
||||||
|
-- lin boat_N = mkN "" ;
|
||||||
|
-- lin bone_N = mkN "" ;
|
||||||
|
-- lin boot_N = mkN "" ;
|
||||||
|
-- lin boss_N = mkN "" ;
|
||||||
|
lin book_N = mkN "buug" ; -- TODO: irregular plural
|
||||||
|
lin boy_N = mkN "wiil" ;
|
||||||
|
lin bread_N = mkN "rooti" ; --masc/fem
|
||||||
|
-- lin break_V2 = mkV2 "" ;
|
||||||
|
-- lin breast_N = mkN "" ;
|
||||||
|
-- lin breathe_V = mkV "" ;
|
||||||
|
-- lin broad_A = mkA "" ;
|
||||||
|
-- lin brother_N2 = mkN "" ;
|
||||||
|
-- lin brown_A = mkA "" ;
|
||||||
|
-- lin burn_V = mkV "" ;
|
||||||
|
-- lin butter_N = mkN "" ;
|
||||||
|
-- lin buy_V2 = mkV2 "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- C
|
||||||
|
|
||||||
|
-- lin camera_N = mkN "" ;
|
||||||
|
-- lin cap_N = mkN "" ;
|
||||||
|
lin car_N = mkN "baabuur" masc ;
|
||||||
|
-- lin carpet_N = mkN "" ;
|
||||||
|
lin cat_N = mkN "bisad" ;
|
||||||
|
-- lin ceiling_N = mkN "" ;
|
||||||
|
-- lin chair_N = mkN "" ;
|
||||||
|
-- lin cheese_N = mkN "" ;
|
||||||
|
-- lin child_N = mkN "" ;
|
||||||
|
-- lin church_N = mkN "" ;
|
||||||
|
lin city_N = mkN "magaalo" ;
|
||||||
|
-- lin clean_A = mkA "" ;
|
||||||
|
-- lin clever_A = mkA "" ;
|
||||||
|
-- lin close_V2 = mkV2 "" ;
|
||||||
|
-- lin cloud_N = mkN "" ;
|
||||||
|
-- lin coat_N = mkN "" ;
|
||||||
|
-- lin cold_A = mkA "" ;
|
||||||
|
-- lin come_V = etorri_V ;
|
||||||
|
-- lin computer_N = mkN "" ;
|
||||||
|
-- lin correct_A = mkA "" ;
|
||||||
|
-- lin count_V2 = mkV2 "" ;
|
||||||
|
-- lin country_N = mkN "" ;
|
||||||
|
-- lin cousin_N = mkN "" ;
|
||||||
|
-- lin cow_N = mkN "" ;
|
||||||
|
-- lin cut_V2 = mkV2 "" ;
|
||||||
|
--
|
||||||
|
-- ----
|
||||||
|
-- -- D
|
||||||
|
--
|
||||||
|
-- lin day_N = mkN "" ;
|
||||||
|
-- lin die_V = mkV "" ;
|
||||||
|
-- lin dig_V = mkV "" ;
|
||||||
|
-- lin dirty_A = mkA "" ;
|
||||||
|
-- lin distance_N3 = mkN "" ;
|
||||||
|
-- lin do_V2 = lin V2 egin_V ;
|
||||||
|
-- lin doctor_N = mkN "" ;
|
||||||
|
-- lin dog_N = mkN "" ;
|
||||||
|
-- lin door_N = mkN "" ;
|
||||||
|
-- lin drink_V2 = mkV2 "" ;
|
||||||
|
-- lin dry_A = mkA "" ;
|
||||||
|
-- lin dull_A = mkA "" ;
|
||||||
|
-- lin dust_N = mkN "" ;
|
||||||
|
--
|
||||||
|
-- ----
|
||||||
|
-- -- E
|
||||||
|
--
|
||||||
|
-- lin ear_N = mkN "" ;
|
||||||
|
-- lin earth_N = mkN "" ;
|
||||||
|
-- lin eat_V2 = mkV2 "" ;
|
||||||
|
-- lin egg_N = mkN "" ;
|
||||||
|
-- lin empty_A = mkA "" ;
|
||||||
|
-- lin enemy_N = mkN "" ;
|
||||||
|
-- lin eye_N = mkN "" ;
|
||||||
|
--
|
||||||
|
-- ----
|
||||||
|
-- -- F
|
||||||
|
--
|
||||||
|
-- lin factory_N = mkN "" ;
|
||||||
|
-- lin fall_V = mkV "" ;
|
||||||
|
-- lin far_Adv = mkA "" ;
|
||||||
|
-- lin fat_N = mkN "" ;
|
||||||
|
-- lin father_N2 = mkN "" ;
|
||||||
|
-- lin fear_V2 = mkV2 "" ;
|
||||||
|
-- lin fear_VS = mkVS "" ;
|
||||||
|
-- lin feather_N = mkN "" ;
|
||||||
|
-- lin fight_V2 = mkV2 "" ;
|
||||||
|
-- lin find_V2 = mkV2 "" ;
|
||||||
|
-- lin fingernail_N = mkN "" ;
|
||||||
|
-- lin fire_N = mkN "" ;
|
||||||
|
-- lin fish_N = mkN "" ;
|
||||||
|
-- lin float_V = mkV "" ;
|
||||||
|
-- lin floor_N = mkN "" ;
|
||||||
|
-- lin flow_V = mkV "" ;
|
||||||
|
-- lin flower_N = mkN "" ;
|
||||||
|
-- lin fly_V = mkV "" ;
|
||||||
|
-- lin fog_N = mkN "" ;
|
||||||
|
-- lin foot_N = mkN "" ;
|
||||||
|
-- lin forest_N = mkN "" ;
|
||||||
|
-- lin forget_V2 = mkV2 "" ;
|
||||||
|
-- lin freeze_V = mkV "" ;
|
||||||
|
-- lin fridge_N = mkN "" ;
|
||||||
|
-- lin friend_N = mkN "" ;
|
||||||
|
-- lin fruit_N = mkN "" ;
|
||||||
|
-- lin full_A = mkA "" ;
|
||||||
|
-- --lin fun_AV
|
||||||
|
|
||||||
|
----
|
||||||
|
-- G
|
||||||
|
|
||||||
|
-- lin garden_N = mkN "" ;
|
||||||
|
lin girl_N = mkN "gabadh" "gabdho" fem ;
|
||||||
|
-- lin give_V3 = mkV3 "" ;
|
||||||
|
-- lin glove_N = mkN "" ;
|
||||||
|
-- lin go_V = joan_V ;
|
||||||
|
-- lin gold_N = mkN "" ;
|
||||||
|
-- lin good_A = mkA "" ;
|
||||||
|
-- lin grammar_N = mkN "" ;
|
||||||
|
-- lin grass_N = mkN "" ;
|
||||||
|
-- lin green_A = mkA "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- H
|
||||||
|
|
||||||
|
-- lin hair_N = mkN "" ;
|
||||||
|
-- lin hand_N = mkN "" ;
|
||||||
|
-- lin harbour_N = mkN "" ;
|
||||||
|
-- lin hat_N = mkN "" ;
|
||||||
|
-- lin hate_V2 = mkV2 "" ;
|
||||||
|
-- lin head_N = mkN "" ;
|
||||||
|
-- lin hear_V2 = mkV2 "" ;
|
||||||
|
-- lin heart_N = mkN "" ;
|
||||||
|
-- lin heavy_A = mkA "" ;
|
||||||
|
-- lin hill_N = mkN "" ;
|
||||||
|
-- lin hit_V2 = mkV2 "" ;
|
||||||
|
-- lin hold_V2 = mkV2 "" ;
|
||||||
|
-- lin hope_VS = mkV "" ;
|
||||||
|
-- lin horn_N = mkN "" ;
|
||||||
|
-- lin horse_N = mkN "" ;
|
||||||
|
-- lin hot_A = mkA "" ;
|
||||||
|
lin house_N = mkN "aqal" ;
|
||||||
|
-- lin hunt_V2 = mkV2 "" ;
|
||||||
|
-- lin husband_N = mkN "" ;
|
||||||
|
|
||||||
|
--------
|
||||||
|
-- I - K
|
||||||
|
|
||||||
|
-- lin ice_N = mkN "" ;
|
||||||
|
-- lin industry_N = mkN "" ;
|
||||||
|
-- lin iron_N = mkN "" ;
|
||||||
|
-- lin john_PN = mkPN "Jon" ;
|
||||||
|
-- lin jump_V = mkV "" ;
|
||||||
|
-- lin kill_V2 = mkV2 "" ;
|
||||||
|
-- lin king_N = mkN "" ;
|
||||||
|
-- lin knee_N = mkN "" ;
|
||||||
|
-- lin know_V2 = mkV2 "" ;
|
||||||
|
-- lin know_VQ = mkVQ "" ;
|
||||||
|
-- lin know_VS = mkVS "" ;
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
-- L
|
||||||
|
|
||||||
|
-- lin lake_N = mkN "" ;
|
||||||
|
-- lin lamp_N = mkN "" ;
|
||||||
|
lin language_N = mkN "af" ;
|
||||||
|
-- lin laugh_V = mkV "" ;
|
||||||
|
-- lin leaf_N = mkN "" ;
|
||||||
|
-- lin learn_V2 = mkV2 "" ;
|
||||||
|
-- lin leather_N = mkN "" ;
|
||||||
|
-- lin leave_V2 = mkV2 "" ;
|
||||||
|
-- lin leg_N = mkN "" ;
|
||||||
|
-- lin lie_V = mkV "" ;
|
||||||
|
-- lin like_V2 = mkV2 "" ;
|
||||||
|
-- lin listen_V2 = mkV2 "" ;
|
||||||
|
-- lin live_V = mkV "" ;
|
||||||
|
-- lin liver_N = mkN "" ;
|
||||||
|
-- lin long_A = mkA "" ;
|
||||||
|
-- lin lose_V2 = mkV2 "" ;
|
||||||
|
-- lin louse_N = mkN "" ;
|
||||||
|
-- lin love_N = mkN "" ;
|
||||||
|
-- lin love_V2 = mkV2 "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- M
|
||||||
|
|
||||||
|
lin man_N = mkN "nin" ;
|
||||||
|
-- lin married_A2 = mkA "" ;
|
||||||
|
-- lin meat_N = mkN "" ;
|
||||||
|
-- lin milk_N = mkN "" ;
|
||||||
|
-- lin moon_N = mkN "" ;
|
||||||
|
-- lin mother_N2 = mkN "" ;
|
||||||
|
-- lin mountain_N = mkN "" ;
|
||||||
|
-- lin mouth_N = mkN "" ;
|
||||||
|
-- lin music_N = mkN "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- N
|
||||||
|
|
||||||
|
-- lin name_N = mkN "" ;
|
||||||
|
-- lin narrow_A = mkA "" ;
|
||||||
|
-- lin near_A = mkA "" ;
|
||||||
|
-- lin neck_N = mkN "" ;
|
||||||
|
-- lin new_A = mkA "" ;
|
||||||
|
-- lin newspaper_N = mkN "" ;
|
||||||
|
-- lin night_N = mkN "" ;
|
||||||
|
-- lin nose_N = mkN "" ;
|
||||||
|
-- lin now_Adv = mkA "" ;
|
||||||
|
-- lin number_N = mkN "" ;
|
||||||
|
--
|
||||||
|
-- --------
|
||||||
|
-- -- O - P
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- lin oil_N = mkN "" ;
|
||||||
|
-- lin old_A = mkA "" ;
|
||||||
|
-- lin open_V2 = mkV2 "" ;
|
||||||
|
-- lin paint_V2A = mkV2 "" ;
|
||||||
|
-- lin paper_N = mkN "" ;
|
||||||
|
-- lin paris_PN = mkPN "Paris" ;
|
||||||
|
-- lin peace_N = mkN "" ;
|
||||||
|
-- lin pen_N = mkN "" ;
|
||||||
|
-- lin person_N = mkN "" ;
|
||||||
|
-- lin planet_N = mkN "" ;
|
||||||
|
-- lin plastic_N = mkN "" ;
|
||||||
|
-- lin play_V = mkV "" ;
|
||||||
|
-- lin policeman_N = mkN "" ;
|
||||||
|
-- lin priest_N = mkN "" ;
|
||||||
|
-- lin pull_V2 = mkV2 "" ;
|
||||||
|
-- lin push_V2 = mkV2 "" ;
|
||||||
|
-- lin put_V2 = mkV2 "" ;
|
||||||
|
--
|
||||||
|
-- --------
|
||||||
|
-- -- Q - R
|
||||||
|
--
|
||||||
|
-- lin queen_N = mkN "" ;
|
||||||
|
-- lin question_N = mkN "" ;
|
||||||
|
-- lin radio_N = mkN "" ;
|
||||||
|
-- lin rain_N = mkN "" ;
|
||||||
|
-- lin rain_V0 = mkV "" ;
|
||||||
|
lin read_V2 = mkV2 "akhri" ;
|
||||||
|
-- lin ready_A = mkA "" ;
|
||||||
|
-- lin reason_N = mkN "" ;
|
||||||
|
-- lin red_A = mkA "" ;
|
||||||
|
-- lin religion_N = mkN "" ;
|
||||||
|
-- lin restaurant_N = mkN "" ;
|
||||||
|
-- lin river_N = mkN "" ;
|
||||||
|
-- lin road_N = mkN "" ;
|
||||||
|
-- lin rock_N = mkN "" ;
|
||||||
|
-- lin roof_N = mkN "" ;
|
||||||
|
-- lin root_N = mkN "" ;
|
||||||
|
-- lin rope_N = mkN "" ;
|
||||||
|
-- lin rotten_A = mkA "" ;
|
||||||
|
-- lin round_A = mkA "" ;
|
||||||
|
-- lin rub_V2 = mkV2 "" ;
|
||||||
|
-- lin rubber_N = mkN "" ;
|
||||||
|
-- lin rule_N = mkN "" ;
|
||||||
|
-- lin run_V = mkV "" ;
|
||||||
|
--
|
||||||
|
-- ----
|
||||||
|
-- -- S
|
||||||
|
--
|
||||||
|
-- lin salt_N = mkN "" ;
|
||||||
|
-- lin sand_N = mkN "" ;
|
||||||
|
-- lin say_VS = mkVS "" ;
|
||||||
|
-- lin school_N = mkN "" ;
|
||||||
|
-- lin science_N = mkN "" ;
|
||||||
|
-- lin scratch_V2 = mkV2 "" ;
|
||||||
|
-- lin sea_N = mkN "" ;
|
||||||
|
lin see_V2 = mkV2 "ark" ;
|
||||||
|
-- lin seed_N = mkN "" ;
|
||||||
|
-- lin seek_V2 = mkV2 "" ;
|
||||||
|
-- lin sell_V3 = mkV3 "" ;
|
||||||
|
-- lin send_V3 = mkV3 "" ;
|
||||||
|
-- lin sew_V = mkV "" ;
|
||||||
|
-- lin sharp_A = mkA "" ;
|
||||||
|
-- lin sheep_N = mkN "" ;
|
||||||
|
-- lin ship_N = mkN "" ;
|
||||||
|
-- lin shirt_N = mkN "" ;
|
||||||
|
-- lin shoe_N = mkN "" ;
|
||||||
|
-- lin shop_N = mkN "" ;
|
||||||
|
-- lin short_A = mkA "" ;
|
||||||
|
-- lin silver_N = mkN "" ;
|
||||||
|
-- lin sing_V = mkV "" ;
|
||||||
|
-- lin sister_N = mkN "" ;
|
||||||
|
-- lin sit_V = mkV "" ;
|
||||||
|
-- lin skin_N = mkN "" ;
|
||||||
|
-- lin sky_N = mkN "" ;
|
||||||
|
-- lin sleep_V = mkV "" ;
|
||||||
|
lin small_A = mkA "yar" ;
|
||||||
|
-- lin smell_V = mkV "" ;
|
||||||
|
-- lin smoke_N = mkN "" ;
|
||||||
|
-- lin smooth_A = mkA "" ;
|
||||||
|
-- lin snake_N = mkN "" ;
|
||||||
|
-- lin snow_N = mkN "" ;
|
||||||
|
-- lin sock_N = mkN "" ;
|
||||||
|
-- lin song_N = mkN "" ;
|
||||||
|
-- lin speak_V2 = mkV2 "" ;
|
||||||
|
-- lin spit_V = mkV "" ;
|
||||||
|
-- lin split_V2 = mkV2 "" ;
|
||||||
|
-- lin squeeze_V2 = mkV2 "" ;
|
||||||
|
-- lin stab_V2 = mkV2 "" ;
|
||||||
|
-- lin stand_V = mkV "" ;
|
||||||
|
-- lin star_N = mkN "" ;
|
||||||
|
-- lin steel_N = mkN "" ;
|
||||||
|
-- lin stick_N = mkN "" ;
|
||||||
|
-- lin stone_N = mkN "" ;
|
||||||
|
-- lin stop_V = mkV "" ;
|
||||||
|
-- lin stove_N = mkN "" ;
|
||||||
|
-- lin straight_A = mkA "" ;
|
||||||
|
-- lin student_N = mkN "" ;
|
||||||
|
-- lin stupid_A = mkA "" ;
|
||||||
|
-- lin suck_V2 = mkV2 "" ;
|
||||||
|
-- lin sun_N = mkN "" ;
|
||||||
|
-- lin swell_V = mkV "" ;
|
||||||
|
-- lin swim_V = mkV "" ;
|
||||||
|
|
||||||
|
----
|
||||||
|
-- T
|
||||||
|
|
||||||
|
|
||||||
|
-- lin table_N = mkN "" ;
|
||||||
|
-- lin tail_N = mkN "" ;
|
||||||
|
-- lin talk_V3 = mkV3 "" ;
|
||||||
|
lin teach_V2 = mkV2 "baray" ku ; -- I suppose this creates progressive forms? TODO implement all forms of verbs properly.
|
||||||
|
-- lin teacher_N = mkN "" ;
|
||||||
|
-- lin television_N = mkN "" ;
|
||||||
|
-- lin thick_A = mkA "" ;
|
||||||
|
-- lin thin_A = mkA "" ;
|
||||||
|
-- lin think_V = mkV "" ;
|
||||||
|
-- lin throw_V2 = mkV2 "" ;
|
||||||
|
-- lin tie_V2 = mkV2 "" ;
|
||||||
|
-- lin today_Adv = mkA "" ;
|
||||||
|
-- lin tongue_N = mkN "" ;
|
||||||
|
-- lin tooth_N = mkN "" ;
|
||||||
|
-- lin train_N = mkN "" ;
|
||||||
|
-- lin travel_V = mkV "" ;
|
||||||
|
-- lin tree_N = mkN "" ;
|
||||||
|
-- lin turn_V = mkV "" ;
|
||||||
|
|
||||||
|
--------
|
||||||
|
-- U - V
|
||||||
|
|
||||||
|
-- lin ugly_A = mkA "" ;
|
||||||
|
-- lin uncertain_A = mkA "" ;
|
||||||
|
-- lin understand_V2 = mkV2 "" ;
|
||||||
|
-- lin university_N = mkN "" ;
|
||||||
|
-- lin village_N = mkN "" ;
|
||||||
|
-- lin vomit_V = mkV2 "" ;
|
||||||
|
|
||||||
|
--------
|
||||||
|
-- W - Y
|
||||||
|
|
||||||
|
-- lin wait_V2 = mkV2 "" ;
|
||||||
|
-- lin walk_V = mkV "" ;
|
||||||
|
-- lin war_N = mkN "" ;
|
||||||
|
-- lin warm_A = mkA "" ;
|
||||||
|
-- lin wash_V2 = mkV2 "" ;
|
||||||
|
-- lin watch_V2 = mkV2 "" ;
|
||||||
|
-- lin water_N = mkN "" ;
|
||||||
|
-- lin wet_A = mkA "" ;
|
||||||
|
-- lin white_A = mkA "" ;
|
||||||
|
-- lin wide_A = mkA "" ;
|
||||||
|
-- lin wife_N = mkN "" ;
|
||||||
|
-- lin win_V2 = mkV2 "" ;
|
||||||
|
-- lin wind_N = mkN "" ;
|
||||||
|
-- lin window_N = mkN "" ;
|
||||||
|
-- lin wine_N = mkN "" ;
|
||||||
|
-- lin wing_N = mkN "" ;
|
||||||
|
-- lin wipe_V2 = mkV2 "" ;
|
||||||
|
lin woman_N = mkN "naag" fem ;
|
||||||
|
-- lin wonder_VQ = mkVQ "" ;
|
||||||
|
-- lin wood_N = mkN "" ;
|
||||||
|
-- lin worm_N = mkN "" ;
|
||||||
|
-- lin write_V2 = mkV2 "" ;
|
||||||
|
-- lin year_N = mkN "" ;
|
||||||
|
-- lin yellow_A = mkA "" ;
|
||||||
|
-- lin young_A = mkA "" ;
|
||||||
|
|
||||||
|
}
|
||||||
633
src/somali/MissingSom.gf
Normal file
633
src/somali/MissingSom.gf
Normal file
@@ -0,0 +1,633 @@
|
|||||||
|
resource MissingSom = open GrammarSom, SymbolSom, Prelude in {
|
||||||
|
|
||||||
|
-- temporary definitions to enable the compilation of RGL API
|
||||||
|
oper AdAP : AdA -> AP -> AP = notYet "AdAP" ;
|
||||||
|
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||||
|
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
|
||||||
|
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||||
|
oper AdVVPSlash : AdV -> VPSlash -> VPSlash = notYet "AdVVPSlash" ;
|
||||||
|
oper AddAdvQVP : QVP -> IAdv -> QVP = notYet "AddAdvQVP" ;
|
||||||
|
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
|
||||||
|
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
|
||||||
|
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
|
||||||
|
oper AdvAP : AP -> Adv -> AP = notYet "AdvAP" ;
|
||||||
|
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
||||||
|
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||||
|
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||||
|
oper AdvNP : NP -> Adv -> NP = notYet "AdvNP" ;
|
||||||
|
oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ;
|
||||||
|
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
||||||
|
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||||
|
oper AdvVP : VP -> Adv -> VP = notYet "AdvVP" ;
|
||||||
|
oper AdvVPSlash : VPSlash -> Adv -> VPSlash = notYet "AdvVPSlash" ;
|
||||||
|
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
||||||
|
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||||
|
oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ;
|
||||||
|
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
||||||
|
oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ;
|
||||||
|
oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ;
|
||||||
|
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
|
||||||
|
oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ;
|
||||||
|
oper BaseS : S -> S -> ListS = notYet "BaseS" ;
|
||||||
|
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||||
|
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||||
|
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||||
|
oper CompAdv : Adv -> Comp = notYet "CompAdv" ;
|
||||||
|
oper CompCN : CN -> Comp = notYet "CompCN" ;
|
||||||
|
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
||||||
|
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||||
|
oper CompNP : NP -> Comp = notYet "CompNP" ;
|
||||||
|
oper ComparA : A -> NP -> AP = notYet "ComparA" ;
|
||||||
|
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||||
|
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||||
|
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
|
||||||
|
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||||
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
|
oper ComplSlash : VPSlash -> NP -> VP = notYet "ComplSlash" ;
|
||||||
|
oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ;
|
||||||
|
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
||||||
|
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
|
||||||
|
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
|
||||||
|
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
|
||||||
|
oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ;
|
||||||
|
oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ;
|
||||||
|
oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ;
|
||||||
|
oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ;
|
||||||
|
oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ;
|
||||||
|
oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ;
|
||||||
|
oper ConjNP : Conj -> ListNP -> NP = notYet "ConjNP" ;
|
||||||
|
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
|
||||||
|
oper ConjS : Conj -> ListS -> S = notYet "ConjS" ;
|
||||||
|
oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ;
|
||||||
|
oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ;
|
||||||
|
oper ConsAdv : Adv -> ListAdv -> ListAdv = notYet "ConsAdv" ;
|
||||||
|
oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ;
|
||||||
|
oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ;
|
||||||
|
oper ConsNP : NP -> ListNP -> ListNP = notYet "ConsNP" ;
|
||||||
|
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
|
||||||
|
oper ConsS : S -> ListS -> ListS = notYet "ConsS" ;
|
||||||
|
oper CountNP : Det -> NP -> NP = notYet "CountNP" ;
|
||||||
|
oper DefArt : Quant = notYet "DefArt" ;
|
||||||
|
oper DefArt : Quant = notYet "DefArt" ;
|
||||||
|
oper DetCN : Det -> CN -> NP = notYet "DetCN" ;
|
||||||
|
oper DetDAP : Det -> DAP = notYet "DetDAP" ;
|
||||||
|
oper DetNP : Det -> NP = notYet "DetNP" ;
|
||||||
|
oper DetQuant : Quant -> Num -> Det = notYet "DetQuant" ;
|
||||||
|
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
|
||||||
|
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
|
||||||
|
oper EmbedS : S -> SC = notYet "EmbedS" ;
|
||||||
|
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
|
||||||
|
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||||
|
oper ExistIPAdv : IP -> Adv -> QCl = notYet "ExistIPAdv" ;
|
||||||
|
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
|
||||||
|
oper ExistNPAdv : NP -> Adv -> Cl = notYet "ExistNPAdv" ;
|
||||||
|
oper ExtAdvS : Adv -> S -> S = notYet "ExtAdvS" ;
|
||||||
|
oper ExtAdvVP : VP -> Adv -> VP = notYet "ExtAdvVP" ;
|
||||||
|
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||||
|
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
|
||||||
|
oper IdRP : RP = notYet "IdRP" ;
|
||||||
|
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
|
||||||
|
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||||
|
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||||
|
oper ImpP3 : NP -> VP -> Utt = notYet "ImpP3" ;
|
||||||
|
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||||
|
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||||
|
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||||
|
oper IndefArt : Quant = notYet "IndefArt" ;
|
||||||
|
oper IndefArt : Quant = notYet "IndefArt" ;
|
||||||
|
oper NumCard : Card -> Num = notYet "NumCard" ;
|
||||||
|
oper NumDigits : Digits -> Card = notYet "NumDigits" ;
|
||||||
|
oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ;
|
||||||
|
oper NumPl : Num = notYet "NumPl" ;
|
||||||
|
oper NumSg : Num = notYet "NumSg" ;
|
||||||
|
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||||
|
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||||
|
oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ;
|
||||||
|
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
|
||||||
|
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||||
|
oper PartNP : CN -> NP -> CN = notYet "PartNP" ;
|
||||||
|
oper PassV2 : V2 -> VP = notYet "PassV2" ;
|
||||||
|
oper PositAdAAdj : A -> AdA = notYet "PositAdAAdj" ;
|
||||||
|
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
||||||
|
oper PossNP : CN -> NP -> CN = notYet "PossNP" ;
|
||||||
|
oper PossPron : Pron -> Quant = notYet "PossPron" ;
|
||||||
|
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||||
|
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
|
||||||
|
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||||
|
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||||
|
oper QuestCl : Cl -> QCl = notYet "QuestCl" ;
|
||||||
|
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
||||||
|
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
||||||
|
oper QuestQVP : IP -> QVP -> QCl = notYet "QuestQVP" ;
|
||||||
|
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
||||||
|
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
|
||||||
|
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||||
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
|
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
||||||
|
oper RelCl : Cl -> RCl = notYet "RelCl" ;
|
||||||
|
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
|
||||||
|
oper RelS : S -> RS -> S = notYet "RelS" ;
|
||||||
|
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
|
||||||
|
oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
||||||
|
oper SSubjS : S -> Subj -> S -> S = notYet "SSubjS" ;
|
||||||
|
oper SelfAdVVP : VP -> VP = notYet "SelfAdVVP" ;
|
||||||
|
oper SelfAdvVP : VP -> VP = notYet "SelfAdvVP" ;
|
||||||
|
oper SelfNP : NP -> NP = notYet "SelfNP" ;
|
||||||
|
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
||||||
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
|
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
||||||
|
oper Slash3V3 : V3 -> NP -> VPSlash = notYet "Slash3V3" ;
|
||||||
|
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
||||||
|
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||||
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
|
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||||
|
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||||
|
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||||
|
oper SlashV2a : V2 -> VPSlash = notYet "SlashV2a" ;
|
||||||
|
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
|
||||||
|
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||||
|
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||||
|
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||||
|
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||||
|
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
|
||||||
|
oper UseA2 : A2 -> AP = notYet "UseA2" ;
|
||||||
|
oper UseComparA : A -> AP = notYet "UseComparA" ;
|
||||||
|
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
||||||
|
oper UsePN : PN -> NP = notYet "UsePN" ;
|
||||||
|
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
|
||||||
|
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
||||||
|
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||||
|
oper UseV : V -> VP = notYet "UseV" ;
|
||||||
|
oper UttCard : Card -> Utt = notYet "UttCard" ;
|
||||||
|
oper UttIAdv : IAdv -> Utt = notYet "UttIAdv" ;
|
||||||
|
oper UttIP : IP -> Utt = notYet "UttIP" ;
|
||||||
|
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
||||||
|
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
||||||
|
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
|
||||||
|
oper UttInterj : Interj -> Utt = notYet "UttInterj" ;
|
||||||
|
oper UttQS : QS -> Utt = notYet "UttQS" ;
|
||||||
|
oper VPSlashPrep : VP -> Prep -> VPSlash = notYet "VPSlashPrep" ;
|
||||||
|
oper above_Prep : Prep = notYet "above_Prep" ;
|
||||||
|
oper active2passive : Cl -> Cl = notYet "active2passive" ;
|
||||||
|
oper add_V3 : V3 = notYet "add_V3" ;
|
||||||
|
oper after_Prep : Prep = notYet "after_Prep" ;
|
||||||
|
oper airplane_N : N = notYet "airplane_N" ;
|
||||||
|
oper alas_Interj : Interj = notYet "alas_Interj" ;
|
||||||
|
oper all_Predet : Predet = notYet "all_Predet" ;
|
||||||
|
oper almost_AdA : AdA = notYet "almost_AdA" ;
|
||||||
|
oper almost_AdN : AdN = notYet "almost_AdN" ;
|
||||||
|
oper already_Adv : Adv = notYet "already_Adv" ;
|
||||||
|
oper although_Subj : Subj = notYet "although_Subj" ;
|
||||||
|
oper always_AdV : AdV = notYet "always_AdV" ;
|
||||||
|
oper answer_V2S : V2S = notYet "answer_V2S" ;
|
||||||
|
oper apartment_N : N = notYet "apartment_N" ;
|
||||||
|
oper apple_N : N = notYet "apple_N" ;
|
||||||
|
oper art_N : N = notYet "art_N" ;
|
||||||
|
oper as_CAdv : CAdv = notYet "as_CAdv" ;
|
||||||
|
oper ashes_N : N = notYet "ashes_N" ;
|
||||||
|
oper ask_V2Q : V2Q = notYet "ask_V2Q" ;
|
||||||
|
oper at_least_AdN : AdN = notYet "at_least_AdN" ;
|
||||||
|
oper at_most_AdN : AdN = notYet "at_most_AdN" ;
|
||||||
|
oper baby_N : N = notYet "baby_N" ;
|
||||||
|
oper back_N : N = notYet "back_N" ;
|
||||||
|
oper bad_A : A = notYet "bad_A" ;
|
||||||
|
oper bank_N : N = notYet "bank_N" ;
|
||||||
|
oper bark_N : N = notYet "bark_N" ;
|
||||||
|
oper beautiful_A : A = notYet "beautiful_A" ;
|
||||||
|
oper because_Subj : Subj = notYet "because_Subj" ;
|
||||||
|
oper become_VA : VA = notYet "become_VA" ;
|
||||||
|
oper beer_N : N = notYet "beer_N" ;
|
||||||
|
oper before_Prep : Prep = notYet "before_Prep" ;
|
||||||
|
oper beg_V2V : V2V = notYet "beg_V2V" ;
|
||||||
|
oper behind_Prep : Prep = notYet "behind_Prep" ;
|
||||||
|
oper belly_N : N = notYet "belly_N" ;
|
||||||
|
oper between_Prep : Prep = notYet "between_Prep" ;
|
||||||
|
oper bike_N : N = notYet "bike_N" ;
|
||||||
|
oper bite_V2 : V2 = notYet "bite_V2" ;
|
||||||
|
oper black_A : A = notYet "black_A" ;
|
||||||
|
oper blood_N : N = notYet "blood_N" ;
|
||||||
|
oper blow_V : V = notYet "blow_V" ;
|
||||||
|
oper blue_A : A = notYet "blue_A" ;
|
||||||
|
oper boat_N : N = notYet "boat_N" ;
|
||||||
|
oper bone_N : N = notYet "bone_N" ;
|
||||||
|
oper boot_N : N = notYet "boot_N" ;
|
||||||
|
oper boss_N : N = notYet "boss_N" ;
|
||||||
|
oper both7and_DConj : Conj = notYet "both7and_DConj" ;
|
||||||
|
oper bottle_of_CN : NP -> CN = notYet "bottle_of_CN" ;
|
||||||
|
oper break_V2 : V2 = notYet "break_V2" ;
|
||||||
|
oper breast_N : N = notYet "breast_N" ;
|
||||||
|
oper breathe_V : V = notYet "breathe_V" ;
|
||||||
|
oper broad_A : A = notYet "broad_A" ;
|
||||||
|
oper brother_N2 : N2 = notYet "brother_N2" ;
|
||||||
|
oper brown_A : A = notYet "brown_A" ;
|
||||||
|
oper burn_V : V = notYet "burn_V" ;
|
||||||
|
oper but_PConj : PConj = notYet "but_PConj" ;
|
||||||
|
oper butter_N : N = notYet "butter_N" ;
|
||||||
|
oper buy_V2 : V2 = notYet "buy_V2" ;
|
||||||
|
oper by8agent_Prep : Prep = notYet "by8agent_Prep" ;
|
||||||
|
oper by8means_Prep : Prep = notYet "by8means_Prep" ;
|
||||||
|
oper camera_N : N = notYet "camera_N" ;
|
||||||
|
oper can8know_VV : VV = notYet "can8know_VV" ;
|
||||||
|
oper can_VV : VV = notYet "can_VV" ;
|
||||||
|
oper cap_N : N = notYet "cap_N" ;
|
||||||
|
oper carpet_N : N = notYet "carpet_N" ;
|
||||||
|
oper ceiling_N : N = notYet "ceiling_N" ;
|
||||||
|
oper chair_N : N = notYet "chair_N" ;
|
||||||
|
oper cheese_N : N = notYet "cheese_N" ;
|
||||||
|
oper child_N : N = notYet "child_N" ;
|
||||||
|
oper church_N : N = notYet "church_N" ;
|
||||||
|
oper clean_A : A = notYet "clean_A" ;
|
||||||
|
oper clever_A : A = notYet "clever_A" ;
|
||||||
|
oper close_V2 : V2 = notYet "close_V2" ;
|
||||||
|
oper cloud_N : N = notYet "cloud_N" ;
|
||||||
|
oper coat_N : N = notYet "coat_N" ;
|
||||||
|
oper cold_A : A = notYet "cold_A" ;
|
||||||
|
oper come_V : V = notYet "come_V" ;
|
||||||
|
oper computer_N : N = notYet "computer_N" ;
|
||||||
|
oper correct_A : A = notYet "correct_A" ;
|
||||||
|
oper count_V2 : V2 = notYet "count_V2" ;
|
||||||
|
oper country_N : N = notYet "country_N" ;
|
||||||
|
oper cousin_N : N = notYet "cousin_N" ;
|
||||||
|
oper cow_N : N = notYet "cow_N" ;
|
||||||
|
oper cup_of_CN : NP -> CN = notYet "cup_of_CN" ;
|
||||||
|
oper cut_V2 : V2 = notYet "cut_V2" ;
|
||||||
|
oper day_N : N = notYet "day_N" ;
|
||||||
|
oper dconcat : Digits -> Digits -> Digits = notYet "dconcat" ;
|
||||||
|
oper die_V : V = notYet "die_V" ;
|
||||||
|
oper dig_V : V = notYet "dig_V" ;
|
||||||
|
oper digits2num : Digits -> Numeral = notYet "digits2num" ;
|
||||||
|
oper digits2numeral : Card -> Card = notYet "digits2numeral" ;
|
||||||
|
oper dirty_A : A = notYet "dirty_A" ;
|
||||||
|
oper distance_N3 : N3 = notYet "distance_N3" ;
|
||||||
|
oper dn : Dig -> Digit = notYet "dn" ;
|
||||||
|
oper dn10 : Dig -> Sub10 = notYet "dn10" ;
|
||||||
|
oper dn100 : Dig -> Dig -> Sub100 = notYet "dn100" ;
|
||||||
|
oper dn1000 : Dig -> Dig -> Dig -> Sub1000 = notYet "dn1000" ;
|
||||||
|
oper dn1000000a : Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000a" ;
|
||||||
|
oper dn1000000b : Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000b" ;
|
||||||
|
oper dn1000000c : Dig -> Dig -> Dig -> Dig -> Dig -> Dig -> Sub1000000 = notYet "dn1000000c" ;
|
||||||
|
oper do_V2 : V2 = notYet "do_V2" ;
|
||||||
|
oper doctor_N : N = notYet "doctor_N" ;
|
||||||
|
oper dog_N : N = notYet "dog_N" ;
|
||||||
|
oper door_N : N = notYet "door_N" ;
|
||||||
|
oper drink_V2 : V2 = notYet "drink_V2" ;
|
||||||
|
oper dry_A : A = notYet "dry_A" ;
|
||||||
|
oper dull_A : A = notYet "dull_A" ;
|
||||||
|
oper during_Prep : Prep = notYet "during_Prep" ;
|
||||||
|
oper dust_N : N = notYet "dust_N" ;
|
||||||
|
oper ear_N : N = notYet "ear_N" ;
|
||||||
|
oper earth_N : N = notYet "earth_N" ;
|
||||||
|
oper easy_A2V : A2 = notYet "easy_A2V" ;
|
||||||
|
oper eat_V2 : V2 = notYet "eat_V2" ;
|
||||||
|
oper egg_N : N = notYet "egg_N" ;
|
||||||
|
oper either7or_DConj : Conj = notYet "either7or_DConj" ;
|
||||||
|
oper empty_A : A = notYet "empty_A" ;
|
||||||
|
oper enemy_N : N = notYet "enemy_N" ;
|
||||||
|
oper every_Det : Det = notYet "every_Det" ;
|
||||||
|
oper everybody_NP : NP = notYet "everybody_NP" ;
|
||||||
|
oper everything_NP : NP = notYet "everything_NP" ;
|
||||||
|
oper everywhere_Adv : Adv = notYet "everywhere_Adv" ;
|
||||||
|
oper except_Prep : Prep = notYet "except_Prep" ;
|
||||||
|
oper eye_N : N = notYet "eye_N" ;
|
||||||
|
oper factory_N : N = notYet "factory_N" ;
|
||||||
|
oper fall_V : V = notYet "fall_V" ;
|
||||||
|
oper far_Adv : Adv = notYet "far_Adv" ;
|
||||||
|
oper fat_N : N = notYet "fat_N" ;
|
||||||
|
oper father_N2 : N2 = notYet "father_N2" ;
|
||||||
|
oper fear_V2 : V2 = notYet "fear_V2" ;
|
||||||
|
oper fear_VS : VS = notYet "fear_VS" ;
|
||||||
|
oper feather_N : N = notYet "feather_N" ;
|
||||||
|
oper few_Det : Det = notYet "few_Det" ;
|
||||||
|
oper few_X_short_of_Y : NP -> CN -> CN -> S = notYet "few_X_short_of_Y" ;
|
||||||
|
oper fight_V2 : V2 = notYet "fight_V2" ;
|
||||||
|
oper find_V2 : V2 = notYet "find_V2" ;
|
||||||
|
oper fingernail_N : N = notYet "fingernail_N" ;
|
||||||
|
oper fire_N : N = notYet "fire_N" ;
|
||||||
|
oper fish_N : N = notYet "fish_N" ;
|
||||||
|
oper float_V : V = notYet "float_V" ;
|
||||||
|
oper floor_N : N = notYet "floor_N" ;
|
||||||
|
oper flow_V : V = notYet "flow_V" ;
|
||||||
|
oper flower_N : N = notYet "flower_N" ;
|
||||||
|
oper fly_V : V = notYet "fly_V" ;
|
||||||
|
oper fog_N : N = notYet "fog_N" ;
|
||||||
|
oper foot_N : N = notYet "foot_N" ;
|
||||||
|
oper for_Prep : Prep = notYet "for_Prep" ;
|
||||||
|
oper forest_N : N = notYet "forest_N" ;
|
||||||
|
oper forget_V2 : V2 = notYet "forget_V2" ;
|
||||||
|
oper freeze_V : V = notYet "freeze_V" ;
|
||||||
|
oper fridge_N : N = notYet "fridge_N" ;
|
||||||
|
oper friend_N : N = notYet "friend_N" ;
|
||||||
|
oper from_Prep : Prep = notYet "from_Prep" ;
|
||||||
|
oper fruit_N : N = notYet "fruit_N" ;
|
||||||
|
oper full_A : A = notYet "full_A" ;
|
||||||
|
oper fun_AV : A = notYet "fun_AV" ;
|
||||||
|
oper garden_N : N = notYet "garden_N" ;
|
||||||
|
oper give_V3 : V3 = notYet "give_V3" ;
|
||||||
|
oper glass_of_CN : NP -> CN = notYet "glass_of_CN" ;
|
||||||
|
oper glove_N : N = notYet "glove_N" ;
|
||||||
|
oper go_V : V = notYet "go_V" ;
|
||||||
|
oper gold_N : N = notYet "gold_N" ;
|
||||||
|
oper good_A : A = notYet "good_A" ;
|
||||||
|
oper grammar_N : N = notYet "grammar_N" ;
|
||||||
|
oper grass_N : N = notYet "grass_N" ;
|
||||||
|
oper green_A : A = notYet "green_A" ;
|
||||||
|
oper guts_N : N = notYet "guts_N" ;
|
||||||
|
oper hair_N : N = notYet "hair_N" ;
|
||||||
|
oper hand_N : N = notYet "hand_N" ;
|
||||||
|
oper harbour_N : N = notYet "harbour_N" ;
|
||||||
|
oper has_age_VP : Card -> VP = notYet "has_age_VP" ;
|
||||||
|
oper hat_N : N = notYet "hat_N" ;
|
||||||
|
oper hate_V2 : V2 = notYet "hate_V2" ;
|
||||||
|
oper have_name_Cl : NP -> NP -> Cl = notYet "have_name_Cl" ;
|
||||||
|
oper head_N : N = notYet "head_N" ;
|
||||||
|
oper hear_V2 : V2 = notYet "hear_V2" ;
|
||||||
|
oper heart_N : N = notYet "heart_N" ;
|
||||||
|
oper heavy_A : A = notYet "heavy_A" ;
|
||||||
|
oper here7from_Adv : Adv = notYet "here7from_Adv" ;
|
||||||
|
oper here7to_Adv : Adv = notYet "here7to_Adv" ;
|
||||||
|
oper here_Adv : Adv = notYet "here_Adv" ;
|
||||||
|
oper hill_N : N = notYet "hill_N" ;
|
||||||
|
oper hit_V2 : V2 = notYet "hit_V2" ;
|
||||||
|
oper hold_V2 : V2 = notYet "hold_V2" ;
|
||||||
|
oper hope_VS : VS = notYet "hope_VS" ;
|
||||||
|
oper horn_N : N = notYet "horn_N" ;
|
||||||
|
oper horse_N : N = notYet "horse_N" ;
|
||||||
|
oper hot_A : A = notYet "hot_A" ;
|
||||||
|
oper how8many_IDet : IDet = notYet "how8many_IDet" ;
|
||||||
|
oper how8much_IAdv : IAdv = notYet "how8much_IAdv" ;
|
||||||
|
oper how_IAdv : IAdv = notYet "how_IAdv" ;
|
||||||
|
oper how_far_QCl : NP -> QCl = notYet "how_far_QCl" ;
|
||||||
|
oper how_old_QCl : NP -> QCl = notYet "how_old_QCl" ;
|
||||||
|
oper hungry_VP : VP = notYet "hungry_VP" ;
|
||||||
|
oper hunt_V2 : V2 = notYet "hunt_V2" ;
|
||||||
|
oper husband_N : N = notYet "husband_N" ;
|
||||||
|
oper ice_N : N = notYet "ice_N" ;
|
||||||
|
oper if_Subj : Subj = notYet "if_Subj" ;
|
||||||
|
oper if_then_Conj : Conj = notYet "if_then_Conj" ;
|
||||||
|
oper ill_VP : VP = notYet "ill_VP" ;
|
||||||
|
oper important_A : A = notYet "important_A" ;
|
||||||
|
oper in8front_Prep : Prep = notYet "in8front_Prep" ;
|
||||||
|
oper industry_N : N = notYet "industry_N" ;
|
||||||
|
oper iron_N : N = notYet "iron_N" ;
|
||||||
|
oper is_right_VP : VP = notYet "is_right_VP" ;
|
||||||
|
oper is_wrong_VP : VP = notYet "is_wrong_VP" ;
|
||||||
|
oper it_Pron : Pron = notYet "it_Pron" ;
|
||||||
|
oper john_PN : PN = notYet "john_PN" ;
|
||||||
|
oper jump_V : V = notYet "jump_V" ;
|
||||||
|
oper kill_V2 : V2 = notYet "kill_V2" ;
|
||||||
|
oper king_N : N = notYet "king_N" ;
|
||||||
|
oper knee_N : N = notYet "knee_N" ;
|
||||||
|
oper know_V2 : V2 = notYet "know_V2" ;
|
||||||
|
oper know_VQ : VQ = notYet "know_VQ" ;
|
||||||
|
oper know_VS : VS = notYet "know_VS" ;
|
||||||
|
oper lake_N : N = notYet "lake_N" ;
|
||||||
|
oper lamp_N : N = notYet "lamp_N" ;
|
||||||
|
oper laugh_V : V = notYet "laugh_V" ;
|
||||||
|
oper leaf_N : N = notYet "leaf_N" ;
|
||||||
|
oper learn_V2 : V2 = notYet "learn_V2" ;
|
||||||
|
oper leather_N : N = notYet "leather_N" ;
|
||||||
|
oper leave_V2 : V2 = notYet "leave_V2" ;
|
||||||
|
oper left_Ord : Ord = notYet "left_Ord" ;
|
||||||
|
oper leg_N : N = notYet "leg_N" ;
|
||||||
|
oper less_CAdv : CAdv = notYet "less_CAdv" ;
|
||||||
|
oper lie_V : V = notYet "lie_V" ;
|
||||||
|
oper like_V2 : V2 = notYet "like_V2" ;
|
||||||
|
oper listen_V2 : V2 = notYet "listen_V2" ;
|
||||||
|
oper live_V : V = notYet "live_V" ;
|
||||||
|
oper liver_N : N = notYet "liver_N" ;
|
||||||
|
oper long_A : A = notYet "long_A" ;
|
||||||
|
oper lose_V2 : V2 = notYet "lose_V2" ;
|
||||||
|
oper louse_N : N = notYet "louse_N" ;
|
||||||
|
oper love_N : N = notYet "love_N" ;
|
||||||
|
oper love_V2 : V2 = notYet "love_V2" ;
|
||||||
|
oper many_Det : Det = notYet "many_Det" ;
|
||||||
|
oper married_A2 : A2 = notYet "married_A2" ;
|
||||||
|
oper married_Cl : NP -> NP -> Cl = notYet "married_Cl" ;
|
||||||
|
oper meat_N : N = notYet "meat_N" ;
|
||||||
|
oper milk_N : N = notYet "milk_N" ;
|
||||||
|
oper moon_N : N = notYet "moon_N" ;
|
||||||
|
oper more_CAdv : CAdv = notYet "more_CAdv" ;
|
||||||
|
oper most_Predet : Predet = notYet "most_Predet" ;
|
||||||
|
oper mother_N2 : N2 = notYet "mother_N2" ;
|
||||||
|
oper mountain_N : N = notYet "mountain_N" ;
|
||||||
|
oper mouth_N : N = notYet "mouth_N" ;
|
||||||
|
oper much_Det : Det = notYet "much_Det" ;
|
||||||
|
oper music_N : N = notYet "music_N" ;
|
||||||
|
oper must_VV : VV = notYet "must_VV" ;
|
||||||
|
oper n_units_AP : Card -> CN -> A -> AP = notYet "n_units_AP" ;
|
||||||
|
oper n_units_of_NP : Card -> CN -> NP -> NP = notYet "n_units_of_NP" ;
|
||||||
|
oper name_N : N = notYet "name_N" ;
|
||||||
|
oper narrow_A : A = notYet "narrow_A" ;
|
||||||
|
oper nd : Digit -> Dig = notYet "nd" ;
|
||||||
|
oper nd10 : Sub10 -> Digits = notYet "nd10" ;
|
||||||
|
oper nd100 : Sub100 -> Digits = notYet "nd100" ;
|
||||||
|
oper nd1000 : Sub1000 -> Digits = notYet "nd1000" ;
|
||||||
|
oper nd1000000 : Sub1000000 -> Digits = notYet "nd1000000" ;
|
||||||
|
oper near_A : A = notYet "near_A" ;
|
||||||
|
oper neck_N : N = notYet "neck_N" ;
|
||||||
|
oper new_A : A = notYet "new_A" ;
|
||||||
|
oper newspaper_N : N = notYet "newspaper_N" ;
|
||||||
|
oper night_N : N = notYet "night_N" ;
|
||||||
|
oper no_Quant : Quant = notYet "no_Quant" ;
|
||||||
|
oper nobody_NP : NP = notYet "nobody_NP" ;
|
||||||
|
oper nose_N : N = notYet "nose_N" ;
|
||||||
|
oper not_Predet : Predet = notYet "not_Predet" ;
|
||||||
|
oper nothing_NP : NP = notYet "nothing_NP" ;
|
||||||
|
oper now_Adv : Adv = notYet "now_Adv" ;
|
||||||
|
oper num2digits : Numeral -> Digits = notYet "num2digits" ;
|
||||||
|
oper number_N : N = notYet "number_N" ;
|
||||||
|
oper oil_N : N = notYet "oil_N" ;
|
||||||
|
oper old_A : A = notYet "old_A" ;
|
||||||
|
oper only_Predet : Predet = notYet "only_Predet" ;
|
||||||
|
oper open_V2 : V2 = notYet "open_V2" ;
|
||||||
|
oper otherwise_PConj : PConj = notYet "otherwise_PConj" ;
|
||||||
|
oper paint_V2A : V2A = notYet "paint_V2A" ;
|
||||||
|
oper paper_N : N = notYet "paper_N" ;
|
||||||
|
oper paris_PN : PN = notYet "paris_PN" ;
|
||||||
|
oper part_Prep : Prep = notYet "part_Prep" ;
|
||||||
|
oper peace_N : N = notYet "peace_N" ;
|
||||||
|
oper pen_N : N = notYet "pen_N" ;
|
||||||
|
oper person_N : N = notYet "person_N" ;
|
||||||
|
oper planet_N : N = notYet "planet_N" ;
|
||||||
|
oper plastic_N : N = notYet "plastic_N" ;
|
||||||
|
oper play_V : V = notYet "play_V" ;
|
||||||
|
oper play_V2 : V2 = notYet "play_V2" ;
|
||||||
|
oper please_Voc : Voc = notYet "please_Voc" ;
|
||||||
|
oper policeman_N : N = notYet "policeman_N" ;
|
||||||
|
oper possess_Prep : Prep = notYet "possess_Prep" ;
|
||||||
|
oper priest_N : N = notYet "priest_N" ;
|
||||||
|
oper probable_AS : A = notYet "probable_AS" ;
|
||||||
|
oper pull_V2 : V2 = notYet "pull_V2" ;
|
||||||
|
oper push_V2 : V2 = notYet "push_V2" ;
|
||||||
|
oper put_V2 : V2 = notYet "put_V2" ;
|
||||||
|
oper queen_N : N = notYet "queen_N" ;
|
||||||
|
oper question_N : N = notYet "question_N" ;
|
||||||
|
oper quite_Adv : AdA = notYet "quite_Adv" ;
|
||||||
|
oper radio_N : N = notYet "radio_N" ;
|
||||||
|
oper rain_N : N = notYet "rain_N" ;
|
||||||
|
oper rain_V0 : V = notYet "rain_V0" ;
|
||||||
|
oper ready_A : A = notYet "ready_A" ;
|
||||||
|
oper ready_VP : VP = notYet "ready_VP" ;
|
||||||
|
oper reason_N : N = notYet "reason_N" ;
|
||||||
|
oper red_A : A = notYet "red_A" ;
|
||||||
|
oper religion_N : N = notYet "religion_N" ;
|
||||||
|
oper restaurant_N : N = notYet "restaurant_N" ;
|
||||||
|
oper right_Ord : Ord = notYet "right_Ord" ;
|
||||||
|
oper river_N : N = notYet "river_N" ;
|
||||||
|
oper road_N : N = notYet "road_N" ;
|
||||||
|
oper rock_N : N = notYet "rock_N" ;
|
||||||
|
oper roof_N : N = notYet "roof_N" ;
|
||||||
|
oper root_N : N = notYet "root_N" ;
|
||||||
|
oper rope_N : N = notYet "rope_N" ;
|
||||||
|
oper rotten_A : A = notYet "rotten_A" ;
|
||||||
|
oper round_A : A = notYet "round_A" ;
|
||||||
|
oper rub_V2 : V2 = notYet "rub_V2" ;
|
||||||
|
oper rubber_N : N = notYet "rubber_N" ;
|
||||||
|
oper rule_N : N = notYet "rule_N" ;
|
||||||
|
oper run_V : V = notYet "run_V" ;
|
||||||
|
oper salt_N : N = notYet "salt_N" ;
|
||||||
|
oper sand_N : N = notYet "sand_N" ;
|
||||||
|
oper say_VS : VS = notYet "say_VS" ;
|
||||||
|
oper scared_VP : VP = notYet "scared_VP" ;
|
||||||
|
oper school_N : N = notYet "school_N" ;
|
||||||
|
oper science_N : N = notYet "science_N" ;
|
||||||
|
oper scratch_V2 : V2 = notYet "scratch_V2" ;
|
||||||
|
oper sea_N : N = notYet "sea_N" ;
|
||||||
|
oper seed_N : N = notYet "seed_N" ;
|
||||||
|
oper seek_V2 : V2 = notYet "seek_V2" ;
|
||||||
|
oper sell_V3 : V3 = notYet "sell_V3" ;
|
||||||
|
oper send_V3 : V3 = notYet "send_V3" ;
|
||||||
|
oper sew_V : V = notYet "sew_V" ;
|
||||||
|
oper sharp_A : A = notYet "sharp_A" ;
|
||||||
|
oper sheep_N : N = notYet "sheep_N" ;
|
||||||
|
oper ship_N : N = notYet "ship_N" ;
|
||||||
|
oper shirt_N : N = notYet "shirt_N" ;
|
||||||
|
oper shoe_N : N = notYet "shoe_N" ;
|
||||||
|
oper shop_N : N = notYet "shop_N" ;
|
||||||
|
oper short_A : A = notYet "short_A" ;
|
||||||
|
oper silver_N : N = notYet "silver_N" ;
|
||||||
|
oper sing_V : V = notYet "sing_V" ;
|
||||||
|
oper sister_N : N = notYet "sister_N" ;
|
||||||
|
oper sit_V : V = notYet "sit_V" ;
|
||||||
|
oper skin_N : N = notYet "skin_N" ;
|
||||||
|
oper sky_N : N = notYet "sky_N" ;
|
||||||
|
oper sleep_V : V = notYet "sleep_V" ;
|
||||||
|
oper smell_V : V = notYet "smell_V" ;
|
||||||
|
oper smoke_N : N = notYet "smoke_N" ;
|
||||||
|
oper smooth_A : A = notYet "smooth_A" ;
|
||||||
|
oper snake_N : N = notYet "snake_N" ;
|
||||||
|
oper snow_N : N = notYet "snow_N" ;
|
||||||
|
oper so_AdA : AdA = notYet "so_AdA" ;
|
||||||
|
oper sock_N : N = notYet "sock_N" ;
|
||||||
|
oper somePl_Det : Det = notYet "somePl_Det" ;
|
||||||
|
oper someSg_Det : Det = notYet "someSg_Det" ;
|
||||||
|
oper somebody_NP : NP = notYet "somebody_NP" ;
|
||||||
|
oper something_NP : NP = notYet "something_NP" ;
|
||||||
|
oper somewhere_Adv : Adv = notYet "somewhere_Adv" ;
|
||||||
|
oper song_N : N = notYet "song_N" ;
|
||||||
|
oper speak_V2 : V2 = notYet "speak_V2" ;
|
||||||
|
oper spit_V : V = notYet "spit_V" ;
|
||||||
|
oper split_V2 : V2 = notYet "split_V2" ;
|
||||||
|
oper squeeze_V2 : V2 = notYet "squeeze_V2" ;
|
||||||
|
oper stab_V2 : V2 = notYet "stab_V2" ;
|
||||||
|
oper stand_V : V = notYet "stand_V" ;
|
||||||
|
oper star_N : N = notYet "star_N" ;
|
||||||
|
oper steel_N : N = notYet "steel_N" ;
|
||||||
|
oper stick_N : N = notYet "stick_N" ;
|
||||||
|
oper stone_N : N = notYet "stone_N" ;
|
||||||
|
oper stop_V : V = notYet "stop_V" ;
|
||||||
|
oper stove_N : N = notYet "stove_N" ;
|
||||||
|
oper straight_A : A = notYet "straight_A" ;
|
||||||
|
oper student_N : N = notYet "student_N" ;
|
||||||
|
oper stupid_A : A = notYet "stupid_A" ;
|
||||||
|
oper suck_V2 : V2 = notYet "suck_V2" ;
|
||||||
|
oper sun_N : N = notYet "sun_N" ;
|
||||||
|
oper swell_V : V = notYet "swell_V" ;
|
||||||
|
oper swim_V : V = notYet "swim_V" ;
|
||||||
|
oper switch8off_V2 : V2 = notYet "switch8off_V2" ;
|
||||||
|
oper switch8on_V2 : V2 = notYet "switch8on_V2" ;
|
||||||
|
oper table_N : N = notYet "table_N" ;
|
||||||
|
oper tail_N : N = notYet "tail_N" ;
|
||||||
|
oper talk_V3 : V3 = notYet "talk_V3" ;
|
||||||
|
oper teacher_N : N = notYet "teacher_N" ;
|
||||||
|
oper television_N : N = notYet "television_N" ;
|
||||||
|
oper that_Quant : Quant = notYet "that_Quant" ;
|
||||||
|
oper that_Subj : Subj = notYet "that_Subj" ;
|
||||||
|
oper there7from_Adv : Adv = notYet "there7from_Adv" ;
|
||||||
|
oper there7to_Adv : Adv = notYet "there7to_Adv" ;
|
||||||
|
oper there_Adv : Adv = notYet "there_Adv" ;
|
||||||
|
oper therefore_PConj : PConj = notYet "therefore_PConj" ;
|
||||||
|
oper thick_A : A = notYet "thick_A" ;
|
||||||
|
oper thin_A : A = notYet "thin_A" ;
|
||||||
|
oper think_V : V = notYet "think_V" ;
|
||||||
|
oper thirsty_VP : VP = notYet "thirsty_VP" ;
|
||||||
|
oper this_Quant : Quant = notYet "this_Quant" ;
|
||||||
|
oper through_Prep : Prep = notYet "through_Prep" ;
|
||||||
|
oper throw_V2 : V2 = notYet "throw_V2" ;
|
||||||
|
oper tie_V2 : V2 = notYet "tie_V2" ;
|
||||||
|
oper tired_VP : VP = notYet "tired_VP" ;
|
||||||
|
oper to_Prep : Prep = notYet "to_Prep" ;
|
||||||
|
oper today_Adv : Adv = notYet "today_Adv" ;
|
||||||
|
oper tongue_N : N = notYet "tongue_N" ;
|
||||||
|
oper too_AdA : AdA = notYet "too_AdA" ;
|
||||||
|
oper tooth_N : N = notYet "tooth_N" ;
|
||||||
|
oper train_N : N = notYet "train_N" ;
|
||||||
|
oper travel_V : V = notYet "travel_V" ;
|
||||||
|
oper tree_N : N = notYet "tree_N" ;
|
||||||
|
oper turn_V : V = notYet "turn_V" ;
|
||||||
|
oper ugly_A : A = notYet "ugly_A" ;
|
||||||
|
oper uncertain_A : A = notYet "uncertain_A" ;
|
||||||
|
oper under_Prep : Prep = notYet "under_Prep" ;
|
||||||
|
oper understand_V2 : V2 = notYet "understand_V2" ;
|
||||||
|
oper university_N : N = notYet "university_N" ;
|
||||||
|
oper very_AdA : AdA = notYet "very_AdA" ;
|
||||||
|
oper village_N : N = notYet "village_N" ;
|
||||||
|
oper vomit_V : V = notYet "vomit_V" ;
|
||||||
|
oper wait_V2 : V2 = notYet "wait_V2" ;
|
||||||
|
oper walk_V : V = notYet "walk_V" ;
|
||||||
|
oper want_VV : VV = notYet "want_VV" ;
|
||||||
|
oper war_N : N = notYet "war_N" ;
|
||||||
|
oper warm_A : A = notYet "warm_A" ;
|
||||||
|
oper wash_V2 : V2 = notYet "wash_V2" ;
|
||||||
|
oper watch_V2 : V2 = notYet "watch_V2" ;
|
||||||
|
oper water_N : N = notYet "water_N" ;
|
||||||
|
oper weather_adjCl : AP -> Cl = notYet "weather_adjCl" ;
|
||||||
|
oper wet_A : A = notYet "wet_A" ;
|
||||||
|
oper whatPl_IP : IP = notYet "whatPl_IP" ;
|
||||||
|
oper whatSg_IP : IP = notYet "whatSg_IP" ;
|
||||||
|
oper what_name_QCl : NP -> QCl = notYet "what_name_QCl" ;
|
||||||
|
oper when_IAdv : IAdv = notYet "when_IAdv" ;
|
||||||
|
oper when_Subj : Subj = notYet "when_Subj" ;
|
||||||
|
oper where_IAdv : IAdv = notYet "where_IAdv" ;
|
||||||
|
oper which_IQuant : IQuant = notYet "which_IQuant" ;
|
||||||
|
oper white_A : A = notYet "white_A" ;
|
||||||
|
oper whoPl_IP : IP = notYet "whoPl_IP" ;
|
||||||
|
oper whoSg_IP : IP = notYet "whoSg_IP" ;
|
||||||
|
oper why_IAdv : IAdv = notYet "why_IAdv" ;
|
||||||
|
oper wide_A : A = notYet "wide_A" ;
|
||||||
|
oper wife_N : N = notYet "wife_N" ;
|
||||||
|
oper win_V2 : V2 = notYet "win_V2" ;
|
||||||
|
oper wind_N : N = notYet "wind_N" ;
|
||||||
|
oper window_N : N = notYet "window_N" ;
|
||||||
|
oper wine_N : N = notYet "wine_N" ;
|
||||||
|
oper wing_N : N = notYet "wing_N" ;
|
||||||
|
oper wipe_V2 : V2 = notYet "wipe_V2" ;
|
||||||
|
oper without_Prep : Prep = notYet "without_Prep" ;
|
||||||
|
oper wonder_VQ : VQ = notYet "wonder_VQ" ;
|
||||||
|
oper wood_N : N = notYet "wood_N" ;
|
||||||
|
oper worm_N : N = notYet "worm_N" ;
|
||||||
|
oper write_V2 : V2 = notYet "write_V2" ;
|
||||||
|
oper year_N : N = notYet "year_N" ;
|
||||||
|
oper yellow_A : A = notYet "yellow_A" ;
|
||||||
|
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
||||||
|
oper young_A : A = notYet "young_A" ;
|
||||||
|
oper CNNumNP : CN -> Card -> NP = notYet "CNNumNP" ;
|
||||||
|
oper CNSymbNP : Det -> CN -> [Symb] -> NP = notYet "CNSymbNP" ;
|
||||||
|
oper FloatPN : Float -> PN = notYet "FloatPN" ;
|
||||||
|
oper IntPN : Int -> PN = notYet "IntPN" ;
|
||||||
|
oper NumPN : Card -> PN = notYet "NumPN" ;
|
||||||
|
oper SymbNum : Symb -> Card = notYet "SymbNum" ;
|
||||||
|
oper SymbOrd : Symb -> Ord = notYet "SymbOrd" ;
|
||||||
|
oper SymbPN : Symb -> PN = notYet "SymbPN" ;
|
||||||
|
oper SymbS : Symb -> S = notYet "SymbS" ;
|
||||||
|
}
|
||||||
221
src/somali/NounSom.gf
Normal file
221
src/somali/NounSom.gf
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
--2 Noun phrases
|
||||||
|
|
||||||
|
-- The three main types of noun phrases are
|
||||||
|
-- - common nouns with determiners
|
||||||
|
-- - proper names
|
||||||
|
-- - pronouns
|
||||||
|
|
||||||
|
-- : Det -> CN -> NP
|
||||||
|
DetCN det cn = useN cn ** {
|
||||||
|
s = \\c =>
|
||||||
|
let nfc : {nf : NForm ; c : Case} =
|
||||||
|
case <c,cn.hasMod,det.d> of {
|
||||||
|
<Nom,True, Indef Sg> => {nf=Indef Sg ; c=Abs} ;
|
||||||
|
<Nom,False,Indef Sg> => {nf=IndefNom ; c=Nom} ; -- special form for fem. nouns
|
||||||
|
<Nom,True,Def x A> => {nf=Def x A ; c=Abs} ;
|
||||||
|
<Nom,False,Def x A> => {nf=Def x U ; c=Nom} ;
|
||||||
|
_ => {nf=det.d ; c=c}
|
||||||
|
} ;
|
||||||
|
in cn.s ! nfc.nf
|
||||||
|
++ det.s ! nfc.c
|
||||||
|
++ cn.mod ! getNum (getAgr det.d Masc) ! c ;
|
||||||
|
a = getAgr det.d cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : PN -> NP ;
|
||||||
|
UsePN pn = pn ** {
|
||||||
|
s = \\c => pn.s ;
|
||||||
|
isPron = False ;
|
||||||
|
sp = pn.s } ;
|
||||||
|
|
||||||
|
-- : Pron -> NP ;
|
||||||
|
UsePron pron = lin NP pron ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
|
PredetNP predet np = np ** {
|
||||||
|
s = \\c => predet.s ++ np.s ! c ---- ?
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- A noun phrase can also be postmodified by the past participle of a
|
||||||
|
-- verb, by an adverb, or by a relative clause
|
||||||
|
|
||||||
|
|
||||||
|
-- : NP -> V2 -> NP ; -- the man seen
|
||||||
|
-- PPartNP np v2 = np ** {
|
||||||
|
-- s = \\c => v2.s ! ??? ++ np.s ! c } ; ----
|
||||||
|
|
||||||
|
-- : NP -> Adv -> NP ; -- Paris today ; boys, such as ..
|
||||||
|
--AdvNP,ExtAdvNP = \np,adv -> np ** {} ; --adverbs are complicated
|
||||||
|
|
||||||
|
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||||
|
-- RelNP np rs = np ** { s = \\c => rs.s ! np.agr ++ np.s ! c } ;
|
||||||
|
|
||||||
|
-- Determiners can form noun phrases directly.
|
||||||
|
|
||||||
|
-- : Det -> NP ;
|
||||||
|
DetNP det = {
|
||||||
|
s = det.sp ! Masc ; ---- Any way to decide for gender here?
|
||||||
|
a = getAgr det.d Masc ;
|
||||||
|
isPron = False ; sp = []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- MassNP : CN -> NP ;
|
||||||
|
MassNP cn = useN cn ** {
|
||||||
|
s = table { Nom => cn.s ! IndefNom ++ cn.mod ! Sg ! Nom ;
|
||||||
|
Abs => cn.s ! Indef Sg ++ cn.mod ! Sg ! Abs }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Determiners
|
||||||
|
|
||||||
|
-- The determiner has a fine-grained structure, in which a 'nucleus'
|
||||||
|
-- quantifier and an optional numeral can be discerned.
|
||||||
|
|
||||||
|
-- : Quant -> Num -> Det ;
|
||||||
|
-- DetQuant quant num = quant **
|
||||||
|
-- { } ;
|
||||||
|
|
||||||
|
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||||
|
-- DetQuantOrd quant num ord =
|
||||||
|
-- let theseFive = DetQuant quant num
|
||||||
|
-- in theseFive ** { s = \\c,ph => theseFive.s ! c ! ph ++ ord.s } ; --TODO: dummy implementation
|
||||||
|
|
||||||
|
-- Whether the resulting determiner is singular or plural depends on the
|
||||||
|
-- cardinal.
|
||||||
|
|
||||||
|
-- All parts of the determiner can be empty, except $Quant$, which is
|
||||||
|
-- the "kernel" of a determiner. It is, however, the $Num$ that determines
|
||||||
|
-- the inherent number.
|
||||||
|
{-
|
||||||
|
NumSg = { s = [] ; n = Sg ; isNum = False } ;
|
||||||
|
NumPl = { s = [] ; n = Pl ; isNum = False } ;
|
||||||
|
|
||||||
|
-- : Card -> Num ;
|
||||||
|
NumCard card = (card ** { isNum = True }) ;
|
||||||
|
|
||||||
|
-- : Digits -> Card ;
|
||||||
|
NumDigits dig = { s = dig.s ! NCard ; n = dig.n } ;
|
||||||
|
|
||||||
|
-- : Numeral -> Card ;
|
||||||
|
NumNumeral num = num ;
|
||||||
|
|
||||||
|
-- : AdN -> Card -> Card ;
|
||||||
|
AdNum adn card = card ** { s = adn.s ++ card.s } ;
|
||||||
|
|
||||||
|
-- : Digits -> Ord ;
|
||||||
|
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
|
||||||
|
|
||||||
|
-- : Numeral -> Ord ;
|
||||||
|
OrdNumeral num = num ;
|
||||||
|
|
||||||
|
-- : A -> Ord ;
|
||||||
|
OrdSuperl a = { } ; -- why force Sg?
|
||||||
|
|
||||||
|
-- One can combine a numeral and a superlative.
|
||||||
|
|
||||||
|
-- : Numeral -> A -> Ord ; -- third largest
|
||||||
|
OrdNumeralSuperl num a = num ** { } ;
|
||||||
|
|
||||||
|
-- : Quant
|
||||||
|
DefArt = { } ;
|
||||||
|
-- : Quant
|
||||||
|
IndefArt = { s = artDef ;
|
||||||
|
indep = False ;
|
||||||
|
pref = [] ;
|
||||||
|
isDef = False } ; --has suffix, but turns into partitive in negative!
|
||||||
|
|
||||||
|
-- : Pron -> Quant
|
||||||
|
PossPron pron = { s = artDef ;
|
||||||
|
indep = True ;
|
||||||
|
pref = pron.s ! Gen ;
|
||||||
|
isDef = True } ;
|
||||||
|
-}
|
||||||
|
--2 Common nouns
|
||||||
|
|
||||||
|
-- : N -> CN
|
||||||
|
-- : N2 -> CN ;
|
||||||
|
UseN,UseN2 = ResSom.useN ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- : N2 -> NP -> CN ; -- mother of the king
|
||||||
|
ComplN2 n2 np =
|
||||||
|
let compl = applyPost n2.compl1 np ;
|
||||||
|
in useN n2 ** { s = \\agr => compl ++ n2.s } ;
|
||||||
|
|
||||||
|
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||||
|
ComplN3 n3 np =
|
||||||
|
let compl = applyPost n3.c3 np ;
|
||||||
|
in n3 ** {s = compl ++ n3.s } ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
-- : N3 -> N2 ; -- distance (from this city)
|
||||||
|
Use2N3 n3 = lin N2 n3 ** { c2 = n3.c3 } ;
|
||||||
|
|
||||||
|
-- : N3 -> N2 ; -- distance (to Paris)
|
||||||
|
Use3N3 n3 = lin N2 n3 ;
|
||||||
|
-- : AP -> CN -> CN
|
||||||
|
AdjCN ap cn = cn ** {
|
||||||
|
s = table { IndefNom => cn.s ! Indef Sg ; -- When an adjective is added, noun loses case marker.
|
||||||
|
x => cn.s ! x } ;
|
||||||
|
mod = \\n,c => cn.mod ! n ! Abs -- If there was something before, it is now in Abs
|
||||||
|
++ ap.s ! AF n c ;
|
||||||
|
hasMod = True
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- : CN -> RS -> CN ;
|
||||||
|
RelCN cn rs = cn ** { } ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : CN -> Adv -> CN ;
|
||||||
|
AdvCN cn adv = cn ** { } ;
|
||||||
|
|
||||||
|
-- Nouns can also be modified by embedded sentences and questions.
|
||||||
|
-- For some nouns this makes little sense, but we leave this for applications
|
||||||
|
-- to decide. Sentential complements are defined in VerbSom.
|
||||||
|
|
||||||
|
-- : CN -> SC -> CN ; -- question where she sleeps
|
||||||
|
SentCN cn sc = cn ** { } ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Apposition
|
||||||
|
|
||||||
|
-- This is certainly overgenerating.
|
||||||
|
|
||||||
|
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||||
|
ApposCN cn np = cn ** { s = } ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Possessive and partitive constructs
|
||||||
|
|
||||||
|
-- : PossNP : CN -> NP -> CN ;
|
||||||
|
PossNP cn np = cn ** { } ;
|
||||||
|
|
||||||
|
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
|
||||||
|
PartNP cn np = cn ** { } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- This is different from the partitive, as shown by many languages.
|
||||||
|
|
||||||
|
-- : Det -> NP -> NP ;
|
||||||
|
CountNP det np = np **
|
||||||
|
{ } ; -- Nonsense for DefArt or IndefArt
|
||||||
|
|
||||||
|
--3 Conjoinable determiners and ones with adjectives
|
||||||
|
|
||||||
|
-- : DAP -> AP -> DAP ; -- the large (one)
|
||||||
|
AdjDAP dap ap = dap ** { } ;
|
||||||
|
|
||||||
|
-- : Det -> DAP ; -- this (or that)
|
||||||
|
DetDAP det = det ;
|
||||||
|
-}
|
||||||
|
}
|
||||||
117
src/somali/NumeralSom.gf
Normal file
117
src/somali/NumeralSom.gf
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
concrete NumeralSom of Numeral = CatSom [Numeral,Digits] **
|
||||||
|
open Prelude, ResSom in {
|
||||||
|
|
||||||
|
oper LinDigit : Type = { s : DForm => Str ;
|
||||||
|
n : Number ;
|
||||||
|
even20 : Even20 } ;
|
||||||
|
|
||||||
|
oper mk20Ten : Str -> Str -> Str -> Str -> LinDigit = \tri,t,fiche,h ->
|
||||||
|
{ s = table { Unit => tri ;
|
||||||
|
Teen => t ;
|
||||||
|
Twenty => fiche ;
|
||||||
|
Hund => h + "TODO"} ;
|
||||||
|
even20 = Ten ;
|
||||||
|
n = Pl } ;
|
||||||
|
|
||||||
|
oper mkeven20 : Str -> Str -> Str -> Str -> LinDigit = \se,t,trifichid,h ->
|
||||||
|
{ s = table { Unit => se ;
|
||||||
|
Teen => t ;
|
||||||
|
Twenty => trifichid ;
|
||||||
|
Hund => h + "TODO" } ;
|
||||||
|
even20 = Even ;
|
||||||
|
n = Pl } ;
|
||||||
|
|
||||||
|
param Even20 = Ten | Even ;
|
||||||
|
param DForm = Unit | Teen | Twenty | Hund ;
|
||||||
|
|
||||||
|
--lincat Numeral = {s : Str} ;
|
||||||
|
lincat Digit = LinDigit ;
|
||||||
|
lincat Sub10 = LinDigit ;
|
||||||
|
lincat Sub100 = {s : Str ; n : Number } ;
|
||||||
|
lincat Sub1000 = {s : Str ; n : Number ; isHundred : Bool } ;
|
||||||
|
lincat Sub1000000 = {s : Str ; n : Number } ;
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
-- num : Sub1000000 -> Numeral ;
|
||||||
|
lin num x0 = lin Numeral x0 ;
|
||||||
|
|
||||||
|
lin n2 = mkeven20 "TODO" "TODO" "TODO" "TODO" ;
|
||||||
|
lin n3 = mk20Ten "TODO" "TODO" "TODO" "TODO";
|
||||||
|
lin n4 = mkeven20 "TODO" "TODO" "TODO" "TODO";
|
||||||
|
lin n5 = mk20Ten "TODO" "TODO" "TODO" "TODO";
|
||||||
|
lin n6 = mkeven20 "TODO" "TODO" "TODO" "TODO" ;
|
||||||
|
lin n7 = mk20Ten "TODO" "TODO" "TODO" "TODO" ;
|
||||||
|
lin n8 = mkeven20 "TODO" "TODO" "TODO" "TODO" ;
|
||||||
|
lin n9 = mk20Ten "TODO" "TODO" "TODO" "TODO" ;
|
||||||
|
|
||||||
|
lin pot01 =
|
||||||
|
{s = table {Unit => "TODO" ; Hund => "TODO" ; _ => []} ; even20 = Ten ; n = Sg };
|
||||||
|
lin pot0 d = d ;
|
||||||
|
lin pot110 = {s = "TODO" ; n = Pl} ;
|
||||||
|
lin pot111 = {s = variants {"TODO" ; "TODO"} ; n = Pl} ;
|
||||||
|
lin pot1to19 d = {s = d.s ! Teen ; n = Pl} ;
|
||||||
|
lin pot0as1 n = {s = n.s ! Unit ; n = n.n} ;
|
||||||
|
lin pot1 d =
|
||||||
|
{s = case d.even20 of {
|
||||||
|
Even => d.s ! Twenty ;
|
||||||
|
Ten => glue (d.s ! Twenty) "TODO" } ;
|
||||||
|
n = Pl} ;
|
||||||
|
lin pot1plus d e =
|
||||||
|
{s = case d.even20 of {
|
||||||
|
Even => d.s ! Twenty ++ "TODO" ++ e.s ! Unit ;
|
||||||
|
Ten => d.s ! Twenty ++ "TODO" ++ e.s ! Teen } ;
|
||||||
|
n = Pl} ;
|
||||||
|
|
||||||
|
lin pot1as2 n = n ** { isHundred = False } ;
|
||||||
|
lin pot2 d = {s = d.s ! Hund ; n = Pl ; isHundred = True } ;
|
||||||
|
lin pot2plus d e =
|
||||||
|
{ s = d.s ! Hund ++ "TODO" ++ e.s ;
|
||||||
|
n = Pl ;
|
||||||
|
isHundred = True } ;
|
||||||
|
lin pot2as3 n = n ;
|
||||||
|
lin pot3 n =
|
||||||
|
{s = table {Sg => [] ; Pl => n.s } ! n.n ++ "TODO" ;
|
||||||
|
n = n.n } ;
|
||||||
|
|
||||||
|
|
||||||
|
lin pot3plus n m =
|
||||||
|
let ta = if_then_Str m.isHundred [] "TODO" ; --no `ta' between 1000 and 100
|
||||||
|
in
|
||||||
|
{ s = table {Sg => [] ; Pl => n.s } ! n.n ++ "TODO" ++ ta ++ m.s ;
|
||||||
|
n = n.n } ;
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
lincat Dig = TDigit ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
TDigit : Type = { s : CardOrd => Str ; n : Number } ;
|
||||||
|
mkDig : Str -> TDigit = \c -> mk2Dig c Pl ;
|
||||||
|
|
||||||
|
mk2Dig : Str -> Number -> TDigit = \c,num ->
|
||||||
|
{ s = table { NCard => c ;
|
||||||
|
NOrd => c + "TODO" } ;
|
||||||
|
n = num } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lin D_0 = mkDig "0" ;
|
||||||
|
lin D_1 = mk2Dig "1" Sg ;
|
||||||
|
lin D_2 = mkDig "2" ;
|
||||||
|
lin D_3 = mkDig "3" ;
|
||||||
|
lin D_4 = mkDig "4" ;
|
||||||
|
lin D_5 = mkDig "5" ;
|
||||||
|
lin D_6 = mkDig "6" ;
|
||||||
|
lin D_7 = mkDig "7" ;
|
||||||
|
lin D_8 = mkDig "8" ;
|
||||||
|
lin D_9 = mkDig "9" ;
|
||||||
|
|
||||||
|
-- : Dig -> Digits ;
|
||||||
|
lin IDig dig = dig ;
|
||||||
|
-- : Dig -> Digits -> Digits ;
|
||||||
|
lin IIDig dig digs = digs ** {s = \\co => glue (dig.s ! co) (digs.s ! co) } ;
|
||||||
|
|
||||||
|
}
|
||||||
165
src/somali/ParadigmsSom.gf
Normal file
165
src/somali/ParadigmsSom.gf
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
resource ParadigmsSom = open CatSom, ResSom, Prelude in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
--2 Parameters
|
||||||
|
--
|
||||||
|
-- To abstract over number, valency and (some) case names,
|
||||||
|
-- we define the following identifiers. The application programmer
|
||||||
|
-- should always use these constants instead of the constructors
|
||||||
|
-- defined in $ResSom$.
|
||||||
|
Number : Type ;
|
||||||
|
sg : Number ;
|
||||||
|
pl : Number ;
|
||||||
|
|
||||||
|
Case : Type ;
|
||||||
|
absolutive : Case ;
|
||||||
|
nominative : Case ;
|
||||||
|
|
||||||
|
Agr : Type ;
|
||||||
|
sgFem : Agr ;
|
||||||
|
sgMasc : Agr ;
|
||||||
|
plAgr : Agr ;
|
||||||
|
|
||||||
|
Gender : Type ;
|
||||||
|
masc : Gender ;
|
||||||
|
fem : Gender ;
|
||||||
|
|
||||||
|
Preposition : Type ;
|
||||||
|
ka : Preposition ;
|
||||||
|
ku : Preposition ;
|
||||||
|
la : Preposition ;
|
||||||
|
u : Preposition ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Nouns
|
||||||
|
|
||||||
|
mkN : overload {
|
||||||
|
mkN : (bisad : Str) -> N ; -- Predictable nouns
|
||||||
|
mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender
|
||||||
|
mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem
|
||||||
|
--mkN : N -> Gender -> N ; -- Otherwise predictable but not gender (TODO does this even happen?)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPN : overload {
|
||||||
|
mkPN : Str -> PN ; -- Proper noun, default agr. P3 Sg Masc.
|
||||||
|
mkPN : Str -> Agr -> PN -- Proper noun, another agr.
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Adjectives
|
||||||
|
|
||||||
|
mkA : (yar : Str) -> CatSom.A ;
|
||||||
|
|
||||||
|
-- mkA2 : Str -> Prep -> A2 ;
|
||||||
|
|
||||||
|
--2 Verbs
|
||||||
|
|
||||||
|
-- Smart paradigms
|
||||||
|
mkV : Str -> V ;
|
||||||
|
|
||||||
|
mkV2 : overload {
|
||||||
|
mkV2 : (akhri : Str) -> V2 ; -- Regular verbs, no preposition
|
||||||
|
mkV2 : (_ : Str) -> (_ku : Preposition) -> V2 ; -- Regular verb, prep.
|
||||||
|
mkV2 : V -> Preposition -> V2 ; -- Already constructed verb with preposition
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- TODO: actual constructors
|
||||||
|
-- mkVA : Str -> VA = \s -> lin VA (mkVerb s) ;
|
||||||
|
--
|
||||||
|
-- mkV2A : Str -> V2A = \s -> lin V2A (mkVerb s) ;
|
||||||
|
-- mkVQ : Str -> VQ = \s -> lin VQ (mkVerb s) ;
|
||||||
|
-- mkVS : Str -> VS = \s -> lin VS (mkVerb s) ;
|
||||||
|
--
|
||||||
|
-- mkV2V : Str -> V2V = \s -> lin V2V (mkVerb s) ;
|
||||||
|
-- mkV2S : Str -> V2S = \s -> lin V2S (mkVerb s) ;
|
||||||
|
-- mkV2Q : Str -> V2Q = \s -> lin V2Q (mkVerb s) ;
|
||||||
|
-- mkV3 : Str -> V3 = \s -> lin V3 (mkVerb s) ;
|
||||||
|
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
--2 Structural categories
|
||||||
|
|
||||||
|
mkPrep = overload {
|
||||||
|
mkPrep : Str -> Prep = \s ->
|
||||||
|
lin Prep (ResSom.mkPrep s s s s s s) ;
|
||||||
|
mkPrep : (x1,_,_,_,_,x6 : Str) -> Prep = \a,b,c,d,e,f ->
|
||||||
|
lin Prep (ResSom.mkPrep a b c d e f) ;
|
||||||
|
mkPrep : Preposition -> Prep = \p ->
|
||||||
|
lin Prep (prepTable ! p) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- mkConj : (_,_ : Str) -> Number -> Conj = \s1,s2,num ->
|
||||||
|
-- lin Conj { s = s1 ; s2 = s2 } ;
|
||||||
|
|
||||||
|
-- mkSubj : Str -> Bool -> Subj = \s,b ->
|
||||||
|
-- lin Subj { } ;
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv = \s -> lin Adv {s = s ; s2 = []} ;
|
||||||
|
|
||||||
|
mkAdV : Str -> AdV = \s -> lin AdV {s = s} ;
|
||||||
|
|
||||||
|
mkAdA : Str -> AdA = \s -> lin AdA {s = s} ;
|
||||||
|
|
||||||
|
|
||||||
|
--.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
-- The definitions should not bother the user of the API. So they are
|
||||||
|
-- hidden from the document.
|
||||||
|
|
||||||
|
Number = ResSom.Number ;
|
||||||
|
sg = Sg ;
|
||||||
|
pl = Pl ;
|
||||||
|
|
||||||
|
Case = ResSom.Case ;
|
||||||
|
absolutive = Abs ;
|
||||||
|
nominative = Nom ;
|
||||||
|
|
||||||
|
Agr = ResSom.Agreement ;
|
||||||
|
sgFem = Sg3 Fem ;
|
||||||
|
sgMasc = Sg3 Masc ;
|
||||||
|
plAgr = Pl3 ;
|
||||||
|
|
||||||
|
Gender = ResSom.Gender ;
|
||||||
|
masc = Masc ;
|
||||||
|
fem = Fem ;
|
||||||
|
|
||||||
|
Preposition = ResSom.Preposition ;
|
||||||
|
ka = ResSom.ka ;
|
||||||
|
ku = ResSom.ku ;
|
||||||
|
la = ResSom.la ;
|
||||||
|
u = ResSom.u ;
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
mkN = overload {
|
||||||
|
mkN : Str -> N = \s -> lin N (mkN1 s) ;
|
||||||
|
mkN : Str -> Gender -> N = \s,g -> lin N (mkNg s g) ;
|
||||||
|
mkN : (_,_ : Str) -> Gender -> N = \s,t,g -> lin N (nMaalin s t g) ;
|
||||||
|
--mkN : N -> Gender -> N = \n,g -> n ** {g = g }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkPN = overload {
|
||||||
|
mkPN : Str -> PN = \s -> lin PN (mkPNoun s sgMasc) ;
|
||||||
|
mkPN : Str -> Agr -> PN = \s,a -> lin PN (mkPNoun s a)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkA : (yar : Str) -> CatSom.A = \s -> lin A (mkAdj s) ;
|
||||||
|
|
||||||
|
mkV : Str -> V = \s -> lin V (regV s) ;
|
||||||
|
|
||||||
|
regV : Str -> Verb = \s -> cSug s ; --case s of {
|
||||||
|
-- _ + #c + #c + "o" => cJoogso s ;
|
||||||
|
-- _ + "o" => cQaado s ; ----
|
||||||
|
-- _ + "i" => cKari s ;
|
||||||
|
-- _ + "ee" => cYaree s ;
|
||||||
|
-- _ => cSug s
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
mkV2 = overload {
|
||||||
|
mkV2 : Str -> V2 = \s -> lin V2 (regV s ** {c2 = noPrep}) ;
|
||||||
|
mkV2 : Str -> Preposition -> V2 = \s,p -> lin V2 (regV s ** {c2 = p}) ;
|
||||||
|
mkV2 : V -> Preposition -> V2 = \v,p -> lin V2 (v ** {c2 = p}) ;
|
||||||
|
} ;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
142
src/somali/ParamSom.gf
Normal file
142
src/somali/ParamSom.gf
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
resource ParamSom = ParamX ** open Prelude in {
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Phonology
|
||||||
|
|
||||||
|
oper
|
||||||
|
--TODO: make patterns actually adjusted to Somali
|
||||||
|
v : pattern Str = #("a" | "e" | "i" | "o" | "u") ;
|
||||||
|
vv : pattern Str = #("aa" | "ee" | "ii" | "oo" | "uu") ;
|
||||||
|
c : pattern Str = #("m"|"n"|"p"|"b"|"t"|"d"|"k"|"g"|"f"|"v"
|
||||||
|
|"s"|"h"|"l"|"j"|"r"|"z"|"c"|"q"|"y"|"w");
|
||||||
|
lmnr : pattern Str = #("l" | "m" | "n" | "r") ;
|
||||||
|
kpt : pattern Str = #("k" | "p" | "t") ;
|
||||||
|
gbd : pattern Str = #("g" | "b" | "d") ;
|
||||||
|
|
||||||
|
voiced : Str -> Str = \s -> case s of {
|
||||||
|
"k" => "g" ;
|
||||||
|
"t" => "d" ;
|
||||||
|
"p" => "b" ;
|
||||||
|
_ => s } ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Morphophonology
|
||||||
|
|
||||||
|
param
|
||||||
|
Morpheme = mO | mKa | mTa ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
allomorph : Morpheme -> Str -> Str = \x,stem ->
|
||||||
|
case x of {
|
||||||
|
mO => case last stem of {
|
||||||
|
d@("b"|"d"|"r"|"l"|"m"|"n") => d + "o" ;
|
||||||
|
"c"|"g"|"i"|"j"|"x"|"s" => "yo" ;
|
||||||
|
_ => "o" } ;
|
||||||
|
|
||||||
|
-- Based on the table on page 21--TODO find generalisations in patterns
|
||||||
|
mTa => case stem of {
|
||||||
|
_ + ("dh") => "a" ; ---- ??? just guessing
|
||||||
|
_ + ("d"|"c"|"h"|"x"|"q"|"'"|"i"|"y"|"w") => "da" ;
|
||||||
|
_ + "l" => "sha" ;
|
||||||
|
_ => "ta" } ;
|
||||||
|
|
||||||
|
mKa => case stem of {
|
||||||
|
_ + ("g"|"aa"|"i"|"y"|"w") => "ga" ;
|
||||||
|
_ + ("c"|"h"|"x"|"q"|"'") => "a" ;
|
||||||
|
_ + ("e"|"o") => "ha" ;
|
||||||
|
_ => "ka" }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Nouns
|
||||||
|
|
||||||
|
param
|
||||||
|
Case = Nom | Abs ;
|
||||||
|
Gender = Masc | Fem ;
|
||||||
|
Vowel = A | E | I | O | U ; -- For vowel assimilation
|
||||||
|
|
||||||
|
Inclusion = Excl | Incl ;
|
||||||
|
Agreement =
|
||||||
|
Sg1
|
||||||
|
| Sg2
|
||||||
|
| Sg3 Gender
|
||||||
|
| Pl1 Inclusion
|
||||||
|
| Pl2
|
||||||
|
| Pl3
|
||||||
|
| Impers ; -- Verb agrees with Sg3, but needed for preposition contraction
|
||||||
|
|
||||||
|
NForm =
|
||||||
|
Indef Number
|
||||||
|
| Def Number Vowel -- Stems for definite and determinative suffixes
|
||||||
|
| Numerative -- When modified by a number (only distinct for some feminine nouns)
|
||||||
|
| IndefNom ; -- Special form, only fem. nouns ending in consonant
|
||||||
|
|
||||||
|
|
||||||
|
oper
|
||||||
|
getAgr : NForm -> Gender -> Agreement = \n,g ->
|
||||||
|
case n of { Indef Pl|Def Pl _ => Pl3 ;
|
||||||
|
_ => Sg3 g } ;
|
||||||
|
getNum : Agreement -> Number = \a ->
|
||||||
|
case a of { Sg1|Sg2|Sg3 _ => Sg ; _ => Pl } ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Adjectives
|
||||||
|
|
||||||
|
param
|
||||||
|
AForm = AF Number Case ; ---- TODO: past tense
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Numerals
|
||||||
|
|
||||||
|
-- TODO: is this necessary?
|
||||||
|
param
|
||||||
|
CardOrd = NCard | NOrd ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Prepositions
|
||||||
|
|
||||||
|
param
|
||||||
|
Preposition = u | ku | ka | la | noPrep ;
|
||||||
|
PrepCombination = ugu | uga | ula | kaga | kula | kala
|
||||||
|
| Single Preposition ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
combine : Preposition -> Preposition -> PrepCombination = \p1,p2 ->
|
||||||
|
let oneWay : Preposition => Preposition => PrepCombination =
|
||||||
|
\\x,y => case <x,y> of {
|
||||||
|
<u,u|ku> => ugu ;
|
||||||
|
<u,ka> => uga ;
|
||||||
|
<u,la> => ula ;
|
||||||
|
<ku|ka,
|
||||||
|
ku|ka> => kaga ;
|
||||||
|
<ku,la> => kula ;
|
||||||
|
<ka,la> => kala ;
|
||||||
|
<noPrep,p> => Single p ;
|
||||||
|
<p,noPrep> => Single p ;
|
||||||
|
<p,_> => Single p } -- for trying both ways
|
||||||
|
in case oneWay ! p2 ! p1 of {
|
||||||
|
Single _ => oneWay ! p1 ! p2 ;
|
||||||
|
x => x } ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Verbs
|
||||||
|
|
||||||
|
param
|
||||||
|
VForm =
|
||||||
|
VInf
|
||||||
|
| VPres Agreement Polarity
|
||||||
|
| VNegPast
|
||||||
|
| VPast Agreement
|
||||||
|
| VFut -- agreement comes from auxiliary
|
||||||
|
| VRel -- "som är/har/…" TODO is this used in other verbs?
|
||||||
|
| VImp Number ; -- TODO negation
|
||||||
|
|
||||||
|
oper
|
||||||
|
if_then_Pol : Polarity -> Str -> Str -> Str = \p,t,f ->
|
||||||
|
case p of {Pos => t ; Neg => f } ;
|
||||||
|
|
||||||
|
-- TODO:
|
||||||
|
-- tre aspekter (enkel, progressiv, habituell),
|
||||||
|
-- fem modus (indikativ, imperativ, konjunktiv, kontiditonalis, optativ)
|
||||||
|
}
|
||||||
31
src/somali/PhraseSom.gf
Normal file
31
src/somali/PhraseSom.gf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
|
|
||||||
|
UttS s = s ;
|
||||||
|
-- UttQS qs = qs ;
|
||||||
|
|
||||||
|
UttImpSg pol imp =
|
||||||
|
let ma = case pol.p of { Pos => [] ; Neg => "ma" }
|
||||||
|
in { s = ma ++ imp.s } ;
|
||||||
|
UttImpPl = UttImpSg ;
|
||||||
|
UttImpPol = UttImpSg ;
|
||||||
|
|
||||||
|
UttIP ip = { s = ip.s ! Abs} ;
|
||||||
|
UttIAdv iadv = iadv ;
|
||||||
|
UttNP np = { s = np.s ! Abs} ;
|
||||||
|
UttVP vp = { s = linVP vp } ;
|
||||||
|
UttAdv adv = adv ;
|
||||||
|
UttCN n = {s = linCN n } ;
|
||||||
|
UttCard n = n ;
|
||||||
|
UttAP ap = { s = ap.s ! AF Sg Abs } ;
|
||||||
|
UttInterj i = i ;
|
||||||
|
|
||||||
|
NoPConj = {s = []} ;
|
||||||
|
PConjConj conj = { s = conj.s1 ++ conj.s2 } ;
|
||||||
|
|
||||||
|
NoVoc = {s = []} ;
|
||||||
|
VocNP np = { s = "," ++ np.s ! Abs } ; --TODO: vocative exists
|
||||||
|
|
||||||
|
}
|
||||||
74
src/somali/QuestionSom.gf
Normal file
74
src/somali/QuestionSom.gf
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
concrete QuestionSom of Question = CatSom ** open
|
||||||
|
ResSom, (VS=VerbSom), (NS=NounSom), (AS=AdverbSom) in {
|
||||||
|
|
||||||
|
-- A question can be formed from a clause ('yes-no question') or
|
||||||
|
-- with an interrogative.
|
||||||
|
|
||||||
|
lin
|
||||||
|
-- : Cl -> QCl ;
|
||||||
|
-- QuestCl cl = ;
|
||||||
|
|
||||||
|
-- : IP -> VP -> QCl ;
|
||||||
|
-- QuestVP ip vp = ;
|
||||||
|
|
||||||
|
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||||
|
--QuestSlash ip cls = ;
|
||||||
|
|
||||||
|
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
||||||
|
-- QuestIAdv iadv cl = { } ;
|
||||||
|
|
||||||
|
-- : IComp -> NP -> QCl ; -- where is John?
|
||||||
|
-- QuestIComp icomp np = ;
|
||||||
|
|
||||||
|
-- Interrogative pronouns can be formed with interrogative
|
||||||
|
-- determiners, with or without a noun.
|
||||||
|
|
||||||
|
-- : IDet -> CN -> IP ; -- which five songs
|
||||||
|
IdetCN = NS.DetCN ;
|
||||||
|
|
||||||
|
-- : IDet -> IP ; -- which five
|
||||||
|
IdetIP = NS.DetNP ;
|
||||||
|
|
||||||
|
-- They can be modified with adverbs.
|
||||||
|
-- : IP -> Adv -> IP ; -- who in Paris
|
||||||
|
--AdvIP = NS.AdvNP ;
|
||||||
|
|
||||||
|
-- Interrogative quantifiers have number forms and can take number modifiers.
|
||||||
|
|
||||||
|
-- : IQuant -> Num -> IDet ; -- which (five)
|
||||||
|
--IdetQuant = NS.DetQuant ;
|
||||||
|
|
||||||
|
-- Interrogative adverbs can be formed prepositionally.
|
||||||
|
-- : Prep -> IP -> IAdv ; -- with whom
|
||||||
|
PrepIP = AS.PrepNP ;
|
||||||
|
|
||||||
|
-- They can be modified with other adverbs.
|
||||||
|
|
||||||
|
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||||
|
AdvIAdv = AS.AdAdv ;
|
||||||
|
|
||||||
|
-- Interrogative complements to copulas can be both adverbs and
|
||||||
|
-- pronouns.
|
||||||
|
|
||||||
|
-- : IAdv -> IComp ;
|
||||||
|
CompIAdv iadv = iadv ; -- where (is it)
|
||||||
|
|
||||||
|
-- : IP -> IComp ;
|
||||||
|
CompIP ip = { s = ip.s ! Abs } ; -- who (is it)
|
||||||
|
|
||||||
|
{-
|
||||||
|
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
||||||
|
|
||||||
|
-- Wh questions with two or more question words require a new, special category.
|
||||||
|
|
||||||
|
cat
|
||||||
|
QVP ; -- buy what where
|
||||||
|
fun
|
||||||
|
ComplSlashIP : VPSlash -> IP -> QVP ; -- buys what
|
||||||
|
AdvQVP : VP -> IAdv -> QVP ; -- lives where
|
||||||
|
AddAdvQVP : QVP -> IAdv -> QVP ; -- buys what where
|
||||||
|
|
||||||
|
QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
||||||
|
-}
|
||||||
|
|
||||||
|
}
|
||||||
30
src/somali/RelativeSom.gf
Normal file
30
src/somali/RelativeSom.gf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
concrete RelativeSom of Relative = CatSom ** open
|
||||||
|
ResSom, Prelude, (NS=NounSom), (SS=StructuralSom) in {
|
||||||
|
|
||||||
|
{-
|
||||||
|
lin
|
||||||
|
-- : Cl -> RCl ; -- such that John loves her
|
||||||
|
RelCl cl = { } ;
|
||||||
|
|
||||||
|
-- : RP -> VP -> RCl ;
|
||||||
|
RelVP rp vp = ;
|
||||||
|
|
||||||
|
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||||
|
RelSlash rp cls = ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : RP ;
|
||||||
|
IdRP = { s = "" } ;
|
||||||
|
|
||||||
|
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||||
|
FunRP prep np rp = { s = applyPost prep whom ++ np.s ! Abs }
|
||||||
|
where { num = case np.agr of {
|
||||||
|
Sg3 _ => NS.NumSg ;
|
||||||
|
_ => NS.NumPl } ;
|
||||||
|
whom = NS.DetNP (NS.DetQuant SS.which_IQuant num) } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
|
}
|
||||||
458
src/somali/ResSom.gf
Normal file
458
src/somali/ResSom.gf
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
resource ResSom = ParamSom ** open Prelude, Predef, ParamSom in {
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Nouns
|
||||||
|
oper
|
||||||
|
|
||||||
|
Noun : Type = {s : NForm => Str ; g : Gender} ;
|
||||||
|
Noun2 : Type = Noun ** {c2 : Preposition} ;
|
||||||
|
Noun3 : Type = Noun2 ** {c3 : Preposition} ;
|
||||||
|
|
||||||
|
CNoun : Type = Noun ** {mod : Number => Case => Str ; hasMod : Bool} ;
|
||||||
|
|
||||||
|
PNoun : Type = {s : Str ; a : Agreement} ;
|
||||||
|
|
||||||
|
mkPNoun : Str -> Agreement -> PNoun = \str,agr -> {s = str ; a = agr} ;
|
||||||
|
|
||||||
|
mkNoun : (x1,_,_,x4 : Str) -> Gender -> Noun = \wiil,wiilka,wiilal,wiilasha,gender ->
|
||||||
|
let bisadi = case gender of
|
||||||
|
{ Fem => case wiil of { _ + #c => wiil+"i" ; _ => wiil} ;
|
||||||
|
Masc => wiil } ;
|
||||||
|
bisadood = case gender of
|
||||||
|
{ Fem => case wiilal of { _ + "o" => wiilal+"od" ; _ => wiil} ;
|
||||||
|
Masc => wiil } ;
|
||||||
|
defStems : Str -> Vowel => Str = \s -> case s of {
|
||||||
|
ilk + "aha" =>
|
||||||
|
table { A => ilk+"ah" ;
|
||||||
|
E => ilk+"eh" ;
|
||||||
|
I => ilk+"ih" ;
|
||||||
|
O => ilk+"oh" ;
|
||||||
|
U => ilk+"uh"
|
||||||
|
} ;
|
||||||
|
_ => table { _ => init s }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
in { s = table {
|
||||||
|
Indef Sg => wiil ;
|
||||||
|
Indef Pl => wiilal ;
|
||||||
|
IndefNom => bisadi ;
|
||||||
|
Numerative => bisadood ;
|
||||||
|
Def Sg vow => defStems wiilka ! vow ;
|
||||||
|
Def Pl vow => defStems wiilasha ! vow } ;
|
||||||
|
g = gender } ;
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
-- Regular noun paradigms
|
||||||
|
nHooyo, nAabbe, nMas, nUl, nGuri, nXayawaan : Str -> Noun ;
|
||||||
|
|
||||||
|
--1) Feminine nouns that end in -o
|
||||||
|
nHooyo hooyo =
|
||||||
|
mkNoun hooyo (init hooyo + "ada") (hooyo + "oyin") (hooyo + "oyinka") Fem ;
|
||||||
|
|
||||||
|
--2) Masculine nouns that end in -e
|
||||||
|
nAabbe aabbe = let aabb = init aabbe in
|
||||||
|
mkNoun aabbe (aabb + "aha") (aabb + "ayaal") (aabb + "ayaasha") Masc ;
|
||||||
|
|
||||||
|
-- 3) Masculine, plural with duplication
|
||||||
|
nMas mas = let s = last mas ;
|
||||||
|
ka = allomorph mKa mas ;
|
||||||
|
ta = allomorph mTa mas ;
|
||||||
|
sha = case ta of {"sha" => ta ; _ => s + ta } in
|
||||||
|
mkNoun mas (mas + ka) (mas + "a" + s) (mas + "a" + sha) Masc ;
|
||||||
|
|
||||||
|
-- 4a) Feminine, plural with ó
|
||||||
|
nUl ul = let o = case last ul of { "i" => "yo" ; _ => "o" } ;
|
||||||
|
u = case last ul of { "l" => init ul ; _ => ul } ;
|
||||||
|
sha = allomorph mTa ul in
|
||||||
|
mkNoun ul (u + sha) (ul + o) (ul + "aha") Fem ;
|
||||||
|
|
||||||
|
-- 4b) Masculine, plural with ó, 2 syllables
|
||||||
|
nGuri guri = let o = allomorph mO guri ;
|
||||||
|
ga = allomorph mKa guri ;
|
||||||
|
gury = case last guri of { -- TODO does this generalise? Or just exception?
|
||||||
|
"i" => init guri + "y" ;
|
||||||
|
_ => guri } in
|
||||||
|
mkNoun guri (guri + ga) (gury + o) (gury + "aha") Masc ;
|
||||||
|
|
||||||
|
-- 4c) Masculine, plural with -ó, 3 syllables or longer
|
||||||
|
nXayawaan x = let ka = allomorph mKa x ;
|
||||||
|
o = allomorph mO x ;
|
||||||
|
xo = x + o in
|
||||||
|
mkNoun x (x + ka) xo (init xo + "ada") Masc ;
|
||||||
|
|
||||||
|
nMaalin : (_,_ : Str) -> Gender -> Noun = \maalin,maalmo,g ->
|
||||||
|
let ta = case g of { Masc => allomorph mKa maalin ;
|
||||||
|
Fem => allomorph mTa maalin } ;
|
||||||
|
aha = case g of { Masc|Fem => "aha" } ; ---- ?
|
||||||
|
in mkNoun maalin (maalin + ta) maalmo (init maalmo + aha) g ;
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
-- Smart paradigm
|
||||||
|
-- Substantiv som slutar på –o/–ad är så gott som alltid feminina, t.ex. qaáddo sked, bisád katt.
|
||||||
|
-- Substantiv som slutar på –e är så gott som alltid maskulina, t.ex. dúbbe hammare, fúre nyckel.
|
||||||
|
-- För övriga ord säger ordets form dessvärre väldigt lite om ordets genus. Däremot kan betoningens plats i ordet väldigt ofta avslöja ordets genus. Man kan alltså i flesta fall höra vilket genus ett substantiv har.
|
||||||
|
|
||||||
|
mkN1 : Str -> Noun = \n -> case n of {
|
||||||
|
_ + ("ad"|"adh") => nUl n ;
|
||||||
|
_ + "o" => nHooyo n ;
|
||||||
|
_ + "e" => nAabbe n ;
|
||||||
|
_ + "ri" => nGuri n ;
|
||||||
|
(#c + #v + #v + #c) -- One syllable words
|
||||||
|
| (#v + #v + #c)
|
||||||
|
| (#c + #v + #c)
|
||||||
|
| (#v + #c) => nMas n ;
|
||||||
|
_ => nXayawaan n } ;
|
||||||
|
|
||||||
|
mkNg : Str -> Gender -> Noun = \n,g -> case n of {
|
||||||
|
_ + ("r"|"n"|"l"|"g")
|
||||||
|
=> case g of {
|
||||||
|
Fem => nUl n ;
|
||||||
|
Masc => mkN1 n } ;
|
||||||
|
_ => mkN1 n
|
||||||
|
} ; -- TODO: add more exceptional cases
|
||||||
|
|
||||||
|
---------------------------------------------
|
||||||
|
-- NP
|
||||||
|
|
||||||
|
BaseNP : Type = {
|
||||||
|
a : Agreement ;
|
||||||
|
isPron : Bool ;
|
||||||
|
sp : Str } ;
|
||||||
|
|
||||||
|
NounPhrase : Type = BaseNP ** {s : Case => Str} ;
|
||||||
|
|
||||||
|
useN : Noun -> CNoun ** BaseNP = \n -> n **
|
||||||
|
{ mod = \\_,_ => [] ; hasMod = False ;
|
||||||
|
a = Sg3 n.g ; isPron = False ; sp = []
|
||||||
|
} ;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Pronouns
|
||||||
|
-- De somaliska possessiva pronomenen, precis som de svenska, har två olika genusformer i singular och en enda form i plural.
|
||||||
|
-- ägaren då det ägda föremålet är
|
||||||
|
-- m.sg. f.sg.plural
|
||||||
|
-- kayga tayda kuwayga
|
||||||
|
-- kaaga taada kuwaaga
|
||||||
|
-- kiisa tiisa kuwiisa
|
||||||
|
-- keeda teeda kuweeda
|
||||||
|
--
|
||||||
|
-- kaayaga taayada kuwayaga (1 pl. exkl.)
|
||||||
|
-- keenna teenna kuweenna (1 pl. inkl.)
|
||||||
|
-- kiinna tiinna kuwiinna
|
||||||
|
-- kooda tooda kuwooda
|
||||||
|
Pronoun : Type = NounPhrase ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Det, Quant, Card, Ord
|
||||||
|
Quant : Type = SS ; ---- TODO
|
||||||
|
|
||||||
|
Determiner : Type = {
|
||||||
|
s : Case => Str ;
|
||||||
|
sp : Gender => Case => Str ;
|
||||||
|
d : NForm
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkDeterminer : (x1,_,x3 : Str) -> NForm -> Determiner = \an,kani,tani,nf ->
|
||||||
|
let ani : Str = case an of { _ + #c => an+"i" ;
|
||||||
|
_ => case nf of { Def _ _ => "u" ;
|
||||||
|
_ => [] }
|
||||||
|
} ;
|
||||||
|
bind : Str -> Str = \x -> case x of { "" => [] ; _ => BIND ++ x } ;
|
||||||
|
in { s = table { Nom => bind ani ; Abs => bind an } ;
|
||||||
|
sp = table { Fem => table { Nom => tani ; Abs => init tani } ;
|
||||||
|
Masc => table { Nom => kani ; Abs => init kani }
|
||||||
|
} ;
|
||||||
|
d = nf
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Prepositions
|
||||||
|
|
||||||
|
-- Prepositionen u dras obligatoriskt samman med föregående pronomen
|
||||||
|
-- så att /a/ + /u/ > /oo/.
|
||||||
|
|
||||||
|
Prep : Type = {s : Agreement => Str} ;
|
||||||
|
|
||||||
|
mkPrep : (x1,_,_,_,_,x6 : Str) -> Prep = \ku,ii,kuu,noo,idiin,loo -> {
|
||||||
|
s = table {
|
||||||
|
Sg1 => ii ;
|
||||||
|
Sg2 => kuu ;
|
||||||
|
Pl2 => idiin ;
|
||||||
|
Pl1 Excl => noo ;
|
||||||
|
Pl1 Incl => "i" + noo ;
|
||||||
|
Impers => loo ;
|
||||||
|
_ => ku
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepTable : Preposition => Prep = table {
|
||||||
|
ku => mkPrep "ku" "igu" "kugu" "nagu" "idinku" "lagu" ;
|
||||||
|
ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "laga" ;
|
||||||
|
la => mkPrep "la" "ila" "kula" "nala" "idinla" "lala" ;
|
||||||
|
u => mkPrep "u" "ii" "kuu" "noo" "idiin" "loo" ;
|
||||||
|
noPrep => mkPrep [] "i" "ku" "na" "idin" "la"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
prepCombTable : Agreement => PrepCombination => Str = table {
|
||||||
|
Sg1 => table { ugu => "iigu" ; uga => "iiga" ;
|
||||||
|
ula => "iila" ; kaga => "igaga" ;
|
||||||
|
kula => "igula" ; kala => "igala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Sg1 } ;
|
||||||
|
Sg2 => table { ugu => "kuugu" ; uga => "kaaga" ;
|
||||||
|
ula => "kuula" ; kaga => "kaaga" ;
|
||||||
|
kula => "kugula" ; kala => "kaala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Sg2 } ;
|
||||||
|
Pl1 Excl =>
|
||||||
|
table { ugu => "noogu" ; uga => "nooga" ;
|
||||||
|
ula => "noola" ; kaga => "nagaga" ;
|
||||||
|
kula => "nagula" ; kala => "nagala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Pl1 Excl } ;
|
||||||
|
Pl1 Incl =>
|
||||||
|
table { ugu => "inoogu" ; uga => "inooga" ;
|
||||||
|
ula => "inoola" ; kaga => "inagaga" ;
|
||||||
|
kula => "inagula" ; kala => "inagala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Pl1 Incl } ;
|
||||||
|
|
||||||
|
Pl2 => table { ugu => "idiinku" ; uga => "idiinka" ;
|
||||||
|
ula => "idiinla" ; kaga => "idinkaga" ;
|
||||||
|
kula => "idinkula" ; kala => "idinkala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Pl2 } ;
|
||||||
|
Impers =>
|
||||||
|
table { ugu => "loogu" ; uga => "looga" ;
|
||||||
|
ula => "loola" ; kaga => "lagaga" ;
|
||||||
|
kula => "lagula" ; kala => "lagala" ;
|
||||||
|
Single p => (prepTable ! p).s ! Impers } ;
|
||||||
|
--
|
||||||
|
a => table { ugu => "ugu" ; uga => "uga" ;
|
||||||
|
ula => "ula" ; kaga => "kaga" ;
|
||||||
|
kula => "kula" ; kala => "kala" ;
|
||||||
|
Single p => (prepTable ! p).s ! a }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- TODO: Negationen má `inte' skrivs samman med en föregående preposition.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Adjectives
|
||||||
|
|
||||||
|
-- Sequences of adjectives follow the rules for restrictive relatives clauses, i.e. are linked by oo 'and' on an indefinite head NounPhrase and by ee 'and' on a definite NounPhrase (8.1).
|
||||||
|
|
||||||
|
-- Komparativ
|
||||||
|
-- För att uttrycka motsvarigheten till svenskans komparativ placerar man på somaliska helt enkelt prepositionen ká 'från, av, än' framför adjektivet i fråga. Adjektivet får ingen ändelse.
|
||||||
|
-- Shan waa ay ká yar tahay siddéed. Fem är mindre än åtta.
|
||||||
|
-- Superlativ
|
||||||
|
-- Motsvarigheten till svenskans superlativ bildas med prepositionsklustret ugú som till sin betydelse närmast motsvarar svenskans allra, t.ex.
|
||||||
|
-- ugu horrayntii (det att komma) allra först
|
||||||
|
|
||||||
|
Adjective : Type = { s : AForm => Str } ;
|
||||||
|
Adjective2 : Type = Adjective ** { c2 : Preposition } ;
|
||||||
|
|
||||||
|
mkAdj : Str -> Adjective = \yar ->
|
||||||
|
let yaryar = duplicate yar
|
||||||
|
in { s = table {
|
||||||
|
AF Sg Abs => yar ;
|
||||||
|
AF Pl Abs => yaryar ;
|
||||||
|
AF Sg Nom => yar + "i" ;
|
||||||
|
AF Pl Nom => yaryar + "i" }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
duplicate : Str -> Str = \yar -> case yar of {
|
||||||
|
"dheer" => "dhaadheer" ;
|
||||||
|
"weyn" => "waaweyn" ; -- TODO eventually handle irregular adjectives elsewhere
|
||||||
|
y@#c + a@#v + r@#c + _ => y + a + r + yar ;
|
||||||
|
g@#c + aa@#vv + _ => g + aa + yar ; --TODO: proper patterns
|
||||||
|
_ => yar + ":plural" } ;
|
||||||
|
|
||||||
|
AdjPhrase : Type = Adjective ;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Verbs
|
||||||
|
|
||||||
|
Verb : Type = {s : VForm => Str} ;
|
||||||
|
Verb2 : Type = Verb ** {c2 : Preposition} ;
|
||||||
|
Verb3 : Type = Verb2 ** {c3 : Preposition} ;
|
||||||
|
|
||||||
|
-- Saeed page 79:
|
||||||
|
-- "… the reference form is the imperative singular form
|
||||||
|
-- since it corresponds to the form of the basic root."
|
||||||
|
mkVerb : (x1,x2 : Str) -> Verb = \ark,qaat ->
|
||||||
|
let stems : {p1 : Str ; p2 : Str} = case ark of {
|
||||||
|
a + r@#c + k@#c => <ark + "i", a + r + a + voiced k> ;
|
||||||
|
yar + "ee" => <ark + "n", yar + "ey"> ;
|
||||||
|
_ => <ark + "n", ark> } ;
|
||||||
|
arki = stems.p1 ;
|
||||||
|
arag = stems.p2 ;
|
||||||
|
arkin = case last arki of { "n" => arki ; _ => arki + "n" } ;
|
||||||
|
t : Str = case arag of {
|
||||||
|
_ + ("i"|"y") => "s" ;
|
||||||
|
_ => "t" } ;
|
||||||
|
ay : Str = case ark of {
|
||||||
|
_ + ("i"|"e") => "ey" ;
|
||||||
|
_ => "ay" } ;
|
||||||
|
n : Str = case arag of {
|
||||||
|
_ + #v => "nn" ;
|
||||||
|
_ => "n" } ;
|
||||||
|
in { s = table {
|
||||||
|
VPres (Sg1|Sg3 Masc) pol
|
||||||
|
=> qaat + if_then_Pol pol "aa" "o" ;
|
||||||
|
VPres (Sg2|Sg3 Fem) pol
|
||||||
|
=> arag + t + if_then_Pol pol "aa" "o" ;
|
||||||
|
VPres (Pl1 _) pol
|
||||||
|
=> arag + n + if_then_Pol pol "aa" "o" ;
|
||||||
|
VPres Pl2 pol => arag + t + "aan" ;
|
||||||
|
VPres Pl3 pol => qaat + "aan" ;
|
||||||
|
|
||||||
|
VPast (Sg1|Sg3 Masc)
|
||||||
|
=> qaat + ay ;
|
||||||
|
VPast (Sg2|Sg3 Fem)
|
||||||
|
=> arag + t + ay ;
|
||||||
|
VPast (Pl1 _) => arag + n + ay ;
|
||||||
|
VPast Pl2 => arag + t + "een" ; -- kari+seen, (sug|joogsa|qaada)+teen
|
||||||
|
VPast Pl3 => qaat + "een" ;
|
||||||
|
|
||||||
|
VImp Sg => arag ;
|
||||||
|
VImp Pl => qaat + "a" ; -- TODO: allomorphs, page 86 in Saeed
|
||||||
|
VInf => arki ;
|
||||||
|
VNegPast => arkin ;
|
||||||
|
_ => "TODO" }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-------------------------
|
||||||
|
-- Regular verb paradigms
|
||||||
|
|
||||||
|
cSug, cKari, cYaree, cJoogso, cQaado : Str -> Verb ;
|
||||||
|
|
||||||
|
cSug sug = mkVerb sug sug ; -- TODO: stem/dictionary form of verbs with consonant clusters?
|
||||||
|
|
||||||
|
cKari, cYaree = \kari -> mkVerb kari (kari+"y") ;
|
||||||
|
|
||||||
|
cJoogso joogso =
|
||||||
|
let joogsa = init joogso + "a" ;
|
||||||
|
in mkVerb joogsa (joogsa + "d") ;
|
||||||
|
|
||||||
|
cQaado qaado =
|
||||||
|
let qaa = drop 2 qaado
|
||||||
|
in mkVerb (qaa + "da") (qaa + "t") ;
|
||||||
|
|
||||||
|
------------------
|
||||||
|
-- Irregular verbs
|
||||||
|
|
||||||
|
copula : Verb = {
|
||||||
|
s = table {
|
||||||
|
VPres Sg1 pol => if_then_Pol pol "ahay" "ihi" ;
|
||||||
|
VPres Sg2 pol => if_then_Pol pol "tahay" "ihid" ;
|
||||||
|
VPres (Sg3 Masc|Impers) pol => if_then_Pol pol "yahay" "aha" ;
|
||||||
|
VPres (Sg3 Fem) pol => if_then_Pol pol "tahay" "aha" ;
|
||||||
|
VPres (Pl1 _) pol => if_then_Pol pol "nahay" "ihin" ;
|
||||||
|
VPres Pl2 pol => if_then_Pol pol "tihiin" "ihidin" ;
|
||||||
|
VPres Pl3 pol => if_then_Pol pol "yihiin" "aha" ;
|
||||||
|
|
||||||
|
VPast (Sg1|Sg3 Masc|Impers)
|
||||||
|
=> "ahaa" ;
|
||||||
|
VPast (Sg2|Sg3 Fem)
|
||||||
|
=> "ahayd" ;
|
||||||
|
VPast (Pl1 _) => "ahayn" ;
|
||||||
|
VPast Pl2 => "ahaydeen" ;
|
||||||
|
VPast Pl3 => "ahaayeen" ;
|
||||||
|
VNegPast => "ahi" ;
|
||||||
|
VRel => "ah" ;
|
||||||
|
_ => "TODO:copula" }
|
||||||
|
} ;
|
||||||
|
-- I somaliskan används inte något kopulaverb motsvarande svenskans är mellan
|
||||||
|
-- två substantivfraser som utgör subjekt respektive predikatsfyllnad.
|
||||||
|
-- Observera också att kopulaverbet vara alltid hamnar efter det adjektiv
|
||||||
|
-- som utgör predikatsfyllnaden.
|
||||||
|
have_V : Verb = {
|
||||||
|
s = table {
|
||||||
|
VPres Sg1 _ => "leeyahay" ;
|
||||||
|
VPres Sg2 _ => "leedahay" ;
|
||||||
|
VPres (Sg3 Fem) _ => "leedahay" ;
|
||||||
|
VPres (Sg3 Masc)_ => "leeyahay" ;
|
||||||
|
VPres (Pl1 _) _ => "leenahay" ;
|
||||||
|
VPres Pl2 _ => "leedihiin" ;
|
||||||
|
VPres Pl3 _ => "leeyihiin" ;
|
||||||
|
VPast x => "l" + copula.s ! VPast x ;
|
||||||
|
VRel => "leh" ;
|
||||||
|
_ => "TODO:have_V" } ;
|
||||||
|
} ;
|
||||||
|
-- Till VERBFRASEN ansluter sig
|
||||||
|
-- · satstypsmarkörer (waa, ma...),
|
||||||
|
-- · subjekts-pronomenet la man,
|
||||||
|
-- · objektspronomenen,
|
||||||
|
-- · prepositionerna och
|
||||||
|
-- · riktnings-adverben soó (mot en plats/person), sií (bort frånen plats/person), wadá tillsammans (mot en gemensam punkt), kalá iväg, isär (bort från en gemensam punkt).
|
||||||
|
-- Riktningsadverben har ibland en mycket konkret betydelse, men många gånger är betydelsen mera abstrakt.
|
||||||
|
|
||||||
|
-- Till satsmarkörerna, dvs. både fokusmarkörerna och satstypsmarkörerna ansluter sig
|
||||||
|
-- subjektspronomenen aan, aad, uu, ay, aynu, men inte la (man).
|
||||||
|
|
||||||
|
------------------
|
||||||
|
-- VP
|
||||||
|
Adverb : Type = {s,s2 : Str} ;
|
||||||
|
|
||||||
|
Complement : Type = {
|
||||||
|
comp : Agreement => {p1,p2 : Str} -- Agreement for AP complements
|
||||||
|
} ;
|
||||||
|
|
||||||
|
VerbPhrase : Type = Verb ** Complement ** {
|
||||||
|
isPred : Bool ; -- to choose right sentence type marker
|
||||||
|
adv : Adverb ; -- they're ~complicated~
|
||||||
|
c2, c3 : Preposition -- can combine together and with object pronouns
|
||||||
|
} ;
|
||||||
|
|
||||||
|
VPSlash : Type = VerbPhrase ; ---- TODO more fields
|
||||||
|
|
||||||
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
|
comp = \\_ => <[],[]> ;
|
||||||
|
isPred = False ;
|
||||||
|
adv = {s,s2 = []} ;
|
||||||
|
c2,c3 = noPrep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
compl : NounPhrase -> VerbPhrase -> Str = \np,vp ->
|
||||||
|
prepCombTable ! np.a ! combine vp.c2 vp.c3 ;
|
||||||
|
|
||||||
|
complV2 : NounPhrase -> Verb2 -> Str = \np,vp ->
|
||||||
|
prepCombTable ! np.a ! combine vp.c2 noPrep ;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Sentences etc.
|
||||||
|
Clause : Type = {s : Tense => Anteriority => Polarity => Str} ;
|
||||||
|
RClause,
|
||||||
|
ClSlash,
|
||||||
|
Sentence : Type = SS ; ---- TODO
|
||||||
|
|
||||||
|
vf : Tense -> Anteriority -> Polarity -> Agreement -> Verb
|
||||||
|
-> {fin : Str ; inf : Str} = \t,ant,p,agr,vp ->
|
||||||
|
let pastV : Verb -> Str = \v ->
|
||||||
|
case p of { Neg => v.s ! VNegPast ;
|
||||||
|
Pos => v.s ! VPast agr } ;
|
||||||
|
presV : Verb -> Str = \v -> v.s ! VPres agr p ;
|
||||||
|
in case <t,ant> of {
|
||||||
|
<Pres,Simul> => {fin = presV vp ; inf = [] } ;
|
||||||
|
<Pres,Anter> => {fin = presV copula ; inf = vp.s ! VInf } ; ---- just guessing
|
||||||
|
<Past,Simul> => {fin = pastV vp ; inf = [] } ;
|
||||||
|
<Past,Anter> => {fin = pastV copula ; inf = vp.s ! VInf } ; ---- TODO: habitual aspect
|
||||||
|
<_Fut,Simul> => {fin = presV copula ; inf = vp.s ! VFut} ;
|
||||||
|
<_Fut,Anter> => {fin = pastV copula ; inf = vp.s ! VFut}
|
||||||
|
-- <Cond,Simul> => {fin = ? ; inf = ?} ; -- TODO conditional
|
||||||
|
-- <Cond,Anter> => {fin = ? ; inf = ?} -- TODO conditional
|
||||||
|
} ;
|
||||||
|
|
||||||
|
stmarker : Agreement => Polarity => Str = \\a,b =>
|
||||||
|
let stm = if_then_Pol b "w" "m"
|
||||||
|
in stm + subjpron ! a ;
|
||||||
|
|
||||||
|
stmarkerNoContr : Agreement => Polarity => Str = \\a,b =>
|
||||||
|
let stm = if_then_Pol b "waa" "ma"
|
||||||
|
in stm ++ subjpron ! a ;
|
||||||
|
|
||||||
|
subjpron : Agreement => Str = table {
|
||||||
|
Sg1|Pl1 _ => "aan" ;
|
||||||
|
Sg2|Pl2 => "aad" ;
|
||||||
|
Sg3 Masc => "uu" ;
|
||||||
|
_ => "ay" } ;
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- linrefs
|
||||||
|
|
||||||
|
oper
|
||||||
|
linVP : VerbPhrase -> Str = \vp -> vp.s ! VInf ; ----
|
||||||
|
linCN : CNoun -> Str = \cn -> cn.s ! IndefNom ;
|
||||||
|
}
|
||||||
103
src/somali/SentenceSom.gf
Normal file
103
src/somali/SentenceSom.gf
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
concrete SentenceSom of Sentence = CatSom ** open
|
||||||
|
TenseX, ResSom, (AS=AdverbSom), Prelude in {
|
||||||
|
|
||||||
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
--2 Clauses
|
||||||
|
|
||||||
|
-- : NP -> VP -> Cl
|
||||||
|
PredVP np vp = {
|
||||||
|
s = \\t,a,p =>
|
||||||
|
let pred : {fin : Str ; inf : Str} = vf t a p np.a vp ;
|
||||||
|
subj : Str = if_then_Str np.isPron [] (np.s ! Nom) ;
|
||||||
|
obj : {p1,p2 : Str} = vp.comp ! np.a ;
|
||||||
|
stm : Str =
|
||||||
|
case <p,vp.isPred,np.a> of {
|
||||||
|
<Pos,True,Sg3 _> => "waa" ;
|
||||||
|
-- _ => stmarker ! np.a ! b } -- marker+pronoun contract
|
||||||
|
_ => case <np.isPron,p> of {
|
||||||
|
<True,Pos> => "waa" ++ np.s ! Nom ; -- to force some string from NP to show in the tree
|
||||||
|
<True,Neg> => "ma" ++ np.s ! Nom ;
|
||||||
|
<False> => stmarkerNoContr ! np.a ! p }} ;
|
||||||
|
in subj -- subject if it's a noun
|
||||||
|
++ obj.p1 -- object if it's a noun
|
||||||
|
++ stm -- sentence type marker + possible subj. pronoun
|
||||||
|
++ vp.adv.s ---- TODO: can it contract with obj. pronoun?
|
||||||
|
++ obj.p2 -- object if it's a pronoun
|
||||||
|
++ pred.fin -- the verb inflected
|
||||||
|
++ pred.inf -- potential participle
|
||||||
|
++ vp.adv.s2 ---- I have no idea /IL
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
|
-- : SC -> VP -> Cl ; -- that she goes is good
|
||||||
|
PredSCVP sc vp = ;
|
||||||
|
|
||||||
|
--2 Clauses missing object noun phrases
|
||||||
|
-- : NP -> VPSlash -> ClSlash ;
|
||||||
|
SlashVP np vps = ;
|
||||||
|
|
||||||
|
-- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today
|
||||||
|
AdvSlash cls adv = cls ** insertAdv adv cls ;
|
||||||
|
|
||||||
|
-- SlashPrep : Cl -> Prep -> ClSlash ; -- (with whom) he walks
|
||||||
|
|
||||||
|
-- : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
|
||||||
|
-- SlashVS np vs ss = {} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
|
UseSlash t p cls = UseCl t p (PredVP he_Pron cls) ;
|
||||||
|
|
||||||
|
--2 Imperatives
|
||||||
|
-- : VP -> Imp ;
|
||||||
|
ImpVP vp = { s = linVP vp } ;
|
||||||
|
|
||||||
|
--2 Embedded sentences
|
||||||
|
|
||||||
|
|
||||||
|
-- : S -> SC ;
|
||||||
|
EmbedS s = { } ;
|
||||||
|
|
||||||
|
-- : QS -> SC ;
|
||||||
|
EmbedQS qs = { } ;
|
||||||
|
|
||||||
|
-- : VP -> SC ;
|
||||||
|
EmbedVP vp = { s = linVP vp } ;
|
||||||
|
|
||||||
|
--2 Sentences
|
||||||
|
|
||||||
|
-}
|
||||||
|
-- : Temp -> Pol -> Cl -> S ;
|
||||||
|
UseCl temp pol cl = { s = cl.s ! temp.t ! temp.a ! pol.p } ;
|
||||||
|
{-
|
||||||
|
-- : Temp -> Pol -> RCl -> RS ;
|
||||||
|
UseRCl temp pol cl = { s = cl.s ! temp.t ! temp.a ! pol.p } ;
|
||||||
|
|
||||||
|
-- : Temp -> Pol -> QCl -> QS ;
|
||||||
|
UseQCl temp pol qcl = { s = qcl.s ! temp.t ! temp.a ! pol.p } ;
|
||||||
|
|
||||||
|
-- An adverb can be added to the beginning of a sentence, either with comma ("externally")
|
||||||
|
-- or without:
|
||||||
|
|
||||||
|
-- : Adv -> S -> S ; -- then I will go home
|
||||||
|
AdvS = advS ;
|
||||||
|
|
||||||
|
-- : Adv -> S -> S ; -- next week, I will go home
|
||||||
|
ExtAdvS adv = advS {s = adv.s ++ SOFT_BIND ++ ","} ;
|
||||||
|
|
||||||
|
-- There's an SubjS already in AdverbSom -- should this be deprecated?
|
||||||
|
-- : S -> Subj -> S -> S ;
|
||||||
|
SSubjS s1 subj s2 = AdvS (AE.SubjS subj s2) s1 ;
|
||||||
|
|
||||||
|
-- A sentence can be modified by a relative clause referring to its contents.
|
||||||
|
|
||||||
|
-- : S -> RS -> S ; -- she sleeps, which is good
|
||||||
|
RelS sent rs = advS { s = rs.s ! Sg3 Masc ++ SOFT_BIND ++ ","} sent ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
|
||||||
|
advS : Adv -> SS -> SS = \a,s -> {s = a.s ++ s.s} ;
|
||||||
|
-}
|
||||||
|
}
|
||||||
195
src/somali/StructuralSom.gf
Normal file
195
src/somali/StructuralSom.gf
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
concrete StructuralSom of Structural = CatSom **
|
||||||
|
open Prelude, ResSom, (N=NounSom), ParadigmsSom in {
|
||||||
|
|
||||||
|
-------
|
||||||
|
-- Ad*
|
||||||
|
{-
|
||||||
|
lin almost_AdA = mkAdA "" ;
|
||||||
|
lin almost_AdN = ss "" ;
|
||||||
|
lin at_least_AdN = ss "" ;
|
||||||
|
lin at_most_AdN = ss "" ;
|
||||||
|
lin so_AdA = ss "" ;
|
||||||
|
lin too_AdA = ss "" ;
|
||||||
|
lin very_AdA = mkAdA "" ;
|
||||||
|
|
||||||
|
lin as_CAdv = { s = "" ; p = [] } ;
|
||||||
|
lin less_CAdv = { s = "" ; p = [] } ;
|
||||||
|
lin more_CAdv = { s = "" ; p = [] } ;
|
||||||
|
|
||||||
|
lin how_IAdv = ss "" ;
|
||||||
|
lin how8much_IAdv = ss "" ;
|
||||||
|
lin when_IAdv = ss "" ;
|
||||||
|
lin where_IAdv = ss "" ;
|
||||||
|
lin why_IAdv = ss "" ;
|
||||||
|
|
||||||
|
lin always_AdV = ss "" ;
|
||||||
|
|
||||||
|
lin everywhere_Adv = ss "" ;
|
||||||
|
lin here7from_Adv = ss "" ;
|
||||||
|
lin here7to_Adv = ss "" ;
|
||||||
|
lin here_Adv = ss "" ;
|
||||||
|
lin quite_Adv = ss "" ;
|
||||||
|
lin somewhere_Adv = ss "" ;
|
||||||
|
lin there7from_Adv = ss "" ;
|
||||||
|
lin there7to_Adv = ss "" ;
|
||||||
|
lin there_Adv = ss "" ;
|
||||||
|
|
||||||
|
-}
|
||||||
|
-------
|
||||||
|
-- Conj
|
||||||
|
|
||||||
|
lin and_Conj = {s1 = "oo" ; s2 = [] ; n = Pl} ;
|
||||||
|
lin or_Conj = {s1 = "ama" ; s2 = [] ; n = Sg} ; -- mise with interrogatives
|
||||||
|
-- lin if_then_Conj = mkConj
|
||||||
|
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||||
|
-- lin either7or_DConj = mkConj "" "" pl ;
|
||||||
|
--
|
||||||
|
-- lin but_PConj = ss "" ;
|
||||||
|
-- lin otherwise_PConj = ss "" ;
|
||||||
|
-- lin therefore_PConj = ss "" ;
|
||||||
|
|
||||||
|
|
||||||
|
-----------------
|
||||||
|
-- *Det and Quant
|
||||||
|
{-
|
||||||
|
lin how8many_IDet = R.indefDet "" pl ;
|
||||||
|
|
||||||
|
--TODO: fix predets in NounSom, figure out whether Predet should inflect
|
||||||
|
lin all_Predet = { s = "" } ;
|
||||||
|
lin not_Predet = { s = "" } ;
|
||||||
|
lin only_Predet = { s = "" } ;
|
||||||
|
lin most_Predet = { s = "" } ;
|
||||||
|
|
||||||
|
lin every_Det = R.defDet [] pl **
|
||||||
|
{ s = mkVow } ;
|
||||||
|
lin few_Det = R.indefDet "" pl ;
|
||||||
|
lin many_Det = R.indefDet "" pl ;
|
||||||
|
lin much_Det = R.indefDet "" sg ;
|
||||||
|
lin somePl_Det = R.indefDet "" pl ;
|
||||||
|
lin someSg_Det = R.indefDet "" sg ;
|
||||||
|
|
||||||
|
lin no_Quant = mkPrep no_Quant
|
||||||
|
|
||||||
|
lin that_Quant = R.defDet [] sg ** { s = R.quantHori } ;
|
||||||
|
lin this_Quant = R.defDet [] sg ** { s = R.quantHau } ;
|
||||||
|
lin which_IQuant = R.defDet "" sg ** { s = R.artDef } ;
|
||||||
|
|
||||||
|
|
||||||
|
-----
|
||||||
|
-- NP
|
||||||
|
|
||||||
|
lin everybody_NP = defNP "" N.NumPl ;
|
||||||
|
lin everything_NP = defNP "" N.NumSg ;
|
||||||
|
lin nobody_NP = mkVerb; ""
|
||||||
|
lin nothing_NP = defNP "" N.NumSg ;
|
||||||
|
lin somebody_NP = defNP "" N.NumSg ;
|
||||||
|
lin something_NP = defNP "" N.NumSg ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
defNP : Str -> Num -> NP = {} ;
|
||||||
|
-}
|
||||||
|
|
||||||
|
-------
|
||||||
|
-- Prep
|
||||||
|
|
||||||
|
-- lin above_Prep = mkPrep "" ;
|
||||||
|
-- lin after_Prep = mkPrep "" ;
|
||||||
|
-- lin before_Prep = mkPrep "" ;
|
||||||
|
-- lin behind_Prep = mkPrep "" ;
|
||||||
|
-- lin between_Prep = mkPrep "" ;
|
||||||
|
-- lin by8agent_Prep = mkPrep ;
|
||||||
|
-- lin by8means_Prep = mkPrep ;
|
||||||
|
-- lin during_Prep = mkPrep ;
|
||||||
|
-- lin except_Prep = mkPrep ;
|
||||||
|
-- lin for_Prep = mkPrep ;
|
||||||
|
-- lin from_Prep = mkPrep "" ;
|
||||||
|
-- lin in8front_Prep = mkPrep "" ;
|
||||||
|
lin in_Prep = prepTable ! ku ;
|
||||||
|
lin on_Prep = prepTable ! ku ;
|
||||||
|
-- lin part_Prep = mkPrep ;
|
||||||
|
-- lin possess_Prep = mkPrep ;
|
||||||
|
-- lin through_Prep = mkPrep ;
|
||||||
|
-- lin to_Prep = mkPrep ;
|
||||||
|
-- lin under_Prep = mkPrep "" ;
|
||||||
|
lin with_Prep = prepTable ! la ;
|
||||||
|
-- lin without_Prep = mkPrep ;
|
||||||
|
|
||||||
|
|
||||||
|
-------
|
||||||
|
-- Pron
|
||||||
|
|
||||||
|
-- Pronouns are closed class, no constructor in ParadigmsSom.
|
||||||
|
|
||||||
|
i_Pron = {
|
||||||
|
s = table {Nom => "aan" ; Abs => "i"} ;
|
||||||
|
a = Sg1 ; isPron = True ; sp = "aniga" ;
|
||||||
|
} ;
|
||||||
|
youSg_Pron = {
|
||||||
|
s = table {Nom => "aad" ; Abs => "ku"} ;
|
||||||
|
a = Sg2 ; isPron = True ; sp = "adiga" ;
|
||||||
|
} ;
|
||||||
|
he_Pron = {
|
||||||
|
s = table {Nom => "uu" ; Abs => []} ;
|
||||||
|
a = Sg3 Masc ; isPron = True ; sp = "isaga" ;
|
||||||
|
} ;
|
||||||
|
she_Pron = {
|
||||||
|
s = table {Nom => "ay" ; Abs => []} ;
|
||||||
|
a = Sg3 Fem ; isPron = True ; sp = "iyada" ;
|
||||||
|
} ;
|
||||||
|
we_Pron = {
|
||||||
|
s = table {Nom => "aan" ; Abs => "na"} ;
|
||||||
|
a = Pl1 Incl ; isPron = True ; sp = "innaga" ;
|
||||||
|
} ;
|
||||||
|
youPl_Pron = {
|
||||||
|
s = table {Nom => "aad" ; Abs => "idin"} ;
|
||||||
|
a = Pl2 ; isPron = True ; sp = "idinka" ;
|
||||||
|
} ;
|
||||||
|
they_Pron = {
|
||||||
|
s = table {Nom => "ay" ; Abs => []} ;
|
||||||
|
a = Pl3 ; isPron = True ; sp = "iyaga" ;
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
|
lin whatPl_IP = ;
|
||||||
|
lin whatSg_IP = ;
|
||||||
|
lin whoPl_IP = ;
|
||||||
|
lin whoSg_IP = ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-------
|
||||||
|
-- Subj
|
||||||
|
|
||||||
|
lin although_Subj = mkSubj "" False ;
|
||||||
|
lin because_Subj = mkSubj "" False ;
|
||||||
|
lin if_Subj = mkSubj "" True ;
|
||||||
|
lin that_Subj = mkSubj "" False ;
|
||||||
|
lin when_Subj = mkSubj "" False ;
|
||||||
|
|
||||||
|
|
||||||
|
-}
|
||||||
|
------
|
||||||
|
-- Utt
|
||||||
|
|
||||||
|
lin language_title_Utt = ss "af soomaali" ;
|
||||||
|
lin no_Utt = ss "ma" ;
|
||||||
|
lin yes_Utt = ss "yes" ;
|
||||||
|
|
||||||
|
|
||||||
|
-------
|
||||||
|
-- Verb
|
||||||
|
|
||||||
|
lin have_V2 = mkV2 have_V noPrep ;
|
||||||
|
{-
|
||||||
|
lin can8know_VV = mkV "" ; -- can (capacity)
|
||||||
|
lin can_VV = mkV "" ; -- can (possibility)
|
||||||
|
lin must_VV = mkV "" ;
|
||||||
|
lin want_VV = mkV "" ;
|
||||||
|
|
||||||
|
|
||||||
|
------
|
||||||
|
-- Voc
|
||||||
|
|
||||||
|
lin please_Voc = ss "" ;
|
||||||
|
-}
|
||||||
|
}
|
||||||
50
src/somali/SymbolSom.gf
Normal file
50
src/somali/SymbolSom.gf
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete SymbolSom of Symbol = CatSom **
|
||||||
|
open Prelude, ParadigmsSom, ResSom, (NS=NounSom) in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
-- : Symb -> PN ; -- x
|
||||||
|
SymbPN i = mkPN i.s ;
|
||||||
|
|
||||||
|
-- : Int -> PN ; -- 27
|
||||||
|
IntPN i = mkPN i.s ;
|
||||||
|
|
||||||
|
-- : Float -> PN ; -- 3.14159
|
||||||
|
FloatPN i = mkPN i.s ;
|
||||||
|
|
||||||
|
-- : Card -> PN ; -- twelve [as proper name]
|
||||||
|
NumPN i = mkPN i.s ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
lin
|
||||||
|
-- CNIntNP cn i = {} ;
|
||||||
|
|
||||||
|
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and y
|
||||||
|
CNSymbNP det cn xs =
|
||||||
|
let cnSymb = cn ** { comp = cn.comp ++ xs.s }
|
||||||
|
in NS.DetCN det cnSymb ;
|
||||||
|
|
||||||
|
-- : CN -> Card -> NP ; -- level five ; level 5
|
||||||
|
CNNumNP cn i = NS.MassNP (cn ** { comp = cn.comp ++ i.s }) ;
|
||||||
|
|
||||||
|
-- : Symb -> S ;
|
||||||
|
SymbS sy = {s = } ;
|
||||||
|
-- : Symb -> Card ;
|
||||||
|
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||||
|
|
||||||
|
-- : Symb -> Ord ;
|
||||||
|
SymbOrd sy = { s =} ;
|
||||||
|
-}
|
||||||
|
lincat
|
||||||
|
Symb, [Symb] = SS ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
MkSymb s = s ;
|
||||||
|
|
||||||
|
BaseSymb = infixSS "oo" ;
|
||||||
|
ConsSymb = infixSS "," ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
142
src/somali/VerbSom.gf
Normal file
142
src/somali/VerbSom.gf
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
concrete VerbSom of Verb = CatSom ** open ResSom, Prelude in {
|
||||||
|
|
||||||
|
|
||||||
|
lin
|
||||||
|
|
||||||
|
-----
|
||||||
|
-- VP
|
||||||
|
|
||||||
|
UseV = ResSom.useV ;
|
||||||
|
{-
|
||||||
|
-- : VV -> VP -> VP ;
|
||||||
|
ComplVV vv vp = ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : VS -> S -> VP ;
|
||||||
|
ComplVS vs s = ;
|
||||||
|
|
||||||
|
-- : VQ -> QS -> VP ;
|
||||||
|
ComplVQ vq qs = ;
|
||||||
|
|
||||||
|
-- : VA -> AP -> VP ; -- they become red
|
||||||
|
ComplVA va ap = ResSom.insertComp (CompAP ap).s (useV va) ;
|
||||||
|
|
||||||
|
|
||||||
|
--------
|
||||||
|
-- Slash
|
||||||
|
|
||||||
|
-- : V2 -> VPSlash
|
||||||
|
SlashV2a = ResSom.slashDObj ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||||
|
Slash2V3 v3 npNori = slashDObj v3 **
|
||||||
|
{ iobj = { s = npNori.s ! Dat ;
|
||||||
|
agr = npNori.agr }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
|
Slash3V3 v3 npNor = slashIObj v3 **
|
||||||
|
{ dobj = npNor ** { s = mkDObj npNor }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
|
SlashV2V v2v vp = ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
|
SlashV2S v2s s = ;
|
||||||
|
|
||||||
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
|
SlashV2Q v2q qs = ;
|
||||||
|
|
||||||
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
|
SlashV2A v2a ap = slashDObj v2a **
|
||||||
|
{ comp = (CompAP ap).s } ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : VPSlash -> NP -> VP
|
||||||
|
ComplSlash vps np = ResSom.complSlash vps np ;
|
||||||
|
|
||||||
|
|
||||||
|
-- : VV -> VPSlash -> VPSlash ;
|
||||||
|
-- Just like ComplVV except missing subject!
|
||||||
|
SlashVV vv vps = ComplVV vv vps ** { missing = vps.missing ;
|
||||||
|
post = vps.post } ;
|
||||||
|
|
||||||
|
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||||
|
SlashV2VNP v2v np vps =
|
||||||
|
ComplVV v2v vps **
|
||||||
|
{ missing = vps.missing ;
|
||||||
|
post = vps.post ;
|
||||||
|
iobj = np ** { s = np.s ! Dat } } ;
|
||||||
|
|
||||||
|
--2 Other ways of forming verb phrases
|
||||||
|
|
||||||
|
-- Verb phrases can also be constructed reflexively and from
|
||||||
|
-- copula-preceded complements.
|
||||||
|
|
||||||
|
-- : VPSlash -> VP ;
|
||||||
|
ReflVP vps = ;
|
||||||
|
-}
|
||||||
|
-- : Comp -> VP ;
|
||||||
|
UseComp comp = UseCopula ** comp ** {
|
||||||
|
isPred = True
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
|
-- : V2 -> VP ; -- be loved
|
||||||
|
PassV2 v2 =
|
||||||
|
|
||||||
|
-- : VP -> Adv -> VP ; -- sleep here
|
||||||
|
AdvVP vp adv = vp ** {adv = adv} ; ---- TODO: how about combining adverbs?
|
||||||
|
|
||||||
|
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
||||||
|
ExtAdvVP vp adv = ;
|
||||||
|
|
||||||
|
-- : AdV -> VP -> VP ; -- always sleep
|
||||||
|
AdVVP adv vp = vp ** {adv = adv} ;
|
||||||
|
|
||||||
|
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
||||||
|
AdvVPSlash vps adv = vps ** { adv = vps.adv ++ adv.s } ;
|
||||||
|
|
||||||
|
-- : AdV -> VPSlash -> VPSlash ; -- always use (it)
|
||||||
|
AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ;
|
||||||
|
-}
|
||||||
|
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
||||||
|
-- NB. We need possibly a MissingArg kind of solution here too
|
||||||
|
-- VPSlashPrep vp prep = vp **
|
||||||
|
-- { c2 = case vp.c2 of { noPrep => prep.prep ;
|
||||||
|
-- x => x }} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--2 Complements to copula
|
||||||
|
|
||||||
|
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||||
|
|
||||||
|
-- the house is big
|
||||||
|
-- the houses are big
|
||||||
|
-- I am [a house that sleeps here]
|
||||||
|
-- we are [houses that sleep here]
|
||||||
|
|
||||||
|
-- : AP -> Comp ;
|
||||||
|
CompAP ap = {
|
||||||
|
comp = \\a => <[], ap.s ! AF (getNum a) Abs> ;
|
||||||
|
} ;
|
||||||
|
{-}
|
||||||
|
-- : CN -> Comp ;
|
||||||
|
CompCN cn = { } ;
|
||||||
|
|
||||||
|
-- NP -> Comp ;
|
||||||
|
CompNP np = { } ;
|
||||||
|
|
||||||
|
-- : Adv -> Comp ;
|
||||||
|
CompAdv adv = { } ;
|
||||||
|
|
||||||
|
-}
|
||||||
|
-- : VP -- Copula alone;
|
||||||
|
UseCopula = useV copula ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user