1
0
forked from GitHub/gf-core

Added peacekeeping example back in. Doesn't compile yet.

This commit is contained in:
bjorn
2008-08-15 20:21:12 +00:00
parent 65a25ad181
commit 0f51f5187c
35 changed files with 785 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
== Working now ==
Yes.
Who coughs?
Who owns this building?
Who needs water?
Who gives weapons to the soldiers?
Who gives water to the children?
Who is hungry?
Where do you sleep?
Where do you see the landmine?
Where are the weapons?
The doctor sleeps.
I see a small girl.
Does your leg hurt?
Soldiers don't eat corpses.
Do you need medicine?
We don't give weapons to dangerous soldiers.
We give food to children.
Are you cold?
Landmines are dangerous.
We are your friends.
I am a police officer.
This is a translation machine.
Weapons aren't toys.
These soldiers aren't your enemies.
Walk!
Breathe!
Don't eat your friend!
Drink cold water!
Give your weapon to the soldier!
Show me the landmine!
Give water to the boy!
Drop your weapon!
Cooperate with us!
== Should work ==
Drink this water! (can't modify MassCN)
Drink! (drink is V2)
== How do we do these? ==
(without overgenerating too much)
Turn around!
plural-/singular-only nouns: clothes, ...
== English ==
=== Variants that should work ===
don't / do not
doesn't / does not
isn't / is not
aren't / are not
corpse / dead body
give X to Y / give Y X

View File

@@ -0,0 +1,4 @@
abstract Peace =
PeaceSyntax, PeaceLexCommon,
PeaceLexExt, PeacePhrases
** {}

View File

@@ -0,0 +1,13 @@
abstract PeaceCat = Cat ** {
cat
MassN ;
Phrase ;
PhraseWritten ;
PhraseSpoken ;
fun
Written : Phrase -> PhraseWritten ;
Spoken : Phrase -> PhraseSpoken ;
}

View File

@@ -0,0 +1,22 @@
incomplete concrete PeaceCatI of PeaceCat =
Cat ** open Lang, PeaceRes, Prelude in {
lincat
MassN = N ;
Phrase = { s : Str; p : Punct } ;
PhraseWritten = { s : Str } ;
PhraseSpoken = { s : Str } ;
lin
Written x = mkWritten x.s x.p ;
Spoken x = { s = x.s } ;
oper
mkWritten : Str -> Punct -> { s : Str } ;
mkWritten x p = case p of {
FullStop => { s = x ++ "." } ; --TFullStop (ss s) TEmpty ;
QuestMark => { s = x ++ "?" } ; --TQuestMark (ss s) TEmpty ;
ExclMark => { s = x ++ "!" } --TExclMark (ss s) TEmpty
} ;
}

View File

@@ -0,0 +1,90 @@
abstract PeaceLexCommon = PeaceCat ** {
fun
-- Pronouns
i_Pron : Pron ;
youSg_Pron : Pron ;
he_Pron : Pron ;
we_Pron : Pron ;
youPl_Pron : Pron ;
they_Pron : Pron ;
whoPl_IP : IP ;
whoSg_IP : IP ;
whatPl_IP : IP ;
whatSg_IP : IP ;
this_NP : NP ;
that_NP : NP ;
-- Determiners
aSg_Det : Det ;
aPl_Det : Det ;
theSg_Det : Det ;
thePl_Det : Det ;
that_Det : Det ;
those_Det : Det ;
this_Det : Det ;
these_Det : Det ;
-- Adverbs
here_Adv : Adv ;
there_Adv : Adv ;
where_IAdv : IAdv ;
when_IAdv : IAdv ;
-- Numerals
-- Causes too much ambiguity
-- one_Det : Det ;
two_Num : Num ;
three_Num : Num ;
four_Num : Num ;
five_Num : Num ;
-- Adjectives
black_A : A ;
blue_A : A ;
cold_A : A ;
green_A : A ;
hot_A : A ;
red_A : A ;
small_A : A ;
white_A : A ;
yellow_A : A ;
-- Nouns
airplane_N : N ;
animal_N : N ;
blood_N : MassN ;
boat_N : N ;
boy_N : N ;
child_N : N ;
factory_N : N ;
foot_N : N ;
girl_N : N ;
hand_N : N ;
head_N : N ;
house_N : N ;
leg_N : N ;
man_N : N ;
road_N : N ;
water_N : MassN ;
woman_N : N;
-- Verbs
breathe_V : V ;
eat_V2 : V2 ;
drink_V2 : V2 ;
give_V3 : V3 ;
have_V2 : V2;
see_V2 : V2 ;
sleep_V : V ;
walk_V : V ;
}

View File

@@ -0,0 +1,86 @@
incomplete concrete PeaceLexCommonI of PeaceLexCommon = PeaceCatI ** open Lang in {
lin
-- Pronouns
i_Pron = i_Pron ;
youSg_Pron = youSg_Pron ;
he_Pron = he_Pron ;
we_Pron = we_Pron ;
youPl_Pron = youPl_Pron ;
they_Pron = they_Pron ;
whoPl_IP = whoPl_IP ;
whoSg_IP = whoSg_IP ;
whatPl_IP = whatPl_IP ;
whatSg_IP = whatSg_IP ;
this_NP = this_NP ;
that_NP = that_NP ;
-- Determiners
aSg_Det = DetSg (SgQuant IndefArt) NoOrd;
aPl_Det = DetPl (PlQuant IndefArt) NoNum NoOrd;
theSg_Det = DetSg (SgQuant DefArt) NoOrd ;
thePl_Det = DetPl (PlQuant DefArt) NoNum NoOrd ;
that_Det = DetSg (SgQuant that_Quant) NoOrd ;
those_Det = DetPl (PlQuant that_Quant) NoNum NoOrd ;
this_Det = DetSg (SgQuant this_Quant) NoOrd ;
these_Det = DetPl (PlQuant this_Quant) NoNum NoOrd ;
-- Adverbs
here_Adv = here_Adv;
there_Adv = there_Adv;
where_IAdv = where_IAdv;
when_IAdv = when_IAdv;
-- Numerals
-- one_Det = DetSg one_Quant NoOrd ;
two_Num = NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))) ;
three_Num = NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) ;
four_Num = NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n4))))) ;
five_Num = NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n5))))) ;
-- Adjectives
black_A = black_A ;
blue_A = blue_A ;
cold_A = cold_A ;
green_A = green_A ;
hot_A = hot_A ;
red_A = red_A ;
small_A = small_A ;
white_A = white_A ;
yellow_A = yellow_A ;
-- Nouns
airplane_N = airplane_N ;
animal_N = animal_N ;
blood_N = blood_N ;
boat_N = boat_N ;
boy_N = boy_N ;
child_N = child_N ;
factory_N = factory_N ;
foot_N = foot_N ;
girl_N = girl_N ;
hand_N = hand_N ;
head_N = head_N ;
house_N = house_N ;
leg_N = leg_N ;
man_N = man_N ;
road_N = road_N ;
water_N = water_N ;
woman_N = woman_N ;
-- Verbs
breathe_V = breathe_V ;
drink_V2 = drink_V2 ;
eat_V2 = eat_V2 ;
give_V3 = give_V3;
have_V2 = have_V2;
see_V2 = see_V2 ;
sleep_V = sleep_V ;
walk_V = walk_V ;
}

