mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-31 18:58:55 -06:00
Faroese grammar
This commit is contained in:
@@ -4,4 +4,29 @@ lin
|
||||
ComparA a np = {
|
||||
s = \\g,n,c => "meir" ++ a.s ! g ! n ! c ++ "enn" ++ np.s ! Nom
|
||||
} ;
|
||||
ComplA2 a np = {
|
||||
s = \\g,n,c => a.s ! g ! n ! c ++ a.c2.s ++ np.s ! a.c2.c
|
||||
} ;
|
||||
ReflA2 a = {
|
||||
s = \\g,n,c => a.s ! g ! n ! c ++ a.c2.s ++ "seg"
|
||||
} ;
|
||||
UseA2 a = a ;
|
||||
UseComparA a = {
|
||||
s = \\g,n,c => "meir" ++ a.s ! g ! n ! c
|
||||
} ;
|
||||
CAdvAP cadv ap np = {
|
||||
s = \\g,n,c => cadv.s ++ ap.s ! g ! n ! c ++ cadv.p ++ np.s ! Nom
|
||||
} ;
|
||||
AdjOrd ord = {
|
||||
s = ord.s
|
||||
} ;
|
||||
SentAP ap sc = {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ sc.s
|
||||
} ;
|
||||
AdAP ada ap = {
|
||||
s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c
|
||||
} ;
|
||||
AdvAP ap adv = {
|
||||
s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s
|
||||
} ;
|
||||
}
|
||||
|
||||
13
src/faroese/AdverbFao.gf
Normal file
13
src/faroese/AdverbFao.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
concrete AdverbFao of Adverb = CatFao ** open Prelude,ResFao in {
|
||||
flags
|
||||
coding = "UTF-8" ;
|
||||
lin
|
||||
PositAdvAdj a = {s = a.s ! Neuter ! Sg ! Nom} ;
|
||||
PrepNP p np = {s = p.s ++ np.s ! p.c} ;
|
||||
ComparAdvAdj cadv a np = {s = cadv.s ++ a.s ! Neuter ! Sg ! Nom ++ cadv.p ++ np.s ! Nom} ;
|
||||
ComparAdvAdjS cadv a s = {s = cadv.s ++ a.s ! Neuter ! Sg ! Nom ++ cadv.p ++ s.s} ;
|
||||
AdAdv ada adv = {s = ada.s ++ adv.s} ;
|
||||
PositAdAAdj a = {s = a.s ! Neuter ! Sg ! Nom} ;
|
||||
SubjS subj s = {s = subj.s ++ s.s} ;
|
||||
AdnCAdv cadv = {s = cadv.s} ;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete CatFao of Cat = CommonX ** open ResFao in {
|
||||
concrete CatFao of Cat = CommonX ** open ResFao, Prelude in {
|
||||
|
||||
lincat N = Noun ;
|
||||
lincat N2 = Noun ** {c2 : Compl} ;
|
||||
@@ -10,20 +10,39 @@ lincat VV,VS,VQ,VA = Verb ;
|
||||
lincat V2 = Verb ** {c2 : Compl} ;
|
||||
lincat V3,V2A,V2S,V2Q,V2V = Verb ** {c2,c3 : Compl} ;
|
||||
lincat VP = VerbPhrase ;
|
||||
lincat VPSlash = Verb ** {c2 : Compl} ;
|
||||
lincat VPSlash = Verb ** {c2 : Compl ; sc : Str} ;
|
||||
lincat Comp = {s : Gender => Number => Str} ;
|
||||
lincat Cl = Clause ;
|
||||
lincat ClSlash = {s : Tense => Polarity => Str ; c2 : Compl} ;
|
||||
lincat SSlash = {s : Str ; c2 : Compl} ;
|
||||
lincat Imp = {s : Polarity => Number => Str} ;
|
||||
lincat Prep = Compl ;
|
||||
lincat CN = CommonNoun ;
|
||||
lincat NP, Pron = {s : Case => Str ; g : Gender ; n : Number ; p : Person} ;
|
||||
lincat QS = {s : Str} ;
|
||||
lincat QCl = {s : Tense => Polarity => Str} ;
|
||||
lincat IP = {s : Str ; n : Number} ;
|
||||
lincat IComp = {s : Str} ;
|
||||
lincat IDet = {s : Str ; n : Number} ;
|
||||
lincat IQuant = {s : Str} ;
|
||||
lincat RCl = {s : Tense => Polarity => Gender => PersNum => Str} ;
|
||||
lincat RS = {s : Gender => PersNum => Str} ;
|
||||
lincat RP = {s : Str} ;
|
||||
lincat AP = AdjPhrase ;
|
||||
lincat Det = {s : Gender => Case => Str ; n : Number ; sp : Species} ;
|
||||
lincat Quant = {s : Gender => Number => Case => Str ; sp : Species} ;
|
||||
lincat Num = {s : Gender => Case => Str ; n : Number} ;
|
||||
lincat Predet = {s : Str} ;
|
||||
lincat Quant = {s : Bool => Gender => Number => Case => Str; sp : Species} ;
|
||||
lincat Num = {s : Gender => Case => Str ; n : Number ; hasCard : Bool} ;
|
||||
lincat Card = {s : Gender => Case => Str ; n : Number} ;
|
||||
lincat ACard = {s : Str} ;
|
||||
lincat Ord = {s : Gender => Number => Case => Str} ;
|
||||
lincat DAP = {s : Gender => Case => Str ; n : Number ; sp : Species} ;
|
||||
lincat S = {s : Str} ;
|
||||
lincat Numeral = {s : Gender => Case => Str ; n : Number} ;
|
||||
lincat Digits = {s : Str ; n : Number} ;
|
||||
lincat Decimal = {s : Str ; n : Number ; hasDot : Bool} ;
|
||||
lincat Conj = {s : Str} ;
|
||||
lincat Subj = {s : Str} ;
|
||||
|
||||
lincat LN,SN,GN,PN = {s : Str} ;
|
||||
|
||||
|
||||
53
src/faroese/ConjunctionFao.gf
Normal file
53
src/faroese/ConjunctionFao.gf
Normal file
@@ -0,0 +1,53 @@
|
||||
concrete ConjunctionFao of Conjunction = CatFao ** open ResFao, Prelude in {
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[RS] = {s1,s2 : Gender => PersNum => Str} ;
|
||||
[Adv], [AdV], [IAdv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Case => Str ; g : Gender ; n : Number ; p : Person} ;
|
||||
[AP] = {s1,s2 : Gender => Number => Case => Str} ;
|
||||
[CN] = {s1,s2 : Species => Number => Case => Str ; g : Gender} ;
|
||||
[DAP] = {s1,s2 : Gender => Case => Str ; n : Number ; sp : Species} ;
|
||||
|
||||
lin
|
||||
ConjS conj xs = {s = xs.s1 ++ conj.s ++ xs.s2} ;
|
||||
ConjRS conj xs = {s = \\g,p => xs.s1 ! g ! p ++ conj.s ++ xs.s2 ! g ! p} ;
|
||||
ConjAdv conj xs = {s = xs.s1 ++ conj.s ++ xs.s2} ;
|
||||
ConjAdV conj xs = {s = xs.s1 ++ conj.s ++ xs.s2} ;
|
||||
ConjIAdv conj xs = {s = xs.s1 ++ conj.s ++ xs.s2} ;
|
||||
ConjNP conj xs = {
|
||||
s = \\c => xs.s1 ! c ++ conj.s ++ xs.s2 ! c ;
|
||||
g = xs.g ;
|
||||
n = Pl ;
|
||||
p = P3
|
||||
} ;
|
||||
ConjAP conj xs = {s = \\g,n,c => xs.s1 ! g ! n ! c ++ conj.s ++ xs.s2 ! g ! n ! c} ;
|
||||
ConjCN conj xs = {
|
||||
s = \\sp,n,c => xs.s1 ! sp ! n ! c ++ conj.s ++ xs.s2 ! sp ! n ! c ;
|
||||
g = xs.g
|
||||
} ;
|
||||
ConjDet conj xs = {
|
||||
s = \\g,c => xs.s1 ! g ! c ++ conj.s ++ xs.s2 ! g ! c ;
|
||||
n = xs.n ;
|
||||
sp = xs.sp
|
||||
} ;
|
||||
|
||||
BaseS x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsS x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||
BaseRS x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsRS x xs = {s1 = \\g,p => x.s ! g ! p ++ "," ++ xs.s1 ! g ! p ; s2 = xs.s2} ;
|
||||
BaseAdv x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsAdv x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||
BaseAdV x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsAdV x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||
BaseIAdv x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsIAdv x xs = {s1 = x.s ++ "," ++ xs.s1 ; s2 = xs.s2} ;
|
||||
BaseNP x y = {s1 = x.s ; s2 = y.s ; g = x.g ; n = Pl ; p = P3} ;
|
||||
ConsNP x xs = {s1 = \\c => x.s ! c ++ "," ++ xs.s1 ! c ; s2 = xs.s2 ; g = xs.g ; n = Pl ; p = P3} ;
|
||||
BaseAP x y = {s1 = x.s ; s2 = y.s} ;
|
||||
ConsAP x xs = {s1 = \\g,n,c => x.s ! g ! n ! c ++ "," ++ xs.s1 ! g ! n ! c ; s2 = xs.s2} ;
|
||||
BaseCN x y = {s1 = x.s ; s2 = y.s ; g = x.g} ;
|
||||
ConsCN x xs = {s1 = \\sp,n,c => x.s ! sp ! n ! c ++ "," ++ xs.s1 ! sp ! n ! c ; s2 = xs.s2 ; g = xs.g} ;
|
||||
BaseDAP x y = {s1 = x.s ; s2 = y.s ; n = y.n ; sp = y.sp} ;
|
||||
ConsDAP x xs = {s1 = \\g,c => x.s ! g ! c ++ "," ++ xs.s1 ! g ! c ; s2 = xs.s2 ; n = xs.n ; sp = xs.sp} ;
|
||||
}
|
||||
173
src/faroese/ConstructionFao.gf
Normal file
173
src/faroese/ConstructionFao.gf
Normal file
@@ -0,0 +1,173 @@
|
||||
concrete ConstructionFao of Construction = CatFao ** open ResFao, ParadigmsFao in {
|
||||
|
||||
lincat
|
||||
Timeunit, Hour, Weekday, Month, Monthday, Year, Language = {s : Str} ;
|
||||
|
||||
lin
|
||||
hungry_VP = beVP "svangur" ;
|
||||
thirsty_VP = beVP "tystur" ;
|
||||
tired_VP = beVP "troyttur" ;
|
||||
scared_VP = beVP "bangin" ;
|
||||
ill_VP = beVP "sjúkur" ;
|
||||
ready_VP = beVP "klárur" ;
|
||||
has_age_VP card = beVP (cardStr card ++ "ára gamal") ;
|
||||
have_name_Cl np name = {
|
||||
Converb = np.s ! Nom ++ "eitur" ++ name.s ! Nom ;
|
||||
Indicative = \\t,pol => np.s ! Nom ++ "eitur" ++ negStr pol ++ name.s ! Nom ;
|
||||
Nonfinite = np.s ! Nom ++ "eita" ++ name.s ! Nom ;
|
||||
Participle = \\_ => np.s ! Nom ++ "itið" ++ name.s ! Nom
|
||||
} ;
|
||||
married_Cl np spouse = {
|
||||
Converb = np.s ! Nom ++ "er giftur við" ++ spouse.s ! Dat ;
|
||||
Indicative = \\t,pol => np.s ! Nom ++ copula ! t ! persNum np.n np.p ++ negStr pol ++ "giftur við" ++ spouse.s ! Dat ;
|
||||
Nonfinite = np.s ! Nom ++ "vera giftur við" ++ spouse.s ! Dat ;
|
||||
Participle = \\_ => np.s ! Nom ++ "verið giftur við" ++ spouse.s ! Dat
|
||||
} ;
|
||||
what_name_QCl np = {
|
||||
s = \\t,pol => "hvat" ++ "eitur" ++ np.s ! Nom
|
||||
} ;
|
||||
how_old_QCl np = {
|
||||
s = \\t,pol => "hvussu gamal" ++ copula ! t ! persNum np.n np.p ++ negStr pol ++ np.s ! Nom
|
||||
} ;
|
||||
how_far_QCl np = {
|
||||
s = \\t,pol => "hvussu langt burtur" ++ copula ! t ! persNum np.n np.p ++ negStr pol ++ np.s ! Nom
|
||||
} ;
|
||||
weather_adjCl ap = {
|
||||
Converb = "tað er" ++ ap.s ! Neuter ! Sg ! Nom ;
|
||||
Indicative = \\t,pol => "tað" ++ copula ! t ! PSg P3 ++ negStr pol ++ ap.s ! Neuter ! Sg ! Nom ;
|
||||
Nonfinite = "vera" ++ ap.s ! Neuter ! Sg ! Nom ;
|
||||
Participle = \\_ => "verið" ++ ap.s ! Neuter ! Sg ! Nom
|
||||
} ;
|
||||
is_right_VP = beVP "rættur" ;
|
||||
is_wrong_VP = beVP "skeivur" ;
|
||||
n_units_AP card cn a = {
|
||||
s = \\g,n,c => card.s ! cn.g ! Nom ++ cn.s ! Indef ! Pl ! Nom ++ a.s ! g ! n ! c
|
||||
} ;
|
||||
n_units_of_NP card cn np = mkNP (card.s ! cn.g ! Nom ++ cn.s ! Indef ! Pl ! Nom ++ "av" ++ np.s ! Dat) np.g np.n np.p ;
|
||||
n_unit_CN card unit cn = mkCN (card.s ! unit.g ! Nom ++ unit.s ! Indef ! Sg ! Nom ++ cn.s ! Indef ! Sg ! Nom) cn.g ;
|
||||
bottle_of_CN np = mkCN ("fløska av" ++ np.s ! Dat) Fem ;
|
||||
cup_of_CN np = mkCN ("koppur av" ++ np.s ! Dat) Masc ;
|
||||
glass_of_CN np = mkCN ("glas av" ++ np.s ! Dat) Neuter ;
|
||||
few_X_short_of_Y np x y = {s = np.s ! Nom ++ "vantar nakrar" ++ x.s ! Indef ! Pl ! Acc ++ "í" ++ y.s ! Def ! Sg ! Acc} ;
|
||||
|
||||
timeunitAdv card unit = {s = "í" ++ cardStr card ++ unit.s} ;
|
||||
timeunitRange c1 c2 unit = {s = "í" ++ cardStr c1 ++ "til" ++ cardStr c2 ++ unit.s} ;
|
||||
oneHour = {s = "eitt"} ;
|
||||
twoHour = {s = "tvey"} ;
|
||||
threeHour = {s = "trý"} ;
|
||||
fourHour = {s = "fýra"} ;
|
||||
fiveHour = {s = "fimm"} ;
|
||||
sixHour = {s = "seks"} ;
|
||||
sevenHour = {s = "sjey"} ;
|
||||
eightHour = {s = "átta"} ;
|
||||
nineHour = {s = "níggju"} ;
|
||||
tenHour = {s = "tíggju"} ;
|
||||
elevenHour = {s = "ellivu"} ;
|
||||
twelveHour = {s = "tólv"} ;
|
||||
thirteenHour = {s = "trettan"} ;
|
||||
fourteenHour = {s = "fjúrtan"} ;
|
||||
fifteenHour = {s = "fimtan"} ;
|
||||
sixteenHour = {s = "sekstan"} ;
|
||||
seventeenHour = {s = "seytjan"} ;
|
||||
eighteenHour = {s = "átjan"} ;
|
||||
nineteenHour = {s = "nítjan"} ;
|
||||
twentyHour = {s = "tjúgu"} ;
|
||||
twentyOneHour = {s = "tjúgueitt"} ;
|
||||
twentyTwoHour = {s = "tjúgutvey"} ;
|
||||
twentyThreeHour = {s = "tjúgutrý"} ;
|
||||
twentyFourHour = {s = "tjúgufýra"} ;
|
||||
timeHour h = {s = "klokkan" ++ h.s} ;
|
||||
timeHourMinute h m = {s = "klokkan" ++ h.s ++ cardStr m} ;
|
||||
weekdayPunctualAdv w = {s = w.s} ;
|
||||
weekdayHabitualAdv w = {s = w.s} ;
|
||||
weekdayLastAdv w = {s = "seinasta" ++ w.s} ;
|
||||
weekdayNextAdv w = {s = "næsta" ++ w.s} ;
|
||||
monthAdv m = {s = "í" ++ m.s} ;
|
||||
yearAdv y = {s = "í" ++ y.s} ;
|
||||
dayMonthAdv d m = {s = d.s ++ m.s} ;
|
||||
monthYearAdv m y = {s = m.s ++ y.s} ;
|
||||
dayMonthYearAdv d m y = {s = d.s ++ m.s ++ y.s} ;
|
||||
intYear i = {s = i.s} ;
|
||||
intMonthday i = {s = i.s} ;
|
||||
InLanguage l = {s = "á" ++ l.s} ;
|
||||
weekdayN w = mkCN w.s Masc ;
|
||||
monthN m = mkCN m.s Masc ;
|
||||
weekdayPN w = {s = w.s} ;
|
||||
monthPN m = {s = m.s} ;
|
||||
languageNP l = mkNP l.s Neuter Sg P3 ;
|
||||
languageCN l = mkCN l.s Neuter ;
|
||||
|
||||
second_Timeunit = {s = "sekund"} ;
|
||||
minute_Timeunit = {s = "minutt"} ;
|
||||
hour_Timeunit = {s = "tími"} ;
|
||||
day_Timeunit = {s = "dagur"} ;
|
||||
week_Timeunit = {s = "vika"} ;
|
||||
month_Timeunit = {s = "mánaður"} ;
|
||||
year_Timeunit = {s = "ár"} ;
|
||||
monday_Weekday = {s = "mánadagur"} ;
|
||||
tuesday_Weekday = {s = "týsdagur"} ;
|
||||
wednesday_Weekday = {s = "mikudagur"} ;
|
||||
thursday_Weekday = {s = "hósdagur"} ;
|
||||
friday_Weekday = {s = "fríggjadagur"} ;
|
||||
saturday_Weekday = {s = "leygardagur"} ;
|
||||
sunday_Weekday = {s = "sunnudagur"} ;
|
||||
january_Month = {s = "januar"} ;
|
||||
february_Month = {s = "februar"} ;
|
||||
march_Month = {s = "mars"} ;
|
||||
april_Month = {s = "apríl"} ;
|
||||
may_Month = {s = "mai"} ;
|
||||
june_Month = {s = "juni"} ;
|
||||
july_Month = {s = "juli"} ;
|
||||
august_Month = {s = "august"} ;
|
||||
september_Month = {s = "september"} ;
|
||||
october_Month = {s = "oktober"} ;
|
||||
november_Month = {s = "november"} ;
|
||||
december_Month = {s = "desember"} ;
|
||||
|
||||
afrikaans_Language = {s = "afrikaans"} ;
|
||||
amharic_Language = {s = "amhariskt"} ;
|
||||
arabic_Language = {s = "arabiskt"} ;
|
||||
bulgarian_Language = {s = "bulgarskt"} ;
|
||||
catalan_Language = {s = "katalanskt"} ;
|
||||
chinese_Language = {s = "kinesiskt"} ;
|
||||
danish_Language = {s = "danskt"} ;
|
||||
dutch_Language = {s = "hollendskt"} ;
|
||||
english_Language = {s = "enskt"} ;
|
||||
estonian_Language = {s = "estiskt"} ;
|
||||
finnish_Language = {s = "finskt"} ;
|
||||
french_Language = {s = "franskt"} ;
|
||||
german_Language = {s = "týskt"} ;
|
||||
greek_Language = {s = "grikskt"} ;
|
||||
hebrew_Language = {s = "hebraiskt"} ;
|
||||
hindi_Language = {s = "hindi"} ;
|
||||
japanese_Language = {s = "japanskt"} ;
|
||||
italian_Language = {s = "italskt"} ;
|
||||
latin_Language = {s = "latín"} ;
|
||||
latvian_Language = {s = "lettiskt"} ;
|
||||
maltese_Language = {s = "maltesiskt"} ;
|
||||
nepali_Language = {s = "nepalskt"} ;
|
||||
norwegian_Language = {s = "norskt"} ;
|
||||
persian_Language = {s = "persiskt"} ;
|
||||
polish_Language = {s = "pólskt"} ;
|
||||
punjabi_Language = {s = "punjabi"} ;
|
||||
romanian_Language = {s = "rumenskt"} ;
|
||||
russian_Language = {s = "russiskt"} ;
|
||||
sindhi_Language = {s = "sindhi"} ;
|
||||
spanish_Language = {s = "spanskt"} ;
|
||||
swahili_Language = {s = "swahili"} ;
|
||||
swedish_Language = {s = "svenskt"} ;
|
||||
thai_Language = {s = "tailendskt"} ;
|
||||
turkish_Language = {s = "turkiskt"} ;
|
||||
urdu_Language = {s = "urdu"} ;
|
||||
|
||||
oper
|
||||
beVP : Str -> VerbPhrase = \ap -> {
|
||||
Converb = copula ! Pres ! PPl ++ ap ;
|
||||
Indicative = \\t,pol,_,p => copula ! t ! p ++ negStr pol ++ ap ;
|
||||
Nonfinite = "vera" ++ ap ;
|
||||
Participle = \\_ => "verið" ++ ap
|
||||
} ;
|
||||
|
||||
cardStr : Card -> Str = \card ->
|
||||
card.s ! Neuter ! Nom ;
|
||||
}
|
||||
@@ -1,6 +1,21 @@
|
||||
concrete ExtendFao of Extend = CatFao **
|
||||
open ParadigmsFao, ResFao in {
|
||||
|
||||
lincat
|
||||
VPS = {s : Gender => PersNum => Str} ;
|
||||
[VPS] = {s1,s2 : Gender => PersNum => Str} ;
|
||||
VPI = {s : Str} ;
|
||||
[VPI] = {s1,s2 : Str} ;
|
||||
VPS2 = {s : Gender => PersNum => Str ; c2 : Compl ; sc : Str} ;
|
||||
[VPS2] = {s1,s2 : Gender => PersNum => Str ; c2 : Compl ; sc : Str} ;
|
||||
VPI2 = {s : Str ; c2 : Compl ; sc : Str} ;
|
||||
[VPI2] = {s1,s2 : Str ; c2 : Compl ; sc : Str} ;
|
||||
[Comp] = {s1,s2 : Gender => Number => Str} ;
|
||||
[Imp] = {s1,s2 : Polarity => Number => Str} ;
|
||||
RNP = {s : Case => Str ; g : Gender ; n : Number ; p : Person} ;
|
||||
RNPList = {s1,s2 : Case => Str ; g : Gender ; n : Number ; p : Person} ;
|
||||
X = {s : Str} ;
|
||||
|
||||
lin
|
||||
iFem_Pron = mkPron "eg" "meg" "mær" "mín" Masc Sg P1 ;
|
||||
youFem_Pron = mkPron "tú" "teg" "tær" "tín" Masc Sg P2 ;
|
||||
|
||||
@@ -4,7 +4,13 @@ concrete GrammarFao of Grammar =
|
||||
NounFao,
|
||||
VerbFao,
|
||||
AdjectiveFao,
|
||||
AdverbFao,
|
||||
NumeralFao,
|
||||
SentenceFao,
|
||||
QuestionFao,
|
||||
RelativeFao,
|
||||
StructuralFao ** {
|
||||
ConjunctionFao,
|
||||
StructuralFao,
|
||||
IdiomFao,
|
||||
NamesFao ** {
|
||||
}
|
||||
|
||||
62
src/faroese/IdiomFao.gf
Normal file
62
src/faroese/IdiomFao.gf
Normal file
@@ -0,0 +1,62 @@
|
||||
concrete IdiomFao of Idiom = CatFao ** open ResFao in {
|
||||
|
||||
lin
|
||||
ImpersCl vp = {
|
||||
Converb = "tað" ++ vp.Converb ;
|
||||
Indicative = \\t,pol => "tað" ++ vp.Indicative ! t ! pol ! Neuter ! PSg P3 ;
|
||||
Nonfinite = "tað" ++ vp.Nonfinite ;
|
||||
Participle = \\t => "tað" ++ vp.Participle ! t
|
||||
} ;
|
||||
GenericCl vp = {
|
||||
Converb = "mann" ++ vp.Converb ;
|
||||
Indicative = \\t,pol => "mann" ++ vp.Indicative ! t ! pol ! Masc ! PSg P3 ;
|
||||
Nonfinite = "mann" ++ vp.Nonfinite ;
|
||||
Participle = \\t => "mann" ++ vp.Participle ! t
|
||||
} ;
|
||||
CleftNP np rs = {
|
||||
Converb = "tað er" ++ np.s ! Nom ++ rs.s ! np.g ! persNum np.n np.p ;
|
||||
Indicative = \\t,pol => "tað" ++ copula ! t ! PSg P3 ++ negStr pol ++ np.s ! Nom ++ rs.s ! np.g ! persNum np.n np.p ;
|
||||
Nonfinite = "vera" ++ np.s ! Nom ++ rs.s ! np.g ! persNum np.n np.p ;
|
||||
Participle = \\_ => "verið" ++ np.s ! Nom ++ rs.s ! np.g ! persNum np.n np.p
|
||||
} ;
|
||||
CleftAdv adv s = {
|
||||
Converb = "tað er" ++ adv.s ++ s.s ;
|
||||
Indicative = \\t,pol => "tað" ++ copula ! t ! PSg P3 ++ negStr pol ++ adv.s ++ s.s ;
|
||||
Nonfinite = "vera" ++ adv.s ++ s.s ;
|
||||
Participle = \\_ => "verið" ++ adv.s ++ s.s
|
||||
} ;
|
||||
ExistNP np = {
|
||||
Converb = "tað er" ++ np.s ! Nom ;
|
||||
Indicative = \\t,pol => "tað" ++ copula ! t ! persNum np.n P3 ++ negStr pol ++ np.s ! Nom ;
|
||||
Nonfinite = "vera" ++ np.s ! Nom ;
|
||||
Participle = \\_ => "verið" ++ np.s ! Nom
|
||||
} ;
|
||||
ExistIP ip = {
|
||||
s = \\t,pol => "hvat" ++ copula ! t ! persNum ip.n P3 ++ negStr pol
|
||||
} ;
|
||||
ExistNPAdv np adv = {
|
||||
Converb = "tað er" ++ np.s ! Nom ++ adv.s ;
|
||||
Indicative = \\t,pol => "tað" ++ copula ! t ! persNum np.n P3 ++ negStr pol ++ np.s ! Nom ++ adv.s ;
|
||||
Nonfinite = "vera" ++ np.s ! Nom ++ adv.s ;
|
||||
Participle = \\_ => "verið" ++ np.s ! Nom ++ adv.s
|
||||
} ;
|
||||
ExistIPAdv ip adv = {
|
||||
s = \\t,pol => ip.s ++ copula ! t ! persNum ip.n P3 ++ negStr pol ++ adv.s
|
||||
} ;
|
||||
ProgrVP vp = {
|
||||
Converb = "vera við at" ++ vp.Nonfinite ;
|
||||
Indicative = \\t,pol,g,p => copula ! t ! p ++ negStr pol ++ "við at" ++ vp.Nonfinite ;
|
||||
Nonfinite = "vera við at" ++ vp.Nonfinite ;
|
||||
Participle = \\_ => "verið við at" ++ vp.Nonfinite
|
||||
} ;
|
||||
ImpPl1 vp = {s = "lat okkum" ++ vp.Nonfinite} ;
|
||||
ImpP3 np vp = {s = "lat" ++ np.s ! Acc ++ vp.Nonfinite} ;
|
||||
SelfAdvVP vp = vp ** {
|
||||
Converb = vp.Converb ++ "sjálvur" ;
|
||||
Indicative = \\t,pol,g,p => vp.Indicative ! t ! pol ! g ! p ++ "sjálvur" ;
|
||||
Nonfinite = vp.Nonfinite ++ "sjálvur" ;
|
||||
Participle = \\t => vp.Participle ! t ++ "sjálvur"
|
||||
} ;
|
||||
SelfAdVVP = SelfAdvVP ;
|
||||
SelfNP np = np ** {s = \\c => np.s ! c ++ "sjálvur"} ;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
concrete LangFao of Lang =
|
||||
GrammarFao,
|
||||
LexiconFao
|
||||
,ConstructionFao
|
||||
,DocumentationFao --# notpresent
|
||||
** {
|
||||
|
||||
|
||||
@@ -600,18 +600,18 @@ mkN016 base =
|
||||
Gen => base_1+"ar"
|
||||
} ;
|
||||
Pl => table {
|
||||
Nom => base_1+"urin" ;
|
||||
Acc => base_1+"in" ;
|
||||
Dat => base_1+"inum" ;
|
||||
Gen => base_1+"arins"
|
||||
}
|
||||
} ;
|
||||
Def => table {
|
||||
Sg => table {
|
||||
Nom => nonExist ;
|
||||
Acc => nonExist ;
|
||||
Dat => nonExist ;
|
||||
Gen => nonExist
|
||||
}
|
||||
} ;
|
||||
Def => table {
|
||||
Sg => table {
|
||||
Nom => base_1+"urin" ;
|
||||
Acc => base_1+"in" ;
|
||||
Dat => base_1+"inum" ;
|
||||
Gen => base_1+"arins"
|
||||
} ;
|
||||
Pl => table {
|
||||
Nom => nonExist ;
|
||||
@@ -5670,18 +5670,18 @@ mkN146 base =
|
||||
Gen => base_1+"s"
|
||||
} ;
|
||||
Pl => table {
|
||||
Nom => base_1+"kurin" ;
|
||||
Acc => base_1+"kin" ;
|
||||
Dat => base_1+"kinum" ;
|
||||
Gen => base_1+"sins"
|
||||
}
|
||||
} ;
|
||||
Def => table {
|
||||
Sg => table {
|
||||
Nom => nonExist ;
|
||||
Acc => nonExist ;
|
||||
Dat => nonExist ;
|
||||
Gen => nonExist
|
||||
}
|
||||
} ;
|
||||
Def => table {
|
||||
Sg => table {
|
||||
Nom => base_1+"kurin" ;
|
||||
Acc => base_1+"kin" ;
|
||||
Dat => base_1+"kinum" ;
|
||||
Gen => base_1+"sins"
|
||||
} ;
|
||||
Pl => table {
|
||||
Nom => nonExist ;
|
||||
|
||||
14
src/faroese/NamesFao.gf
Normal file
14
src/faroese/NamesFao.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
concrete NamesFao of Names = CatFao ** open ResFao in {
|
||||
|
||||
lin
|
||||
GivenName gn = mkNP gn.s Masc Sg P3 ;
|
||||
MaleSurname sn = mkNP sn.s Masc Sg P3 ;
|
||||
FemaleSurname sn = mkNP sn.s Fem Sg P3 ;
|
||||
PlSurname sn = mkNP sn.s Masc Pl P3 ;
|
||||
FullName gn sn = mkNP (gn.s ++ sn.s) Masc Sg P3 ;
|
||||
|
||||
UseLN ln = mkNP ln.s Neuter Sg P3 ;
|
||||
PlainLN ln = mkNP ln.s Neuter Sg P3 ;
|
||||
InLN ln = {s = "í" ++ ln.s} ;
|
||||
AdjLN ap ln = {s = ap.s ! Neuter ! Sg ! Nom ++ ln.s} ;
|
||||
}
|
||||
@@ -1,9 +1,31 @@
|
||||
concrete NounFao of Noun = CatFao ** open ResFao in {
|
||||
concrete NounFao of Noun = CatFao ** open ResFao, Prelude in {
|
||||
lin
|
||||
UseN n = n ;
|
||||
UseN2 n = n ;
|
||||
Use2N3 n = n ** {c2 = n.c2} ;
|
||||
Use3N3 n = n ** {c2 = n.c3} ;
|
||||
UsePN pn = mkNP pn.s Masc Sg P3 ;
|
||||
UsePron p = p ;
|
||||
RelNP np rs =
|
||||
np ** {s = \\c => np.s ! c ++ "," ++ rs.s ! np.g ! persNum np.n np.p} ;
|
||||
DetNP det = {
|
||||
s = \\c => det.s ! Masc ! c ;
|
||||
g = Masc ;
|
||||
n = det.n ;
|
||||
p = P3
|
||||
} ;
|
||||
PredetNP pred np = np ** {
|
||||
s = \\c => pred.s ++ np.s ! c
|
||||
} ;
|
||||
PPartNP np v2 = np ** {
|
||||
s = \\c => np.s ! c ++ v2.Participle ! Past
|
||||
} ;
|
||||
AdvNP np adv = np ** {
|
||||
s = \\c => np.s ! c ++ adv.s
|
||||
} ;
|
||||
ExtAdvNP np adv = np ** {
|
||||
s = \\c => np.s ! c ++ "," ++ adv.s
|
||||
} ;
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ! cn.g ! c ++ cn.s ! det.sp ! det.n ! c ;
|
||||
g = cn.g ;
|
||||
@@ -11,41 +33,129 @@ lin
|
||||
p = P3
|
||||
} ;
|
||||
DefArt = {
|
||||
s = \\_,_,_ => [] ;
|
||||
sp = Def
|
||||
s = \\_,_,_,_ => [] ;
|
||||
sp = Def ;
|
||||
} ;
|
||||
IndefArt = {
|
||||
s = table {
|
||||
s = \\b =>
|
||||
table {
|
||||
Masc => table {
|
||||
Sg => table {Nom => "ein" ; Acc => "ein" ; Dat => "einum" ; Gen => "eins"} ;
|
||||
Sg => case b of {
|
||||
False => table {Nom => "ein" ; Acc => "ein" ; Dat => "einum" ; Gen => "eins"} ;
|
||||
True => \\_ => []
|
||||
} ;
|
||||
Pl => \\_ => []
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => table {Nom => "ein" ; Acc => "eina" ; Dat => "einari" ; Gen => "einar"} ;
|
||||
Sg => case b of {
|
||||
False => table {Nom => "ein" ; Acc => "eina" ; Dat => "einari" ; Gen => "einar"} ;
|
||||
True => \\_ => []
|
||||
} ;
|
||||
Pl => \\_ => []
|
||||
} ;
|
||||
Neuter => table {
|
||||
Sg => table {Nom => "eitt" ; Acc => "eitt" ; Dat => "einum" ; Gen => "eins"} ;
|
||||
Sg => case b of {
|
||||
False => table {Nom => "eitt" ; Acc => "eitt" ; Dat => "einum" ; Gen => "eins"} ;
|
||||
True => \\_ => []
|
||||
} ;
|
||||
Pl => \\_ => []
|
||||
}
|
||||
} ;
|
||||
sp = Indef
|
||||
sp = Indef ;
|
||||
} ;
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ;
|
||||
s = \\g,c => quant.s ! num.hasCard ! g ! num.n ! c ++
|
||||
num.s ! g ! c ;
|
||||
n = num.n ;
|
||||
sp = quant.sp
|
||||
} ;
|
||||
DetQuantOrd quant num ord = {
|
||||
s = \\g,c => quant.s ! num.hasCard ! g ! num.n ! c ++
|
||||
num.s ! g ! c ++ ord.s ! g ! num.n ! c ;
|
||||
n = num.n ;
|
||||
sp = quant.sp
|
||||
} ;
|
||||
NumSg = {
|
||||
s = \\_,_ => [] ;
|
||||
n = Sg
|
||||
n = Sg ;
|
||||
hasCard = False
|
||||
} ;
|
||||
NumPl = {
|
||||
s = \\_,_ => [] ;
|
||||
n = Pl
|
||||
n = Pl ;
|
||||
hasCard = False
|
||||
} ;
|
||||
NumCard card = card ** {hasCard = True} ;
|
||||
NumDigits digits = {s = \\_,_ => digits.s ; n = Pl} ;
|
||||
NumDecimal dec = {s = \\_,_ => dec.s ; n = Pl} ;
|
||||
NumNumeral numeral = numeral ;
|
||||
AdNum adn card = {s = \\g,c => adn.s ++ card.s ! g ! c ; n = card.n} ;
|
||||
OrdDigits digits = {s = \\_,_,_ => digits.s} ;
|
||||
OrdNumeral numeral = {s = \\g,_,c => numeral.s ! g ! c} ;
|
||||
OrdSuperl a = {s = a.s} ;
|
||||
OrdNumeralSuperl numeral a = {
|
||||
s = \\g,n,c => numeral.s ! g ! c ++ a.s ! g ! n ! c
|
||||
} ;
|
||||
MassNP cn = {
|
||||
s = \\c => cn.s ! Indef ! Sg ! c ;
|
||||
g = cn.g ;
|
||||
n = Sg ;
|
||||
p = P3
|
||||
} ;
|
||||
PossPron pron = {
|
||||
s = \\_,_,_,_ => pron.s ! Gen ;
|
||||
sp = Def
|
||||
} ;
|
||||
ComplN2 n2 np = {
|
||||
s = \\sp,n,c => n2.s ! sp ! n ! c ++ n2.c2.s ++ np.s ! n2.c2.c ;
|
||||
g = n2.g
|
||||
} ;
|
||||
ComplN3 n3 np = n3 ** {
|
||||
s = \\sp,n,c => n3.s ! sp ! n ! c ++ n3.c2.s ++ np.s ! n3.c2.c ;
|
||||
c2 = n3.c3
|
||||
} ;
|
||||
AdjCN ap cn = {
|
||||
s = \\sp,n,c => ap.s ! cn.g ! n ! c ++ cn.s ! sp ! n ! c ;
|
||||
g = cn.g
|
||||
} ;
|
||||
RelCN cn rs = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ rs.s ! cn.g ! persNum n P3 ;
|
||||
g = cn.g
|
||||
} ;
|
||||
AdvCN cn adv = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ adv.s ;
|
||||
g = cn.g
|
||||
} ;
|
||||
SentCN cn sc = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ sc.s ;
|
||||
g = cn.g
|
||||
} ;
|
||||
ApposCN cn np = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ np.s ! Nom ;
|
||||
g = cn.g
|
||||
} ;
|
||||
PossNP cn np = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ np.s ! Gen ;
|
||||
g = cn.g
|
||||
} ;
|
||||
PartNP cn np = {
|
||||
s = \\sp,n,c => cn.s ! sp ! n ! c ++ "av" ++ np.s ! Dat ;
|
||||
g = cn.g
|
||||
} ;
|
||||
CountNP det np = {
|
||||
s = \\c => det.s ! np.g ! c ++ "av" ++ np.s ! Dat ;
|
||||
g = np.g ;
|
||||
n = det.n ;
|
||||
p = P3
|
||||
} ;
|
||||
AdjDAP dap ap = dap ** {
|
||||
s = \\g,c => dap.s ! g ! c ++ ap.s ! g ! dap.n ! c
|
||||
} ;
|
||||
DetDAP det = det ;
|
||||
QuantityNP dec mu = {
|
||||
s = \\_ => dec.s ++ mu.s ;
|
||||
g = Neuter ;
|
||||
n = Pl ;
|
||||
p = P3
|
||||
} ;
|
||||
}
|
||||
|
||||
115
src/faroese/NumeralFao.gf
Normal file
115
src/faroese/NumeralFao.gf
Normal file
@@ -0,0 +1,115 @@
|
||||
concrete NumeralFao of Numeral = CatFao [Numeral, Digits, Decimal] ** open Prelude, ResFao in {
|
||||
|
||||
lincat
|
||||
Digit = {s : Gender => Case => Str ; n : Number ; teen : Str ; ten : Str} ;
|
||||
Sub10, Sub100, Sub1000, Sub1000000, Sub1000000000, Sub1000000000000 =
|
||||
{s : Gender => Case => Str ; n : Number} ;
|
||||
Dig = {s : Str; n : Number} ;
|
||||
|
||||
lin
|
||||
num n = n ;
|
||||
|
||||
n2 = {s = table {
|
||||
Masc => caseList "tveir" "tveir" "tveimum" "tveggja" ;
|
||||
Fem => caseList "tvær" "tvær" "tveimum" "tveggja" ;
|
||||
Neuter => caseList "tvey" "tvey" "tveimum" "tveggja"
|
||||
} ;
|
||||
teen = "tólv" ;
|
||||
ten = "tjúgu" ;
|
||||
n = Pl
|
||||
} ;
|
||||
n3 = {s = table {
|
||||
Masc => caseList "tríggir" "tríggjar" "trimum" "tríggja" ;
|
||||
Fem => caseList "tríggjar" "tríggjar" "trimum" "tríggja" ;
|
||||
Neuter => caseList "trý" "trý" "trimum" "tríggja"
|
||||
} ;
|
||||
teen = "trettan" ;
|
||||
ten = "tríati" ;
|
||||
n = Pl
|
||||
} ;
|
||||
n4 = mkDigit "fýra" "fjúrtan" "fýrati" ;
|
||||
n5 = mkDigit "fimm" "fimtan" "fimmti" ;
|
||||
n6 = mkDigit "seks" "sekstan" "seksti" ;
|
||||
n7 = mkDigit "sjey" "seytjan" "sjeyti" ;
|
||||
n8 = mkDigit "átta" "átjan" "áttati" ;
|
||||
n9 = mkDigit "níggju" "nítjan" "níti" ;
|
||||
|
||||
pot01 = {
|
||||
s = table {
|
||||
Masc => caseList "ein" "ein" "einum" "eins" ;
|
||||
Fem => caseList "einar" "eina" "einari" "einar" ;
|
||||
Neuter => caseList "eitt" "eitt" "einum" "eins"
|
||||
} ;
|
||||
n = Sg
|
||||
} ;
|
||||
pot0 d = {s = d.s ; n = d.n} ;
|
||||
pot0as1 n = n ;
|
||||
pot110 = {
|
||||
s = table {
|
||||
Masc => \\_ => "tíggju" ;
|
||||
Fem => \\_ => "tíggju" ;
|
||||
Neuter => \\_ => "ti"
|
||||
} ;
|
||||
n = Pl
|
||||
} ;
|
||||
pot111 = mkNum "ellivu" Pl ;
|
||||
pot1to19 d = mkNum d.teen Pl ;
|
||||
pot1 d = mkNum d.ten Pl ;
|
||||
pot1plus d e = {s = \\g,c => e.s ! g ! c ++ "og" ++ d.ten ; n = Pl} ;
|
||||
pot1as2 n = n ;
|
||||
pot21 = mkNum "hundrað" Pl ;
|
||||
pot2 d = mkNum (numBase d ++ "hundrað") Pl ;
|
||||
pot2plus d e = {s = \\g,c => numBase d ++ "hundrað" ++ e.s ! g ! c ; n = Pl} ;
|
||||
pot2as3 n = n ;
|
||||
pot31 = mkNum "túsund" Pl ;
|
||||
pot3 n = mkNum (numBase n ++ "túsund") Pl ;
|
||||
pot3plus n m = {s = \\g,c => numBase n ++ "túsund" ++ m.s ! g ! c ; n = Pl} ;
|
||||
pot3as4 n = n ;
|
||||
pot3decimal d = mkNum (d.s ++ "túsund") Pl ;
|
||||
pot41 = mkNum "millión" Pl ;
|
||||
pot4 n = mkNum (numBase n ++ "millión") Pl ;
|
||||
pot4plus n m = {s = \\g,c => numBase n ++ "millión" ++ m.s ! g ! c ; n = Pl} ;
|
||||
pot4as5 n = n ;
|
||||
pot4decimal d = mkNum (d.s ++ "millión") Pl ;
|
||||
pot51 = mkNum "milliard" Pl ;
|
||||
pot5 n = mkNum (numBase n ++ "milliard") Pl ;
|
||||
pot5plus n m = {s = \\g,c => numBase n ++ "milliard" ++ m.s ! g ! c ; n = Pl} ;
|
||||
pot5decimal d = mkNum (d.s ++ "milliard") Pl ;
|
||||
|
||||
IDig d = d ;
|
||||
IIDig d ds = {s = d.s ++ BIND ++ ds.s; n = Pl} ;
|
||||
|
||||
D_0 = {s = "0"; n = Pl} ;
|
||||
D_1 = {s = "1"; n = Sg} ;
|
||||
D_2 = {s = "2"; n = Pl} ;
|
||||
D_3 = {s = "3"; n = Pl} ;
|
||||
D_4 = {s = "4"; n = Pl} ;
|
||||
D_5 = {s = "5"; n = Pl} ;
|
||||
D_6 = {s = "6"; n = Pl} ;
|
||||
D_7 = {s = "7"; n = Pl} ;
|
||||
D_8 = {s = "8"; n = Pl} ;
|
||||
D_9 = {s = "9"; n = Pl} ;
|
||||
|
||||
PosDecimal d = d ** {hasDot = False} ;
|
||||
NegDecimal d = {s = "-" ++ BIND ++ d.s; n = Pl; hasDot = False} ;
|
||||
IFrac d i = {s = d.s ++ if_then_Str d.hasDot BIND (BIND++"."++BIND) ++ i.s; n = Pl; hasDot = True} ;
|
||||
|
||||
oper
|
||||
caseList : Str -> Str -> Str -> Str -> Case => Str = \nom,acc,dat,gen ->
|
||||
table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ;
|
||||
|
||||
mkNum : Str -> Number -> {s : Gender => Case => Str ; n : Number} = \str,n -> {
|
||||
s = \\_,_ => str ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
mkDigit : Str -> Str -> Str -> {s : Gender => Case => Str ; n : Number ; teen : Str ; ten : Str} = \str,teen,ten -> {
|
||||
s = \\_,_ => str ;
|
||||
teen = teen ;
|
||||
ten = ten ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
numBase : {s : Gender => Case => Str ; n : Number} -> Str = \n ->
|
||||
n.s ! Neuter ! Nom ;
|
||||
}
|
||||
@@ -569,14 +569,14 @@ oper
|
||||
mkPrep : Str -> Prep = \s -> lin Prep {s=s; c=Acc} ;
|
||||
|
||||
mkIAdv : Str -> IAdv = \s -> lin IAdv {s=s} ;
|
||||
mkIP : Str -> IP = \s -> lin IP {s=s} ;
|
||||
mkIP : Str -> IP = \s -> lin IP {s=s; n=Sg} ;
|
||||
mkIQuant : Str -> IQuant = \s -> lin IQuant {s=s} ;
|
||||
mkIDet : Str -> IDet = \s -> lin IDet {s=s} ;
|
||||
mkIDet : Str -> IDet = \s -> lin IDet {s=s; n=Sg} ;
|
||||
mkSubj : Str -> Subj = \s -> lin Subj {s=s} ;
|
||||
mkQuant : Str -> Quant = \s -> lin Quant {s=\\_,_,_ => s; sp=Indef} ;
|
||||
mkQuant : Str -> Quant = \s -> lin Quant {s=\\_,_,_,_ => s; sp=Indef} ;
|
||||
mkPredet : Str -> Predet = \s -> lin Predet {s=s} ;
|
||||
mkDet : Str -> Det = \s -> lin Det {s=\\_,_ => s; n=Sg; sp=Indef} ;
|
||||
mkCard : Str -> Card = \s -> lin Card {s=s} ;
|
||||
mkCard : Str -> Card = \s -> lin Card {s=\\_,_ => s; n=Pl} ;
|
||||
mkACard : Str -> ACard = \s -> lin ACard {s=s} ;
|
||||
mkConj : Str -> Conj = \s -> lin Conj {s=s} ;
|
||||
mkPConj : Str -> PConj = \s -> lin PConj {s=s} ;
|
||||
|
||||
@@ -3,14 +3,23 @@ lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
UttS s = s ;
|
||||
UttQS qs = qs ;
|
||||
UttImpSg pol imp = {s = imp.s ! pol.p ! Sg} ;
|
||||
UttImpPl pol imp = {s = imp.s ! pol.p ! Pl} ;
|
||||
UttImpPol pol imp = {s = imp.s ! pol.p ! Pl} ;
|
||||
UttIP ip = {s = ip.s} ;
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! Nom} ;
|
||||
UttVP vp = {s = vp.Nonfinite} ;
|
||||
UttCN cn = {s = cn.s ! Indef ! Sg ! Nom} ;
|
||||
UttCard card = {s = card.s ! Neuter ! Nom} ;
|
||||
UttAP ap = {s = ap.s ! Masc ! Sg ! Nom} ;
|
||||
UttAdv adv = adv ;
|
||||
UttInterj i = i ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
PConjConj conj = conj ;
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! Nom} ;
|
||||
}
|
||||
|
||||
50
src/faroese/QuestionFao.gf
Normal file
50
src/faroese/QuestionFao.gf
Normal file
@@ -0,0 +1,50 @@
|
||||
concrete QuestionFao of Question = CatFao ** open ResFao in {
|
||||
|
||||
lincat QVP = {s : Tense => Polarity => Str} ;
|
||||
|
||||
lin
|
||||
QuestCl cl = {s = cl.Indicative} ;
|
||||
QuestVP ip vp = {
|
||||
s = \\t,pol => ip.s ++ vp.Indicative ! t ! pol ! Masc ! persNum ip.n P3
|
||||
} ;
|
||||
QuestSlash ip cls = {
|
||||
s = \\t,pol => ip.s ++ cls.s ! t ! pol
|
||||
} ;
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,pol => iadv.s ++ cl.Indicative ! t ! pol
|
||||
} ;
|
||||
QuestIComp icomp np = {
|
||||
s = \\t,pol => icomp.s ++ copula ! t ! persNum np.n np.p ++ negStr pol ++ np.s ! Nom
|
||||
} ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = idet.s ++ cn.s ! Indef ! idet.n ! Nom ;
|
||||
n = idet.n
|
||||
} ;
|
||||
IdetIP idet = {
|
||||
s = idet.s ;
|
||||
n = idet.n
|
||||
} ;
|
||||
AdvIP ip adv = ip ** {s = ip.s ++ adv.s} ;
|
||||
IdetQuant iquant num = {
|
||||
s = iquant.s ++ num.s ! Masc ! Nom ;
|
||||
n = num.n
|
||||
} ;
|
||||
PrepIP prep ip = {s = prep.s ++ ip.s} ;
|
||||
AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ;
|
||||
CompIAdv iadv = iadv ;
|
||||
CompIP ip = {s = ip.s} ;
|
||||
|
||||
ComplSlashIP vps ip = {
|
||||
s = \\t,pol => vps.Indicative ! t ! PSg P3 ++ vps.particle ++ negStr pol ++ vps.c2.s ++ ip.s ++ vps.sc
|
||||
} ;
|
||||
AdvQVP vp iadv = {
|
||||
s = \\t,pol => vp.Indicative ! t ! pol ! Masc ! PSg P3 ++ iadv.s
|
||||
} ;
|
||||
AddAdvQVP qvp iadv = {
|
||||
s = \\t,pol => qvp.s ! t ! pol ++ iadv.s
|
||||
} ;
|
||||
QuestQVP ip qvp = {
|
||||
s = \\t,pol => ip.s ++ qvp.s ! t ! pol
|
||||
} ;
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
concrete RelativeFao of Relative = CatFao ** open ResFao in {
|
||||
lin
|
||||
IdRP = {s = "sum"} ;
|
||||
RelCl cl = {
|
||||
s = \\t,pol,_,_ => "sum" ++ cl.Indicative ! t ! pol
|
||||
} ;
|
||||
RelVP rp vp = {
|
||||
s = \\t,pol,g,pn => rp.s ++ vp.Indicative ! t ! pol ! g ! pn
|
||||
} ;
|
||||
RelSlash rp cls = {
|
||||
s = \\t,pol,_,_ => rp.s ++ cls.s ! t ! pol
|
||||
} ;
|
||||
FunRP prep np rp = {
|
||||
s = prep.s ++ np.s ! prep.c ++ rp.s
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -169,4 +169,32 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
oper
|
||||
negStr : Polarity -> Str = \pol -> case pol of {
|
||||
Pos => [] ;
|
||||
Neg => "ikki"
|
||||
} ;
|
||||
|
||||
mkNP : Str -> Gender -> Number -> Person -> {s : Case => Str ; g : Gender ; n : Number ; p : Person} =
|
||||
\str,g,n,p -> {
|
||||
s = \\_ => str ;
|
||||
g = g ;
|
||||
n = n ;
|
||||
p = p
|
||||
} ;
|
||||
|
||||
mkCN : Str -> Gender -> CommonNoun =
|
||||
\str,g -> {
|
||||
s = \\_,_,_ => str ;
|
||||
g = g
|
||||
} ;
|
||||
|
||||
mkVP : Str -> VerbPhrase =
|
||||
\str -> {
|
||||
Converb = str ;
|
||||
Indicative = \\_,pol,_,_ => str ++ negStr pol ;
|
||||
Nonfinite = str ;
|
||||
Participle = \\_ => str
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,35 @@ concrete SentenceFao of Sentence = CatFao ** open Prelude, ResFao, (P = ParamX)
|
||||
in np.s ! Nom ++ vp.Indicative ! t ! pol ! np.g ! p;
|
||||
Nonfinite = np.s ! Nom ++ vp.Nonfinite;
|
||||
Participle = \\t => np.s ! Nom ++ vp.Participle ! t} ;
|
||||
PredSCVP sc vp = {Converb = sc.s ++ vp.Converb;
|
||||
Indicative = \\t,pol => sc.s ++ vp.Indicative ! t ! pol ! Neuter ! PSg P3;
|
||||
Nonfinite = sc.s ++ vp.Nonfinite;
|
||||
Participle = \\t => sc.s ++ vp.Participle ! t} ;
|
||||
SlashVP np vps = {
|
||||
s = \\t,pol =>
|
||||
let p = persNum np.n np.p in
|
||||
np.s ! Nom ++ vps.Indicative ! t ! p ++ vps.particle ++ negStr pol ++ vps.sc ;
|
||||
c2 = vps.c2
|
||||
} ;
|
||||
AdvSlash cls adv = cls ** {
|
||||
s = \\t,pol => cls.s ! t ! pol ++ adv.s
|
||||
} ;
|
||||
SlashPrep cl prep = {
|
||||
s = cl.Indicative ;
|
||||
c2 = prep
|
||||
} ;
|
||||
SlashVS np vs sslash = {
|
||||
s = \\t,pol =>
|
||||
let p = persNum np.n np.p in
|
||||
np.s ! Nom ++ vs.Indicative ! t ! p ++ vs.particle ++ negStr pol ++ sslash.s ;
|
||||
c2 = sslash.c2
|
||||
} ;
|
||||
ImpVP vp = {
|
||||
s = \\pol,n => negStr pol ++ vp.Nonfinite
|
||||
} ;
|
||||
AdvImp adv imp = {
|
||||
s = \\pol,n => adv.s ++ imp.s ! pol ! n
|
||||
} ;
|
||||
UseCl temp pol cl =
|
||||
let
|
||||
tense = case temp.t of {
|
||||
@@ -16,6 +45,17 @@ concrete SentenceFao of Sentence = CatFao ** open Prelude, ResFao, (P = ParamX)
|
||||
in {
|
||||
s = temp.s ++ pol.s ++ cl.Indicative ! tense ! pol.p
|
||||
} ;
|
||||
UseQCl temp pol qcl =
|
||||
let
|
||||
tense = case temp.t of {
|
||||
P.Pres => Pres ;
|
||||
P.Past => Past ;
|
||||
P.Fut => Pres ;
|
||||
P.Cond => Past
|
||||
} ;
|
||||
in {
|
||||
s = temp.s ++ pol.s ++ qcl.s ! tense ! pol.p
|
||||
} ;
|
||||
UseRCl temp pol rcl =
|
||||
let
|
||||
tense = case temp.t of {
|
||||
@@ -28,4 +68,23 @@ concrete SentenceFao of Sentence = CatFao ** open Prelude, ResFao, (P = ParamX)
|
||||
s = \\g,pn =>
|
||||
temp.s ++ pol.s ++ rcl.s ! tense ! pol.p ! g ! pn
|
||||
} ;
|
||||
UseSlash temp pol cls =
|
||||
let
|
||||
tense = case temp.t of {
|
||||
P.Pres => Pres ;
|
||||
P.Past => Past ;
|
||||
P.Fut => Pres ;
|
||||
P.Cond => Past
|
||||
} ;
|
||||
in {
|
||||
s = temp.s ++ pol.s ++ cls.s ! tense ! pol.p ;
|
||||
c2 = cls.c2
|
||||
} ;
|
||||
EmbedS s = {s = "at" ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s} ;
|
||||
EmbedVP vp = {s = vp.Nonfinite} ;
|
||||
AdvS adv s = {s = adv.s ++ s.s} ;
|
||||
ExtAdvS adv s = {s = adv.s ++ "," ++ s.s} ;
|
||||
SSubjS s1 subj s2 = {s = s1.s ++ subj.s ++ s2.s} ;
|
||||
RelS s rs = {s = s.s ++ "," ++ rs.s ! Neuter ! PSg P3} ;
|
||||
}
|
||||
|
||||
@@ -1,34 +1,53 @@
|
||||
concrete VerbFao of Verb = CatFao ** open Prelude,ResFao in {
|
||||
lin UseV v = {Converb = v.Converb ++ v.particle;
|
||||
Indicative = \\t,pol,g,p => v.Indicative ! t ! p ++ v.particle ++
|
||||
case pol of {
|
||||
Pos => [] ;
|
||||
Neg => "ikki"
|
||||
} ;
|
||||
negStr pol ;
|
||||
Nonfinite = v.Nonfinite ++ v.particle;
|
||||
Participle = \\t => v.Participle ! t ++ v.particle} ;
|
||||
lin ComplVV vv vp = {Converb = vv.Converb ++ vv.particle ++ vp.Nonfinite;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
vv.Indicative ! t ! p ++ vv.particle ++ negStr pol ++ vp.Nonfinite;
|
||||
Nonfinite = vv.Nonfinite ++ vv.particle ++ vp.Nonfinite;
|
||||
Participle = \\t => vv.Participle ! t ++ vv.particle ++ vp.Nonfinite} ;
|
||||
lin ComplVS vs s = {Converb = vs.Converb ++ vs.particle ++ "at" ++ s.s;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
vs.Indicative ! t ! p ++ vs.particle ++ negStr pol ++ "at" ++ s.s;
|
||||
Nonfinite = vs.Nonfinite ++ vs.particle ++ "at" ++ s.s;
|
||||
Participle = \\t => vs.Participle ! t ++ vs.particle ++ "at" ++ s.s} ;
|
||||
lin ComplVQ vq qs = {Converb = vq.Converb ++ vq.particle ++ qs.s;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
vq.Indicative ! t ! p ++ vq.particle ++ negStr pol ++ qs.s;
|
||||
Nonfinite = vq.Nonfinite ++ vq.particle ++ qs.s;
|
||||
Participle = \\t => vq.Participle ! t ++ vq.particle ++ qs.s} ;
|
||||
lin ComplVA va ap = {Converb = va.Converb ++ va.particle ++ ap.s ! Neuter ! Sg ! Nom;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
va.Indicative ! t ! p ++ va.particle ++ negStr pol ++ ap.s ! g ! persNumNumber p ! Nom;
|
||||
Nonfinite = va.Nonfinite ++ va.particle ++ ap.s ! Neuter ! Sg ! Nom;
|
||||
Participle = \\t => va.Participle ! t ++ va.particle ++ ap.s ! Neuter ! Sg ! Nom} ;
|
||||
lin AdvVP vp adv = {Converb = vp.Converb ++ adv.s;
|
||||
Indicative = \\t,pol,g,p => vp.Indicative ! t ! pol ! g ! p ++ adv.s;
|
||||
Nonfinite = vp.Nonfinite ++ adv.s;
|
||||
Participle = \\t => vp.Participle ! t ++ adv.s} ;
|
||||
lin ExtAdvVP vp adv = {Converb = vp.Converb ++ "," ++ adv.s;
|
||||
Indicative = \\t,pol,g,p => vp.Indicative ! t ! pol ! g ! p ++ "," ++ adv.s;
|
||||
Nonfinite = vp.Nonfinite ++ "," ++ adv.s;
|
||||
Participle = \\t => vp.Participle ! t ++ "," ++ adv.s} ;
|
||||
lin AdVVP adv vp = {Converb = adv.s ++ vp.Converb;
|
||||
Indicative = \\t,pol,g,p => adv.s ++ vp.Indicative ! t ! pol ! g ! p;
|
||||
Nonfinite = adv.s ++ vp.Nonfinite;
|
||||
Participle = \\t => adv.s ++ vp.Participle ! t} ;
|
||||
lin ComplSlash vps np = {Converb = vps.Converb ++ vps.particle
|
||||
++ vps.c2.s ++ np.s ! vps.c2.c;
|
||||
++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
vps.Indicative ! t ! p ++ vps.particle ++
|
||||
case pol of {
|
||||
Pos => [] ;
|
||||
Neg => "ikki"
|
||||
} ++
|
||||
vps.c2.s ++ np.s ! vps.c2.c ;
|
||||
Nonfinite = vps.Nonfinite ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c;
|
||||
Participle = \\t => vps.Participle ! t ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c} ;
|
||||
negStr pol ++
|
||||
vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc ;
|
||||
Nonfinite = vps.Nonfinite ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc;
|
||||
Participle = \\t => vps.Participle ! t ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc} ;
|
||||
lin UseComp comp = {
|
||||
Converb = copula ! Pres ! PPl ++ comp.s ! Masc ! Sg ;
|
||||
Indicative = \\t,pol,g,p => copula ! t ! p ++
|
||||
case pol of {
|
||||
Pos => [] ;
|
||||
Neg => "ikki"
|
||||
} ++
|
||||
negStr pol ++
|
||||
comp.s ! g ! persNumNumber p ;
|
||||
Nonfinite = "vera" ++ comp.s ! Masc ! Sg ;
|
||||
Participle = \\t => "verið" ++ comp.s ! Masc ! Sg
|
||||
@@ -37,6 +56,83 @@ concrete VerbFao of Verb = CatFao ** open Prelude,ResFao in {
|
||||
lin CompNP np = {s = \\_,_ => np.s ! Nom} ;
|
||||
lin CompAdv adv = {s = \\_,_ => adv.s} ;
|
||||
lin CompCN cn = {s = \\_,n => cn.s ! Indef ! n ! Nom} ;
|
||||
lin UseCopula = {
|
||||
Converb = "verið" ;
|
||||
Indicative = \\t,pol,_,p => copula ! t ! p ++ negStr pol ;
|
||||
Nonfinite = "vera" ;
|
||||
Participle = \\_ => "verið"
|
||||
} ;
|
||||
|
||||
lin SlashV2a v = v ;
|
||||
lin SlashV2a v = v ** {sc = []} ;
|
||||
lin Slash2V3 v np = v ** {
|
||||
Converb = v.Converb ++ v.particle ++ v.c2.s ++ np.s ! v.c2.c ;
|
||||
Indicative = \\t,p => v.Indicative ! t ! p ++ v.particle ++ v.c2.s ++ np.s ! v.c2.c ;
|
||||
Nonfinite = v.Nonfinite ++ v.particle ++ v.c2.s ++ np.s ! v.c2.c ;
|
||||
Participle = \\t => v.Participle ! t ++ v.particle ++ v.c2.s ++ np.s ! v.c2.c ;
|
||||
particle = [] ;
|
||||
c2 = v.c3 ;
|
||||
sc = []
|
||||
} ;
|
||||
lin Slash3V3 v np = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = v.c3.s ++ np.s ! v.c3.c
|
||||
} ;
|
||||
lin SlashV2A v ap = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = ap.s ! Neuter ! Sg ! Nom
|
||||
} ;
|
||||
lin SlashV2S v s = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = "at" ++ s.s
|
||||
} ;
|
||||
lin SlashV2Q v qs = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = qs.s
|
||||
} ;
|
||||
lin SlashV2V v vp = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = vp.Nonfinite
|
||||
} ;
|
||||
lin SlashVV vv vps = vps ** {
|
||||
Converb = vv.Converb ++ vv.particle ++ vps.Nonfinite ;
|
||||
Indicative = \\t,p => vv.Indicative ! t ! p ++ vv.particle ++ vps.Nonfinite ;
|
||||
Nonfinite = vv.Nonfinite ++ vv.particle ++ vps.Nonfinite ;
|
||||
Participle = \\t => vv.Participle ! t ++ vv.particle ++ vps.Nonfinite ;
|
||||
particle = []
|
||||
} ;
|
||||
lin SlashV2VNP v np vps = v ** {
|
||||
c2 = v.c2 ;
|
||||
sc = v.c3.s ++ np.s ! v.c3.c ++ vps.Nonfinite
|
||||
} ;
|
||||
lin ReflVP vps =
|
||||
let np = mkNP "seg" Masc Sg P3 in {
|
||||
Converb = vps.Converb ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc ;
|
||||
Indicative = \\t,pol,g,p =>
|
||||
vps.Indicative ! t ! p ++ vps.particle ++ negStr pol ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc ;
|
||||
Nonfinite = vps.Nonfinite ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc ;
|
||||
Participle = \\t => vps.Participle ! t ++ vps.particle ++ vps.c2.s ++ np.s ! vps.c2.c ++ vps.sc
|
||||
} ;
|
||||
lin PassV2 v = {
|
||||
Converb = "verið" ++ v.Participle ! Past ;
|
||||
Indicative = \\t,pol,_,p => copula ! t ! p ++ negStr pol ++ v.Participle ! Past ;
|
||||
Nonfinite = "vera" ++ v.Participle ! Past ;
|
||||
Participle = \\_ => "verið" ++ v.Participle ! Past
|
||||
} ;
|
||||
lin AdvVPSlash vps adv = vps ** {sc = vps.sc ++ adv.s} ;
|
||||
lin AdVVPSlash adv vps = vps ** {
|
||||
Converb = adv.s ++ vps.Converb ;
|
||||
Indicative = \\t,p => adv.s ++ vps.Indicative ! t ! p ;
|
||||
Nonfinite = adv.s ++ vps.Nonfinite ;
|
||||
Participle = \\t => adv.s ++ vps.Participle ! t
|
||||
} ;
|
||||
lin VPSlashPrep vp prep = {
|
||||
Converb = vp.Converb ;
|
||||
imperative = \\_ => vp.Nonfinite ;
|
||||
Indicative = \\t,p => vp.Indicative ! t ! Pos ! Masc ! p ;
|
||||
Nonfinite = vp.Nonfinite ;
|
||||
Participle = vp.Participle ;
|
||||
particle = [] ;
|
||||
c2 = prep ;
|
||||
sc = []
|
||||
} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user