1
0
forked from GitHub/gf-rgl

(Por) correct documentation generation in Paradigms

- use gfdoc correctly
- use paradigms in Lexicon
- use lin instead of lock_* in Paradigms
- fix typo in languages.csv
This commit is contained in:
odanoburu
2019-01-11 13:26:20 -02:00
parent 2c0a34b9f4
commit 182ef92260
3 changed files with 184 additions and 190 deletions

View File

@@ -33,7 +33,7 @@ Pes,Persian,persian,,,,,,,,y
Pnb,Punjabi,punjabi,,,y,,,,,y
Pol,Polish,polish,,,,,,,,y
Por,Portuguese,portuguese,Romance,,y,,,,y,y
Ron,Pomanian,romanian,,,y,,,,,y
Ron,Romanian,romanian,,,y,,,,,y
Rus,Russian,russian,,,y,,,,,y
Snd,Sindhi,sindhi,,,,,,,,y
Spa,Spanish,spanish,Romance,,y,,,,y,y
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis
33 Pnb Punjabi punjabi y y
34 Pol Polish polish y
35 Por Portuguese portuguese Romance y y y
36 Ron Pomanian Romanian romanian y y
37 Rus Russian russian y y
38 Snd Sindhi sindhi y
39 Spa Spanish spanish Romance y y y

View File

@@ -10,12 +10,12 @@ flags
lin
easy_A2V = mkA2V (mkA "fácil") dative genitive ;
married_A2 = mkA2 (mkA "casado") (mkPrep "com") ;
probable_AS = mkAS (prefA (mkA "provável")) ;
probable_AS = mkAS (prefixA (mkA "provável")) ;
fun_AV = mkAV (mkA "divertido") genitive ;
-- A
bad_A = prefA (mkA (mkA "mau") (mkA "pior")) ;
beautiful_A = prefA (mkA "belo") ; -- bela
big_A = prefA (mkA "grande") ;
bad_A = prefixA (mkA (mkA "mau") (mkA "pior")) ;
beautiful_A = prefixA (mkA "belo") ; -- bela
big_A = prefixA (mkA "grande") ;
black_A = mkA "preto" ; -- preta
blue_A = mkA "azul" ;
broad_A = mkA "largo" ;
@@ -29,7 +29,7 @@ lin
dull_A = mkA "desafilado" ;
empty_A = mkA "vazio" ;
full_A = mkA "cheio" ;
good_A = prefA (mkA (mkA "bom") (mkA "melhor")) ; ---- adv?
good_A = prefixA (mkA (mkA "bom") (mkA "melhor")) ; ---- adv?
green_A = mkA "verde" ;
heavy_A = mkA "pesado" ;
hot_A = mkA "quente" ;
@@ -37,15 +37,15 @@ lin
long_A = mkA "longo" ;
narrow_A = mkA "estreito" ;
near_A = mkA "perto" ;
new_A = prefA (mkA "novo") ;
old_A = prefA (mkA "velho") ;
new_A = prefixA (mkA "novo") ;
old_A = prefixA (mkA "velho") ;
ready_A = adjCopula (mkA "pronto") D.estarCopula ;
red_A = mkA "vermelho" ;
rotten_A = mkA "podre" ;
round_A = mkA "redondo" ;
sharp_A = mkA "afiado" ; -- pontiagudo
short_A = mkA "curto" ; --- breve, pequeno, baixo
small_A = prefA (mkA "pequeno") ;
small_A = prefixA (mkA "pequeno") ;
smooth_A = mkA "liso" ; -- suave
straight_A = mkA "direto" ; -- reto
stupid_A = mkA "estúpido" ;
@@ -58,7 +58,7 @@ lin
white_A = compADeg (mkA "branco") ;
wide_A = mkA "largo" ; -- extenso
yellow_A = mkA "amarelo" ;
young_A = prefA (mkA "jovem") ;
young_A = prefixA (mkA "jovem") ;
already_Adv = mkAdv "já" ;
far_Adv = mkAdv "longe" ; ----?
now_Adv = mkAdv "agora" ;
@@ -256,7 +256,7 @@ lin
paris_PN = mkPN "Paris" feminine ;
-- V
rain_V0 = mkV0 (mkV (chover_Besch "chover")) ;
paint_V2A = mkV2A (mkV "pintar") accusative (mkPrep "em") ;
paint_V2A = mkV2A (mkV "pintar") accusative (mkPrep "de") ;
ask_V2Q = mkV2Q (mkV "perguntar") dative ;
answer_V2S = mkV2S (mkV "responder") dative ;
beg_V2V = mkV2V (mkV "rogar") accusative dative ; -- pedir
@@ -321,7 +321,7 @@ lin
become_VA = reflV (mkV "tornar") ;
know_VQ = mkVQ saber_V ;
wonder_VQ = mkVQ (reflV (mkV "perguntar")) ;
fear_VS = mkVS (mkV "temer") ;
fear_VS = subjVS (mkV "temer") ;
hope_VS = mkVS (mkV "esperar") ;
know_VS = mkVS saber_V ;
say_VS = mkVS (mkV (dizer_Besch "dizer")) ;