View File

@@ -0,0 +1,47 @@
abstract PeaceLexExt = PeaceCat ** {
fun
-- Adjectives
dangerous_A : A ;
dead_A : A ;
hungry_A : A ;
large_A : A ;
sick_A : A ;
-- Nouns
air_N : MassN ;
arm_N : N ;
building_N : N ;
car_N : N ;
corpse_N : N ;
doctor_N : N ;
doctor_N : N ;
enemy_N : N ;
face_N : N ;
food_N : MassN ;
friend_N : N ;
ground_N : N ;
knife_N : N ;
landmine_N : N ;
map_N : N ;
medicine_N : MassN ;
police8officer_N : N ;
skin_N : MassN ;
soldier_N : N ;
toy_N : N ;
translation8machine_N : N ;
weapon_N : N;
-- Verbs
cooperate_V2 : V2 ;
cough_V : V ;
drop_V2 : V2 ;
hurt_V : V ;
need_V2 : V2;
own_V2 : V2 ;
show_V3 : V3 ;
}

View File

@@ -0,0 +1,9 @@
abstract PeacePhrases = PeaceCat ** {
fun
Hello : Phrase ;
GoodMorning : Phrase ;
GoodEvening : Phrase ;
WhatIsNamePron : Pron -> Phrase ;
}

View File

@@ -0,0 +1,11 @@
resource PeaceRes = {
param Punct = FullStop | QuestMark | ExclMark ;
oper
stop, quest, excl : Str -> { s : Str; p : Punct } ;
stop x = { s = x; p = FullStop } ;
quest x = { s = x; p = QuestMark } ;
excl x = { s = x; p = ExclMark } ;
}

