forked from GitHub/gf-rgl
Made changes to the nature of adjective so that it linearises
This commit is contained in:
@@ -31,7 +31,7 @@ lincat
|
|||||||
Det = Res.Determiner ; -- determiner phrase e.g. "those seven"
|
Det = Res.Determiner ; -- determiner phrase e.g. "those seven"
|
||||||
Quant = {s : Str ; s2 :Res.Agreement => Str; doesAgree : Bool} ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
Quant = {s : Str ; s2 :Res.Agreement => Str; doesAgree : Bool} ; -- quantifier ('nucleus' of Det) e.g. "this/these"
|
||||||
Num = Res.Numer ; -- number determining element e.g. "seven"
|
Num = Res.Numer ; -- number determining element e.g. "seven"
|
||||||
AP = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;--Res.AdjectivalPhrase;
|
AP = {s : Str ; position1 : Res.Position1; isProper : Bool; isPrep: Bool};--Res.AdjectivalPhrase;
|
||||||
A = Res.Adjective;
|
A = Res.Adjective;
|
||||||
Comp = Res.Comp; -- complement of copula, such as AP e.g. "very warm"
|
Comp = Res.Comp; -- complement of copula, such as AP e.g. "very warm"
|
||||||
V2 = Res.Verb2;
|
V2 = Res.Verb2;
|
||||||
@@ -42,7 +42,13 @@ lincat
|
|||||||
-- see Structural for explanation of this structure
|
-- see Structural for explanation of this structure
|
||||||
Predet = {s : Str ; s2 : Str; isMWE : Bool; isInflected : Bool}; -- predeterminer (prefixed Quant) e.g. "all"
|
Predet = {s : Str ; s2 : Str; isMWE : Bool; isInflected : Bool}; -- predeterminer (prefixed Quant) e.g. "all"
|
||||||
RP = {s : Res.RCase => Res.Agreement => Str ; rObjVariant2: Res.Agreement => Str} ;
|
RP = {s : Res.RCase => Res.Agreement => Str ; rObjVariant2: Res.Agreement => Str} ;
|
||||||
|
RCl ={
|
||||||
|
s : Str ;
|
||||||
|
subjAgr : Res.Agreement;
|
||||||
|
root : Str;
|
||||||
|
morphs : Res.VFormMini => Res.VerbMorphPos =>Str;
|
||||||
|
compl : Str -- after verb: complement, adverbs
|
||||||
|
} ;
|
||||||
--VV =
|
--VV =
|
||||||
{-
|
{-
|
||||||
--1 Cat: the Category System
|
--1 Cat: the Category System
|
||||||
|
|||||||
@@ -62,26 +62,26 @@ lin
|
|||||||
paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places???
|
paris_PN = mkPN "Paris" (AgP3 Sg N_N) True; --Noun class for places???
|
||||||
|
|
||||||
--Adjectives
|
--Adjectives
|
||||||
bad_A = mkAdjective "bi" False False False; --False means the adjective is a stem and comes after the complete noun
|
bad_A = mkAdjective "bi" Post False False; --False means the adjective is a stem and comes after the complete noun
|
||||||
--beautiful_A = mkAdjective "rungi" False;
|
--beautiful_A = mkAdjective "rungi" False;
|
||||||
big_A = mkAdjective "hango" False False False;
|
big_A = mkAdjective "hango" Post False False;
|
||||||
black_A = mkAdjective "kwirangura" False False False;
|
black_A = mkAdjective "kwirangura" Post False False;
|
||||||
blue_A = mkAdjective "buuru" False True True ;
|
blue_A = mkAdjective "buuru" Post True True ;
|
||||||
clean_A = mkAdjective "yonjo" False False False; --: A ;
|
clean_A = mkAdjective "yonjo" Post False False; --: A ;
|
||||||
cold_A = mkAdjective "rikufuka" False False False; --: A ;
|
cold_A = mkAdjective "rikufuka" Post False False; --: A ;
|
||||||
good_A =mkAdjective "rungi" False False False; --: A ;
|
good_A =mkAdjective "rungi" Post False False; --: A ;
|
||||||
heavy_A = mkAdjective "rikuremeera" False False False; --: A ; --notice ri as a verb is
|
heavy_A = mkAdjective "rikuremeera" Post False False; --: A ; --notice ri as a verb is
|
||||||
hot_A = mkAdjective "rikwotsya" False False False; -- rikutagata -- problematic words like hot we need a new set of clitics
|
hot_A = mkAdjective "rikwotsya" Post False False; -- rikutagata -- problematic words like hot we need a new set of clitics
|
||||||
new_A = mkAdjective "sya" False False False; --: A ;
|
new_A = mkAdjective "sya" Post False False; --: A ;
|
||||||
old_A = mkAdjective "kúru" False False False; --: A ;
|
old_A = mkAdjective "kúru" Post False False; --: A ;
|
||||||
ready_A = mkAdjective "eteekateekire" False False False; --: A ;
|
ready_A = mkAdjective "eteekateekire" Post False False; --: A ;
|
||||||
red_A = mkAdjective "ríkutukura" False False False; --: A ;
|
red_A = mkAdjective "ríkutukura" Post False False; --: A ;
|
||||||
small_A = mkAdjective "kye" False False False;
|
small_A = mkAdjective "kye" Post False False;
|
||||||
warm_A = mkAdjective "rikutagata" False False False;--: A ;
|
warm_A = mkAdjective "rikutagata" Post False False;--: A ;
|
||||||
white_A = mkAdjective "rikwera" False False False;--: A ;
|
white_A = mkAdjective "rikwera" Post False False;--: A ;
|
||||||
yellow_A = mkAdjective "kinekye" False True True;--: A ; or yero, or kyenju
|
yellow_A = mkAdjective "kinekye" Post True True;--: A ; or yero, or kyenju
|
||||||
young_A = mkAdjective "to" False False False;--: A ;
|
young_A = mkAdjective "to" Post False False;--: A ;
|
||||||
green_A =mkAdjective "kijubwe" False False True;
|
green_A =mkAdjective "kijubwe" Post False True;
|
||||||
|
|
||||||
--ditransitive verbs
|
--ditransitive verbs
|
||||||
--bite_V2 = mkV2 "rum";
|
--bite_V2 = mkV2 "rum";
|
||||||
|
|||||||
@@ -25,30 +25,30 @@ lin
|
|||||||
--Noun = {s : NounType=>Number => Str ; nc : NClass} ;
|
--Noun = {s : NounType=>Number => Str ; nc : NClass} ;
|
||||||
--AdjCN ap cn = {s=\\ntype, num=>cn.s!ntype!num ++ ap.s!AgP3 num cn.nc; nc=cn.nc};
|
--AdjCN ap cn = {s=\\ntype, num=>cn.s!ntype!num ++ ap.s!AgP3 num cn.nc; nc=cn.nc};
|
||||||
AdjCN ap cn =
|
AdjCN ap cn =
|
||||||
case <ap.isPre, ap.isProper, > of {
|
case <ap.position1, ap.isProper, > of {
|
||||||
<True, True> => {
|
<Pre, True> => {
|
||||||
s = \\ ns, num =>ap.s ++ cn.s ! ns ! num ;
|
s = \\ ns, num =>ap.s ++ cn.s ! ns ! num ;
|
||||||
gender = cn.gender
|
gender = cn.gender
|
||||||
};
|
};
|
||||||
<False, False> => case ap.isPrep of {
|
<Post, False> => case ap.isPrep of {
|
||||||
False => {
|
False => {
|
||||||
s = \\ ns, num => cn.s ! ns ! num ++ mkAdjPronIVClitic (AgP3 num cn.gender)
|
s = \\ ns, num => cn.s ! ns ! num ++ mkAdjPronIVClitic (AgP3 num cn.gender)
|
||||||
++ ap.post ;
|
++ ap.s;
|
||||||
gender = cn.gender
|
gender = cn.gender
|
||||||
};
|
};
|
||||||
True => {
|
True => {
|
||||||
s = \\ ns, num => (cn.s ! ns ! num) ++
|
s = \\ ns, num => (cn.s ! ns ! num) ++
|
||||||
mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.post ;
|
mkGenPrepNoIVClitic (AgP3 num cn.gender) ++ ap.s ;
|
||||||
gender = cn.gender
|
gender = cn.gender
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
<True, False> => {
|
<Pre, False> => {
|
||||||
s = \\ ns, num => mkAdjPronIVClitic (AgP3 num cn.gender)
|
s = \\ ns, num => mkAdjPronIVClitic (AgP3 num cn.gender)
|
||||||
++ ap.s ++ (cn.s ! ns ! num) ;
|
++ ap.s ++ (cn.s ! ns ! num) ;
|
||||||
gender = cn.gender
|
gender = cn.gender
|
||||||
};
|
};
|
||||||
<False, True> => {
|
<Post, True> => {
|
||||||
s = \\ ns, num => (cn.s ! ns ! num) ++ ap.post ;
|
s = \\ ns, num => (cn.s ! ns ! num) ++ ap.s ;
|
||||||
gender = cn.gender
|
gender = cn.gender
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,31 @@ lin
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
IdRP = {s = mkRPs; rObjVariant2 = mkRObjV2}; --: RP ; -- which
|
IdRP = {s = mkRPs; rObjVariant2 = mkRObjV2}; --: RP ; -- which
|
||||||
|
--RelCl : Cl -> RCl ; -- such that John loves her
|
||||||
|
-- The simplest way to form a relative clause is from a clause by
|
||||||
|
-- a pronoun similar to "such that".
|
||||||
|
RelCl cl = {
|
||||||
|
s = "kugira ngu" ++ cl.s ;
|
||||||
|
subjAgr = cl.subjAgr;
|
||||||
|
root = cl.root;
|
||||||
|
morphs = cl.morphs;
|
||||||
|
compl =cl.compl
|
||||||
|
}; -- such that John loves her. why does it need any case?
|
||||||
|
|
||||||
|
-- The more proper ways are from a verb phrase
|
||||||
|
-- (formed in [``Verb`` Verb.html]) or a sentence
|
||||||
{-
|
-- with a missing noun phrase (formed in [``Sentence`` Sentence.html]).
|
||||||
|
--RelVP : RP -> VP -> RCl ; -- who loves John
|
||||||
|
{-
|
||||||
|
RelVP rp vp ={
|
||||||
|
s = [];
|
||||||
|
subjAgr = cl.subjAgr;
|
||||||
|
root = cl.root;
|
||||||
|
morphs = cl.morphs;
|
||||||
|
compl =cl.compl
|
||||||
|
};
|
||||||
|
-}
|
||||||
|
{-
|
||||||
--1 Relative clauses and pronouns
|
--1 Relative clauses and pronouns
|
||||||
|
|
||||||
abstract Relative = Cat ** {
|
abstract Relative = Cat ** {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ param
|
|||||||
Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number ;
|
Agreement = AgP3 Number Gender | AgMUBAP1 Number |AgMUBAP2 Number ;
|
||||||
AgrExist = AgrNo | AgrYes Agreement;
|
AgrExist = AgrNo | AgrYes Agreement;
|
||||||
Position = PostDeterminer | PreDeterminer ;
|
Position = PostDeterminer | PreDeterminer ;
|
||||||
|
Position1 = Post | Pre;
|
||||||
Variants = V1|V2;
|
Variants = V1|V2;
|
||||||
--Functional forms of the regular verb
|
--Functional forms of the regular verb
|
||||||
Mood = Infinitive | Imperative | Subjunctive | Perfective;
|
Mood = Infinitive | Imperative | Subjunctive | Perfective;
|
||||||
@@ -337,13 +338,12 @@ oper
|
|||||||
using arne's technique
|
using arne's technique
|
||||||
-}
|
-}
|
||||||
--AdjectivalPhrase : Type {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;
|
--AdjectivalPhrase : Type {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool} ;
|
||||||
AdjectivalPhrase : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
AdjectivalPhrase : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||||
Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
--Adjective : Type = {s : Str ; post : Str; isPre : Bool; isProper : Bool; isPrep: Bool};
|
||||||
mkAdjective: Str -> Bool -> Bool -> Bool -> Adjective = \ a , isPre, isProper, isPrep -> case isPre of {
|
Adjective : Type = {s : Str ; position1 : Position1; isProper : Bool; isPrep: Bool};
|
||||||
True => { s = a ; post = [] ; isPre = True; isProper = isProper; isPrep = isPrep};
|
mkAdjective: Str -> Position1 -> Bool -> Bool -> Adjective = \ a , pos, isProper, isPrep ->
|
||||||
--this is supposed to be a concatenation use bind and I will do so later
|
{ s = a ; position1 = pos ; isPre = True; isProper = isProper; isPrep = isPrep};
|
||||||
False => { s = [] ; post = a; isPre = False; isProper = isProper; isPrep = isPrep} -- requires agreement later
|
|
||||||
};
|
|
||||||
{-
|
{-
|
||||||
TO DO:
|
TO DO:
|
||||||
--Subject prefixes / particles of clitics using bind
|
--Subject prefixes / particles of clitics using bind
|
||||||
@@ -1010,7 +1010,7 @@ oper
|
|||||||
-- which is the Objects, NPs PPs APs etc.
|
-- which is the Objects, NPs PPs APs etc.
|
||||||
-}
|
-}
|
||||||
Clause : Type = { -- word order is fixed in S and QS
|
Clause : Type = { -- word order is fixed in S and QS
|
||||||
subj : Str ;
|
s : Str ;
|
||||||
subjAgr : Agreement;
|
subjAgr : Agreement;
|
||||||
root : Str;
|
root : Str;
|
||||||
morphs : VFormMini => VerbMorphPos =>Str;
|
morphs : VFormMini => VerbMorphPos =>Str;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ lin
|
|||||||
--2 Sentences
|
--2 Sentences
|
||||||
--UseCl : Temp -> Pol -> Cl -> S ; -- she had not slept
|
--UseCl : Temp -> Pol -> Cl -> S ; -- she had not slept
|
||||||
UseCl temp pol cl = let
|
UseCl temp pol cl = let
|
||||||
subj = cl.subj;
|
subj = cl.s;
|
||||||
clitic = mkSubjClitic cl.subjAgr;
|
clitic = mkSubjClitic cl.subjAgr;
|
||||||
simul = cl.morphs ! VFPres; --this is not delivering the string
|
simul = cl.morphs ! VFPres; --this is not delivering the string
|
||||||
ant = cl.morphs ! VFPastPart; --this is not delivering the string
|
ant = cl.morphs ! VFPastPart; --this is not delivering the string
|
||||||
@@ -37,7 +37,7 @@ UseQCl = UseCl; -- : Temp -> Pol -> Cl -> S ; -- John has not walked
|
|||||||
QuestCl cl = cl; --: Cl -> QCl ; -- does John (not) walk
|
QuestCl cl = cl; --: Cl -> QCl ; -- does John (not) walk
|
||||||
PredVP np vp = case vp.isCompApStem of{
|
PredVP np vp = case vp.isCompApStem of{
|
||||||
False => {
|
False => {
|
||||||
subj = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||||
subjAgr = np.agr;
|
subjAgr = np.agr;
|
||||||
root = vp.s;
|
root = vp.s;
|
||||||
morphs = vp.morphs;
|
morphs = vp.morphs;
|
||||||
@@ -52,7 +52,7 @@ PredVP np vp = case vp.isCompApStem of{
|
|||||||
compl = vp.comp
|
compl = vp.comp
|
||||||
};
|
};
|
||||||
True => {
|
True => {
|
||||||
subj = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
s = np.s ! Nom; --: NP -> VP -> Cl ; -- John walks / John does not walk
|
||||||
subjAgr = np.agr;
|
subjAgr = np.agr;
|
||||||
root = vp.s;
|
root = vp.s;
|
||||||
morphs = vp.morphs;
|
morphs = vp.morphs;
|
||||||
|
|||||||
Reference in New Issue
Block a user