View File

@@ -1,5 +1,9 @@
--# -path=.:../romance:../common:../abstract:../prelude
-- ATTENTION: this module is documented with gfdoc; please be mindful --%
-- of the way comments are structured; read gfdoc's documentation if --%
-- you intend to change any comments in any way. --%
--1 Portuguese Lexical Paradigms
--
--
@@ -13,7 +17,10 @@
-- The main difference with $MorphoPor.gf$ is that the types referred
-- to are compiled resource grammar types. We have moreover had the
-- design principle of always having existing forms, rather than
-- stems, as string arguments of the paradigms.
-- stems, as string arguments of the paradigms. Another important
-- difference with $MorphoPor.gf$ is that this API is committed to
-- backward-compatibility in a way that $MorphoPor.gf$ is not, so you
-- are discouraged to use the latter.
--
-- The structure of functions for each word class $C$ is the
-- following: first we give a handful of patterns that aim to cover
@@ -64,53 +71,51 @@ oper
-- 'dative' "a").
accusative : Prep ; -- direct object
accusative = complAcc ** {lock_Prep = <>} ;
accusative = lin Prep complAcc ;
genitive : Prep ; -- preposition "de" and its contractions
genitive = complGen ** {lock_Prep = <>} ;
genitive = lin Prep complGen ;
dative : Prep ; -- preposition "a" and its contractions
dative = complDat ** {lock_Prep = <>} ;
dative = lin Prep complDat ;
mkPrep = overload {
mkPrep : Str -> Prep = -- other preposition
\p -> {s = p ; c = Acc ; isDir = False ; lock_Prep = <>} ;
mkPrep : Str -> Case -> Prep =
-- compound prepositions, e.g. "antes de", made as mkPrep
-- "antes" genitive
\p,c -> {s = p ; c = c ; isDir = False ; lock_Prep = <>}
mkPrep : Str -> Prep -- other preposition
= \p -> lin Prep {s = p ; c = Acc ; isDir = False} ;
mkPrep : Str -> Case -> Prep -- compound prepositions, e.g. "antes de", made as ``mkPrep "antes" genitive``
= \p,c -> lin Prep {s = p ; c = c ; isDir = False}
} ;
--2 Nouns
regN : Str -> N ;
regN : Str -> N ; --%
regN x = lin N (mkNomReg x) ;
femN : N -> N ;
femN : N -> N ; --%
femN n = n ** {g = feminine} ;
mascN : N -> N ;
mascN : N -> N ; --%
mascN n = n ** {g = masculine} ;
mk2N : (bastão, bastões : Str) -> Gender -> N ;
mk2N : (bastão, bastões : Str) -> Gender -> N ; --%
mk2N x y g = lin N (mkNounIrreg x y g) ;
-- The regular function takes the singular form and the gender, and
-- computes the plural and the gender by a heuristic (see MorphoPor
-- for which heuristic).
mkN = overload {
-- predictable; "-a" for feminine, otherwise Masculine
mkN : (luz : Str) -> N = regN ;
-- force plural
mkN : (alemão, alemães : Str) -> N =
\s,p -> regN s ** {s = numForms s p} ;
mkN : (luz : Str) -> N -- predictable nouns
= regN ;
mkN : (alemão, alemães : Str) -> N -- force noun plural, guess gender
= \s,p -> regN s ** {s = numForms s p} ;
-- force gender
mkN : Str -> Gender -> N =
\s,g -> regN s ** {g = g} ;
-- The worst case has two forms (singular + plural) and the
-- gender.
mkN : (bastão,bastões : Str) -> Gender -> N = mk2N
mkN : (mapa : Str) -> Gender -> N -- force gender, guess plural
= \s,g -> regN s ** {g = g} ;
mkN : (bastão,bastões : Str) -> Gender -> N -- the worst case demands two forms (singular + plural) and the gender.
= mk2N
} ;
--3 Compound nouns
@@ -120,31 +125,31 @@ oper
-- could be formed in syntax, but we give a shortcut here since they
-- are frequent in lexica.
compN : N -> Str -> N ; -- compound, e.g. "número" + "de telefone"
compN : N -> Str -> N ; -- compound with non-inflecting second part, e.g. "número" + "de telefone"
compN x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
compNN : N -> N -> N ; -- compound, e.g. "forma" + "finita"
compNN : N -> N -> N ; -- compound with inflecting second part, e.g. "forma" + "finita"
compNN x y = x ** {s = \\n => x.s ! n ++ y.s ! n} ;
--3 Relational nouns
--
-- Relational nouns ("filha de x") need a case and a preposition.
mkN2 : N -> Prep -> N2 ; -- relational noun with prepositio
mkN2 : N -> Prep -> N2 ; -- relational noun with preposition, e.g. "comida para (viagem)"
mkN2 = \n,p -> lin N2 (n ** {c2 = p}) ;
-- The most common cases are the genitive "de" and the dative "a",
-- with the empty preposition.
deN2 : N -> N2 ; -- relational noun with preposition "de"
deN2 : N -> N2 ; -- relational noun with preposition "de", e.g. "filho de (fulano)"
deN2 n = mkN2 n genitive ;
aN2 : N -> N2 ; -- relational noun with preposition "a"
aN2 : N -> N2 ; -- relational noun with preposition "a", e.g. "molho a francesa"
aN2 n = mkN2 n dative ;
-- Three-place relational nouns ("a conexão de x a y") need two
-- prepositions.
mkN3 : N -> Prep -> Prep -> N3 ; -- prepositions for two complements
mkN3 : N -> Prep -> Prep -> N3 ; -- relational noun with two prepositions for two complements, e.g. "a relação de (fulana) com (cicrana)"
mkN3 = \n,p,q -> lin N3 (n ** {c2 = p ; c3 = q}) ;
--3 Relational common noun phrases
@@ -160,7 +165,7 @@ oper
-- Proper names need a string and a gender. The default gender is
-- feminine for names ending with "a", otherwise masculine.
regPN : Str -> PN ; -- feminine for "-a", otherwise masculine
regPN : Str -> PN ; --%
regPN x = mk2PN x g where {
g = case last x of {
"a" => feminine ;
@@ -168,20 +173,22 @@ oper
}
} ;
mk2PN : Str -> Gender -> PN ; -- Pilar
mk2PN : Str -> Gender -> PN ; --%
mk2PN x g = lin PN {s = x ; g = g} ;
mkPN = overload {
-- feminine for "-a", else masculine
mkPN : (Anna : Str) -> PN = regPN ;
-- force gender
mkPN : (Pilar : Str) -> Gender -> PN = mk2PN ;
-- gender from Noun
mkPN : N -> PN = \n -> lin PN {s = n.s ! Sg ; g = n.g} ;
mkPN : (Anna : Str) -> PN -- regular proper noun: feminine for "-a", else masculine
= regPN ;
mkPN : (Pilar : Str) -> Gender -> PN -- force gender of proper noun
= mk2PN ;
mkPN : N -> PN -- build proper noun from noun, taking gender and singular form
= \n -> lin PN {s = n.s ! Sg ; g = n.g} ;
} ;
--2 Adjectives
compADeg : A -> A ;
compADeg : A -> A ; --%
compADeg a = a ** {
s = table {
Posit => a.s ! Posit ;
@@ -189,25 +196,25 @@ oper
} ;
} ;
liftAdj : Adj -> A ;
liftAdj : Adj -> A ; --%
liftAdj adj = compADeg (lin A {s = \\_ => adj.s ; isPre = False ; copTyp = serCopula}) ;
regA : Str -> A ;
regA : Str -> A ; --%
regA a = liftAdj (mkAdjReg a) ;
mk2A : (patrão,patroa : Str) -> A ;
mk2A : (patrão,patroa : Str) -> A ; --%
mk2A ms fs = liftAdj (mkAdjReg2 ms fs) ;
mk4A : (bobão,bobona,bobões,bobonas : Str) -> A ;
mk4A : (bobão,bobona,bobões,bobonas : Str) -> A ; --%
mk4A a b c d = liftAdj (mkAdj4 a b c d) ;
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ; --%
mk5A a b c d e = liftAdj (mkAdj a b c d e) ;
adjCopula : A -> CopulaType -> A ;
adjCopula : A -> CopulaType -> A ; --%
adjCopula a cop = a ** {copTyp = cop} ;
mkADeg : A -> A -> A ;
mkADeg : A -> A -> A ; --%
mkADeg a b = a ** {
s = table {
Posit => a.s ! Posit ;
@@ -217,7 +224,7 @@ oper
}
} ;
invarA : Str -> A ;
invarA : Str -> A ; -- invariable adjective, e.g. "simples"
invarA a = liftAdj (mkAdj4 a a a a) ;
mkNonInflectA : A -> Str -> A ;
@@ -229,36 +236,27 @@ oper
-- For regular adjectives, all forms are derived from the
-- masculine singular. The types of adjectives that are recognized
-- are "alto", "fuerte", "util". Comparison is formed by "mas".
mkA : (bobo : Str) -> A
= regA ; -- predictable adjective
-- are "alto", "forte", "útil" and others. Comparison is formed by "mais".
mkA : (bobo : Str) -> A -- predictable adjective
= regA ;
-- Some adjectives need the feminine form separately.
mkA : (espanhol,espanhola : Str) -> A
mkA : (espanhol,espanhola : Str) -> A -- some adjectives need the feminine form separately
= mk2A ;
-- Very rarely (if ever) does one need to specify the adverbial
-- form.
mkA : (burrão,burrona,burrões,burronas : Str) -> A
mkA : (burrão,burrona,burrões,burronas : Str) -> A -- provide masculine and feminine singular and plural forms (very rarely does one need to specify the adverbial form)
= mk4A ;
-- One-place adjectives compared with "mais" need five forms in
-- the worst case (masc and fem singular, masc and fem plural,
-- adverbial).
mkA : (gabarolas,gabarolas,gabarolas,gabarolas,gabarolamente : Str) -> A = mk5A ;
mkA : (gabarolas,gabarolas,gabarolas,gabarolas,gabarolamente : Str) -> A -- one-place adjectives compared with "mais" need five forms in the worst case (masc and fem singular, masc and fem plural, adverbial).
= mk5A ;
-- In the worst case, two separate adjectives are given: the positive
-- ("bom"), and the comparative ("melhor"). special comparison with
-- "mais" as default
mkA : (bom : A) -> (melhor : A) -> A
--
mkA : (bom : A) -> (melhor : A) -> A -- two separate adjectives are given: the positive ("bom"), and the comparative ("melhor"). Comparison with "mais" is the default.
= mkADeg ;
-- noninflecting component after the adjective
mkA : (blanco : A) -> (hueso : Str) -> A
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective
= mkNonInflectA ;
-- force copula type
mkA : A -> CopulaType -> A
mkA : A -> CopulaType -> A -- force copula type, e.g. "João está doente", "João é doente"
= adjCopula ;
} ;
@@ -268,43 +266,46 @@ oper
-- in "bom vinho"), the following function is provided.
prefixA : A -> A ; -- adjective before noun (default after noun)
prefixA = prefA ;
prefA : A -> A ;
prefA a = lin A {s = a.s ; isPre = True ; copTyp = a.copTyp} ;
prefixA a = a ** {isPre = True} ;
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
mkA2 : A -> Prep -> A2 ; -- e.g. "casado" + dative
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkA2 : A -> Prep -> A2 ; -- two-place adjectives, e.g. "casado" + "com"
mkA2 a p = lin A2 a ** {c2 = p} ;
--2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position after
-- the verb.
mkAdv : Str -> Adv ;
mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdv : Str -> Adv ; -- after the verb adverb
mkAdv x = lin Adv (ss x) ;
-- Some appear next to the verb (e.g. "sempre").
mkAdV : Str -> AdV ;
mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdV : Str -> AdV ; -- before the verb adverb, e.g. "nunca"
mkAdV x = lin AdV (ss x) ;
-- Adverbs modifying adjectives and sentences can also be formed.
mkAdA : Str -> AdA ;
mkAdA x = ss x ** {lock_AdA = <>} ;
mkAdA : Str -> AdA ; -- adverb modifying adjectives, e.g. "muito"
mkAdA x = lin AdA (ss x) ;
mkAdN : Str -> AdN ;
mkAdN x = ss x ** {lock_AdN = <>} ;
mkAdN : Str -> AdN ; -- adverb modifying numeral, e.g. "pelo menos"
mkAdN x = lin AdN (ss x) ;
--2 Verbs
regV : Str -> V ;
regV v =
regV : Str -> V ; --%
regV s = case s of {
chamar + "-se" => reflV (regV' chamar) ;
_ => regV' s
} ;
regV' : Str -> V ; --%
regV' v =
let
xr = Predef.dp 2 v ; -- -ar
z = Predef.dp 1 (Predef.tk 2 v) ; -- i in -iar
@@ -338,55 +339,45 @@ oper
in lin V (verboV (paradigm v)) ;
mkV = overload {
--- [ ] update
-- Regular verbs are ones inflected like "cortar", "dever", or
-- "partir". The regular verb function is the first conjugation
-- ("ar") recognizes the variations corresponding to the patterns
-- "actuar, cazar, guiar, pagar, sacar". The module $BeschPor$ gives
-- the complete set of "Bescherelle" conjugations.
mkV : (pagar : Str) -> V = \s -> case s of {
chamar + "-se" => reflV (regV chamar) ;
_ => regV s
} ; -- regular in "-ar", "-er", "-ir"
-- Regular verbs are ones inflected like "cortar", "dever", or
-- "partir". This smart paradigm recognizes other patterns, but
-- it is not perfect. The module $BeschPor$ gives the complete set
-- of "Bescherelle" conjugations.
-- Verbs with vowel alternation in the stem - easiest to give with two
-- forms, e.g. "mostrar"/"muestro".
-- mkV : (mostrar,muestro : Str) -> V = regAltV ;
-- rm'ed as is uncommon in Por
mkV : (pagar : Str) -> V -- predictable verb, e.g., "comer", "chamar-se"
= regV ;
mkV : (abrir,aberto : Str) -> V -- deviant past participle, e.g. abrir - aberto
= \v,pp -> special_ppV (regV v) pp ;
-- Most irregular verbs are found in $IrregPor$. If this is not
-- enough, the module $BeschPor$ gives all the patterns of the
-- "Bescherelle" book. To use them in the category $V$, wrap them with
-- the function
mkV : Verbum -> V = \v -> -- import verb constructed with BeschPor
lin V (verboV v) ;
mkV : Verbum -> V -- import verb constructed with BeschPor
= \v -> lin V (verboV v) ;
mkV : V -> Str -> V -- particle verb
= \v,p -> v ** {p = p} ;
-- particle verb
mkV : V -> Str -> V =
\v,p -> v ** {p = p} ; -- to recognize particles in dict, not
-- yet in lincat V
} ;
-- To form reflexive verbs:
reflV : V -> V ; -- reflexive verb
reflV : V -> V ; -- force reflexive verb, e.g. ``reflV "chamar"``
reflV v = v ** {vtyp = VRefl} ;
-- Verbs with a deviant passive participle: just give the participle
-- in masculine singular form as second argument.
special_ppV : V -> Str -> V ;
-- deviant past participle, e.g. abrir - aberto
special_ppV ve pa = {
special_ppV : V -> Str -> V ; -- force past participle, e.g. abrir - aberto
special_ppV ve pa = ve ** {
s = table {
VPart g n => (mkAdjReg pa).s ! (genNum2Aform g n) ;
p => ve.s ! p
} ;
lock_V = <> ;
p = ve.p ;
vtyp = VHabere
}
} ;
@@ -394,22 +385,24 @@ oper
--
-- Two-place verbs need a preposition, except the special case with
-- direct object. (transitive verbs).
dirV2 : V -> V2 ;
dirV2 : V -> V2 ; --%
dirV2 v = mk2V2 v accusative ;
mk2V2 : V -> Prep -> V2 ;
mk2V2 : V -> Prep -> V2 ; --%
mk2V2 v p = lin V2 (v ** {c2 = p}) ;
mkV2 = overload {
mkV2 : Str -> V2 = -- regular, direct object
\s -> dirV2 (regV s) ;
mkV2 : V -> V2 = dirV2 ; -- direct object
mkV2 : V -> Prep -> V2 = mk2V2 -- other object
mkV2 : (amar : Str) -> V2 -- predictable verb with direct object
= \s -> dirV2 (regV s) ;
mkV2 : V -> V2 -- verb with direct object (no preposition)
= dirV2 ;
mkV2 : V -> Prep -> V2 -- verb with other object
= mk2V2
} ;
-- You can reuse a $V2$ verb in $V$.
v2V : V2 -> V ;
v2V : V2 -> V ; -- coerce ``V2`` to ``V``
v2V v = lin V v ;
--3 Three-place verbs
@@ -418,105 +411,105 @@ oper
-- the first one or both can be absent.
mkV3 = overload {
mkV3 : Str -> V3 = \s -> dirdirV3 (regV s) ;
mkV3 : V -> V3 = dirdirV3 ; -- donner (+ accusative + dative)
mkV3 : V -> Prep -> V3 = dirV3 ; -- placer (+ accusative) + dans
mkV3 : V -> Prep -> Prep -> V3 = mmkV3 -- parler + dative + genitive
mkV3 : (dar : Str) -> V3 -- dar (+ accusative + dative), e.g. "ele dá um cachorro a Paris"
= \s -> dirdirV3 (regV s) ;
mkV3 : V -> V3 -- dar (+ accusative + dative)
= dirdirV3 ;
mkV3 : V -> Prep -> V3 -- force one preposition, e.g. "ele vende a João um cachorro"
= dirV3 ;
mkV3 : V -> Prep -> Prep -> V3 -- force prepositions, e.g. "ela fala de Paris a João"
= mmkV3
} ;
dirV3 : V -> Prep -> V3 ;
-- e.g. dar,(accusative),a
dirV3 : V -> Prep -> V3 ; --%
dirV3 v p = mmkV3 v accusative p ;
dirdirV3 : V -> V3 ;
-- e.g. dar,(dative),(accusative)
dirdirV3 : V -> V3 ; --%
dirdirV3 v = mmkV3 v dative accusative ;
mmkV3 : V -> Prep -> Prep -> V3 ;
-- falar a (fulano) de (cicrano)
mmkV3 v p q = v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
mmkV3 : V -> Prep -> Prep -> V3 ; --%
mmkV3 v p q = lin V3 v ** {c2 = p ; c3 = q} ;
--3 Other complement patterns
--
-- Verbs and adjectives can take complements such as sentences,
-- questions, verb phrases, and adjectives.
mkV0 : V -> V0 ; --%
mkV0 v = v ** {lock_V0 = <>} ;
-- Notice: $V0$ is just $V$.
V0 : Type -- zero-place verbs, e.g. "chover"
= V ;
mkVS : V -> VS ;
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ; ---- more moods
mkV0 : V -> V0 ; -- "chover"
mkV0 v = lin V0 v ;
subjVS : V -> VS ;
subjVS v = v ** {m = \\_ => Conjunct ; lock_VS = <>} ;
mkVS : V -> VS ; -- complement sentence in the indicative mood, e.g. "eu sei que meu cachorro viverá"
mkVS v = lin VS v ** {m = \\_ => Indic} ;
mkVV : V -> VV ;
-- plain infinitive: "quero falar"
mkVV v = v ** {c2 = complAcc ; lock_VV = <>} ;
subjVS : V -> VS ; -- complement sentence in the subjunctive mood, e.g. "eu temo que meu cachorro morra"
subjVS v = lin VS v ** {m = \\_ => Conjunct} ;
deVV : V -> VV ;
-- "terminar de falar"
deVV v = v ** {c2 = complGen ; lock_VV = <>} ;
mkVV : V -> VV ; -- plain infinitive: "quero falar"
mkVV = makeVV accusative ;
aVV : V -> VV ;
-- "aprender a falar"
aVV v = v ** {c2 = complDat ; lock_VV = <>} ;
deVV : V -> VV ; -- "terminar de falar"
deVV = makeVV genitive ;
mkVA : V -> VA ;
mkVA v = v ** {lock_VA = <>} ;
aVV : V -> VV ; -- "aprender a falar"
aVV = makeVV dative ;
mkVQ : V -> VQ ;
mkVQ v = v ** {lock_VQ = <>} ;
makeVV : Prep -> V -> VV ; --%
makeVV p v = lin VV v ** {c2 = p} ;
mkV2Q : V -> Prep -> V2Q ;
mkV2Q v p = mk2V2 v p ** {lock_V2Q = <>} ;
mkVA : V -> VA ; -- "ela se tornou direta"
mkVA v = lin VA v ;
mmkV2 : V -> Prep -> V2 ;
mmkV2 v p = v ** {c2 = p ; lock_V2 = <>} ;
mkVQ : V -> VQ ; -- "nós nos perguntamos se você ama alguém"
mkVQ v = lin VQ v ;
mkV2Q : V -> Prep -> V2Q ; -- "pergunte a João se ele bebe água"
mkV2Q v p = lin V2Q (mk2V2 v p) ;
mmkV2 : V -> Prep -> V2 ; --%
mmkV2 v p = lin V2 (v ** {c2 = p}) ;
mkV2S = overload {
mkV2S : V -> V2S =
\v -> mmkV2 v dative ** {mn,mp = Indic ; lock_V2S = <>} ;
mkV2S : V -> Prep -> V2S =
\v,p -> mmkV2 v p ** {mn,mp = Indic ; lock_V2S = <>} ;
mkV2S : V -> V2S -- "ele respondeu a João que ela vivia"
= \v -> lin V2S (mmkV2 v dative ** {mn,mp = Indic}) ;
mkV2S : V -> Prep -> V2S -- force preposition
= \v,p -> lin V2S (mmkV2 v p ** {mn,mp = Indic}) ;
} ;
mkV2V = overload {
mkV2V : V -> V2V =
\v -> mmkV3 v accusative dative ** {lock_V2V = <>} ;
mkV2V : V -> Prep -> Prep -> V2V =
\v,p,q -> mmkV3 v p q ** {lock_V2V = <>} ;
mkV2V : V -> V2V -- verb with verb complement in the accusative and NP complement in the dative
= \v -> lin V2V (mmkV3 v accusative dative) ;
mkV2V : V -> Prep -> Prep -> V2V -- "ele rogou a Paris para viver"
= \v,p,q -> lin V2V (mmkV3 v p q) ;
} ;
mkV2A = overload {
mkV2A : V -> V2A =
\v -> mmkV3 v accusative dative ** {lock_V2A = <>} ;
mkV2A : V -> Prep -> Prep -> V2A =
\v,p,q -> mmkV3 v p q ** {lock_V2A = <>} ;
mkV2A : V -> V2A -- verb with NP and AP complement (in the dative)
= \v -> lin V2A (mmkV3 v accusative dative) ;
mkV2A : V -> Prep -> Prep -> V2A -- ele pintou a casa de branco
= \v,p,q -> lin V2A (mmkV3 v p q) ;
} ;
mkAS : A -> AS ; --%
mkAS v = v ** {lock_AS = <>} ; ---- more moods
mkAS v = lin AS v ;
mkA2S : A -> Prep -> A2S ; --%
mkA2S v p = mkA2 v p ** {lock_A2S = <>} ;
mkA2S v p = lin A2S (mkA2 v p) ;
mkAV : A -> Prep -> AV ; --%
mkAV v p = v ** {c = p.p1 ; s2 = p.p2 ; lock_AV = <>} ;
mkAV v p = lin AV (v ** {c = p.p1 ; s2 = p.p2}) ;
mkA2V : A -> Prep -> Prep -> A2V ; --%
mkA2V v p q = mkA2 v p ** {s3 = q.p2 ; c3 = q.p1 ; lock_A2V = <>} ;
-- Notice: $V0$ is just $V$.
V0 : Type ; --%
V0 : Type = V ;
mkA2V v p q = lin A2V (mkA2 v p ** {s3 = q.p2 ; c3 = q.p1}) ;
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$, and the second
-- argument is given as an adverb.
AS, A2S, AV, A2V : Type ; --%
AS, AV : Type = A ;
A2S, A2V : Type = A2 ;
AS, AV : Type = A ; --%
A2S, A2V : Type = A2 ; --%
---
@@ -524,13 +517,14 @@ oper
-- To form a noun phrase that can also be plural,
-- you can use the worst-case function.
makeNP : Str -> Gender -> Number -> NP ;
makeNP : Str -> Gender -> Number -> NP ; --%
makeNP x g n = {s = (pn2np (mk2PN x g)).s;
a = agrP3 g n ;
hasClit = False ;
isPol = False ;
isNeg = False} ** {lock_NP = <>} ;
reflVerboV : Verbum -> V = \ve -> reflV (lin V (verboV ve)) ;
reflVerboV : Verbum -> V = \ve -> reflV (lin V (verboV ve)) ; --%
} ;