View File

@@ -0,0 +1 @@
abstract PeaceSpoken = Peace ** {}

View File

@@ -0,0 +1,59 @@
abstract PeaceSyntax = PeaceCat ** {
cat
Sent ;
Quest ;
MassCN ;
fun
PhrPos : Sent -> Phrase ;
PhrNeg : Sent -> Phrase ;
PhrQuest : Quest -> Phrase ;
PhrImp : Imp -> Phrase ;
PhrImpNeg : Imp -> Phrase ;
PhrYes : Phrase ;
PhrNo : Phrase ;
QuestSent : Sent -> Quest ;
QuestIP_V : V -> IP -> Quest ;
QuestIP_V2 : V2 -> IP -> NP -> Quest ;
QuestIP_V2Mass : V2 -> IP -> MassCN -> Quest ;
QuestIP_V3 : V3 -> IP -> NP -> NP -> Quest ;
QuestIP_V3Mass : V3 -> IP -> MassCN -> NP -> Quest ;
QuestIP_A : A -> IP -> Quest ;
QuestIAdv_V : V -> NP -> IAdv -> Quest ;
QuestIAdv_V2 : V2 -> NP -> NP -> IAdv -> Quest ;
QuestIAdv_NP : NP -> IAdv -> Quest ;
SentV : V -> NP -> Sent ;
SentV2 : V2 -> NP -> NP -> Sent ;
SentV2Mass : V2 -> NP -> MassCN -> Sent ;
SentV3 : V3 -> NP -> NP -> NP -> Sent ;
SentV3Mass : V3 -> NP -> MassCN -> NP -> Sent ;
SentA : A -> NP -> Sent ;
SentNP : NP -> NP -> Sent ;
SentAdvV : V -> NP -> Adv -> Sent ;
SentAdvV2 : V2 -> NP -> NP -> Adv -> Sent ;
ImpV : V -> Imp ;
ImpV2 : V2 -> NP -> Imp ;
ImpV2Mass : V2 -> MassCN -> Imp ;
ImpV3 : V3 -> NP -> NP -> Imp ;
ImpV3Mass : V3 -> MassCN -> NP -> Imp ;
UsePron : Pron -> NP ;
PossPronCNSg : Pron -> CN -> NP ;
PossPronCNPl : Pron -> CN -> NP ;
DetCN : Det -> CN -> NP ;
NumCN : Num -> CN -> NP ;
UseN : N -> CN ;
ModCN : A -> CN -> CN ;
UseMassN : MassN -> MassCN ;
ModMass : A -> MassCN -> MassCN ;
}

View File

