cp old labs to new folders

This commit is contained in:
Arianna Masciolini
2025-03-17 18:09:48 +01:00
parent 37b39176d9
commit 721fc839a2
70 changed files with 6357 additions and 0 deletions

View File

@@ -0,0 +1,165 @@
abstract MicroLang = {
-- a very minimal version of MiniGrammar + MiniLexicon, helping to get started
-----------------------------------------------------
---------------- Grammar part -----------------------
-----------------------------------------------------
cat
-- Common
Utt ; -- sentence, question, word... e.g. "be quiet"
-- Cat
S ; -- declarative sentence e.g. "she lives here"
VP ; -- verb phrase e.g. "lives here"
Comp ; -- complement of copula e.g. "warm"
AP ; -- adjectival phrase e.g. "warm"
CN ; -- common noun (without determiner) e.g. "red house"
NP ; -- noun phrase (subject or object) e.g. "the red house"
Det ; -- determiner phrase e.g. "those"
Prep ; -- preposition, or just case e.g. "in", dative
V ; -- one-place verb e.g. "sleep"
V2 ; -- two-place verb e.g. "love"
A ; -- one-place adjective e.g. "warm"
N ; -- common noun e.g. "house"
Pron ; -- personal pronoun e.g. "she"
Adv ; -- adverbial phrase e.g. "in the house"
fun
-- Phrase
UttS : S -> Utt ; -- he walks
UttNP : NP -> Utt ; -- he
-- Sentence
PredVPS : NP -> VP -> S ; -- John walks --s shortcut even wrt MiniGrammar
-- Verb
UseV : V -> VP ; -- sleep
ComplV2 : V2 -> NP -> VP ; -- love it ---s
UseComp : Comp -> VP ; -- be small
CompAP : AP -> Comp ; -- small
AdvVP : VP -> Adv -> VP ; -- sleep here
-- Noun
DetCN : Det -> CN -> NP ; -- the man
UsePron : Pron -> NP ; -- she
a_Det : Det ; -- indefinite singular ---s
aPl_Det : Det ; -- indefinite plural ---s
the_Det : Det ; -- definite singular ---s
thePl_Det : Det ; -- definite plural ---s
UseN : N -> CN ; -- house
AdjCN : AP -> CN -> CN ; -- big house
-- Adjective
PositA : A -> AP ; -- warm
-- Adverb
PrepNP : Prep -> NP -> Adv ; -- in the house
-- Structural
in_Prep : Prep ;
on_Prep : Prep ;
with_Prep : Prep ;
he_Pron : Pron ;
she_Pron : Pron ;
they_Pron : Pron ;
-----------------------------------------------------
---------------- Lexicon part -----------------------
-----------------------------------------------------
fun
already_Adv : Adv ;
animal_N : N ;
apple_N : N ;
baby_N : N ;
bad_A : A ;
beer_N : N ;
big_A : A ;
bike_N : N ;
bird_N : N ;
black_A : A ;
blood_N : N ;
blue_A : A ;
boat_N : N ;
book_N : N ;
boy_N : N ;
bread_N : N ;
break_V2 : V2 ;
buy_V2 : V2 ;
car_N : N ;
cat_N : N ;
child_N : N ;
city_N : N ;
clean_A : A ;
clever_A : A ;
cloud_N : N ;
cold_A : A ;
come_V : V ;
computer_N : N ;
cow_N : N ;
dirty_A : A ;
dog_N : N ;
drink_V2 : V2 ;
eat_V2 : V2 ;
find_V2 : V2 ;
fire_N : N ;
fish_N : N ;
flower_N : N ;
friend_N : N ;
girl_N : N ;
good_A : A ;
go_V : V ;
grammar_N : N ;
green_A : A ;
heavy_A : A ;
horse_N : N ;
hot_A : A ;
house_N : N ;
-- john_PN : PN ;
jump_V : V ;
kill_V2 : V2 ;
-- know_VS : VS ;
language_N : N ;
live_V : V ;
love_V2 : V2 ;
man_N : N ;
milk_N : N ;
music_N : N ;
new_A : A ;
now_Adv : Adv ;
old_A : A ;
-- paris_PN : PN ;
play_V : V ;
read_V2 : V2 ;
ready_A : A ;
red_A : A ;
river_N : N ;
run_V : V ;
sea_N : N ;
see_V2 : V2 ;
ship_N : N ;
sleep_V : V ;
small_A : A ;
star_N : N ;
swim_V : V ;
teach_V2 : V2 ;
train_N : N ;
travel_V : V ;
tree_N : N ;
understand_V2 : V2 ;
wait_V2 : V2 ;
walk_V : V ;
warm_A : A ;
water_N : N ;
white_A : A ;
wine_N : N ;
woman_N : N ;
yellow_A : A ;
young_A : A ;
}