@@ -0,0 +1,88 @@
incomplete concrete PeaceSyntaxI of PeaceSyntax =
PeaceCatI ** open Lang,PeaceRes in {
flags
-- optimize = all_subs ;
optimize = share ;
unlexer = text ; lexer = text ;
lincat
Sent = {s : SForm => Str} ;
Quest = { s : Str } ;
MassCN = CN ;
lin
PhrPos sent = stop (sent.s!SPos) ;
PhrNeg sent = stop (sent.s!SNeg) ;
PhrQuest q = quest q.s ;
PhrImp imp = excl (PhrUtt NoPConj (UttImpSg PPos imp) NoVoc).s;
PhrImpNeg imp = excl (PhrUtt NoPConj (UttImpSg PNeg imp) NoVoc).s;
PhrYes = stop yes_Phr.s ;
PhrNo = stop no_Phr.s ;
QuestSent sent = { s = sent.s!SQuest } ;
QuestIP_V v ip = mkQuest (QuestVP ip (UseV v)) ;
QuestIP_V2 v ip x = mkQuest (QuestVP ip (ComplV2 v x)) ;
QuestIP_V2Mass v ip x = mkQuest (QuestVP ip (ComplV2 v (massNP x))) ;
QuestIP_V3 v ip x y = mkQuest (QuestVP ip (ComplV3 v x y)) ;
QuestIP_V3Mass v ip x y = mkQuest (QuestVP ip (ComplV3 v (massNP x) y)) ;
QuestIP_A a ip = mkQuest (QuestVP ip (UseComp (CompAP (PositA a))));
QuestIAdv_NP x ia = mkQuest (QuestIComp (CompIAdv ia) x);
QuestIAdv_V v x ia = mkQuest (QuestIAdv ia (PredVP x (UseV v)));
QuestIAdv_V2 v x y ia = mkQuest (QuestIAdv ia (PredVP x (ComplV2 v y)));
SentV v np = mkSent np (UseV v) ;
SentV2 v x y = mkSent x (ComplV2 v y) ;
SentV2Mass v x y = mkSent x (ComplV2 v (massNP y)) ;
SentV3 v x y z = mkSent x (ComplV3 v y z) ;
SentV3Mass v x y z = mkSent x (ComplV3 v (massNP y) z) ;
SentA a x = mkSent x (UseComp (CompAP (PositA a))) ;
SentNP a x = mkSent x (UseComp (CompNP a)) ;
SentAdvV v np adv = mkSent np (AdvVP (UseV v) adv) ;
SentAdvV2 v x y adv = mkSent x (AdvVP (ComplV2 v y) adv) ;
ImpV v = ImpVP (UseV v) ;
ImpV2 v x = ImpVP (ComplV2 v x) ;
ImpV2Mass v x = ImpVP (ComplV2 v (massNP x)) ;
ImpV3 v x y = ImpVP (ComplV3 v x y) ;
ImpV3Mass v x y = ImpVP (ComplV3 v (massNP x) y) ;
UsePron p = UsePron p ;
PossPronCNSg p n = DetCN (DetSg (SgQuant (PossPron p)) NoOrd) n;
PossPronCNPl p n = DetCN (DetPl (PlQuant (PossPron p)) NoNum NoOrd) n;
DetCN d n = DetCN d n ;
NumCN k cn = DetCN (DetPl (PlQuant IndefArt) k NoOrd) cn ;
UseN n = UseN n ;
ModCN a cn = AdjCN (PositA a) cn ;
UseMassN mn = UseN mn ;
ModMass a cn = AdjCN (PositA a) cn ;
param
SForm = SPos | SNeg | SQuest ;
oper
mkSent : NP -> VP -> Sent ;
mkSent np vp =
let cl = PredVP np vp
in {
s = table {
SPos => Predef.toStr S (UseCl TPres ASimul PPos cl) ;
SNeg => Predef.toStr S (UseCl TPres ASimul PNeg cl) ;
SQuest => Predef.toStr QS (UseQCl TPres ASimul PPos (QuestCl cl))
} ;
lock_Sent = <>
} ;
massNP : CN -> NP = \mcn -> DetCN (DetSg MassDet NoOrd) mcn ;
mkQuest : QCl -> Quest ;
mkQuest q = { s = Predef.toStr QS (UseQCl TPres ASimul PPos q);
lock_Quest = <> } ;
}

View File

@@ -0,0 +1,14 @@
Some things we could use for inspiration:
Spanish Phrase Book for First-Aid Trained Activists
http://bostoncoop.net/balm/phrasebook1.pdf
Emergency multilingual phrasebook
http://www.dh.gov.uk/PublicationsAndStatistics/Publications/PublicationsPolicyAndGuidance/PublicationsPolicyAndGuidanceArticle/fs/en?CONTENT_ID=4073230&chk=8XboAN
Ogden's Basic English:
http://ogden.basic-english.org/words.html

View File

@@ -0,0 +1,3 @@
--# -path=.:present:prelude
concrete PeaceCat_Eng of PeaceCat = CatEng ** PeaceCatI with (Lang = LangEng);

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceLexCommon_Eng of PeaceLexCommon =
PeaceCat_Eng ** PeaceLexCommonI with (Lang = LangEng) ;

View File

@@ -0,0 +1,48 @@
--# -path=.:present:prelude
concrete PeaceLexExt_Eng of PeaceLexExt =
PeaceCat_Eng ** open ParadigmsEng, IrregEng,
LexiconEng, StructuralEng in {
lin
-- Adjectives
dangerous_A = regA "dangerous" ;
dead_A = regA "dead" ;
hungry_A = regA "hungry" ;
large_A = regA "large" ;
sick_A = regA "sick" ;
-- Nouns
air_N = regN "air" ;
arm_N = regN "arm" ;
building_N = regN "building" ;
car_N = regN "car" ;
corpse_N = regN "corpse" ;
doctor_N = regN "doctor";
enemy_N = regN "enemy";
face_N = regN "face" ;
food_N = regN "food";
friend_N = regN "friend";
ground_N = regN "ground" ;
knife_N = mk2N "knife" "knives" ;
landmine_N = regN "landmine" ;
map_N = regN "map" ;
medicine_N = regN "medicine" ;
police8officer_N = compoundN "police" (regN "officer") ;
skin_N = regN "skin" ;
soldier_N = regN "soldier" ;
toy_N = regN "toy" ;
translation8machine_N = compoundN "translation" (regN "machine") ;
weapon_N = regN "weapon";
-- Verbs
cooperate_V2 = mkV2 (regV "cooperate") (mkPrep "with") ;
cough_V = regV "cough" ;
drop_V2 = dirV2 (regDuplV "drop") ;
hurt_V = hurt_V ;
need_V2 = dirV2 (regV "need");
own_V2 = dirV2 (regV "own") ;
show_V3 = dirdirV3 (regV "show") ;
}

View File

@@ -0,0 +1,12 @@
--# -path=.:..:present:prelude
concrete PeacePhrases_Eng of PeacePhrases =
PeaceCat_Eng ** open ResEng, PeaceRes in {
lin
Hello = stop "hello" ;
GoodMorning = stop ["good morning"];
GoodEvening = stop ["good evening"] ;
WhatIsNamePron p = quest (["what is"] ++ p.s!Gen ++ "name") ;
}

View File

@@ -0,0 +1,8 @@
--# -path=.:..:present:prelude
concrete PeaceSpoken_Eng of PeaceSpoken =
Peace_Eng ** {
flags startcat = PhraseSpoken ;
}

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceSyntax_Eng of PeaceSyntax = PeaceCat_Eng ** PeaceSyntaxI with
(Lang = LangEng) ;

View File

@@ -0,0 +1,10 @@
--# -path=.:..:present:prelude
concrete Peace_Eng of Peace =
PeaceSyntax_Eng, PeaceLexCommon_Eng,
PeaceLexExt_Eng, PeacePhrases_Eng
** {
flags startcat = PhraseWritten ;
}

View File

@@ -0,0 +1,3 @@
--# -path=.:present:prelude
concrete PeaceCat_Fin of PeaceCat = CatFin ** PeaceCatI with (Lang = LangFin);

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceLexCommon_Fin of PeaceLexCommon =
PeaceCat_Fin ** PeaceLexCommonI with (Lang = LangFin) ;

View File

@@ -0,0 +1,44 @@
--# -path=.:present:prelude
concrete PeaceLexExt_Fin of PeaceLexExt =
PeaceCat_Fin ** open ParadigmsFin in {
lin
-- Adjectives
dangerous_A = regA "vaarallinen" ;
dead_A = mkA (nRae "kuollut" "kuolleena") ;
hungry_A = regA "nälkäinen" ;
large_A = regA "iso" ;
sick_A = regA "sairas" ;
-- Nouns
air_N = regN "ilma" ;
arm_N = reg3N "käsi" "käden" "käsiä" ;
building_N = regN "rakennus" ;
car_N = regN "auto" ;
corpse_N = regN "ruumis" ;
doctor_N = regN "lääkäri";
enemy_N = regN "vihollinen";
face_N = regN "naama" ; ---- kasvot
food_N = regN "ruoka";
friend_N = regN "ystävä";
ground_N = regN "maa" ;
knife_N = reg2N "veitsi" "veitsiä" ; ---- veistä
landmine_N = regN "maamiina" ;
map_N = regN "kartta" ;
medicine_N = regN "lääke" ;
police8officer_N = regN "poliisi" ;
skin_N = regN "iho" ;
soldier_N = regN "sotilas" ;
weapon_N = regN "ase";
-- Verbs
cough_V = regV "yskiä" ;
drop_V2 = dirV2 (regV "pudottaa") ;
hurt_V = regV "sattua" ;
need_V2 = dirV2 (regV "tarvita");
own_V2 = dirV2 (regV "omistaa") ;
show_V3 = dirdirV3 (regV "näyttää") ;
}

View File

@@ -0,0 +1,14 @@
--# -path=.:..:present:prelude
concrete PeacePhrases_Fin of PeacePhrases =
PeaceCat_Fin ** open LangFin, ParadigmsFin, PeaceRes in {
lin
Hello = stop "terve" ;
GoodMorning = stop ["hyvää huomenta"] ;
GoodEvening = stop ["hyvää iltaa"] ;
WhatIsNamePron p = quest (PhrUtt NoPConj (UttQS (UseQCl TPres ASimul PPos
(QuestVP whatSg_IP (UseComp (CompNP (DetCN (DetSg (SgQuant (PossPron p)) NoOrd)
(UseN (reg2N "nimi" "nimiä")))))))) NoVoc).s ;
}

View File