View File

@@ -0,0 +1,16 @@
PredVPS nsubj head
ComplV2 head obj
AdvVP head advmod
DetCN det head
AdjCN amod head
PrepNP case head
Det DET
Prep ADP
V VERB
V2 VERB
A ADJ
N NOUN
Pron PRON
Adv ADV

View File

@@ -0,0 +1,121 @@
abstract MiniGrammar = {
-- collected from GF/lib/src/abstract/*.gf
-- the functions marked ---s are shortcuts
-- the leading comments, e.g. "-- Common", indicate the standard RGL module
cat
-- Common
Utt ; -- sentence, question, word... e.g. "be quiet"
Pol ; -- polarity e.g. positive, negative
Temp ; -- temporal features e.g. present, anterior
-- Cat
Imp ; -- imperative e.g. "walk", "don't walk"
S ; -- declarative sentence e.g. "she lives here"
QS ; -- question sentence e.g. "does she live here"
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
QCl ; -- question clause e.g. "does she look at this"
VP ; -- verb phrase e.g. "lives here"
Comp ; -- complement of copula e.g. "in trouble"
AP ; -- adjectival phrase e.g. "very warm"
CN ; -- common noun (without determiner) e.g. "red house"
NP ; -- noun phrase (subject or object) e.g. "the red house"
IP ; -- interrogative phrase e.g. "who"
Pron ; -- personal pronoun e.g. "she"
Det ; -- determiner phrase e.g. "those"
Conj ; -- conjunction e.g. "and"
Prep ; -- preposition, or just case e.g. "in", dative
V ; -- one-place verb e.g. "sleep"
V2 ; -- two-place verb e.g. "love"
VS ; -- sentence-complement verb e.g. "know"
VV ; -- verb-phrase-complement verb e.g. "want"
A ; -- one-place adjective e.g. "warm"
N ; -- common noun e.g. "house"
PN ; -- proper name e.g. "Paris"
Adv ; -- adverbial phrase e.g. "in the house"
IAdv ; -- interrogative adverbial e.g. "where"
fun
-- Phrase
UttS : S -> Utt ; -- John walks
UttQS : QS -> Utt ; -- does John walk
UttNP : NP -> Utt ; -- John
UttAdv : Adv -> Utt ; -- in the house
UttIAdv : IAdv -> Utt ; -- why
UttImpSg : Pol -> Imp -> Utt ; -- (do not) walk
-- Sentence
UseCl : Temp -> Pol -> Cl -> S ; -- John has not walked
UseQCl : Temp -> Pol -> QCl -> QS ; -- has John walked
PredVP : NP -> VP -> Cl ; -- John walks / John does not walk
QuestCl : Cl -> QCl ; -- does John (not) walk
QuestVP : IP -> VP -> QCl ; -- who does (not) walk
ImpVP : VP -> Imp ; -- walk / do not walk
-- Verb
UseV : V -> VP ; -- sleep
ComplV2 : V2 -> NP -> VP ; -- love it ---s
ComplVS : VS -> S -> VP ; -- know that it is good
ComplVV : VV -> VP -> VP ; -- want to be good
UseComp : Comp -> VP ; -- be small
CompAP : AP -> Comp ; -- small
CompNP : NP -> Comp ; -- a man
CompAdv : Adv -> Comp ; -- in the house
AdvVP : VP -> Adv -> VP ; -- sleep here
-- Noun
DetCN : Det -> CN -> NP ; -- the man
UsePN : PN -> NP ; -- John
UsePron : Pron -> NP ; -- he
MassNP : CN -> NP ; -- milk
a_Det : Det ; -- indefinite singular ---s
aPl_Det : Det ; -- indefinite plural ---s
the_Det : Det ; -- definite singular ---s
thePl_Det : Det ; -- definite plural ---s
UseN : N -> CN ; -- house
AdjCN : AP -> CN -> CN ; -- big house
-- Adjective
PositA : A -> AP ; -- warm
-- Adverb
PrepNP : Prep -> NP -> Adv ; -- in the house
-- Conjunction
CoordS : Conj -> S -> S -> S ; -- he walks and she runs ---s
-- Tense
PPos : Pol ; -- I sleep [positive polarity]
PNeg : Pol ; -- I do not sleep [negative polarity]
TSim : Temp ; -- simultanous: she sleeps ---s
TAnt : Temp ; -- anterior: she has slept ---s
-- Structural
and_Conj : Conj ;
or_Conj : Conj ;
every_Det : Det ;
in_Prep : Prep ;
on_Prep : Prep ;
with_Prep : Prep ;
i_Pron : Pron ;
youSg_Pron : Pron ;
he_Pron : Pron ;
she_Pron : Pron ;
we_Pron : Pron ;
youPl_Pron : Pron ;
they_Pron : Pron ;
whoSg_IP : IP ;
where_IAdv : IAdv ;
why_IAdv : IAdv ;
have_V2 : V2 ;
want_VV : VV ;
}

View File

@@ -0,0 +1,8 @@
abstract MiniLang =
MiniGrammar,
MiniLexicon
** {
flags startcat = Utt ;
}

View File

@@ -0,0 +1,27 @@
AdjCN amod head
AdvVP head advmod
ComplV2 head obj
ComplVS head ccomp
ComplVV head xcomp
CoordS cc head conj
DetCN det head
PredVP nsubj head
PrepNP case head
QuestVP nsubj head
UseCl empty empty head
UseQCl empty empty head
UttImpSg emoty head
A ADJ
Adv ADV
Conj CONJ
Det DET
IAdv ADV
N NOUN
PN PROPN
Prep ADP
Pron PRON
V VERB
V2 VERB
VV VERB
VS VERB

View File

@@ -0,0 +1,92 @@
abstract MiniLexicon = MiniGrammar ** {
fun
already_Adv : Adv ;
animal_N : N ;
apple_N : N ;
baby_N : N ;
bad_A : A ;
beer_N : N ;
big_A : A ;
bike_N : N ;
bird_N : N ;
black_A : A ;
blood_N : N ;
blue_A : A ;
boat_N : N ;
book_N : N ;
boy_N : N ;
bread_N : N ;
break_V2 : V2 ;
buy_V2 : V2 ;
car_N : N ;
cat_N : N ;
child_N : N ;
city_N : N ;
clean_A : A ;
clever_A : A ;
cloud_N : N ;
cold_A : A ;
come_V : V ;
computer_N : N ;
cow_N : N ;
dirty_A : A ;
dog_N : N ;
drink_V2 : V2 ;
eat_V2 : V2 ;
find_V2 : V2 ;
fire_N : N ;
fish_N : N ;
flower_N : N ;
friend_N : N ;
girl_N : N ;
good_A : A ;
go_V : V ;
grammar_N : N ;
green_A : A ;
heavy_A : A ;
horse_N : N ;
hot_A : A ;
house_N : N ;
john_PN : PN ;
jump_V : V ;
kill_V2 : V2 ;
know_VS : VS ;
language_N : N ;
live_V : V ;
love_V2 : V2 ;
man_N : N ;
milk_N : N ;
music_N : N ;
new_A : A ;
now_Adv : Adv ;
old_A : A ;
paris_PN : PN ;
play_V : V ;
read_V2 : V2 ;
ready_A : A ;
red_A : A ;
river_N : N ;
run_V : V ;
sea_N : N ;
see_V2 : V2 ;
ship_N : N ;
sleep_V : V ;
small_A : A ;
star_N : N ;
swim_V : V ;
teach_V2 : V2 ;
train_N : N ;
travel_V : V ;
tree_N : N ;
understand_V2 : V2 ;
wait_V2 : V2 ;
walk_V : V ;
warm_A : A ;
water_N : N ;
white_A : A ;
wine_N : N ;
woman_N : N ;
yellow_A : A ;
young_A : A ;
}