@@ -0,0 +1,8 @@
--# -path=.:..:present:prelude
concrete PeaceSpoken_Fin of PeaceSpoken =
Peace_Fin ** {
flags startcat = PhraseSpoken ;
}

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceSyntax_Fin of PeaceSyntax = PeaceCat_Fin ** PeaceSyntaxI with
(Lang = LangFin) ;

View File

@@ -0,0 +1,10 @@
--# -path=.:..:present:prelude
concrete Peace_Fin of Peace =
PeaceSyntax_Fin, PeaceLexCommon_Fin,
PeaceLexExt_Fin, PeacePhrases_Fin
** {
flags startcat = PhraseWritten ;
optimize = all_subs ;
}

View File

@@ -0,0 +1,4 @@
i -optimize=share english/Peace_Eng.gf
i -optimize=share swedish/Peace_Swe.gf
s
pm | wf peace.gfcm

View File

@@ -0,0 +1,3 @@
--# -path=.:present:prelude
concrete PeaceCat_Swe of PeaceCat = CatSwe ** PeaceCatI with (Lang = LangSwe);

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceLexCommon_Swe of PeaceLexCommon =
PeaceCat_Swe ** PeaceLexCommonI with (Lang = LangSwe) ;

View File

@@ -0,0 +1,48 @@
--# -path=.:present:prelude
concrete PeaceLexExt_Swe of PeaceLexExt =
PeaceCat_Swe ** open ParadigmsSwe, IrregSwe,
LexiconSwe, StructuralSwe in {
lin
-- Adjectives
dangerous_A = regA "farlig" ;
dead_A = regA "död" ;
hungry_A = regA "hungrig" ;
large_A = big_A ;
sick_A = regA "sjuk" ;
-- Nouns
air_N = regN "luft" ;
arm_N = regN "arm" ;
building_N = mk2N "byggnad" "byggnader" ;
car_N = regN "bil" ;
corpse_N = mk2N "lik" "lik" ;
doctor_N = mkN "doktor" "doktorn" "doktorer" "doktorerna";
enemy_N = mk2N "fiende" "fiender" ;
face_N = regN "ansikte" ;
food_N = regN "mat";
friend_N = mkN "vän" "vännen" "vänner" "vännerna" ;
ground_N = mk2N "mark" "marker";
knife_N = regN "kniv" ;
landmine_N = regN "landmina" ;
map_N = regN "karta" ;
medicine_N = mk2N "medicin" "mediciner";
police8officer_N = mk2N "polis" "poliser" ;
skin_N = mk2N "skinn" "skinn" ;
soldier_N = mk2N "soldat" "soldater" ;
toy_N = regN "leksak" ;
translation8machine_N = mk2N "översättningsmaskin" "översättningsmaskiner";
weapon_N = mkN "vapen" "vapnet" "vapen" "vapnen" ;
-- Verbs
cooperate_V2 = mkV2 (regV "samarbetar") (mkPrep "med") ;
cough_V = regV "hostar" ;
drop_V2 = dirV2 (regV "släpper") ;
hurt_V = partV göra_V "ont" ; -- FIXME: "Gör ont ditt ben?"
need_V2 = dirV2 (regV "behöver");
own_V2 = dirV2 (regV "äger") ;
show_V3 = dirdirV3 (regV "visar") ;
}

View File

@@ -0,0 +1,12 @@
--# -path=.:..:present:prelude
concrete PeacePhrases_Swe of PeacePhrases =
PeaceCat_Swe ** open CommonScand, PeaceRes in {
lin
Hello = stop "hej" ;
GoodMorning = stop ["god morgon"] ;
GoodEvening = stop ["god kväll"] ;
WhatIsNamePron p = stop (["vad heter"] ++ p.s!NPNom) ;
}

View File

@@ -0,0 +1,8 @@
--# -path=.:..:present:prelude
concrete PeaceSpoken_Swe of PeaceSpoken =
Peace_Swe ** {
flags startcat = PhraseSpoken ;
}

View File

@@ -0,0 +1,5 @@
--# -path=.:present:prelude
concrete PeaceSyntax_Swe of PeaceSyntax = PeaceCat_Swe ** PeaceSyntaxI with
(Lang = LangSwe) ;

View File

@@ -0,0 +1,10 @@
--# -path=.:..:present:prelude
concrete Peace_Swe of Peace =
PeaceSyntax_Swe, PeaceLexCommon_Swe,
PeaceLexExt_Swe, PeacePhrases_Swe
** {
flags startcat = PhraseWritten ;
}