1
0
forked from GitHub/gf-rgl
This commit is contained in:
Herbert Lange
2019-03-19 16:35:26 +01:00
136 changed files with 350432 additions and 9856 deletions

99
doc/CountLines.hs Normal file
View File

@@ -0,0 +1,99 @@
import System.Directory
import Data.Char
import Data.List
-- counting modules and lines in RGL implementations
-- leaving out Lexicon, Structural, dictionaries, Extra, Extend,... (see below the list of prefixes)
main = do
mapM_ getCounts allLanguages
getCounts (lan,language) = do
cs <- mapM (getCount language lan) prefixes
let (ms,ls) = unzip cs
putStrLn $ unwords [language, show (sum ms), show (sum ls)]
getCount language lan pref = do
let file = concat ["../src/",language,"/",pref,lan,".gf"]
--- putStrLn file
ms <- readFileIf file
case ms of
Nothing -> return (0,0)
Just s -> return (1,length (codeLines (lines s)))
codeLines ls = filter (\l -> not (all isSpace l || isPrefixOf "--" l)) ls
readFileIf name = do
b <- doesFileExist name
case b of
True -> readFile name >>= return . Just
False -> return Nothing
prefixes = [
"Adjective"
,"Adverb"
,"Cat"
,"Common"
,"Conjunction"
,"Diff"
,"Grammar"
,"Lang"
-- ,"Lexicon"
,"Noun"
,"Numeral"
,"Phrase"
,"Question"
,"Relative"
,"Sentence"
-- ,"Structural"
,"Tense"
,"Text"
,"Verb"
,"Res"
,"Morpho"
,"Phono"
,"Paradigms"
]
allLanguages = [
("", "abstract")
,("Afr","afrikaans")
,("Ara","arabic")
--- ,("Bul","bulgarian") ---- todo convert to utf8
,("Cat","catalan")
,("Chi","chinese")
,("Dan","danish")
,("Dut","dutch")
,("Eng","english")
,("Est","estonian")
,("Eus","basque")
,("Fin","finnish")
,("Fre","french")
,("Ger","german")
,("Gre","greek")
,("Hin","hindi")
,("Ice","icelandic")
,("Ita","italian")
,("Jpn","japanese")
,("Lav","latvian")
,("Mlt","maltese")
,("Mon","mongolian")
,("Nep","nepali")
,("Nno","nynorsk")
,("Nor","norwegian")
,("Pes","persian")
,("Pnb","punjabi")
,("Pol","polish")
,("Por","portuguese")
---- ,("Ron","romanian")
,("Rus","russian")
,("Snd","sindhi")
,("Spa","spanish")
,("Swe","swedish")
,("Tha","thai")
,("Urd","urdu")
,("Romance","romance")
,("Scand","scandinavian")
,("Hindustani","hindustani")
]

View File

@@ -15,17 +15,18 @@ that are currently available via http://grammaticalframework.org
are marked in the table
|| ISO | Language | Darcs | Mini | Parad | Lex | Lang | API | Symb | Irreg | Dict | Trans | tested | publ | authors ||
|| ISO | Language | Git | Mini | Parad | Lex | Lang | API | Symb | Irreg | Dict | Trans | tested | publ | authors ||
| Afr | Afrikaans | + | - | ++ | + | + | + | - | - | - | - | - | - | *LP,LM
| Amh | Amharic | + | + | ++ | + | + | - | - | - | - | - | - | + | *MK
| Ara | Arabic | + | + | + | + | - | - | - | - | - | - | - | + | AD
| Ara | Arabic | + | + | + | + | + | + | + | - | - | - | + | + | AD,*IL
| Bul | Bulgarian | + | + | + | + | + | + | + | + | + | + | ++ | + | *KA
| Cat | Catalan | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *JS,*IL
| Chi | Chinese | + | - | ++ | + | + | + | - | - | + | + | - | + | ZL,*AR,*CP,QH
| Dan | Danish | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
| Dut | Dutch | + | + | ++ | + | + | + | + | + | - | + | + | - | *AR,FJ
| Eng | English | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *AR,BB,KA
| Est | Estonian | + | - | ++ | + | + | + | - | - | - | - | + | + | *KK,*IL
| Est | Estonian | + | - | ++ | + | + | + | - | - | + | + | + | + | *KK,*IL
| Eus | Basque | + | - | ++ | + | + | + | - | - | - | - | - | + | *IL
| Fin | Finnish | + | + | ++ | + | + | + | + | - | + | + | ++ | + | *AR,*IL
| Fre | French | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,RE
| Ger | German | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,HH,EG
@@ -44,9 +45,10 @@ are marked in the table
| Nep | Nepali | + | + | ++ | + | + | - | - | - | - | - | - | + | *DS
| Nno | Norwegian(n) | + | + | ++ | + | + | + | + | + | - | - | - | - | *SRE
| Nor | Norwegian(b) | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
| Pes | Persian | + | - | + | + | + | + | - | - | - | - | + | + | *SV,*EA,SM
| Pes | Persian | + | - | + | + | + | + | - | - | - | - | + | + | SV,EA,SM,*IL
| Pnb | Punjabi | + | + | + | + | + | + | + | - | - | - | - | + | *SV,MH
| Pol | Polish | + | + | + | + | + | + | + | - | - | - | + | + | IN,*AS
| Por | Portuguese | + | + | ++ | + | + | + | + | + | - | + | + | - | *BC
| Ron | Romanian | + | + | ++ | + | + | + | + | - | - | - | + | + | *RE
| Rus | Russian | + | + | ++ | + | + | + | - | - | + | + | - | + | JK,*NF
| Snd | Sindhi | + | + | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD
@@ -54,16 +56,14 @@ are marked in the table
| Swa | Swahili | + | - | - | - | - | - | - | - | - | - | - | + | *WN,JM
| Swe | Swedish | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *MA,*AR,MF
| Tha | Thai | + | - | ++ | + | + | + | + | - | - | + | + | - | *AR,CK
| Tsn | Tswana | - | - | - | - | - | - | - | - | - | - | - | - | *LPs,AB
| Tsn | Tswana | - | - | - | - | - | - | - | - | - | - | - | - | *LP,AB
| Tur | Turkish | + | - | ++ | + | - | - | - | - | + | - | - | - | *SC,KA
| Urd | Urdu | + | + | ++ | + | + | + | + | - | - | - | + | + | *SV,MH
ISO = 3-letter ISO language code, used in library file names
(mostly ISO 639-2 B (bibliographic))
Darcs = available in the darcs repository of --http://code.haskell.org/gf-- http://www.grammaticalframework.org/
Mini = minimal resource, compiles with ``make minimal`` (obsolete)
Git = available in the gf-rgl Git repository
Parad = ``Paradigms`` file complete for major POS, ++ means with smart paradigms
@@ -73,7 +73,7 @@ Lang = the resource ``Syntax`` (nearly) complete
API = the ``Syntax`` compiles
API = the ``Symbolic`` API compiles
Symb = the ``Symbolic`` API compiles
Irreg = the ``Irreg`` module with irregular verbs exists
@@ -96,6 +96,7 @@ AD Ali El Dada,
AR Aarne Ranta,
AS Adam Slaski,
BB Björn Bringert,
BC Bruno Cuconato,
BT Bjarki Traustason,
CK Chotiros Kairoje,
CP Chen Peng,
@@ -146,8 +147,7 @@ ZL Zhuo Lin Qiqige
==Rules==
Only components available at http://grammaticalframework.org are indicated in the table
(exceptions: Ancient Greek, Mongolian, to appear soon).
Only components available at http://grammaticalframework.org are indicated in the table.
If you want to work on a language already in the table, please be kind and contact the
active authors of it.

View File

@@ -46,7 +46,7 @@ abstract functions and their Universal Dependency labels
- Paper "The GF Resource Grammar Library" by A. Ranta
(//Linguistic Issues in Language Technology//, 2 (2), 2009). An overview of
the library with linguistic motivations.
[PDF http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158]
[PDF https://journals.linguisticsociety.org/elanguage/lilt/article/download/214/214-501-1-PB.pdf]
- Paper "Grammars as Software Libraries" by A. Ranta
(In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
//From Semantics to Computer Science//, Cambridge University Press,

View File

@@ -33,8 +33,9 @@ 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
Slv,Slovenian,slovenian,,,,,n,n,,n
Snd,Sindhi,sindhi,,,,,,,,y
Spa,Spanish,spanish,Romance,,y,,,,y,y
Swa,Swahili,swahili,,,,n,n,n,y,n
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 Slv Slovenian slovenian n n n
39 Snd Sindhi sindhi y
40 Spa Spanish spanish Romance y y y
41 Swa Swahili swahili n n n y n

View File

@@ -115,6 +115,9 @@ abstract Extend = Cat ** {
ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
-- generalisation of existential, with adverb as a parameter
AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
-- infinitive for purpose AR 21/8/2013
PurposeVP : VP -> Adv ; -- to become happy
@@ -206,6 +209,8 @@ abstract Extend = Cat ** {
DetNPMasc : Det -> NP ;
DetNPFem : Det -> NP ;
UseComp_estar : Comp -> VP ; -- (Cat, Spa, Por) "está cheio" instead of "é cheio"
iFem_Pron : Pron ; -- I (Fem)
youFem_Pron : Pron ; -- you (Fem)
weFem_Pron : Pron ; -- we (Fem)

View File

@@ -13,7 +13,7 @@ concrete AdverbAra of Adverb = CatAra ** open ResAra, Prelude in {
PrepNP prep np = {s = prep.s ++ bindIf (orB np.a.isPron prep.binds) ++ np.s ! prep.c} ;
AdAdv ad av = cc2 av ad ;
AdAdv ad av = cc2 ad av ;
-- : Subj -> S -> Adv ; -- when she sleeps
SubjS subj s = {s = subj.s ++ s.s ! subj.o} ;

View File

@@ -13,7 +13,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
SSlash,
S = {s : Order => Str} ; -- subordinate clause has nominal word order and subject in acc
QS = {s : QForm => Str} ;
RS = {s : Agr => Case => Str} ; -- case because the relative pronoun inflects in case
RS = {s : PerGenNum => Case => Str} ; -- case because the relative pronoun inflects in case
-- Sentence
@@ -77,12 +77,12 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
-- Open lexical classes, e.g. Lexicon
V, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ;
V2, V2A = ResAra.Verb2 ;
VV = ResAra.Verb2 ** {sc : Preposition} ; -- c2 is for verb
V2S, V2Q = ResAra.Verb2 ;
VS = ResAra.Verb ** {o : Order; s2 : Str} ;
VV = ResAra.Verb ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser
V2, V2A, V2Q = ResAra.Verb2 ;
V2V = ResAra.Verb2 ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser, c2 is for dir.obj
V2S = ResAra.Verb2 ** {s2 : Str ; o : Order} ;
VS = ResAra.Verb ** {s2 : Str ; o : Order} ;
V3 = ResAra.Verb3 ;
V2V = ResAra.Verb3 ** {sc : Preposition} ; -- c3 is for verb, c2 is for dir.obj
A = ResAra.Adj ;
A2 = ResAra.Adj2 ;
@@ -96,6 +96,6 @@ linref
CN = \cn -> uttCN cn ! Masc ;
N = \n -> uttCN (useN n) ! Masc ;
VP = \vp -> uttVP vp ! Masc ;
VP = \vp -> uttVP VPPerf vp ! Masc ;
}

View File

@@ -57,7 +57,7 @@ lin
oper
amount_N : N = mkN "مِقْدَار" "مَقَادِير" masc nohum ;
amount_N : N = mkN "مِقْدَار" "مَقَادِير" masc nohum ;
-- hack used in the name constructions
toNP : Bool -> NP -> NP = \b -> if_then_else NP b R.emptyNP ;
@@ -85,9 +85,12 @@ lin
myAge : NP = E.ApposNP me (mkNP (mkDet subjPron) L.name_N) ;
in mkQCl what_IP myAge ;
-- hungry_VP =
-- thirsty_VP =
hungry_VP = mkVP hungry_A ;
thirsty_VP = mkVP thirsty_A ;
oper
hungry_A = mkA "جءع" "فَاعِل" ;
thirsty_A = mkA True "عطش" "فَعْلَان" "فَعْلَى" ;
lincat Language = N ;
lin InLanguage l = mkAdv in_Prep (mkNP l) ;

View File

@@ -2,26 +2,28 @@
concrete ExtendAra of Extend =
CatAra ** ExtendFunctor - [
GenNP, SlashBareV2S, PredAPVP, GenModNP, ExistsNP,
StrandRelSlash, ExistPluralCN, ExistMassCN, ExistCN, EmptyRelSlash, DetNPMasc, DetNPFem,
ComplBareVS, ComplDirectVS, ComplDirectVQ,
ICompAP,
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
ApposNP
GenNP, ApposNP, ICompAP, DetNPMasc, DetNPFem,
EmptyRelSlash, PredAPVP,
ComplDirectVS, ComplDirectVQ, -- because of Utt
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS
]
with (Grammar=GrammarAra)
** open
ParamX,
ResAra,
Prelude,
ParadigmsAra,
RelativeAra,
Coordination
in {
lin
GenNP np = baseQuant ** {s = \\_,_,_,_ => np.s ! Gen ; d = Const} ;
-- If the NP is a pronoun, just use PossPron
GenNP np = case np.a.isPron of {
True => Grammar.PossPron (pgn2pron np.a.pgn) ;
False => let g = np.s ! Gen in mkQuant3 g g g Const
} ;
-- : NP -> NP -> NP
ApposNP np1 np2 = np2 ** {s = \\c => np1.s ! c ++ np2.s ! c} ;
@@ -29,6 +31,18 @@ concrete ExtendAra of Extend =
-- : AP -> IComp ; -- "how old"
ICompAP ap = {s = \\gn => "كَمْ" ++ ap.s ! NoHum ! gn.g ! gn.n ! Indef ! Acc} ;
-- : AP -> VP -> Cl ; -- it is good to walk
PredAPVP ap vp =
let isGood : Str = "مِنَ" ++ ap.s ! Hum ! Masc ! Sg ! Def ! Gen ;
toWalk : Str = "ال" ++ BIND ++ (uttVP VPGer vp ! Masc) ; -- TODO: Masdar into NForm=>Str?
goodToWalk_Adv : Adv = lin Adv {s = isGood ++ toWalk} ;
in PredVP emptyNP (UseComp (CompAdv goodToWalk_Adv)) ;
-- : Det -> NP
DetNPMasc det = emptyNP ** {s = det.s ! NoHum ! Masc} ;
DetNPFem det = emptyNP ** {s = det.s ! NoHum ! Fem} ;
-- : ClSlash -> RCl -- he lives in
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;

View File

@@ -25,19 +25,22 @@ concrete IdiomAra of Idiom = CatAra ** open
CleftAdv adv s =
let comp : Comp = CompAdv (lin Adv {s = adv.s ++ s.s ! Verbal}) ; -- no idea about word order /IL
pass_V = mkV "مضي" va vi ; -- switch to copula or some other verb if better /IL
in predVP emptyNP (UseV pass_V ** {isPred=True ; pred=comp}) ; -- very hacky /IL
in predVP emptyNP (UseV pass_V ** {vtype=Copula ; pred=comp}) ; -- very hacky /IL
-- : NP -> Cl ; -- there is a house
ExistNP np =
predVP (emptyNP ** {s=\\c=>"هُنَاكَ"}) (UseComp (CompNP np)) ; -- IL
predVP (indeclNP "هُنَاكَ" Sg) (UseComp (CompNP np)) ; -- IL
-- ExistIP : IP -> QCl ; -- which houses are there
-- : IP -> QCl ; -- which houses are there
ExistIP ip = let cl = ExistNP (ip2np ip False) in {
s = \\t,p,q => cl.s ! t ! p ! Nominal -- IL guessed
} ;
-- 7/12/2012 generalizations of these
-- : NP -> Adv -> Cl ; -- there is a house in Paris
ExistNPAdv np adv =
predVP (emptyNP ** {s=\\c=>"هُنَاكَ"}) (AdvVP (UseComp (CompNP np)) adv) ; -- IL
predVP (indeclNP "هُنَاكَ" Sg) (AdvVP (UseComp (CompNP np)) adv) ; -- IL
-- ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris

View File

@@ -11,7 +11,7 @@ flags
lin
airplane_N = sdfN "طءر" "فاعِلة" Fem NoHum ;
answer_V2S = dirV2 (v3 "جوب") ;
answer_V2S = mkV2S (v3 "جوب") ;
apartment_N = brkN "شقّ" "فِعّة" "فِعَل" Fem NoHum ;
apple_N = sdfN "تفح" "فِعّالة" Fem NoHum ;
art_N = brkN "فنن" "فَعّ" "فُعُول" Masc NoHum ;
@@ -142,7 +142,7 @@ flags
old_A = sndA "قدم" "فَعِيل" ;
open_V2 = dirV2 (regV "يَفتَح") ;
-- open_V2 = dirV2 (v1 "فتح" a a ) ;
paint_V2A = mkV2A (regV "يَدهَن" ) [] ;
paint_V2A = dirV2 (regV "يَدهَن" ) ;
-- paint_V2A = mkV2A (v1 "دهن" a a ) [] ;
paper_N = brkN "ورق" "فَعَلة" "أَفعَال" Fem NoHum ;
paris_PN = mkPN "بارِيس" Fem NoHum ;

View File

@@ -11,8 +11,6 @@ oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ;
oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ;
oper DetNP : Det -> NP = notYet "DetNP" ;
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper PConjConj : Conj -> PConj = notYet "PConjConj" ;
@@ -23,10 +21,8 @@ oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper VocNP : NP -> Voc = notYet "VocNP" ;
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
}

File diff suppressed because it is too large Load Diff

View File

@@ -47,7 +47,14 @@ lin
UsePron p = p ;
DetNP det = emptyNP ** {s = det.s ! NoHum ! Masc} ; ----
DetNP det = case det.isEmpty of {
True => case <det.d,det.n> of { -- if the s field is empty, make up some other determiner
<Def,One> => he_Pron ;
<Def,_> => theyMasc_Pron ;
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
} ;
False => emptyNP ** {s = det.s ! NoHum ! Masc} } ;
PredetNP det np = np ** {
s = \\c => case det.isDecl of {
@@ -75,7 +82,7 @@ lin
DetQuantOrd quant num ord = quant ** {
s = \\h,g,c => let d = toDef quant.d num.n in
quant.s ! Pl ! h ! g ! c
quant.s ! Pl ! h ! g ! c -- TODO what is this Pl? Was there when I started /IL
++ num.s ! g ! d ! c
--FIXME check this:
++ ord.s ! g
@@ -107,7 +114,7 @@ lin
s = \\_,_,_,_ => BIND ++ p.s ! Gen;
d = Poss;
is1sg = is1sg p.a ;
isPron = True} ;
isPron = p.a.isPron} ;
NumSg = {
s = \\_,_,_ => [] ;
@@ -192,19 +199,19 @@ lin
RelCN cn rs = cn ** {
s2 = \\n,s,c => cn.s2 ! n ! s ! c
++ rs.s ! {pgn=Per3 cn.g n ; isPron=False} ! c ;
++ rs.s ! Per3 cn.g n ! c ;
isHeavy = True
} ;
RelNP np rs = np ** {
s = \\c => np.s ! c ++ rs.s ! np.a ! c ;
s = \\c => np.s ! c ++ rs.s ! np.a.pgn ! c ;
isHeavy = True
} ;
AdvCN,
SentCN = \cn,ss -> cn ** {
s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ss.s ;
np = \\c => cn.np ! c ++ ss.s ;
isHeavy = True
} ;

View File

@@ -3,6 +3,7 @@
--1 Arabic Lexical Paradigms
--
-- Ali El Dada 2005--2006
-- Inari Listenmaa 2018-
--
-- This is an API to the user of the resource grammar
-- for adding lexical items. It gives functions for forming
@@ -26,9 +27,8 @@
resource ParadigmsAra = open
Predef,
Prelude,
MorphoAra,
ResAra,
OrthoAra,
(ResAra=ResAra),
(A=AdjectiveAra),
CatAra
in {
@@ -37,98 +37,71 @@ resource ParadigmsAra = open
oper
Case : Type ;
nom : Case ;
acc : Case ;
gen : Case ;
Case : Type ; -- Argument to mkPrep
nom : Case ; -- Nominative
acc : Case ; -- Accusative
gen : Case ; -- Genitive
-- Prepositions are used in many-argument functions for rection.
Preposition : Type ;
noPrep : Preposition ;
casePrep : Case -> Preposition ;
--- TODO: continue, add all over the grammar
Gender : Type ; -- Argument to mkN and mkPN
masc : Gender ; -- Masculine
fem : Gender ; -- Feminine
Gender : Type ;
masc : Gender ;
fem : Gender ;
Number : Type ; -- Argument to mkConj ("NP and NP" plural; "NP or NP" singular), and special cases of mkN, where nominal attribute is included in the N.
sg : Number ; -- Singular
pl : Number ; -- Plural
Number : Type ;
sg : Number ;
pl : Number ;
Species : Type ; -- Argument to mkN.
hum : Species ; -- Human nouns (teacher, woman, brother, …)
nohum : Species ; -- Any other nouns (house, dog, …)
Species : Type ;
hum : Species ;
nohum : Species ;
Vowel : Type ;
va : Vowel ;
vi : Vowel ;
vu : Vowel ;
Vowel : Type ; -- Argument to mkV, when constructing verbs of Form I.
va : Vowel ; -- a (fatha) as the perfect or imperfect vowel, e.g. فعَل
vi : Vowel ; -- i (kasra) as the perfect or imperfect vowel, e.g فعِل
vu : Vowel ; -- u (damma) as the perfect or imperfect vowel, e.g. فعُل
--2 Nouns
-- Overloaded operator for main cases
mkN : overload {
mkN : (sg : Str) -> N ; -- non-human regular nouns
mkN : Species -> N -> N ;
mkN : (sg,pl : Str) -> Gender -> Species -> N ;
mkN : NTable -> Gender -> Species -> N ; -- loan words, irregular
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N ; -- broken plural
mkN : N -> (attr : Str) -> N ; -- Compound noun with invariant attribute
mkN : (sg : Str) -> N ; -- Takes the singular without case marking, gives a non-human regular noun. Plural is sound feminine if the word ends in ة, otherwise sound masculine.
mkN : (sg,pl : Str) -> Gender -> Species -> N ; -- Takes the singular and the plural (sound or broken) forms without case marking, returns a noun with basic triptote declension. NB for irregular/weak roots, safer to use brkN, sdfN or sdmN, which take root and pattern.
mkN : (root,sgPat,plPat : Str) -> Gender -> Species -> N ; -- (This is brkN; see its description.)
mkN : Species -> N -> N ; -- Change species (hum/nohum) of a noun.
mkN : N -> (attr : Str) -> N ; -- Compound noun with invariant attribute.
mkN : N -> N -> N ; -- Compound noun with singular genitive attribute, but inflects in state.
mkN : Number -> N -> N -> N ; -- Compound noun with genitive attribute, but inflects in state. Attribute's number specified by 1st arg.
mkN : N -> A -> N ; -- Force adjective modifier into the noun. Adjective inflects in state, case and number.
mkN : Number -> N -> A -> N ; -- Force adjective modifier into the noun. Adjective inflects in state and case. Adjective's number specified by 1st arg.
mkN : N -> AP -> N ; -- Force AP modifier into the noun. AP inflects in state, case and number.
--- mkN : (root,sgPatt : Str) -> Gender -> Species -> N -- sound feminine plural
--- = sdfN ;
} ;
brkN : (root,sgPat,brokenPlPat : Str) -> Gender -> Species -> N ; -- Takes a root string, a singular pattern string, a broken plural pattern string, a gender, and species. Gives a noun. (This is also overloaded as mkN.)
sdfN : (root,sgPat : Str) -> Gender -> Species -> N ; -- Takes a root string, a singular pattern string, a gender, and species. Gives a noun whose plural is sound feminine.
sdmN : (root,sgPat : Str) -> Gender -> Species -> N ; -- Takes a root string, a singular pattern string, a gender, and species. Gives a noun whose plural is sound masculine
dualN : N -> N ; -- Force the plural of the N into dual (e.g. "twins")
--This is used for loan words or anything that has untreated irregularities
--in the interdigitization process of its words
mkFullN : NTable -> Gender -> Species -> N ;
--Takes a root string, a singular pattern string, a broken plural
--pattern string, a gender, and species. Gives a noun.
brkN : Str -> Str -> Str -> Gender -> Species -> N ;
--Takes a root string, a singular pattern string, a gender,
--and species. Gives a noun whose plural is sound feminine.
sdfN : Str -> Str -> Gender -> Species -> N ;
--takes a root string, a singular pattern string, a gender,
--and species. Gives a noun whose plural is sound masculine
sdmN : Str -> Str -> Gender -> Species -> N ;
--3 Proper names
mkPN = overload {
mkPN : Str -> PN -- Fem Hum if ends with ة, otherwise Masc Hum
mkPN : Str -> PN -- Predictable PN from a Str: fem hum if ends in ة, otherwise masc hum.
= smartPN ;
mkPN : N -> PN
= \n -> lin PN (n ** {s = \\c => n.s ! Sg ! Const ! c ++ n.s2 ! Sg ! Def ! c }) ; -- no idea /IL
mkPN : Str -> Gender -> Species -> PN
mkPN : N -> PN -- Make a PN out of N. The PN is in construct state.
= \n -> lin PN (n ** {
s = \\c => n.s ! Sg ! Const ! c
++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL
}) ;
mkPN : Str -> Gender -> Species -> PN -- Make a PN out of string, gender and species.
= mkFullPN ;
} ;
mkFullPN : Str -> Gender -> Species -> PN ;
--3 Relational nouns
mkN2 : overload {
mkN2 : N -> Preposition -> N2 ; -- ready-made preposition
mkN2 : N -> Str -> N2 ; -- preposition given as a string
mkN2 : N -> N2 ; -- no preposition
mkN2 : Str -> N2 ; -- no preposition, predictable inflection
mkN2 : N -> Prep -> N2 ; -- Noun and a ready-made preposition.
mkN2 : N -> Str -> N2 ; -- Noun, preposition given as a string, complement case genitive.
mkN2 : N -> N2 ; -- Noun, no preposition, complement case genitive.
mkN2 : Str -> N2 ; -- Predictable inflection, no preposition, complement case genitive.
} ;
mkN3 : overload {
@@ -136,47 +109,41 @@ resource ParadigmsAra = open
mkN3 : N -> Str -> Str -> N3 ; -- prepositions given as strings
} ;
--2 Adjectives
-- Overloaded operator for main cases
mkA = overload {
mkA : (root,sg : Str) -> A -- adjective with sound plural; takes root string and sg. pattern string
= \r,p -> lin A (sndA r p);
mkA : (root : Str) -> A -- adjective with positive form aFCal
= \r -> lin A (clrA r);
mkA : (root,sg,pl : Str) -> A -- adjective with broken plural
mkA : (root,sgPat : Str) -> A -- adjective with sound plural, takes root string and sg. pattern string
= \r,p -> lin A (sndA r p);
mkA : (root,sgPat,plPat : Str) -> A -- adjective with broken plural, same for both fem. and masc.
= \r,s,p -> lin A (brkA r s p) ;
mkA : A -> Str -> A = \a,s -> a ** { -- add non-inflecting component after adjective
s = table {af => a.s ! af ++ s}
} ;
mkA : Str -> A -> A = \s,a -> a ** { -- add non-inflecting component before adjective
s = table {af => s ++ a.s ! af}
}
mkA : (isSoundFem : Bool) -> (root,sg,pl : Str) -> A -- adjective with broken plural, boolean argument whether feminine is sound (True) or shared with masc (False)
= \b,r,s,p -> lin A (brkABool b r s p) ;
mkA : A -> Str -> A -- add non-inflecting component after adjective
= \a,s -> a ** {s = table {af => a.s ! af ++ s}} ;
mkA : Str -> A -> A -- add non-inflecting component before adjective
= \s,a -> a ** {s = table {af => s ++ a.s ! af}}
} ;
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
nisbaA : Str -> Adj ; -- Forms relative adjectives with the suffix ِيّ. Takes either the stem and adds يّ, or the whole word ending in يّ and just adds declension.
degrA : (posit,compar,plur : Str) -> A ;
idaafaA : N -> A -> A ; -- Forms adjectives of type غَيْرُ طَيِّبٍ 'not good'. Noun is in construct state but inflects in case. Adjective is in genitive, but inflects in gender, number and state.
irregFemA : (masc : A) -> (fem : A) -> A ; -- adjective with irregular feminine. Takes two adjectives (masc. "regular" and fem. "regular") and puts them together.
degrA : (masc,fem,plur : Str) -> A ; -- Adjective where masculine singular is also the comparative form. Indeclinable singular, basic triptote declension for dual and plural.
--Takes a root string and a pattern string
sndA : (root,patt : Str) -> Adj ;
irregFemA : (masc : A) -> (fem : A) -> A ; -- Adjective with irregular feminine. Takes two adjectives (masc. regular and fem. "regular", with fem. forms in the masc fields,) and puts them together.
--Takes a root string only
clrA : (root : Str) -> Adj ; -- forms adjectives of type aFCal
nisbaA : Str -> Adj ; -- forms relative adjectives by adding the suffix ِيّ
invarGenderA : A -> A ; -- Forms an adjective that has no feminine form. Takes a regular adjective and forces the masculine forms into the fem. table.
--3 Two-place adjectives
--
-- Two-place adjectives need a preposition for their second argument.
mkA2 : overload {
mkA2 : A -> Preposition -> A2 ;
mkA2 : A -> Prep -> A2 ;
mkA2 : A -> Str -> A2
} ;
@@ -205,14 +172,21 @@ resource ParadigmsAra = open
-- build $PP$s in the resource API. Requires a string and a case.
mkPrep : overload {
mkPrep : Str -> Prep ;
mkPrep : Str -> Case -> Prep
} ; -- preposition in the sense of RGL abstract syntax
mkPrep : Str -> Prep ; -- Build a preposition out of the given string, with genitive case.
mkPrep : Str -> Case -> Prep ; -- Build a preposition out of the given string and case.
mkPrep : Case -> Prep ; -- Just a case, no preposition.
} ;
liPrep : Prep ; -- The preposition لِ, binding to its head. Vowel assimilation and def. article elision implemented.
biPrep : Prep ; -- The preposition بِ, binding to its head.
noPrep : Prep ; -- No preposition at all, "complement case" is nominative.
--2 Conjunctions
mkConj : overload {
mkConj : Str -> Conj ; -- and
mkConj : Str -> Str -> Conj ; -- either … or
mkConj : Str -> Number -> Conj ; -- and, pl
mkConj : Str -> Str -> Number -> Conj ; -- either, or, sg
} ;
--2 Verbs
@@ -220,17 +194,23 @@ resource ParadigmsAra = open
-- Overloaded operations
mkV : overload {
mkV : (imperfect : Str) -> V ; -- The verb in Per3 Sg Masc imperfect tense gives the most information
mkV : (root : Str) -> (perf,impf : Vowel) -> V ; -- verb form I ; vowel = a|i|u
mkV : (root : Str) -> VerbForm -> V ; -- FormI .. FormX (no VII, IX) ; default vowels a u for I
mkV : (imperfect,masdar : Str) -> V ; -- Takes a verb of Form I in 3rd person masculine imperfect tense. Unpredictable masdar given as an argument.
mkV : (imperfect : Str) -> V ; -- Takes a verb of Form I in 3rd person masculine imperfect tense. Dummy masdar inserted.
mkV : (root : Str) -> (perf,impf : Vowel) -> (masdar : Str) -> V ; -- Takes the root of a verb of Form I. Vowel is one of {va,vi,vu}. Unpredictable masdar given as an argument.
mkV : (root : Str) -> (perf,impf : Vowel) -> V ; -- Like above, but dummy masdar inserted. This function is here only to keep compatibility for the old API; for new grammars, use the constructor with masdar as an argument.
mkV : (root,masdar : Str) -> VerbForm -> V ; -- FormI…FormXI (no IX). XI is quadriliteral. For FormI, default vowels are va and vu. The given masdar is used for FormI, but currently ignored for Forms II-XI.
mkV : (root : Str) -> VerbForm -> V ; -- Like above, but dummy masdar inserted for FormI verbs. No difference for FormII-FormXI, because they have predictable masdar.
mkV : V -> (particle : Str) -> V -- V with a non-inflecting particle/phrasal verb
} ;
-- regV : Str -> V ;
reflV : V -> V ; -- نَفْس in the proper case and with possessive suffix, e.g. نَفْسَكِ
v1 : Str -> Vowel -> Vowel -> V ; -- Verb Form I : fa`ala, fa`ila, fa`ula
v1 = overload {
v1 : (root : Str) -> (perf,impf : Vowel) -> (masdar : Str) -> V -- Verb Form I: fa`ala, fa`ila, fa`ula. Verbal noun (masdar) given as the third argument.
= v1masdar ;
v1 : (root : Str) -> (perf,impf : Vowel) -> V -- To keep compatibility for the old API; dummy masdar inserted.
= v1dummymasdar ;
} ;
v2 : Str -> V ; -- Verb Form II: fa``ala
@@ -244,9 +224,11 @@ resource ParadigmsAra = open
v7 : Str -> V ; -- Verb Form VII: infa`ala
v8 : Str -> V ; -- Verb Form VIII ifta`ala
v8 : Str -> V ; -- Verb Form VIII: ifta`ala
v10 : Str -> V ; -- Verb Form X 'istaf`ala
v10 : Str -> V ; -- Verb Form X: 'istaf`ala
v11 : Str -> V ; -- Verb Form XI (quadriliteral): fa`laba
--3 Two-place verbs
@@ -256,7 +238,7 @@ resource ParadigmsAra = open
mkV2 : overload {
mkV2 : V -> V2 ; -- No preposition
mkV2 : V -> Str -> V2 ; -- Preposition as string, default case genitive
mkV2 : V -> Preposition -> V2 ; -- Ready-made preposition
mkV2 : V -> Prep -> V2 ; -- Ready-made preposition
mkV2 : Str -> V2 ; -- Predictable verb conjugation, no preposition
} ;
@@ -268,11 +250,11 @@ resource ParadigmsAra = open
-- the first one or both can be absent.
mkV3 : overload {
mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about
mkV3 : V -> (to : Str) -> (about:Str) -> V3 -- like above, but with strings as arguments (default complement case genitive)
} ;
dirV3 : overload {
dirV3 : V -> Preposition -> V3 ; -- give,_,to
dirV3 : V -> Prep -> V3 ; -- give,_,to
dirV3 : V -> (to : Str) -> V3 -- like above, but with string as argument (default complement case genitive)
} ;
dirdirV3 : V -> V3 ; -- give,_,_
@@ -284,25 +266,34 @@ resource ParadigmsAra = open
mkV0 : V -> V0 ;
mkVS : overload {
mkVS : V -> VS ;
mkVS : V -> Str -> VS
mkVS : V -> VS ; -- Takes a V, returns a VS with default complementiser أَنَّ.
mkVS : V -> Str -> VS -- Takes a V and a complementiser.
} ;
mkV2S : overload {
mkV2S : V -> V2S ; -- Takes a V, returns a V2S with default complementiser أَنَّ and accusative as the direct object case.
mkV2S : VS -> V2S ; -- Takes a VS, returns a V2S with accusative as the object case, retaining the VS's complementiser.
mkV2S : V2 -> V2S ; -- Takes a V2, returns a V2S with default complementiser أَنَّ, retaining the V2's direct object case.
mkV2S : V -> Prep -> Str -> V2S ; -- Takes V, preposition and complementiser.
} ;
mkV2S : V -> Str -> V2S ;
mkVV = overload {
mkVV : V -> VV = regVV ;
mkVV : V -> Str -> VV = c2VV ;
mkVV : V -> Preposition -> VV = prepVV ;
mkVV : V -> Preposition -> Preposition -> VV = prep2VV
mkVV : V -> VV -- Takes a V, returns a VV with default complementiser أَنَّ.
= regVV ;
mkVV : V -> Str -> VV -- Takes a V and a complementiser.
= s2VV ;
} ;
mkV2V : overload {
mkV2V : V -> Str -> Str -> V2V ;
mkV2V : V -> Preposition -> Preposition -> V2V ;
mkV2V : VV -> Preposition -> V2V
mkV2V : V -> V2V ; -- Takes a V, returns a V2V with default complementiser أَنْ and accusative as the direct object case.
mkV2V : VV -> V2V ; -- Takes VV, returns V2V with accusative as the object case, retaining the VV's complementiser.
mkV2V : V -> Prep -> Str -> V2V ; -- Takes V, preposition and complementiser.
} ;
subjCase : overload {
subjCase : VV -> Prep -> VV ; -- Change the subject case of a VV. (Default is nominative; use any other case or preposition.)
subjCase : V2V -> Prep -> V2V ; -- Change the subject case to a V2V. (Default is nominative; use any other case or preposition.)
} ;
mkVA : V -> VA ;
mkV2A : V -> Str -> V2A ;
mkV2A : V -> Str -> V2A ; -- Takes a V and an object case/preposition. NB. V2A = V2, see mkV2 for more constructors.
mkVQ : V -> VQ ;
mkV2Q : V -> Str -> V2Q ;
mkV2Q : V -> Str -> V2Q ; -- Takes a V and an object case/preposition. NB. V2Q = V2, see mkV2 for more constructors.
mkAS : A -> AS ;
mkA2S : A -> Str -> A2S ;
@@ -328,12 +319,6 @@ resource ParadigmsAra = open
acc = ResAra.Acc ;
gen = ResAra.Gen ;
-- Prepositions are used in many-argument functions for rection.
Preposition = ResAra.Preposition ;
noPrep = {s=[]; c=nom; binds=False} ;
casePrep c = {s=[]; c=c; binds=False} ;
Gender = ResAra.Gender ;
masc = ResAra.Masc ;
fem = ResAra.Fem ;
@@ -355,14 +340,21 @@ resource ParadigmsAra = open
mkPrep : Str -> Prep = \s ->
lin Prep (mkPreposition s) ;
mkPrep : Str -> Case -> Prep = \s,c ->
lin Prep (mkPreposition s c)
lin Prep (mkPreposition s c) ;
mkPrep : Case -> Prep = \c ->
lin Prep (casePrep c) ;
} ;
noPrep = lin Prep ResAra.noPrep ;
biPrep = lin Prep ResAra.biPrep ;
liPrep = lin Prep ResAra.liPrep ;
casePrep : Case -> Prep = \c -> lin Prep {s=[]; c=c; binds=False} ;
mkV2 = overload {
mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Str -> V2 = \v,p -> prepV2 v (mkPreposition p);
mkV2 : V -> Preposition -> V2 = prepV2 ;
mkV2 : V -> Prep -> V2 = prepV2 ;
mkV2 : Str -> V2 = strV2;
} ;
@@ -376,7 +368,7 @@ resource ParadigmsAra = open
= \p,n -> n ** {h = p} ;
mkN : (sg,pl : Str) -> Gender -> Species -> N
= \sg,pl -> mkFullN (reg sg pl) ;
mkN : NTable -> Gender -> Species -> N -- loan words, irregular
mkN : NTable -> Gender -> Species -> N -- TO BE DEPRECATED; kept for backwards-compatibility. For the same behaviour, use either the constructor above, sdfN or sdmN.
= mkFullN ;
mkN : (root,sgPatt,brokenPlPatt : Str) -> Gender -> Species -> N -- broken plural
= brkN ;
@@ -419,17 +411,22 @@ resource ParadigmsAra = open
mkPron : (_,_,_ : Str) -> PerGenNum -> Pron ;
mkV = overload {
mkV : (imperfect,masdar : Str) -> V
= \v,m -> regV v m ;
mkV : (imperfect : Str) -> V
= regV ;
mkV : (root : Str) -> (perf,impf : Vowel) -> V -- verb form I ; vowel = a|i|u
= v1 ;
= \v -> regV v ;
mkV : (root : Str) -> (perf,impf : Vowel) -> (masdar : Str) -> V -- verb form I ; vowel = a|i|u
= v1masdar ;
mkV : (root : Str) -> (perf,impf : Vowel) -> V -- verb form I ; vowel = a|i|u ; dummy masdar
= v1dummymasdar ;
mkV : (root : Str) -> VerbForm -> V -- FormI .. FormX (no VII, IX) ; default vowels a u for I
= formV ;
mkV : V -> (particle : Str) -> V = \v,p ->
v ** { s = \\vf => v.s ! vf ++ p } ;
} ;
regV : Str -> V = \wo ->
regV = overload {
regV : (v,msdr : Str) -> V = \wo,msdr ->
let rau : Str * Vowel * Vowel =
case wo of {
"يَ" + fc + "ُ" + l => <fc+l, a, u> ;
@@ -438,50 +435,67 @@ resource ParadigmsAra = open
f@? + "َ" + c@? + "ِ" + l => <f+c+l, i, a> ;
_ => Predef.error ("regV not applicable to" ++ wo)
}
in v1 rau.p1 rau.p2 rau.p3 ;
in v1masdar rau.p1 rau.p2 rau.p3 msdr ;
regV : Str -> V = \wo ->
let rau : Str * Vowel * Vowel =
case wo of {
"يَ" + fc + "ُ" + l => <fc+l, a, u> ;
"يَ" + fc + "ِ" + l => <fc+l, a, i> ;
"يَ" + fc + "َ" + l => <fc+l, a, a> ;
f@? + "َ" + c@? + "ِ" + l => <f+c+l, i, a> ;
_ => Predef.error ("regV not applicable to" ++ wo)
} in v1dummymasdar rau.p1 rau.p2 rau.p3
} ;
v1 = \rootStr,vPerf,vImpf ->
let { raw = v1' rootStr vPerf vImpf } in
lin V { s = \\vf =>rectifyHmz (raw.s ! vf) } ;
v1masdar : Str -> (perf,impf : Vowel) -> (masdar : Str) -> V =
\rootStr,vPerf,vImpf,msdr ->
let { raw = v1' rootStr vPerf vImpf msdr }
in lin V { s = \\vf =>rectifyHmz (raw.s ! vf) } ;
v1' : Str -> Vowel -> Vowel -> Verb =
\rootStr,vPerf,vImpf ->
v1dummymasdar : Str -> (p,i : Vowel) -> V = \rootStr,vPerf,vImpf ->
let { dummyMasdar = mkStrong facl (mkRoot3 rootStr) ;
raw = v1' rootStr vPerf vImpf dummyMasdar }
in lin V { s = \\vf =>rectifyHmz (raw.s ! vf) } ;
v1' : Str -> (p,i : Vowel) -> (masdar : Str) -> Verb =
\rootStr,vPerf,vImpf,masdar ->
let root = mkRoot3 rootStr
in case rootStr of {
f@? + c@? + "ّ" => v1geminate (f+c+c) vPerf vImpf ;
? + #hamza + #weak => v1doubleweak root ;
f@? + c@? + "ّ" => v1geminate (f+c+c) vPerf vImpf masdar ;
? + #hamza + #weak => v1doubleweak root masdar ;
#weak + ? + #weak => v1assimilated_defective root vPerf vImpf masdar ;
? + ? + #weak => case vPerf of {
i => v1defective_i root vImpf ;
_ => v1defective_a root vImpf } ;
? + #weak + ? => v1hollow root vImpf ;
_ => v1sound root vPerf vImpf } ;
i => v1defective_i root vImpf masdar ;
_ => v1defective_a root vImpf masdar } ;
? + #weak + ? => v1hollow root vImpf masdar ;
_ => v1sound root vPerf vImpf masdar } ;
v2 =
\rootStr ->
let {
root = mkRoot3 rootStr
} in {
} in lin V {
s =
case root.l of {
#weak => (v2defective root).s;
case rootStr of {
-- #weak + ? + ? =>
? + ? + #weak => (v2defective root).s;
_ => (v2sound root).s
};
lock_V = <>
}
};
v3 =
\rootStr ->
let {
tbc = mkRoot3 rootStr ;
} in {
s = (v3sound tbc).s ;
lock_V = <>
} in lin V {
s = (v3sound tbc).s
};
v4 =
\rootStr ->
let root : Root3 = mkRoot3 rootStr ;
verb : Verb = case rootStr of {
#weak + ? + ? => v4assimilated root ;
? + #hamza + #weak => v4doubleweak root ;
? + #weak + ? => v4hollow root ;
_ + #weak => v4defective root ;
@@ -491,30 +505,28 @@ resource ParadigmsAra = open
v5 =
\rootStr ->
let { raw = v5' rootStr } in
let { raw = v5' rootStr } in raw **
{ s = \\vf =>
case rootStr of {
_ + #hamza + _ => rectifyHmz(raw.s ! vf);
_ => raw.s ! vf
};
lock_V = <>
}
};
v5' : Str -> V =
\rootStr ->
let {
nfs = mkRoot3 rootStr ;
} in {
s = (v5sound nfs).s ; lock_V = <>
} in lin V {
s = (v5sound nfs).s
};
v6 =
\rootStr ->
let {
fqm = mkRoot3 rootStr ;
} in {
s = (v6sound fqm).s ;
lock_V = <>
} in lin V {
s = (v6sound fqm).s
};
v7 =
@@ -548,8 +560,20 @@ resource ParadigmsAra = open
_ => v10sound fcl }
} in lin V verb ;
v11 =
\rootStr ->
let fcl : Root3 = case rootStr of {
f@? + c@? + l@? + b@? => {f=f ; c=c+"ْ"+l ; l=b} ;
_ => Predef.error "v11: implement quadriliterals properly"
} ;
verb : Verb = case rootStr of {
_ => v11sound fcl -- TODO more cases?
} ;
in lin V verb ;
reflV v = lin V (ResAra.reflV v) ;
mkFullN : NTable -> Gender -> Species -> N ; -- This is used for loan words or anything that has untreated irregularities in the interdigitization process of its words
mkFullN nsc gen spec = lin N
{ s = nsc; --NTable
s2 = emptyNTable;
@@ -566,6 +590,9 @@ resource ParadigmsAra = open
kutub = mkWord pl root
} in mkFullN (reg kitAb kutub) gen spec;
--Takes a root string, a singular pattern string, a broken plural
--pattern string, a gender, and species. Gives a noun.
brkN root sg pl gen spec =
let { raw = brkN' root sg pl gen spec} in raw **
{ s = \\n,d,c =>
@@ -592,6 +619,7 @@ resource ParadigmsAra = open
let { mucallim = mkWord sg root;
} in mkFullN (sndm mucallim) gen spec;
mkFullPN : Str -> Gender -> Species -> PN ;
mkFullPN = \str,gen,species ->
{ s = \\c => str + indecl!c ;
g = gen;
@@ -600,16 +628,16 @@ resource ParadigmsAra = open
};
mkN2 = overload {
mkN2 : N -> Preposition -> N2 = prepN2 ;
mkN2 : N -> Prep -> N2 = prepN2 ;
mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPreposition s);
mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = noPrep}) ;
mkN2 : Str -> N2 = \str -> lin N2 (smartN str ** {c2 = noPrep})
mkN2 : N -> N2 = \n -> prepN2 n genPrep;
mkN2 : Str -> N2 = \str -> prepN2 (smartN str) genPrep;
} ;
prepN2 : N -> Preposition -> N2 = \n,p -> lin N2 (n ** {c2 = p}) ;
mkN3 = overload {
mkN3 : N -> Preposition -> Preposition -> N3 = \n,p,q ->
mkN3 : N -> Prep -> Prep -> N3 = \n,p,q ->
lin N3 (n ** {c2 = p ; c3 = q}) ;
mkN3 : N -> Str -> Str -> N3 = \n,p,q ->
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
@@ -629,48 +657,35 @@ resource ParadigmsAra = open
mkQuant7 : (_,_,_,_,_,_,_ : Str) -> State -> Quant =
\hava,havihi,havAn,havayn,hAtAn,hAtayn,hA'ulA,det -> lin Quant (baseQuant **
{ s = \\n,s,g,c =>
case <s,g,c,n> of {
<_,Masc,_,Sg> => hava;
<_,Fem,_,Sg> => havihi;
<_,Masc,Nom,Dl>=> havAn;
<_,Masc,_,Dl> => havayn;
<_,Fem,Nom,Dl> => hAtAn;
<_,Fem,_,Dl> => hAtayn;
<Hum,_,_,Pl> => hA'ulA;
_ => havihi
};
d = det
});
\hava,havihi,havAn,havayn,hAtAn,hAtayn,hA'ulA,det ->
lin Quant (ResAra.mkQuant7 hava havihi havAn havayn hAtAn hAtayn hA'ulA det) ;
mkQuant3 : (_,_,_ : Str) -> State -> Quant =
\dalika,tilka,ula'ika,det -> lin Quant (baseQuant **
{ s = \\n,s,g,c =>
case <s,g,c,n> of {
<_,Masc,_,Sg> => dalika;
<_,Fem,_,Sg> => tilka;
<Hum,_,_,_> => ula'ika;
_ => tilka
};
d = det
});
\dalika,tilka,ula'ika,det ->
lin Quant (ResAra.mkQuant3 dalika tilka ula'ika det) ;
brkA : (root,sg,pl : Str) -> Adj = \root,sg,pl ->
brkA : (root,sg,pl : Str) -> Adj -- also broken feminine
= brkABool False ;
brkABool : Bool -> (root,sg,pl : Str) -> Adj = \isSndFem,root,sg,pl ->
let jadId = mkWord sg root ;
jadIda = jadId + "َة" ;
judud = mkWord pl root ;
jadIdAt = case isSndFem of {
True => jadId + "َات" ;
False => judud
} ;
akbar = mkWord "أَفعَل" root ;
mascTbl = reg jadId judud ;
femTbl = reg jadIda judud ;
femTbl = reg jadIda jadIdAt ;
in { s = table {
APosit Masc n d c => rectifyHmz (mascTbl ! n ! d ! c) ;
APosit Fem n d c => rectifyHmz (femTbl ! n ! d ! c) ;
AComp d c => rectifyHmz (indeclN akbar ! d ! c) }
} ;
degrA : (posit,compar,plur : Str) -> A
= \posit,compar,plur -> lin A {s = clr posit compar plur} ;
degrA : (masc,fem,plur : Str) -> A
= \masc,fem,plur -> lin A {s = clr masc fem plur} ;
idaafaA : N -> A -> A = \ghayr,tayyib -> tayyib ** {
s = table {
@@ -678,8 +693,8 @@ resource ParadigmsAra = open
AComp d c => ghayr.s ! Sg ! Const ! c ++ tayyib.s ! AComp d c }
} ;
sndA root pat =
let raw = sndA' root pat in {
sndA : Str -> Str -> A = \root,pat ->
let raw = sndA' root pat in lin A {
s = \\af =>
case root of {
_ + #hamza + _ => rectifyHmz(raw.s ! af);
@@ -705,24 +720,31 @@ resource ParadigmsAra = open
x => m.s ! x }
} ;
nisbaA : Str -> Adj = \Haal ->
let Haaliyy = Haal + "ِيّ" in {
invarGenderA = \m ->
irregFemA m m ;
nisbaA Haal =
let Haaliyy : Str = case Haal of {
x + "يّ" => Haal ; -- if the ending is already given, don't add it
x + ("ا"|"ة") => x + "ِيّ" ; -- drop final alif or ta marbuta
_ => Haal + "ِيّ"
} in lin A {
s = table {
APosit g n d c => positAdj Haaliyy ! g ! n ! d ! c ;
AComp d c => "أَكْثَر" ++ indeclN Haaliyy ! d ! c
}
} ;
clrA root =
clrA : Str -> A = \root ->
let { eaHmar = mkWord "أَفعَل" root;
HamrA' = mkWord "فَعلاء" root;
Humr = mkWord "فُعل" root
} in {
} in lin A {
s = clr eaHmar HamrA' Humr;
};
mkA2 = overload {
mkA2 : A -> Preposition -> A2 = prepA2 ;
mkA2 : A -> Prep -> A2 = prepA2 ;
mkA2 : A -> Str -> A2 = \a,p -> prepA2 a (mkPreposition p)
} ;
@@ -738,10 +760,10 @@ resource ParadigmsAra = open
mkSubj : Str -> Order -> Subj = \s,o -> lin Subj {s = s ; o = o} ;
} ;
dirV2 v = prepV2 v (casePrep acc) ;
dirV2 v = prepV2 v accPrep ;
mkV3 = overload {
mkV3 : V -> Preposition -> Preposition -> V3 = \v,p,q ->
mkV3 : V -> Prep -> Prep -> V3 = \v,p,q ->
lin V3 (prepV3 v p q) ;
mkV3 : V -> Str -> Str -> V3 = \v,p,q ->
lin V3 (v ** {s = v.s ; c2 = mkPreposition p ; c3 = mkPreposition q})
@@ -751,37 +773,61 @@ resource ParadigmsAra = open
v ** {s = v.s ; c2 = p ; c3 = q} ;
dirV3 = overload {
dirV3 : V -> Preposition -> V3 = \v,p -> mkV3 v (casePrep acc) p ;
dirV3 : V -> Prep -> V3 = \v,p -> mkV3 v (casePrep acc) p ;
dirV3 : V -> Str -> V3 = \v,s -> mkV3 v (casePrep acc) (mkPreposition s)
} ;
dirdirV3 v = dirV3 v (casePrep acc) ;
mkVS = overload {
mkVS : V -> VS = \v -> lin VS (v ** {o = Subord; s2 = []}) ;
mkVS : V -> VS = \v -> lin VS (v ** {o = Subord; s2 = anna}) ;
mkVS : V -> Str -> VS = \v,s -> lin VS (v ** {o = Subord; s2 = s})
} ;
mkVQ v = lin VQ v ;
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ" ; sc = noPrep} ;
c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = mkPreposition prep ; sc = noPrep} ;
prepVV : V -> Preposition -> VV = \v,prep -> regVV v ** {c2=prep; sc=noPrep} ;
prep2VV : V -> (_,_ : Preposition) -> VV = \v,p1,p2 -> regVV v ** {c2=p1; sc=p2} ;
-- Complementisers for V*V and V*S
an : Str = "أَنْ" ;
anna : Str = "أَنَّ" ;
regVV : V -> VV = \v -> lin VV v ** {s2=an ; sc=noPrep} ;
s2VV : V -> Str -> VV = \v,compl -> regVV v ** {s2=compl; sc=noPrep} ;
prepVV : V -> Prep -> VV = \v,prep -> regVV v ** {s2=an ; sc=prep} ;
prep2VV : V -> Prep -> Str -> VV = \v,p,c -> regVV v ** {s2=c; sc=p} ;
V0 : Type = V ;
---- V2S, V2V, V2Q, V2A : Type = V2 ;
AS, A2S, AV : Type = A ;
A2V : Type = A2 ;
mkV0 v = v ;
mkV2S v p = lin V2S (prepV2 v (mkPreposition p)) ;
mkV2V = overload {
mkV2V : V -> Str -> Str -> V2V = \v,p,q ->
lin V2V (prepV3 v (mkPreposition p) (mkPreposition q) ** {sc = noPrep}) ;
mkV2V : V -> Preposition -> Preposition -> V2V = \v,p,q ->
lin V2V (prepV3 v p q ** {sc = noPrep}) ;
mkV2V : VV -> Preposition -> V2V = \vv,p ->
lin V2V (vv ** {c2 = p ; c3 = vv.c2}) ;
mkV2S = overload {
mkV2S : V -> V2S
= \v -> lin V2S (prepV2 v accPrep ** {s2=anna ; o=Subord}) ;
mkV2S : V2 -> V2S
= \v2 -> lin V2S (v2 ** {s2=anna ; o=Subord}) ;
mkV2S : V -> Preposition -> V2S
= \v,p -> lin V2S ((prepV2 v p) ** {s2=anna ; o=Subord})
} ;
mkV2V = overload {
mkV2V : V -> V2V = \v ->
lin V2V (v ** {c2=accPrep ; s2=an ; sc=noPrep}) ;
mkV2V : VV -> V2V = \vv ->
lin V2V (vv ** {c2 = accPrep}) ;
mkV2V : VV -> Prep -> V2V = \vv,p ->
lin V2V (vv ** {c2 = p}) ;
mkV2V : V -> Prep -> Str -> V2V = \v,p,q ->
lin V2V (v ** {c2 = p ; s2 = q ; sc = noPrep}) ;
mkV2V : V2 -> V2V = \v2 ->
lin V2V (v2 ** {s2 = an ; sc = noPrep}) ;
mkV2V : V2 -> Str -> V2V = \v2,c ->
lin V2V (v2 ** {c2 = v2.c2 ; s2 = c ; sc = noPrep}) ;
} ;
subjCase = overload {
subjCase : VV -> Prep -> VV = \vv,p -> vv ** {sc=p} ;
subjCase : V2V -> Prep -> V2V = \vv,p -> vv ** {sc=p}
} ;
mkVA v = v ** {lock_VA = <>} ;
mkV2A v p = lin V2A (prepV2 v (mkPreposition p));
mkV2Q v p = lin V2Q (prepV2 v (mkPreposition p));
@@ -813,10 +859,11 @@ formV : (root : Str) -> VerbForm -> V = \s,f -> case f of {
FormVI => v6 s ;
FormVII => v7 s ;
FormVIII => v8 s ;
FormX => v10 s
FormX => v10 s ;
FormXI => v11 s
} ;
param VerbForm =
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVII | FormVIII | FormX ;
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVII | FormVIII | FormX | FormXI ;
} ;

View File

@@ -47,6 +47,8 @@ flags coding=utf8 ;
eafcilp = { h = "أَ"; m1 = "ْ" ; m2 = "ِ" ; t = "َة" } ;
eafcal = { h = "أَ"; m1 = "ْ" ; m2 = "َ" ; t = "" } ;
eafcAl = { h = "أَ"; m1 = "ْ" ; m2 = "َا" ; t = "" } ;
eifcAl = { h = "إِ"; m1 = "ْ" ; m2 = "َا" ; t = "" } ;
eIfcAl = eifcAl ** {h = "إِي"} ;
eafcil = { h = "أَ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
eafcul = { h = "أَ"; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
eiftacal = { h = "إِ"; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
@@ -82,11 +84,14 @@ flags coding=utf8 ;
fcil = { h = "" ; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
fcul = { h = "" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ;
ficl = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "" } ;
fcIl = fcil ** {m2 = "ِي"} ;
fcAl = fcal ** {m2 = "َا"} ;
ficAl = { h = "" ; m1 = "ِ" ; m2 = "َا" ; t = "" } ;
ficlp = { h = "" ; m1 = "ِ" ; m2 = "ْ" ; t = "َة" } ;
ftacc = facc ** {m1 = "ْتَ"} ;
ftucc = facc ** {m1 = "ْتُ"} ;
ftacal = { h = "" ; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ;
fticAl = ficAl ** { m1 = "ْتِ" } ; -- IL hollow VIII
ftical = ftacal ** { m1 = "ْتِ" } ; -- IL hollow VIII
ftAcal = ftacal ** { m1 = "ْتَا" } ; -- IL hollow VIII
ftIcal = ftacal ** { m1 = "ْتِي" } ; -- IL hollow VIII
@@ -95,6 +100,7 @@ flags coding=utf8 ;
euttucil = { h = "اُتُّ" ; m1 = "ِ" ; m2 = "" ; t = "" } ; ---- IL assimilated VIII
ttacal = ftacal ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
ttacil = ftacil ** { m1 = "" ; h = "تَّ" } ; ---- IL assimilated VIII
tticAl = ficAl ** { h = "تِّ" } ; ---- IL assimilated VIII
fuccAl = { h = "" ; m1 = "ُ" ; m2 = "َّا" ; t = "" } ;
fuccil = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
fuccilo = { h = "" ; m1 = "ُ" ; m2 = "ِّ" ; t = "ْ" } ;
@@ -112,7 +118,9 @@ flags coding=utf8 ;
mafcUl = { h = "مَ"; m1 = "ْ" ; m2 = "ُو" ; t = "" } ;
mafcil = { h = "مَ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ;
tafAcal = { h = "تَ"; m1 = "َا" ; m2 = "َ" ; t = "" } ;
tafAcul = { h = "تَ"; m1 = "َا" ; m2 = "ُ" ; t = "" } ;
tafaccal = { h = "تَ"; m1 = "َ" ; m2 = "َّ" ; t = "" } ;
tafaccul = { h = "تَ"; m1 = "َ" ; m2 = "ُّ" ; t = "" } ;
tufuccil = { h = "تُ"; m1 = "ُ" ; m2 = "ِّ" ; t = "" } ;
tufUcil = { h = "تُ"; m1 = "ُو" ; m2 = "ِ" ; t = "" } ;
ufAcal = { h = "ُ" ; m1 = "َا" ; m2 = "َ" ; t = "" } ;

View File

@@ -18,7 +18,7 @@ concrete PhraseAra of Phrase = CatAra ** open
UttCN cn = {s = ResAra.uttCN cn } ; --IL
UttNP np = {s = \\_ => np.s ! Nom} ;
UttVP vp = {s = uttVP vp} ; --IL
UttVP vp = {s = uttVP VPPerf vp} ; --IL
UttS s = {s = \\_ => s.s ! Verbal} ;
UttAdv,
UttIAdv = \s -> {s = \\_ => s.s} ; ---- OK? AR

View File

@@ -3,25 +3,23 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
flags optimize=all_subs ; coding = utf8 ;
lin
-- : Cl -> QCl ; -- does John walk
QuestCl cl = {
s = \\t,p =>
table {
QIndir => "إِذا" ++ cl.s ! t ! p ! toOrder QIndir ;
QDir => "هَلْ" ++ cl.s ! t ! p ! toOrder QDir
QDir => "هَلْ" ++ cl.s ! t ! p ! Verbal -- yes/no question
}
};
-- ComplSlashIP vps ip = {} ;
--IL guessed
-- : IP -> VP -> QCl ; -- who walks
QuestVP qp vp =
let np = ip2np qp vp.isPred ;
let np = ip2np qp (case vp.vtype of {Copula=>True ; _=>False}) ;
cl = PredVP np vp ;
in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ;
---- AR guessed
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! toOrder qf} ;
-- QuestIAdv : IAdv -> Cl -> QCl ; -- why does John walk
QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! Verbal} ; -- Verbal word order, because there is no pre-existing question word /IL
---- IL guessed
-- : IComp -> NP -> QCl
@@ -38,29 +36,34 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
! Def ! Nom ; -- IP will be a subject
} ;
-- : IAdv -> IComp ; -- where (is it)
CompIAdv iadv = { s = \\_ => iadv.s ; a = ResAra.Sg } ;
-- QCl = {s : Tense => Polarity => QForm => Str} ;
QuestSlash ip cls = { ----IL just guessing
s = \\t,p,qf =>
let cl : ResAra.Cl = complClSlash cls ; -- dummy conversion to Cl
-- : IP -> ClSlash -> QCl ; -- whom does John love
QuestSlash ip cls = {
s = \\t,p,qf => -- remove cls's c2 so it won't show up in the wrong place
let cl : ResAra.Cl = complClSlash (cls ** {c2=noPrep});
o = toOrder qf
in cls.c2.s ++ bindIf cls.c2.binds
in cls.c2.s ++ bindIf cls.c2.binds -- Put cls's c2 ("with") before the IP ("whom")
++ ip.s ! False ! Masc ! Def ! Nom
++ cl.s ! t ! p ! o
} ;
--IL guessed
PrepIP p ip = {
s = p.s ++ ip.s ! False -- not used as a subject of predicative sentence
-- : Prep -> IP -> IAdv ; -- with whom
PrepIP prep ip = {
s = prep.s ++ bindIf prep.binds
++ ip.s ! False -- not used as a subject of predicative sentence
! Masc ----
! Def ! Gen
! Def -- not sure /IL
! prep.c
} ;
-- : IP -> Adv -> IP ; -- who in Paris
AdvIP ip adv = ip ** {
s = \\isPred,g,s,c => ip.s ! isPred ! g ! s ! c ++ adv.s ;
} ;
-- : IAdv -> Adv -> IAdv ; -- where in Paris
AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ;
-- : IDet -> IP
@@ -85,4 +88,13 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
n = sizeToNumber num.n ;
d = Indef ---- TODO check
} ;
-- IL guessed all following
lincat
QVP = ResAra.VP ; -- buy what where
lin
ComplSlashIP vps ip = ComplSlash vps (ip2np ip False) ; -- : VPSlash -> IP -> QVP ; -- buys what
AdvQVP = AdvVP ; -- : VP -> IAdv -> QVP ; -- lives where
AddAdvQVP = AdvVP ; -- : QVP -> IAdv -> QVP ; -- buys what where
QuestQVP = QuestVP ; -- : IP -> QVP -> QCl ; -- who buys what where
}

View File

@@ -1,5 +1,5 @@
concrete RelativeAra of Relative = CatAra **
open ResAra in {
open Prelude,ResAra in {
flags coding=utf8;
lin
@@ -13,7 +13,7 @@ concrete RelativeAra of Relative = CatAra **
s = \\t,p,agr,c =>
let
npS : Case => Str = \\_ => rp.s ! agr2ragr agr c ;
np : ResAra.NP = agrNP agr ** {s = npS} ;
np : ResAra.NP = agrNP {pgn=agr;isPron=False} ** {s = npS} ;
cl = predVP np vp ;
in
cl.s ! t ! p ! Nominal
@@ -23,7 +23,7 @@ concrete RelativeAra of Relative = CatAra **
RelSlash rp cls = cls ** {
s = \\t,p,agr,c =>
let --empty : Agr -> NP = emptyNP ;
obj : ResAra.NP = pgn2pron agr.pgn ; -- head is repeated as a clitic object pronoun
obj : ResAra.NP = pgn2pron agr ; -- head is repeated as a clitic object pronoun
cl : ResAra.Cl = complClSlash obj cls ;
in rp.s ! agr2ragr agr c ++ cl.s ! t ! p ! VOS
} ;

File diff suppressed because it is too large Load Diff

View File

@@ -44,7 +44,7 @@ concrete SentenceAra of Sentence = CatAra ** open
EmbedS s = {s = "أَنْ" ++ s.s ! Verbal} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = uttVP vp ! Masc} ;
EmbedVP vp = {s = uttVP VPPerf vp ! Masc} ; -- TODO: use VPGer once it's more stable
UseCl t p cl =
{s = \\o => t.s ++ p.s ++
@@ -66,7 +66,9 @@ concrete SentenceAra of Sentence = CatAra ** open
UseRCl t p cl = {s = \\agr,c => t.s ++ p.s ++ cl.s ! t.t ! p.p ! agr ! c} ;
UseSlash t p cl = UseCl t p (complClSlash cl) ;
-- If the cls has a c2, the preposition will just hang there without an object.
-- If this bothers you, call complClSlash to cls ** {c2=noPrep}. /IL
UseSlash t p cls = UseCl t p (complClSlash cls) ;
AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
}

View File

@@ -1,5 +1,5 @@
concrete StructuralAra of Structural = CatAra **
open MorphoAra, ResAra, ParadigmsAra, Prelude in {
open MorphoAra, ResAra, ParadigmsAra, (N=NounAra), Prelude in {
flags optimize=all ; coding=utf8 ;
@@ -38,8 +38,8 @@ concrete StructuralAra of Structural = CatAra **
from_Prep = mkPrep "مِنَ" ;
he_Pron = ResAra.he_Pron ;
here_Adv = ss "هُنا" ;
-- here7to_Adv = ss ["تْ هري"] ;
-- here7from_Adv = ss ["فرْم هري"] ;
here7to_Adv = ss "إلَىَ هُنَا" ;
here7from_Adv = ss "مِنْ هُنَا" ;
how_IAdv = ss "كَيفَ" ;
how8many_IDet = {
s = \\g,s,c => "كَمْ عَدَد" + caseTbl ! c ;
@@ -47,10 +47,11 @@ concrete StructuralAra of Structural = CatAra **
} ; -- IL
how8much_IAdv = ss "كَمْ" ;
if_Subj = mkSubj "إِذَا" Verbal ;
--whether_Subj = mkSubj "مَا إِذَا" Verbal ;
in8front_Prep = mkPrep "مُقَابِلَ" ;
i_Pron = ResAra.i_Pron ;
in_Prep = mkPrep "فِي" ;
it_Pron = emptyNP ** {s = \\_ => "هَذَا"} ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
it_Pron = N.DetNP (N.DetQuant this_Quant N.NumSg) ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
-- less_CAdv = ss "لسّ" ;
many_Det = mkDet "جَمِيع" Pl Const ;
-- more_CAdv = ss "مْري" ;
@@ -61,6 +62,7 @@ concrete StructuralAra of Structural = CatAra **
-- ["هَد تْ"] ; ["هَثِنغ تْ"] ; "مُستنءت" ; ["هَدنءت تْ"]] ; ----
-- isAux = True
-- } ;
nothing_NP = regNP "لَا شَيْء" Sg Def ;
no_Utt = {s = \\_ => "لا"} ;
on_Prep = mkPrep "عَلَى" ;
only_Predet = mkPredet "فَقَط" False;
@@ -71,10 +73,10 @@ concrete StructuralAra of Structural = CatAra **
possess_Prep = liPrep ;
-- quite_Adv = ss "قُِتي" ;
she_Pron = ResAra.she_Pron ;
-- so_AdA = ss "سْ" ;
so_AdA = very_AdA ;
somebody_NP = regNP "أَحَد" Sg Indef ;
someSg_Det = mkDet "أَحَد" Sg Const ;
somePl_Det = mkDet "بَعض" Pl Const ;
someSg_Det = ResAra.someSg_Det ;
somePl_Det = ResAra.somePl_Det ;
something_NP = regNP "شَيْء" Sg Indef ;
-- somewhere_Adv = ss "سْموهري" ;
that_Quant = mkQuant3 "ذَلِكَ" "تِلكَ" "أُلٱِكَ" Def;
@@ -86,14 +88,14 @@ concrete StructuralAra of Structural = CatAra **
-- therefore_PConj = ss "تهرفْري" ;
----b these_NP = indeclNP "هَؤُلَاء" Pl ;
they_Pron = theyMasc_Pron ;
this_Quant = mkQuant7 "هَذا" "هَذِهِ" "هَذَان" "هَذَيْن" "هَاتَان" "هَاتَيْن" "هَؤُلَاء" Def;
this_Quant = mkQuant7 "هَذَا" "هَذِهِ" "هَذَان" "هَذَيْن" "هَاتَان" "هَاتَيْن" "هَؤُلَاء" Def ;
----b this_NP = indeclNP "هَذا" Sg ;
----b those_NP = indeclNP "هَؤُلَاءكَ" Pl ;
through_Prep = mkPrep "عَبْرَ" ;
-- too_AdA = ss "تّْ" ;
too_AdA = very_AdA ;
to_Prep = mkPrep "إِلَى" ;
under_Prep = mkPrep "تَحْتَ" ;
-- very_AdA = ss "ثري" ;
very_AdA = ss "جِدَّاً" ;
want_VV = mkVV (mkV "رود" FormIV) ;
we_Pron = ResAra.we_Pron ;
whatPl_IP = mkIP "ما" "ماذا" Pl ;
@@ -116,7 +118,7 @@ concrete StructuralAra of Structural = CatAra **
whoPl_IP = mkIP "مَنْ" "مَنْ" Pl ;
why_IAdv = ss "لِمَاذَا" ;
without_Prep = mkPrep "بِدُونِ" ;
with_Prep = mkPrep "مَع" ;
with_Prep = mkPrep "مَعَ" ;
yes_Utt = {s = \\_ => "نَعَم"} ;
youSg_Pron = youSgMasc_Pron ;
youPl_Pron = youPlMasc_Pron ;

View File

@@ -12,11 +12,11 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
SlashV2V v2v vp = let v2vVP = predV v2v in -- IL
vp ** {
s = v2vVP.s ;
agrObj = \\pgn => v2v.c3.s -- أَنْ
agrObj = \\pgn => v2v.s2 -- أَنْ
++ vp.s ! pgn ! VPImpf Cnj -- this will agree with the object added by ComplSlash
++ vp.obj.s ;
obj = emptyObj ;
isPred = False ;
vtype = NotPred ;
c2 = v2v.c2 ; -- preposition for the direct object
sc = v2v.sc
} ;
@@ -26,15 +26,22 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
vps ** {
s = \\pgn,vpf => v2vVP.s ! pgn ! vpf -- main verb agrees with subject
++ bindIfPron np v2vVP
++ v2v.c3.s -- أَنْ
++ v2v.s2 -- أَنْ
++ vps.s ! np.a.pgn ! VPImpf Cnj -- verb from old VP agrees with object
++ vps.obj.s ; -- otherwise obj appears in a weird place /IL
obj = emptyObj ;
isPred = False ;
vtype = NotPred ;
-- preposition for the direct object comes from VP
sc = v2v.sc
} ;
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
SlashV2S v2s s = slashV2 v2s ** { -- IL
agrObj = -- this is put into agrObj even though it doesn't depend on agr, because insertObj puts agrObj *after* the new object.
\\pgn => v2s.s2 -- أَنَّ
++ s.s ! v2s.o ;
} ;
SlashV2a = slashV2 ;
Slash2V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []};
@@ -59,15 +66,16 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
ComplVV vv vp = let vvVP = predV vv in -- IL
vp ** {
s = \\pgn,vpf => vvVP.s ! pgn ! vpf
++ vv.c2.s -- أَنْ
++ vv.s2 -- أَنْ
++ vp.s ! pgn ! VPImpf Cnj ;
isPred = False ;
vtype = NotPred ;
sc = vv.sc
} ;
-- : VS -> S -> VP ; -- say that she runs
ComplVS vs s = predV vs ** { -- IL
obj = emptyObj ** {s = vs.s2 ++ s.s ! vs.o}
obj = emptyObj ** {s = vs.s2 -- أَنَّ
++ s.s ! vs.o}
} ;
-- : VQ -> QS -> VP ; -- wonder who runs
@@ -84,7 +92,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
UseComp xabar =
case xabar.isNP of {
False => kaan xabar ;
True => predV copula ** {obj = xabar.obj ; isPred=True}
True => predV copula ** {obj = xabar.obj ; vtype=Copula}
} ;
UseCopula = predV copula ;
@@ -92,7 +100,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
-- : VP -> Prep -> VPSlash ; -- live in (it)
VPSlashPrep vp prep = vp ** {
c2 = prep ;
agrObj = \\_ => []
agrObj = \\_ => [] -- to make it into VPSlash, VP didn't have that field before
} ;
AdvVP vp adv = insertStr adv.s vp ;
@@ -102,12 +110,15 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
-- : VPSlash -> VP ; -- love himself
ReflVP vps = vps ** {
s = \\pgn,vf => vps.s ! pgn ! vf ++ reflPron Acc pgn
s = \\pgn,vf => vps.s ! pgn ! vf
++ vps.obj.s -- only relevant if the VPSlash has been through VPSlashPrep
++ vps.c2.s ++ bindIf vps.c2.binds
++ reflPron vps.c2.c pgn ;
c2 = accPrep ;
obj = emptyObj ; -- because old obj was moved in s
} ;
PassV2 = passPredV ;
--
-- UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no
CompAP ap = {s = \\agr,c => ap.s ! Hum ! agr.g ! agr.n ! Indef ! c ; --FIXME
obj = emptyObj ; isNP = False} ;

View File

@@ -95,7 +95,7 @@ lin
tr (th "членувано" ++ td (a.s ! (APl Def)))
) ++
heading1 ("Наречие") ++
paragraph (a.s ! (ASg Neut Indef)) ;
paragraph (a.adv) ;
s3= ""
} ;

View File

@@ -4,4 +4,5 @@ concrete AllCat of AllCatAbs =
LangCat,
IrregCat,
ExtraCat
** {} ;
** open ExtendCat
in {} ;

View File

@@ -1,5 +1,5 @@
--# -path=.:../romance:../abstract:../common:prelude
instance DiffCat of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoCat, BeschCat, Prelude in {
instance DiffCat of DiffRomance - [partAgr,stare_V,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoCat, BeschCat, Prelude in {
flags optimize=noexpand ;
coding=utf8 ;
@@ -108,28 +108,26 @@ oper
infForm _ _ _ _ = True ;
mkImperative b p vp =
\\pol,g,n =>
let
pe = case b of {True => P3 ; _ => p} ;
agr = {g = g ; n = n ; p = pe} ;
mkImperative isPol p vp =
\\pol,g,n => case pol of {
RPos => neg.p1 ++ imper ++ bindIf refl.isRefl ++ refl.pron
++ bindIf hasClit ++ clit ++ compl ;
RNeg _ => neg.p1 ++ refl.pron ++ clit ++ compl ++ subj
} where {
pe = case isPol of {True => P3 ; _ => p} ;
refl = case vp.s.vtyp of {
VRefl => <reflPron n pe Acc,True> ;
_ => <[],False>
VRefl => {pron = reflPron n pe Acc ; isRefl = True} ;
_ => {pron = [] ; isRefl = False}
} ;
clit = vp.clit1 ++ vp.clit2 ;
hasClit = vp.clit3.hasClit ;
imper = vp.s.s ! vImper n pe ;
subj = vp.s.s ! VFin (VPres Conjunct) n pe ;
neg = vp.neg ! pol ;
agr = {g = g ; n = n ; p = pe} ;
compl = neg.p2 ++ vp.comp ! agr ++ vp.ext ! pol
} ;
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ; ---- TODO: True if clit
---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
----e verb = case <aag.n, pol,pe> of {
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
----e _ => (vp.s ! VPImperat).fin ! agr
----e } ;
verb = vp.s.s ! vImper n pe ; ----e
neg = vp.neg ! pol ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl
;
CopulaType = Bool ;
selectCopula = \isEstar -> case isEstar of {True => estar_V ; False => copula} ;
serCopula = False ;
@@ -201,12 +199,10 @@ oper
_ => False
} ;
auxPassive : Verb = verbBeschH (estar_54 "estar") ;
haver_V, auxPassive : Verb = verbBeschH (estar_54 "estar") ;
copula = verbBeschH (ser_52 "ser") ;
estar_V = verbBeschH (estar_54 "estar") ;
haver_V : Verb = verbBeschH (haver_59 "haver" True) ;
essere_V, copula = verbBeschH (ser_52 "ser") ;
stare_V, estar_V = verbBeschH (estar_54 "estar") ;
verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere ; p = []} ;

19
src/catalan/ExtendCat.gf Normal file
View File

@@ -0,0 +1,19 @@
--# -path=alltenses:../common:../abstract:../romance
concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
-- [
-- ]
-- don't forget to put the names of your own
-- definitions here
with
(Grammar = GrammarCat), (Syntax = SyntaxCat), (ResRomance = ResCat) **
open
GrammarCat,
ResCat,
MorphoCat,
Coordination,
Prelude,
ParadigmsCat in {
-- put your own definitions here
} ;

View File

@@ -54,6 +54,7 @@ lin
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
ExistMassCN cn = ExistNP (MassNP cn) ;
ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ;
AdvIsNP adv np = PredVP np (UseComp (CompAdv adv)) ; -- here is the tree / here are the trees
PurposeVP = variants {} ; -- VP -> Adv ; -- to become happy
ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs
SlashBareV2S = SlashV2S ; -- V2S -> S -> VPSlash ; -- answer (to him) it is good ; DEFAULT answer that it is good
@@ -76,7 +77,7 @@ lin
Cons_nr_RNP = variants {} ; -- NP -> RNPList -> RNPList ; -- John, my family, myself
ComplGenVV = variants {} ; -- VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
ComplSlashPartLast = ComplSlash ;
SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
--SlashV2V = variants {} ; -- V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
CompoundN = variants {} ; -- N -> N -> N ; -- control system / controls system / control-system
CompoundAP = variants {} ; -- N -> A -> AP ; -- language independent / language-independent
GerundCN = variants {} ; -- VP -> CN ; -- publishing of the document (can get a determiner)
@@ -96,6 +97,7 @@ lin
DetNPMasc = DetNP ;
DetNPFem = DetNP ;
UseComp_estar = UseComp ; -- DEFAULT UseComp
iFem_Pron = i_Pron ; -- DEFAULT I (masc)
youFem_Pron = youSg_Pron ; -- DEFAULT you (masc)
weFem_Pron = we_Pron ; -- DEFAULT we (masc)
@@ -104,10 +106,12 @@ lin
youPolFem_Pron = youPol_Pron ; -- DEFAULT you polite (masc)
youPolPl_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
youPolPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
UncontractedNeg = variants {} ; -- do not, etc, as opposed to don't
UttAccNP = UttNP ; -- him (accusative) ; DEFAULT he
UttDatNP np = UttAccNP (lin NP np) ; -- him(dative) ; DEFAULT he
UttAccIP = UttIP ; -- whom (accusative) ; DEFAULT who
UttDatIP ip = UttAccIP (lin IP ip) ; -- whom (dative) ; DEFAULT who
UttVPShort = UttVP ; -- have fun, as opposed to "to have fun" ; DEFAULT UttVP
oper
quoted : Str -> Str = \s -> "\"" ++ s ++ "\"" ; ---- TODO bind ; move to Prelude?

View File

@@ -4,7 +4,7 @@ concrete ExtendEng of Extend =
CatEng ** ExtendFunctor -
[
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
AdAdV, AdjAsCN, AdjAsNP, ApposNP,
AdAdV, AdjAsCN, AdjAsNP, ApposNP, AdvIsNP,
BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
@@ -328,6 +328,8 @@ concrete ExtendEng of Extend =
lin
ApposNP np1 np2 = {s = \\c => np1.s ! c ++ comma ++ np2.s ! c; a = np1.a} ;
AdvIsNP adv np = PredVP {s = \\_ => adv.s ; a = np.a} (UseComp (CompNP np)) ;
---- TODO: RNPList construction
lin

View File

@@ -11,7 +11,15 @@ oper
lin IDet {s = s ; n = n} ;
mkIQuant : Str -> Str -> IQuant = \s,n ->
lin IQuant {s = table {Sg => s ; Pl => n}} ;
mkDet = overload {
mkDet : Str -> Number -> Det = \s,n ->
lin Det (mkDeterminer n s) ;
mkDet : Str -> Det -> Det = \s,d ->
d ** {
s = s ++ d.s ;
sp = \\g,b,c => s ++ d.sp ! g ! b ! c ;
} ;
} ;
}

View File

@@ -313,7 +313,8 @@ oper
mkVS : V -> VS ; -- sentence-compl e.g. say (that S)
mkV2S : V -> Prep -> V2S ; -- e.g. tell (NP) (that S)
mkVV : V -> VV ; -- e.g. want (to VP)
infVV : V -> VV ; -- e.g. want (to VP)
auxVV : V -> VV ; -- e.g. must (VP)
infVV : V -> VV ; -- e.g. must (VP) (old name of auxVV)
ingVV : V -> VV ; -- e.g. start (VPing)
mkV2V : overload {
mkV2V : Str -> V2V ;
@@ -579,8 +580,13 @@ mkInterj : Str -> Interj
p = v.p ;
typ = VVInf
} ;
infVV v = lin VV {
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
auxVV, infVV = \v -> lin VV {
s = table {
VVF vf => v.s ! vf ;
VVPresNeg => v.s ! VPres ++ "not" ;
VVPastNeg => v.s ! VPast ++ "not" ; --# notpresent
_ => v.s ! VInf
} ;
p = v.p ;
typ = VVAux
} ;

View File

@@ -51,7 +51,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
CN = {s : NForm => Str ; h : Harmony} ;
Pron = {s : NPForm => Str ; a : Agr ; hasPoss : Bool ; poss : Str} ;
NP = {s : NPForm => Str ; a : Agr ; isPron : Bool ; isNeg : Bool} ;
Det = {
DAP, Det = {
s1 : Case => Str ; -- minun kolme
s2 : Harmony => Str ; -- -ni (Front for -nsä, Back for -nsa)
sp : Case => Str ; -- se (substantival form)

View File

@@ -2,9 +2,10 @@
concrete ExtendFin of Extend =
CatFin ** ExtendFunctor - [
VPI2,VPS2,MkVPS2,ConjVPS2,ComplVPS2,MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
,ExistCN, ExistMassCN
,CompoundN
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
,ExistCN, ExistMassCN, ICompAP, ByVP
,CompoundN, GenNP, GenIP, AdvIsNP
]
with
(Grammar = GrammarFin) **
@@ -55,7 +56,7 @@ oper
MkVPS t p vp = mkVPS t p (lin VP vp) ;
ConjVPS c xs = conjunctDistrTable Agr c xs ;
PredVPS np vps = {s = np.s ! npNom ++ vps.s ! np.a} ;
PredVPS np vps = {s = np.s ! NPCase Nom ++ vps.s ! np.a} ;
MkVPI vp = mkVPI vp ;
@@ -116,4 +117,36 @@ lin
s = \\c => ukkos_ ++ BIND ++ n2.s ! c ;
h = n2.h
} ;
---- copied from VerbFin.CompAP, should be shared
ICompAP ap = {
s = \\agr =>
let
n = complNumAgr agr ;
c = case n of {
Sg => Nom ; -- minä olen iso ; te olette iso
Pl => ResFin.Part -- me olemme isoja ; te olette isoja
} --- definiteness of NP ?
in "kuinka" ++ ap.s ! False ! (NCase n c)
} ;
lin
GenNP np = {
s1,sp = \\_,_ => np.s ! NPCase Gen ;
s2 = case np.isPron of { -- "isän auto", "hänen autonsa"
True => table {Front => BIND ++ possSuffixFront np.a ;
Back => BIND ++ possSuffix np.a } ;
False => \\_ => []
} ;
isNum = False ;
isPoss = np.isPron ; --- also gives "sen autonsa"
isDef = True ; --- "Jussin kolme autoa ovat" ; thus "...on" is missing
isNeg = False
} ;
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
}

View File

@@ -13,8 +13,17 @@ oper
mkIDet : Bool -> Str -> N -> Number -> IDet = \isNum,pref,s,n ->
lin IDet {s = \\c => pref ++ s.s ! NCase n c ; n = n ; isNum = isNum} ;
mkDet = overload {
mkDet : N -> Number -> Det = \s,n ->
lin Det (MorphoFin.mkDet n s) ;
mkDet : Str -> Bool -> Det -> Det = \s,isNeg,d ->
d ** {
s1 = \\c => s ++ d.s1 ! c ;
sp = \\c => s ++ d.sp ! c ;
isNeg = isNeg ;
} ;
} ;
partDet : N -> Number -> Det = \s,n ->
lin Det (MorphoFin.partDet False n s) ;

View File

@@ -264,6 +264,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in
isPron = False ; isNeg = det.isNeg
} ;
DetDAP d = d ;
oper
numN : NForm -> Number = \nf -> case nf of {

View File

@@ -246,9 +246,7 @@ instance DiffFre of DiffRomance - [
getVTypT : VType -> VBool = \t -> case t of {VTyp _ b => b} ; -- only in Fre
auxPassive : Verb = copula ;
copula : Verb = {s = table VF ["être";bindHyphen;"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois"
copula, auxPassive, essere_V : Verb = {s = table VF ["être";bindHyphen;"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois"
;"soit";"soyons";"soyez";"soient";
"étais";"étais";"était";"étions";"étiez";"étaient";--# notpresent
"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";--# notpresent
@@ -314,4 +312,4 @@ instance DiffFre of DiffRomance - [
verbHyphen : Verb -> Str = \v -> v.s ! (VInfin True) ; --- kluge: use this field to store - or -t-
}
} ;

View File

@@ -393,8 +393,8 @@ oper
mkPN : N -> PN = \x -> lin PN {s = x.s ! Sg ; g = x.g} ;
} ;
mk4A a b c d = mk5A a a b c d ;
mk5A a b c d e = compADeg {s = \\_ => (mkAdj' a b c d e).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
mk4A masc fem mascpl aa = mk5A masc masc fem mascpl aa ;
mk5A masc masc fem mascpl aa = compADeg {s = \\_ => (mkAdj' masc masc mascpl fem aa).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
adjCopula a cop = a ** {copTyp = cop} ;

View File

@@ -4,4 +4,5 @@ concrete AllIta of AllItaAbs =
LangIta,
-- IrregIta,
ExtraIta
** {} ;
** open ExtendIta
in {} ;

View File

@@ -226,7 +226,7 @@ instance DiffIta of DiffRomance - [contractInf] = open CommonRomance, PhonoIta,
auxPassive : Verb = venire_V ;
copula = verbBesch (essere_1 "essere") ** {vtyp = VEsse ; p = []} ;
copula, essere_V = verbBesch (essere_1 "essere") ** {vtyp = VEsse ; p = []} ;
avere_V = verbBesch (avere_2 "avere") ** {vtyp = VHabere ; p = []} ;
venire_V = verbBesch (venire_110 "venire") ** {vtyp = VEsse ; p = []} ;

19
src/italian/ExtendIta.gf Normal file
View File

@@ -0,0 +1,19 @@
--# -path=alltenses:../common:../abstract:../romance
concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor-- -
-- [
-- ]
-- don't forget to put the names of your own
-- definitions here
with
(Grammar = GrammarIta), (Syntax = SyntaxIta), (ResRomance = ResIta) **
open
GrammarIta,
ResIta,
MorphoIta,
Coordination,
Prelude,
ParadigmsIta in {
-- put your own definitions here
} ;

View File

@@ -6,43 +6,48 @@ concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
PositA a = a ;
UseComparA a = a ;
ComparA a np = {
s =\\ez => a.s ! ez ++ "تر" ++ "از" ++ np.s ! NPC bEzafa ;
adv = a.adv
ComparA a np = a ** {
s = \\m => a.s ! m ++ "تر" ++ "از" ++ np2str np ;
adv = a.adv ++ "تر" ++ "از" ++ np2str np ;
} ;
---- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = {
s =\\ez => np.s ! NPC bEzafa ++ a.c2 ++ a.s ! ez ;
adv = a.adv
ComplA2 a np = a ** {
s = \\m => np2str np ++ a.c2 ++ a.s ! m ;
adv = np2str np ++ a.c2 ++ a.adv
} ;
ReflA2 a = {
s =\\ez => a.s ! ez ++ "" ; -- need to be fixed
adv = a.adv
ReflA2 a = a ** {
s = \\m => a.s ! m ++ reflPron ! defaultAgr ! Bare ; ---- need to be fixed
adv = a.adv ++ reflPron ! defaultAgr ! Bare
} ;
SentAP ap sc = {
s =\\ez => ap.s! ez ++ sc.s ;
adv = ap.adv
SentAP ap sc = ap ** {
s = \\m => ap.s ! m ++ sc.s ;
adv = ap.adv ++ sc.s
} ;
AdAP ada ap = {
s =\\ez => ada.s ++ ap.s ! ez ;
adv = ap.adv
AdAP ada ap = ap ** {
s = \\m => ada.s ++ ap.s ! m ;
adv = ada.s ++ ap.adv ;
} ;
UseA2 a = a ;
CAdvAP cadv ap np = {
s =\\ez => cadv.s ++ np.s ! NPC bEzafa ++ ap.s ! ez ;
adv = ap.adv
CAdvAP cadv ap np = ap ** {
s = \\m => cadv.s ++ np2str np ++ ap.s ! m ;
adv = cadv.s ++ ap.adv
} ;
AdjOrd ord = { s =\\_ => ord.s ; adv = ""};
AdjOrd ord = {
s = \\_ => ord.s ;
adv = ord.s ;
isPre = ord.isPre
} ;
AdvAP ap adv = {s =\\ez => ap.s ! ez ++ adv.s ; adv = ap.adv};
AdvAP ap adv = ap ** {
s = \\m => ap.s ! m ++ adv.s ;
adv = ap.adv ++ adv.s
} ;
}

View File

@@ -2,21 +2,21 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
flags coding = utf8;
lin
-- PositAdvAdj a = {s = a.s ! bEzafa } ;
-- PositAdvAdj a = {s = a.s ! Bare } ;
PositAdvAdj a = {s = a.adv } ;
ComparAdvAdj cadv a np = {
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! NPC bEzafa ;
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! Bare ;
} ;
ComparAdvAdjS cadv a s = {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
s = a.adv ++ cadv.p ++ cadv.s ++ s.s ! Indic;
} ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ;
PrepNP prep np = {s = prep.s ++ np.s ! Bare } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ;
-- SubjS = cc2 ;
SubjS sub snt = {s = sub.s ++ "که" ++ snt.s } ;
SubjS sub snt = {s = sub.s ++ "که" ++ snt.s ! sub.compl} ;
AdnCAdv cadv = {s = cadv.s ++ "از"} ;
}

View File

@@ -1,4 +1,4 @@
--# -path=.:../abstract:../common:../prelude
--# -path=.:alltenses:prelude:../api:../common
concrete AllPes of AllPesAbs =
LangPes,

View File

@@ -1,27 +1,27 @@
concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
concrete CatPes of Cat = CommonX ** open ResPes, Prelude in {
flags optimize=all_subs ;
lincat
------ Tensed/Untensed
S = {s : Str} ;
QS = {s : QForm => Str} ;
RS = {s : AgrPes => Str } ; -- c for it clefts
SSlash = {s : Str ; c2 : ResPes.Compl} ;
S = {s : VVForm => Str} ; -- as a complement to Subj
QS = {s : Str} ;
RS = {s : Agr => Str ; rp : RelPron => Str} ;
SSlash = {s : VVForm => Str ; c2 : ResPes.Compl} ;
---- Sentence
Cl = ResPes.Clause ;
ClSlash = {
subj : Str ;
vp : ResPes.VPHTense => Polarity => Order => Str ;
vp : ResPes.TAnt => Polarity => Order => Str ;
c2 : ResPes.Compl
} ;
Imp = {s : CPolarity => ImpForm => Str} ;
Imp = {s : Polarity => ImpForm => Str} ;
---- Question
QCl = {s : ResPes.VPHTense => Polarity => QForm => Str} ;
QCl = {s : ResPes.TAnt => Polarity => Str} ;
IP = {s: Str ; n : Number};
@@ -32,20 +32,17 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
---- Relative
RCl = {
s : ResPes.VPHTense => Polarity => Order => AgrPes => Str ;
-- c : Case
s : ResPes.TAnt => Polarity => Agr => Str ;
rp : RelPron => Str
} ;
RP = {s: Str ; a:RAgr};
RP = {s : RelPron => Str ; a : RAgr};
---- Verb
VP = ResPes.VPH ;
VPSlash = ResPes.VPHSlash ;
Comp = {s : AgrPes => Str} ;
---- Adv
Adv = {s : Str} ;
Comp = {s : Agr => Str} ;
---- Adjective
@@ -53,17 +50,16 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
---- Noun
CN = ResPes.Noun ;
CN = ResPes.CN ;
NP = ResPes.NP ;
Pron = {s : Str ; ps : Str ; a : AgrPes};
Pron = ResPes.Pron ;
Det = ResPes.Determiner ;
Predet = {s : Str} ;
Num = {s : Str ; n : Number} ;
Num = {s : Str ; n : Number ; isNum : Bool} ;
Card = {s : Str; n : Number} ;
Ord = {s : Str; n : Number} ;
Quant = {s: Number => Str ; a:AgrPes ; fromPron : Bool};
Art = {s : Str} ;
Ord = {s : Str; n : Number ; isNum,isPre : Bool} ;
Quant = ResPes.Quant ;
---- Numeral
@@ -75,22 +71,22 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
Conj = {s1,s2 : Str ; n : Number} ;
-----b Conj = {s : Str ; n : Number} ;
-----b DConj = {s1,s2 : Str ; n : Number} ;
Subj = {s : Str} ;
Prep = {s : Str };
Subj = {s : Str ; compl : VVForm} ; -- subjunctive or indicative
Prep = Compl ;
---- Open lexical classes, e.g. Lexicon
V, VS, VQ, VA = ResPes.Verb ; -- = {s : VForm => Str} ;
V, VS, VQ = ResPes.Verb ;
V2, V2A, V2Q, V2S = ResPes.Verb ** {c2 : Compl} ;
V3 = ResPes.Verb ** {c2, c3 : Str} ;
VV = ResPes.Verb ** { isAux : Bool} ;
V2V = ResPes.Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
A = ResPes.Adjective ; --- {s : Gender => Number => Case => Str} ;
V2, VA, V2A, V2Q, V2S = ResPes.Verb ** {c2 : Compl} ;
V3 = ResPes.Verb ** {c2, c3 : Compl} ;
VV = ResPes.VV ;
V2V = ResPes.VV ** {c2 : Compl} ;
A = ResPes.Adjective ;
A2 = ResPes.Adjective ** {c2 : Str} ;
N = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ;
N = ResPes.Noun ;
N2 = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ** {c : Str};
N3 = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ** {c2 : Str ; c3 : Str } ;
N2 = ResPes.Noun ** {c2 : Str ; compl : Str}; -- when N3 is made to N2, need to retain compl
N3 = ResPes.Noun ** {c2 : Str ; c3 : Str} ;
PN = {s : Str ; animacy : Animacy} ;
}

View File

@@ -7,40 +7,39 @@ concrete ConjunctionPes of Conjunction =
lin
ConjS = conjunctDistrSS ;
ConjS = conjunctDistrTable VVForm ;
ConjAdv = conjunctDistrSS ;
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
a = conjAgrPes (agrPesP3 conj.n) ss.a ;
ConjNP conj ss = ss ** conjunctDistrTable Mod conj ss ** {
a = conjAgr (agrP3 conj.n) ss.a ;
animacy = ss.animacy ;
} ;
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv};
ConjRS conj rs = conjunctDistrTable AgrPes conj rs ** { c = rs.c};
ConjAP conj ss = ss ** conjunctDistrTable Mod conj ss ; -- Adv isn't changed
ConjRS conj rs = rs ** conjunctDistrTable Agr conj rs ;
---- These fun's are generated from the list cat's.
BaseS = twoSS ;
ConsS = consrSS comma ;
BaseS = twoTable VVForm ;
ConsS = consrTable VVForm comma ;
BaseAdv = twoSS ;
-- BaseAdv x y = twoTable Gender x y ;
ConsAdv = consrSS comma ;
-- ConsAdv xs x = consrTable Gender comma xs x ;
BaseNP x y = twoTable NPCase x y ** {a = conjAgrPes x.a y.a ; animacy = y.animacy } ; -- check animacy
BaseRS x y = twoTable AgrPes x y ** {c = x.c};
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgrPes xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
ConsRS xs x = consrTable AgrPes comma xs x ** { c = xs.c};
-- BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ;
BaseAP x y = twoTable Ezafa x y ** {adv = x.adv};
ConsAP xs x = consrTable Ezafa comma xs x ** {adv = x.adv}; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
BaseNP x y = y ** twoTable Mod x y ** {a = conjAgr x.a y.a ; animacy = y.animacy } ; -- check animacy
BaseRS x y = x ** twoTable Agr x y ;
ConsNP xs x = xs ** consrTable Mod comma xs x ** {a = conjAgr xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
ConsRS xs x = xs ** consrTable Agr comma xs x ;
BaseAP x y = y ** twoTable Mod x y ;
ConsAP xs x = xs ** consrTable Mod comma xs x ; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
lincat
[S] = {s1,s2 : Str} ;
[S] = {s1,s2 : VVForm => Str} ;
[Adv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : NPCase => Str ; a : AgrPes ; animacy : Animacy } ;
[AP] = {s1,s2 : Ezafa => Str ; adv : Str} ;
[RS] = {s1,s2 : AgrPes => Str };
[NP] = {s1,s2 : Mod => Str} ** BaseNP ;
[AP] = {s1,s2 : Mod => Str ; adv : Str ; isPre : Bool} ;
[RS] = {s1,s2 : Agr => Str ; rp : RelPron => Str} ;
}

View File

@@ -0,0 +1,88 @@
--# -path=.:abstract:prelude:api:common
concrete ConstructionPes of Construction = CatPes ** open
Prelude,
ParadigmsPes,
(P=ParadigmsPes),
SyntaxPes,
(S=SyntaxPes),
SymbolicPes,
StructuralPes,
(E=ExtendPes),
(R=ResPes),
(L=LexiconPes) in {
lincat
Timeunit = N ;
Weekday = N ;
Monthday = NP ;
Month = N ;
Year = NP ;
Language = N ;
lin
weekdayN w = w ;
monthN m = m ;
-- weekdayPN w = mkPN w ;
-- monthPN m = mkPN m ;
timeunitAdv n time =
let n_card : Card = n ;
n_hours_NP : NP = mkNP n_card time ;
in S.mkAdv during_Prep n_hours_NP ; ---- /IL
weekdayPunctualAdv w = lin Adv (S.mkUtt (mkNP w)) ; -- on Sunday
-- TODO
weekdayHabitualAdv, -- on Sundays
weekdayNextAdv, -- next Sunday
weekdayLastAdv = weekdayPunctualAdv ; -- last Sunday
monthAdv january =
let january_NP : NP = mkNP january ;
in S.mkAdv in_Prep january_NP ;
yearAdv y = S.mkAdv in_Prep y ;
intYear = symb ;
intMonthday = symb ;
languageCN l = mkCN l ;
languageNP l = mkNP l ;
InLanguage l = S.mkAdv in_Prep (mkNP l) ;
english_Language = mkLanguage "انگلیسی" ;
finnish_Language = mkLanguage "فنلاند" ;
swedish_Language = mkLanguage "سوئدی" ;
arabicLanguage = mkLanguage "عربی" ;
finnishLanguage = mkLanguage "فنلاندی" ;
frenchLanguage = mkLanguage "فرانسوی" ;
persianLanguage = mkLanguage "فارسی" ;
romanianLanguage = mkLanguage "رومانیایی" ;
polishLanguage = mkLanguage "لهستانی" ;
bulgarianLanguage = mkLanguage "بلغاری" ;
somaliLanguage = mkLanguage "سومالیایی" ;
turkishLanguage = mkLanguage "ترکی" ;
kurdishLanguage = mkLanguage "کردی" ;
-- : Card -> CN -> A -> AP
n_units_AP card cn a =
let ap = mkAP a in ap ** {
s = \\ez =>
ap.s ! ez
++ (mkUtt (mkNP card cn)).s ---- just guessing /IL
} ;
hungry_VP = mkVP (mkA "گرسنه") ;
thirsty_VP = mkVP (mkA "تشنه") ;
have_name_Cl p n = mkCl (mkNP (E.GenNP p) L.name_N) n ;
what_name_QCl p = mkQCl what_IAdv (mkNP (E.GenNP p) L.name_N) ;
how_old_QCl p = mkQCl howMuchAge_IAdv (mkNP (mkNP (E.GenNP p)) (P.mkAdv "سال")) ;
oper
howMuchAge_IAdv = lin IAdv {s = "چند"} ;
what_IAdv = lin IAdv {s = "چه چیزی"} ;
mkLanguage : Str -> N = mkN ;
}

38
src/persian/ExtendPes.gf Normal file
View File

@@ -0,0 +1,38 @@
--# -path=.:../common:../abstract:../prelude
concrete ExtendPes of Extend =
CatPes ** ExtendFunctor - [
GenNP, ApposNP, ICompAP, AdvIsNP
,GerundNP,GerundCN,GerundAdv,EmbedPresPart
]
with (Grammar=GrammarPes)
** open Prelude, ResPes in {
lin
-- NP -> Quant ; -- this man's
GenNP np = np ** {
mod = Ezafe ; -- the possessed will get Ezafe
s = \\num,cmpd => np2str np -- possesser is unmarked; https://sites.la.utexas.edu/persian_online_resources/language-specific-grammar/ezfe/
} ;
-- : NP -> NP -> NP
ApposNP np1 np2 = np1 ** {
s = \\m => np1.s ! m ++ np2.s ! m
} ;
ICompAP ap = {s = "چقدر" ++ ap.s ! Bare} ;
-- : VP -> CN ; -- publishing of the document (can get a determiner)
GerundCN vp = useN (indeclN (showVPH Inf defaultAgr vp)) ;
-- : VP -> NP ; -- publishing the document (by nature definite)
GerundNP vp = indeclNP (showVPH Inf defaultAgr vp) ;
-- : VP -> Adv ; -- publishing the document (prepositionless adverb)
GerundAdv vp = lin Adv {s = showVPH Inf defaultAgr vp} ;
-- : VP -> SC ;
EmbedPresPart vp = lin SC {s = showVPH Inf defaultAgr vp} ;
-- : Adv -> NP -> Cl -- here is the car / here are the cars
AdvIsNP adv np = mkClause (indeclNP adv.s ** {a = np.a}) (UseComp (CompNP np)) ;
}

View File

@@ -1,19 +1,10 @@
concrete ExtraPes of ExtraPesAbs = CatPes **
open ResPes, Coordination, Prelude, MorphoPes, ParadigmsPes in {
open ResPes, ExtendPes, Coordination, Prelude, MorphoPes, ParadigmsPes in {
flags coding = utf8;
lin
GenNP np = {s = \\_ => np.s ! NPC aEzafa ; a = np.a ; fromPron = True} ; -- changed from fromPron=False for Phrasebook
GenNP = ExtendPes.GenNP ;
-- each_Det = mkDet "هر کwی" "هر کwی" "هر کwی" "هر کwی" Sg ;
-- have_V = mkV "رکh-ن";
IAdvAdv adv = {s = "تا چه" ++ adv.s} ;
-- ICompAP ap = {s = "کتنE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
-- cost_V = mkV "قیمت" ;
-- added for causitives
-- make_CV = mkVerb "نْتهنگ" ** {c2 = "" };
-- for VP conjunction
}

View File

@@ -12,14 +12,12 @@
ConjunctionPes,
PhrasePes,
TextPes - [Adv],
TextPes,
StructuralPes,
TenseX - [Adv],
TenseX,
IdiomPes
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
}

View File

@@ -1,40 +1,44 @@
concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
concrete IdiomPes of Idiom = CatPes ** open Prelude,ParadigmsPes,ResPes in {
flags optimize=all_subs ;
flags coding = utf8;
lin
ImpersCl vp = mkSClause " " (agrPesP3 Sg) vp ;
GenericCl vp = mkSClause "آدم" (agrPesP3 Sg) vp ;
ImpersCl vp = mkSClause " " (agrP3 Sg) vp ;
GenericCl vp = mkSClause "آدم" (agrP3 Sg) vp ;
CleftNP np rs =
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe);
let cl = mkSClause (np2str np) (np.a) (predV beVerb);
in
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs2str Ke np.a rs};
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s ! Indic};
ExistNP np =
mkSClause " " (agrPesP3 (fromAgr np.a).n)
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ;
mkSClause [] (agrP3 (fromAgr np.a).n)
(insertComp (\\_ => np2str np) (predV existVerb)) ;
ExistNPAdv np adv =
mkSClause [] (agrP3 (fromAgr np.a).n)
(insertComp (\\_ => np2str np ++ adv.s)
(predV existVerb)
) ;
ExistIP ip =
let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe);
in {
s = \\t,p,qf => case qf of {
QDir => cl.s ! t ! p ! ODir;
QIndir => cl.s ! t! p ! ODir
}
};
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
ProgrVP vp = (predProg vp) ;
let cl = mkSClause ip.s (agrP3 ip.n) (predV beVerb);
in {s = \\t,p => cl.s ! t ! p ! ODir};
ImpPl1 vp = {s = "بیایید" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ;
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf};
ProgrVP vp = predProg vp ;
ImpPl1 vp = let a = agrP1 Pl in
{s = "بیایید" ++ showVPH (VSubj Pos a) a vp } ;
ImpP3 np vp =
{s = "بگذارید" ++ np2str np ++ showVPH (VSubj Pos np.a) np.a vp};
oper
existVerb = mkV "وجود" haveVerb ;
}

View File

@@ -1,10 +1,7 @@
--# -path=.:../abstract:../common:../hindustani
--# -path=.:alltenses:prelude:../api:../common
concrete LangPes of Lang =
GrammarPes,
LexiconPes
** {
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
}
GrammarPes
,LexiconPes
,ConstructionPes
** {} ;

View File

@@ -1,8 +1,7 @@
--# -path=.:prelude:alltenses
concrete LexiconPes of Lexicon = CatPes **
--open ResPnb, Prelude in {
open ParadigmsPes,MorphoPes, Prelude in {
open ParadigmsPes, Prelude in {
flags
optimize=values ;
@@ -11,7 +10,7 @@ concrete LexiconPes of Lexicon = CatPes **
lin
airplane_N = mkN01 "هواپیما" inanimate ;
answer_V2S = mkV2 (compoundV "جواب" (mkV "دادن" "ده")) "به" False;
answer_V2S = mkV2 (compoundV "جواب" giveVerb) "به" False;
apartment_N = mkN01 "آپارتمان" inanimate;
apple_N = mkN01 "سیب" inanimate;
art_N = mkN01 "هنر" inanimate;
@@ -20,9 +19,9 @@ concrete LexiconPes of Lexicon = CatPes **
bad_A = mkA "بد" ;
bank_N = mkN01 "بانک" inanimate;
beautiful_A = mkA "زیبا" ;
become_VA = mkV "شدن" "شو";
become_VA = mkVA (mkV "شدن" "شو") ;
beer_N = mkN01 "آبجو" inanimate;
beg_V2V = mkV2V (compoundV "خواهش" (mkV "کردن" "کن")) "از" "" False;
beg_V2V = mkV2V (compoundV "خواهش" doVerb) "از" False;
big_A = mkA "بزرگ" ;
bike_N = mkN01 "دوچرخه" inanimate;
bird_N = mkN02 "پرنده" animate;
@@ -36,7 +35,7 @@ concrete LexiconPes of Lexicon = CatPes **
bread_N = mkN01 "نان" inanimate;
break_V2 = mkV2 (mkV "شکستن" "شکن") "را";
broad_A = mkA "وسیع" ;
brother_N2 = (mkN01 "برادر" animate) ** {c=""};
brother_N2 = mkN2 (mkN01 "برادر" animate) [];
brown_A = mkA ["قهوه ای"] ;
butter_N = mkN01 "کره" inanimate;
buy_V2 = mkV2 (mkV_1 "خریدن") "را";
@@ -76,12 +75,12 @@ concrete LexiconPes of Lexicon = CatPes **
empty_A = mkA "خالی" ;
enemy_N = mkN02 "دشمن" animate;
factory_N = mkN01 "کارخانه" inanimate;
father_N2 = (mkN02 "پدر" animate) ** {c=""};
father_N2 = mkN2 (mkN02 "پدر" animate) [];
fear_VS = mkV_1 "ترسیدن";
find_V2 = mkV2 (compoundV "پیدا" (mkV "کردن" "کن") ) "را";
find_V2 = mkV2 (compoundV "پیدا" doVerb) "را";
fish_N = mkN01 "ماهی" animate;
floor_N = mkN01 "زمین" inanimate; -- Note: floor in persian can have 3 different translations
forget_V2 = mkV2 (compoundV "فراموش" (mkV "کردن" "کن")) "را" ;
forget_V2 = mkV2 (compoundV "فراموش" doVerb) "را" ;
fridge_N = mkN01 "یخچال" inanimate;
friend_N = mkN02 "دوست" animate;
fruit_N = mkN01 "میوه" inanimate;
@@ -94,12 +93,11 @@ concrete LexiconPes of Lexicon = CatPes **
go_V = mkV "رفتن" "رو";
green_A = mkA "سبز" ;
harbour_N = mkN "بندر" "بنادر" inanimate;
-- hate_V2 = mkV2 (compoundV "متنفر" (mkToBe "بودن" "باش" "هست")) "از" False; -- needs from/ verb to be
hate_V2 = mkV2 (compoundV "متنفر" beVerb) "از" False; -- needs from/ verb to be
hat_N = mkN01 "کلاه" inanimate;
have_V2 = mkV2 haveVerb "را" ;
hear_V2 = mkV2 (mkV "شنیدن" "شنو") "را" ;
hill_N = mkN01 "تپه" inanimate;
-- hope_VS = compoundV "امیدوار" (mkToBe "بودن" "باش" "هست");
hope_VS = compoundV "امیدوار" beVerb;
horse_N = mkN01 "اسب" animate;
hot_A = mkA "داغ" ["داغ داغ"] ;
house_N = mkN01 "خانه" inanimate;
@@ -108,35 +106,35 @@ concrete LexiconPes of Lexicon = CatPes **
iron_N = mkN01 "آهن" inanimate;
king_N = mkN "پادشاه" "پادشاهان" animate;
know_V2 = mkV2 (mkV "شناختن" "شناس") "را";
know_VS = (mkV_1 "دانستن");
know_VS = (mkV_1 "دانستن") ; -- danestan -> dan ; needs explicit mkV_1
know_VQ = (mkV_1 "دانستن") ;
lake_N = mkN01 "دریاچه" inanimate;
lamp_N = mkN01 "چراغ" inanimate; -- also "لامپ", but they have different usage
learn_V2 = mkV2 (compoundV "یاد"(mkV "گرفتن" "گیر")) "را";
learn_V2 = mkV2 (compoundV "یاد" takeVerb) "را";
leather_N = mkN01 "چرم" inanimate; -- is uncountable
leave_V2 = mkV2 (compoundV "ترک"(mkV "کردن" "کن")) "را";
leave_V2 = mkV2 (compoundV "ترک" doVerb) "را";
like_V2 = mkV2 (compoundV "دوست" haveVerb) "را";
listen_V2 = mkV2 (compoundV "گوش" (mkV "دادن" "ده")) "به" False; -- has a diferent preposition :"به"
live_V = compoundV "زندگی" (mkV "کردن" "کن");
listen_V2 = mkV2 (compoundV "گوش" giveVerb) "به" False; -- has a diferent preposition :"به"
live_V = compoundV "زندگی" doVerb;
long_A = mkA "بلند" ;
lose_V2 = mkV2 (compoundV "گم" (mkV "کردن" "کن")) "را" ;
lose_V2 = mkV2 (compoundV "گم" doVerb) "را" ;
love_N = mkN01 "عشق" inanimate;
love_V2 = mkV2 (compoundV "دوست" haveVerb) "را"; -- also possible: love_V2 = mkV2 (compoundV "عاشق" (mkToBe "بودن" "باش" "هست"));
love_V2 = mkV2 (compoundV "دوست" haveVerb) "را"; -- also possible: love_V2 = mkV2 (compoundV "عاشق" beVerb);
man_N = mkN02 "مرد" animate;
married_A2 = mkA "متأهل" "";
meat_N = mkN01 "گوشت" inanimate;
milk_N = mkN01 "شیر" inanimate;
moon_N = mkN01 "ماه" inanimate; -- is this not a proper noun?
mother_N2 = (mkN02 "مادر" animate) ** {c=""};
mother_N2 = mkN2 (mkN02 "مادر" animate) [] ;
mountain_N = mkN01 "کوه" inanimate;
music_N = mkN "موسیقی" "موسیقی" animate;
narrow_A = mkA "باریک" ;
new_A = mkA "نو" "تازه";
newspaper_N = mkN01 "روزنامه" inanimate;
oil_N = mkN "نفت" "نفت" inanimate; -- also "روغن"
old_A = mkA "پیر" "پیرانه";
open_V2 = mkV2 (compoundV "باز" (mkV "کردن" "کن")) "را";
paint_V2A = mkV2 (compoundV "رنگ" (mkV "کردن" "کن")) "را" ;
old_A = preA "پیر" "پیرانه" ;
open_V2 = mkV2 (compoundV "باز" doVerb) "را";
paint_V2A = mkV2 (compoundV "رنگ" doVerb) "را" ;
paper_N = mkN01 "کاغذ" inanimate;
paris_PN = mkPN "پاریس" inanimate;
peace_N = mkN01 "صلح" inanimate; -- also "آرامش"
@@ -144,7 +142,7 @@ concrete LexiconPes of Lexicon = CatPes **
planet_N = mkN01 "سیّاره" inanimate;
plastic_N = mkN01 "پلاستیک" inanimate; -- is uncountable
play_V2 = mkV2 (mkV "نواختن" "نواز") "را" ;
policeman_N = mkCmpdNoun2 (mkN02 "مأمور" animate) "پلیس";
policeman_N = cmpdN (mkN02 "مأمور" animate) (mkN "پلیس");
priest_N = mkN01 "کشیش" animate;
-- probable_AS = mkAS (regA "محتمل") ;
queen_N = mkN01 "ملکه" animate;
@@ -163,7 +161,7 @@ concrete LexiconPes of Lexicon = CatPes **
school_N = mkN "مدرسه" "مدارس" inanimate;
science_N = mkN "علم" "علوم" inanimate; -- also "دانش"
sea_N = mkN01 "دریا" inanimate;
seek_V2 = mkV2 (compoundV "جستجو" (mkV "کردن" "کن")) "را";
seek_V2 = mkV2 (compoundV "جستجو" doVerb) "را";
see_V2 = mkV2 (mkV "دیدن" "بین") "را" ;
sell_V3 = mkV3 (mkV "فروختن" "فروش") "را" "به";
send_V3 = mkV3 (mkV_1 "فرستادن") "را" "برای";
@@ -179,7 +177,7 @@ concrete LexiconPes of Lexicon = CatPes **
small_A = mkA "کوچک" ;
snake_N = mkN01 "مار" animate;
sock_N = mkN01 "جوراب" inanimate;
speak_V2 = mkV2 (compoundV "صحبت" (mkV "کردن" "کن")) "" False;
speak_V2 = mkV2 (compoundV "صحبت" doVerb) "" False;
star_N = mkN01 "ستاره" animate;
steel_N = mkN01 "فولاد" inanimate; -- also "استیل"
stone_N = mkN01 "سنگ" inanimate;
@@ -187,47 +185,47 @@ concrete LexiconPes of Lexicon = CatPes **
student_N = mkCmpdNoun1 "دانش" (mkN02 "آموز" animate); -- also "دانشجو"
stupid_A = mkA "ابله" "ابلهانه" ;
sun_N = mkN01 "خورشید" inanimate; -- is this not a proper noun?!!!
switch8off_V2 = mkV2 (compoundV "خاموش" (mkV "کردن" "کن")) "را";
switch8on_V2 = mkV2 (compoundV "روشن" (mkV "کردن" "کن")) "را";
switch8off_V2 = mkV2 (compoundV "خاموش" doVerb) "را";
switch8on_V2 = mkV2 (compoundV "روشن" doVerb) "را";
table_N = mkN01 "میز" inanimate;
talk_V3 = mkV3 (compoundV "حرف" (mkV "زدن" "زن")) "با" [" درباره ی"];
talk_V3 = mkV3 (compoundV "حرف" hitVerb) "با" "دربارۀ";
teacher_N = mkN02 "معلم" animate;
teach_V2 = mkV2 (compoundV "آموزش" (mkV "دادن" "ده")) "را";
teach_V2 = mkV2 (compoundV "آموزش" giveVerb) "را";
television_N = mkN01 "تلوزیون" inanimate;
thick_A = mkA "کلفت" ;
thin_A = mkA "نازک" ;
train_N = mkN01 "قطار" inanimate;
travel_V = compoundV "سفر" (mkV "کردن" "کن");
travel_V = compoundV "سفر" doVerb;
tree_N = mkN02 "درخت" animate;
trousers_N = mkN01 "شلوار" inanimate;
-- trousers_N = mkN01 "شلوار" inanimate;
ugly_A = mkA "زشت" ;
understand_V2 = mkV2 (mkV_1 "فهمیدن") "را";
university_N = mkN01 "دانشگاه" inanimate;
village_N = mkN01 "روستا" inanimate;
-- wait_V2 = mkV2 (compoundV "منتظر" (mkVToBe "بودن" "باش"));
wait_V2 = mkV2 (compoundV "منتظر" beVerb);
walk_V = compoundV "راه" (mkV "رفتن" "رو");
warm_A = mkA "گرم" ;
war_N = mkN01 "جنگ" inanimate;
-- watch_V2 = mkV2 (compoundV "مراقب" (mkVToBe "بودن" "باش")); -- check harfe rabt!!!
watch_V2 = mkV2 (compoundV "مراقب" beVerb); -- check harfe rabt!!!
water_N = mkN01 "آب" inanimate;
white_A = mkA "سفید" ;
window_N = mkN01 "پنجره" inanimate;
wine_N = mkN01 "شراب" inanimate;
win_V2 = mkV2 (compoundV "برنده" (mkV "شدن" "شو")) "را"; -- also possible with simple verb: mkV_2 "بردن"
woman_N = mkN02 "زن" animate;
-- wonder_VQ = compoundV "متعجب" (mkVToBe "بودن" "باش") ;
wonder_VQ = compoundV "متعجب" beVerb ;
wood_N = mkN01 "چوب" inanimate;
write_V2 = mkV2 (mkV "نوشتن" "نویس") "را" ;
yellow_A = mkA "زرد" ;
young_A = mkA "جوان""جوانانه" ;
do_V2 = mkV2 (compoundV "انجام" (mkV "دادن" "ده")) "را";
do_V2 = mkV2 (compoundV "انجام" giveVerb) "را";
now_Adv = ss "حالا" ;
already_Adv = ss "قبلاً" ;
song_N = mkN01 "آواز" inanimate;
add_V3 = mkV3 (compoundV "اضافه" (mkV "کردن" "کن")) "را" "به" ;
add_V3 = mkV3 (compoundV "اضافه" doVerb) "را" "به" ;
number_N = mkN01 "عدد" inanimate; -- also "تعداد"
put_V2 = mkV2 (mkV "گذاشتن" "گذار") "را";
stop_V = compoundV "توقف" (mkV "کردن" "کن");
stop_V = compoundV "توقف" doVerb;
jump_V = mkV_1 "پریدن";
{-
left_Ord = {s = "چپ" ; n = singular};
@@ -267,7 +265,7 @@ concrete LexiconPes of Lexicon = CatPes **
fingernail_N = mkN01 "ناخن" inanimate;
fire_N = mkN01 "آتش" inanimate;
flower_N = mkN01 "گل" inanimate;
fog_N = mkN01 "مه" inanimate;
fog_N = mkN "مه" (mkN "مه") ;
foot_N = mkN01 "پا" inanimate;
forest_N = mkN01 "جنگل" inanimate;
grass_N = mkN01 "چمن" inanimate;
@@ -315,47 +313,46 @@ concrete LexiconPes of Lexicon = CatPes **
burn_V = mkV "سوختن" "سوز" ;
dig_V = mkV_2 "کندن" ;
fall_V = mkV_1 "افتادن" ;
-- float_V = compoundV "شناور" (mkToBe "بودن" "باش" "هست") ;
float_V = compoundV "شناور" beVerb ;
flow_V = compoundV "جاری" (mkV "شدن" "شو") ;
fly_V = compoundV "پرواز" (mkV "کردن" "کن") ;
freeze_V = compoundV "یخ" (mkV "زدن" "زن") ;
give_V3 = mkV3 (mkV "دادن" "ده") "را" "به";
fly_V = compoundV "پرواز" doVerb ;
freeze_V = compoundV "یخ" hitVerb ;
give_V3 = mkV3 giveVerb "را" "به";
laugh_V = mkV_1 "خندیدن" ;
lie_N = mkN01 "دروغ" inanimate;
lie_V = compoundV "دروغ" (mkV "گفتن" "گو" );
play_V = compoundV "بازی" (mkV "کردن" "کن");
play_V = compoundV "بازی" doVerb;
sew_V = mkV "دوختن" "دوز" ;
sing_V = compoundV "آواز" (mkV_2 "خواندن");
sit_V = mkV "نشستن" "نشین" ;
smell_V = compoundV "بو" (mkV "دادن" "ده");
spit_V = compoundV "تف" (mkV "کردن" "کن");
smell_V = compoundV "بو" giveVerb;
spit_V = compoundV "تف" doVerb;
stand_V = mkV_1 "ایستادن";
swell_V = compoundV "ورم" (mkV "کردن" "کن");
swim_V = compoundV "شنا" (mkV "کردن" "کن");
think_V = compoundV "فکر" (mkV "کردن" "کن");
swell_V = compoundV "ورم" doVerb;
swim_V = compoundV "شنا" doVerb;
think_V = compoundV "فکر" doVerb;
turn_V = mkV_1 "چرخیدن" ;
vomit_V = compoundV "استفراغ" (mkV "کردن" "کن");
bite_V2 = mkV2 (compoundV "گاز" (mkV "گرفتن" "گیر")) "را";
vomit_V = compoundV "استفراغ" doVerb;
bite_V2 = mkV2 (compoundV "گاز" takeVerb) "را";
count_V2 = mkV2 (mkV_2 "شماردن") "را";
cut_V2 = mkV2 (mkV_1 "بریدن") ;
fear_V2 = mkV2 (mkV_1 "ترسیدن") "از";
fight_V2 = mkV2 (mkV_1 "جنگیدن") "با" False;
hit_V2 = mkV2 (compoundV "ضربه" (mkV "زدن" "زن")) "به" False;
hit_V2 = mkV2 (compoundV "ضربه" hitVerb) "به" False;
hold_V2 = mkV2 (compoundV "نگه" haveVerb) "را";
hunt_V2 = mkV2 (compoundV "شکار" (mkV "کردن" "کن")) "را";
hunt_V2 = mkV2 (compoundV "شکار" doVerb) "را";
kill_V2 = mkV2 ( mkV_2 "کشتن") "را";
pull_V2 = mkV2 (mkV_1 "کشیدن") "را";
push_V2 = mkV2 (compoundV "هل" (mkV "دادن" "ده")) "را" ;
push_V2 = mkV2 (compoundV "هل" giveVerb) "را" ;
rub_V2 = mkV2 (mkV_1 "مالیدن") "را";
scratch_V2 = mkV2 (mkV_1 "خراشیدن") "را" ;
split_V2 = mkV2 (compoundV "تقسیم" (mkV "کردن" "کن")) "را";
squeeze_V2 = mkV2 (compoundV "له" (mkV "کردن" "کن")) "را";
stab_V2 = mkV2 (compoundV "چاقو" (mkV "زدن" "زن")) "به" False;
split_V2 = mkV2 (compoundV "تقسیم" doVerb) "را";
squeeze_V2 = mkV2 (compoundV "له" doVerb) "را";
stab_V2 = mkV2 (compoundV "چاقو" hitVerb) "به" False;
suck_V2 = mkV2 (mkV_1 "مکیدن") "را" ;
throw_V2 = mkV2 (compoundV "پرتاب" (mkV "کردن" "کن")) "را";
tie_V2 = mkV2 (compoundV "گره" (mkV "زدن" "زن")) "را";
throw_V2 = mkV2 (compoundV "پرتاب" doVerb) "را";
tie_V2 = mkV2 (compoundV "گره" hitVerb) "را";
wash_V2 = mkV2 (mkV "شستن" "شور") "را" ; -- also "شوی" which is the very formal form of the present root
wipe_V2 = mkV2 (compoundV "پاک" (mkV "کردن" "کن")) "را";
wipe_V2 = mkV2 (compoundV "پاک" doVerb) "را";
---- other_A = regA "دیگر" ;
@@ -364,11 +361,16 @@ concrete LexiconPes of Lexicon = CatPes **
rule_N = mkN "قانون" "قوانین" inanimate;
---- added 4/6/2007
john_PN = mkPN "جان" inanimate;
john_PN = mkPN "جان" animate;
question_N = mkN01 "سؤال" inanimate; -- has variant "پرسش"
ready_A = mkA "آماده" ["با آمادگی"] ;
reason_N = mkN "دلیل" "دلایل" inanimate;
today_Adv = ss "امروز" ;
uncertain_A = mkA "نامعلوم" ["با تردید"];
oper
doVerb = mkV "کردن" "کن" ;
takeVerb = mkV "گرفتن" "گیر" ;
hitVerb = mkV "زدن" "زن" ;
giveVerb = mkV "دادن" "ده" ;
}

View File

@@ -1,14 +0,0 @@
--# -path=.:../common:../abstract
resource MakeStructuralPnb = open CatPnb, ParadigmsPnb, ResPnb, MorphoPnb, NounPnb, Prelude in {
oper
mkSubj : Str -> CatPnb.Subj = \x ->
lin Subj {s = x} ;
mkNP : Str -> Number -> ResPnb.NP = \s,n ->
MassNP (UseN (ParadigmsPnb.mkN s));
-- lin NP (regNP s n) ;
mkIDet : Str -> Number -> IDet = \s,n ->
lin IDet {s = \\_ => s ; n = n} ;
}

View File

@@ -1,507 +1,329 @@
--# -path=.:../../prelude
--
----1 A Simple Punjabi Resource Morphology
----1 A Simple Persian Resource Morphology
----
---- Shafqat Virk, Aarne Ranta,2010
----
---- This resource morphology contains definitions needed in the resource
---- syntax. To build a lexicon, it is better to use $ParadigmsPnb$, which
---- syntax. To build a lexicon, it is better to use $ParadigmsPes$, which
---- gives a higher-level access to this module.
--
resource MorphoPes = ResPes ** open Prelude,Predef in {
resource MorphoPes = ParamX ** open Prelude,Predef in {
flags optimize=all ;
coding = utf8;
----2 Nouns
---- Orthography
oper
-- Zero-width non-joiner, used for certain morphemes
-- See https://en.wikipedia.org/wiki/Persian_alphabet#Word_boundaries
ZWNJ : Str = "" ;
zwnj : Str -> Str -> Str = \s1,s2 -> s1 + ZWNJ + s2 ;
mkN : (x1,x2 : Str) -> Animacy -> Noun =
\sg,pl,ani -> {
s = table {
bEzafa => table { Sg => sg ;
Pl => pl
} ;
aEzafa => table { Sg => mkEzafa sg ;
Pl => mkEzafa pl
} ;
enClic => table { Sg => mkEnclic sg ;
Pl => mkEnclic pl
}
};
animacy = ani ;
definitness = True
} ;
-- kasre : Str = "ِ" ; -- To enable vowels for TTS input
-- fatha : Str = "َ" ;
kasre,fatha : Str = [] ;
---- Nouns
param
Animacy = Animate | Inanimate ;
Mod = Bare | Ezafe | Clitic | Poss ;
Agr = Ag Number Person ;
CmpdStatus = IsCmpd | NotCmpd ;
------------------------------------------
-- Agreement transformations
-----------------------------------------
oper
toAgr : Number -> Person -> Agr = \n,p -> Ag n p ;
fromAgr : Agr -> {n : Number ; p : Person } = \agr -> case agr of {
Ag n p => {n = n ; p = p}
} ;
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
let a = fromAgr a0 ; b = fromAgr b0
in toAgr (conjNumber a.n b.n) b.p ;
giveNumber : Agr -> Number = \a -> case a of {
Ag n _ => n
} ;
defaultAgr : Agr = agrP3 Sg ;
agrP3 : Number -> Agr = \n -> Ag n P3 ;
agrP1 : Number -> Agr = \n -> Ag n P1 ;
-------------------------
-- Ezafe construction
------------------------
oper
mkPossStem : Str -> Str = \str ->
case str of {
_ + ("اه"|"او"|"وه")
=> str + fatha ;
_ + ("ا"|"و") => str + fatha + "ی" ;
_ + "ه" => zwnj str "ا" ;
_ => str + fatha } ;
mkEzafe : Str -> Str = \str ->
case str of {
st + "اه" => str + kasre ;
st + "وه" => str + kasre ;
st + "ه" => zwnj str "ی" ;-- alt. st + "ۀ" ;
st + "او" => str + kasre ;
st + "وو" => str + kasre ;
st + "و" => str + "ی" ;
st + "ا" => str + "ی" ;
_ => str + kasre
};
mkEnclic : Str -> Str ;
mkEnclic str = case str of {
st + ("ا"|"و") => zwnj str "یی" ; -- ی after a long vowel to help pronunciation
st + "اه" => str + "ی" ; -- here ه is a consonant, so single ی
st + ("ی"|"ه") => zwnj str "ای" ; -- after ی or ه as a vowel, add an alif to help pronunciation
_ => str + "ی" -- any other case: just a single ی
} ;
modTable : Str -> Mod => Str = \str ->
table {Bare => str ;
Ezafe => mkEzafe str ;
Clitic => mkEnclic str ;
Poss => mkPossStem str } ;
Noun = {
s : Number => Mod => Str ;
animacy : Animacy ;
isCmpd : CmpdStatus -- Affects possession: awkward to use poss. suff. with compound nouns
} ;
mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> indeclN sg ** {
s = table {Sg => modTable sg ; Pl => modTable pl}
} ;
indeclN : Str -> Noun = \s -> {
s = \\_,_ => s ;
animacy = Inanimate ; isCmpd = NotCmpd
} ;
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
-- Arabic nouns ends with h. also taken as Masc
------------------------------------------------------------------
----Verbs
------------------------------------------------------------------
{-
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
let root1 = (tk 1 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
--1. Basic stem form, direct & indirect causatives exists
-- v1 nechna nechaana nechwana
mkVerb1 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 3 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
mkVerb2 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 2 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
mkCmnVF : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
{s = (mkCmnVF1 root1 root2 t a p n).s ;
};
mkCmnVF1 : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
{s = let khordh = root1 + "ه";
mekhor = "می" ++ root2 ;
mekhord = "می" ++ root1 ;
mekhordh = "می" ++ khordh ;
khah = "خواه" ;
mekhah = "می" ++ khah ;
bvdh = "بوده"
in
case <t,a,p,n> of {
<PPresent,PPerf,PPers1,Sg> => khordh ++ "ام" ;
<PPresent,PPerf,PPers1,Pl> => khordh ++ "ایم" ;
<PPresent,PPerf,PPers2,Sg> => khordh ++ "ای" ;
<PPresent,PPerf,PPers2,Pl> => khordh ++ "اید" ;
<PPresent,PPerf,PPers3,Sg> => khordh ++ "است" ;
<PPresent,PPerf,PPers3,Pl> => khordh ++ "اند" ;
<PPresent,PImperf,PPers1,Sg> => mekhor + "م" ; -- toHave need to have khor instead of mekhor
<PPresent,PImperf,PPers1,Pl> => mekhor + "یم" ;
<PPresent,PImperf,PPers2,Sg> => mekhor + "ی" ;
<PPresent,PImperf,PPers2,Pl> => mekhor + "ید" ;
<PPresent,PImperf,PPers3,Sg> => mekhor + "د" ;
<PPresent,PImperf,PPers3,Pl> => mekhor + "ند" ;
<PPresent,Aorist,PPers1,Sg> => "" ;
<PPresent,Aorist,PPers1,Pl> => "" ;
<PPresent,Aorist,PPers2,Sg> => "" ;
<PPresent,Aorist,PPers2,Pl> => "" ;
<PPresent,Aorist,PPers3,Sg> => "" ;
<PPresent,Aorist,PPers3,Pl> => "" ;
<PPast,PPerf,PPers1,Sg> => khordh ++ "بودم" ;
<PPast,PPerf,PPers1,Pl> => khordh ++ "بودیم" ;
<PPast,PPerf,PPers2,Sg> => khordh ++ "بودی" ;
<PPast,PPerf,PPers2,Pl> => khordh ++ "بودید" ;
<PPast,PPerf,PPers3,Sg> => khordh ++ "بود" ;
<PPast,PPerf,PPers3,Pl> => khordh ++ "بودند" ;
<PPast,PImperf,PPers1,Sg> => mekhord + "م" ; -- toHave need to have khor instead of mekhor
<PPast,PImperf,PPers1,Pl> => mekhord + "یم" ;
<PPast,PImperf,PPers2,Sg> => mekhord + "ی";
<PPast,PImperf,PPers2,Pl> => mekhord + "ید" ;
<PPast,PImperf,PPers3,Sg> => mekhord ;
<PPast,PImperf,PPers3,Pl> => mekhord + "ند" ;
<PPast,Aorist,PPers1,Sg> => root1 + "م" ;
<PPast,Aorist,PPers1,Pl> => root1 + "یم" ;
<PPast,Aorist,PPers2,Sg> => root1 + "ی";
<PPast,Aorist,PPers2,Pl> => root1 + "ید" ;
<PPast,Aorist,PPers3,Sg> => root1 ;
<PPast,Aorist,PPers3,Pl> => root1 + "ند" ;
-- check this one
<PFut,PPerf,PPers1,Sg> => "" ;
<PFut,PPerf,PPers1,Pl> => "" ;
<PFut,PPerf,PPers2,Sg> => "" ;
<PFut,PPerf,PPers2,Pl> => "" ;
<PFut,PPerf,PPers3,Sg> => "" ;
<PFut,PPerf,PPers3,Pl> => "" ;
<PFut,PImperf,PPers1,Sg> => mekhah + "م" ++ addBh root2 + "م" ;
<PFut,PImperf,PPers1,Pl> => mekhah + "یم" ++ addBh root2 + "یم" ;
<PFut,PImperf,PPers2,Sg> => mekhah + "ی" ++ addBh root2 + "ی" ;
<PFut,PImperf,PPers2,Pl> => mekhah + "ید" ++ addBh root2 + "ید" ;
<PFut,PImperf,PPers3,Sg> => mekhah + "د" ++ addBh root2 + "د" ;
<PFut,PImperf,PPers3,Pl> => mekhah + "ند" ++ addBh root2 + "ند" ;
<PFut,Aorist,PPers1,Sg> => khah + "م" ++ root1 ;
<PFut,Aorist,PPers1,Pl> => khah + "یم" ++ root1 ;
<PFut,Aorist,PPers2,Sg> => khah + "ی" ++ root1 ;
<PFut,Aorist,PPers2,Pl> => khah + "ید" ++ root1 ;
<PFut,Aorist,PPers3,Sg> => khah + "د" ++ root1 ;
<PFut,Aorist,PPers3,Pl> => khah + "ند" ++ root1 ;
<Infr_Past,PPerf,PPers1,Sg> => khordh ++ bvdh ++ "ام" ;
<Infr_Past,PPerf,PPers1,Pl> => khordh ++ bvdh ++ "ایم" ;
<Infr_Past,PPerf,PPers2,Sg> => khordh ++ bvdh ++ "ای" ;
<Infr_Past,PPerf,PPers2,Pl> => khordh ++ bvdh ++ "اید" ;
<Infr_Past,PPerf,PPers3,Sg> => khordh ++ bvdh ++ "است" ;
<Infr_Past,PPerf,PPers3,Pl> => khordh ++ bvdh ++ "اند" ;
<Infr_Past,PImperf,PPers1,Sg> => mekhordh ++ "ام" ; -- toHave need to have khordh instead of mekhor
<Infr_Past,PImperf,PPers1,Pl> => mekhordh ++ "ایم" ;
<Infr_Past,PImperf,PPers2,Sg> => mekhordh ++ "ای" ;
<Infr_Past,PImperf,PPers2,Pl> => mekhordh ++ "اید" ;
<Infr_Past,PImperf,PPers3,Sg> => mekhordh ++ "است" ;
<Infr_Past,PImperf,PPers3,Pl> => mekhordh ++ "اند" ;
-- check this one
<Infr_Past,Aorist,PPers1,Sg> => "" ;
<Infr_Past,Aorist,PPers1,Pl> => "" ;
<Infr_Past,Aorist,PPers2,Sg> => "" ;
<Infr_Past,Aorist,PPers2,Pl> => "" ;
<Infr_Past,Aorist,PPers3,Sg> => "" ;
<Infr_Past,Aorist,PPers3,Pl> => ""
}
} ;
-}
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
let root1 = (tk 1 inf) ;
impRoot = mkimpRoot root2;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "ید" ;
Imp Neg Sg => "ن" + impRoot ;
Imp Neg Pl => "ن" + impRoot + "ید" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
} ;
mkVerb1 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 3 inf) ;
impRoot = mkimpRoot root2 ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "ید" ;
Imp Neg Sg => "ن" + impRoot ;
Imp Neg Pl => "ن" + impRoot + "ید" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
};
mkVerb2 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 2 inf) ;
impRoot = mkimpRoot root2 ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "ید" ;
Imp Neg Sg => "ن" + impRoot ;
Imp Neg Pl => "ن" + impRoot + "ید" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
} ;
mkHave : Verb =
{
s = table {
Root1 => "داشت" ;
Root2 => "دار" ;
Inf => "داشتن" ;
Imp Pos Sg => ["داشته باش"] ;
Imp Pos Pl => ["داشته باشید"];
Imp Neg Sg => ["نداشته باش"] ;
Imp Neg Pl => ["نداشته باشید"] ;
VF pol tense person number => (toHave pol tense number person).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes Sg PPers1) => ["داشته باشم"] ;
Vvform (AgPes Sg PPers2) => ["داشته باشی"] ;
Vvform (AgPes Sg PPers3) => ["داشته باشد"] ;
Vvform (AgPes Pl PPers1) => ["داشته باشیم"] ;
Vvform (AgPes Pl PPers2) => ["داشته باشید"] ;
Vvform (AgPes Pl PPers3) => ["داشته باشند"]
}
} ;
mkCmnVF : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
{s = (mkCmnVF1 root1 root2 pol t p n).s ;
};
mkCmnVF1 : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
{s = let khordh = root1 + "ه";
nkhordh = (addN root1) + "ه" ;
mekhor = "می" ++ root2 ;
nmekhor = "نمی" ++ root2 ;
mekhord = "می" ++ root1 ;
nmekhord = "نمی" ++ root1 ;
mekhordh = "می" ++ khordh ;
nmekhordh = "نمی" ++ khordh ;
khah = "خواه" ;
nkhah = "نخواه" ;
mekhah = "می" ++ khah ;
nmekhah = "نمی" ++ khah ;
bvdh = "بوده"
in
case <pol,t,p,n> of {
<Pos,PPresent2 PrPerf,PPers1,Sg> => khordh ++ "ام" ;
<Pos,PPresent2 PrPerf,PPers1,Pl> => khordh ++ "ایم" ;
<Pos,PPresent2 PrPerf,PPers2,Sg> => khordh ++ "ای" ;
<Pos,PPresent2 PrPerf,PPers2,Pl> => khordh ++ "اید" ;
<Pos,PPresent2 PrPerf,PPers3,Sg> => khordh ++ "است" ;
<Pos,PPresent2 PrPerf,PPers3,Pl> => khordh ++ "اند" ;
<Pos,PPresent2 PrImperf,PPers1,Sg> => mekhor + "م" ;
<Pos,PPresent2 PrImperf,PPers1,Pl> => mekhor + "یم" ;
<Pos,PPresent2 PrImperf,PPers2,Sg> => mekhor + "ی" ;
<Pos,PPresent2 PrImperf,PPers2,Pl> => mekhor + "ید" ;
<Pos,PPresent2 PrImperf,PPers3,Sg> => mekhor + "د" ;
<Pos,PPresent2 PrImperf,PPers3,Pl> => mekhor + "ند" ;
<Pos,PPast2 PstPerf,PPers1,Sg> => khordh ++ "بودم" ;
<Pos,PPast2 PstPerf,PPers1,Pl> => khordh ++ "بودیم" ;
<Pos,PPast2 PstPerf,PPers2,Sg> => khordh ++ "بودی" ;
<Pos,PPast2 PstPerf,PPers2,Pl> => khordh ++ "بودید" ;
<Pos,PPast2 PstPerf,PPers3,Sg> => khordh ++ "بود" ;
<Pos,PPast2 PstPerf,PPers3,Pl> => khordh ++ "بودند" ;
<Pos,PPast2 PstImperf,PPers1,Sg> => mekhord + "م" ;
<Pos,PPast2 PstImperf,PPers1,Pl> => mekhord + "یم" ;
<Pos,PPast2 PstImperf,PPers2,Sg> => mekhord + "ی";
<Pos,PPast2 PstImperf,PPers2,Pl> => mekhord + "ید" ;
<Pos,PPast2 PstImperf,PPers3,Sg> => mekhord ;
<Pos,PPast2 PstImperf,PPers3,Pl> => mekhord + "ند" ;
<Pos,PPast2 PstAorist,PPers1,Sg> => root1 + "م" ;
<Pos,PPast2 PstAorist,PPers1,Pl> => root1 + "یم" ;
<Pos,PPast2 PstAorist,PPers2,Sg> => root1 + "ی";
<Pos,PPast2 PstAorist,PPers2,Pl> => root1 + "ید" ;
<Pos,PPast2 PstAorist,PPers3,Sg> => root1 ;
<Pos,PPast2 PstAorist,PPers3,Pl> => root1 + "ند" ;
{-
<Pos,PFut2 FtImperf,PPers1,Sg> => mekhah + "م" ++ addBh root2 + "م" ;
<Pos,PFut2 FtImperf,PPers1,Pl> => mekhah + "یم" ++ addBh root2 + "یم" ;
<Pos,PFut2 FtImperf,PPers2,Sg> => mekhah + "ی" ++ addBh root2 + "ی" ;
<Pos,PFut2 FtImperf,PPers2,Pl> => mekhah + "ید" ++ addBh root2 + "ید" ;
<Pos,PFut2 FtImperf,PPers3,Sg> => mekhah + "د" ++ addBh root2 + "د" ;
<Pos,PFut2 FtImperf,PPers3,Pl> => mekhah + "ند" ++ addBh root2 + "ند" ;
-}
<Pos,PFut2 FtAorist,PPers1,Sg> => khah + "م" ++ root1 ;
<Pos,PFut2 FtAorist,PPers1,Pl> => khah + "یم" ++ root1 ;
<Pos,PFut2 Ftorist,PPers2,Sg> => khah + "ی" ++ root1 ;
<Pos,PFut2 FtAorist,PPers2,Pl> => khah + "ید" ++ root1 ;
<Pos,PFut2 FtAorist,PPers3,Sg> => khah + "د" ++ root1 ;
<Pos,PFut2 FtAorist,PPers3,Pl> => khah + "ند" ++ root1 ;
<Pos,Infr_Past2 InfrPerf,PPers1,Sg> => khordh ++ bvdh ++ "ام" ;
<Pos,Infr_Past2 InfrPerf,PPers1,Pl> => khordh ++ bvdh ++ "ایم" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Sg> => khordh ++ bvdh ++ "ای" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Pl> => khordh ++ bvdh ++ "اید" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Sg> => khordh ++ bvdh ++ "است" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Pl> => khordh ++ bvdh ++ "اند" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Sg> => mekhordh ++ "ام" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Pl> => mekhordh ++ "ایم" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Sg> => mekhordh ++ "ای" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Pl> => mekhordh ++ "اید" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Sg> => mekhordh ++ "است" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Pl> => mekhordh ++ "اند" ;
-- negatives
<Neg,PPresent2 PrPerf,PPers1,Sg> => addN khordh ++ "ام" ;
<Neg,PPresent2 PrPerf,PPers1,Pl> => addN khordh ++ "ایم" ;
<Neg,PPresent2 PrPerf,PPers2,Sg> => addN khordh ++ "ای" ;
<Neg,PPresent2 PrPerf,PPers2,Pl> => addN khordh ++ "اید" ;
<Neg,PPresent2 PrPerf,PPers3,Sg> => addN khordh ++ "است" ;
<Neg,PPresent2 PrPerf,PPers3,Pl> => addN khordh ++ "اند" ;
<Neg,PPresent2 PrImperf,PPers1,Sg> => nmekhor + "م" ;
<Neg,PPresent2 PrImperf,PPers1,Pl> => nmekhor + "یم" ;
<Neg,PPresent2 PrImperf,PPers2,Sg> => nmekhor + "ی" ;
<Neg,PPresent2 PrImperf,PPers2,Pl> => nmekhor + "ید" ;
<Neg,PPresent2 PrImperf,PPers3,Sg> => nmekhor + "د" ;
<Neg,PPresent2 PrImperf,PPers3,Pl> => nmekhor + "ند" ;
<Neg,PPast2 PstPerf,PPers1,Sg> => nkhordh ++ "بودم" ;
<Neg,PPast2 PstPerf,PPers1,Pl> => nkhordh ++ "بودیم" ;
<Neg,PPast2 PstPerf,PPers2,Sg> => nkhordh ++ "بودی" ;
<Neg,PPast2 PstPerf,PPers2,Pl> => nkhordh ++ "بودید" ;
<Neg,PPast2 PstPerf,PPers3,Sg> => nkhordh ++ "بود" ;
<Neg,PPast2 PstPerf,PPers3,Pl> => nkhordh ++ "بودند" ;
<Neg,PPast2 PstImperf,PPers1,Sg> => nmekhord + "م" ;
<Neg,PPast2 PstImperf,PPers1,Pl> => nmekhord + "یم" ;
<Neg,PPast2 PstImperf,PPers2,Sg> => nmekhord + "ی";
<Neg,PPast2 PstImperf,PPers2,Pl> => nmekhord + "ید" ;
<Neg,PPast2 PstImperf,PPers3,Sg> => nmekhord ;
<Neg,PPast2 PstImperf,PPers3,Pl> => nmekhord + "ند" ;
<Neg,PPast2 PstAorist,PPers1,Sg> => addN root1 + "م" ;
<Neg,PPast2 PstAorist,PPers1,Pl> => addN root1 + "یم" ;
<Neg,PPast2 PstAorist,PPers2,Sg> => addN root1 + "ی";
<Neg,PPast2 PstAorist,PPers2,Pl> => addN root1 + "ید" ;
<Neg,PPast2 PstAorist,PPers3,Sg> => addN root1 ;
<Neg,PPast2 PstAorist,PPers3,Pl> => addN root1 + "ند" ;
{-
<Neg,PFut2 FtImperf,PPers1,Sg> => nmekhah + "م" ++ addBh root2 + "م" ;
<Neg,PFut2 FtImperf,PPers1,Pl> => nmekhah + "یم" ++ addBh root2 + "یم" ;
<Neg,PFut2 FtImperf,PPers2,Sg> => nmekhah + "ی" ++ addBh root2 + "ی" ;
<Neg,PFut2 FtImperf,PPers2,Pl> => nmekhah + "ید" ++ addBh root2 + "ید" ;
<Neg,PFut2 FtImperf,PPers3,Sg> => nmekhah + "د" ++ addBh root2 + "د" ;
<Neg,PFut2 FtImperf,PPers3,Pl> => nmekhah + "ند" ++ addBh root2 + "ند" ;
-}
<Neg,PFut2 FtAorist,PPers1,Sg> => nkhah + "م" ++ root1 ;
<Neg,PFut2 FtAorist,PPers1,Pl> => nkhah + "یم" ++ root1 ;
<Neg,PFut2 Ftorist,PPers2,Sg> => nkhah + "ی" ++ root1 ;
<Neg,PFut2 FtAorist,PPers2,Pl> => nkhah + "ید" ++ root1 ;
<Neg,PFut2 FtAorist,PPers3,Sg> => nkhah + "د" ++ root1 ;
<Neg,PFut2 FtAorist,PPers3,Pl> => nkhah + "ند" ++ root1 ;
<Neg,Infr_Past2 InfrPerf,PPers1,Sg> => nkhordh ++ bvdh ++ "ام" ;
<Neg,Infr_Past2 InfrPerf,PPers1,Pl> => nkhordh ++ bvdh ++ "ایم" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Sg> => nkhordh ++ bvdh ++ "ای" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Pl> => nkhordh ++ bvdh ++ "اید" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Sg> => nkhordh ++ bvdh ++ "است" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Pl> => nkhordh ++ bvdh ++ "اند" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Sg> => nmekhordh ++ "ام" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Pl> => nmekhordh ++ "ایم" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Sg> => nmekhordh ++ "ای" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Pl> => nmekhordh ++ "اید" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Sg> => nmekhordh ++ "است" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Pl> => nmekhordh ++ "اند"
}
} ;
mkvVform : Str -> Number -> PPerson -> {s: Str} = \root2,n,p ->
{s =
case <n,p> of {
<Sg,PPers1> => addBh root2 + "م" ;
<Sg,PPers2> => addBh root2 + "ی" ;
<Sg,PPers3> => addBh root2 + "د" ;
<Pl,PPers1> => addBh root2 + "یم" ;
<Pl,PPers2> => addBh root2 + "ید" ;
<Pl,PPers3> => addBh root2 + "ند"
}
};
mkimpRoot : Str -> Str ;
mkimpRoot root =
case root of {
st + "ی" => st ;
_ => root
};
addBh : Str -> Str ;
addBh str =
case (take 1 str) of {
"ا" => "بی" + str ;
"آ" => "بیا" + (drop 1 str) ;
_ => "ب" + str
};
---------------------
--Determiners
--------------------
BaseQuant : Type = {
mod : Mod } ;
makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; fromPron : Bool} =\str,n,b -> {
s = str;
Determiner : Type = BaseQuant ** {
s : Str ;
sp : Str ; -- stand-alone form for DetNP and possessive pronouns with compound nouns
n : Number ;
isNum : Bool
} ;
Quant : Type = BaseQuant ** {
s : Number => CmpdStatus => Str} ;
makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> {
s,sp = str;
isNum = b;
fromPron = False ;
mod = Bare ;
n = n
};
makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; fromPron : Bool } = \sg,pl -> {
s = table {Sg => sg ; Pl => pl} ;
fromPron = False ;
a = agrPesP3 Sg
makeQuant : Str -> Str -> Quant = \sg,pl -> {
s = table {Sg => \\_ => sg ; Pl => \\_ => pl} ;
mod = Bare ;
};
---------------------------
-- Adjectives
--------------------------
Adjective : Type = {
s : Mod => Str ;
adv : Str ;
isPre : Bool
} ;
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
s = table { bEzafa => adj;
aEzafa => mkEzafa adj ;
enClic => mkEnclic adj
s = table { Bare => adj;
Ezafe => mkEzafe adj ;
Clitic => mkEnclic adj ;
Poss => mkPossStem adj
} ;
adv = adv
adv = adv ; isPre = False
};
------------------------------------------------------------------
-- Verbs
------------------------------------------------------------------
param
VerbForm = Inf -- kardan
| PastStem -- kard -- Also used for future stem
| PresStem -- kon -- Also imperative stem
| PerfStem -- kardeh -- Perfect, pluperfect
| PastPart -- konandeh
| ImpPrefix Polarity -- mi/nmi, except for be and have
| VAor Polarity Agr -- konam
| VPerf Polarity Agr -- kardeh am/nkardeh am
| VPast Polarity Agr -- kardam/nkardam
| VSubj Polarity Agr -- bekonam/nakonam
| VImp Polarity Number -- bekon,bekonid/nakon,nakonid
;
oper
impRoot : Str -> Str = \root -> case root of {
st + "ی" => st ;
_ => root
};
mkVerb : (inf,pres : Str) -> Verb = \kardan,kon -> {
s = table {
Inf => kardan ;
PastStem => kard ;
PresStem => kon ;
PerfStem => kardeh ;
PastPart => kon + "نده" ;
ImpPrefix Pos => "می" + ZWNJ ++ BIND ;
ImpPrefix Neg => "نمی" + ZWNJ ++ BIND ;
VAor _ agr => imperfectSuffixD agr kon ; -- for reg verbs, negation comes from prefix
VPerf pol agr => perfectSuffix agr (addN pol kardeh) ;
VPast pol agr => imperfectSuffix agr (addN pol kard) ;
VSubj Pos agr => addBh (imperfectSuffixD agr kon) ;
VSubj Neg agr => addN (imperfectSuffixD agr kon) ;
VImp Pos Sg => addBh imp ;
VImp Pos Pl => addBh imp + "ید" ;
VImp Neg Sg => addN imp ;
VImp Neg Pl => addN imp + "ید" } ;
prefix = [] -- For compound verbs
} where {
kard = tk 1 kardan ;
kardeh = kard + "ه" ;
imp = impRoot kon ;
} ;
invarV : (inv : Str) -> Verb = \s -> -- truly invariable
let invReg = defectiveVerb s s s in invReg **
{s = table {ImpPrefix p => invReg.s ! ImpPrefix p ; _ => s}} ;
defectiveVerb : (inf,pres,past : Str) -> Verb = \bayestan,bayad,bayest ->
let invReg = mkVerb bayestan bayad in invReg **
{s = \\vf => case vf of {
ImpPrefix _ => [] ;
VAor pol _ => addN pol bayad ;
VImp pol _ => addN pol bayad ;
VSubj pol _ => addN pol bayad ;
VPast pol _ => addN pol bayest ;
VPerf pol _ => addN pol bayest ;
_ => invReg.s ! vf }
} ;
--
oper
Verb = {s : VerbForm => Str ; prefix : Str} ;
-- Verbs that end in یدن, ادن or ودن
-- Also some verbs that don't: دانستن with stem دان
mkVerb1 : (_: Str) -> Verb = \inf -> mkVerb inf (tk 3 inf) ;
-- Most verbs that end in C+تن or C+دن
mkVerb2 : (_: Str) -> Verb = \inf -> mkVerb inf (tk 2 inf) ;
-------------------
-- making negatives
-------------------
addN = overload {
addN : Str -> Str = addN' ;
addN : Polarity -> Str -> Str = \p,s ->
case p of {Pos => s ; Neg => addN' s}
} ;
addN' : Str -> Str = \str ->
case str of {
"ا" + st => "نی" + str ;
"آ" + st => "نیا" + st ;
_ => "ن" + str } ;
addBh : Str -> Str ;
addBh str =
case str of {
"ا" + st => "بی" + str ;
"آ" + st => "بیا" + st ;
_ => "ب" + str
};
-- TODO: is this needed anywhere? what does it do? /IL
addBh2 : Str -> Str ; -- should use drop instead but it gives linking error
addBh2 str1 =
case str1 of {
"می" + str =>
case str of {
"ا" + st => Prelude.glue "بی" str ;
"آ" + st => Prelude.glue "بیا" st ;
_ => Prelude.glue "ب" str
};
_ => "" -- ????
};
-------------------
-- Common suffixes
-------------------
imperfectSuffix : Agr -> Str -> Str = \ag,s -> s +
case ag of {
Ag Sg P1 => "م" ;
Ag Sg P2 => "ی" ;
Ag Sg P3 => [] ;
Ag Pl P1 => "یم" ;
Ag Pl P2 => "ید" ;
Ag Pl P3 => "ند" } ;
imperfectSuffixD : Agr -> Str -> Str = \ag,s ->
case ag of {
Ag Sg P3 => s + "د" ;
_ => imperfectSuffix ag s } ;
perfectSuffix : Agr -> Str -> Str = \ag,s ->
case ag of {
Ag Sg P1 => zwnj s "ام" ;
Ag Sg P2 => zwnj s "ای" ;
Ag Sg P3 => s ++ "است" ; -- no ZWNJ
Ag Pl P1 => zwnj s "ایم" ;
Ag Pl P2 => zwnj s "اید" ;
Ag Pl P3 => zwnj s "اند" } ;
pluperfAux : Polarity -> Agr -> Str = \pol,agr ->
addN pol (imperfectSuffix agr "بود") ;
futAux : Polarity -> Agr -> Str = \pol,agr ->
addN pol (imperfectSuffixD agr "خواه") ;
subjAux : Polarity -> Agr -> Str = \pol,agr ->
addN pol (imperfectSuffixD agr "باش") ;
----------------------------------
-- Irregular verbs
----------------------------------
haveVerb : Verb = haveRegV ** {s = table {
ImpPrefix _ => [] ;
vf => haveRegV.s ! vf }
} where { haveRegV = mkVerb "داشتن" "دار" } ;
beVerb : Verb = beRegV ** {s = table {
ImpPrefix _ => [] ;
VAor Pos (Ag Sg P3) => "است" ;
VAor Pos agr => imperfectSuffix agr "هست" ;
VAor Neg agr => imperfectSuffix agr "نیست" ;
VSubj pol agr => addN pol (imperfectSuffixD agr "باش") ;
VImp Pos Sg => "باش" ;
VImp Pos Pl => "باشید" ;
VImp Neg Sg => "نباش" ;
VImp Neg Pl => "نباشید" ;
vf => beRegV.s ! vf }
} where { beRegV = mkVerb "بودن" "باش" } ;
}

View File

@@ -3,138 +3,147 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
flags optimize=all_subs ;
lin
DetCN det cn = {
s = \\_ => case <det.isNum,det.fromPron> of {
<False,True> => cn.s ! aEzafa ! det.n ++ det.s ; -- det.n ;
<False,False> => det.s ++ cn.s ! bEzafa ! det.n ; -- det.n ;
<True,True> => cn.s ! aEzafa ! Sg ++ det.s ;
<True,False> => det.s ++ cn.s ! bEzafa ! Sg
};
a = agrPesP3 det.n ;
animacy = cn.animacy
DetCN det cn = emptyNP ** cn ** {
s = \\m =>
let num : Number = case det.isNum of {
True => Sg ; -- noun modified by a number is invariably singular
False => det.n } ;
mod : Mod = case <cn.isCmpd,det.mod> of {
<IsCmpd,Poss> => Ezafe ; -- If CN is compound and Det is poss.pron, don't use poss.suff but Ezafe and full form of pronoun
_ => det.mod } ;
detStr : Str = case cn.isCmpd of {
NotCmpd => det.s ; -- possessive suffix
IsCmpd => det.sp } ; -- full form
in case mod of {
Bare => detStr ++ cn.s ! num ! m ++ cn.compl ! det.n ; -- det doesn't require a special form, keep the Mod=>Str table
x => cn.s ! num ! x ++ detStr ++ cn.compl ! det.n } ; -- det requires a special form
a = agrP3 det.n
} ;
UsePN pn = {s = \\_ => pn.s ; a = agrPesP3 Sg ; animacy = pn.animacy } ;
UsePron p = {s = \\_ => p.s ; a = p.a ; animacy = Animate} ;
UsePN pn = emptyNP ** pn ** {s = \\_ => pn.s} ;
UsePron p = emptyNP ** p ** {s = \\_ => p.s ; animacy = Animate} ;
PredetNP pred np = {
s = \\ez => pred.s ++ np.s ! ez ;
a = np.a;
animacy = np.animacy
PredetNP pred np = np ** {
s = \\ez => pred.s ++ np.s ! ez
} ;
PPartNP np v2 = {
s = \\ez => np.s ! ez ++ partNP (v2.s ! Root1) ;
a = np.a ;
animacy = np.animacy
PPartNP np v2 = np ** {
s = \\ez => np.s ! ez ++ partNP v2
} ;
RelNP np rs = {
s = \\ez => np.s ! ez ++ rs.s ! np.a ;
a = np.a ;
animacy = np.animacy
RelNP np rs = np ** {
s = \\m => case np.relpron of {
Ance => np.empty ++ rs2str np.relpron np.a rs ;
Ke => np.s ! Clitic ++ rs2str np.relpron np.a rs }
} ;
AdvNP np adv = {
s = \\ez => np.s ! NPC aEzafa ++ adv.s ;
a = np.a ;
animacy = np.animacy
AdvNP np adv = np ** {
s = \\ez => np.s ! Ezafe ++ adv.s
} ;
DetQuantOrd quant num ord = {
s = quant.s ! num.n ++ num.s ++ ord.s ;
isNum = True;
fromPron = quant.fromPron ;
s = quant.s ! num.n ! NotCmpd ++ num.s ++ ord.s ;
sp = quant.s ! num.n ! IsCmpd ++ num.s ++ ord.s ; -- only matters for PossPron
isNum = orB num.isNum ord.isNum ;
mod = quant.mod ;
n = num.n
} ;
DetQuant quant num = {
s = quant.s ! num.n ++ num.s;
isNum = True ; -- this does not work in case of 'these women' but works in case of 'five women'
fromPron = quant.fromPron ;
s = quant.s ! num.n ! NotCmpd ++ num.s ;
sp = quant.s ! num.n ! IsCmpd ++ num.s ; -- only matters for PossPron
isNum = num.isNum;
mod = quant.mod ;
n = num.n
} ;
DetNP det = {
s = \\_ => det.s ; ---- case
a = agrPesP3 det.n ;
animacy = Inanimate
DetNP det = emptyNP ** {
s = \\_ => det.sp ;
a = agrP3 det.n ;
hasAdj = False ;
animacy = Inanimate ;
relpron = Ance -- TODO check if this works for all Dets
} ;
PossPron p = {s = \\_ => p.ps ; a = p.a ; fromPron = True} ;
PossPron p = {
s = \\_ => table {
NotCmpd => BIND ++ p.ps ;
IsCmpd => p.s } ; -- is a compound
a = p.a ;
mod = Poss} ; -- is changed into Ezafe in DetCN, if the CN is compound
NumSg = {s = [] ; n = Sg} ;
NumPl = {s = [] ; n = Pl} ;
NumSg = {s = [] ; n = Sg ; isNum = False} ;
NumPl = {s = [] ; n = Pl ; isNum = False} ;
-- from here
NumCard n = n ** {hasCard = True} ;
NumCard n = n ** {isNum = True} ;
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
OrdDigits n = {s = n.s ! NOrd; n = n.n} ;
NumDigits n = n ** {s = n.s ! NCard; isNum = True} ;
OrdDigits n = n ** {s = n.s ! NOrd ; isNum = True ; isPre=False} ;
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
OrdNumeral numeral = {s = numeral.s ! NOrd ; n = numeral.n} ;
NumNumeral n = n ** {s = n.s ! NCard; isNum = True} ;
OrdNumeral n = n ** {s = n.s ! NOrd ; isNum = True ; isPre=False} ;
-- to here
AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
AdNum adn num = num ** {s = adn.s ++ num.s} ;
OrdSuperl a = {s = a.s ! bEzafa ++ taryn; n = Sg} ; -- check the form of adjective
OrdSuperl a = {s = a.s ! Bare ++ taryn; n = Sg ; isNum=False ; isPre = True} ; -- check the form of adjective
DefArt = {s = \\_ => [] ; a = defaultAgrPes ; fromPron = False} ;
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgrPes ; fromPron = False} ;
DefArt = {s = \\_,_ => [] ; mod = Bare} ;
IndefArt = {s = table {Sg => \\_ => IndefArticle ; Pl => \\_ => []} ; mod = Bare} ;
MassNP cn = {s =\\c => case c of {
NPC bEzafa => cn.s ! bEzafa ! Sg ;
NPC aEzafa => cn.s ! aEzafa ! Sg ;
NPC enClic => cn.s ! enClic ! Sg
};
a = agrPesP3 Sg ;
animacy = cn.animacy
MassNP cn = emptyNP ** cn ** {
s = \\m => cn.s ! Sg ! m ++ cn.compl ! Sg ;
a = agrP3 Sg ;
} ;
UseN n = n ;
UseN2 n = n ;
UseN,
UseN2 = useN ;
Use2N3 f = {
s = f.s;
c = f.c2;
animacy = f.animacy;
definitness = True
Use2N3 n3 = useN n3 ** {
c2 = n3.c2 ;
compl = []
} ;
Use3N3 f = {
s = f.s ;
c = f.c3;
animacy = f.animacy;
definitness = True
Use3N3 n3 = useN n3 ** {
c2 = n3.c3 ;
compl = []
} ;
ComplN2 f x = {
s = \\ez,n => f.s ! ez ! n ++ f.c ++ x.s ! NPC ez ;
animacy = f.animacy;
definitness = True
};
ComplN3 f x = {
s = \\ez,n => f.s ! ez ! n ++ f.c2 ++ x.s ! NPC ez ;
c = f.c3;
animacy = f.animacy;
definitness = True;
ComplN2 n2 np = n2 ** {
s = \\n,m => n2.s ! n ! Ezafe ;
compl = \\_ => n2.compl ++ n2.c2 ++ np2str np ;
hasAdj = False
};
AdjCN ap cn = {
s = \\ez,n => cn.s ! aEzafa ! n ++ ap.s ! ez; -- check the form of adjective and also cn.s!ez!n changed from cn.s!aEzafa!n to have correct enclicitic form other wise it creats wrong enclictic form of old man
animacy = cn.animacy ;
definitness = cn.definitness
ComplN3 n3 np = n3 ** {
s = \\n,m => n3.s ! n ! Ezafe ;
compl = n3.c2 ++ np2str np ;
c = n3.c3;
} ;
RelCN cn rs = {
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrPesP3 n ;
animacy = cn.animacy ;
definitness = cn.definitness
AdjCN ap cn = cn ** {
s = \\n,m => case ap.isPre of {
True => ap.s ! Bare ++ cn.s ! n ! m ; -- TODO check mod of ap
False => cn.s ! n ! Ezafe ++ ap.s ! m } ;
hasAdj = True
} ;
AdvCN cn ad = {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s ; animacy = cn.animacy ; definitness = cn.definitness} ;
RelCN cn rs = cn ** {
s = \\n,ez => cn.s ! n ! Clitic ;
compl = \\n => cn.compl ! n ++ rs2str Ke (agrP3 n) rs ;
} ;
SentCN cn sc = {s = \\ez,n => cn.s ! ez ! n ++ sc.s ; animacy = cn.animacy ; definitness = cn.definitness} ;
AdvCN cn ad = cn ** {
s = \\n,m => cn.s ! n ! Ezafe ;
compl = \\n => cn.compl ! n ++ ad.s} ;
ApposCN cn np = {s = \\ez,n => cn.s ! ez ! n ++ np.s ! NPC aEzafa ; animacy = cn.animacy ; definitness = True} ; -- ezafa form of city to be used
SentCN cn sc = cn ** {compl = \\n => cn.compl ! n ++ sc.s} ;
-- correct for /city Paris/, incorrect for /king John/
-- ApposNP in ExtendPes works for /king John/ (no ezafe).
ApposCN cn np = cn ** {s = \\n,m => cn.s ! n ! Ezafe ++ np.s ! m} ;
-- : CN -> NP -> CN ; -- house of Paris, house of mine
PossNP cn np = cn ** {
s = \\n,m => cn.s ! n ! Ezafe ; -- TODO or here for "<house of mine> <on the hill>"
compl = \\n => cn.compl ! n ++ np2str np } ; -- "<house> <on the hill of mine>"
}

View File

@@ -1,11 +1,12 @@
--# -path=.:../abstract:../../prelude:../common
--# -path=.:../abstract:../prelude:../common
--
----1 Pnbu Lexical Paradigms
----1 Persian Lexical Paradigms
resource ParadigmsPes = open
Predef,
Prelude,
MorphoPes,
ResPes,
(M=MorphoPes),
CatPes
in {
@@ -15,124 +16,176 @@ resource ParadigmsPes = open
--2 Parameters
oper
animate : Animacy ;
inanimate : Animacy ;
singular : Number;
plural : Number;
Animacy : Type ; -- Argument to mkN
human : Animacy ; -- e.g. /mkN "خواهر" human/ to get the plural خواهران.
nonhuman : Animacy ; -- default animacy for mkN, not needed unless you want to make the animacy explicit or force a plural with ها.
singular = Sg ; plural = Pl;
Number : Type ; -- Argument to mkDet and mkConj
singular : Number ; -- e.g. mkConj "یا" singular
plural : Number ; -- e.g. mkConj "و" plural
animate = Animate ; inanimate = Inanimate ; --i
mkN01 : Str -> Animacy -> Noun ;
mkN01 str ani = mkN str (str ++ "ها") ani;
mkN02 : Str -> Animacy -> Noun ;
mkN02 str ani = case (last str) of {
"ه" => mkN str ((init str) + "گان") ani ;
("ا"|"و") => mkN str (str + "یان") ani ;
_ => mkN str (str+"ان") ani
};
{-
VVForm : Type ; -- Argument to mkVV
subjunctive : VVForm ; -- The verbal complement of VV is in subjunctive
indicative : VVForm ; -- The verbal complement of VV is in indicative
Mod : Type ; -- Argument to mkDet and mkPrep
ezafe : Mod ; -- e.g. mkPrep "برای" ezafe
-- poss : Mod ; -- TODO is this needed?
--clitic : Mod ; -- TODO is this needed?
--2 Nouns
mkN : overload {
mkN : (sg : Str) -> N ; -- Takes singular form, returns a nonhuman noun with ها as the plural form.
mkN : (sg : Str) -> Animacy -> N ; -- Takes singular form and animacy. Nonhuman plural ها. Human plural ان or an allomorph of it (یان or گان) depending on the singular form.
mkN : (sg,pl : Str) -> Animacy -> N ; -- Worst-case constructor: takes singular, plural and animacy. Use for loanwords with Arabic plural, human plurals with ها and nonhuman plurals with ان or its allomorphs.
mkN : (possStem : Str) -> N -> N -- Noun with an unexpected possessive stem, e.g. مه where ه is a consonant, not vowel.
} ;
mkN2 : N -> Prep -> Str -> N2;
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
mkN2 : overload {
mkN2 : (key : N) -> (to : Str) -> N2 -- Takes a noun and a complementiser, returns a N2.
} ;
mkN3 : overload {
mkN3 : (distance : N) -> (from,to : Str) -> N3 -- Takes a noun and two complementisers, returns a N3.
} ;
mkN3 : N -> Prep -> Str -> Str-> N3 ;
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
-}
-- Compound Nouns
mkCmpdNoun1 : Str -> N -> N
= \s,noun -> {s =\\ez,n => s ++ noun.s ! ez ! n ; animacy = noun.animacy ; definitness = noun.definitness ; lock_N = <>};
mkCmpdNoun2 : N -> Str -> N
= \noun,s -> {s =\\ez,n => noun.s ! ez ! n ++ s ; animacy = noun.animacy ; definitness =noun.definitness ; lock_N = <>};
cmpdN = overload {
cmpdN : Str -> N -> N -- Compound noun with an invariable modifier /before/ the head. NB. no ezāfe.
= mkCmpdNoun1 ; -- e.g. تخم مرغ 'chicken /egg/'
cmpdN : N -> Str -> N -- Compound noun with an invariable modifier /after/ the head. NB. no ezāfe.
= mkCmpdNoun2 ; -- e.g. مأمور پلیس '/officer/ police'.
cmpdN : N -> N -> N -- Compound noun with ezafe (Nی N)
= \n1,n2 -> n1 ** {
s = \\n,m => n1.s ! n ! Ezafe ++ n2.s ! n ! m ;
isCmpd = IsCmpd} ;
} ;
-- Proper names
mkPN : Str -> Animacy -> PN =
mkPN : Str -> Animacy -> PN -- Proper noun with given animacy
= \str,ani -> lin PN {s = str ; animacy = ani} ;
\str,ani -> {s = str ; animacy = ani ; lock_PN = <>} ;
-- Personal Pronouns
personalPN : Str -> Number -> PPerson -> Pron =
\str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>};
{-
-- Demonstration Pronouns
demoPN : Str -> Str -> Str -> Quant =
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
-- Determiner
-}
mkDet = overload {
mkDet : Str -> Number -> Det =
\s1,n -> makeDet s1 n False ** { lock_Det = <>};
mkDet : Str -> Number -> Bool -> Det =
\s1,n,b -> makeDet s1 n b ** { lock_Det = <>};
mkDet : Str -> Number -> Det -- Takes a string, number (sg/pl) and returns a det which is not a numeral
= \s,n -> lin Det (makeDet s n False);
mkDet : Str -> Number -> Bool -> Det -- As above + a Boolean for whether the det is a numeral
= \s,n,b -> lin Det (makeDet s n b) ;
mkDet : Str -> Number -> Bool -> Mod -> Det -- As above + Mod for which form the determiner expects its argument to be (default bare)
= \s,n,b,m -> lin Det (makeDet s n b ** {mod=m})
};
{-
-- Intergative pronouns
mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP =
\s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
-- AdN
mkAdN : Str -> AdN = \s -> ss s ;
-}
--2 Adjectives
mkA = overload {
mkA : Str-> A
= \str -> mkAdj str str ** { lock_A = <>} ;
mkA : Str-> Str -> A
= \str,adv -> mkAdj str adv ** { lock_A = <>} ;
mkA : Str -> Str -> A2
= \a,c -> mkAdj a a ** { c2 = c ; lock_A2 = <>} ;
mkA : overload {
mkA : Str -> A ; -- Regular adjective, same form for adjective and adverb.
mkA : (adj,adv : Str) -> A -- Different forms for adjective and adverb.
} ;
mkA2 : (married,to : Str) -> A2 -- Takes string and complementiser, returns A2.
= \a,c -> lin A2 (mkAdj a a ** {c2 = c}) ;
--2 Verbs
mkV : Str -> Str -> V
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
haveVerb : V = mkHave ;
mkV_1 : Str -> V
= \s -> mkVerb1 s ** {lock_V = <>} ;
mkV_2 : Str -> V
= \s -> mkVerb2 s ** {lock_V = <>} ;
mkV2 = overload {
-- mkV2 : Str -> V2
-- = \s -> mkV s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> V2
= \v -> v ** {c2 = {s = [] ; ra = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> Str -> V2
= \v,ra -> v ** {c2 = {ra = ra ; s = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> Str -> Bool -> V2
= \v,p,b -> v ** {c2 = {ra = [] ; s = p ; c = VTrans} ; lock_V2 = <>} ;
mkV = overload {
mkV : (inf : Str) -> V -- Takes infinitive. Use for predictable verbs: if it ends in vowel+دن, the present stem removes the vowel as well. If it ends in consonant+تن or consonant+دن, present stem only removes تن/دن.
= regV ;
mkV : (inf,pres : Str) -> V -- Takes infinitive and present root. Use for unpredictable verbs, e.g. دانستن with present stem دان, or irregular, e.g. کردن with present stem کن.
= \s1, s2 -> lin V (mkVerb s1 s2) ;
mkV : Str -> V -> V -- Invariable prefix to a verb, e.g. mkV "دوست" haveVerb
= compoundV ;
} ;
mkV3 : V -> Str -> Str -> V3;
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
mkV2V : V -> Str -> Str -> Bool -> V2V ;
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
-- compund verbs
compoundV = overload {
compoundV : Str -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
compoundV : Str -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
invarV : Str -> V -- no inflection at all
= \s -> lin V (M.invarV s);
defV : (inf,pres,past : Str) -> V -- no personal forms, but past/present difference, like بایستن ('must'),
= \i,pr,pa -> lin V (M.defectiveVerb i pr pa) ;
haveVerb : V -- The verb "have", to be used for light verb constructions: e.g. compoundV "دوست" haveVerb. NB. this has different imperative and VV forms from StructuralPes.have_V2.
= lin V M.haveVerb ;
beVerb : V -- The verb "be", to be used for light verb constructions: e.g. compoundV "عاشق" beVerb.
= lin V M.beVerb ;
mkV2 : overload {
mkV2 : Str -> V2 ; -- Predictable V2 out of string. No preposition, را for direct object.
mkV2 : V -> V2 ; -- V2 out of V. No preposition, را for direct object.
mkV2 : (listen : V) -> (to : Prep) -> V2 -- V2 out of V. Use given preposition, no را for direct object.
} ;
mkV3 = overload {
mkV3 : Str -> V3 -- Predictable V3, را for direct object, no prepositions.
= \s -> lin V3 (regV s ** {c2 = prepOrRa "را" ; c3 = prepOrRa []}) ;
mkV3 : V -> (dir,indir : Str) -> V3 -- Takes a verb and two prepositions or را as strings (can be empty).
= \v,p,q -> lin V3 (v ** {c2 = prepOrRa p ; c3 = prepOrRa q}) ;
mkV3 : V -> (dir,indir : Prep) -> V3 -- Takes a verb and two prepositions
= \v,p,q -> lin V3 (v ** {c2 = p ; c3 = q})
} ;
mkVQ = overload {
mkVQ : Str -> VQ -- predictable verb with question complement
= \s -> lin VQ (regV s) ;
mkVQ : V -> VQ -- VQ out of a verb
= \v -> lin VQ v
} ;
mkVA = overload {
mkVA : Str -> VA -- predictable verb with adjective complement
= \s -> lin VA (regV s ** {c2 = prepOrRa []}) ;
mkVA : V -> VA -- VA out of a verb
= \v -> lin VA (v ** {c2 = prepOrRa []}) ;
mkVA : V -> Prep -> VA -- VA out of a verb and preposition
= \v,p -> lin VA (v ** {c2 = p}) ;
} ;
mkVS = overload {
mkVS : Str -> VS -- predictable verb with sentence complement
= \s -> lin VS (regV s) ;
mkVS : V -> VS -- VS out of a verb
= \v -> lin VS v
} ;
mkVV = overload {
mkVV : Str -> VV -- Predictable VV, subjunctive complement, is auxiliary.
= \s -> lin VV (regV s ** {isAux = True ; compl = subjunctive ; isDef = False}) ;
mkVV : V -> VV -- takes its VP complement in subjunctive. Is auxiliary.
= \v -> v ** {isAux = True ; compl = subjunctive ; isDef = False} ;
mkVV : VVForm -> V -> VV -- takes its VP complement in the given VVForm
= \vvf,v -> v ** {isAux = True ; compl = vvf ; isDef = False} ;
mkVV : (isAux : Bool) -> VVForm -> V -> VV -- takes its VP complement in the given VVForm. Whether it's auxiliary (T/F) given as the first argument.
= \isAux,vvf,v -> v ** {isAux = isAux ; compl = vvf ; isDef = False}
} ;
mkV2V = overload {
mkV2V : V -> (cN : Str) -> (isAux : Bool) -> V2V -- Verb, complementiser for the noun, whether it's auxiliary.
= \v,s,b -> let vv : VV = mkVV b subjunctive v in
lin V2V (vv ** {c2 = prepOrRa s}) ;
mV2V : VV -> (cN : Str) -> V2V -- V2V out of VV + complementiser for the noun
= \vv,s -> lin V2V (vv ** {c2 = prepOrRa s}) ;
mV2V : VV -> V2V -- V2V out of VV, را for direct object
= \vv -> lin V2V (vv ** {c2 = prepOrRa "را"})
} ;
invarV : Str -> V -- for verbs like " بایستن " ("must"), which don't inflect
= \s -> lin V {s = \\_ => s} ;
----2 Adverbs
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
mkAdv : Str -> Adv -- Takes a string, returns an adverb.
= \str -> lin Adv {s = str} ;
----2 Prepositions
mkPrep : Str -> Prep ;
mkPrep str = {s = str ; lock_Prep = <>};
mkPrep = overload {
mkPrep : Str -> Prep -- Takes a string, returns a preposition.
= \str -> lin Prep {s = str ; ra = [] ; mod = Bare} ;
mkPrep : Str -> Mod -> Prep -- Takes a string and Mod (so far only option is ezafe), returns a preposition.
= \str,m -> lin Prep {s = str ; ra = [] ; mod=m}
} ;
{-
--3 Determiners and quantifiers
@@ -141,68 +194,188 @@ oper
-- mkQuant : (no_sg, no_pl, none_sg, : Str) -> Quant ;
-- } ;
-}
mkQuant = overload {
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
mkQuant : Str -> Str -> Quant = \sg,pl -> makeQuant sg pl;
} ;
{-
--2 Conjunctions
mkConj : overload {
mkConj : Str -> Conj ; -- and (plural agreement)
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument)
mkConj : Str -> Str -> Conj ; -- both ... and (plural)
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument)
} ;
mkConj = overload {
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
mkConj : Str -> Conj -- and (plural agreement)
= \y -> mk2Conj [] y plural ;
mkConj : Str -> Number -> Conj -- or (agrement number given as argument)
= \y,n -> mk2Conj [] y n ;
mkConj : Str -> Str -> Conj -- both ... and (plural)
= \x,y -> mk2Conj x y plural ;
mkConj : Str -> Str -> Number -> Conj -- either ... or (agrement number given as argument)
= mk2Conj
} ;
mkSubj = overload {
mkSubj : Str -> Subj -- Takes its verbal complement in indicative.
= \s -> lin Subj {s=s ; compl=indicative} ;
mkSubj : VVForm -> Str -> Subj -- Specify whether it takes complement in subjunctive or indicative.
= \vvf,s -> lin Subj {s=s ; compl=vvf}
} ;
--.
--2 Definitions of paradigms
-- The definitions should not bother the user of the API. So they are
-- hidden from the document.
Number = ResPes.Number ;
singular = Sg ;
plural = Pl;
Animacy = ResPes.Animacy ;
human = Animate ;
nonhuman = Inanimate ;
animate = human ;
inanimate = nonhuman ;
VVForm = ResPes.VVForm ;
subjunctive = ResPes.Subj ;
indicative = Indic ;
Mod = ResPes.Mod ;
ezafe = ResPes.Ezafe ;
-- Removed mkV_1, mkV_2, mkN01 and mkN02 from public API, still available for
-- any applications that open ParadigmsPes. /IL 2019-02-08
mkV_1 : Str -> V
= \s -> lin V (mkVerb1 s) ;
mkV_2 : Str -> V
= \s -> lin V (mkVerb2 s) ;
mkN = overload {
mkN : (sg : Str) -> N -- Takes singular form, returns a noun with ها as the plural form.
= \sg -> mkN01 sg inanimate ;
mkN : (sg,pl : Str) -> N -- Takes singular and plural forms. Use for ان or its allomorphs, and loanwords with Arabic plural.
= \sg,pl -> M.mkN sg pl inanimate ;
mkN : (possStem : Str) -> N -> N -- Noun with an unexpected possessive stem, e.g. مه where ه is a consonant, not vowel.
= \ps,n -> possStemN ps n ;
-- hidden from API
mkN : (sg : Str) -> Animacy -> N -- Takes singular form and animacy. Inanimate plural ها. Animate plural ان or an allomorph of it (یان or گان) depending on the singular form.
= \sg,ani -> case ani of {
Inanimate => mkN01 sg ani ;
Animate => mkN02 sg ani } ;
mkN : (sg,pl : Str) -> Animacy -> N -- Worst-case constructor: takes singular and plural forms and animacy. Use for e.g. loanwords with Arabic plural, or animate nouns with ها as plural.
= \sg,pl,ani -> M.mkN sg pl ani
} ;
possStemN : Str -> N -> N = \possStem,n -> n ** {
s = table {num => table {Poss => possStem ;
mod => n.s ! num ! mod}
}
} ;
mkN01 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, forms plural with ها
mkN01 sg ani =
let pl : Str = case last sg of {
--"د"|"ذ"|"ر"|"ز"|"ژ" => sg + "ها" ; -- these letters are separated by default
_ => zwnj sg "ها" } ; -- Using zero-width non-joiner, defined in MorphoPes
in M.mkN sg pl ani ;
mkN02 : (sg : Str) -> Animacy -> Noun ; -- Takes singular form and animacy, pattern matches singular and forms plural with either گان, یان or ان
mkN02 str ani = case last str of {
"ه" => M.mkN str (init str + "گان") ani ;
("ا"|"و") => M.mkN str (str + "یان") ani ;
_ => M.mkN str (str + "ان") ani
};
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
lin Conj (sd2 x y ** {n = n}) ;
-- mkV0 : V -> V0 ;
-- mkVS : V -> VS ;
-- mkV2S : V -> Prep -> V2S ;
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
mkA = overload {
mkA : Str -> A -- Regular adjective, same adj and adv forms.
= \str -> lin A (mkAdj str str);
mkA : Str-> Str -> A -- Takes adj and adv forms
= \str,adv -> lin A (mkAdj str adv);
mkA : Str -> Str -> A2 -- Takes string and complementiser, returns A2. Hidden from public API, confusing naming. /IL
= \a,c -> lin A2 (mkAdj a a ** {c2 = c})
} ;
preA : (adj,adv : Str) -> A = \adj,adv ->
lin A ((mkAdj adj adv) ** {isPre=True}) ;
-- mkV2V : V -> Prep -> Prep -> V2V ;
-- mkVA : V -> VA ;
-- mkV2A : V -> Prep -> V2A ;
-- mkVQ : V -> VQ ;
-- mkV2Q : V -> Prep -> V2Q ;
--
-- mkAS : A -> AS ;
-- mkA2S : A -> Prep -> A2S ;
-- mkAV : A -> AV ;
-- mkA2V : A -> Prep -> A2V ;
-- mkA2V a p = a ** {c2 = p.s } ;
--
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
---- $V0$ is just $V$; the second argument is treated as adverb.
--
-- V0 : Type ;
-- AS, A2S, AV, A2V : Type ;
--
----.
----2 Definitions of paradigms
----
---- The definitions should not bother the user of the API. So they are
---- hidden from the document.
--
-- Gender = MorphoHin.Gender ;
-- Number = MorphoHin.Number ;
-- Case = MorphoHin.Case ;
-- human = Masc ;
-- nonhuman = Neutr ;
-- masculine = Masc ;
-- feminine = Fem ;
-- singular = Sg ;
-- plural = Pl ;
-- nominative = Nom ;
-- genitive = Gen ;
{-
-- Demonstrative Pronouns
demoPN : Str -> Str -> Str -> Quant =
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
-- Interrogative pronouns
mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP =
\s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
-}
mkCmpdNoun1 : Str -> N -> N = \s,noun ->
noun ** {
s = \\ez,n => s ++ noun.s ! ez ! n ;
isCmpd = IsCmpd} ;
mkCmpdNoun2 : N -> Str -> N = \noun,s ->
noun ** {
s = \\ez,n => noun.s ! ez ! n ++ s ;
isCmpd = IsCmpd};
-- hidden from public API
compoundV = overload {
compoundV : Str -> V -> V
= \s,v -> v ** {prefix = s} ;
compoundV : Str -> V2 -> V -- hidden from public API
= \s,v -> lin V (v ** {prefix = s}) ;
};
regV : Str -> V = \inf ->
let pres : Str = case inf of {
stem + ("ی"|"ا"|"و") + "دن" => stem ;
stem + ("تن"|"دن") => stem }
in lin V (mkVerb inf pres) ;
mkV2 = overload {
mkV2 : Str -> V2 -- Predictable V2 with را
= \s -> lin V2 (regV s ** {c2 = prepOrRa "را"}) ;
mkV2 : Str -> V -> V2 -- Compound V2 with را
= \s,v -> lin V2 (v ** {prefix = s ; c2 = prepOrRa "را"}) ;
mkV2 : V -> V2
= \v -> lin V2 (v ** {c2 = prepOrRa "را"}) ;
mkV2 : V -> Prep -> V2
= \v,p -> lin V2 (v ** {c2 = p}) ;
mkV2 : V -> Str -> V2
= \v,ra -> lin V2 (v ** {c2 = prepOrRa ra}) ;
mkV2 : V -> Str -> Bool -> V2
= \v,p,b -> lin V2 (v ** {c2 = {ra = [] ; s = p ; mod=Bare}}) ;
} ;
prepOrRa : Str -> Compl = \s -> case s of {
"را" => {s = [] ; ra = "را" ; mod=Bare} ;
prep => {s = prep ; ra = []; mod=Bare}
} ;
mkPost : Str -> Prep = \s -> lin Prep {s=[] ; ra=s ; mod=Bare} ;
mkN2 = overload {
mkN2 : Str -> N2 -- Predictable N2 without complement
= \s -> lin N2 (mkN01 s inanimate ** {c2,compl = []}) ;
mkN2 : N -> N2 -- N2 from without complement
= \n -> lin N2 (n ** {c2,compl = []}) ;
mkN2 : N -> Str -> N2
= \n,c -> lin N2 (n ** {c2 = c ; compl = []}) ;
mkN2 : N -> Prep -> Str -> N2 -- hidden from puclic API
= \n,p,c -> lin N2 (n ** {c2 = p.s; compl = []})
} ;
mkN3 = overload {
mkN3 : N -> Str -> Str -> N3
= \n,p,q -> lin N3 (n ** {c2 = p ; c3 = q}) ;
mkN3 : N -> Prep -> Str -> Str -> N3 -- hidden from public API
= \n,p,q,r -> lin N3 (n ** {c2 = p.s ; c3 = q ; c4 = r}) -- there is no c4
} ;
mkQuant = overload {
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
mkQuant : Str -> Str -> Quant -- hidden from public API
= \sg,pl -> makeQuant sg pl;
} ;
}

View File

@@ -2,26 +2,25 @@ concrete PhrasePes of Phrase = CatPes ** open Prelude, ResPes in {
lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttS s = {s = s.s ! Indic} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ;
UttS s = s ;
UttQS qs = {s = qs.s ! QDir} ;
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
UttIP, --- Acc also
UttQS,
UttAdv,
UttIAdv,
UttCard = \ss -> ss ;
UttIP ip = {s = ip.s } ; --- Acc also
UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! NPC bEzafa} ;
UttVP vp = {s = vp.ad ++ vp.comp ! (AgPes Sg PPers3 ) ++ vp.obj.s ++ vp.inf ++ vp.vComp ! (AgPes Sg PPers3) ++ vp.embComp} ;
UttAdv adv = {s = adv.s } ;
UttCN cn = {s = cn.s ! bEzafa ! Sg };
UttCard n = n ;
UttAP ap = {s = ap.s ! bEzafa} ;
UttNP np = {s = np2str np} ;
UttCN cn = {s = cn2str cn};
UttAP ap = {s = ap.s ! Bare} ;
UttVP vp = {s = showVPH Inf defaultAgr vp} ;
PConjConj conj = {s = conj.s2} ;
NoVoc,
NoPConj = {s = []} ;
PConjConj conj = {s = conj.s2} ; ---
NoVoc = {s = []} ;
VocNP np = {s = np.s ! NPC bEzafa} ;
VocNP = UttNP ;
}

View File

@@ -5,40 +5,25 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
lin
QuestCl cl = {
s = \\t,p,qf => case qf of {
QDir => cl.s ! t ! p ! OQuest;
QIndir => cl.s ! t! p ! ODir
}
s = \\t,p => cl.s ! t ! p ! OQuest
};
QuestVP qp vp =
let cl = mkSClause ("") (AgPes qp.n PPers3) vp;
-- qp1 = qp.s;
-- qp2 = qp.s ! Obl ++ "nE"
in { s = \\t,p,o => qp.s ++ cl.s ! t ! p ! ODir } ;
-- _ => qp1 ++ cl.s ! t ! p ! ODir
-- }
let cl = mkSClause [] (Ag qp.n P3) vp;
in {s = \\t,p => qp.s ++ cl.s ! t ! p ! ODir} ;
QuestSlash ip slash = {
s = \\t,p,o =>
slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra ++
slash.vp ! t ! p ! ODir;
-- order of whome and john needs to be changed
-- AR 18/9/2017 now changed by making ClSlash discontinuous
s = \\t,p => slash.subj ++ slash.c2.s ++ ip.s ++ slash.c2.ra
++ slash.vp ! t ! p ! ODir
};
QuestIAdv iadv cl = {
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
s = \\t,p => iadv.s ++ cl.s ! t ! p ! ODir
};
QuestIComp icomp np =
let cl = mkSClause (np.s ! NPC bEzafa ++ icomp.s) np.a (predAux auxBe);
in {
s = \\t,p,qf => case qf of {
QDir => cl.s ! t ! p ! ODir;
QIndir => cl.s ! t! p ! ODir
}
};
let cl = mkSClause (np2str np ++ icomp.s) np.a (predV beVerb)
in {s = \\t,p => cl.s ! t ! p ! ODir};
PrepIP p ip = {s = p.s ++ ip.s } ;
@@ -48,7 +33,9 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
} ;
IdetCN idet cn = {
s = case idet.isNum of {False => idet.s ++ cn.s ! bEzafa ! idet.n ; True => idet.s ++ cn.s ! bEzafa ! Sg} ;
s = case idet.isNum of {
False => idet.s ++ cn.s ! idet.n ! Bare ;
True => idet.s ++ cn.s ! Sg ! Bare} ;
n = idet.n;
} ;

View File

@@ -1,9 +1,19 @@
Some of the sources are transliterated, in
# Persian
./src
## Language info
Before compilation, do
* English name: Persian
* Autonym: فارسی
* ISO code: [Per](https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?code_ID=357) or [Fas](https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?code_ID=357); [Pes](https://iso639-3.sil.org/code/pes) for Iranian Persian
gf -s <translit.gfs
## Authors
to get unicode.
* Shafqat Virk (2012)
* Elnaz Abolahrar (2012)
* Inari Listenmaa (2019-)
With contributions from Nasrin Mostofian and Aarne Ranta.
## Publications
Shafqat Virk and Elnaz Abolahrar, *An Open Source Persian Computational Grammar*. Proceedings of the Eight International Conference on Language Resources and Evaluation (LREC'12). [[Link](http://www.lrec-conf.org/proceedings/lrec2012/pdf/1028_Paper.pdf)]

View File

@@ -6,48 +6,32 @@ concrete RelativePes of Relative = CatPes ** open ResPes in {
lin
RelCl cl = {
s = \\t,p,o,agr => "که" ++ cl.s ! t ! p ! o ;
s = \\t,p,agr => cl.s ! t ! p ! ODir ;
rp = IdRP.s
} ;
-- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes
RelVP rp vp = {
s = \\t,p,o,ag =>
let
agr = case rp.a of {
s = \\t,p,ag =>
let agr = case rp.a of {
RNoAg => ag ;
RAg a => a
} ;
cl = mkSClause (rp.s) agr vp;
-- cl = case t of {
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
-- };
in
cl.s ! t ! p ! ODir ;
-- c = Dir
RAg a => a} ;
cl = mkSClause [] agr vp;
in cl.s ! t ! p ! ODir ;
rp = rp.s
} ;
---- Pied piping: "ت wهعه we رe لْْکنگ". Stranding and empty
---- relative are defined in $ExtraHin.gf$ ("تهت we رe لْْکنگ ت",
---- "we رe لْْکنگ ت").
--
RelSlash rp slash = {
s = \\t,p,o,agr => rp.s ++ slash.c2.s ++ slash.subj ++ slash.vp ! t ! p ! o ;--case t of { ---- AR 18/8/2017 is this the right place of subj?
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
-- };
-- c = Dir
s = \\t,p,agr => slash.c2.s ++ slash.subj ++ slash.vp ! t ! p ! ODir ;--case t of { ---- AR 18/8/2017 is this the right place of subj?
rp = rp.s
} ;
FunRP p np rp = {
s = np.s ! NPC enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY
s = \\ke => np.s ! Clitic ++ rp.s ! ke ++ p.s ++ getPron np.animacy (fromAgr np.a).n ;
a = RAg np.a
} ;
IdRP = {
s = "که" ;
s = table {Ke => "که" ; Ance => "آنچه"} ;
a = RNoAg
} ;

File diff suppressed because it is too large Load Diff

View File

@@ -7,18 +7,16 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
PredVP np vp = mkClause np vp ;
PredSCVP sc vp = mkSClause ("این" ++ sc.s) (defaultAgrPes) vp ;
PredSCVP sc vp = mkSClause ("این" ++ sc.s) defaultAgr vp ;
ImpVP vp = {
s = \\pol,n =>
let
agr = AgPes (numImp n) PPers2 ;
in case pol of {
CPos => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Pos (numImp n)).inf) ++ vp.embComp;
CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Neg (numImp n)).inf) ++ vp.embComp
let agr = Ag (numImp n) P2 ;
vps = vp.prefix ++ vp.s ! VImp pol (numImp n)
in case vp.vvtype of {
NoVV => vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vps ++ vp.embComp ;
_ => vps ++ vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vp.embComp }
} ;
} ;
SlashVP np vp =
mkSlClause np vp ** {c2 = vp.c2} ;
@@ -30,78 +28,42 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
SlashPrep cl prep = {
subj = [] ; ---- AR 18/9/2017 this can destroy SOV ; Cl should be made discont
vp = cl.s ;
c2 = { s = prep.s ; ra = [] ; c = VIntrans}
c2 = prep ** {ra = []}
} ;
SlashVS np vs slash =
mkSlClause np
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
(embComp (conjThat ++ slash.s ! Indic) (predV vs)) **
{c2 = slash.c2} ;
EmbedS s = {s = conjThat ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = vp.obj.s ++ vp.inf ++ vp.comp ! defaultAgrPes} ; --- agr
EmbedS s = {s = conjThat ++ s.s ! Indic} ;
EmbedQS qs = qs ;
EmbedVP vp = {s = showVPH Inf defaultAgr vp} ; --- agr
UseCl temp p cl =
{ s = case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! ODir;
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! ODir;
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! ODir;
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! ODir;
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! ODir;
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! ODir;
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! ODir;
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
};
} ;
UseQCl temp p cl = {
s = \\q => case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! q;
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! q;
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! q;
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! q;
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! q;
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! q;
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! q;
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! q
};
UseCl temp p cl = {
s = \\vvf => temp.s ++ p.s ++ case vvf of {
Indic => cl.s ! TA temp.t temp.a ! p.p ! ODir ;
Subj => cl.s ! TA Cond temp.a ! p.p ! ODir }
} ;
UseRCl temp p rcl = {
s = \\q => case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPres ! p.p ! ODir ! q;
<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfPres ! p.p ! ODir ! q;
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPast ! p.p ! ODir ! q;
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfPast ! p.p ! ODir ! q;
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VFut ! p.p ! ODir ! q;
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfFut ! p.p ! ODir ! q;
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VCondSimul ! p.p ! ODir ! q;
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VCondAnter ! p.p ! ODir ! q
};
c = rcl.c
UseQCl temp p qcl = let vt = TA temp.t temp.a in {
s = temp.s ++ p.s ++ qcl.s ! vt ! p.p ;
} ;
UseSlash temp p clslash = {
s = temp.s ++ p.s ++ clslash.subj ++
case <temp.t,temp.a> of {
<Pres,Simul> => clslash.vp ! VPres ! p.p ! ODir;
<Pres,Anter> => clslash.vp ! VPerfPres ! p.p ! ODir;
<Past,Simul> => clslash.vp ! VPast ! p.p ! ODir ;
<Past,Anter> => clslash.vp ! VPerfPast ! p.p ! ODir;
<Fut,Simul> => clslash.vp ! VFut ! p.p ! ODir;
<Fut,Anter> => clslash.vp ! VPerfFut ! p.p ! ODir;
<Cond,Simul> => clslash.vp ! VCondSimul ! p.p ! ODir;
<Cond,Anter> => clslash.vp ! VCondSimul ! p.p ! ODir
};
c2 = clslash.c2
UseRCl temp p rcl = let vt = TA temp.t temp.a in rcl ** {
s = \\a => temp.s ++ p.s ++ rcl.s ! vt ! p.p ! a
} ;
AdvS a s = {s = a.s ++ s.s} ;
UseSlash temp p cls = cls ** {
s = \\vvf => temp.s ++ p.s ++ cls.subj ++ case vvf of {
Indic => cls.vp ! TA temp.t temp.a ! p.p ! ODir ;
Subj => cls.vp ! TA Cond temp.a ! p.p ! ODir }
} ;
RelS s r = {s = s.s ++ r.s ! agrPesP3 Sg} ;
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
AdvS a s = {s = \\vvf => a.s ++ s.s ! vvf} ;
RelS s r = {s = \\vvf => s.s ! vvf ++ rs2str Ke (agrP3 Sg) r} ;
SSubjS s1 sj s2 = {s = \\vvf => s1.s ! vvf ++ sj.s ++ s2.s ! sj.compl};
}

View File

@@ -5,102 +5,88 @@ concrete StructuralPes of Structural = CatPes **
coding = utf8;
lin
above_Prep = ss "بالای" ;
after_Prep = ss ["بعد از"] ;
above_Prep = mkPrep "بالای" ;
after_Prep = mkPrep ["بعد از"] ;
all_Predet = ss ["همه ی"] ;
almost_AdA, almost_AdN = ss "تقریباً" ;
although_Subj = ss ["با وجود این"] ;
although_Subj = mkSubj "با وجود این" ;
always_AdV = ss "همیشه" ;
and_Conj = sd2 [] "و" ** {n = Pl} ;
because_Subj = ss ["برای این"] ;
before_Prep = ss ["قبل از"] ;
behind_Prep = ss "پشت" ;
between_Prep = ss "بین" ;
because_Subj = mkSubj "برای این" ;
before_Prep = mkPrep ["قبل از"] ;
behind_Prep = mkPrep "پشت" ;
between_Prep = mkPrep "بین" ;
both7and_DConj = sd2 "هم" ["و هم"] ** {n = Pl} ;
but_PConj = ss "اما" ;
by8agent_Prep = ss "توسط" ;
by8means_Prep = ss "با" ;
-- can8know_VV,can_VV = mkV "سکن" ** { isAux = True} ;
can_VV = mkV_1 " توانستن " ** { isAux = True} ; ---- AR
during_Prep = ss ["در طول"] ;
by8agent_Prep = mkPrep "توسط" ;
by8means_Prep = mkPrep "با" ;
-- can8know_VV,can_VV = mkVV (mkV "سکن") ;
can_VV = mkVV (mkV_1 "توانستن") ; ---- AR
during_Prep = mkPrep ["در طول"] ;
either7or_DConj = sd2 "یا" "یا" ** {n = Sg} ;
-- everybody_NP = MassNP (UseN (MorphoPnb.mkN11 ["هر کwی"])); -- not a good way coz need to include NounPnb
-- everybody_NP = R.indeclNP "هر کwی";
every_Det = mkDet "هر" Sg ;
-- everything_NP = MassNP (UseN (MorphoPnb.mkN11 ["هر XE"]));
-- everything_NP = R.indeclNP ["هر XE"]));
everywhere_Adv = ss ["هر جا"] ;
few_Det = mkDet ["تعداد کمی"] Pl True; -- check
-- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED
for_Prep = ss "برای" ;
from_Prep = ss "از" ;
he_Pron = personalPN "او" Sg PPers3 ;
for_Prep = mkPrep "برای" Ezafe ;
from_Prep = mkPrep "از" ;
he_Pron = R.agr2pron ! Ag Sg P3 ;
here_Adv = ss "اینجا" ;
here7to_Adv = ss "اینجا" ;
here7from_Adv = ss "اینجا" ;
how_IAdv = ss "چطور" ;
how8many_IDet = {s = "چند" ; n = Pl ; isNum = True} ;
how8much_IAdv = ss "چقدر" ;
if_Subj = ss "اگر" ;
in8front_Prep = ss "جلوی" ;
i_Pron = personalPN "من" Sg PPers1;
in_Prep = ss "در" ;
it_Pron = personalPN "آن" Sg PPers3;
if_Subj = mkSubj subjunctive "اگر" ;
in8front_Prep = mkPrep "جلوی" ;
i_Pron = R.agr2pron ! Ag Sg P1;
in_Prep = mkPrep "در" ;
it_Pron = R.agr2pron ! Ag Sg P3;
less_CAdv = {s = "کمتر" ; p = ""} ;
many_Det = mkDet ["تعداد زیادی"] Pl True; -- check
many_Det = mkDet "بسیار" Pl False Ezafe ;
more_CAdv = {s = "بیشتر" ; p = "" } ;
most_Predet = ss "اکثر";
much_Det = mkDet ["مقدار زیادی"] Pl ;
must_VV = invarV " بایستن " ** {isAux = True} ; ---- AR
-- must_VV = {
-- s = table {
-- VVF VInf => ["هوe تْ"] ;
-- VVF VPres => "مست" ;
-- VVF VPPart => ["هد تْ"] ;
-- VVF VPresPart => ["هونگ تْ"] ;
-- VVF VPast => ["هد تْ"] ; --# notpresent
-- VVPastNeg => ["هدn'ت تْ"] ; --# notpresent
-- VVPresNeg => "مستn'ت"
-- } ;
-- isAux = True
-- } ;
-----b no_Phr = ss "نْ" ;
must_VV =
let must : VV = mkVV False subjunctive (defV "بایستن" "باید" "باید") ; -- "بایست" is different meaning?
in must ** {isDef=True} ;
-- TODO: past tense forms with مجبور+beVerb
no_Utt = ss "نه" ;
on_Prep = ss "روی" ;
-- one_Quant = demoPN "یک" ; -- DEPRECATED
on_Prep = mkPrep "روی" ;
only_Predet = ss "فقط" ;
or_Conj = sd2 [] "یا" ** {n = Sg} ;
otherwise_PConj = ss ["درغیراین صورت"] ;
part_Prep = ss "از" ; -- the object following it should be in Ezafa form
part_Prep = mkPrep "از" ; -- TODO: the object following it should be in Ezafa form
please_Voc = ss "لطفاً" ;
possess_Prep = ss "" ; -- will be handeled in Ezafeh
possess_Prep = mkPrep "" ; -- will be handeled in Ezafeh
quite_Adv = ss "کاملاً" ;
she_Pron = personalPN "او" Sg PPers3 ;
she_Pron = R.agr2pron ! Ag Sg P3 ;
so_AdA = ss "بسیار" ;
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" ));
somebody_NP = R.indeclNP "کwی" ;
someSg_Det = mkDet "مقداری" Sg True ;
somePl_Det = mkDet "چند" Pl True ;
-- something_NP = MassNP (UseN (MorphoPnb.mkN11 "چیزی"));
something_NP = R.indeclNP "چیزی" ;
somewhere_Adv = ss "جایی" ;
that_Quant = mkQuant "آن" "آن";
that_Subj = ss "آن";
that_Subj = mkSubj "آن";
there_Adv = ss "آنجا" ;
there7to_Adv = ss "آنجا" ;
there7from_Adv = ss "آنجا" ;
therefore_PConj = ss ["به همین دلیل"] ;
they_Pron = personalPN ["آن ها"] Pl PPers3 ;
they_Pron = R.agr2pron ! Ag Pl P3 ;
this_Quant = mkQuant "این" "این" ;
through_Prep = ss ["از طریق"] ;
through_Prep = mkPrep ["از طریق"] ;
too_AdA = ss "خیلی" ;
to_Prep = ss "به" ** {lock_Prep = <>};
under_Prep = ss "زیر" ** {lock_Prep = <>};
to_Prep = mkPrep "به" ** {lock_Prep = <>};
under_Prep = mkPrep "زیر" ** {lock_Prep = <>};
very_AdA = ss "خیلی" ;
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
we_Pron = personalPN "ما" Pl PPers1 ;
want_VV = mkVV False subjunctive (mkV "خواستن" "خواه") ; --not aux
we_Pron = R.agr2pron ! Ag Pl P1 ;
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
when_IAdv = ss "کی" ;
when_Subj = ss "وقتی" ;
when_Subj = mkSubj "وقتی" ;
where_IAdv = ss "کجا" ;
which_IQuant = {s = "کدام" ; n = Sg} ;
whichPl_IDet = {s = "کدام" ; n = Pl ; isNum = False} ;
@@ -108,21 +94,21 @@ concrete StructuralPes of Structural = CatPes **
whoSg_IP = {s = ["چه کسی"] ; n = Sg} ;
whoPl_IP = {s = ["چه کسانی"] ;n = Pl} ;
why_IAdv = ss "چرا" ;
without_Prep = ss "بدون" ;
with_Prep = ss "با";
without_Prep = mkPrep "بدون" ;
with_Prep = mkPrep "با";
-- yes_Phr = ss "بله" ;
yes_Utt = ss "بله" ;
youSg_Pron = personalPN "تو" Sg PPers2 ;
youPl_Pron = personalPN "شما" Pl PPers2 ;
youPol_Pron = personalPN "شما" Pl PPers2 ;
youSg_Pron = R.agr2pron ! Ag Sg P2 ;
youPl_Pron = R.agr2pron ! Ag Pl P2 ;
youPol_Pron = R.agr2pron ! Ag Pl P2 ;
-- no_Quant = demoPN "هیچ" ;
not_Predet = {s="نه"} ;
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
at_least_AdN = ss "حداقل" ;
at_most_AdN = ss "حداکثر";
-- nothing_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ چیز" ));
except_Prep = ss ["به جز"] ;
-- nobody_NP = MassNP (UseN (MorphoPnb.mkN11 "هیچ کس"));
nothing_NP = R.indeclNP "هیچ" ;
except_Prep = mkPrep ["به جز"] ;
nobody_NP = R.indeclNP "هیچ کس";
as_CAdv = {s = ["به اندازه ی"] ; p = ""} ;
@@ -132,126 +118,21 @@ concrete StructuralPes of Structural = CatPes **
---- AR from Nasrin
have_V2 = {
-- have_V2: "have" as an independent verb.
-- MorphoPes.haveVerb: "have" as auxiliary.
have_V2 = haveVerb ** {
s = table {
(VF Pos (PPresent2 PrPerf) PPers1 Sg) => "داشته ام" ;
(VF Pos (PPresent2 PrPerf) PPers1 Pl) => "داشته ایم" ;
(VF Pos (PPresent2 PrPerf) PPers2 Sg) => "داشته ای" ;
(VF Pos (PPresent2 PrPerf) PPers2 Pl) => "داشته اید" ;
(VF Pos (PPresent2 PrPerf) PPers3 Sg) => "داشته است" ;
(VF Pos (PPresent2 PrPerf) PPers3 Pl) => "داشته اند" ;
(VF Pos (PPresent2 PrImperf) PPers1 Sg) => "دارم" ;
(VF Pos (PPresent2 PrImperf) PPers1 Pl) => "داریم" ;
(VF Pos (PPresent2 PrImperf) PPers2 Sg) => " داری" ;
(VF Pos (PPresent2 PrImperf) PPers2 Pl) => "دارید" ;
(VF Pos (PPresent2 PrImperf) PPers3 Sg) => "دارد" ;
(VF Pos (PPresent2 PrImperf) PPers3 Pl) => "دارند" ;
(VF Pos (PPast2 PstPerf) PPers1 Sg) => "داشته بودم" ;
(VF Pos (PPast2 PstPerf) PPers1 Pl) => "داشته بودیم" ;
(VF Pos (PPast2 PstPerf) PPers2 Sg) => "داشته بودی" ;
(VF Pos (PPast2 PstPerf) PPers2 Pl) => "داشته بودید" ;
(VF Pos (PPast2 PstPerf) PPers3 Sg) => "داشته بود" ;
(VF Pos (PPast2 PstPerf) PPers3 Pl) => "داشته بودند" ;
(VF Pos (PPast2 PstImperf) PPers1 Sg) => "می داشتم" ;
(VF Pos (PPast2 PstImperf) PPers1 Pl) => "می داشتیم" ;
(VF Pos (PPast2 PstImperf) PPers2 Sg) => "می داشتی" ;
(VF Pos (PPast2 PstImperf) PPers2 Pl) => "می داشتید" ;
(VF Pos (PPast2 PstImperf) PPers3 Sg) => "می داشت" ;
(VF Pos (PPast2 PstImperf) PPers3 Pl) => "می داشتند" ;
(VF Pos (PPast2 PstAorist) PPers1 Sg) => "داشتم" ;
(VF Pos (PPast2 PstAorist) PPers1 Pl) => "داشتیم" ;
(VF Pos (PPast2 PstAorist) PPers2 Sg) => "داشتی" ;
(VF Pos (PPast2 PstAorist) PPers2 Pl) => "داشتید" ;
(VF Pos (PPast2 PstAorist) PPers3 Sg) => "داشت" ;
(VF Pos (PPast2 PstAorist) PPers3 Pl) => "داشتند" ;
(VF Pos (PFut2 FtAorist) PPers1 Sg) => "خواهم داشت" ;
(VF Pos (PFut2 FtAorist) PPers1 Pl) => "خواهیم داشت" ;
(VF Pos (PFut2 FtAorist) PPers2 Sg) => "خواهی داشت" ;
(VF Pos (PFut2 FtAorist) PPers2 Pl) => "خواهید داشت" ;
(VF Pos (PFut2 FtAorist) PPers3 Sg) => "خواهد داشت" ;
(VF Pos (PFut2 FtAorist) PPers3 Pl) => "خواهند داشت" ;
(VF Pos (Infr_Past2 InfrPerf) PPers1 Sg) => "داشته بوده ام" ;
(VF Pos (Infr_Past2 InfrPerf) PPers1 Pl) => "داشته بوده ایم" ;
(VF Pos (Infr_Past2 InfrPerf) PPers2 Sg) => "داشته بوده ای" ;
(VF Pos (Infr_Past2 InfrPerf) PPers2 Pl) => "داشته بوده اید" ;
(VF Pos (Infr_Past2 InfrPerf) PPers3 Sg) => "داشته بوده است" ;
(VF Pos (Infr_Past2 InfrPerf) PPers3 Pl) => "داشته بوده اند" ;
(VF Pos (Infr_Past2 InfrImperf) PPers1 Sg) => "می داشته ام" ;
(VF Pos (Infr_Past2 InfrImperf) PPers1 Pl) => "می داشته ایم" ;
(VF Pos (Infr_Past2 InfrImperf) PPers2 Sg) => "می داشته ای" ;
(VF Pos (Infr_Past2 InfrImperf) PPers2 Pl) => "می داشته اید" ;
(VF Pos (Infr_Past2 InfrImperf) PPers3 Sg) => "می داشته است" ;
(VF Pos (Infr_Past2 InfrImperf) PPers3 Pl) => "می داشته اند" ;
(VF Neg (PPresent2 PrPerf) PPers1 Sg) => "نداشته ام" ;
(VF Neg (PPresent2 PrPerf) PPers1 Pl) => "نداشته ایم" ;
(VF Neg (PPresent2 PrPerf) PPers2 Sg) => "نداشته ای" ;
(VF Neg (PPresent2 PrPerf) PPers2 Pl) => "نداشته اید" ;
(VF Neg (PPresent2 PrPerf) PPers3 Sg) => "نداشته است" ;
(VF Neg (PPresent2 PrPerf) PPers3 Pl) => "نداشته اند" ;
(VF Neg (PPresent2 PrImperf) PPers1 Sg) => "ندارم" ;
(VF Neg (PPresent2 PrImperf) PPers1 Pl) => "نداریم" ;
(VF Neg (PPresent2 PrImperf) PPers2 Sg) => "نداری" ;
(VF Neg (PPresent2 PrImperf) PPers2 Pl) => "ندارید" ;
(VF Neg (PPresent2 PrImperf) PPers3 Sg) => "ندارد" ;
(VF Neg (PPresent2 PrImperf) PPers3 Pl) => "ندارند" ;
(VF Neg (PPast2 PstPerf) PPers1 Sg) => "نداشته بودم" ;
(VF Neg (PPast2 PstPerf) PPers1 Pl) => "نداشته بودیم" ;
(VF Neg (PPast2 PstPerf) PPers2 Sg) => "نداشته بودی" ;
(VF Neg (PPast2 PstPerf) PPers2 Pl) => "نداشته بودید" ;
(VF Neg (PPast2 PstPerf) PPers3 Sg) => "نداشته بود" ;
(VF Neg (PPast2 PstPerf) PPers3 Pl) => "نداشته بودند" ;
(VF Neg (PPast2 PstImperf) PPers1 Sg) => "نمی داشتم" ;
(VF Neg (PPast2 PstImperf) PPers1 Pl) => "نمی داشتیم" ;
(VF Neg (PPast2 PstImperf) PPers2 Sg) => "نمی داشتی" ;
(VF Neg (PPast2 PstImperf) PPers2 Pl) => "نمی داشتید" ;
(VF Neg (PPast2 PstImperf) PPers3 Sg) => "نمی داشت" ;
(VF Neg (PPast2 PstImperf) PPers3 Pl) => "نمی داشتند" ;
(VF Neg (PPast2 PstAorist) PPers1 Sg) => "نداشتم" ;
(VF Neg (PPast2 PstAorist) PPers1 Pl) => "نداشتیم" ;
(VF Neg (PPast2 PstAorist) PPers2 Sg) => "نداشتی" ;
(VF Neg (PPast2 PstAorist) PPers2 Pl) => "نداشتید" ;
(VF Neg (PPast2 PstAorist) PPers3 Sg) => "نداشت" ;
(VF Neg (PPast2 PstAorist) PPers3 Pl) => "نداشتند" ;
(VF Neg (PFut2 FtAorist) PPers1 Sg) => "نخواهم داشت" ;
(VF Neg (PFut2 FtAorist) PPers1 Pl) => "نخواهیم داشت" ;
(VF Neg (PFut2 FtAorist) PPers2 Sg) => "نخواهی داشت" ;
(VF Neg (PFut2 FtAorist) PPers2 Pl) => "نخواهید داشت" ;
(VF Neg (PFut2 FtAorist) PPers3 Sg) => "نخواهد داشت" ;
(VF Neg (PFut2 FtAorist) PPers3 Pl) => "نخواهند داشت" ;
(VF Neg (Infr_Past2 InfrPerf) PPers1 Sg) => "نداشته بوده ام" ;
(VF Neg (Infr_Past2 InfrPerf) PPers1 Pl) => "نداشته بوده ایم" ;
(VF Neg (Infr_Past2 InfrPerf) PPers2 Sg) => "نداشته بوده ای" ;
(VF Neg (Infr_Past2 InfrPerf) PPers2 Pl) => "نداشته بوده اید" ;
(VF Neg (Infr_Past2 InfrPerf) PPers3 Sg) => "نداشته بوده است" ;
(VF Neg (Infr_Past2 InfrPerf) PPers3 Pl) => "نداشته بوده اند" ;
(VF Neg (Infr_Past2 InfrImperf) PPers1 Sg) => "نمی داشته ام" ;
(VF Neg (Infr_Past2 InfrImperf) PPers1 Pl) => "نمی داشته ایم" ;
(VF Neg (Infr_Past2 InfrImperf) PPers2 Sg) => "نمی داشته ای" ;
(VF Neg (Infr_Past2 InfrImperf) PPers2 Pl) => "نمی داشته اید" ;
(VF Neg (Infr_Past2 InfrImperf) PPers3 Sg) => "نمی داشته است" ;
(VF Neg (Infr_Past2 InfrImperf) PPers3 Pl) => "نمی داشته اند" ;
(Vvform (AgPes Sg PPers1)) => "بدارم" ;
(Vvform (AgPes Sg PPers2)) => "بداری" ;
(Vvform (AgPes Sg PPers3)) => "بدارد" ;
(Vvform (AgPes Pl PPers1)) => "بداریم" ;
(Vvform (AgPes Pl PPers2)) => "بدارید" ;
(Vvform (AgPes Pl PPers3)) => "بدارند" ;
(R.Imp Pos Sg) => "بدار" ;
(R.Imp Pos Pl) => "بدارید" ;
(R.Imp Neg Sg) => "ندار" ;
(R.Imp Neg Pl) => "ندارید" ;
Inf => "داشتن" ;
Root1 => "داشت" ;
Root2 => "دار"
VImp Pos Sg => "داشته باش" ;
VImp Pos Pl => "داشته باشید" ;
VImp Neg Sg => "نداشته باش" ;
VImp Neg Pl => "نداشته باشید" ;
VSubj _ (Ag Sg P1) => "داشته باشم" ;
VSubj _ (Ag Sg P2) => "داشته باشی" ;
VSubj _ (Ag Sg P3) => "داشته باشد" ;
VSubj _ (Ag Pl P1) => "داشته باشیم" ;
VSubj _ (Ag Pl P2) => "داشته باشید" ;
VSubj _ (Ag Pl P3) => "داشته باشند" ;
x => haveVerb.s ! x } ;
c2 = prepOrRa [] -- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
} ;
c2 = {
s = [] ;
ra = [] ; --- "را" ; ---- AR 18/9/2017: usually no ra acc. to Nasrin, but this is tricky
c = R.VTrans
}
} ;
}

View File

@@ -10,25 +10,22 @@ concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes in {
IntPN i = {s = i.s ; animacy = Inanimate} ;
FloatPN i = {s = i.s ; animacy = Inanimate} ;
NumPN i = {s = i.s ; animacy = Inanimate} ;
CNIntNP cn i = {
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
a = agrPesP3 Sg ;
animacy = cn.animacy
CNIntNP cn i = emptyNP ** cn ** {
s = \\ez => cn.s ! Sg ! Ezafe ++ i.s ++ cn.compl ! Sg ;
a = agrP3 Sg
} ;
CNSymbNP det cn xs = {
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ;
a = agrPesP3 det.n ;
animacy = cn.animacy
CNSymbNP det cn xs = emptyNP ** cn ** {
s = \\ez => det.s ++ cn.s ! det.n ! Ezafe ++ xs.s ++ cn.compl ! det.n ;
a = agrP3 det.n
} ;
CNNumNP cn i = {
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
a = agrPesP3 Sg ;
animacy = cn.animacy
CNNumNP cn i = emptyNP ** cn ** {
s = \\ez => cn.s ! Sg ! Ezafe ++ i.s ++ cn.compl ! Sg ;
a = agrP3 Sg ;
} ;
SymbS sy = sy ;
SymbS sy = {s = \\_ => sy.s} ;
SymbNum sy = { s = sy.s ; n = Pl } ;
SymbOrd sy = { s = sy.s ++ "wN" ; n = Pl} ;
SymbOrd sy = { s = sy.s ++ "wN" ; n = Pl; isNum,isPre=False} ;
lincat
@@ -40,12 +37,6 @@ lin
BaseSymb = infixSS "تE" ;
ConsSymb = infixSS "" ;
--oper
-- Note: this results in a space before 's, but there's
-- not mauch we can do about that.
-- addGenitiveS : Str ;
-- addGenitiveS s =
-- s ++ "از" ;
-- TODO: what are wN and تE? /IL
}

View File

@@ -1,49 +1,76 @@
concrete VerbPes of Verb = CatPes ** open ResPes in {
concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
flags coding = utf8;
flags optimize=all_subs ;
lin
UseV v = predV v ;
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; ra = v.c2.ra ; c = VTrans}} ;
Slash2V3 v np =
insertObjc (\\_ => np.s ! NPC bEzafa ++ v.c2 ) (predV v ** {c2 = {s = [] ; ra = v.c3 ; c = VTrans}}) ;
UseV = predV ;
SlashV2a v = predVc v;
Slash2V3 v np = vs v.c3 **
complSlash (predVc v ** {c2 = v.c2}) np ;
Slash3V3 v np = vs v.c2 **
complSlash (predVc v ** {c2 = v.c3}) np ;
ComplSlash = complSlash ;
Slash3V3 v np =
insertObjc (\\_ => v.c3 ++ np.s ! NPC bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2 ; c = VTrans}}) ;
ComplVV = insertVV ;
ComplVS v s = embComp (conjThat ++ s.s ! Indic) (predV v) ;
ComplVQ v q = embComp (conjThat ++ q.s) (predV v) ;
ComplVA v ap = insertObj (appComp v.c2 ap.s) (predV v) ; -- check form of adjective
ComplVV v vp = insertVV (infVV v.isAux vp).s (predV v) ;
ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ;
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
ComplVA v ap = insertObj (\\_ => ap.s ! bEzafa) (predV v) ; -- check form of adjective
SlashV2V v vp = insertVV (infVV v.isAux vp).s (predV v) **{c2 = {s = v.c1 ; ra = [] ; c = VTransPost}} ;
SlashVV vv vps = vps ** ComplVV vv vps ;
SlashV2S v s = predVc v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
SlashV2Q v q = predVc v ** embComp q.s (predV v) ;
SlashV2A v ap = predVc v ** insertObj (appComp v.c2 ap.s) (predV v) ; ---- paint it red , check form of adjective
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = v.c2.s ;ra = [] ; c = VTransPost}}) ;
SlashV2Q v q = insertObjc2 ( q.s ! QIndir) (predV v ** {c2 = {s = v.c2.s ; ra = [] ;c = VTransPost}}) ;
SlashV2A v ap = insertObjc3 ( ap.s ! bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2.ra ;c = VTransPost}}) ; ---- paint it red , check form of adjective
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
SlashV2V v2v vp = predVc v2v ** {
agrObj = \\agr => if_then_Str v2v.isAux conjThat []
++ showVPH (case v2v.compl of {
Subj => VSubj Pos agr ;
Indic => VAor Pos agr })
agr -- this will agree with the object added by ComplSlash
vp ;
c2 = v2v.c2 ; -- preposition for the direct object comes from V2V
} ;
ComplSlash vp np = insertObjPre (\\_ => np.s ! NPC bEzafa ) vp ;
SlashVV vv vp =
-- insertObj (infVV vv.isAux vp).s (predV vv) **
insertVV (infVV vv.isAux vp).s (predV vv) **
{c2 = vp.c2} ;
SlashV2VNP vv np vp =
insertObjPre (\\_ => np.s ! NPC bEzafa )
-- (insertObjc (infVV vv.isAux vp).s (predVc vv)) **
(insertVVc (infVV vv.isAux vp).s (predVc vv)) **
{c2 = vp.c2} ;
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
SlashV2VNP v2v np vps = predVc v2v ** {
comp = \\a => if_then_Str v2v.isAux conjThat [] -- that
++ appComp v2v.c2 np.s ; -- I
-- ∅ is placed in comp
vComp = \\_,_ => showVPH (case v2v.compl of { -- buy
Subj => VSubj Pos np.a ;
Indic => VAor Pos np.a })
np.a -- agreement fixed to np.a
<vps : VPH> ;
c2 = vps.c2 -- preposition for the direct object comes from VPSlash
} ;
-- : VP -> Prep -> VPSlash ;
VPSlashPrep vp prep = vp ** vs prep ;
UseComp comp = insertObj comp.s (predAux auxBe) ;
AdvVP vp adv = insertAdV adv.s vp ;
AdVVP adv vp = insertAdV adv.s vp ;
ReflVP v = insertObjPre (\\a => reflPron ! a) v ;
ReflVP v = insertCompPre reflPron v ;
PassV2 v = predV v ; -- need to be fixed
CompAP ap ={s = \\_ => ap.s ! bEzafa} ; -- check form of adjective
CompNP np = {s = \\a => np.s ! NPC bEzafa} ;
CompAdv adv = {s = \\_ => adv.s } ;
CompCN cn = {s = \\a => cn.s ! bEzafa ! giveNumber a } ;
UseComp comp = insertComp comp.s (predV beVerb) ;
CompAP ap = {s = \\_ => ap.s ! Bare} ; -- check form of adjective
CompAdv adv = {s = \\_ => adv.s } ;
-- see https://sites.la.utexas.edu/persian_online_resources/nouns/noun-in-a-predicative-position/
CompCN cn = {
s = \\a => cn.s ! giveNumber a
! case cn.hasAdj of {
False => Bare ;
True => Clitic }
} ;
CompNP np = {
s = \\a => np.s ! case np.hasAdj of {
False => Bare ;
True => Clitic }
} ;
}

View File

@@ -1,48 +0,0 @@
concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
flags coding = utf8;
lin
PositA a = a ;
UseComparA a = a;
ComparA a np = {
s =\\ez => a.s ! ez ++ "tr" ++ "Az" ++ np.s ! NPC bEzafa ;
adv = a.adv
} ;
---- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = {
s =\\ez => np.s ! NPC bEzafa ++ a.c2 ++ a.s ! ez ;
adv = a.adv
} ;
ReflA2 a = {
s =\\ez => a.s ! ez ++ "" ; -- need to be fixed
adv = a.adv
} ;
SentAP ap sc = {
s =\\ez => ap.s! ez ++ sc.s ;
adv = ap.adv
} ;
AdAP ada ap = {
s =\\ez => ada.s ++ ap.s ! ez ;
adv = ap.adv
} ;
UseA2 a = a ;
CAdvAP cadv ap np = {
s =\\ez => cadv.s ++ np.s ! NPC bEzafa ++ ap.s ! ez ;
adv = ap.adv
};
AdjOrd ord = { s =\\_ => ord.s ; adv = ""};
AdvAP ap adv = {s =\\ez => ap.s ! ez ++ adv.s ; adv = ap.adv};
}

View File

@@ -1,22 +0,0 @@
concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
flags coding = utf8;
lin
-- PositAdvAdj a = {s = a.s ! bEzafa } ;
PositAdvAdj a = {s = a.adv } ;
ComparAdvAdj cadv a np = {
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! NPC bEzafa ;
} ;
ComparAdvAdjS cadv a s = {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
} ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ;
-- SubjS = cc2 ;
SubjS sub snt = {s = sub.s ++ "kh" ++ snt.s } ;
AdnCAdv cadv = {s = cadv.s ++ "Az"} ;
}

View File

@@ -1,40 +0,0 @@
concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
flags optimize=all_subs ;
flags coding = utf8;
lin
ImpersCl vp = mkSClause " " (agrPesP3 Sg) vp ;
GenericCl vp = mkSClause "A:dm" (agrPesP3 Sg) vp ;
CleftNP np rs =
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe);
in
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
ExistNP np =
mkSClause " " (agrPesP3 (fromAgr np.a).n)
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ;
ExistIP ip =
let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe);
in {
s = \\t,p,qf => case qf of {
QDir => cl.s ! t ! p ! ODir;
QIndir => cl.s ! t! p ! ODir
}
};
-- ProgrVP vp = insertObj (\\a => vp.obj.s ++ vp.ad ++ vp.comp ! a ++ (vp.s ! VPStem).inf ++ raha (fromAgr a).g (fromAgr a).n ) (predAux auxBe) ;
ProgrVP vp = (predProg vp) ;
ImpPl1 vp = {s = "byAyyd" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ;
ImpP3 np vp = {s = "bgWAryd" ++ np.s!NPC bEzafa ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf};
}

View File

@@ -1,374 +0,0 @@
--# -path=.:prelude:alltenses
concrete LexiconPes of Lexicon = CatPes **
--open ResPnb, Prelude in {
open ParadigmsPes,MorphoPes, Prelude in {
flags
optimize=values ;
coding = utf8;
lin
airplane_N = mkN01 "hvApymA" inanimate ;
answer_V2S = mkV2 (compoundV "jvAb" (mkV "dAdn" "dh")) "bh" False;
apartment_N = mkN01 "A:pArtmAn" inanimate;
apple_N = mkN01 "syb" inanimate;
art_N = mkN01 "hnr" inanimate;
ask_V2Q = mkV2 (mkV_1 "prsydn") "Az" False;
baby_N = mkN01 "bc^h" animate; -- has variant "kvdk"
bad_A = mkA "bd" ;
bank_N = mkN01 "bAnk" inanimate;
beautiful_A = mkA "zybA" ;
become_VA = mkV "Cdn" "Cv";
beer_N = mkN01 "A:bjv" inanimate;
beg_V2V = mkV2V (compoundV "KvAhC" (mkV "krdn" "kn")) "Az" "" False;
big_A = mkA "bzrg" ;
bike_N = mkN01 "dvc^rKh" inanimate;
bird_N = mkN02 "prndh" animate;
black_A = mkA "syAh" ;
blue_A = mkA "A:by" ;
boat_N = mkN01 "qAyq" inanimate;
book_N = mkN01 "ktAb" inanimate;
boot_N = mkN01 "c^kmh" inanimate; -- has variant "pvtyn"
boss_N = mkN02 "kArfrmA" animate;
boy_N = mkN02 "psr" animate;
bread_N = mkN01 "nAn" inanimate;
break_V2 = mkV2 (mkV "Ckstn" "Ckn") "rA";
broad_A = mkA "vsyc" ;
brother_N2 = (mkN01 "brAdr" animate) ** {c=""};
brown_A = mkA ["qhvh Ay"] ;
butter_N = mkN01 "krh" inanimate;
buy_V2 = mkV2 (mkV_1 "Krydn") "rA";
camera_N = mkN01 "dvrbyn" inanimate;
cap_N = mkCmpdNoun1 "klAh" (mkN01 "kp" animate);
car_N = mkN01 "mACyn" inanimate; -- has variant "Atvmbyl"
carpet_N = mkN01 "frC" inanimate;
cat_N = mkN01 "grbh" animate;
ceiling_N = mkN01 "sqf" inanimate;
chair_N = mkN01 "Sndly" inanimate;
cheese_N = mkN01 "pnyr" inanimate;
child_N = mkN02 "frznd" animate; -- has variant "bc^h"
church_N = mkN01 "klysA" inanimate;
city_N = mkN01 "Chr" inanimate;
clean_A = mkA "tmyz" ;
clever_A = mkA "bAhvC" ["bA hvCmndy"];
close_V2 = mkV2 (mkV "bstn" "bnd") "rA";
coat_N = mkN01 "kt" inanimate;
cold_A = mkA "srd" ;
come_V = mkV "A:mdn" "A:y" ;
computer_N = mkN01 "kAmpyvtr" inanimate; -- also vaiant "rAyAnh"
country_N = mkN01 "kCvr" inanimate;
-- Note: cousin inflects for gender and for being a mother's or a father's relatives in persian
-- The following is an example which is the daughter of your mom's brother
cousin_N = mkCmpdNoun1 "dKtr" (mkN01 "dAyy" animate);
cow_N = mkN01 "gAv" animate;
die_V = mkV "mrdn" "myr" ;
dirty_A = mkA "kt-yf" ;
distance_N3 = (mkN "fASlh" "fvASl" inanimate ) ** {c2="Az" ; c3 = "tA"};
doctor_N = mkN01 "dktr" animate; -- has variant "pzCk", but only a doctor in medicine
dog_N = mkN01 "sg" animate;
door_N = mkN01 "dr" inanimate;
drink_V2 = mkV2 (mkV_1 "nvCydn") "rA";
-- easy_A2V = mkA "A:sAn" "" ;
eat_V2 = mkV2 (mkV_2 "Kvrdn") "rA" ;
empty_A = mkA "KAly" ;
enemy_N = mkN02 "dCmn" animate;
factory_N = mkN01 "kArKAnh" inanimate;
father_N2 = (mkN02 "pdr" animate) ** {c=""};
fear_VS = mkV_1 "trsydn";
find_V2 = mkV2 (compoundV "pydA" (mkV "krdn" "kn") ) "rA";
fish_N = mkN01 "mAhy" animate;
floor_N = mkN01 "zmyn" inanimate; -- Note: floor in persian can have 3 different translations
forget_V2 = mkV2 (compoundV "frAmvC" (mkV "krdn" "kn")) "rA" ;
fridge_N = mkN01 "yKc^Al" inanimate;
friend_N = mkN02 "dvst" animate;
fruit_N = mkN01 "myvh" inanimate;
-- fun_AV = mkAV "jAlb" ;
garden_N = mkN01 "bAG" inanimate;
girl_N = mkN02 "dKtr" animate;
glove_N = mkN01 "dstkC" inanimate;
gold_N = mkN01 "TlA" inanimate;
good_A = mkA "Kvb" ;
go_V = mkV "rftn" "rv";
green_A = mkA "sbz" ;
harbour_N = mkN "bndr" "bnAdr" inanimate;
-- hate_V2 = mkV2 (compoundV "mtnfr" (mkToBe "bvdn" "bAC" "hst")) "Az" False; -- needs from/ verb to be
hat_N = mkN01 "klAh" inanimate;
have_V2 = mkV2 haveVerb "rA" ;
hear_V2 = mkV2 (mkV "Cnydn" "Cnv") "rA" ;
hill_N = mkN01 "tph" inanimate;
-- hope_VS = compoundV "AmydvAr" (mkToBe "bvdn" "bAC" "hst");
horse_N = mkN01 "Asb" animate;
hot_A = mkA "dAG" ["dAG dAG"] ;
house_N = mkN01 "KAnh" inanimate;
important_A = mkA "mhm" ["bA Ahmyt"];
industry_N = mkN "Snct" "SnAyc" inanimate;
iron_N = mkN01 "A:hn" inanimate;
king_N = mkN "pAdCAh" "pAdCAhAn" animate;
know_V2 = mkV2 (mkV "CnAKtn" "CnAs") "rA";
know_VS = (mkV_1 "dAnstn");
know_VQ = (mkV_1 "dAnstn") ;
lake_N = mkN01 "dryAc^h" inanimate;
lamp_N = mkN01 "c^rAG" inanimate; -- also "lAmp", but they have different usage
learn_V2 = mkV2 (compoundV "yAd"(mkV "grftn" "gyr")) "rA";
leather_N = mkN01 "c^rm" inanimate; -- is uncountable
leave_V2 = mkV2 (compoundV "trk"(mkV "krdn" "kn")) "rA";
like_V2 = mkV2 (compoundV "dvst" haveVerb) "rA";
listen_V2 = mkV2 (compoundV "gvC" (mkV "dAdn" "dh")) "bh" False; -- has a diferent preposition :"bh"
live_V = compoundV "zndgy" (mkV "krdn" "kn");
long_A = mkA "blnd" ;
lose_V2 = mkV2 (compoundV "gm" (mkV "krdn" "kn")) "rA" ;
love_N = mkN01 "cCq" inanimate;
love_V2 = mkV2 (compoundV "dvst" haveVerb) "rA"; -- also possible: love_V2 = mkV2 (compoundV "cACq" (mkToBe "bvdn" "bAC" "hst"));
man_N = mkN02 "mrd" animate;
married_A2 = mkA "mtA?hl" "";
meat_N = mkN01 "gvCt" inanimate;
milk_N = mkN01 "Cyr" inanimate;
moon_N = mkN01 "mAh" inanimate; -- is this not a proper noun?
mother_N2 = (mkN02 "mAdr" animate) ** {c=""};
mountain_N = mkN01 "kvh" inanimate;
music_N = mkN "mvsyqy" "mvsyqy" animate;
narrow_A = mkA "bAryk" ;
new_A = mkA "nv" "tAzh";
newspaper_N = mkN01 "rvznAmh" inanimate;
oil_N = mkN "nft" "nft" inanimate; -- also "rvGn"
old_A = mkA "pyr" "pyrAnh";
open_V2 = mkV2 (compoundV "bAz" (mkV "krdn" "kn")) "rA";
paint_V2A = mkV2 (compoundV "rng" (mkV "krdn" "kn")) "rA" ;
paper_N = mkN01 "kAGW" inanimate;
paris_PN = mkPN "pArys" inanimate;
peace_N = mkN01 "SlH" inanimate; -- also "A:rAmC"
pen_N = mkN01 "qlm" inanimate; -- has variant "KvdkAr"
planet_N = mkN01 "syv2Arh" inanimate;
plastic_N = mkN01 "plAstyk" inanimate; -- is uncountable
play_V2 = mkV2 (mkV "nvAKtn" "nvAz") "rA" ;
policeman_N = mkCmpdNoun2 (mkN02 "mA?mvr" animate) "plys";
priest_N = mkN01 "kCyC" animate;
-- probable_AS = mkAS (regA "mHtml") ;
queen_N = mkN01 "mlkh" animate;
radio_N = mkN01 "rAdyv" inanimate;
rain_V0 = compoundV "bArAn" (mkV "A:mdn" "A:y" ) ;
read_V2 = mkV2 (mkV_2 "KvAndn") "rA";
red_A = mkA "qrmz" ;
religion_N = mkN "mWhb" "mWAhb" inanimate;
restaurant_N = mkN01 "rstvrAn" inanimate;
river_N = mkN01 "rvdKAnh" inanimate;
rock_N = mkN01 "SKrh" inanimate;
roof_N = mkN01 "bAm" inanimate; -- has variant "sqf"
rubber_N = mkN01 "pAkkn" inanimate; -- also "lAstyk"
run_V = mkV_1 "dvydn" ;
say_VS = mkV "gftn" "gvy" ;
school_N = mkN "mdrsh" "mdArs" inanimate;
science_N = mkN "clm" "clvm" inanimate; -- also "dAnC"
sea_N = mkN01 "dryA" inanimate;
seek_V2 = mkV2 (compoundV "jstjv" (mkV "krdn" "kn")) "rA";
see_V2 = mkV2 (mkV "dydn" "byn") "rA" ;
sell_V3 = mkV3 (mkV "frvKtn" "frvC") "rA" "bh";
send_V3 = mkV3 (mkV_1 "frstAdn") "rA" "brAy";
sheep_N = mkN01 "gvsfnd" animate;
ship_N = mkN01 "kCty" inanimate;
shirt_N = mkN01 "pyrAhn" inanimate;
shoe_N = mkN01 "kfC" inanimate;
shop_N = mkN01 "frvCgAh" inanimate; -- has variant "mGAzh"
short_A = mkA "kvtAh" ;
silver_N = mkN "nqrh" ["nqrh jAt"] inanimate; -- add new function which applies + "jAt"
sister_N = mkN02 "KvAhr" animate;
sleep_V = mkV_1 "KvAbydn" ;
small_A = mkA "kvc^k" ;
snake_N = mkN01 "mAr" animate;
sock_N = mkN01 "jvrAb" inanimate;
speak_V2 = mkV2 (compoundV "SHbt" (mkV "krdn" "kn")) "" False;
star_N = mkN01 "stArh" animate;
steel_N = mkN01 "fvlAd" inanimate; -- also "Astyl"
stone_N = mkN01 "sng" inanimate;
stove_N = mkN01 "AjAq" inanimate;
student_N = mkCmpdNoun1 "dAnC" (mkN02 "A:mvz" animate); -- also "dAnCjv"
stupid_A = mkA "Ablh" "AblhAnh" ;
sun_N = mkN01 "KvrCyd" inanimate; -- is this not a proper noun?!!!
switch8off_V2 = mkV2 (compoundV "KAmvC" (mkV "krdn" "kn")) "rA";
switch8on_V2 = mkV2 (compoundV "rvCn" (mkV "krdn" "kn")) "rA";
table_N = mkN01 "myz" inanimate;
talk_V3 = mkV3 (compoundV "Hrf" (mkV "zdn" "zn")) "bA" [" drbArh y"];
teacher_N = mkN02 "mclm" animate;
teach_V2 = mkV2 (compoundV "A:mvzC" (mkV "dAdn" "dh")) "rA";
television_N = mkN01 "tlvzyvn" inanimate;
thick_A = mkA "klft" ;
thin_A = mkA "nAzk" ;
train_N = mkN01 "qTAr" inanimate;
travel_V = compoundV "sfr" (mkV "krdn" "kn");
tree_N = mkN02 "drKt" animate;
trousers_N = mkN01 "ClvAr" inanimate;
ugly_A = mkA "zCt" ;
understand_V2 = mkV2 (mkV_1 "fhmydn") "rA";
university_N = mkN01 "dAnCgAh" inanimate;
village_N = mkN01 "rvstA" inanimate;
-- wait_V2 = mkV2 (compoundV "mntZr" (mkVToBe "bvdn" "bAC"));
walk_V = compoundV "rAh" (mkV "rftn" "rv");
warm_A = mkA "grm" ;
war_N = mkN01 "jng" inanimate;
-- watch_V2 = mkV2 (compoundV "mrAqb" (mkVToBe "bvdn" "bAC")); -- check harfe rabt!!!
water_N = mkN01 "A:b" inanimate;
white_A = mkA "sfyd" ;
window_N = mkN01 "pnjrh" inanimate;
wine_N = mkN01 "CrAb" inanimate;
win_V2 = mkV2 (compoundV "brndh" (mkV "Cdn" "Cv")) "rA"; -- also possible with simple verb: mkV_2 "brdn"
woman_N = mkN02 "zn" animate;
-- wonder_VQ = compoundV "mtcjb" (mkVToBe "bvdn" "bAC") ;
wood_N = mkN01 "c^vb" inanimate;
write_V2 = mkV2 (mkV "nvCtn" "nvys") "rA" ;
yellow_A = mkA "zrd" ;
young_A = mkA "jvAn""jvAnAnh" ;
do_V2 = mkV2 (compoundV "AnjAm" (mkV "dAdn" "dh")) "rA";
now_Adv = ss "HAlA" ;
already_Adv = ss "qblAa." ;
song_N = mkN01 "A:vAz" inanimate;
add_V3 = mkV3 (compoundV "ADAfh" (mkV "krdn" "kn")) "rA" "bh" ;
number_N = mkN01 "cdd" inanimate; -- also "tcdAd"
put_V2 = mkV2 (mkV "gWACtn" "gWAr") "rA";
stop_V = compoundV "tvqf" (mkV "krdn" "kn");
jump_V = mkV_1 "prydn";
{-
left_Ord = {s = "c^p" ; n = singular};
right_Ord = {s= "rAst" ; n = singular};
-}
far_Adv = ss "dvr" ;
correct_A = mkA "drst" ;
dry_A = mkA "KCk" ["bh KCky"] ;
dull_A = mkA ["mlAl A:vr"] ["bh Trzy mlAl A:vr"] ;
full_A = mkA "pr" ;
heavy_A = mkA "sngyn" ;
near_A = mkA "nzdyk" ;
rotten_A = mkA "KrAb" ;
round_A = mkA "grd" ;
sharp_A = mkA "tyz" ;
smooth_A = mkA "nrm" ;
straight_A = mkA "mstqym" "mstqymAa.";
wet_A = mkA "Kys" ;
wide_A = mkA "phn" ;
animal_N = mkN "HyvAn" "HyvAnAt" animate;
ashes_N = mkN01 "KAkstr" inanimate;
back_N = mkN01 "kmr" inanimate;
bark_N = mkN01 "cvcv" inanimate;
belly_N = mkN01 "Ckm" inanimate;
blood_N = mkN01 "Kvn" inanimate;
bone_N = mkN01 "AstKvAn" inanimate;
breast_N = mkN01 "synh" inanimate;
cloud_N = mkN01 "Abr" inanimate;
day_N = mkN01 "rvz" inanimate;
dust_N = mkN01 "GbAr" inanimate;
ear_N = mkN01 "gvC" inanimate;
earth_N = mkN01 "zmyn" inanimate; -- also "KAk"
egg_N = mkCmpdNoun1 "tKm" (mkN01 "mrG" inanimate);
eye_N = mkN01 "c^Cm" inanimate ;
fat_N = mkN01 "c^rby" inanimate;
feather_N = mkN01 "pr" inanimate;
fingernail_N = mkN01 "nAKn" inanimate;
fire_N = mkN01 "A:tC" inanimate;
flower_N = mkN01 "gl" inanimate;
fog_N = mkN01 "mh" inanimate;
foot_N = mkN01 "pA" inanimate;
forest_N = mkN01 "jngl" inanimate;
grass_N = mkN01 "c^mn" inanimate;
guts_N = mkN01 "ChAmt" inanimate;
hair_N = mkN01 "mv" inanimate;
hand_N = mkN01 "dst" inanimate;
head_N = mkN01 "sr" inanimate;
heart_N = mkN01 "qlb" inanimate;
horn_N = mkN01 "bvq" inanimate; -- also "CAK"
husband_N = mkN02 "Cvhr" animate;
ice_N = mkN01 "yK" inanimate;
knee_N = mkN01 "zAnv" inanimate;
leaf_N = mkN01 "brg" inanimate;
leg_N = mkN01 "pA" inanimate;
liver_N = mkN01 "rvdKAnh" inanimate;
louse_N = mkN01 "CpC" inanimate;
mouth_N = mkN01 "dhAn" inanimate;
name_N = mkN01 "nAm" inanimate; -- has variant "Asm"
neck_N = mkN01 "grdn" inanimate;
night_N = mkN01 "Cb" inanimate;
nose_N = mkN01 "byny" inanimate;
person_N = mkN "CKS" "ACKAS" animate;
rain_N = mkN01 "bArAn" inanimate;
road_N = mkN01 "jAdh" inanimate;
root_N = mkN01 "ryCh" inanimate;
rope_N = mkN01 "TnAb" inanimate;
salt_N = mkN01 "nmk" inanimate;
sand_N = mkN01 "mAsh" inanimate;
seed_N = mkN01 "dAnh" inanimate;
skin_N = mkN01 "pvst" inanimate;
sky_N = mkN01 "A:smAn" inanimate;
smoke_N = mkN01 "dvd" inanimate;
snow_N = mkN01 "brf" inanimate;
stick_N = mkN01 "trkh" inanimate;
tail_N = mkN01 "dm" inanimate;
tongue_N = mkN01 "zbAn" inanimate;
tooth_N = mkN01 "dndAn" inanimate;
wife_N = mkN02 "hmsr" animate;
wind_N = mkN01 "bAd" inanimate;
wing_N = mkN01 "bAl" inanimate;
worm_N = mkN01 "krm" inanimate;
year_N = mkN01 "sAl" inanimate;
blow_V = mkV_1 "dmydn" ;
breathe_V = compoundV "nfs" (mkV_1 "kCydn");
burn_V = mkV "svKtn" "svz" ;
dig_V = mkV_2 "kndn" ;
fall_V = mkV_1 "AftAdn" ;
-- float_V = compoundV "CnAvr" (mkToBe "bvdn" "bAC" "hst") ;
flow_V = compoundV "jAry" (mkV "Cdn" "Cv") ;
fly_V = compoundV "prvAz" (mkV "krdn" "kn") ;
freeze_V = compoundV "yK" (mkV "zdn" "zn") ;
give_V3 = mkV3 (mkV "dAdn" "dh") "rA" "bh";
laugh_V = mkV_1 "Kndydn" ;
lie_N = mkN01 "drvG" inanimate;
lie_V = compoundV "drvG" (mkV "gftn" "gv" );
play_V = compoundV "bAzy" (mkV "krdn" "kn");
sew_V = mkV "dvKtn" "dvz" ;
sing_V = compoundV "A:vAz" (mkV_2 "KvAndn");
sit_V = mkV "nCstn" "nCyn" ;
smell_V = compoundV "bv" (mkV "dAdn" "dh");
spit_V = compoundV "tf" (mkV "krdn" "kn");
stand_V = mkV_1 "AystAdn";
swell_V = compoundV "vrm" (mkV "krdn" "kn");
swim_V = compoundV "CnA" (mkV "krdn" "kn");
think_V = compoundV "fkr" (mkV "krdn" "kn");
turn_V = mkV_1 "c^rKydn" ;
vomit_V = compoundV "AstfrAG" (mkV "krdn" "kn");
bite_V2 = mkV2 (compoundV "gAz" (mkV "grftn" "gyr")) "rA";
count_V2 = mkV2 (mkV_2 "CmArdn") "rA";
cut_V2 = mkV2 (mkV_1 "brydn") ;
fear_V2 = mkV2 (mkV_1 "trsydn") "Az";
fight_V2 = mkV2 (mkV_1 "jngydn") "bA" False;
hit_V2 = mkV2 (compoundV "Drbh" (mkV "zdn" "zn")) "bh" False;
hold_V2 = mkV2 (compoundV "ngh" haveVerb) "rA";
hunt_V2 = mkV2 (compoundV "CkAr" (mkV "krdn" "kn")) "rA";
kill_V2 = mkV2 ( mkV_2 "kCtn") "rA";
pull_V2 = mkV2 (mkV_1 "kCydn") "rA";
push_V2 = mkV2 (compoundV "hl" (mkV "dAdn" "dh")) "rA" ;
rub_V2 = mkV2 (mkV_1 "mAlydn") "rA";
scratch_V2 = mkV2 (mkV_1 "KrACydn") "rA" ;
split_V2 = mkV2 (compoundV "tqsym" (mkV "krdn" "kn")) "rA";
squeeze_V2 = mkV2 (compoundV "lh" (mkV "krdn" "kn")) "rA";
stab_V2 = mkV2 (compoundV "c^Aqv" (mkV "zdn" "zn")) "bh" False;
suck_V2 = mkV2 (mkV_1 "mkydn") "rA" ;
throw_V2 = mkV2 (compoundV "prtAb" (mkV "krdn" "kn")) "rA";
tie_V2 = mkV2 (compoundV "grh" (mkV "zdn" "zn")) "rA";
wash_V2 = mkV2 (mkV "Cstn" "Cvr") "rA" ; -- also "Cvy" which is the very formal form of the present root
wipe_V2 = mkV2 (compoundV "pAk" (mkV "krdn" "kn")) "rA";
---- other_A = regA "dygr" ;
grammar_N = mkCmpdNoun1 "dstvr" (mkN01 "zbAn" inanimate);
language_N = mkN01 "zbAn" inanimate;
rule_N = mkN "qAnvn" "qvAnyn" inanimate;
---- added 4/6/2007
john_PN = mkPN "jAn" inanimate;
question_N = mkN01 "sw?Al" inanimate; -- has variant "prsC"
ready_A = mkA "A:mAdh" ["bA A:mAdgy"] ;
reason_N = mkN "dlyl" "dlAyl" inanimate;
today_Adv = ss "Amrvz" ;
uncertain_A = mkA "nAmclvm" ["bA trdyd"];
}

View File

@@ -1,507 +0,0 @@
--# -path=.:../../prelude
--
----1 A Simple Punjabi Resource Morphology
----
---- Shafqat Virk, Aarne Ranta,2010
----
---- This resource morphology contains definitions needed in the resource
---- syntax. To build a lexicon, it is better to use $ParadigmsPnb$, which
---- gives a higher-level access to this module.
--
resource MorphoPes = ResPes ** open Prelude,Predef in {
flags optimize=all ;
coding = utf8;
----2 Nouns
oper
mkN : (x1,x2 : Str) -> Animacy -> Noun =
\sg,pl,ani -> {
s = table {
bEzafa => table { Sg => sg ;
Pl => pl
} ;
aEzafa => table { Sg => mkEzafa sg ;
Pl => mkEzafa pl
} ;
enClic => table { Sg => mkEnclic sg ;
Pl => mkEnclic pl
}
};
animacy = ani ;
definitness = True
} ;
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
-- Arabic nouns ends with h. also taken as Masc
------------------------------------------------------------------
----Verbs
------------------------------------------------------------------
{-
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
let root1 = (tk 1 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
--1. Basic stem form, direct & indirect causatives exists
-- v1 nechna nechaana nechwana
mkVerb1 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 3 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
mkVerb2 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 2 inf) ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
VF tense aspect person number => (mkCmnVF root1 root2 tense aspect person number).s
-- Caus1 tense person number gender => (mkCmnVF root1 tense person number gender).s ;
-- Caus2 tense person number gender => (mkCmnVF root2 tense person number gender).s
}
} ;
mkCmnVF : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
{s = (mkCmnVF1 root1 root2 t a p n).s ;
};
mkCmnVF1 : Str -> Str -> VTense -> PAspect -> PPerson -> Number -> {s:Str}= \root1,root2,t,a,p,n ->
{s = let khordh = root1 + "h";
mekhor = "my" ++ root2 ;
mekhord = "my" ++ root1 ;
mekhordh = "my" ++ khordh ;
khah = "KvAh" ;
mekhah = "my" ++ khah ;
bvdh = "bvdh"
in
case <t,a,p,n> of {
<PPresent,PPerf,PPers1,Sg> => khordh ++ "Am" ;
<PPresent,PPerf,PPers1,Pl> => khordh ++ "Aym" ;
<PPresent,PPerf,PPers2,Sg> => khordh ++ "Ay" ;
<PPresent,PPerf,PPers2,Pl> => khordh ++ "Ayd" ;
<PPresent,PPerf,PPers3,Sg> => khordh ++ "Ast" ;
<PPresent,PPerf,PPers3,Pl> => khordh ++ "And" ;
<PPresent,PImperf,PPers1,Sg> => mekhor + "m" ; -- toHave need to have khor instead of mekhor
<PPresent,PImperf,PPers1,Pl> => mekhor + "ym" ;
<PPresent,PImperf,PPers2,Sg> => mekhor + "y" ;
<PPresent,PImperf,PPers2,Pl> => mekhor + "yd" ;
<PPresent,PImperf,PPers3,Sg> => mekhor + "d" ;
<PPresent,PImperf,PPers3,Pl> => mekhor + "nd" ;
<PPresent,Aorist,PPers1,Sg> => "" ;
<PPresent,Aorist,PPers1,Pl> => "" ;
<PPresent,Aorist,PPers2,Sg> => "" ;
<PPresent,Aorist,PPers2,Pl> => "" ;
<PPresent,Aorist,PPers3,Sg> => "" ;
<PPresent,Aorist,PPers3,Pl> => "" ;
<PPast,PPerf,PPers1,Sg> => khordh ++ "bvdm" ;
<PPast,PPerf,PPers1,Pl> => khordh ++ "bvdym" ;
<PPast,PPerf,PPers2,Sg> => khordh ++ "bvdy" ;
<PPast,PPerf,PPers2,Pl> => khordh ++ "bvdyd" ;
<PPast,PPerf,PPers3,Sg> => khordh ++ "bvd" ;
<PPast,PPerf,PPers3,Pl> => khordh ++ "bvdnd" ;
<PPast,PImperf,PPers1,Sg> => mekhord + "m" ; -- toHave need to have khor instead of mekhor
<PPast,PImperf,PPers1,Pl> => mekhord + "ym" ;
<PPast,PImperf,PPers2,Sg> => mekhord + "y";
<PPast,PImperf,PPers2,Pl> => mekhord + "yd" ;
<PPast,PImperf,PPers3,Sg> => mekhord ;
<PPast,PImperf,PPers3,Pl> => mekhord + "nd" ;
<PPast,Aorist,PPers1,Sg> => root1 + "m" ;
<PPast,Aorist,PPers1,Pl> => root1 + "ym" ;
<PPast,Aorist,PPers2,Sg> => root1 + "y";
<PPast,Aorist,PPers2,Pl> => root1 + "yd" ;
<PPast,Aorist,PPers3,Sg> => root1 ;
<PPast,Aorist,PPers3,Pl> => root1 + "nd" ;
-- check this one
<PFut,PPerf,PPers1,Sg> => "" ;
<PFut,PPerf,PPers1,Pl> => "" ;
<PFut,PPerf,PPers2,Sg> => "" ;
<PFut,PPerf,PPers2,Pl> => "" ;
<PFut,PPerf,PPers3,Sg> => "" ;
<PFut,PPerf,PPers3,Pl> => "" ;
<PFut,PImperf,PPers1,Sg> => mekhah + "m" ++ addBh root2 + "m" ;
<PFut,PImperf,PPers1,Pl> => mekhah + "ym" ++ addBh root2 + "ym" ;
<PFut,PImperf,PPers2,Sg> => mekhah + "y" ++ addBh root2 + "y" ;
<PFut,PImperf,PPers2,Pl> => mekhah + "yd" ++ addBh root2 + "yd" ;
<PFut,PImperf,PPers3,Sg> => mekhah + "d" ++ addBh root2 + "d" ;
<PFut,PImperf,PPers3,Pl> => mekhah + "nd" ++ addBh root2 + "nd" ;
<PFut,Aorist,PPers1,Sg> => khah + "m" ++ root1 ;
<PFut,Aorist,PPers1,Pl> => khah + "ym" ++ root1 ;
<PFut,Aorist,PPers2,Sg> => khah + "y" ++ root1 ;
<PFut,Aorist,PPers2,Pl> => khah + "yd" ++ root1 ;
<PFut,Aorist,PPers3,Sg> => khah + "d" ++ root1 ;
<PFut,Aorist,PPers3,Pl> => khah + "nd" ++ root1 ;
<Infr_Past,PPerf,PPers1,Sg> => khordh ++ bvdh ++ "Am" ;
<Infr_Past,PPerf,PPers1,Pl> => khordh ++ bvdh ++ "Aym" ;
<Infr_Past,PPerf,PPers2,Sg> => khordh ++ bvdh ++ "Ay" ;
<Infr_Past,PPerf,PPers2,Pl> => khordh ++ bvdh ++ "Ayd" ;
<Infr_Past,PPerf,PPers3,Sg> => khordh ++ bvdh ++ "Ast" ;
<Infr_Past,PPerf,PPers3,Pl> => khordh ++ bvdh ++ "And" ;
<Infr_Past,PImperf,PPers1,Sg> => mekhordh ++ "Am" ; -- toHave need to have khordh instead of mekhor
<Infr_Past,PImperf,PPers1,Pl> => mekhordh ++ "Aym" ;
<Infr_Past,PImperf,PPers2,Sg> => mekhordh ++ "Ay" ;
<Infr_Past,PImperf,PPers2,Pl> => mekhordh ++ "Ayd" ;
<Infr_Past,PImperf,PPers3,Sg> => mekhordh ++ "Ast" ;
<Infr_Past,PImperf,PPers3,Pl> => mekhordh ++ "And" ;
-- check this one
<Infr_Past,Aorist,PPers1,Sg> => "" ;
<Infr_Past,Aorist,PPers1,Pl> => "" ;
<Infr_Past,Aorist,PPers2,Sg> => "" ;
<Infr_Past,Aorist,PPers2,Pl> => "" ;
<Infr_Past,Aorist,PPers3,Sg> => "" ;
<Infr_Past,Aorist,PPers3,Pl> => ""
}
} ;
-}
mkVerb : (x1,x2 : Str) -> Verb = \inf,root2 ->
let root1 = (tk 1 inf) ;
impRoot = mkimpRoot root2;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "yd" ;
Imp Neg Sg => "n" + impRoot ;
Imp Neg Pl => "n" + impRoot + "yd" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
} ;
mkVerb1 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 3 inf) ;
impRoot = mkimpRoot root2 ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "yd" ;
Imp Neg Sg => "n" + impRoot ;
Imp Neg Pl => "n" + impRoot + "yd" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
};
mkVerb2 : (_: Str) -> Verb = \inf ->
let root1 = (tk 1 inf) ;
root2 = (tk 2 inf) ;
impRoot = mkimpRoot root2 ;
in {
s = table {
Root1 => root1 ;
Root2 => root2 ;
Inf => inf ;
Imp Pos Sg => addBh impRoot ;
Imp Pos Pl => (addBh impRoot) + "yd" ;
Imp Neg Sg => "n" + impRoot ;
Imp Neg Pl => "n" + impRoot + "yd" ;
VF pol tense person number => (mkCmnVF root1 root2 pol tense person number).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes number person) => (mkvVform root2 number person).s
}
} ;
mkHave : Verb =
{
s = table {
Root1 => "dACt" ;
Root2 => "dAr" ;
Inf => "dACtn" ;
Imp Pos Sg => ["dACth bAC"] ;
Imp Pos Pl => ["dACth bACyd"];
Imp Neg Sg => ["ndACth bAC"] ;
Imp Neg Pl => ["ndACth bACyd"] ;
VF pol tense person number => (toHave pol tense number person).s ;
-- VF Neg tense person number => addN (mkCmnVF root1 root2 tense person number).s ;
Vvform (AgPes Sg PPers1) => ["dACth bACm"] ;
Vvform (AgPes Sg PPers2) => ["dACth bACy"] ;
Vvform (AgPes Sg PPers3) => ["dACth bACd"] ;
Vvform (AgPes Pl PPers1) => ["dACth bACym"] ;
Vvform (AgPes Pl PPers2) => ["dACth bACyd"] ;
Vvform (AgPes Pl PPers3) => ["dACth bACnd"]
}
} ;
mkCmnVF : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
{s = (mkCmnVF1 root1 root2 pol t p n).s ;
};
mkCmnVF1 : Str -> Str -> Polarity -> VTense2 -> PPerson -> Number -> {s:Str}= \root1,root2,pol,t,p,n ->
{s = let khordh = root1 + "h";
nkhordh = (addN root1) + "h" ;
mekhor = "my" ++ root2 ;
nmekhor = "nmy" ++ root2 ;
mekhord = "my" ++ root1 ;
nmekhord = "nmy" ++ root1 ;
mekhordh = "my" ++ khordh ;
nmekhordh = "nmy" ++ khordh ;
khah = "KvAh" ;
nkhah = "nKvAh" ;
mekhah = "my" ++ khah ;
nmekhah = "nmy" ++ khah ;
bvdh = "bvdh"
in
case <pol,t,p,n> of {
<Pos,PPresent2 PrPerf,PPers1,Sg> => khordh ++ "Am" ;
<Pos,PPresent2 PrPerf,PPers1,Pl> => khordh ++ "Aym" ;
<Pos,PPresent2 PrPerf,PPers2,Sg> => khordh ++ "Ay" ;
<Pos,PPresent2 PrPerf,PPers2,Pl> => khordh ++ "Ayd" ;
<Pos,PPresent2 PrPerf,PPers3,Sg> => khordh ++ "Ast" ;
<Pos,PPresent2 PrPerf,PPers3,Pl> => khordh ++ "And" ;
<Pos,PPresent2 PrImperf,PPers1,Sg> => mekhor + "m" ;
<Pos,PPresent2 PrImperf,PPers1,Pl> => mekhor + "ym" ;
<Pos,PPresent2 PrImperf,PPers2,Sg> => mekhor + "y" ;
<Pos,PPresent2 PrImperf,PPers2,Pl> => mekhor + "yd" ;
<Pos,PPresent2 PrImperf,PPers3,Sg> => mekhor + "d" ;
<Pos,PPresent2 PrImperf,PPers3,Pl> => mekhor + "nd" ;
<Pos,PPast2 PstPerf,PPers1,Sg> => khordh ++ "bvdm" ;
<Pos,PPast2 PstPerf,PPers1,Pl> => khordh ++ "bvdym" ;
<Pos,PPast2 PstPerf,PPers2,Sg> => khordh ++ "bvdy" ;
<Pos,PPast2 PstPerf,PPers2,Pl> => khordh ++ "bvdyd" ;
<Pos,PPast2 PstPerf,PPers3,Sg> => khordh ++ "bvd" ;
<Pos,PPast2 PstPerf,PPers3,Pl> => khordh ++ "bvdnd" ;
<Pos,PPast2 PstImperf,PPers1,Sg> => mekhord + "m" ;
<Pos,PPast2 PstImperf,PPers1,Pl> => mekhord + "ym" ;
<Pos,PPast2 PstImperf,PPers2,Sg> => mekhord + "y";
<Pos,PPast2 PstImperf,PPers2,Pl> => mekhord + "yd" ;
<Pos,PPast2 PstImperf,PPers3,Sg> => mekhord ;
<Pos,PPast2 PstImperf,PPers3,Pl> => mekhord + "nd" ;
<Pos,PPast2 PstAorist,PPers1,Sg> => root1 + "m" ;
<Pos,PPast2 PstAorist,PPers1,Pl> => root1 + "ym" ;
<Pos,PPast2 PstAorist,PPers2,Sg> => root1 + "y";
<Pos,PPast2 PstAorist,PPers2,Pl> => root1 + "yd" ;
<Pos,PPast2 PstAorist,PPers3,Sg> => root1 ;
<Pos,PPast2 PstAorist,PPers3,Pl> => root1 + "nd" ;
{-
<Pos,PFut2 FtImperf,PPers1,Sg> => mekhah + "m" ++ addBh root2 + "m" ;
<Pos,PFut2 FtImperf,PPers1,Pl> => mekhah + "ym" ++ addBh root2 + "ym" ;
<Pos,PFut2 FtImperf,PPers2,Sg> => mekhah + "y" ++ addBh root2 + "y" ;
<Pos,PFut2 FtImperf,PPers2,Pl> => mekhah + "yd" ++ addBh root2 + "yd" ;
<Pos,PFut2 FtImperf,PPers3,Sg> => mekhah + "d" ++ addBh root2 + "d" ;
<Pos,PFut2 FtImperf,PPers3,Pl> => mekhah + "nd" ++ addBh root2 + "nd" ;
-}
<Pos,PFut2 FtAorist,PPers1,Sg> => khah + "m" ++ root1 ;
<Pos,PFut2 FtAorist,PPers1,Pl> => khah + "ym" ++ root1 ;
<Pos,PFut2 Ftorist,PPers2,Sg> => khah + "y" ++ root1 ;
<Pos,PFut2 FtAorist,PPers2,Pl> => khah + "yd" ++ root1 ;
<Pos,PFut2 FtAorist,PPers3,Sg> => khah + "d" ++ root1 ;
<Pos,PFut2 FtAorist,PPers3,Pl> => khah + "nd" ++ root1 ;
<Pos,Infr_Past2 InfrPerf,PPers1,Sg> => khordh ++ bvdh ++ "Am" ;
<Pos,Infr_Past2 InfrPerf,PPers1,Pl> => khordh ++ bvdh ++ "Aym" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Sg> => khordh ++ bvdh ++ "Ay" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Pl> => khordh ++ bvdh ++ "Ayd" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Sg> => khordh ++ bvdh ++ "Ast" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Pl> => khordh ++ bvdh ++ "And" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Sg> => mekhordh ++ "Am" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Pl> => mekhordh ++ "Aym" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Sg> => mekhordh ++ "Ay" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Pl> => mekhordh ++ "Ayd" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Sg> => mekhordh ++ "Ast" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Pl> => mekhordh ++ "And" ;
-- negatives
<Neg,PPresent2 PrPerf,PPers1,Sg> => addN khordh ++ "Am" ;
<Neg,PPresent2 PrPerf,PPers1,Pl> => addN khordh ++ "Aym" ;
<Neg,PPresent2 PrPerf,PPers2,Sg> => addN khordh ++ "Ay" ;
<Neg,PPresent2 PrPerf,PPers2,Pl> => addN khordh ++ "Ayd" ;
<Neg,PPresent2 PrPerf,PPers3,Sg> => addN khordh ++ "Ast" ;
<Neg,PPresent2 PrPerf,PPers3,Pl> => addN khordh ++ "And" ;
<Neg,PPresent2 PrImperf,PPers1,Sg> => nmekhor + "m" ;
<Neg,PPresent2 PrImperf,PPers1,Pl> => nmekhor + "ym" ;
<Neg,PPresent2 PrImperf,PPers2,Sg> => nmekhor + "y" ;
<Neg,PPresent2 PrImperf,PPers2,Pl> => nmekhor + "yd" ;
<Neg,PPresent2 PrImperf,PPers3,Sg> => nmekhor + "d" ;
<Neg,PPresent2 PrImperf,PPers3,Pl> => nmekhor + "nd" ;
<Neg,PPast2 PstPerf,PPers1,Sg> => nkhordh ++ "bvdm" ;
<Neg,PPast2 PstPerf,PPers1,Pl> => nkhordh ++ "bvdym" ;
<Neg,PPast2 PstPerf,PPers2,Sg> => nkhordh ++ "bvdy" ;
<Neg,PPast2 PstPerf,PPers2,Pl> => nkhordh ++ "bvdyd" ;
<Neg,PPast2 PstPerf,PPers3,Sg> => nkhordh ++ "bvd" ;
<Neg,PPast2 PstPerf,PPers3,Pl> => nkhordh ++ "bvdnd" ;
<Neg,PPast2 PstImperf,PPers1,Sg> => nmekhord + "m" ;
<Neg,PPast2 PstImperf,PPers1,Pl> => nmekhord + "ym" ;
<Neg,PPast2 PstImperf,PPers2,Sg> => nmekhord + "y";
<Neg,PPast2 PstImperf,PPers2,Pl> => nmekhord + "yd" ;
<Neg,PPast2 PstImperf,PPers3,Sg> => nmekhord ;
<Neg,PPast2 PstImperf,PPers3,Pl> => nmekhord + "nd" ;
<Neg,PPast2 PstAorist,PPers1,Sg> => addN root1 + "m" ;
<Neg,PPast2 PstAorist,PPers1,Pl> => addN root1 + "ym" ;
<Neg,PPast2 PstAorist,PPers2,Sg> => addN root1 + "y";
<Neg,PPast2 PstAorist,PPers2,Pl> => addN root1 + "yd" ;
<Neg,PPast2 PstAorist,PPers3,Sg> => addN root1 ;
<Neg,PPast2 PstAorist,PPers3,Pl> => addN root1 + "nd" ;
{-
<Neg,PFut2 FtImperf,PPers1,Sg> => nmekhah + "m" ++ addBh root2 + "m" ;
<Neg,PFut2 FtImperf,PPers1,Pl> => nmekhah + "ym" ++ addBh root2 + "ym" ;
<Neg,PFut2 FtImperf,PPers2,Sg> => nmekhah + "y" ++ addBh root2 + "y" ;
<Neg,PFut2 FtImperf,PPers2,Pl> => nmekhah + "yd" ++ addBh root2 + "yd" ;
<Neg,PFut2 FtImperf,PPers3,Sg> => nmekhah + "d" ++ addBh root2 + "d" ;
<Neg,PFut2 FtImperf,PPers3,Pl> => nmekhah + "nd" ++ addBh root2 + "nd" ;
-}
<Neg,PFut2 FtAorist,PPers1,Sg> => nkhah + "m" ++ root1 ;
<Neg,PFut2 FtAorist,PPers1,Pl> => nkhah + "ym" ++ root1 ;
<Neg,PFut2 Ftorist,PPers2,Sg> => nkhah + "y" ++ root1 ;
<Neg,PFut2 FtAorist,PPers2,Pl> => nkhah + "yd" ++ root1 ;
<Neg,PFut2 FtAorist,PPers3,Sg> => nkhah + "d" ++ root1 ;
<Neg,PFut2 FtAorist,PPers3,Pl> => nkhah + "nd" ++ root1 ;
<Neg,Infr_Past2 InfrPerf,PPers1,Sg> => nkhordh ++ bvdh ++ "Am" ;
<Neg,Infr_Past2 InfrPerf,PPers1,Pl> => nkhordh ++ bvdh ++ "Aym" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Sg> => nkhordh ++ bvdh ++ "Ay" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Pl> => nkhordh ++ bvdh ++ "Ayd" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Sg> => nkhordh ++ bvdh ++ "Ast" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Pl> => nkhordh ++ bvdh ++ "And" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Sg> => nmekhordh ++ "Am" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Pl> => nmekhordh ++ "Aym" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Sg> => nmekhordh ++ "Ay" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Pl> => nmekhordh ++ "Ayd" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Sg> => nmekhordh ++ "Ast" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Pl> => nmekhordh ++ "And"
}
} ;
mkvVform : Str -> Number -> PPerson -> {s: Str} = \root2,n,p ->
{s =
case <n,p> of {
<Sg,PPers1> => addBh root2 + "m" ;
<Sg,PPers2> => addBh root2 + "y" ;
<Sg,PPers3> => addBh root2 + "d" ;
<Pl,PPers1> => addBh root2 + "ym" ;
<Pl,PPers2> => addBh root2 + "yd" ;
<Pl,PPers3> => addBh root2 + "nd"
}
};
mkimpRoot : Str -> Str ;
mkimpRoot root =
case root of {
st + "y" => st ;
_ => root
};
addBh : Str -> Str ;
addBh str =
case (take 1 str) of {
"A" => "by" + str ;
"A:" => "byA" + (drop 1 str) ;
_ => "b" + str
};
---------------------
--Determiners
--------------------
makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; fromPron : Bool} =\str,n,b -> {
s = str;
isNum = b;
fromPron = False ;
n = n
};
makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; fromPron : Bool } = \sg,pl -> {
s = table {Sg => sg ; Pl => pl} ;
fromPron = False ;
a = agrPesP3 Sg
};
---------------------------
-- Adjectives
--------------------------
mkAdj : Str -> Str -> Adjective = \adj,adv -> {
s = table { bEzafa => adj;
aEzafa => mkEzafa adj ;
enClic => mkEnclic adj
} ;
adv = adv
};
}

View File

@@ -1,140 +0,0 @@
--# -path=.:../abstract:../common:
concrete NumeralPes of Numeral = CatPes [Numeral,Digits] ** open ResPes,Prelude in {
flags coding = utf8;
param DForm = unit | teen | ten | hundreds |thousands;
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
param Size = singl | less100 | more100 ;
lincat
Digit = {s : DForm => CardOrd => Str} ;
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
Sub100 = {s : CardOrd => Str ; n : Number} ;
Sub1000 = {s : CardOrd => Str ; n : Number} ;
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
lin num x = x ;
-- 2 12 20 200
lin n2 = mkNum "dv" "dvAzdh" "byst" "dvyst" ;
lin n3 = mkNum3 "sh" "syzdh" "sy" "sySd" "svm" ;
lin n4 = mkNum "c^hAr" "c^hArdh" "c^hl" "c^hArSd" ;
lin n5 = mkNum "pnj" "pAnzdh" "pnjAh" "pAnSd" ;
lin n6 = mkNum "CC" "CAnzdh" "CSt" "CCSd" ;
lin n7 = mkNum "hft" "hfdh" "hftAd" "hftSd" ;
lin n8 = mkNum "hCt" "hjdh" "hCtAd" "hCtSd" ;
lin n9 = mkNum "nh" "nvzdh" "nvd" "nhSd" ;
lin pot01 = mkNum3 "yk" "yAzdh" "dh" "ykSd" "hzAr" ** {n = Sg} ;
lin pot0 d = d ** {n = Pl} ;
lin pot110 = {s = table { NCard => "dh" ;
NOrd => "dhm" };
n = Pl} ;
lin pot111 = {s = table { NCard => "yAzdh" ;
NOrd => "yAzdhm" };
n = Pl};
lin pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
lin pot0as1 n = {s = n.s ! unit} ** {n = n.n} ;
lin pot1 d = {s = d.s ! ten} ** {n = Pl} ;
lin pot1plus d e = {
s = \\o => d.s ! ten ! NCard ++"v" ++e.s ! unit ! o ; n = Pl} ;
lin pot1as2 n = n ;
lin pot2 d = {s = d.s ! hundreds} ** {n = Pl} ;
lin pot2plus d e = {
s = \\o => d.s ! hundreds ! NCard ++ "v" ++ e.s ! o ; n = Pl} ; -- remove "??"
lin pot2as3 n = n ;
lin pot3 n = { s = \\o => n.s ! NCard ++ "hzAr" ; n = Pl} ;
lin pot3plus n m = {
s = \\o => n.s ! NCard ++ "hzAr" ++ "v" ++ m.s ! o; n = Pl} ; -- missing word "????????" after NCard
-- numerals as sequences of digits
lincat
Dig = TDigit ;
lin
IDig d = d ** {tail = T1} ;
{-
IIDig d i = {
s = \\o,c => d.s ! NCard ++ commaIf i.tail ++ i.s ! o ! c ;
n = Pl ;
-- tail = inc i.tail
} ;
-}
D_0 = mkDig "?" ;
D_1 = mk3Dig "?" "" Pl;
D_2 = mk2Dig "?" "";
D_3 = mk2Dig "?" "svm" ;
D_4 = mkDig "?" ;
D_5 = mkDig "?" ;
D_6 = mkDig "?" ;
D_7 = mkDig "?" ;
D_8 = mkDig "?" ;
D_9 = mkDig "?" ;
-- lin IDig d = { s = \\_ => d.s ; n = Sg} ;
lin IIDig d dg = { s = \\df => d.s ! NCard ++ dg.s ! df ; n = Pl};
oper
commaIf : DTail -> Str = \t -> case t of {
T3 => "," ;
_ => []
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "m") ;
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
-- s = table {NCard => regGenitiveS c ; NOrd => regGenitiveS o} ;
s = table {NCard => c ; NOrd => o} ;
n = n
} ;
oper TDigit = {
n : Number ;
s : CardOrd => Str
} ;
oper
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} =
\two, twelve, twenty, twohundred->
{s = table {
unit => table {NCard => two ; NOrd => (two + "myn") | (two + "m")};
teen => table {NCard => twelve ; NOrd => (twelve + "myn") | (twelve + "m")} ;
ten => table {NCard => twenty ; NOrd => (twenty + "myn") | (twenty + "m")};
hundreds => table {NCard => twohundred ; NOrd => (twohundred +"myn") | (twohundred + "m")};
thousands => table {NCard => (two + "hzAr" ); NOrd => (two + "hzAr" + "m") | (two + "hzAr" +"myn" )}
}};
mkNum3 : Str -> Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} =
\two, twelve, twenty, twohundred, second->
{s = table {
unit => table {NCard => two ; NOrd => second};
teen => table {NCard => twelve ; NOrd => (twelve + "myn") | (twelve + "m")} ;
ten => table {NCard => twenty ; NOrd => (twenty + "myn") | (twenty + "m")};
hundreds => table {NCard => twohundred ; NOrd => (twohundred +"myn") | (twohundred + "m")};
thousands => table {NCard => (two + "hzAr" ); NOrd => (two + "hzAr" + "m") | (two + "hzAr"+ "myn" )}
}};
}

View File

@@ -1,206 +0,0 @@
--# -path=.:../abstract:../../prelude:../common
--
----1 Pnbu Lexical Paradigms
resource ParadigmsPes = open
Predef,
Prelude,
MorphoPes,
CatPes
in {
flags optimize=all ;
coding = utf8;
--2 Parameters
oper
animate : Animacy ;
inanimate : Animacy ;
singular : Number;
plural : Number;
singular = Sg ; plural = Pl;
animate = Animate ; inanimate = Inanimate ; --i
mkN01 : Str -> Animacy -> Noun ;
mkN01 str ani = mkN str (str ++ "hA") ani;
mkN02 : Str -> Animacy -> Noun ;
mkN02 str ani = case (last str) of {
"h" => mkN str ((init str) + "gAn") ani ;
("A"|"v") => mkN str (str + "yAn") ani ;
_ => mkN str (str+"An") ani
};
{-
--2 Nouns
mkN2 : N -> Prep -> Str -> N2;
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
mkN3 : N -> Prep -> Str -> Str-> N3 ;
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
-}
-- Compound Nouns
mkCmpdNoun1 : Str -> N -> N
= \s,noun -> {s =\\ez,n => s ++ noun.s ! ez ! n ; animacy = noun.animacy ; definitness = noun.definitness ; lock_N = <>};
mkCmpdNoun2 : N -> Str -> N
= \noun,s -> {s =\\ez,n => noun.s ! ez ! n ++ s ; animacy = noun.animacy ; definitness =noun.definitness ; lock_N = <>};
-- Proper names
mkPN : Str -> Animacy -> PN =
\str,ani -> {s = str ; animacy = ani ; lock_PN = <>} ;
-- Personal Pronouns
personalPN : Str -> Number -> PPerson -> Pron =
\str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>};
{-
-- Demonstration Pronouns
demoPN : Str -> Str -> Str -> Quant =
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
-- Determiner
-}
mkDet = overload {
mkDet : Str -> Number -> Det =
\s1,n -> makeDet s1 n False ** { lock_Det = <>};
mkDet : Str -> Number -> Bool -> Det =
\s1,n,b -> makeDet s1 n b ** { lock_Det = <>};
};
{-
-- Intergative pronouns
mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP =
\s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
-- AdN
mkAdN : Str -> AdN = \s -> ss s ;
-}
--2 Adjectives
mkA = overload {
mkA : Str-> A
= \str -> mkAdj str str ** { lock_A = <>} ;
mkA : Str-> Str -> A
= \str,adv -> mkAdj str adv ** { lock_A = <>} ;
mkA : Str -> Str -> A2
= \a,c -> mkAdj a a ** { c2 = c ; lock_A2 = <>} ;
} ;
--2 Verbs
mkV : Str -> Str -> V
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
haveVerb : V = mkHave ;
mkV_1 : Str -> V
= \s -> mkVerb1 s ** {lock_V = <>} ;
mkV_2 : Str -> V
= \s -> mkVerb2 s ** {lock_V = <>} ;
mkV2 = overload {
-- mkV2 : Str -> V2
-- = \s -> mkV s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> V2
= \v -> v ** {c2 = {s = [] ; ra = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> Str -> V2
= \v,ra -> v ** {c2 = {ra = ra ; s = [] ; c = VTrans} ; lock_V2 = <>} ;
mkV2 : V -> Str -> Bool -> V2
= \v,p,b -> v ** {c2 = {ra = [] ; s = p ; c = VTrans} ; lock_V2 = <>} ;
} ;
mkV3 : V -> Str -> Str -> V3;
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
mkV2V : V -> Str -> Str -> Bool -> V2V ;
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
-- compund verbs
compoundV = overload {
compoundV : Str -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
compoundV : Str -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
};
----2 Adverbs
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
----2 Prepositions
mkPrep : Str -> Prep ;
mkPrep str = {s = str ; lock_Prep = <>};
{-
--3 Determiners and quantifiers
-- mkQuant : overload {
-- mkQuant : Pron -> Quant ;
-- mkQuant : (no_sg, no_pl, none_sg, : Str) -> Quant ;
-- } ;
-}
mkQuant = overload {
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
mkQuant : Str -> Str -> Quant = \sg,pl -> makeQuant sg pl;
} ;
{-
--2 Conjunctions
mkConj : overload {
mkConj : Str -> Conj ; -- and (plural agreement)
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument)
mkConj : Str -> Str -> Conj ; -- both ... and (plural)
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument)
} ;
mkConj = overload {
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
} ;
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
lin Conj (sd2 x y ** {n = n}) ;
-- mkV0 : V -> V0 ;
-- mkVS : V -> VS ;
-- mkV2S : V -> Prep -> V2S ;
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
-- mkV2V : V -> Prep -> Prep -> V2V ;
-- mkVA : V -> VA ;
-- mkV2A : V -> Prep -> V2A ;
-- mkVQ : V -> VQ ;
-- mkV2Q : V -> Prep -> V2Q ;
--
-- mkAS : A -> AS ;
-- mkA2S : A -> Prep -> A2S ;
-- mkAV : A -> AV ;
-- mkA2V : A -> Prep -> A2V ;
-- mkA2V a p = a ** {c2 = p.s } ;
--
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
---- $V0$ is just $V$; the second argument is treated as adverb.
--
-- V0 : Type ;
-- AS, A2S, AV, A2V : Type ;
--
----.
----2 Definitions of paradigms
----
---- The definitions should not bother the user of the API. So they are
---- hidden from the document.
--
-- Gender = MorphoHin.Gender ;
-- Number = MorphoHin.Number ;
-- Case = MorphoHin.Case ;
-- human = Masc ;
-- nonhuman = Neutr ;
-- masculine = Masc ;
-- feminine = Fem ;
-- singular = Sg ;
-- plural = Pl ;
-- nominative = Nom ;
-- genitive = Gen ;
-}
}

View File

@@ -1,54 +0,0 @@
concrete RelativePes of Relative = CatPes ** open ResPes in {
flags optimize=all_subs ;
coding = utf8;
lin
RelCl cl = {
s = \\t,p,o,agr => "kh" ++ cl.s ! t ! p ! o ;
};
-- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes
RelVP rp vp = {
s = \\t,p,o,ag =>
let
agr = case rp.a of {
RNoAg => ag ;
RAg a => a
} ;
cl = mkSClause (rp.s) agr vp;
-- cl = case t of {
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
-- };
in
cl.s ! t ! p ! ODir ;
-- c = Dir
} ;
---- Pied piping: "at which we are looking". Stranding and empty
---- relative are defined in $ExtraHin.gf$ ("that we are looking at",
---- "we are looking at").
--
RelSlash rp slash = {
s = \\t,p,o,agr => rp.s ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
-- };
-- c = Dir
} ;
FunRP p np rp = {
s = np.s ! NPC enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY
a = RAg np.a
} ;
IdRP = {
s = "kh" ;
a = RNoAg
} ;
}

View File

@@ -1,863 +0,0 @@
--# -path=.:../abstract:../common:../../prelude
--
--1 Pnbu auxiliary operations.
--
-- This module contains operations that are needed to make the
-- resource syntax work.
resource ResPes = ParamX ** open Prelude,Predef in {
flags optimize=all ;
coding = utf8;
param
Order = ODir | OQuest ;
Animacy = Animate | Inanimate ;
PMood = Del | Imper | PCond ;
PPerson = PPers1
| PPers2
| PPers3;
VerbForm1 = VF Polarity VTense2 PPerson Number
| Vvform AgrPes
| Imp Polarity Number
| Inf
| Root1 | Root2 ;
VTense2 = PPresent2 PrAspect | PPast2 PstAspect | PFut2 FtAspect| Infr_Past2 InfrAspect;
PrAspect = PrPerf | PrImperf ;
PstAspect = PstPerf | PstImperf | PstAorist ;
FtAspect = FtAorist ; -- just keep FtAorist
InfrAspect = InfrPerf | InfrImperf ;
AgrPes = AgPes Number PPerson;
Ezafa = bEzafa | aEzafa | enClic;
NPCase = NPC Ezafa ;
CardOrd = NCard | NOrd ;
RAgr = RNoAg | RAg AgrPes ;
-- RCase = RC Number Case ;
param
CPolarity =
CPos
|CNeg Bool; -- contracted or not
oper
Noun = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool } ;
Verb = {s : VerbForm1 => Str} ;
Compl : Type = {s : Str ; ra : Str ; c : VType} ;
Adjective = {s:Ezafa => Str ; adv : Str} ;
NP : Type = {s : NPCase => Str ; a : AgrPes ; animacy : Animacy } ;
Determiner = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ;
VPHSlash = VPH ** {c2 : Compl} ;
oper
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
Pos => CPos ;
Neg => CNeg b
} ;
-----------------------
--- Verb Phrase
-----------------------
oper
VPH : Type = {
s : VPHForm => {inf : Str} ;
obj : {s : Str ; a : AgrPes} ;
subj : VType ;
comp : AgrPes => Str;
vComp : AgrPes => Str;
inf : Str;
ad : Str;
embComp : Str ;
wish : Bool ;
} ;
param
VPHForm =
VPTense Polarity VPPTense AgrPes -- 9 * 12
-- | VPReq
| VPImp Polarity Number
-- | VPReqFut
| VVForm AgrPes
| VPStem1
| VPStem2
;
VPHTense =
VPres -- impf hum nahim "I go"
| VPast -- impf Ta nahim "I went"
| VFut -- fut na/nahim "I shall go"
| VPerfPres -- perf hum na/nahim "I have gone"
| VPerfPast -- perf Ta na/nahim "I had gone"
| VPerfFut
| VCondSimul
| VCondAnter -- subj na "I may go"
;
VType = VIntrans | VTrans | VTransPost ;
VPPTense =
VPPres Anteriority
|VPPast Anteriority
|VPFutr Anteriority
|VPCond Anteriority ;
oper
predV : Verb -> VPH = \verb -> {
s = \\vh =>
case vh of {
VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrImperf) p n } ;
VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ;
VPTense pol (VPPast Simul) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstAorist) p n } ;
VPTense pol (VPPast Anter) (AgPes n p) => { inf =verb.s ! VF pol (PPast2 PstPerf) p n } ;
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.s ! VF pol (PFut2 FtAorist) p n } ;
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPresent2 PrPerf) p n } ; -- this is to be confirmed
VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ;
VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.s ! VF pol (PPast2 PstImperf) p n } ;
VVForm (AgPes n p) => {inf = verb.s ! Vvform (AgPes n p)} ;
VPStem1 => { inf = verb.s ! Root1};
VPStem2 => { inf = verb.s ! Root2} ;
VPImp pol n => { inf = verb.s ! Imp pol n}
};
obj = {s = [] ; a = defaultAgrPes} ;
subj = VIntrans ;
inf = verb.s ! Inf;
ad = [];
embComp = [];
wish = False ;
vComp = \\_ => [] ;
comp = \\_ => []
} ;
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
predV verb ** {c2 = {s = verb.c1 ; ra = [] ; c = VTrans} } ;
----------------------
-- Verb Phrase complimantation
------------------------
{-
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
s = vps.s ;
-- obj = {s = variants { vps.obj.s ++ np.s ++ vps.c2.s ; vps.obj.s ++ np.s } ; a = np.a} ;
obj = {s = case vps.c2.s of {
"rA" => np.s ++ vps.c2.s ++ vps.obj.s;
_ => vps.c2.s ++ np.s ++ vps.obj.s
};
a = np.a} ;
subj = vps.c2.c ;
inf = vps.inf;
ad = vps.ad;
embComp = vps.embComp;
-- wish = vps.wish ;
comp = vps.comp
} ;
-}
insertObjc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
insertObj obj vp ** {c2 = vp.c2} ;
insertVVc : (AgrPes => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
insertVV obj vp ** {c2 = vp.c2} ;
{-
insertSubj : PPerson -> Str -> Str = \p,s ->
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
-}
insertObj : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> {
s = vp.s ;
obj = vp.obj ;
subj = vp.subj ;
inf = vp.inf;
ad = vp.ad;
embComp = vp.embComp;
wish = vp.wish ;
vComp = vp.vComp ;
comp = \\a => vp.comp ! a ++ obj1 ! a
} ;
insertVV : (AgrPes => Str) -> VPH -> VPH = \obj1,vp -> {
s = vp.s ;
-- obj = vp.obj ;
obj = vp.obj ;
subj = vp.subj ;
inf = vp.inf;
ad = vp.ad;
embComp = vp.embComp;
wish = True ;
vComp = \\a => vp.comp ! a ++ obj1 ! a ;
comp = vp.comp
} ;
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
s = vp.s;
obj = vp.obj ;
subj = vp.subj ;
inf = vp.inf;
ad = vp.ad;
embComp = vp.embComp ++ obj1;
wish = vp.wish ;
vComp = vp.vComp ;
comp = \\a => vp.comp ! a -- ++ obj1
} ;
insertObj3 : (Str) -> VPH -> VPH = \obj1,vp -> {
s = vp.s;
obj = {s = obj1 ++ vp.obj.s ; a = vp.obj.a };
subj = vp.subj ;
inf = vp.inf;
ad = vp.ad;
embComp = vp.embComp;
wish = vp.wish ;
vComp = vp.vComp ;
comp = vp.comp
} ;
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
insertObj2 obj vp ** {c2 = vp.c2} ;
insertObjc3 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
insertObj3 obj vp ** {c2 = vp.c2} ;
{-
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
-}
infVV : Bool -> VPH -> {s : AgrPes => Str} = \isAux,vp ->
{s = \\agr => case agr of {
AgPes n p => (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }};
insertObjPre : (AgrPes => Str) -> VPHSlash -> VPH = \obj,vp -> {
s = vp.s ;
obj = vp.obj ;
inf = vp.inf ;
subj = vp.subj ;
ad = vp.ad ;
embComp = vp.embComp;
wish = vp.wish ;
vComp = vp.vComp ;
-- comp = \\a => case vp.c2.s of {"rA" => obj ! a ++ vp.c2.s ++ vp.comp ! a ; _ => vp.c2.s ++ obj ! a ++ vp.comp ! a} -- gives linking error
comp = \\a => vp.c2.s ++ obj ! a ++ vp.c2.ra ++ vp.comp ! a
} ;
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
s = vp.s ;
obj = vp.obj ;
inf = vp.inf ;
subj = vp.subj;
ad = vp.ad ++ ad ;
embComp = vp.embComp;
wish = vp.wish ;
vComp = vp.vComp ;
comp = vp.comp
} ;
conjThat : Str = "kh" ;
{- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of {
True => np.s ! NPC Obl;
False => np.s ! NPC Obl ++ str} ;
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
s = vp.s ;
obj = vp.obj ;
inf = vp.inf ;
subj = vp.subj;
ad = vp.ad;
embComp = vp.embComp ++ emb;
wish = vp.wish ;
comp = vp.comp
} ;
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
s = vp.s ;
obj = vp.obj ;
inf = vp.inf ;
subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly
ad = vp.ad;
embComp = vp.embComp ;
wish = vp.wish ;
comp = vp.comp
} ;
-}
---------------------------
--- Clauses
---------------------------
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
mkClause : NP -> VPH -> Clause = \np,vp -> {
s = \\vt,b,ord =>
let
subj = np.s ! NPC bEzafa;
agr = np.a ;
n = (fromAgr agr).n;
p = (fromAgr agr).p;
vps = case <b,vt> of {
<Pos,VPres> => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
<Neg,VPres> => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
<Pos,VPerfPres> => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
<Neg,VPerfPres> => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
<Pos,VPast> => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ;
<Neg,VPast> => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ;
<Pos,VPerfPast> => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ;
<Pos,VFut> => case vp.wish of
{True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) };
<Pos,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ;
<Neg,VFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) };
<Neg,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed
};
quest =
case ord of
{ ODir => [];
OQuest => "A:yA" };
in
quest ++ subj ++ vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps.inf ++ vp.vComp ! np.a ++ vp.embComp
};
--Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
mkSClause : Str -> AgrPes -> VPH -> Clause = \subj,agr,vp -> {
s = \\vt,b,ord =>
let
n = (fromAgr agr).n;
p = (fromAgr agr).p;
vps = case <b,vt> of {
<Pos,VPres> => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
<Neg,VPres> => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
<Pos,VPerfPres> => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
<Neg,VPerfPres> => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
<Pos,VPast> => vp.s ! VPTense Pos (VPPast Simul) (AgPes n p) ;
<Neg,VPast> => vp.s ! VPTense Neg (VPPast Simul) (AgPes n p) ;
<Pos,VPerfPast> => vp.s ! VPTense Pos (VPPast Anter) (AgPes n p) ;
<Pos,VFut> => case vp.wish of
{True => vp.s ! VPTense Pos (VPPres Simul) (AgPes n p) ;
False => vp.s ! VPTense Pos (VPFutr Simul) (AgPes n p) };
<Pos,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Pos (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Pos (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Pos,VCondSimul> => vp.s ! VPTense Pos (VPCond Simul) (AgPes n p) ;
<Pos,VCondAnter> => vp.s ! VPTense Pos (VPCond Anter) (AgPes n p); -- verb form to be confirmed
<Neg,VPerfPast> => vp.s ! VPTense Neg (VPPast Anter) (AgPes n p) ;
<Neg,VFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Simul) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Simul) (AgPes n p) };
<Neg,VPerfFut> => case vp.wish of
{True => vp.s ! VPTense Neg (VPPres Anter) (AgPes n p) ;
False => vp.s ! VPTense Neg (VPFutr Anter) (AgPes n p) }; -- verb form need to be confirmed
<Neg,VCondSimul> => vp.s ! VPTense Neg (VPCond Simul) (AgPes n p) ;
<Neg,VCondAnter> => vp.s ! VPTense Neg (VPCond Anter) (AgPes n p) -- verb form to be confirmed
};
quest =
case ord of
{ ODir => [];
OQuest => "A:yA" };
in
quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.vComp ! agr ++ vp.embComp
};
predAux : Aux -> VPH = \verb -> {
s = \\vh =>
case vh of {
VPTense pol (VPPres Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrImperf) p n } ;
VPTense pol (VPPres Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ;
VPTense pol (VPPast Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstAorist) p n } ;
VPTense pol (VPPast Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPresent PrPerf) p n } ;
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ;
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ; -- this is to be confirmed
VPTense pol (VPCond Simul) (AgPes n p) => { inf = verb.inf ! AX pol (AuxFut FtAorist) p n } ;
VPTense pol (VPCond Anter) (AgPes n p) => { inf = verb.inf ! AX pol (AuxPast PstImperf) p n } ;
VVForm (AgPes n p) => {inf = ""} ; -- to be checked
VPStem1 => { inf = ""};
VPStem2 => { inf = "bvd"} ;
VPImp _ _ => { inf = ""} -- need to be confirmed
-- _ => { inf = ""}
};
obj = {s = [] ; a = defaultAgrPes} ;
subj = VIntrans ;
inf = "bvdn";
ad = [];
embComp = [];
wish = False ;
vComp = \\_ => [] ;
comp = \\_ => []
} ;
Aux = {
inf : AuxForm => Str ;
} ;
auxBe : Aux = {
inf = table {
AX pol tense person number => (mkAux pol tense person number).s
} ;
} ;
mkAux : Polarity -> AuxTense -> PPerson -> Number -> {s:Str}= \pol,t,p,n ->
{s =
let bodh = "bvdh" ;
nbodh = "nbvdh" ;
hast = "hst" ;
nhast = "nyst" ;
bod = "bvd" ;
khah = "KvAh" ;
mekhah = "my" ++ khah ;
bash = "bAC" ;
nbod = "nbvd" ;
nkhah = "nKvAh" ;
nmekhah = "nmy" ++ khah ;
nbash = "nbAC"
in
case <pol,t,p,n> of {
<Pos,AuxPresent PrPerf,PPers1,Sg> => bodh ++ "Am" ;
<Pos,AuxPresent PrPerf,PPers1,Pl> => bodh ++ "Aym" ;
<Pos,AuxPresent PrPerf,PPers2,Sg> => bodh ++ "Ay" ;
<Pos,AuxPresent PrPerf,PPers2,Pl> => bodh ++ "Ayd" ;
<Pos,AuxPresent PrPerf,PPers3,Sg> => bodh ++ "Ast" ;
<Pos,AuxPresent PrPerf,PPers3,Pl> => bodh ++ "And" ;
<Pos,AuxPresent PrImperf,PPers1,Sg> => hast + "m" ;
<Pos,AuxPresent PrImperf,PPers1,Pl> => hast + "ym" ;
<Pos,AuxPresent PrImperf,PPers2,Sg> => hast + "y" ;
<Pos,AuxPresent PrImperf,PPers2,Pl> => hast + "yd" ;
<Pos,AuxPresent PrImperf,PPers3,Sg> => "Ast" ;
<Pos,AuxPresent PrImperf,PPers3,Pl> => hast + "nd" ;
<Pos,AuxPast PstPerf,PPers1,Sg> => "";
<Pos,AuxPast PstPerf,PPers1,Pl> => "" ;
<Pos,AuxPast PstPerf,PPers2,Sg> => "" ;
<Pos,AuxPast PstPerf,PPers2,Pl> => "" ;
<Pos,AuxPast PstPerf,PPers3,Sg> => "" ;
<Pos,AuxPast PstPerf,PPers3,Pl> => "" ;
<Pos,AuxPast PstImperf,PPers1,Sg> => "my" ++ bod + "m" ;
<Pos,AuxPast PstImperf,PPers1,Pl> => "my" ++ bod + "ym" ;
<Pos,AuxPast PstImperf,PPers2,Sg> => "my" ++ bod + "y";
<Pos,AuxPast PstImperf,PPers2,Pl> => "my" ++ bod + "yd" ;
<Pos,AuxPast PstImperf,PPers3,Sg> => "my" ++ bod ;
<Pos,AuxPast PstImperf,PPers3,Pl> => "my" ++ bod + "nd" ;
<Pos,AuxPast PstAorist,PPers1,Sg> => bod + "m" ;
<Pos,AuxPast PstAorist,PPers1,Pl> => bod + "ym" ;
<Pos,AuxPast PstAorist,PPers2,Sg> => bod + "y";
<Pos,AuxPast PstAorist,PPers2,Pl> => bod + "yd" ;
<Pos,AuxPast PstAorist,PPers3,Sg> => bod ;
<Pos,AuxPast PstAorist,PPers3,Pl> => bod + "nd" ;
{-
<Pos,AuxFut FtImperf,PPers1,Sg> => mekhah + "m" ++ bash + "m" ;
<Pos,AuxFut FtImperf,PPers1,Pl> => mekhah + "ym" ++ bash + "ym" ;
<Pos,AuxFut FtImperf,PPers2,Sg> => mekhah + "y" ++ bash + "y" ;
<Pos,AuxFut FtImperf,PPers2,Pl> => mekhah + "yd" ++ bash + "yd" ;
<Pos,AuxFut FtImperf,PPers3,Sg> => mekhah + "d" ++ bash + "d" ;
<Pos,AuxFut FtImperf,PPers3,Pl> => mekhah + "nd" ++ bash + "nd" ;
-}
<Pos,AuxFut FtAorist,PPers1,Sg> => khah + "m" ++ bod ;
<Pos,AuxFut FtAorist,PPers1,Pl> => khah + "ym" ++ bod ;
<Pos,AuxFut Ftorist,PPers2,Sg> => khah + "y" ++ bod ;
<Pos,AuxFut FtAorist,PPers2,Pl> => khah + "yd" ++ bod ;
<Pos,AuxFut FtAorist,PPers3,Sg> => khah + "d" ++ bod ;
<Pos,AuxFut FtAorist,PPers3,Pl> => khah + "nd" ++ bod ;
-- nagatives
<Neg,AuxPresent PrPerf,PPers1,Sg> => nbodh ++ "Am" ;
<Neg,AuxPresent PrPerf,PPers1,Pl> => nbodh ++ "Aym" ;
<Neg,AuxPresent PrPerf,PPers2,Sg> => nbodh ++ "Ay" ;
<Neg,AuxPresent PrPerf,PPers2,Pl> => nbodh ++ "Ayd" ;
<Neg,AuxPresent PrPerf,PPers3,Sg> => nbodh ++ "Ast" ;
<Neg,AuxPresent PrPerf,PPers3,Pl> => nbodh ++ "And" ;
<Neg,AuxPresent PrImperf,PPers1,Sg> => nhast + "m" ;
<Neg,AuxPresent PrImperf,PPers1,Pl> => nhast + "ym" ;
<Neg,AuxPresent PrImperf,PPers2,Sg> => nhast + "y" ;
<Neg,AuxPresent PrImperf,PPers2,Pl> => nhast + "yd" ;
<Neg,AuxPresent PrImperf,PPers3,Sg> => "nyst" ;
<Neg,AuxPresent PrImperf,PPers3,Pl> => nhast + "nd" ;
<Neg,AuxPast PstPerf,PPers1,Sg> => "";
<Neg,AuxPast PstPerf,PPers1,Pl> => "" ;
<Neg,AuxPast PstPerf,PPers2,Sg> => "" ;
<Neg,AuxPast PstPerf,PPers2,Pl> => "" ;
<Neg,AuxPast PstPerf,PPers3,Sg> => "" ;
<Neg,AuxPast PstPerf,PPers3,Pl> => "" ;
<Neg,AuxPast PstImperf,PPers1,Sg> => "nmy" ++ bod + "m" ;
<Neg,AuxPast PstImperf,PPers1,Pl> => "nmy" ++ bod + "ym" ;
<Neg,AuxPast PstImperf,PPers2,Sg> => "nmy" ++ bod + "y";
<Neg,AuxPast PstImperf,PPers2,Pl> => "nmy" ++ bod + "yd" ;
<Neg,AuxPast PstImperf,PPers3,Sg> => "nmy" ++ bod ;
<Neg,AuxPast PstImperf,PPers3,Pl> => "nmy" ++ bod + "nd" ;
<Neg,AuxPast PstAorist,PPers1,Sg> => nbod + "m" ;
<Neg,AuxPast PstAorist,PPers1,Pl> => nbod + "ym" ;
<Neg,AuxPast PstAorist,PPers2,Sg> => nbod + "y";
<Neg,AuxPast PstAorist,PPers2,Pl> => nbod + "yd" ;
<Neg,AuxPast PstAorist,PPers3,Sg> => nbod ;
<Neg,AuxPast PstAorist,PPers3,Pl> => nbod + "nd" ;
{-
<Neg,AuxFut FtImperf,PPers1,Sg> => nmekhah + "m" ++ bash + "m" ;
<Neg,AuxFut FtImperf,PPers1,Pl> => nmekhah + "ym" ++ bash + "ym" ;
<Neg,AuxFut FtImperf,PPers2,Sg> => nmekhah + "y" ++ bash + "y" ;
<Neg,AuxFut FtImperf,PPers2,Pl> => nmekhah + "yd" ++ bash + "yd" ;
<Neg,AuxFut FtImperf,PPers3,Sg> => nmekhah + "d" ++ bash + "d" ;
<Neg,AuxFut FtImperf,PPers3,Pl> => nmekhah + "nd" ++ bash + "nd" ;
-}
<Neg,AuxFut FtAorist,PPers1,Sg> => nkhah + "m" ++ bod ;
<Neg,AuxFut FtAorist,PPers1,Pl> => nkhah + "ym" ++ bod ;
<Neg,AuxFut Ftorist,PPers2,Sg> => nkhah + "y" ++ bod ;
<Neg,AuxFut FtAorist,PPers2,Pl> => nkhah + "yd" ++ bod ;
<Neg,AuxFut FtAorist,PPers3,Sg> => nkhah + "d" ++ bod ;
<Neg,AuxFut FtAorist,PPers3,Pl> => nkhah + "nd" ++ bod
{-
<Infr_Past2 InfrPerf,PPers1,Sg> => khordh ++ bvdh ++ "Am" ;
<Infr_Past2 InfrPerf,PPers1,Pl> => khordh ++ bvdh ++ "Aym" ;
<Infr_Past2 InfrPerf,PPers2,Sg> => khordh ++ bvdh ++ "Ay" ;
<Infr_Past2 InfrPerf,PPers2,Pl> => khordh ++ bvdh ++ "Ayd" ;
<Infr_Past2 InfrPerf,PPers3,Sg> => khordh ++ bvdh ++ "Ast" ;
<Infr_Past2 InfrPerf,PPers3,Pl> => khordh ++ bvdh ++ "And" ;
<Infr_Past2 InfrImperf,PPers1,Sg> => mekhordh ++ "Am" ;
<Infr_Past2 InfrImperf,PPers1,Pl> => mekhordh ++ "Aym" ;
<Infr_Past2 InfrImperf,PPers2,Sg> => mekhordh ++ "Ay" ;
<Infr_Past2 InfrImperf,PPers2,Pl> => mekhordh ++ "Ayd" ;
<Infr_Past2 InfrImperf,PPers3,Sg> => mekhordh ++ "Ast" ;
<Infr_Past2 InfrImperf,PPers3,Pl> => mekhordh ++ "And"
-}
}
} ;
param
AuxTense = AuxPresent PrAspect | AuxPast PstAspect | AuxFut FtAspect ;
AuxForm = AX Polarity AuxTense PPerson Number ;
oper
toHave : Polarity -> VTense2 -> Number -> PPerson -> {s:Str} = \pol,t,n,p -> {
s = let dasht = "dACt";
ndasht = "ndACt" ;
dashteh = "dACth";
ndashteh = "ndACth" ;
dar = "dAr" ;
ndar = "ndAr" ;
khah = "KvAh" ;
nkhah = "nKvAh" ;
bvdh = "bvdh" ;
in case <pol,t,p,n> of {
<Pos,PPresent2 PrPerf,PPers1,Sg> => dashteh ++ "Am" ;
<Pos,PPresent2 PrPerf,PPers1,Pl> => dashteh ++ "Aym" ;
<Pos,PPresent2 PrPerf,PPers2,Sg> => dashteh ++ "Ay" ;
<Pos,PPresent2 PrPerf,PPers2,Pl> => dashteh ++ "Ayd" ;
<Pos,PPresent2 PrPerf,PPers3,Sg> => dashteh ++ "Ast" ;
<Pos,PPresent2 PrPerf,PPers3,Pl> => dashteh ++ "And" ;
<Pos,PPresent2 PrImperf,PPers1,Sg> => dar + "m" ;
<Pos,PPresent2 PrImperf,PPers1,Pl> => dar + "ym" ;
<Pos,PPresent2 PrImperf,PPers2,Sg> => dar + "y" ;
<Pos,PPresent2 PrImperf,PPers2,Pl> => dar + "yd" ;
<Pos,PPresent2 PrImperf,PPers3,Sg> => dar + "d" ;
<Pos,PPresent2 PrImperf,PPers3,Pl> => dar + "nd" ;
<Pos,PPast2 PstPerf,PPers1,Sg> => dashteh ++ "bvdm" ;
<Pos,PPast2 PstPerf,PPers1,Pl> => dashteh ++ "bvdym" ;
<Pos,PPast2 PstPerf,PPers2,Sg> => dashteh ++ "bvdy" ;
<Pos,PPast2 PstPerf,PPers2,Pl> => dashteh ++ "bvdyd" ;
<Pos,PPast2 PstPerf,PPers3,Sg> => dashteh ++ "bvd" ;
<Pos,PPast2 PstPerf,PPers3,Pl> => dashteh ++ "bvdnd" ;
<Pos,PPast2 PstImperf,PPers1,Sg> => dasht + "m" ;
<Pos,PPast2 PstImperf,PPers1,Pl> => dasht + "ym" ;
<Pos,PPast2 PstImperf,PPers2,Sg> => dasht + "y";
<Pos,PPast2 PstImperf,PPers2,Pl> => dasht + "yd" ;
<Pos,PPast2 PstImperf,PPers3,Sg> => dasht ;
<Pos,PPast2 PstImperf,PPers3,Pl> => dasht + "nd" ;
<Pos,PPast2 PstAorist,PPers1,Sg> => dasht + "m" ;
<Pos,PPast2 PstAorist,PPers1,Pl> => dasht + "ym" ;
<Pos,PPast2 PstAorist,PPers2,Sg> => dasht + "y";
<Pos,PPast2 PstAorist,PPers2,Pl> => dasht + "yd" ;
<Pos,PPast2 PstAorist,PPers3,Sg> => dasht ;
<Pos,PPast2 PstAorist,PPers3,Pl> => dasht + "nd" ;
<Pos,PFut2 FtAorist,PPers1,Sg> => khah + "m" ++ dasht ;
<Pos,PFut2 FtAorist,PPers1,Pl> => khah + "ym" ++ dasht ;
<Pos,PFut2 Ftorist,PPers2,Sg> => khah + "y" ++ dasht ;
<Pos,PFut2 FtAorist,PPers2,Pl> => khah + "yd" ++ dasht ;
<Pos,PFut2 FtAorist,PPers3,Sg> => khah + "d" ++ dasht ;
<Pos,PFut2 FtAorist,PPers3,Pl> => khah + "nd" ++ dasht ;
<Pos,Infr_Past2 InfrPerf,PPers1,Sg> => dashteh ++ bvdh ++ "Am" ;
<Pos,Infr_Past2 InfrPerf,PPers1,Pl> => dashteh ++ bvdh ++ "Aym" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Sg> => dashteh ++ bvdh ++ "Ay" ;
<Pos,Infr_Past2 InfrPerf,PPers2,Pl> => dashteh ++ bvdh ++ "Ayd" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Sg> => dashteh ++ bvdh ++ "Ast" ;
<Pos,Infr_Past2 InfrPerf,PPers3,Pl> => dashteh ++ bvdh ++ "And" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Sg> => dashteh ++ "Am" ;
<Pos,Infr_Past2 InfrImperf,PPers1,Pl> => dashteh ++ "Aym" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Sg> => dashteh ++ "Ay" ;
<Pos,Infr_Past2 InfrImperf,PPers2,Pl> => dashteh ++ "Ayd" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Sg> => dashteh ++ "Ast" ;
<Pos,Infr_Past2 InfrImperf,PPers3,Pl> => dashteh ++ "And" ;
-- negatives
<Neg,PPresent2 PrPerf,PPers1,Sg> => ndashteh ++ "Am" ;
<Neg,PPresent2 PrPerf,PPers1,Pl> => ndashteh ++ "Aym" ;
<Neg,PPresent2 PrPerf,PPers2,Sg> => ndashteh ++ "Ay" ;
<Neg,PPresent2 PrPerf,PPers2,Pl> => ndashteh ++ "Ayd" ;
<Neg,PPresent2 PrPerf,PPers3,Sg> => ndashteh ++ "Ast" ;
<Neg,PPresent2 PrPerf,PPers3,Pl> => ndashteh ++ "And" ;
<Neg,PPresent2 PrImperf,PPers1,Sg> => ndar + "m" ;
<Neg,PPresent2 PrImperf,PPers1,Pl> => ndar + "ym" ;
<Neg,PPresent2 PrImperf,PPers2,Sg> => ndar + "y" ;
<Neg,PPresent2 PrImperf,PPers2,Pl> => ndar + "yd" ;
<Neg,PPresent2 PrImperf,PPers3,Sg> => ndar + "d" ;
<Neg,PPresent2 PrImperf,PPers3,Pl> => ndar + "nd" ;
<Neg,PPast2 PstPerf,PPers1,Sg> => ndashteh ++ "bvdm" ;
<Neg,PPast2 PstPerf,PPers1,Pl> => ndashteh ++ "bvdym" ;
<Neg,PPast2 PstPerf,PPers2,Sg> => ndashteh ++ "bvdy" ;
<Neg,PPast2 PstPerf,PPers2,Pl> => ndashteh ++ "bvdyd" ;
<Neg,PPast2 PstPerf,PPers3,Sg> => ndashteh ++ "bvd" ;
<Neg,PPast2 PstPerf,PPers3,Pl> => ndashteh ++ "bvdnd" ;
<Neg,PPast2 PstImperf,PPers1,Sg> => ndasht + "m" ;
<Neg,PPast2 PstImperf,PPers1,Pl> => ndasht + "ym" ;
<Neg,PPast2 PstImperf,PPers2,Sg> => ndasht + "y";
<Neg,PPast2 PstImperf,PPers2,Pl> => ndasht + "yd" ;
<Neg,PPast2 PstImperf,PPers3,Sg> => ndasht ;
<Neg,PPast2 PstImperf,PPers3,Pl> => ndasht + "nd" ;
<Neg,PPast2 PstAorist,PPers1,Sg> => ndasht + "m" ;
<Neg,PPast2 PstAorist,PPers1,Pl> => ndasht + "ym" ;
<Neg,PPast2 PstAorist,PPers2,Sg> => ndasht + "y";
<Neg,PPast2 PstAorist,PPers2,Pl> => ndasht + "yd" ;
<Neg,PPast2 PstAorist,PPers3,Sg> => ndasht ;
<Neg,PPast2 PstAorist,PPers3,Pl> => ndasht + "nd" ;
<Neg,PFut2 FtAorist,PPers1,Sg> => nkhah + "m" ++ dasht ;
<Neg,PFut2 FtAorist,PPers1,Pl> => nkhah + "ym" ++ dasht ;
<Neg,PFut2 Ftorist,PPers2,Sg> => nkhah + "y" ++ dasht ;
<Neg,PFut2 FtAorist,PPers2,Pl> => nkhah + "yd" ++ dasht ;
<Neg,PFut2 FtAorist,PPers3,Sg> => nkhah + "d" ++ dasht ;
<Neg,PFut2 FtAorist,PPers3,Pl> => nkhah + "nd" ++ dasht ;
<Neg,Infr_Past2 InfrPerf,PPers1,Sg> => ndashteh ++ bvdh ++ "Am" ;
<Neg,Infr_Past2 InfrPerf,PPers1,Pl> => ndashteh ++ bvdh ++ "Aym" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Sg> => ndashteh ++ bvdh ++ "Ay" ;
<Neg,Infr_Past2 InfrPerf,PPers2,Pl> => ndashteh ++ bvdh ++ "Ayd" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Sg> => ndashteh ++ bvdh ++ "Ast" ;
<Neg,Infr_Past2 InfrPerf,PPers3,Pl> => ndashteh ++ bvdh ++ "And" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Sg> => ndashteh ++ "Am" ;
<Neg,Infr_Past2 InfrImperf,PPers1,Pl> => ndashteh ++ "Aym" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Sg> => ndashteh ++ "Ay" ;
<Neg,Infr_Past2 InfrImperf,PPers2,Pl> => ndashteh ++ "Ayd" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Sg> => ndashteh ++ "Ast" ;
<Neg,Infr_Past2 InfrImperf,PPers3,Pl> => ndashteh ++ "And"
};
} ;
predProg : VPH -> VPH = \verb -> {
s = \\vh =>
case vh of {
VPTense pol (VPPres Simul) (AgPes n p) => { inf = (toHave Pos (PPresent2 PrImperf) n p).s ++ (verb.s ! VPTense pol (VPPres Simul) (AgPes n p)).inf } ;
VPTense pol (VPPres Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPres Anter) (AgPes n p)).inf } ;
VPTense pol (VPPast Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ;
VPTense pol (VPPast Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPPast Anter) (AgPes n p)).inf } ;
VPTense pol (VPFutr Simul) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Simul) (AgPes n p)).inf } ;
VPTense pol (VPFutr Anter) (AgPes n p) => { inf = (verb.s ! VPTense pol (VPFutr Anter) (AgPes n p)).inf } ; -- this is to be confirmed
VPTense pol (VPCond Simul) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Simul) (AgPes n p)).inf } ;
VPTense pol (VPCond Anter) (AgPes n p) => { inf = (toHave Pos (PPast2 PstAorist) n p).s ++ (verb.s ! VPTense pol (VPCond Anter) (AgPes n p)).inf } ;
VVForm (AgPes n p) => {inf = (verb.s ! VVForm (AgPes n p)).inf} ;
VPStem1 => { inf = (verb.s ! VPStem1).inf};
VPStem2 => { inf = (verb.s ! VPStem2).inf} ;
VPImp pol n => { inf = (verb.s ! VPImp pol n).inf} -- need to be confirmed
-- _ => { inf = (verb.s ! VPStem1).inf}
};
obj = verb.obj ;
subj = VIntrans ;
inf = verb.inf;
ad = verb.ad;
wish = verb.wish;
vComp = verb.vComp ;
embComp = verb.embComp ;
comp = verb.comp
} ;
-------------------------
-- Ezafa construction
------------------------
oper
mkEzafa : Str -> Str ;
mkEzafa str = case str of {
st + "Ah" => str ;
st + "vh" => str ;
st + "h" => str ++ "y" ;
st + "Av" => str ;
st + "vv" => str ;
st + "v" => str + "y" ;
st + "A" => str + "y" ;
_ => str
};
mkEnclic : Str -> Str ;
mkEnclic str = case str of {
st + "A" => str ++ "yy" ;
st + "v" => str ++ "yy" ;
st + "y" => str ++ "yy" ;
st + "h" => str ++ "yy" ;
_ => str + "y"
};
IndefArticle : Str ;
IndefArticle = "yk";
taryn : Str ;
taryn = "tryn" ;
---------------
-- making negatives
---------------
addN : Str -> Str ;
addN str =
case str of {
"A" + st => "ny" + str ;
"A:" + st => "nyA" + st ;
_ => "n" + str
};
addBh2 : Str -> Str ; -- should use drop instead but it gives linking error
addBh2 str1 =
case str1 of {
"my" + str =>
case str of {
"A" + st => Prelude.glue "by" str ; -- need to use '+' but it gives linking error
"A:" + st => Prelude.glue "byA" st ;
_ => Prelude.glue "b" str
};
_ => ""
};
-----------------------------
-- Noun Phrase
-----------------------------
{-toNP : Str -> Str = \pn, npc -> case npc of {
NPC c => pn ! c ;
NPObj => pn ! Dir ;
NPErg => pn ! Obl
} ;
-}
partNP : Str -> Str = \str -> (Prelude.glue str "h") ++ "Cdh" ;
-- partNP : Str -> Str = \str -> str + "h" ++ "Cdh" ;
------------------------------------------
-- Agreement transformations
-----------------------------------------
toAgr : Number -> PPerson -> AgrPes = \n,p ->
AgPes n p;
fromAgr : AgrPes -> {n : Number ; p : PPerson } = \agr -> case agr of {
AgPes n p => {n = n ; p = p }
} ;
conjAgrPes : AgrPes -> AgrPes -> AgrPes = \a0,b0 ->
let a = fromAgr a0 ; b = fromAgr b0
in
toAgr
(conjNumber a.n b.n)
b.p;
giveNumber : AgrPes -> Number =\a -> case a of {
AgPes n _ => n
};
-- defaultAgr : Agr = agrP3 Sg Inanimate ;
-- agrP3 : Number -> Animacy -> Agr = \n,a -> Ag n PPers3 a ;
defaultAgrPes : AgrPes = agrPesP3 Sg ;
agrPesP3 : Number -> AgrPes = \n -> AgPes n PPers3 ;
-- personalAgr : Agr = agrP1 Sg ;
agrPesP1 : Number -> AgrPes = \n -> AgPes n PPers1 ;
--------------------------------------------------------
-- Reflexive Pronouns
-----------------------------------
reflPron : AgrPes => Str = table {
AgPes Sg PPers1 => "Kvdm" ;
AgPes Sg PPers2 => "Kvdt" ;
AgPes Sg PPers3 => "KvdC" ;
AgPes Pl PPers1 => "KvdmAn" ;
AgPes Pl PPers2 => "KvdtAn" ;
AgPes Pl PPers3 => "KvdCAn"
} ;
getPron : Animacy -> Number -> Str = \ani,number ->
case <ani,number> of {
<Animate,Sg> => "Av" ;
<Animate,Pl> => ["A:n hA"] ;
<Inanimate,Sg> => "A:n" ;
<Inanimate,Pl> => ["A:n hA"]
};
}

View File

@@ -1,103 +0,0 @@
concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
flags optimize=all_subs ;
coding = utf8;
lin
PredVP np vp = mkClause np vp ;
PredSCVP sc vp = mkSClause ("Ayn" ++ sc.s) (defaultAgrPes) vp ;
ImpVP vp = {
s = \\pol,n =>
let
agr = AgPes (numImp n) PPers2 ;
in case pol of {
CPos => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Pos (numImp n)).inf) ++ vp.embComp;
CNeg _ => vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vp.vComp ! agr ++ ((vp.s ! VPImp Neg (numImp n)).inf) ++ vp.embComp
} ;
} ;
SlashVP np vp =
mkClause np vp ** {c2 = vp.c2} ;
AdvSlash slash adv = {
s = \\t,p,o => adv.s ++ slash.s ! t ! p ! o ;
c2 = slash.c2
} ;
SlashPrep cl prep = cl ** {c2 = { s = prep.s ; ra = [] ; c = VIntrans}} ;
SlashVS np vs slash =
mkClause np
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
{c2 = slash.c2} ;
EmbedS s = {s = conjThat ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = vp.obj.s ++ vp.inf ++ vp.comp ! defaultAgrPes} ; --- agr
UseCl temp p cl =
{ s = case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! ODir;
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! ODir;
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! ODir;
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! ODir;
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! ODir;
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! ODir;
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! ODir;
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
};
} ;
UseQCl temp p cl = {
s = \\q => case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPres ! p.p ! q;
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPres ! p.p ! q;
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPast ! p.p ! q;
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPerfPast ! p.p ! q;
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VFut ! p.p ! q;
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPerfFut ! p.p ! q;
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VCondSimul ! p.p ! q;
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VCondAnter ! p.p ! q
};
} ;
UseRCl temp p rcl = {
s = \\q => case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPres ! p.p ! ODir ! q;
<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfPres ! p.p ! ODir ! q;
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPast ! p.p ! ODir ! q;
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfPast ! p.p ! ODir ! q;
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VFut ! p.p ! ODir ! q;
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPerfFut ! p.p ! ODir ! q;
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VCondSimul ! p.p ! ODir ! q;
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VCondAnter ! p.p ! ODir ! q
};
c = rcl.c
} ;
UseSlash temp p clslash = {
s = case <temp.t,temp.a> of {
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPres ! p.p ! ODir;
<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfPres ! p.p ! ODir;
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPast ! p.p ! ODir ;
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfPast ! p.p ! ODir;
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VFut ! p.p ! ODir;
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPerfFut ! p.p ! ODir;
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir;
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VCondSimul ! p.p ! ODir
};
c2 = clslash.c2
} ;
AdvS a s = {s = a.s ++ s.s} ;
RelS s r = {s = s.s ++ r.s ! agrPesP3 Sg} ;
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
}

View File

@@ -1,133 +0,0 @@
concrete StructuralPes of Structural = CatPes **
open MorphoPes, ParadigmsPes, Prelude, NounPes in {
flags optimize=all ;
coding = utf8;
lin
above_Prep = ss "bAlAy" ;
after_Prep = ss ["bcd Az"] ;
all_Predet = ss ["hmh y"] ;
almost_AdA, almost_AdN = ss "tqrybAa." ;
although_Subj = ss ["bA vjvd Ayn"] ;
always_AdV = ss "hmyCh" ;
and_Conj = sd2 [] "v" ** {n = Pl} ;
because_Subj = ss ["brAy Ayn"] ;
before_Prep = ss ["qbl Az"] ;
behind_Prep = ss "pCt" ;
between_Prep = ss "byn" ;
both7and_DConj = sd2 "hm" ["v hm"] ** {n = Pl} ;
but_PConj = ss "AmA" ;
by8agent_Prep = ss "tvsT" ;
by8means_Prep = ss "bA" ;
-- can8know_VV,can_VV = mkV "skna" ** { isAux = True} ;
during_Prep = ss ["dr Tvl"] ;
either7or_DConj = sd2 "yA" "yA" ** {n = Sg} ;
-- everybody_NP = MassNP (UseN (MorphoPnb.mkN11 ["hr kwy"])); -- not a good way coz need to include NounPnb
every_Det = mkDet "hr" Sg ;
-- everything_NP = MassNP (UseN (MorphoPnb.mkN11 ["hr XE"]));
everywhere_Adv = ss ["hr jA"] ;
few_Det = mkDet ["tcdAd kmy"] Pl True; -- check
-- first_Ord = {s = "Avlyn" ; n = Sg} ; --DEPRECATED
for_Prep = ss "brAy" ;
from_Prep = ss "Az" ;
he_Pron = personalPN "Av" Sg PPers3 ;
here_Adv = ss "AynjA" ;
here7to_Adv = ss "AynjA" ;
here7from_Adv = ss "AynjA" ;
how_IAdv = ss "c^Tvr" ;
how8many_IDet = {s = "c^nd" ; n = Pl ; isNum = True} ;
how8much_IAdv = ss "c^qdr" ;
if_Subj = ss "Agr" ;
in8front_Prep = ss "jlvy" ;
i_Pron = personalPN "mn" Sg PPers1;
in_Prep = ss "dr" ;
it_Pron = personalPN "A:n" Sg PPers3;
less_CAdv = {s = "kmtr" ; p = ""} ;
many_Det = mkDet ["tcdAd zyAdy"] Pl True; -- check
more_CAdv = {s = "byCtr" ; p = "" } ;
most_Predet = ss "Akt-r";
much_Det = mkDet ["mqdAr zyAdy"] Pl ;
-- must_VV = {
-- s = table {
-- VVF VInf => ["have to"] ;
-- VVF VPres => "must" ;
-- VVF VPPart => ["had to"] ;
-- VVF VPresPart => ["having to"] ;
-- VVF VPast => ["had to"] ; --# notpresent
-- VVPastNeg => ["hadn't to"] ; --# notpresent
-- VVPresNeg => "mustn't"
-- } ;
-- isAux = True
-- } ;
-----b no_Phr = ss "no" ;
no_Utt = ss "nh" ;
on_Prep = ss "rvy" ;
-- one_Quant = demoPN "yk" ; -- DEPRECATED
only_Predet = ss "fqT" ;
or_Conj = sd2 [] "yA" ** {n = Sg} ;
otherwise_PConj = ss ["drGyrAyn Svrt"] ;
part_Prep = ss "Az" ; -- the object following it should be in Ezafa form
please_Voc = ss "lTfAa." ;
possess_Prep = ss "" ; -- will be handeled in Ezafeh
quite_Adv = ss "kAmlAa." ;
she_Pron = personalPN "Av" Sg PPers3 ;
so_AdA = ss "bsyAr" ;
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "kwy" ));
someSg_Det = mkDet "mqdAry" Sg True ;
somePl_Det = mkDet "c^nd" Pl True ;
-- something_NP = MassNP (UseN (MorphoPnb.mkN11 "c^yzy"));
somewhere_Adv = ss "jAyy" ;
that_Quant = mkQuant "A:n" "A:n";
that_Subj = ss "A:n";
there_Adv = ss "A:njA" ;
there7to_Adv = ss "A:njA" ;
there7from_Adv = ss "A:njA" ;
therefore_PConj = ss ["bh hmyn dlyl"] ;
they_Pron = personalPN ["A:n hA"] Pl PPers3 ;
this_Quant = mkQuant "Ayn" "Ayn" ;
through_Prep = ss ["Az Tryq"] ;
too_AdA = ss "Kyly" ;
to_Prep = ss "bh" ** {lock_Prep = <>};
under_Prep = ss "zyr" ** {lock_Prep = <>};
very_AdA = ss "Kyly" ;
want_VV = mkV "KvAstn" "KvAh" ** { isAux = False} ;
we_Pron = personalPN "mA" Pl PPers1 ;
whatSg_IP = {s = ["c^h c^yzy"] ; n = Sg } ;
whatPl_IP = {s = ["c^h c^yzhAyy"] ; n = Pl } ;
when_IAdv = ss "ky" ;
when_Subj = ss "vqty" ;
where_IAdv = ss "kjA" ;
which_IQuant = {s = "kdAm" ; n = Sg} ;
whichPl_IDet = {s = "kdAm" ; n = Pl ; isNum = False} ;
whichSg_IDet = { s = "kdAm" ; n = Sg ; isNum = False} ;
whoSg_IP = {s = ["c^h ksy"] ; n = Sg} ;
whoPl_IP = {s = ["c^h ksAny"] ;n = Pl} ;
why_IAdv = ss "c^rA" ;
without_Prep = ss "bdvn" ;
with_Prep = ss "bA";
-- yes_Phr = ss "blh" ;
yes_Utt = ss "blh" ;
youSg_Pron = personalPN "tv" Sg PPers2 ;
youPl_Pron = personalPN "CmA" Pl PPers2 ;
youPol_Pron = personalPN "CmA" Pl PPers2 ;
-- no_Quant = demoPN "hyc^" ;
not_Predet = {s="nh"} ;
if_then_Conj = sd2 "Agr" "A:ngAh" ** {n = Sg} ;
at_least_AdN = ss "HdAql" ;
at_most_AdN = ss "HdAkt-r";
-- nothing_NP = MassNP (UseN (MorphoPnb.mkN11 "hyc^ c^yz" ));
except_Prep = ss ["bh jz"] ;
-- nobody_NP = MassNP (UseN (MorphoPnb.mkN11 "hyc^ ks"));
as_CAdv = {s = ["bh AndAzh y"] ; p = ""} ;
have_V2 = mkV2 (mkV "dACtn" "dAr") "rA" ;
language_title_Utt = ss "persian" ;
}

View File

@@ -1,13 +0,0 @@
rf -file=src/LexiconPes.gf | ps -env=quotes -to_persian | wf -file=LexiconPes.gf
rf -file=src/ParadigmsPes.gf | ps -env=quotes -to_persian | wf -file=ParadigmsPes.gf
rf -file=src/MorphoPes.gf | ps -env=quotes -to_persian | wf -file=MorphoPes.gf
rf -file=src/StructuralPes.gf | ps -env=quotes -to_persian | wf -file=StructuralPes.gf
rf -file=src/ResPes.gf | ps -env=quotes -to_persian | wf -file=ResPes.gf
rf -file=src/AdjectivePes.gf | ps -env=quotes -to_persian | wf -file=AdjectivePes.gf
rf -file=src/IdiomPes.gf | ps -env=quotes -to_persian | wf -file=IdiomPes.gf
rf -file=src/RelativePes.gf | ps -env=quotes -to_persian | wf -file=RelativePes.gf
rf -file=src/AdverbPes.gf | ps -env=quotes -to_persian | wf -file=AdverbPes.gf
rf -file=src/SentencePes.gf | ps -env=quotes -to_persian | wf -file=SentencePes.gf
rf -file=src/NumeralPes.gf | ps -env=quotes -to_persian | wf -file=NumeralPes.gf
rf -file=src/SymbolPes.gf | ps -env=quotes -to_persian | wf -file=SymbolPes.gf
rf -file=src/ExtraPes.gf | ps -env=quotes -to_persian | wf -file=ExtraPes.gf

View File

@@ -2,6 +2,6 @@
concrete AllPor of AllPorAbs =
LangPor,
IrregPor,
ExtendPor
** {} ;
** open ExtraPor, IrregPor
in {} ;

View File

@@ -2,7 +2,7 @@
concrete ConstructionPor of Construction = CatPor **
open SyntaxPor, SymbolicPor, ParadigmsPor, BeschPor,
(L = LexiconPor), (B = DiffPor), (R = ResPor),
(L = LexiconPor), (D = DiffPor), (R = ResPor),
(S = SyntaxPor), (C = CommonRomance), CommonRomance,
Prelude in {
flags coding=utf8 ;
@@ -17,24 +17,34 @@ lin
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "chamar"))) y ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y)
| mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "casado") ;
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "chamar"))) ;
how_old_QCl x = mkQCl (mkIP how8many_IDet L.year_N) x have_V2 ;
how_far_QCl x = mkQCl (lin IAdv (ss "a que distância")) (mkCl x B.estar_V) ;
how_far_QCl x = mkQCl (lin IAdv (ss "a que distância")) (mkCl x D.stare_V) ;
-- some more things
weather_adjCl ap = mkCl (mkVP (mkVA (mkV (fazer_Besch "fazer"))) (lin AP ap)) ;
is_right_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "certo")) ;
is_wrong_VP = mkVP (mkVA B.estar_V) (mkAP (mkA "errado")) ;
is_right_VP = mkVP (mkVA D.stare_V) (mkAP (mkA "certo")) ;
is_wrong_VP = mkVP (mkVA D.stare_V) (mkAP (mkA "errado")) ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn))))
(lin A a) ;
n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ;
n_unit_CN card cn cn =
let s : Str = "de" ++ card.s ! cn.g ++ cn.s ! card.n ;
adj : A = mkA s s s s s ;
in mkCN adj cn ;
bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ;
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ;
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "taça") part_Prep)) np ;
-- falta X para NP ser Y
few_X_short_of_Y np cn cn = variants {} ;
{-
-- spatial deixis and motion verbs
@@ -52,7 +62,7 @@ lin
lincat
Timeunit = N ;
Hour = {s : Str ; pe : Period ; n : Number} ;
Hour = {s : Str ; pe : Period ; n : ParadigmsPor.Number} ;
Weekday = N ;
Monthday = NP ;
Month = N ;
@@ -97,15 +107,15 @@ lin
twentyThreeHour = mkHour "23" Noite Pl ;
twentyFourHour = {s = "meia-noite" ; pe = None ; n = Sg} ;
timeHour h = mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ;
timeHour h = ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ period ! h.pe) ;
timeHourMinute h m = let
min = m.s ! Masc
in
mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ;
ParadigmsPor.mkAdv (R.a ! Fem ! h.n ++ h.s ++ "e" ++ min ++ period ! h.pe) ;
oper
mkHour : Str -> Period -> Number -> {s : Str ; pe : Period ; n : Number} ;
mkHour : Str -> Period -> ParadigmsPor.Number -> {s : Str ; pe : Period ; n : ParadigmsPor.Number} ;
mkHour num pe n = S.mkUtt (S.mkCard num) ** {pe = pe ; n = n} ;
period : Period => Str ;
@@ -215,4 +225,4 @@ lin thai_Language = mkLanguage "tailandês" ;
lin turkish_Language = mkLanguage "turco" ;
lin urdu_Language = mkLanguage "urdu" ;
}
} ;

128537
src/portuguese/DictPor.gf Normal file

File diff suppressed because it is too large Load Diff

128533
src/portuguese/DictPorAbs.gf Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
--# -path=.:../romance:../abstract:../common:../prelude
instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in {
instance DiffPor of DiffRomance - [iAdvQuestionInv,chooseTA,otherInv,partAgr,stare_V,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in {
flags optimize=noexpand ;
coding=utf8 ;
@@ -8,7 +8,7 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
param
Prepos = P_de | P_a | P_em | P_por ;
VType = VHabere | VRefl ;
VType = VTer | VHaver | VRefl ;
oper
partAgr : VType -> Bool ;
@@ -55,28 +55,50 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
defaultPronArg ;
oper
mkImperative b p vp =
\\pol,g,n =>
let
pe = case b of {True => P3 ; _ => p} ;
agr = {g = g ; n = n ; p = pe} ;
mkImperative isPol p vp =
\\pol,g,n => case pol of {
RPos => neg.p1 ++ imper ++ bindHyphenIf refl.isRefl ++ refl.pron
++ bindHyphenIf hasClit ++ clit ++ compl ;
RNeg _ => neg.p1 ++ refl.pron ++ clit ++ subj ++ compl
} where {
pe : Person = case <isPol,p> of {<_,P1> => P1 ; <True,_> => P2 ; <_,_> => P3} ;
refl = case vp.s.vtyp of {
VRefl => <reflPron n pe Acc,True> ;
_ => <[],False>
VRefl => {pron = reflPron n pe Acc ; isRefl = True} ;
_ => {pron = [] ; isRefl = False}
} ;
clit = vp.clit1 ++ vp.clit2 ;
hasClit = vp.clit3.hasClit ;
imper = vp.s.s ! vImper n pe ;
subj = vp.s.s ! VFin (VPres Conjunct) n pe ;
neg = vp.neg ! pol ;
agr = {g = g ; n = n ; p = pe} ;
compl = neg.p2 ++ vp.comp ! agr ++ vp.ext ! pol
} ;
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ;
verb = vp.s.s ! vImper n pe ;
neg = vp.neg ! pol ;
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
in
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
bindHyphenIf : Bool -> Str ;
bindHyphenIf b = case b of {
True => BIND ++ "-" ++ BIND ;
_ => []
} ;
param
Copula = SerCop | EstarCop | FicarCop ;
oper
CopulaType = Bool ;
selectCopula = \isEstar -> case isEstar of {True => estar_V ; False => copula} ;
serCopula = False ;
estarCopula = True ;
CopulaType = Copula ;
selectCopula coptyp = case coptyp of {
SerCop => essere_V ;
EstarCop => stare_V ;
FicarCop => ficar_V
} ;
serCopula = SerCop ;
estarCopula = EstarCop ;
ficarCopula = FicarCop ;
oper
iAdvQuestionInv : Direct = DDir ;
otherInv : Direct = DDir ;
oper
-- the other Cases are defined in ResRomance
@@ -107,7 +129,7 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
oper
a : Gender => Number => Str ;
a = genNumForms "a" "à" "aos" "às" ;
a = genNumForms "ao" "à" "aos" "às" ;
de : Gender => Number => Str ;
de = genNumForms "do" "da" "dos" "das" ;
@@ -137,7 +159,12 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
possCase = \_,_,c -> prepCase c ;
oper
auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ;
auxVerb : VType -> (VF => Str) ;
auxVerb vt = case vt of {
VTer => ter_V.s ;
VHaver => haver_V.s ;
_ => ter_V.s
} ;
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
@@ -199,6 +226,23 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
vpAgrClit : Agr -> VPAgr = \a ->
vpAgrNone ;
oper
chooseTA : RTense -> Anteriority
-> (VF => Str) -> (VF => Str)
-> Number -> Person -> Mood -> Str -> Str * Str ;
chooseTA t a verb vaux n p m part = case <t,a> of {
<RPast,Simul> => <verb ! VFin (VImperf m) n p, []> ; --# notpresent
<RPast,Anter> => <vaux ! VFin (VImperf m) n p, part> ; --# notpresent
<RFut,Simul> => <verb ! VFin VFut n p, []> ; --# notpresent
<RFut,Anter> => <vaux ! VFin VFut n p, part> ; --# notpresent
<RCond,Simul> => <verb ! VFin VCondit n p, []> ; --# notpresent
<RCond,Anter> => <vaux ! VFin VCondit n p, part> ; --# notpresent
<RPasse,Simul> => <verb ! VFin VPasse n p, []> ; --# notpresent
<RPasse,Anter> => <vaux ! VFin VPasse n p, part> ; --# notpresent
<RPres,Anter> => <verb ! VFin VPasse n p, []> ; --# notpresent
<RPres,Simul> => <verb ! VFin (VPres m) n p, []>
} ;
-- oper's opers
oper
argPron : Gender -> Number -> Person -> Case -> Str =
@@ -216,22 +260,23 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
\g,n,p -> case <<g,n,p> : Gender * Number * Person> of {
<_,Sg,P1> => cases "me" "mim" ;
<_,Sg,P2> => cases "te" "ti" ;
<_,Pl,P1> => cases "nos" "nós" ; --- nosotros
<_,Pl,P2> => cases "vos" "vós" ; --- vosotros
<_,Pl,P1> => cases "nos" "nós" ;
<_,Pl,P2> => cases "vos" "vós" ;
<Fem,Sg,P3> => cases3 "a" "sua" "ela" ;
<_, Sg,P3> => cases3 "o" "seu" "ele" ;
<Fem,Pl,P3> => cases3 "as" "suas" "elas" ;
<_, Pl,P3> => cases3 "os" "seus" "eles"
} ;
estar_V : Verb = verboV (estar_Besch "estar") ;
essere_V : Verb = verboV (ser_Besch "ser") ;
stare_V : Verb = verboV (estar_Besch "estar") ;
ter_V : Verb = verboV (ter_Besch "ter") ;
haver_V : Verb = verboV (haver_Besch "haver") ;
ficar_V : Verb = verboV (ficar_Besch "ficar") ;
verboV : Verbum -> Verb ;
-- make a verb of type haver
verboV v = verbBesch v ** {vtyp = VHabere ; p = [] ; lock_V = <>} ;
verboV v = verbBesch v ** {vtyp = VTer ; p = [] } ;
}
} ;

View File

@@ -27,7 +27,7 @@ oper
heading : N -> Str = \n -> (nounHeading n).s ;
lin
InflectionN, InflectionN3, InflectionN3 = \noun -> {
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "n" ;
s1 = heading1 (heading noun_Category ++
case noun.g of {
@@ -111,8 +111,8 @@ lin
InflectionVV v = {
t = "v" ;
s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v
paragraph (verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP L.sleep_V))) ;
s2 = inflVerb (lin VV v)
} ;
InflectionVS v = {
@@ -223,4 +223,4 @@ oper
{- --# notpresent
-}
}
} ;

View File

@@ -1,52 +1,17 @@
--# -path=alltenses:../common:../abstract
concrete ExtendPor of Extend =
CatPor ** ExtendFunctor -
--# -path=alltenses:../common:../abstract:../romance
concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
[
AdAdV,
AdjAsCN,
AdjAsNP,
ApposNP,
BaseVPS,
ByVP,
CompBareCN,
ComplBareVS,
ComplSlashPartLast,
CompoundAP,
CompoundN,
CompVP,
ConjVPS,
ConsVPS,
--EmptyRelSlash,
ExistsNP,
GenIP,
GenModIP,
GenModNP,
GenNP,
GerundAdv,
GerundCN,
GerundNP,
IAdvAdv,
GenRP,
GenRP,
ICompAP,
InOrderToVP,
ListVPS,
MkVPS,
PassAgentVPSlash,
PassVPSlash,
PastPartAP,
PastPartAgentAP,
PositAdVAdj,
PredVPS,
PresPartAP,
ProDrop,
PurposeVP,
VPS,
WithoutVP,
iFem_Pron,
theyFem_Pron,
UttAdV,
UttVPShort,
weFem_Pron,
WithoutVP,
youFem_Pron,
youPlFem_Pron,
youPolFem_Pron,
@@ -55,77 +20,33 @@ concrete ExtendPor of Extend =
] -- don't forget to put the names of your own
-- definitions here
with
(Grammar = GrammarPor), (Syntax = SyntaxPor) **
(Grammar = GrammarPor), (Syntax = SyntaxPor), (ResRomance = ResPor) **
open
GrammarPor,
ResPor,
MorphoPor,
Coordination,
Prelude,
ParadigmsPor,
(L = LexiconPor),
(S = StructuralPor) in {
lin
GenNP np =
let denp = (np.s ! ResPor.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV exist_V)) ;
GenRP nu cn = {
s = \\_b,_aagr,_c => cujo ! g ! n ++ num ++ cn.s ! n ;
a = aagr g n ;
hasAgr = True
} where {
cujo = genNumForms "cujo" "cuja" "cujos" "cujas" ;
g = cn.g ;
n = nu.n ;
num = if_then_Str nu.isNum (nu.s ! g) []
} ;
GenIP ip = {s = \\_,_,c => ip.s ! c} ;
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ;
CompBareCN cn = {
s = \\agr => cn.s ! agr.n ;
cop = serCopula
} ;
EmptyRelSlash cls = {
s = \\agr,t,a,p,m => cls.s ! agr ! DDir ! t ! a ! p ! m ++ cls.c2.s ;
c = Nom
} ;
---- these come from ExtraRomance: how to avoid the repetition?
---- can't seem to be able to use two functors
lincat
VPS = {s : Mood => Agr => Bool => Str} ;
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
lin
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
ConsVPS = consrTable3 Mood Agr Bool comma ;
PredVPS np vpi = {
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
} ;
MkVPS tm p vp = {
s = \\m,agr,isNeg =>
tm.s ++ p.s ++
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
! DDir ! tm.t ! tm.a ! p.p ! m
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
lin
ProDrop p = {
s = table {
Nom => let pn = p.s ! Nom in {c1 = pn.c1 ; c2 = pn.c2 ; comp = [] ; ton = pn.ton} ;
c => p.s ! c
} ;
a = p.a ;
poss = p.poss ;
hasClit = p.hasClit ;
isPol = p.isPol ;
isNeg = False
} ;
ICompAP ap = {
s =\\a => "o quão" ++ ap.s ! (genNum2Aform a.g a.n) ;
cop = serCopula
@@ -135,63 +56,9 @@ concrete ExtendPor of Extend =
s = "o quão" ++ adv.s
} ;
CompIQuant iq = {s = \\aa => iq.s ! aa.n ! aa.g ! Nom ; cop = serCopula} ;
PrepCN prep cn = {s = prep.s ++ prepCase prep.c ++ cn.s ! Sg} ;
lin
PresPartAP vp = {
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
isPre = False ;
copTyp = serCopula
} ;
PastPartAP vps = pastPartAP vps [] ;
PastPartAgentAP vps np = pastPartAP vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
PassVPSlash vps = passVPSlash vps [] ;
PassAgentVPSlash vps np = passVPSlash vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV (mkV "existir"))) ;
PurposeVP vp = {
s = infVP vp (Ag Masc Sg P3)
} ;
ComplBareVS = ComplVS ;
AdjAsCN ap = {
s =\\n => ap.s ! (genNum2Aform Masc n) ;
g = Masc
} ;
AdjAsNP ap = heavyNP {
s = \\_c => ap.s ! ASg Masc APred ;
a = Ag Masc Sg P3
} ;
oper
pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP {
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
isPre = False ;
copTyp = serCopula
} ;
passVPSlash : VPSlash -> Str -> VP ;
passVPSlash vps agent = let
auxvp = predV auxPassive
in
vps ** {
s = auxvp.s ;
agr = auxvp.agr ;
comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ;
} ;
exist_V : V ;
exist_V = mkV "existir" ;
lin
CompoundN noun noun2 = { -- order is different because that's needed for correct translation from english
@@ -209,71 +76,15 @@ concrete ExtendPor of Extend =
copTyp = adj.copTyp
} ;
GerundCN vp = {
s = \\n => infVP vp {g = Masc ; n = n ; p = P3} ;
g = Masc
} ;
GerundNP vp = let
neutrAgr = Ag Masc Sg P3
in heavyNP {
s = \\_ => gerVP vp neutrAgr ;
a = neutrAgr
} ;
GerundAdv vp = {
s = gerundStr vp
} ;
WithoutVP vp = {
s = "sem" ++ gerundStr vp
} ;
ByVP vp = {
s = "by" ++ gerundStr vp
s = "sem" ++ infStr vp
} ;
InOrderToVP vp = {
s = "a fim de" ++ gerundStr vp
s = "a fim de" ++ infStr vp
} ;
ApposNP np1 np2 = np1 ** {
s = \\c => {
c1 = (np1.s ! c).c1 ++ (np2.s ! c).c1 ;
c2 = (np1.s ! c).c2 ++ (np2.s ! c).c2 ;
comp = (np1.s ! c).comp ++ (np2.s ! c).comp ;
ton = (np1.s ! c).ton ++ (np2.s ! c).ton
} ;
} ;
AdAdV aa av = {
s = aa.s ++ av.s
} ;
UttAdV av = av ;
PositAdVAdj a = {
s = a.s ! Posit ! AA
} ;
--TODO: actually use ant
CompVP ant p vp = let
neg = negation ! p.p
in {
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp agr ;
cop = serCopula
} ;
UttVPShort = UttVP ;
ComplSlashPartLast = ComplSlash ;
oper
gerundStr : VP -> Str ;
gerundStr vp = gerVP vp (Ag Masc Sg P3) ;
lin
-- Romance
iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;
weFem_Pron = pronAgr S.we_Pron Fem Pl P1 ;
youFem_Pron = pronAgr S.youSg_Pron Fem Sg P3 ;

View File

@@ -1,7 +1,7 @@
-- the Extra* modules are to be deprecated in favour of the Extend*
-- module.
concrete ExtraPor of ExtraPorAbs = ExtraRomancePor **
open CommonRomance, PhonoPor, MorphoPor, ParadigmsPor, ParamX, ResPor, BeschPor, (B = IrregBeschPor), (E = ExtendPor),
open CommonRomance, PhonoPor, MorphoPor, ParadigmsPor, ParamX, ResPor, BeschPor, (B = IrregPor), (E = ExtendPor),
Prelude in {
flags coding=utf8 ;
@@ -45,4 +45,4 @@ concrete ExtraPor of ExtraPorAbs = ExtraRomancePor **
UseComp_estar comp = insertComplement comp.s (predV B.estar_V) ;
}
} ;

View File

@@ -46,7 +46,7 @@ concrete IdiomPor of Idiom = CatPor **
in
vp.s.s ! VGer ++ clpr.p1 ++ obj
)
(predV B.estar_V) ;
(predV B.stare_V) ;
ImpPl1 vp = {s =
mkImperative False P1 vp ! RPos ! Masc ! Pl ; --- fem
@@ -56,7 +56,7 @@ concrete IdiomPor of Idiom = CatPor **
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ;
} ;
SelfAdvVP vp = vp ;
SelfAdvVP vp = variants {} ;
SelfAdVVP = insertComplement (
\\agr => case agr of {
@@ -68,6 +68,6 @@ concrete IdiomPor of Idiom = CatPor **
}
) ;
SelfNP np = np ;
SelfNP np = variants {} ;
} ;

View File

@@ -1,360 +0,0 @@
--# -path=.:../romance:../common:../abstract:../prelude
concrete IrregBeschPor of IrregBeschPorAbs = CatPor **
open ParadigmsPor, BeschPor in {
flags optimize=noexpand ;
coding=utf8 ;
-- machine-generated file: do not edit directly!
-- look up your verb here. if you don't find it, see if
-- if you can find out what is its paradigm and then add it!
lin
acontecer_V = mkV (acontecer_Besch "acontecer") ;
acudir_V = mkV (acudir_Besch "acudir") ;
bulir_V = mkV (acudir_Besch "bulir") ;
cuspir_V = mkV (acudir_Besch "cuspir") ;
sacudir_V = mkV (acudir_Besch "sacudir") ;
subir_V = mkV (acudir_Besch "subir") ;
sumir_V = mkV (acudir_Besch "sumir") ;
consumir_V = mkV (acudir_Besch "consumir") ;
adequar_V = mkV (adequar_Besch "adequar") ;
agredir_V = mkV (agredir_Besch "agredir") ;
denegrir_V = mkV (agredir_Besch "denegrir") ;
prevenir_V = mkV (agredir_Besch "prevenir") ;
progredir_V = mkV (agredir_Besch "progredir") ;
transgredir_V = mkV (agredir_Besch "transgredir") ;
anunciar_V = mkV (anunciar_Besch "anunciar") ;
abreviar_V = mkV (anunciar_Besch "abreviar") ;
acariciar_V = mkV (anunciar_Besch "acariciar") ;
afiar_V = mkV (anunciar_Besch "afiar") ;
aliviar_V = mkV (anunciar_Besch "aliviar") ;
apreciar_V = mkV (anunciar_Besch "apreciar") ;
assobiar_V = mkV (anunciar_Besch "assobiar") ;
avaliar_V = mkV (anunciar_Besch "avaliar") ;
avariar_V = mkV (anunciar_Besch "avariar") ;
criar_V = mkV (anunciar_Besch "criar") ;
denunciar_V = mkV (anunciar_Besch "denunciar") ;
desviar_V = mkV (anunciar_Besch "desviar") ;
enfiar_V = mkV (anunciar_Besch "enfiar") ;
enviar_V = mkV (anunciar_Besch "enviar") ;
iniciar_V = mkV (anunciar_Besch "iniciar") ;
principiar_V = mkV (anunciar_Besch "principiar") ;
pronunciar_V = mkV (anunciar_Besch "pronunciar") ;
renunciar_V = mkV (anunciar_Besch "renunciar") ;
aprazer_V = mkV (aprazer_Besch "aprazer") ;
desprazer_V = mkV (aprazer_Besch "desprazer") ;
aquecer_V = mkV (aquecer_Besch "aquecer") ;
agradecer_V = mkV (aquecer_Besch "agradecer") ;
amarelecer_V = mkV (aquecer_Besch "amarelecer") ;
amolecer_V = mkV (aquecer_Besch "amolecer") ;
arrefecer_V = mkV (aquecer_Besch "arrefecer") ;
empecer_V = mkV (aquecer_Besch "empecer") ;
entretecer_V = mkV (aquecer_Besch "entretecer") ;
entristecer_V = mkV (aquecer_Besch "entristecer") ;
escurecer_V = mkV (aquecer_Besch "escurecer") ;
estremecer_V = mkV (aquecer_Besch "estremecer") ;
favorecer_V = mkV (aquecer_Besch "favorecer") ;
merecer_V = mkV (aquecer_Besch "merecer") ;
oferecer_V = mkV (aquecer_Besch "oferecer") ;
parecer_V = mkV (aquecer_Besch "parecer") ;
perecer_V = mkV (aquecer_Besch "perecer") ;
reverdecer_V = mkV (aquecer_Besch "reverdecer") ;
tecer_V = mkV (aquecer_Besch "tecer") ;
arguir_V = mkV (arguir_Besch "arguir") ;
redarguir_V = mkV (arguir_Besch "redarguir") ;
averiguar_V = mkV (averiguar_Besch "averiguar") ;
aguar_V = mkV (averiguar_Besch "aguar") ;
apaniguar_V = mkV (averiguar_Besch "apaniguar") ;
apaziguar_V = mkV (averiguar_Besch "apaziguar") ;
apropinquar_V = mkV (averiguar_Besch "apropinquar") ;
deliquar_V = mkV (averiguar_Besch "deliquar") ;
desaguar_V = mkV (averiguar_Besch "desaguar") ;
enxaguar_V = mkV (averiguar_Besch "enxaguar") ;
obliquar_V = mkV (averiguar_Besch "obliquar") ;
caber_V = mkV (caber_Besch "caber") ;
chegar_V = mkV (chegar_Besch "chegar") ;
chover_V = mkV (chover_Besch "chover") ;
começar_V = mkV (começar_Besch "começar") ;
comerciar_V = mkV (comerciar_Besch "comerciar") ;
agenciar_V = mkV (comerciar_Besch "agenciar") ;
licenciar_V = mkV (comerciar_Besch "licenciar") ;
negociar_V = mkV (comerciar_Besch "negociar") ;
obsequiar_V = mkV (comerciar_Besch "obsequiar") ;
premiar_V = mkV (comerciar_Besch "premiar") ;
providenciar_V = mkV (comerciar_Besch "providenciar") ;
sentenciar_V = mkV (comerciar_Besch "sentenciar") ;
silenciar_V = mkV (comerciar_Besch "silenciar") ;
comprar_V = mkV (comprar_Besch "comprar") ;
crer_V = mkV (crer_Besch "crer") ;
descrer_V = mkV (crer_Besch "descrer") ;
dar_V = mkV (dar_Besch "dar") ;
destruir_V = mkV (destruir_Besch "destruir") ;
construir_V = mkV (destruir_Besch "construir") ;
reconstruir_V = mkV (destruir_Besch "reconstruir") ;
distribuir_V = mkV (distribuir_Besch "distribuir") ;
imbuir_V = mkV (distribuir_Besch "imbuir") ;
afluir_V = mkV (distribuir_Besch "afluir") ;
confluir_V = mkV (distribuir_Besch "confluir") ;
fluir_V = mkV (distribuir_Besch "fluir") ;
influir_V = mkV (distribuir_Besch "influir") ;
refluir_V = mkV (distribuir_Besch "refluir") ;
atribuir_V = mkV (distribuir_Besch "atribuir") ;
contribuir_V = mkV (distribuir_Besch "contribuir") ;
retribuir_V = mkV (distribuir_Besch "retribuir") ;
instituir_V = mkV (distribuir_Besch "instituir") ;
restituir_V = mkV (distribuir_Besch "restituir") ;
substituir_V = mkV (distribuir_Besch "substituir") ;
divergir_V = mkV (divergir_Besch "divergir") ;
aspergir_V = mkV (divergir_Besch "aspergir") ;
convergir_V = mkV (divergir_Besch "convergir") ;
dizer_V = mkV (dizer_Besch "dizer") ;
bendizer_V = mkV (dizer_Besch "bendizer") ;
condizer_V = mkV (dizer_Besch "condizer") ;
contradizer_V = mkV (dizer_Besch "contradizer") ;
desdizer_V = mkV (dizer_Besch "desdizer") ;
maldizer_V = mkV (dizer_Besch "maldizer") ;
predizer_V = mkV (dizer_Besch "predizer") ;
doer_V = mkV (doer_Besch "doer") ;
dormir_V = mkV (dormir_Besch "dormir") ;
cobrir_V = mkV (dormir_Besch "cobrir") ;
descobrir_V = mkV (dormir_Besch "descobrir") ;
encobrir_V = mkV (dormir_Besch "encobrir") ;
recobrir_V = mkV (dormir_Besch "recobrir") ;
explodir_V = mkV (dormir_Besch "explodir") ;
engolir_V = mkV (dormir_Besch "engolir") ;
tossir_V = mkV (dormir_Besch "tossir") ;
erguer_V = mkV (erguer_Besch "erguer") ;
soerguer_V = mkV (erguer_Besch "soerguer") ;
estar_V = mkV (estar_Besch "estar") ;
extinguir_V = mkV (extinguir_Besch "extinguir") ;
falir_V = mkV (falir_Besch "falir") ;
aguerrir_V = mkV (falir_Besch "aguerrir") ;
combalir_V = mkV (falir_Besch "combalir") ;
desflorir_V = mkV (falir_Besch "desflorir") ;
florir_V = mkV (falir_Besch "florir") ;
reflorir_V = mkV (falir_Besch "reflorir") ;
renhir_V = mkV (falir_Besch "renhir") ;
fazer_V = mkV (fazer_Besch "fazer") ;
afazer_V = mkV (fazer_Besch "afazer") ;
contrafazer_V = mkV (fazer_Besch "contrafazer") ;
desfazer_V = mkV (fazer_Besch "desfazer") ;
liquefazer_V = mkV (fazer_Besch "liquefazer") ;
perfazer_V = mkV (fazer_Besch "perfazer") ;
rarefazer_V = mkV (fazer_Besch "rarefazer") ;
refazer_V = mkV (fazer_Besch "refazer") ;
satisfazer_V = mkV (fazer_Besch "satisfazer") ;
ficar_V = mkV (ficar_Besch "ficar") ;
frigir_V = mkV (frigir_Besch "frigir") ;
fugir_V = mkV (fugir_Besch "fugir") ;
garantir_V = mkV (garantir_Besch "garantir") ;
haver_V = mkV (haver_Besch "haver") ;
abolir_V = mkV (imergir_Besch "abolir") ;
banir_V = mkV (imergir_Besch "banir") ;
brandir_V = mkV (imergir_Besch "brandir") ;
brunir_V = mkV (imergir_Besch "brunir") ;
emergir_V = mkV (imergir_Besch "emergir") ;
empedernir_V = mkV (imergir_Besch "empedernir") ;
exaurir_V = mkV (imergir_Besch "exaurir") ;
extorquir_V = mkV (imergir_Besch "extorquir") ;
fremir_V = mkV (imergir_Besch "fremir") ;
fulgir_V = mkV (imergir_Besch "fulgir") ;
jungir_V = mkV (imergir_Besch "jungir") ;
retorquir_V = mkV (imergir_Besch "retorquir") ;
submergir_V = mkV (imergir_Besch "submergir") ;
ungir_V = mkV (imergir_Besch "ungir") ;
colorir_V = mkV (imergir_Besch "colorir") ;
demolir_V = mkV (imergir_Besch "demolir") ;
ir_V = mkV (ir_Besch "ir") ;
jazer_V = mkV (jazer_Besch "jazer") ;
ler_V = mkV (ler_Besch "ler") ;
reler_V = mkV (ler_Besch "reler") ;
tresler_V = mkV (ler_Besch "tresler") ;
moer_V = mkV (moer_Besch "moer") ;
roer_V = mkV (moer_Besch "roer") ;
neviscar_V = mkV (neviscar_Besch "neviscar") ;
odiar_V = mkV (odiar_Besch "odiar") ;
ansiar_V = mkV (odiar_Besch "ansiar") ;
incendiar_V = mkV (odiar_Besch "incendiar") ;
mediar_V = mkV (odiar_Besch "mediar") ;
remediar_V = mkV (odiar_Besch "remediar") ;
ouvir_V = mkV (ouvir_Besch "ouvir") ;
pedir_V = mkV (pedir_Besch "pedir") ;
despedir_V = mkV (pedir_Besch "despedir") ;
expedir_V = mkV (pedir_Besch "expedir") ;
reexpedir_V = mkV (pedir_Besch "reexpedir") ;
impedir_V = mkV (pedir_Besch "impedir") ;
desimpedir_V = mkV (pedir_Besch "desimpedir") ;
medir_V = mkV (pedir_Besch "medir") ;
perder_V = mkV (perder_Besch "perder") ;
perdoar_V = mkV (perdoar_Besch "perdoar") ;
abalroar_V = mkV (perdoar_Besch "abalroar") ;
abençoar_V = mkV (perdoar_Besch "abençoar") ;
amaldiçoar_V = mkV (perdoar_Besch "amaldiçoar") ;
aperfeiçoar_V = mkV (perdoar_Besch "aperfeiçoar") ;
apregoar_V = mkV (perdoar_Besch "apregoar") ;
coar_V = mkV (perdoar_Besch "coar") ;
doar_V = mkV (perdoar_Besch "doar") ;
entoar_V = mkV (perdoar_Besch "entoar") ;
esboroar_V = mkV (perdoar_Besch "esboroar") ;
povoar_V = mkV (perdoar_Besch "povoar") ;
soar_V = mkV (perdoar_Besch "soar") ;
toar_V = mkV (perdoar_Besch "toar") ;
voar_V = mkV (perdoar_Besch "voar") ;
poder_V = mkV (poder_Besch "poder") ;
polir_V = mkV (polir_Besch "polir") ;
pôr_V = mkV (pôr_Besch "pôr") ;
apor_V = mkV (pôr_Besch "apor") ;
compor_V = mkV (pôr_Besch "compor") ;
contrapor_V = mkV (pôr_Besch "contrapor") ;
decompor_V = mkV (pôr_Besch "decompor") ;
descompor_V = mkV (pôr_Besch "descompor") ;
dispor_V = mkV (pôr_Besch "dispor") ;
expor_V = mkV (pôr_Besch "expor") ;
impor_V = mkV (pôr_Besch "impor") ;
opor_V = mkV (pôr_Besch "opor") ;
propor_V = mkV (pôr_Besch "propor") ;
repor_V = mkV (pôr_Besch "repor") ;
supor_V = mkV (pôr_Besch "supor") ;
prazer_V = mkV (prazer_Besch "prazer") ;
precaver_V = mkV (precaver_Besch "precaver") ;
preferir_V = mkV (preferir_Besch "preferir") ;
aderir_V = mkV (preferir_Besch "aderir") ;
aferir_V = mkV (preferir_Besch "aferir") ;
conferir_V = mkV (preferir_Besch "conferir") ;
deferir_V = mkV (preferir_Besch "deferir") ;
diferir_V = mkV (preferir_Besch "diferir") ;
digerir_V = mkV (preferir_Besch "digerir") ;
ferir_V = mkV (preferir_Besch "ferir") ;
inferir_V = mkV (preferir_Besch "inferir") ;
inserir_V = mkV (preferir_Besch "inserir") ;
proferir_V = mkV (preferir_Besch "proferir") ;
referir_V = mkV (preferir_Besch "referir") ;
repelir_V = mkV (preferir_Besch "repelir") ;
repetir_V = mkV (preferir_Besch "repetir") ;
sugerir_V = mkV (preferir_Besch "sugerir") ;
transferir_V = mkV (preferir_Besch "transferir") ;
proibir_V = mkV (proibir_Besch "proibir") ;
coibir_V = mkV (proibir_Besch "coibir") ;
proteger_V = mkV (proteger_Besch "proteger") ;
eleger_V = mkV (proteger_Besch "eleger") ;
reger_V = mkV (proteger_Besch "reger") ;
prover_V = mkV (prover_Besch "prover") ;
querer_V = mkV (querer_Besch "querer") ;
reaver_V = mkV (reaver_Besch "reaver") ;
recear_V = mkV (recear_Besch "recear") ;
acarear_V = mkV (recear_Besch "acarear") ;
afear_V = mkV (recear_Besch "afear") ;
altear_V = mkV (recear_Besch "altear") ;
apear_V = mkV (recear_Besch "apear") ;
arquear_V = mkV (recear_Besch "arquear") ;
asnear_V = mkV (recear_Besch "asnear") ;
costear_V = mkV (recear_Besch "costear") ;
custear_V = mkV (recear_Besch "custear") ;
enfrear_V = mkV (recear_Besch "enfrear") ;
frear_V = mkV (recear_Besch "frear") ;
olear_V = mkV (recear_Besch "olear") ;
passear_V = mkV (recear_Besch "passear") ;
pear_V = mkV (recear_Besch "pear") ;
pentear_V = mkV (recear_Besch "pentear") ;
pratear_V = mkV (recear_Besch "pratear") ;
presentear_V = mkV (recear_Besch "presentear") ;
recrear_V = mkV (recear_Besch "recrear") ;
saborear_V = mkV (recear_Besch "saborear") ;
sofrear_V = mkV (recear_Besch "sofrear") ;
redigir_V = mkV (redigir_Besch "redigir") ;
afligir_V = mkV (redigir_Besch "afligir") ;
agir_V = mkV (redigir_Besch "agir") ;
coligir_V = mkV (redigir_Besch "coligir") ;
corrigir_V = mkV (redigir_Besch "corrigir") ;
erigir_V = mkV (redigir_Besch "erigir") ;
exigir_V = mkV (redigir_Besch "exigir") ;
fingir_V = mkV (redigir_Besch "fingir") ;
frangir_V = mkV (redigir_Besch "frangir") ;
infligir_V = mkV (redigir_Besch "infligir") ;
transigir_V = mkV (redigir_Besch "transigir") ;
refletir_V = mkV (refletir_Besch "refletir") ;
fletir_V = mkV (refletir_Besch "fletir") ;
defletir_V = mkV (refletir_Besch "defletir") ;
infletir_V = mkV (refletir_Besch "infletir") ;
remir_V = mkV (remir_Besch "remir") ;
requerer_V = mkV (requerer_Besch "requerer") ;
reunir_V = mkV (reunir_Besch "reunir") ;
rir_V = mkV (rir_Besch "rir") ;
sorrir_V = mkV (rir_Besch "sorrir") ;
saber_V = mkV (saber_Besch "saber") ;
dessaber_V = mkV (saber_Besch "dessaber") ;
sair_V = mkV (sair_Besch "sair") ;
cair_V = mkV (sair_Besch "cair") ;
decair_V = mkV (sair_Besch "decair") ;
descair_V = mkV (sair_Besch "descair") ;
recair_V = mkV (sair_Besch "recair") ;
trair_V = mkV (sair_Besch "trair") ;
atrair_V = mkV (sair_Besch "atrair") ;
contrair_V = mkV (sair_Besch "contrair") ;
distrair_V = mkV (sair_Besch "distrair") ;
extrair_V = mkV (sair_Besch "extrair") ;
protrair_V = mkV (sair_Besch "protrair") ;
retrair_V = mkV (sair_Besch "retrair") ;
subtrair_V = mkV (sair_Besch "subtrair") ;
saudar_V = mkV (saudar_Besch "saudar") ;
seguir_V = mkV (seguir_Besch "seguir") ;
conseguir_V = mkV (seguir_Besch "conseguir") ;
perseguir_V = mkV (seguir_Besch "perseguir") ;
prosseguir_V = mkV (seguir_Besch "prosseguir") ;
sentir_V = mkV (sentir_Besch "sentir") ;
assentir_V = mkV (sentir_Besch "assentir") ;
consentir_V = mkV (sentir_Besch "consentir") ;
pressentir_V = mkV (sentir_Besch "pressentir") ;
ressentir_V = mkV (sentir_Besch "ressentir") ;
mentir_V = mkV (sentir_Besch "mentir") ;
desmentir_V = mkV (sentir_Besch "desmentir") ;
ser_V = mkV (ser_Besch "ser") ;
servir_V = mkV (servir_Besch "servir") ;
concernir_V = mkV (servir_Besch "concernir") ;
discernir_V = mkV (servir_Besch "discernir") ;
cerzir_V = mkV (servir_Besch "cerzir") ;
despir_V = mkV (servir_Besch "despir") ;
vestir_V = mkV (servir_Besch "vestir") ;
investir_V = mkV (servir_Besch "investir") ;
revestir_V = mkV (servir_Besch "revestir") ;
ter_V = mkV (ter_Besch "ter") ;
conter_V = mkV (ter_Besch "conter") ;
deter_V = mkV (ter_Besch "deter") ;
entreter_V = mkV (ter_Besch "entreter") ;
reter_V = mkV (ter_Besch "reter") ;
suster_V = mkV (ter_Besch "suster") ;
traduzir_V = mkV (traduzir_Besch "traduzir") ;
abduzir_V = mkV (traduzir_Besch "abduzir") ;
aduzir_V = mkV (traduzir_Besch "aduzir") ;
conduzir_V = mkV (traduzir_Besch "conduzir") ;
deduzir_V = mkV (traduzir_Besch "deduzir") ;
induzir_V = mkV (traduzir_Besch "induzir") ;
introduzir_V = mkV (traduzir_Besch "introduzir") ;
luzir_V = mkV (traduzir_Besch "luzir") ;
perluzir_V = mkV (traduzir_Besch "perluzir") ;
produzir_V = mkV (traduzir_Besch "produzir") ;
reduzir_V = mkV (traduzir_Besch "reduzir") ;
reluzir_V = mkV (traduzir_Besch "reluzir") ;
seduzir_V = mkV (traduzir_Besch "seduzir") ;
trazer_V = mkV (trazer_Besch "trazer") ;
valer_V = mkV (valer_Besch "valer") ;
desvaler_V = mkV (valer_Besch "desvaler") ;
equivaler_V = mkV (valer_Besch "equivaler") ;
vender_V = mkV (vender_Besch "vender") ;
ver_V = mkV (ver_Besch "ver") ;
antever_V = mkV (ver_Besch "antever") ;
entrever_V = mkV (ver_Besch "entrever") ;
prever_V = mkV (ver_Besch "prever") ;
rever_V = mkV (ver_Besch "rever") ;
vir_V = mkV (vir_Besch "vir") ;
advir_V = mkV (vir_Besch "advir") ;
convir_V = mkV (vir_Besch "convir") ;
desavir_V = mkV (vir_Besch "desavir") ;
intervir_V = mkV (vir_Besch "intervir") ;
porvir_V = mkV (vir_Besch "porvir") ;
sobrevir_V = mkV (vir_Besch "sobrevir") ;
} ;

View File

@@ -1,354 +0,0 @@
--# -path=.:../romance:../common:../abstract:../prelude
abstract IrregBeschPorAbs = Cat ** {
flags coding=utf8 ;
-- machine-generated file: do not edit directly!
fun
acontecer_V : V ;
acudir_V : V ;
bulir_V : V ;
cuspir_V : V ;
sacudir_V : V ;
subir_V : V ;
sumir_V : V ;
consumir_V : V ;
adequar_V : V ;
agredir_V : V ;
denegrir_V : V ;
prevenir_V : V ;
progredir_V : V ;
transgredir_V : V ;
anunciar_V : V ;
abreviar_V : V ;
acariciar_V : V ;
afiar_V : V ;
aliviar_V : V ;
apreciar_V : V ;
assobiar_V : V ;
avaliar_V : V ;
avariar_V : V ;
criar_V : V ;
denunciar_V : V ;
desviar_V : V ;
enfiar_V : V ;
enviar_V : V ;
iniciar_V : V ;
principiar_V : V ;
pronunciar_V : V ;
renunciar_V : V ;
aprazer_V : V ;
desprazer_V : V ;
aquecer_V : V ;
agradecer_V : V ;
amarelecer_V : V ;
amolecer_V : V ;
arrefecer_V : V ;
empecer_V : V ;
entretecer_V : V ;
entristecer_V : V ;
escurecer_V : V ;
estremecer_V : V ;
favorecer_V : V ;
merecer_V : V ;
oferecer_V : V ;
parecer_V : V ;
perecer_V : V ;
reverdecer_V : V ;
tecer_V : V ;
arguir_V : V ;
redarguir_V : V ;
averiguar_V : V ;
aguar_V : V ;
apaniguar_V : V ;
apaziguar_V : V ;
apropinquar_V : V ;
deliquar_V : V ;
desaguar_V : V ;
enxaguar_V : V ;
obliquar_V : V ;
caber_V : V ;
chegar_V : V ;
chover_V : V ;
começar_V : V ;
comerciar_V : V ;
agenciar_V : V ;
licenciar_V : V ;
negociar_V : V ;
obsequiar_V : V ;
premiar_V : V ;
providenciar_V : V ;
sentenciar_V : V ;
silenciar_V : V ;
comprar_V : V ;
crer_V : V ;
descrer_V : V ;
dar_V : V ;
destruir_V : V ;
construir_V : V ;
reconstruir_V : V ;
distribuir_V : V ;
imbuir_V : V ;
afluir_V : V ;
confluir_V : V ;
fluir_V : V ;
influir_V : V ;
refluir_V : V ;
atribuir_V : V ;
contribuir_V : V ;
retribuir_V : V ;
instituir_V : V ;
restituir_V : V ;
substituir_V : V ;
divergir_V : V ;
aspergir_V : V ;
convergir_V : V ;
dizer_V : V ;
bendizer_V : V ;
condizer_V : V ;
contradizer_V : V ;
desdizer_V : V ;
maldizer_V : V ;
predizer_V : V ;
doer_V : V ;
dormir_V : V ;
cobrir_V : V ;
descobrir_V : V ;
encobrir_V : V ;
recobrir_V : V ;
explodir_V : V ;
engolir_V : V ;
tossir_V : V ;
erguer_V : V ;
soerguer_V : V ;
estar_V : V ;
extinguir_V : V ;
falir_V : V ;
aguerrir_V : V ;
combalir_V : V ;
desflorir_V : V ;
florir_V : V ;
reflorir_V : V ;
renhir_V : V ;
fazer_V : V ;
afazer_V : V ;
contrafazer_V : V ;
desfazer_V : V ;
liquefazer_V : V ;
perfazer_V : V ;
rarefazer_V : V ;
refazer_V : V ;
satisfazer_V : V ;
ficar_V : V ;
frigir_V : V ;
fugir_V : V ;
garantir_V : V ;
haver_V : V ;
abolir_V : V ;
banir_V : V ;
brandir_V : V ;
brunir_V : V ;
emergir_V : V ;
empedernir_V : V ;
exaurir_V : V ;
extorquir_V : V ;
fremir_V : V ;
fulgir_V : V ;
jungir_V : V ;
retorquir_V : V ;
submergir_V : V ;
ungir_V : V ;
colorir_V : V ;
demolir_V : V ;
ir_V : V ;
jazer_V : V ;
ler_V : V ;
reler_V : V ;
tresler_V : V ;
moer_V : V ;
roer_V : V ;
neviscar_V : V ;
odiar_V : V ;
ansiar_V : V ;
incendiar_V : V ;
mediar_V : V ;
remediar_V : V ;
ouvir_V : V ;
pedir_V : V ;
despedir_V : V ;
expedir_V : V ;
reexpedir_V : V ;
impedir_V : V ;
desimpedir_V : V ;
medir_V : V ;
perder_V : V ;
perdoar_V : V ;
abalroar_V : V ;
abençoar_V : V ;
amaldiçoar_V : V ;
aperfeiçoar_V : V ;
apregoar_V : V ;
coar_V : V ;
doar_V : V ;
entoar_V : V ;
esboroar_V : V ;
povoar_V : V ;
soar_V : V ;
toar_V : V ;
voar_V : V ;
poder_V : V ;
polir_V : V ;
pôr_V : V ;
apor_V : V ;
compor_V : V ;
contrapor_V : V ;
decompor_V : V ;
descompor_V : V ;
dispor_V : V ;
expor_V : V ;
impor_V : V ;
opor_V : V ;
propor_V : V ;
repor_V : V ;
supor_V : V ;
prazer_V : V ;
precaver_V : V ;
preferir_V : V ;
aderir_V : V ;
aferir_V : V ;
conferir_V : V ;
deferir_V : V ;
diferir_V : V ;
digerir_V : V ;
ferir_V : V ;
inferir_V : V ;
inserir_V : V ;
proferir_V : V ;
referir_V : V ;
repelir_V : V ;
repetir_V : V ;
sugerir_V : V ;
transferir_V : V ;
proibir_V : V ;
coibir_V : V ;
proteger_V : V ;
eleger_V : V ;
reger_V : V ;
prover_V : V ;
querer_V : V ;
reaver_V : V ;
recear_V : V ;
acarear_V : V ;
afear_V : V ;
altear_V : V ;
apear_V : V ;
arquear_V : V ;
asnear_V : V ;
costear_V : V ;
custear_V : V ;
enfrear_V : V ;
frear_V : V ;
olear_V : V ;
passear_V : V ;
pear_V : V ;
pentear_V : V ;
pratear_V : V ;
presentear_V : V ;
recrear_V : V ;
saborear_V : V ;
sofrear_V : V ;
redigir_V : V ;
afligir_V : V ;
agir_V : V ;
coligir_V : V ;
corrigir_V : V ;
erigir_V : V ;
exigir_V : V ;
fingir_V : V ;
frangir_V : V ;
infligir_V : V ;
transigir_V : V ;
refletir_V : V ;
fletir_V : V ;
defletir_V : V ;
infletir_V : V ;
remir_V : V ;
requerer_V : V ;
reunir_V : V ;
rir_V : V ;
sorrir_V : V ;
saber_V : V ;
dessaber_V : V ;
sair_V : V ;
cair_V : V ;
decair_V : V ;
descair_V : V ;
recair_V : V ;
trair_V : V ;
atrair_V : V ;
contrair_V : V ;
distrair_V : V ;
extrair_V : V ;
protrair_V : V ;
retrair_V : V ;
subtrair_V : V ;
saudar_V : V ;
seguir_V : V ;
conseguir_V : V ;
perseguir_V : V ;
prosseguir_V : V ;
sentir_V : V ;
assentir_V : V ;
consentir_V : V ;
pressentir_V : V ;
ressentir_V : V ;
mentir_V : V ;
desmentir_V : V ;
ser_V : V ;
servir_V : V ;
concernir_V : V ;
discernir_V : V ;
cerzir_V : V ;
despir_V : V ;
vestir_V : V ;
investir_V : V ;
revestir_V : V ;
ter_V : V ;
conter_V : V ;
deter_V : V ;
entreter_V : V ;
reter_V : V ;
suster_V : V ;
traduzir_V : V ;
abduzir_V : V ;
aduzir_V : V ;
conduzir_V : V ;
deduzir_V : V ;
induzir_V : V ;
introduzir_V : V ;
luzir_V : V ;
perluzir_V : V ;
produzir_V : V ;
reduzir_V : V ;
reluzir_V : V ;
seduzir_V : V ;
trazer_V : V ;
valer_V : V ;
desvaler_V : V ;
equivaler_V : V ;
vender_V : V ;
ver_V : V ;
antever_V : V ;
entrever_V : V ;
prever_V : V ;
rever_V : V ;
vir_V : V ;
advir_V : V ;
convir_V : V ;
desavir_V : V ;
intervir_V : V ;
porvir_V : V ;
sobrevir_V : V ;
} ;

View File

@@ -1,9 +1,553 @@
--# -path=.:../romance:../abstract:../common:../prelude
--# -path=.:../romance:../common:../abstract:../prelude
concrete IrregPor of IrregPorAbs = CatPor **
open ParadigmsPor, BeschPor in {
flags optimize=values ;
flags optimize=noexpand ;
coding=utf8 ;
}
-- machine-generated file: do not edit directly! see
-- https://gitlab.com/odanoburu/gf-pt
-- look up your verb here. if you don't find it, see if
-- if you can find out what is its paradigm and then add it!
lin acontecer_V = mkV (acontecer_Besch "acontecer") ;
lin conhecer_V = mkV (acontecer_Besch "conhecer") ;
lin coalescer_V = mkV (acontecer_Besch "coalescer") ;
lin comparecer_V = mkV (acontecer_Besch "comparecer") ;
lin compadecer_V = mkV (acontecer_Besch "compadecer") ;
lin contorcer_V = mkV (acontecer_Besch "contorcer") ;
lin convalescer_V = mkV (acontecer_Besch "convalescer") ;
lin convencer_V = mkV (acontecer_Besch "convencer") ;
lin acudir_V = mkV (acudir_Besch "acudir") ;
lin bulir_V = mkV (acudir_Besch "bulir") ;
lin cuspir_V = mkV (acudir_Besch "cuspir") ;
lin sacudir_V = mkV (acudir_Besch "sacudir") ;
lin subir_V = mkV (acudir_Besch "subir") ;
lin sumir_V = mkV (acudir_Besch "sumir") ;
lin consumir_V = mkV (acudir_Besch "consumir") ;
lin adequar_V = mkV (adequar_Besch "adequar") ;
lin agredir_V = mkV (agredir_Besch "agredir") ;
lin denegrir_V = mkV (agredir_Besch "denegrir") ;
lin prevenir_V = mkV (agredir_Besch "prevenir") ;
lin progredir_V = mkV (agredir_Besch "progredir") ;
lin transgredir_V = mkV (agredir_Besch "transgredir") ;
lin anunciar_V = mkV (anunciar_Besch "anunciar") ;
lin abreviar_V = mkV (anunciar_Besch "abreviar") ;
lin acariciar_V = mkV (anunciar_Besch "acariciar") ;
lin afiar_V = mkV (anunciar_Besch "afiar") ;
lin aliviar_V = mkV (anunciar_Besch "aliviar") ;
lin apreciar_V = mkV (anunciar_Besch "apreciar") ;
lin assobiar_V = mkV (anunciar_Besch "assobiar") ;
lin avaliar_V = mkV (anunciar_Besch "avaliar") ;
lin avariar_V = mkV (anunciar_Besch "avariar") ;
lin criar_V = mkV (anunciar_Besch "criar") ;
lin denunciar_V = mkV (anunciar_Besch "denunciar") ;
lin desviar_V = mkV (anunciar_Besch "desviar") ;
lin enfiar_V = mkV (anunciar_Besch "enfiar") ;
lin enviar_V = mkV (anunciar_Besch "enviar") ;
lin iniciar_V = mkV (anunciar_Besch "iniciar") ;
lin principiar_V = mkV (anunciar_Besch "principiar") ;
lin pronunciar_V = mkV (anunciar_Besch "pronunciar") ;
lin renunciar_V = mkV (anunciar_Besch "renunciar") ;
lin assediar_V = mkV (anunciar_Besch "assediar") ;
lin aprazer_V = mkV (aprazer_Besch "aprazer") ;
lin desprazer_V = mkV (aprazer_Besch "desprazer") ;
lin aquecer_V = mkV (aquecer_Besch "aquecer") ;
lin agradecer_V = mkV (aquecer_Besch "agradecer") ;
lin amarelecer_V = mkV (aquecer_Besch "amarelecer") ;
lin amolecer_V = mkV (aquecer_Besch "amolecer") ;
lin arrefecer_V = mkV (aquecer_Besch "arrefecer") ;
lin empecer_V = mkV (aquecer_Besch "empecer") ;
lin entretecer_V = mkV (aquecer_Besch "entretecer") ;
lin entristecer_V = mkV (aquecer_Besch "entristecer") ;
lin escurecer_V = mkV (aquecer_Besch "escurecer") ;
lin estremecer_V = mkV (aquecer_Besch "estremecer") ;
lin favorecer_V = mkV (aquecer_Besch "favorecer") ;
lin merecer_V = mkV (aquecer_Besch "merecer") ;
lin oferecer_V = mkV (aquecer_Besch "oferecer") ;
lin parecer_V = mkV (aquecer_Besch "parecer") ;
lin perecer_V = mkV (aquecer_Besch "perecer") ;
lin reverdecer_V = mkV (aquecer_Besch "reverdecer") ;
lin tecer_V = mkV (aquecer_Besch "tecer") ;
lin esquecer_V = mkV (aquecer_Besch "esquecer") ;
lin escarnecer_V = mkV (aquecer_Besch "escarnecer") ;
lin escurecer_V = mkV (aquecer_Besch "escurecer") ;
lin arguir_V = mkV (arguir_Besch "arguir") ;
lin redarguir_V = mkV (arguir_Besch "redarguir") ;
lin averiguar_V = mkV (averiguar_Besch "averiguar") ;
lin aguar_V = mkV (averiguar_Besch "aguar") ;
lin apaniguar_V = mkV (averiguar_Besch "apaniguar") ;
lin apaziguar_V = mkV (averiguar_Besch "apaziguar") ;
lin apropinquar_V = mkV (averiguar_Besch "apropinquar") ;
lin deliquar_V = mkV (averiguar_Besch "deliquar") ;
lin desaguar_V = mkV (averiguar_Besch "desaguar") ;
lin enxaguar_V = mkV (averiguar_Besch "enxaguar") ;
lin obliquar_V = mkV (averiguar_Besch "obliquar") ;
lin caber_V = mkV (caber_Besch "caber") ;
lin chegar_V = mkV (chegar_Besch "chegar") ;
lin rogar_V = mkV (chegar_Besch "rogar") ;
lin jogar_V = mkV (chegar_Besch "jogar") ;
lin julgar_V = mkV (chegar_Besch "julgar") ;
lin interrogar_V = mkV (chegar_Besch "interrogar") ;
lin intrigar_V = mkV (chegar_Besch "intrigar") ;
lin investigar_V = mkV (chegar_Besch "investigar") ;
lin enxergar_V = mkV (chegar_Besch "enxergar") ;
lin enrugar_V = mkV (chegar_Besch "enrugar") ;
lin escorregar_V = mkV (chegar_Besch "escorregar") ;
lin esmagar_V = mkV (chegar_Besch "esmagar") ;
lin esfregar_V = mkV (chegar_Besch "esfregar") ;
lin irrigar_V = mkV (chegar_Besch "irrigar") ;
lin interligar_V = mkV (chegar_Besch "interligar") ;
lin instigar_V = mkV (chegar_Besch "instigar") ;
lin largar_V = mkV (chegar_Besch "largar") ;
lin legalizar_V = mkV (chegar_Besch "legalizar") ;
lin ligar_V = mkV (chegar_Besch "ligar") ;
lin litigar_V = mkV (chegar_Besch "litigar") ;
lin madrugar_V = mkV (chegar_Besch "madrugar") ;
lin esfregar_V = mkV (chegar_Besch "esfregar") ;
lin apagar_V = mkV (chegar_Besch "apagar") ;
lin tragar_V = mkV (chegar_Besch "tragar") ;
lin chover_V = mkV (chover_Besch "chover") ;
lin começar_V = mkV (começar_Besch "começar") ;
lin caçar_V = mkV (começar_Besch "caçar") ;
lin coçar_V = mkV (começar_Besch "coçar") ;
lin comerciar_V = mkV (comerciar_Besch "comerciar") ;
lin agenciar_V = mkV (comerciar_Besch "agenciar") ;
lin licenciar_V = mkV (comerciar_Besch "licenciar") ;
lin negociar_V = mkV (comerciar_Besch "negociar") ;
lin obsequiar_V = mkV (comerciar_Besch "obsequiar") ;
lin premiar_V = mkV (comerciar_Besch "premiar") ;
lin providenciar_V = mkV (comerciar_Besch "providenciar") ;
lin sentenciar_V = mkV (comerciar_Besch "sentenciar") ;
lin silenciar_V = mkV (comerciar_Besch "silenciar") ;
lin comprar_V = mkV (comprar_Besch "comprar") ;
lin pintar_V = mkV (comprar_Besch "pintar") ;
lin perguntar_V = mkV (comprar_Besch "perguntar") ;
lin quebrar_V = mkV (comprar_Besch "quebrar") ;
lin fechar_V = mkV (comprar_Besch "fechar") ;
lin contar_V = mkV (comprar_Besch "contar") ;
lin cortar_V = mkV (comprar_Besch "cortar") ;
lin compilar_V = mkV (comprar_Besch "compilar") ;
lin lutar_V = mkV (comprar_Besch "lutar") ;
lin encontrar_V = mkV (comprar_Besch "encontrar") ;
lin encomendar_V = mkV (comprar_Besch "encomendar") ;
lin encalacrar_V = mkV (comprar_Besch "encalacrar") ;
lin encaminhar_V = mkV (comprar_Besch "encaminhar") ;
lin estampar_V = mkV (comprar_Besch "estampar") ;
lin encanar_V = mkV (comprar_Besch "encanar") ;
lin encampar_V = mkV (comprar_Besch "encampar") ;
lin encantar_V = mkV (comprar_Besch "encantar") ;
lin encapotar_V = mkV (comprar_Besch "encapotar") ;
lin encarar_V = mkV (comprar_Besch "encarar") ;
lin encarcerar_V = mkV (comprar_Besch "encarcerar") ;
lin matar_V = mkV (comprar_Besch "matar") ;
lin menosprezar_V = mkV (comprar_Besch "menosprezar") ;
lin marchar_V = mkV (comprar_Besch "marchar") ;
lin maravilhar_V = mkV (comprar_Besch "maravilhar") ;
lin marombar_V = mkV (comprar_Besch "marombar") ;
lin respirar_V = mkV (comprar_Besch "respirar") ;
lin martirizar_V = mkV (comprar_Besch "martirizar") ;
lin martelar_V = mkV (comprar_Besch "martelar") ;
lin mascarar_V = mkV (comprar_Besch "mascarar") ;
lin masturbar_V = mkV (comprar_Besch "masturbar") ;
lin materializar_V = mkV (comprar_Besch "materializar") ;
lin matizar_V = mkV (comprar_Besch "matizar") ;
lin mazelar_V = mkV (comprar_Besch "mazelar") ;
lin mecanizar_V = mkV (comprar_Besch "mecanizar") ;
lin mediocrizar_V = mkV (comprar_Besch "mediocrizar") ;
lin meditar_V = mkV (comprar_Besch "meditar") ;
lin melar_V = mkV (comprar_Besch "melar") ;
lin melhorar_V = mkV (comprar_Besch "melhorar") ;
lin memorizar_V = mkV (comprar_Besch "memorizar") ;
lin mencionar_V = mkV (comprar_Besch "mencionar") ;
lin mensurar_V = mkV (comprar_Besch "mensurar") ;
lin assoprar_V = mkV (comprar_Besch "assoprar") ;
lin metralhar_V = mkV (comprar_Besch "metralhar") ;
lin migrar_V = mkV (comprar_Besch "migrar") ;
lin militar_V = mkV (comprar_Besch "militar") ;
lin militarizar_V = mkV (comprar_Besch "militarizar") ;
lin mimar_V = mkV (comprar_Besch "mimar") ;
lin mimetizar_V = mkV (comprar_Besch "mimetizar") ;
lin mirar_V = mkV (comprar_Besch "mirar") ;
lin misturar_V = mkV (comprar_Besch "misturar") ;
lin mobilizar_V = mkV (comprar_Besch "mobilizar") ;
lin modelar_V = mkV (comprar_Besch "modelar") ;
lin modernizar_V = mkV (comprar_Besch "modernizar") ;
lin modular_V = mkV (comprar_Besch "modular") ;
lin monopolizar_V = mkV (comprar_Besch "monopolizar") ;
lin moralizar_V = mkV (comprar_Besch "moralizar") ;
lin mostrar_V = mkV (comprar_Besch "mostrar") ;
lin motivar_V = mkV (comprar_Besch "motivar") ;
lin motorizar_V = mkV (comprar_Besch "motorizar") ;
lin movimentar_V = mkV (comprar_Besch "movimentar") ;
lin multar_V = mkV (comprar_Besch "multar") ;
lin mundanizar_V = mkV (comprar_Besch "mundanizar") ;
lin mutilar_V = mkV (comprar_Besch "mutilar") ;
lin gostar_V = mkV (comprar_Besch "gostar") ;
lin gabar_V = mkV (comprar_Besch "gabar") ;
lin galopar_V = mkV (comprar_Besch "galopar") ;
lin gangrenar_V = mkV (comprar_Besch "gangrenar") ;
lin ganhar_V = mkV (comprar_Besch "ganhar") ;
lin garimpar_V = mkV (comprar_Besch "garimpar") ;
lin gastar_V = mkV (comprar_Besch "gastar") ;
lin generalizar_V = mkV (comprar_Besch "generalizar") ;
lin gerar_V = mkV (comprar_Besch "gerar") ;
lin girar_V = mkV (comprar_Besch "girar") ;
lin gravar_V = mkV (comprar_Besch "gravar") ;
lin grelhar_V = mkV (comprar_Besch "grelhar") ;
lin gritar_V = mkV (comprar_Besch "gritar") ;
lin guardar_V = mkV (comprar_Besch "guardar") ;
lin guerrilhar_V = mkV (comprar_Besch "guerrilhar") ;
lin guinchar_V = mkV (comprar_Besch "guinchar") ;
lin guisar_V = mkV (comprar_Besch "guisar") ;
lin herdar_V = mkV (comprar_Besch "herdar") ;
lin hibernar_V = mkV (comprar_Besch "hibernar") ;
lin hipnotizar_V = mkV (comprar_Besch "hipnotizar") ;
lin honrar_V = mkV (comprar_Besch "honrar") ;
lin horripular_V = mkV (comprar_Besch "horripular") ;
lin hospedar_V = mkV (comprar_Besch "hospedar") ;
lin humanizar_V = mkV (comprar_Besch "humanizar") ;
lin humilhar_V = mkV (comprar_Besch "humilhar") ;
lin humorizar_V = mkV (comprar_Besch "humorizar") ;
lin idealizar_V = mkV (comprar_Besch "idealizar") ;
lin idolatrar_V = mkV (comprar_Besch "idolatrar") ;
lin implementar_V = mkV (comprar_Besch "implementar") ;
lin implantar_V = mkV (comprar_Besch "implantar") ;
lin incrementar_V = mkV (comprar_Besch "incrementar") ;
lin indignar_V = mkV (comprar_Besch "indignar") ;
lin informar_V = mkV (comprar_Besch "informar") ;
lin escutar_V = mkV (comprar_Besch "escutar") ;
lin amar_V = mkV (comprar_Besch "amar") ;
lin tirar_V = mkV (comprar_Besch "tirar") ;
lin empurrar_V = mkV (comprar_Besch "empurrar") ;
lin falar_V = mkV (comprar_Besch "falar") ;
lin separar_V = mkV (comprar_Besch "separar") ;
lin apertar_V = mkV (comprar_Besch "apertar") ;
lin chupar_V = mkV (comprar_Besch "chupar") ;
lin ensinar_V = mkV (comprar_Besch "ensinar") ;
lin atar_V = mkV (comprar_Besch "atar") ;
lin esperar_V = mkV (comprar_Besch "esperar") ;
lin lavar_V = mkV (comprar_Besch "lavar") ;
lin somar_V = mkV (comprar_Besch "somar") ;
lin sensualizar_V = mkV (comprar_Besch "sensualizar") ;
lin saltar_V = mkV (comprar_Besch "saltar") ;
lin congelar_V = mkV (comprar_Besch "congelar") ;
lin virar_V = mkV (comprar_Besch "virar") ;
lin escavar_V = mkV (comprar_Besch "escavar") ;
lin costurar_V = mkV (comprar_Besch "costurar") ;
lin cantar_V = mkV (comprar_Besch "cantar") ;
lin sentar_V = mkV (comprar_Besch "sentar") ;
lin parar_V = mkV (comprar_Besch "parar") ;
lin nadar_V = mkV (comprar_Besch "nadar") ;
lin pensar_V = mkV (comprar_Besch "pensar") ;
lin vomitar_V = mkV (comprar_Besch "vomitar") ;
lin caminhar_V = mkV (comprar_Besch "caminhar") ;
lin crer_V = mkV (crer_Besch "crer") ;
lin descrer_V = mkV (crer_Besch "descrer") ;
lin dar_V = mkV (dar_Besch "dar") ;
lin destruir_V = mkV (destruir_Besch "destruir") ;
lin construir_V = mkV (destruir_Besch "construir") ;
lin reconstruir_V = mkV (destruir_Besch "reconstruir") ;
lin distribuir_V = mkV (distribuir_Besch "distribuir") ;
lin imbuir_V = mkV (distribuir_Besch "imbuir") ;
lin afluir_V = mkV (distribuir_Besch "afluir") ;
lin confluir_V = mkV (distribuir_Besch "confluir") ;
lin fluir_V = mkV (distribuir_Besch "fluir") ;
lin influir_V = mkV (distribuir_Besch "influir") ;
lin refluir_V = mkV (distribuir_Besch "refluir") ;
lin atribuir_V = mkV (distribuir_Besch "atribuir") ;
lin contribuir_V = mkV (distribuir_Besch "contribuir") ;
lin retribuir_V = mkV (distribuir_Besch "retribuir") ;
lin instituir_V = mkV (distribuir_Besch "instituir") ;
lin restituir_V = mkV (distribuir_Besch "restituir") ;
lin substituir_V = mkV (distribuir_Besch "substituir") ;
lin divergir_V = mkV (divergir_Besch "divergir") ;
lin aspergir_V = mkV (divergir_Besch "aspergir") ;
lin convergir_V = mkV (divergir_Besch "convergir") ;
lin dizer_V = mkV (dizer_Besch "dizer") ;
lin bendizer_V = mkV (dizer_Besch "bendizer") ;
lin condizer_V = mkV (dizer_Besch "condizer") ;
lin contradizer_V = mkV (dizer_Besch "contradizer") ;
lin desdizer_V = mkV (dizer_Besch "desdizer") ;
lin maldizer_V = mkV (dizer_Besch "maldizer") ;
lin predizer_V = mkV (dizer_Besch "predizer") ;
lin doer_V = mkV (doer_Besch "doer") ;
lin dormir_V = mkV (dormir_Besch "dormir") ;
lin cobrir_V = mkV (dormir_Besch "cobrir") ;
lin descobrir_V = mkV (dormir_Besch "descobrir") ;
lin encobrir_V = mkV (dormir_Besch "encobrir") ;
lin recobrir_V = mkV (dormir_Besch "recobrir") ;
lin explodir_V = mkV (dormir_Besch "explodir") ;
lin engolir_V = mkV (dormir_Besch "engolir") ;
lin erguer_V = mkV (erguer_Besch "erguer") ;
lin soerguer_V = mkV (erguer_Besch "soerguer") ;
lin estar_V = mkV (estar_Besch "estar") ;
lin extinguir_V = mkV (extinguir_Besch "extinguir") ;
lin falir_V = mkV (falir_Besch "falir") ;
lin aguerrir_V = mkV (falir_Besch "aguerrir") ;
lin combalir_V = mkV (falir_Besch "combalir") ;
lin desflorir_V = mkV (falir_Besch "desflorir") ;
lin florir_V = mkV (falir_Besch "florir") ;
lin reflorir_V = mkV (falir_Besch "reflorir") ;
lin renhir_V = mkV (falir_Besch "renhir") ;
lin parir_V = mkV (falir_Besch "parir") ;
lin fazer_V = mkV (fazer_Besch "fazer") ;
lin afazer_V = mkV (fazer_Besch "afazer") ;
lin contrafazer_V = mkV (fazer_Besch "contrafazer") ;
lin desfazer_V = mkV (fazer_Besch "desfazer") ;
lin liquefazer_V = mkV (fazer_Besch "liquefazer") ;
lin perfazer_V = mkV (fazer_Besch "perfazer") ;
lin rarefazer_V = mkV (fazer_Besch "rarefazer") ;
lin refazer_V = mkV (fazer_Besch "refazer") ;
lin satisfazer_V = mkV (fazer_Besch "satisfazer") ;
lin ficar_V = mkV (ficar_Besch "ficar") ;
lin buscar_V = mkV (ficar_Besch "buscar") ;
lin frigir_V = mkV (frigir_Besch "frigir") ;
lin fugir_V = mkV (fugir_Besch "fugir") ;
lin garantir_V = mkV (garantir_Besch "garantir") ;
lin partir_V = mkV (garantir_Besch "partir") ;
lin haver_V = mkV (haver_Besch "haver") ;
lin abolir_V = mkV (imergir_Besch "abolir") ;
lin banir_V = mkV (imergir_Besch "banir") ;
lin brandir_V = mkV (imergir_Besch "brandir") ;
lin brunir_V = mkV (imergir_Besch "brunir") ;
lin emergir_V = mkV (imergir_Besch "emergir") ;
lin empedernir_V = mkV (imergir_Besch "empedernir") ;
lin exaurir_V = mkV (imergir_Besch "exaurir") ;
lin extorquir_V = mkV (imergir_Besch "extorquir") ;
lin fremir_V = mkV (imergir_Besch "fremir") ;
lin fulgir_V = mkV (imergir_Besch "fulgir") ;
lin jungir_V = mkV (imergir_Besch "jungir") ;
lin retorquir_V = mkV (imergir_Besch "retorquir") ;
lin submergir_V = mkV (imergir_Besch "submergir") ;
lin ungir_V = mkV (imergir_Besch "ungir") ;
lin colorir_V = mkV (imergir_Besch "colorir") ;
lin demolir_V = mkV (imergir_Besch "demolir") ;
lin ir_V = mkV (ir_Besch "ir") ;
lin jazer_V = mkV (jazer_Besch "jazer") ;
lin ler_V = mkV (ler_Besch "ler") ;
lin reler_V = mkV (ler_Besch "reler") ;
lin tresler_V = mkV (ler_Besch "tresler") ;
lin moer_V = mkV (moer_Besch "moer") ;
lin roer_V = mkV (moer_Besch "roer") ;
lin neviscar_V = mkV (neviscar_Besch "neviscar") ;
lin odiar_V = mkV (odiar_Besch "odiar") ;
lin ansiar_V = mkV (odiar_Besch "ansiar") ;
lin incendiar_V = mkV (odiar_Besch "incendiar") ;
lin mediar_V = mkV (odiar_Besch "mediar") ;
lin remediar_V = mkV (odiar_Besch "remediar") ;
lin ouvir_V = mkV (ouvir_Besch "ouvir") ;
lin pedir_V = mkV (pedir_Besch "pedir") ;
lin despedir_V = mkV (pedir_Besch "despedir") ;
lin expedir_V = mkV (pedir_Besch "expedir") ;
lin reexpedir_V = mkV (pedir_Besch "reexpedir") ;
lin impedir_V = mkV (pedir_Besch "impedir") ;
lin desimpedir_V = mkV (pedir_Besch "desimpedir") ;
lin medir_V = mkV (pedir_Besch "medir") ;
lin perder_V = mkV (perder_Besch "perder") ;
lin perdoar_V = mkV (perdoar_Besch "perdoar") ;
lin abalroar_V = mkV (perdoar_Besch "abalroar") ;
lin abençoar_V = mkV (perdoar_Besch "abençoar") ;
lin amaldiçoar_V = mkV (perdoar_Besch "amaldiçoar") ;
lin aperfeiçoar_V = mkV (perdoar_Besch "aperfeiçoar") ;
lin apregoar_V = mkV (perdoar_Besch "apregoar") ;
lin coar_V = mkV (perdoar_Besch "coar") ;
lin doar_V = mkV (perdoar_Besch "doar") ;
lin entoar_V = mkV (perdoar_Besch "entoar") ;
lin esboroar_V = mkV (perdoar_Besch "esboroar") ;
lin povoar_V = mkV (perdoar_Besch "povoar") ;
lin soar_V = mkV (perdoar_Besch "soar") ;
lin toar_V = mkV (perdoar_Besch "toar") ;
lin voar_V = mkV (perdoar_Besch "voar") ;
lin poder_V = mkV (poder_Besch "poder") ;
lin polir_V = mkV (polir_Besch "polir") ;
lin pôr_V = mkV (pôr_Besch "pôr") ;
lin apor_V = mkV (pôr_Besch "apor") ;
lin compor_V = mkV (pôr_Besch "compor") ;
lin contrapor_V = mkV (pôr_Besch "contrapor") ;
lin decompor_V = mkV (pôr_Besch "decompor") ;
lin descompor_V = mkV (pôr_Besch "descompor") ;
lin dispor_V = mkV (pôr_Besch "dispor") ;
lin expor_V = mkV (pôr_Besch "expor") ;
lin impor_V = mkV (pôr_Besch "impor") ;
lin opor_V = mkV (pôr_Besch "opor") ;
lin propor_V = mkV (pôr_Besch "propor") ;
lin repor_V = mkV (pôr_Besch "repor") ;
lin supor_V = mkV (pôr_Besch "supor") ;
lin prazer_V = mkV (prazer_Besch "prazer") ;
lin precaver_V = mkV (precaver_Besch "precaver") ;
lin preferir_V = mkV (preferir_Besch "preferir") ;
lin aderir_V = mkV (preferir_Besch "aderir") ;
lin aferir_V = mkV (preferir_Besch "aferir") ;
lin conferir_V = mkV (preferir_Besch "conferir") ;
lin deferir_V = mkV (preferir_Besch "deferir") ;
lin diferir_V = mkV (preferir_Besch "diferir") ;
lin digerir_V = mkV (preferir_Besch "digerir") ;
lin ferir_V = mkV (preferir_Besch "ferir") ;
lin inferir_V = mkV (preferir_Besch "inferir") ;
lin inserir_V = mkV (preferir_Besch "inserir") ;
lin proferir_V = mkV (preferir_Besch "proferir") ;
lin referir_V = mkV (preferir_Besch "referir") ;
lin repelir_V = mkV (preferir_Besch "repelir") ;
lin repetir_V = mkV (preferir_Besch "repetir") ;
lin sugerir_V = mkV (preferir_Besch "sugerir") ;
lin transferir_V = mkV (preferir_Besch "transferir") ;
lin proibir_V = mkV (proibir_Besch "proibir") ;
lin coibir_V = mkV (proibir_Besch "coibir") ;
lin proteger_V = mkV (proteger_Besch "proteger") ;
lin eleger_V = mkV (proteger_Besch "eleger") ;
lin reger_V = mkV (proteger_Besch "reger") ;
lin prover_V = mkV (prover_Besch "prover") ;
lin querer_V = mkV (querer_Besch "querer") ;
lin reaver_V = mkV (reaver_Besch "reaver") ;
lin recear_V = mkV (recear_Besch "recear") ;
lin acarear_V = mkV (recear_Besch "acarear") ;
lin afear_V = mkV (recear_Besch "afear") ;
lin altear_V = mkV (recear_Besch "altear") ;
lin apear_V = mkV (recear_Besch "apear") ;
lin arquear_V = mkV (recear_Besch "arquear") ;
lin asnear_V = mkV (recear_Besch "asnear") ;
lin costear_V = mkV (recear_Besch "costear") ;
lin custear_V = mkV (recear_Besch "custear") ;
lin enfrear_V = mkV (recear_Besch "enfrear") ;
lin frear_V = mkV (recear_Besch "frear") ;
lin olear_V = mkV (recear_Besch "olear") ;
lin passear_V = mkV (recear_Besch "passear") ;
lin pear_V = mkV (recear_Besch "pear") ;
lin pentear_V = mkV (recear_Besch "pentear") ;
lin pratear_V = mkV (recear_Besch "pratear") ;
lin presentear_V = mkV (recear_Besch "presentear") ;
lin recrear_V = mkV (recear_Besch "recrear") ;
lin saborear_V = mkV (recear_Besch "saborear") ;
lin sofrear_V = mkV (recear_Besch "sofrear") ;
lin esfaquear_V = mkV (recear_Besch "esfaquear") ;
lin escassear_V = mkV (recear_Besch "escassear") ;
lin escarcear_V = mkV (recear_Besch "escarcear") ;
lin escamotear_V = mkV (recear_Besch "escamotear") ;
lin esfoguear_V = mkV (recear_Besch "esfoguear") ;
lin estear_V = mkV (recear_Besch "estear") ;
lin esbofetear_V = mkV (recear_Besch "esbofetear") ;
lin espernear_V = mkV (recear_Besch "espernear") ;
lin redigir_V = mkV (redigir_Besch "redigir") ;
lin afligir_V = mkV (redigir_Besch "afligir") ;
lin agir_V = mkV (redigir_Besch "agir") ;
lin coligir_V = mkV (redigir_Besch "coligir") ;
lin corrigir_V = mkV (redigir_Besch "corrigir") ;
lin erigir_V = mkV (redigir_Besch "erigir") ;
lin exigir_V = mkV (redigir_Besch "exigir") ;
lin fingir_V = mkV (redigir_Besch "fingir") ;
lin frangir_V = mkV (redigir_Besch "frangir") ;
lin infligir_V = mkV (redigir_Besch "infligir") ;
lin transigir_V = mkV (redigir_Besch "transigir") ;
lin refletir_V = mkV (refletir_Besch "refletir") ;
lin fletir_V = mkV (refletir_Besch "fletir") ;
lin defletir_V = mkV (refletir_Besch "defletir") ;
lin infletir_V = mkV (refletir_Besch "infletir") ;
lin remir_V = mkV (remir_Besch "remir") ;
lin requerer_V = mkV (requerer_Besch "requerer") ;
lin reunir_V = mkV (reunir_Besch "reunir") ;
lin rir_V = mkV (rir_Besch "rir") ;
lin sorrir_V = mkV (rir_Besch "sorrir") ;
lin saber_V = mkV (saber_Besch "saber") ;
lin dessaber_V = mkV (saber_Besch "dessaber") ;
lin sair_V = mkV (sair_Besch "sair") ;
lin cair_V = mkV (sair_Besch "cair") ;
lin decair_V = mkV (sair_Besch "decair") ;
lin descair_V = mkV (sair_Besch "descair") ;
lin recair_V = mkV (sair_Besch "recair") ;
lin trair_V = mkV (sair_Besch "trair") ;
lin atrair_V = mkV (sair_Besch "atrair") ;
lin contrair_V = mkV (sair_Besch "contrair") ;
lin distrair_V = mkV (sair_Besch "distrair") ;
lin extrair_V = mkV (sair_Besch "extrair") ;
lin protrair_V = mkV (sair_Besch "protrair") ;
lin retrair_V = mkV (sair_Besch "retrair") ;
lin subtrair_V = mkV (sair_Besch "subtrair") ;
lin saudar_V = mkV (saudar_Besch "saudar") ;
lin seguir_V = mkV (seguir_Besch "seguir") ;
lin conseguir_V = mkV (seguir_Besch "conseguir") ;
lin perseguir_V = mkV (seguir_Besch "perseguir") ;
lin prosseguir_V = mkV (seguir_Besch "prosseguir") ;
lin sentir_V = mkV (sentir_Besch "sentir") ;
lin assentir_V = mkV (sentir_Besch "assentir") ;
lin consentir_V = mkV (sentir_Besch "consentir") ;
lin pressentir_V = mkV (sentir_Besch "pressentir") ;
lin ressentir_V = mkV (sentir_Besch "ressentir") ;
lin mentir_V = mkV (sentir_Besch "mentir") ;
lin desmentir_V = mkV (sentir_Besch "desmentir") ;
lin ser_V = mkV (ser_Besch "ser") ;
lin servir_V = mkV (servir_Besch "servir") ;
lin concernir_V = mkV (servir_Besch "concernir") ;
lin discernir_V = mkV (servir_Besch "discernir") ;
lin cerzir_V = mkV (servir_Besch "cerzir") ;
lin despir_V = mkV (servir_Besch "despir") ;
lin vestir_V = mkV (servir_Besch "vestir") ;
lin investir_V = mkV (servir_Besch "investir") ;
lin revestir_V = mkV (servir_Besch "revestir") ;
lin ter_V = mkV (ter_Besch "ter") ;
lin conter_V = mkV (ter_Besch "conter") ;
lin deter_V = mkV (ter_Besch "deter") ;
lin entreter_V = mkV (ter_Besch "entreter") ;
lin reter_V = mkV (ter_Besch "reter") ;
lin suster_V = mkV (ter_Besch "suster") ;
lin traduzir_V = mkV (traduzir_Besch "traduzir") ;
lin abduzir_V = mkV (traduzir_Besch "abduzir") ;
lin aduzir_V = mkV (traduzir_Besch "aduzir") ;
lin conduzir_V = mkV (traduzir_Besch "conduzir") ;
lin deduzir_V = mkV (traduzir_Besch "deduzir") ;
lin induzir_V = mkV (traduzir_Besch "induzir") ;
lin introduzir_V = mkV (traduzir_Besch "introduzir") ;
lin luzir_V = mkV (traduzir_Besch "luzir") ;
lin perluzir_V = mkV (traduzir_Besch "perluzir") ;
lin produzir_V = mkV (traduzir_Besch "produzir") ;
lin reduzir_V = mkV (traduzir_Besch "reduzir") ;
lin reluzir_V = mkV (traduzir_Besch "reluzir") ;
lin seduzir_V = mkV (traduzir_Besch "seduzir") ;
lin trazer_V = mkV (trazer_Besch "trazer") ;
lin valer_V = mkV (valer_Besch "valer") ;
lin desvaler_V = mkV (valer_Besch "desvaler") ;
lin equivaler_V = mkV (valer_Besch "equivaler") ;
lin vender_V = mkV (vender_Besch "vender") ;
lin responder_V = mkV (vender_Besch "responder") ;
lin beber_V = mkV (vender_Besch "beber") ;
lin comer_V = mkV (vender_Besch "comer") ;
lin temer_V = mkV (vender_Besch "temer") ;
lin bater_V = mkV (vender_Besch "bater") ;
lin benzer_V = mkV (vender_Besch "benzer") ;
lin morder_V = mkV (vender_Besch "morder") ;
lin aprender_V = mkV (vender_Besch "aprender") ;
lin entender_V = mkV (vender_Besch "entender") ;
lin envolver_V = mkV (vender_Besch "envolver") ;
lin esbater_V = mkV (vender_Besch "esbater") ;
lin remover_V = mkV (vender_Besch "remover") ;
lin remeter_V = mkV (vender_Besch "remeter") ;
lin remexer_V = mkV (vender_Besch "remexer") ;
lin resolver_V = mkV (vender_Besch "resolver") ;
lin reviver_V = mkV (vender_Besch "reviver") ;
lin morrer_V = mkV (vender_Besch "morrer") ;
lin viver_V = mkV (vender_Besch "viver") ;
lin correr_V = mkV (vender_Besch "correr") ;
lin coser_V = mkV (vender_Besch "coser") ;
lin ver_V = mkV (ver_Besch "ver") ;
lin antever_V = mkV (ver_Besch "antever") ;
lin entrever_V = mkV (ver_Besch "entrever") ;
lin prever_V = mkV (ver_Besch "prever") ;
lin rever_V = mkV (ver_Besch "rever") ;
lin vir_V = mkV (vir_Besch "vir") ;
lin advir_V = mkV (vir_Besch "advir") ;
lin convir_V = mkV (vir_Besch "convir") ;
lin desavir_V = mkV (vir_Besch "desavir") ;
lin intervir_V = mkV (vir_Besch "intervir") ;
lin porvir_V = mkV (vir_Besch "porvir") ;
lin sobrevir_V = mkV (vir_Besch "sobrevir") ;
lin suar_V = mkV (suar_Besch "suar") ;
lin flutuar_V = mkV (suar_Besch "flutuar") ;
lin viajar_V = mkV (viajar_Besch "viajar") ;
lin peneirar_V = mkV (peneirar_Besch "peneirar") ;
lin cheirar_V = mkV (peneirar_Besch "cheirar") ;
lin queixar_V = mkV (peneirar_Besch "queixar") ;
lin queimar_V = mkV (peneirar_Besch "queimar") ;
} ;

View File

@@ -1,4 +1,549 @@
--# -path=.:../romance:../common:../abstract:../prelude
abstract IrregPorAbs = Cat ** {
flags coding=utf8 ;
}
-- machine-generated file: do not edit directly!
-- see https://gitlab.com/odanoburu/gf-pt
fun
acontecer_V : V ;
conhecer_V : V ;
coalescer_V : V ;
comparecer_V : V ;
compadecer_V : V ;
contorcer_V : V ;
convalescer_V : V ;
convencer_V : V ;
acudir_V : V ;
bulir_V : V ;
cuspir_V : V ;
sacudir_V : V ;
subir_V : V ;
sumir_V : V ;
consumir_V : V ;
adequar_V : V ;
agredir_V : V ;
denegrir_V : V ;
prevenir_V : V ;
progredir_V : V ;
transgredir_V : V ;
anunciar_V : V ;
abreviar_V : V ;
acariciar_V : V ;
afiar_V : V ;
aliviar_V : V ;
apreciar_V : V ;
assobiar_V : V ;
avaliar_V : V ;
avariar_V : V ;
criar_V : V ;
denunciar_V : V ;
desviar_V : V ;
enfiar_V : V ;
enviar_V : V ;
iniciar_V : V ;
principiar_V : V ;
pronunciar_V : V ;
renunciar_V : V ;
assediar_V : V ;
aprazer_V : V ;
desprazer_V : V ;
aquecer_V : V ;
agradecer_V : V ;
amarelecer_V : V ;
amolecer_V : V ;
arrefecer_V : V ;
empecer_V : V ;
entretecer_V : V ;
entristecer_V : V ;
escurecer_V : V ;
estremecer_V : V ;
favorecer_V : V ;
merecer_V : V ;
oferecer_V : V ;
parecer_V : V ;
perecer_V : V ;
reverdecer_V : V ;
tecer_V : V ;
esquecer_V : V ;
escarnecer_V : V ;
escurecer_V : V ;
arguir_V : V ;
redarguir_V : V ;
averiguar_V : V ;
aguar_V : V ;
apaniguar_V : V ;
apaziguar_V : V ;
apropinquar_V : V ;
deliquar_V : V ;
desaguar_V : V ;
enxaguar_V : V ;
obliquar_V : V ;
caber_V : V ;
chegar_V : V ;
rogar_V : V ;
jogar_V : V ;
julgar_V : V ;
interrogar_V : V ;
intrigar_V : V ;
investigar_V : V ;
enxergar_V : V ;
enrugar_V : V ;
escorregar_V : V ;
esmagar_V : V ;
esfregar_V : V ;
irrigar_V : V ;
interligar_V : V ;
instigar_V : V ;
largar_V : V ;
legalizar_V : V ;
ligar_V : V ;
litigar_V : V ;
madrugar_V : V ;
esfregar_V : V ;
apagar_V : V ;
tragar_V : V ;
chover_V : V ;
começar_V : V ;
caçar_V : V ;
coçar_V : V ;
comerciar_V : V ;
agenciar_V : V ;
licenciar_V : V ;
negociar_V : V ;
obsequiar_V : V ;
premiar_V : V ;
providenciar_V : V ;
sentenciar_V : V ;
silenciar_V : V ;
comprar_V : V ;
pintar_V : V ;
perguntar_V : V ;
quebrar_V : V ;
fechar_V : V ;
contar_V : V ;
cortar_V : V ;
compilar_V : V ;
lutar_V : V ;
encontrar_V : V ;
encomendar_V : V ;
encalacrar_V : V ;
encaminhar_V : V ;
estampar_V : V ;
encanar_V : V ;
encampar_V : V ;
encantar_V : V ;
encapotar_V : V ;
encarar_V : V ;
encarcerar_V : V ;
matar_V : V ;
menosprezar_V : V ;
marchar_V : V ;
maravilhar_V : V ;
marombar_V : V ;
respirar_V : V ;
martirizar_V : V ;
martelar_V : V ;
mascarar_V : V ;
masturbar_V : V ;
materializar_V : V ;
matizar_V : V ;
mazelar_V : V ;
mecanizar_V : V ;
mediocrizar_V : V ;
meditar_V : V ;
melar_V : V ;
melhorar_V : V ;
memorizar_V : V ;
mencionar_V : V ;
mensurar_V : V ;
assoprar_V : V ;
metralhar_V : V ;
migrar_V : V ;
militar_V : V ;
militarizar_V : V ;
mimar_V : V ;
mimetizar_V : V ;
mirar_V : V ;
misturar_V : V ;
mobilizar_V : V ;
modelar_V : V ;
modernizar_V : V ;
modular_V : V ;
monopolizar_V : V ;
moralizar_V : V ;
mostrar_V : V ;
motivar_V : V ;
motorizar_V : V ;
movimentar_V : V ;
multar_V : V ;
mundanizar_V : V ;
mutilar_V : V ;
gostar_V : V ;
gabar_V : V ;
galopar_V : V ;
gangrenar_V : V ;
ganhar_V : V ;
garimpar_V : V ;
gastar_V : V ;
generalizar_V : V ;
gerar_V : V ;
girar_V : V ;
gravar_V : V ;
grelhar_V : V ;
gritar_V : V ;
guardar_V : V ;
guerrilhar_V : V ;
guinchar_V : V ;
guisar_V : V ;
herdar_V : V ;
hibernar_V : V ;
hipnotizar_V : V ;
honrar_V : V ;
horripular_V : V ;
hospedar_V : V ;
humanizar_V : V ;
humilhar_V : V ;
humorizar_V : V ;
idealizar_V : V ;
idolatrar_V : V ;
implementar_V : V ;
implantar_V : V ;
incrementar_V : V ;
indignar_V : V ;
informar_V : V ;
escutar_V : V ;
amar_V : V ;
tirar_V : V ;
empurrar_V : V ;
falar_V : V ;
separar_V : V ;
apertar_V : V ;
chupar_V : V ;
ensinar_V : V ;
atar_V : V ;
esperar_V : V ;
lavar_V : V ;
somar_V : V ;
sensualizar_V : V ;
saltar_V : V ;
congelar_V : V ;
virar_V : V ;
escavar_V : V ;
costurar_V : V ;
cantar_V : V ;
sentar_V : V ;
parar_V : V ;
nadar_V : V ;
pensar_V : V ;
vomitar_V : V ;
caminhar_V : V ;
crer_V : V ;
descrer_V : V ;
dar_V : V ;
destruir_V : V ;
construir_V : V ;
reconstruir_V : V ;
distribuir_V : V ;
imbuir_V : V ;
afluir_V : V ;
confluir_V : V ;
fluir_V : V ;
influir_V : V ;
refluir_V : V ;
atribuir_V : V ;
contribuir_V : V ;
retribuir_V : V ;
instituir_V : V ;
restituir_V : V ;
substituir_V : V ;
divergir_V : V ;
aspergir_V : V ;
convergir_V : V ;
dizer_V : V ;
bendizer_V : V ;
condizer_V : V ;
contradizer_V : V ;
desdizer_V : V ;
maldizer_V : V ;
predizer_V : V ;
doer_V : V ;
dormir_V : V ;
cobrir_V : V ;
descobrir_V : V ;
encobrir_V : V ;
recobrir_V : V ;
explodir_V : V ;
engolir_V : V ;
tossir_V : V ;
erguer_V : V ;
soerguer_V : V ;
estar_V : V ;
extinguir_V : V ;
falir_V : V ;
aguerrir_V : V ;
combalir_V : V ;
desflorir_V : V ;
florir_V : V ;
reflorir_V : V ;
renhir_V : V ;
parir_V : V ;
fazer_V : V ;
afazer_V : V ;
contrafazer_V : V ;
desfazer_V : V ;
liquefazer_V : V ;
perfazer_V : V ;
rarefazer_V : V ;
refazer_V : V ;
satisfazer_V : V ;
ficar_V : V ;
buscar_V : V ;
frigir_V : V ;
fugir_V : V ;
garantir_V : V ;
partir_V : V ;
haver_V : V ;
abolir_V : V ;
banir_V : V ;
brandir_V : V ;
brunir_V : V ;
emergir_V : V ;
empedernir_V : V ;
exaurir_V : V ;
extorquir_V : V ;
fremir_V : V ;
fulgir_V : V ;
jungir_V : V ;
retorquir_V : V ;
submergir_V : V ;
ungir_V : V ;
colorir_V : V ;
demolir_V : V ;
ir_V : V ;
jazer_V : V ;
ler_V : V ;
reler_V : V ;
tresler_V : V ;
moer_V : V ;
roer_V : V ;
neviscar_V : V ;
odiar_V : V ;
ansiar_V : V ;
incendiar_V : V ;
mediar_V : V ;
remediar_V : V ;
ouvir_V : V ;
pedir_V : V ;
despedir_V : V ;
expedir_V : V ;
reexpedir_V : V ;
impedir_V : V ;
desimpedir_V : V ;
medir_V : V ;
perder_V : V ;
perdoar_V : V ;
abalroar_V : V ;
abençoar_V : V ;
amaldiçoar_V : V ;
aperfeiçoar_V : V ;
apregoar_V : V ;
coar_V : V ;
doar_V : V ;
entoar_V : V ;
esboroar_V : V ;
povoar_V : V ;
soar_V : V ;
toar_V : V ;
voar_V : V ;
poder_V : V ;
polir_V : V ;
pôr_V : V ;
apor_V : V ;
compor_V : V ;
contrapor_V : V ;
decompor_V : V ;
descompor_V : V ;
dispor_V : V ;
expor_V : V ;
impor_V : V ;
opor_V : V ;
propor_V : V ;
repor_V : V ;
supor_V : V ;
prazer_V : V ;
precaver_V : V ;
preferir_V : V ;
aderir_V : V ;
aferir_V : V ;
conferir_V : V ;
deferir_V : V ;
diferir_V : V ;
digerir_V : V ;
ferir_V : V ;
inferir_V : V ;
inserir_V : V ;
proferir_V : V ;
referir_V : V ;
repelir_V : V ;
repetir_V : V ;
sugerir_V : V ;
transferir_V : V ;
proibir_V : V ;
coibir_V : V ;
proteger_V : V ;
eleger_V : V ;
reger_V : V ;
prover_V : V ;
querer_V : V ;
reaver_V : V ;
recear_V : V ;
acarear_V : V ;
afear_V : V ;
altear_V : V ;
apear_V : V ;
arquear_V : V ;
asnear_V : V ;
costear_V : V ;
custear_V : V ;
enfrear_V : V ;
frear_V : V ;
olear_V : V ;
passear_V : V ;
pear_V : V ;
pentear_V : V ;
pratear_V : V ;
presentear_V : V ;
recrear_V : V ;
saborear_V : V ;
sofrear_V : V ;
esfaquear_V : V ;
escassear_V : V ;
escarcear_V : V ;
escamotear_V : V ;
esfoguear_V : V ;
estear_V : V ;
esbofetear_V : V ;
espernear_V : V ;
redigir_V : V ;
afligir_V : V ;
agir_V : V ;
coligir_V : V ;
corrigir_V : V ;
erigir_V : V ;
exigir_V : V ;
fingir_V : V ;
frangir_V : V ;
infligir_V : V ;
transigir_V : V ;
refletir_V : V ;
fletir_V : V ;
defletir_V : V ;
infletir_V : V ;
remir_V : V ;
requerer_V : V ;
reunir_V : V ;
rir_V : V ;
sorrir_V : V ;
saber_V : V ;
dessaber_V : V ;
sair_V : V ;
cair_V : V ;
decair_V : V ;
descair_V : V ;
recair_V : V ;
trair_V : V ;
atrair_V : V ;
contrair_V : V ;
distrair_V : V ;
extrair_V : V ;
protrair_V : V ;
retrair_V : V ;
subtrair_V : V ;
saudar_V : V ;
seguir_V : V ;
conseguir_V : V ;
perseguir_V : V ;
prosseguir_V : V ;
sentir_V : V ;
assentir_V : V ;
consentir_V : V ;
pressentir_V : V ;
ressentir_V : V ;
mentir_V : V ;
desmentir_V : V ;
ser_V : V ;
servir_V : V ;
concernir_V : V ;
discernir_V : V ;
cerzir_V : V ;
despir_V : V ;
vestir_V : V ;
investir_V : V ;
revestir_V : V ;
ter_V : V ;
conter_V : V ;
deter_V : V ;
entreter_V : V ;
reter_V : V ;
suster_V : V ;
traduzir_V : V ;
abduzir_V : V ;
aduzir_V : V ;
conduzir_V : V ;
deduzir_V : V ;
induzir_V : V ;
introduzir_V : V ;
luzir_V : V ;
perluzir_V : V ;
produzir_V : V ;
reduzir_V : V ;
reluzir_V : V ;
seduzir_V : V ;
trazer_V : V ;
valer_V : V ;
desvaler_V : V ;
equivaler_V : V ;
vender_V : V ;
responder_V : V ;
beber_V : V ;
comer_V : V ;
temer_V : V ;
bater_V : V ;
benzer_V : V ;
morder_V : V ;
aprender_V : V ;
entender_V : V ;
envolver_V : V ;
esbater_V : V ;
remover_V : V ;
remeter_V : V ;
remexer_V : V ;
resolver_V : V ;
reviver_V : V ;
morrer_V : V ;
viver_V : V ;
correr_V : V ;
coser_V : V ;
ver_V : V ;
antever_V : V ;
entrever_V : V ;
prever_V : V ;
rever_V : V ;
vir_V : V ;
advir_V : V ;
convir_V : V ;
desavir_V : V ;
intervir_V : V ;
porvir_V : V ;
sobrevir_V : V ;
suar_V : V ;
flutuar_V : V ;
viajar_V : V ;
peneirar_V : V ;
cheirar_V : V ;
queixar_V : V ;
queimar_V : V ;
} ;

View File

@@ -2,8 +2,9 @@ CompCN {"um"} DET det head
ComplVS {"que"} SCONJ mark head
EmbedS {"que"} PRON nsubj head
EmbedVP {"de"} ADP mark head
ExistNPAdv {"existe", "há"} AUX aux head
ExtAdvS,SubjS,VocNP {","} PUNCT punct head
PassV2 {"era","sido"} AUX aux:pass head
PassV2 {"era","sido","foi"} AUX aux:pass head
PredVP {"há"} AUX aux head
PredVP {"se"} PRON expl head
ProgrVP {"estavam"} AUX aux head
@@ -11,5 +12,8 @@ SelfAdVVP {"ela"} PRON obl head
SelfAdVVP {"própria"} DET det head
SlashV2a,UseComp,UseV {"não"} ADV advmod head
SlashV2V {"a"} ADP mark head
UseComp,ProgrVP,QuestIComp {"é","sou","são","está","estão","estava"} VERB cop head
UseComp,ProgrVP,QuestIComp {"é","sou","são","está","estão","estava","estou"} VERB cop head
UsePN {"de","por"} ADP case head
-- morphological feature labels
-- missing

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" "provavelmente")) ;
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,28 +37,28 @@ lin
long_A = mkA "longo" ;
narrow_A = mkA "estreito" ;
near_A = mkA "perto" ;
new_A = prefA (mkA "novo") ;
old_A = prefA (mkA "velho") ;
ready_A = adjCopula (mkA "pronto") D.estarCopula ;
new_A = prefixA (mkA "novo") ;
old_A = prefixA (mkA "velho") ;
ready_A = mkA (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" ;
thick_A = mkA "grosso" ;
thin_A = mkA "fino" ; -- delgado, magro
ugly_A = mkA "feio" ;
uncertain_A = mkA "incerto" ;
uncertain_A = mkA (mkA "incerto") D.estarCopula ;
warm_A = mkA "quente" ;
wet_A = mkA "molhado" ;
white_A = compADeg (mkA "branco") ;
wide_A = mkA "largo" ; -- extenso
yellow_A = mkA "amarelo" ;
young_A = prefA (mkA "jovem" "juvenilmente") ;
young_A = prefixA (mkA "jovem") ;
already_Adv = mkAdv "já" ;
far_Adv = mkAdv "longe" ; ----?
now_Adv = mkAdv "agora" ;
@@ -191,7 +191,7 @@ lin
question_N = mkN "pergunta" ;
radio_N = mkN "rádio" ;
rain_N = mkN "chuva" ;
reason_N = mkN "razão" ;
reason_N = mkN "razão" feminine ;
religion_N = mkN "religião" ;
restaurant_N = mkN "restaurante" ;
river_N = mkN "rio" ;
@@ -232,7 +232,7 @@ lin
table_N = mkN "mesa" ;
tail_N = mkN "rabo" ;
teacher_N = mkN "professor" ;
television_N = mkN "televisão" ;
television_N = mkN "televisão" feminine ;
tongue_N = mkN "língua" ;
tooth_N = mkN "dente" ;
train_N = mkN "trem" ;
@@ -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
@@ -276,12 +276,12 @@ lin
hate_V2 = mkV2 (mkV (odiar_Besch "odiar")) ;
hear_V2 = mkV2 (mkV "ouvir") ;
hit_V2 = mkV2 (mkV "bater") ;
hold_V2 = mkV2 ter_V ;
hold_V2 = mkV2 have_V ;
hunt_V2 = mkV2 (mkV "caçar") ;
kill_V2 = mkV2 (mkV "matar") ;
kill_V2 = mkV2 (mkV "matar" "morto") ;
know_V2 = mkV2 (mkV "conhecer") ;
learn_V2 = mkV2 (mkV "aprender") ;
leave_V2 = mkV2 (mkV "partir") ;
leave_V2 = mkV2 (mkV "partir") genitive ;
like_V2 = mkV2 (mkV "gostar") genitive ;
listen_V2 = mkV2 (mkV "escutar") ;
lose_V2 = mkV2 (mkV (perder_Besch "perder")) ;
@@ -301,7 +301,7 @@ lin
squeeze_V2 = mkV2 (mkV "apertar") ;
stab_V2 = mkV2 (mkV (recear_Besch "esfaquear")) ;
suck_V2 = mkV2 (mkV "chupar") ;
switch8off_V2 = mkV2 (mkV "apagar") ;
switch8off_V2 = mkV2 (mkV "desligar") ;
switch8on_V2 = mkV2 (mkV "ligar") ; -- acender
teach_V2 = mkV2 (mkV "ensinar") ;
throw_V2 = mkV2 (mkV "jogar") ;
@@ -319,11 +319,11 @@ lin
send_V3 = mkV3 (mkV "enviar") dative ; -- mandar
talk_V3 = mkV3 (mkV "falar") dative genitive ;
become_VA = reflV (mkV "tornar") ;
know_VQ = mkVQ saber_V ;
know_VQ = mkVQ know_V ;
wonder_VQ = mkVQ (reflV (mkV "perguntar")) ;
fear_VS = mkVS (mkV "temer") ;
hope_VS = mkVS (mkV "esperar") ;
know_VS = mkVS saber_V ;
fear_VS = subjVS (mkV "temer") ;
hope_VS = subjVS (mkV "esperar") ;
know_VS = mkVS know_V ;
say_VS = mkVS (mkV (dizer_Besch "dizer")) ;
-- V
blow_V = mkV "assoprar" ;
@@ -347,7 +347,7 @@ lin
sew_V = mkV "costurar" ;
sing_V = mkV "cantar" ;
sit_V = reflV (mkV "sentar") ;
sleep_V = mkV "dormir" ;
sleep_V = mkV (dormir_Besch "dormir") ;
smell_V = mkV "cheirar" ;
spit_V = mkV "cuspir" ;
stand_V = mkV (estar_Besch "estar") ; ---- "estar de pé" ;
@@ -363,10 +363,10 @@ lin
alas_Interj = ss "infelizmente" ;
oper
saber_V : V ;
saber_V = mkV (saber_Besch "saber") ;
know_V : V ;
know_V = mkV (saber_Besch "saber") ;
ter_V : V ;
ter_V = mkV (ter_Besch "ter") ;
have_V : V ;
have_V = mkV (ter_Besch "ter") ;
} ;

View File

@@ -14,8 +14,6 @@ resource MorphoPor = CommonRomance, ResPor **
coding=utf8 ;
--2 Nouns
--
-- The following macro is useful for creating the forms of
-- number-dependent tables, such as common nouns.
oper
-- For example:
@@ -43,29 +41,40 @@ oper
nomCanal : Str -> Number => Str = \canal ->
numForms canal (init canal + "is") ;
acuteVowel : Str -> Str = \v ->
nomReptil : Str -> Number => Str = \reptil ->
numForms reptil (tk 2 reptil + "eis") ;
nomNounNoun : Str -> Str -> Number => Str = \couve,flor ->
let couves = mkNomReg' couve ;
flores = mkNomReg' flor
in numForms (couve + "-" + flor) (couves.s ! Pl + "-" + flores.s ! Pl) ;
nomVerbNoun : Str -> Str -> Number => Str = \guarda,chuva ->
let chuvas = mkNomReg' chuva
in numForms (guarda + "-" + chuva) (guarda + "-" + chuvas.s ! Pl) ;
nomChapeudesol : Str -> Str -> Str -> Number => Str = \chapeu,de,sol ->
let chapeus = mkNomReg' chapeu
in numForms (chapeu + "-" + de + "-" + sol) (chapeus.s ! Pl + "-" + de + "-" + sol) ;
vowelToAcute : Str -> Str = \v ->
case v of {
"a" => "á" ;
"e" => "é" ;
"i" => "í" ;
"o" => "ó" ;
"u" => "ú" ;
_ => error "input must be vowel character."
_ => error ("input" ++ v ++ "must be vowel character.")
} ;
nomReptil : Str -> Number => Str = \reptil ->
numForms reptil (tk 2 reptil + "eis") ;
nomFenol : Str -> Number => Str = \fenol ->
case fenol of {
fen + v@("a"|"e"|"i"|"o"|"u") + "l" => numForms fenol (fen + acuteVowel v + "is")
};
nomVowelL : Str -> Number => Str = \nom ->
-- papel -> papéis, móvel -> móveis
case occurs "áéíúó" nom of {
PTrue => nomCanal nom ;
PFalse => nomFenol nom
diacriticToVowel : Str -> Str = \v ->
case v of {
("á"|"â"|"ã") => "a" ;
("é"|"ê") => "e" ;
"í" => "i" ;
("ó"|"ô"|"õ") => "o" ;
"ú" => "u" ;
_ => error ("input" ++ v ++ "must be a vowel character with an accent.")
} ;
-- Common nouns are inflected in number and have an inherent gender.
@@ -76,41 +85,65 @@ oper
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
mkNoun (numForms mec mecs) ;
smartGenNoun : Str -> Gender -> Noun = \vinho,g -> case vinho of {
rapa + ("z"|"s") => -- capataz/Masc, flor/Fem, obus/Masc
mkNoun (nomRapaz vinho) g ;
can + "al" => -- canal/Masc, vogal/Fem
mkNoun (nomCanal vinho) g ;
pap + "el" => -- cascavel/Fem, infiel/Masc
mkNoun (nomVowelL vinho) g ;
home + "m" => -- homem/Masc, nuvem/nuvens
mkNoun (nomNuvem vinho) g ;
tóra + "x" => -- tórax/Masc, xerox/Fem
mkNoun (nomAreia vinho) g ;
_ =>
mkNoun (nomVinho vinho) g
} ;
mkNomReg : Str -> Noun = \vinho -> case vinho of {
cas + ("a" | "ã" | "dade" | "tude" | "ise" | "ite") =>
-- casa, artesã, saudade, juventude, marquise, artrite
mkNoun (nomVinho vinho) Fem ;
va + "gem" =>
mkNoun (nomNuvem vinho) Fem ;
certid + "ão" => -- other rules depend on stress, can this be built with gf?
mkNoun (nomFalcao vinho) Fem ;
proble + ("ma" | "n" | "o" | "á") => -- problema, líquen, carro, maracujá
mkNoun (nomVinho vinho) Masc ;
can + "r" => -- feminine words ending with 'r' usually are also masculine
mkNoun (nomRapaz vinho) Masc ;
can + ("i" | "u") + "l" => -- canil, azul | what about fóssil?
mkNoun (nomCanal vinho) Masc ;
fen + "ol" => mkNoun (nomVowelL vinho) Masc ;
urub + "u" => mkNoun (nomVinho vinho) Masc ;
_ => smartGenNoun vinho Masc
chapéu + "-" + de + "-" + sol => mkNoun (nomChapeudesol chapéu de sol) Masc ;
-- use nomVerbNoun for compounds of verb+noun
couve + "-" + flor => mkNoun (nomNounNoun couve flor) Masc ;
_ => mkNomReg' vinho
} ;
--2 Adjectives
mkNomReg' : Str -> Noun = \vinho -> case vinho of {
-- casa, artesã, saudade, juventude, marquise, artrite
cas + ("a"|"ã"|"dade"|"tude"|"ise"|"ite") =>
mkNoun (nomVinho vinho) Fem ;
va + "gem" => mkNoun (nomNuvem vinho) Fem ;
-- if syllable stress is not on -ão, orthographical rules say that
-- it should be marked with an accented letter
s + ("ó"|"â"|"á"|"ê"|"é"|"ô"|"í"|"ú") + t + "ão"
=> mkNoun (nomVinho vinho) Masc ; -- although gender is still not predictable, counterexample *bênção
-- fails for e.g. *coração, but the productive morpheme -ção is
-- feminine (https://en.wiktionary.org/wiki/-%C3%A7%C3%A3o#Suffix)
revolu + "ção" => mkNoun (nomFalcao vinho) Fem ;
certid + "ão" =>
mkNoun (nomFalcao vinho) Masc ;
-- problema, carro, maracujá
-- proble + ("ma"|"o"|"á") =>
-- mkNoun (nomVinho vinho) Masc ;
ma + ("r"|"z"|"n") => mkNoun (nomRapaz vinho) Masc ;
-- fóssil, míssil, móbil, portátil, útil
f + ("ó"|"á"|"é"|"í"|"ú") + s + "il" => mkNoun (nomReptil vinho) Masc ;
can + ("a"|"e"|"o"|"u") + "l" => mkNoun (nomCanal vinho) Masc ;
can + "il" => mkNoun (numForms vinho (can + "is")) Masc ;
home + "m" => mkNoun (nomNuvem vinho) Masc ;
g + v@("á"|"é"|"í"|"ó"|"ú"|"ê") + "s" => mkNoun (numForms vinho (g + (diacriticToVowel v) + "ses")) Masc ;
ônibu + "s" => mkNoun (nomAreia vinho) Masc ;
--urub + "u" => mkNoun (nomVinho vinho) Masc ;
-- tórax/Masc, xerox/Fem
tóra + "x" => mkNoun (nomAreia vinho) Masc ;
_ => mkNoun (nomVinho vinho) Masc
} ;
--3 Adjectives
--
-- Adjectives are conveniently seen as gender-dependent nouns. Here
-- are some patterns. First one that describes the worst case.
@@ -124,78 +157,45 @@ oper
}
} ;
mkAdj2 : (_,_: Str) -> Adj ;
mkAdj2 aj av = let
adj = mkAdjReg aj
mkAdj4 : (_,_,_,_ : Str) -> Adj ;
mkAdj4 ms fs mp fp =
let adv : Str = case fs of {
exeg + vo@("é"|"á"|"í"|"ó"|"ú"|"ê"|"ô") + tica
=> exeg + (diacriticToVowel vo) + tica ;
comu + "m" => comu ; -- for Brazilian Portuguese
_ => fs
} + "mente" ;
in {
s = table {
ASg g _ => adj.s ! ASg g APred ;
APl g => adj.s ! APl g ;
AA => av
ASg g _ => genForms ms fs ! g ;
APl g => genForms mp fp ! g ;
AA => adv
}
} ;
-- Then the regular and invariant patterns.
mkAdjFromNouns : Noun -> Noun -> Adj ;
mkAdjFromNouns nm nf = mkAdj4 (nm.s ! Sg) (nf.s ! Sg) (nm.s ! Pl) (nf.s ! Pl) ;
adjPreto : Str -> Adj = \preto ->
let
pret = Predef.tk 1 preto
in
mkAdj preto (pret + "a") (pret + "os") (pret + "as") (pret + "amente") ;
-- masculine and feminine are identical:
-- adjectives ending with -e, -a and many but not all that end in a
-- consonant
adjUtil : Str -> Str -> Adj = \útil,úteis ->
mkAdj útil útil úteis úteis (útil + "mente") ;
-- adjectives that end in consonant but have different masc and fem
-- forms español, hablador ...
adjOuvidor : Str -> Str -> Adj = \ouvidor,ouvidora ->
mkAdj ouvidor ouvidora (ouvidor + "es") (ouvidor + "as") (ouvidora + "mente") ;
adjBlu : Str -> Adj = \blu ->
mkAdj blu blu blu blu blu ; --- blasé
-- francês francesa franceses francesas
adjFrances : Str -> Adj = \francês ->
let franc : Str = Predef.tk 2 francês ;
frances : Str = franc + "es" ;
in mkAdj francês (frances + "a") (frances + "es") (frances + "as") (frances + "amente") ;
-- alemão alemã alemães alemãs
-- is there really a need for this? is it as useful as the spanish
-- one?
adjVo : Str -> Adj = \alemão ->
let alemã : Str = init alemão ;
alem : Str = init alemã ;
ã : Str = last alemã ;
v : Str = case ã of {
"ã" => "a"
} ;
alemvo : Str = alem + v + "o" ;
in mkAdj alemão alemã (alemã + "s") (alemã + "es") (alemã + "mente") ;
adjEuropeu : Str -> Adj = \europeu -> let europe = init europeu in
mkAdj europeu (europe + "ia") (europeu + "s") (europe + "ias")
(europe + "iamente") ;
mkAdjReg2 : Str -> Str -> Adj ;
mkAdjReg2 ms fs = mkAdjFromNouns (mkNomReg ms) (mkNomReg fs) ;
-- smart paradigm for adjectives amounts to guessing the feminine
-- form from the masculine form given, and then using the noun smart
-- paradigm for the plural forms
mkAdjReg : Str -> Adj = \a ->
case a of {
pret + "o" => adjPreto a ;
anarquist + v@("e" | "a") => adjUtil a (a + "s") ;
ouvido + "r" => adjOuvidor a (ouvido + "ra") ;
chin + "ês" => adjFrances a ;
europ + "eu" => adjEuropeu a ;
alem + "ão" => adjVo a ;
provav + v@("e" | "i") + "l" => adjUtil a (provav + "eis") ; -- fails at pueril
nomina + "l" => adjUtil a (nomina + "is") ;
jove + "m" => adjUtil a (jove + "ns") ;
_ => adjUtil a (a + "s")
let mkAdj : Str -> Adj = mkAdjReg2 a ;
in case a of {
alem + "ão" => mkAdj (alem + "ã") ; -- fails for patrão/patroa
pret + "o" => mkAdj (pret + "a") ;
ouvido + "r" => mkAdj (ouvido + "ra") ;
chin + "ês" => mkAdj (chin + "esa") ;
europ + "eu" => mkAdj (europ + "eia") ;
_ => mkAdj a
} ;
--2 Personal pronouns
--4 Personal pronouns
--
-- All the eight personal pronouns can be built by the following macro.
-- The use of "ne" as atonic genitive is debatable.
@@ -241,7 +241,7 @@ oper
(pronAgr pron g n p) ** pronLin você o lhe Você ;
--2 Determiners
--5 Determiners
--
-- Determiners, traditionally called indefinite pronouns, are
-- inflected in gender and number, like adjectives.
@@ -281,4 +281,4 @@ oper
n = number
} ;
}
} ;

View File

@@ -130,7 +130,7 @@ concrete NumeralPor of Numeral = CatPor [Numeral,Digits] **
regCard vigesimo = case vigesimo of {
-- to handle milhão case (in ParseExtend module)
milh + "ão" => \g, n -> genNumForms vigesimo vigesimo (milh + "ões") vigesimo ! g ! n;
_ => pronForms (adjPreto vigesimo)
_ => pronForms (mkAdjReg vigesimo)
} ;
spl : (CardOrd => Str) -> {s : CardOrd => Str ; n : Number} = \s -> {

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,58 +71,57 @@ 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 x = mkNomReg x ** {lock_N = <>} ;
regN : Str -> N ; --%
regN x = lin N (mkNomReg x) ;
femN : N -> N ;
femN x = {s = x.s ; g = feminine ; lock_N = <>} ;
femN : N -> N ; --%
femN n = n ** {g = feminine} ;
mascN : N -> N ;
mascN x = {s = x.s ; g = masculine ; lock_N = <>} ;
mascN : N -> N ; --%
mascN n = n ** {g = masculine} ;
mk2N : (bastão, bastões : Str) -> Gender -> N ;
mk2N x y g = mkNounIrreg x y g ** {lock_N = <>} ;
mk2N : (bastão, bastões : Str) -> Gender -> N ; --%
mk2N x y g = lin N (mkNounIrreg x y g) ;
--- [] update this docstring
-- The regular function takes the singular form and the gender, and
-- computes the plural and the gender by a heuristic. The heuristic
-- says that the gender is feminine for nouns ending with "a" or
-- "z", and masculine for all other words. Nouns ending with "a",
-- "o", "e" have the plural with "s", those ending with "z" have
-- "ces" in plural; all other nouns have "es" as plural ending. The
-- accent is not dealt with.
-- 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 : (revolução : 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 : (mão, mãos : Str) -> Gender -> N -- the worst case demands two forms (singular + plural) and the gender.
= mk2N ;
mkN : (número : N) -> (de_telefone : Str) -> N -- compound noun with non-inflecting second art, e.g. "número" + "de telefone"
= compN ;
mkN : (forma, finita : N) -> N -- compound with inflecting second part, e.g. "forma" + "finita"
= compNN
} ;
--3 Compound nouns
@@ -125,32 +131,32 @@ 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 x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
compN : N -> Str -> N ; --%
compN x y = x ** {s = \\n => x.s ! n ++ y} ;
compNN : N -> N -> N ; -- compound, e.g. "forma" + "finita"
compNN : N -> N -> N ; --%
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,p -> n ** {lock_N2 = <> ; c2 = p} ;
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,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
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
--
@@ -165,7 +171,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 ;
@@ -173,87 +179,92 @@ oper
}
} ;
mk2PN : Str -> Gender -> PN ; -- Pilar
mk2PN x g = {s = x ; g = g} ** {lock_PN = <>} ;
mk2PN : Str -> Gender -> PN ; --%
mk2PN x g = lin PN {s = x ; g = g} ;
mkPN = overload {
-- feminine for "-a"
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 = lin A {
compADeg : A -> A ; --%
compADeg a = a ** {
s = table {
Posit => a.s ! Posit ;
_ => \\f => "mais" ++ a.s ! Posit ! f
} ;
isPre = a.isPre ;
copTyp = a.copTyp
} ;
regA : Str -> A ;
regA a = compADeg (lin A {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula}) ;
liftAdj : Adj -> A ; --%
liftAdj adj = compADeg (lin A {s = \\_ => adj.s ; isPre = False ; copTyp = serCopula}) ;
mk2A : (único,unicamente : Str) -> A ;
mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ;
copTyp = serCopula ;
lock_A = <>} ;
regA : Str -> A ; --%
regA a = liftAdj (mkAdjReg a) ;
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ;
isPre = False ; copTyp = serCopula ;
lock_A = <>} ;
mk2A : (patrão,patroa : Str) -> A ; --%
mk2A ms fs = liftAdj (mkAdjReg2 ms fs) ;
adjCopula : A -> CopulaType -> 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 a b c d e = liftAdj (mkAdj a b c d e) ;
adjCopula : A -> CopulaType -> A ; --%
adjCopula a cop = a ** {copTyp = cop} ;
mkADeg : A -> A -> A ;
mkADeg a b = lin A {
mkADeg : A -> A -> A ; --%
mkADeg a b = a ** {
s = table {
Posit => a.s ! Posit ;
_ => b.s ! Posit
-- Compar => b.s ! Posit ;
-- Superl => "o" ++ b.s ! Posit ;
} ;
isPre = a.isPre ;
copTyp = a.copTyp
}
} ;
invarA : Str -> A ; -- invariable adjective, e.g. "simples"
invarA a = liftAdj (mkAdj4 a a a a) ;
mkNonInflectA : A -> Str -> A ;
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
mkNonInflectA blanco hueso = blanco ** {
s = \\x,y => blanco.s ! x ! y ++ hueso
} ;
mkA = overload {
-- 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
-- For regular adjectives, all forms are derived from the
-- masculine singular. The types of adjectives that are recognized
-- 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 ;
-- One-place adjectives compared with "mais" need five forms in the
-- worst case (masc and fem singular, masc plural, adverbial).
mkA : (bobo,boba,bobos,bobas,bobamente : Str) -> A = mk5A ;
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 ;
-- In the worst case, two separate adjectives are given: the positive
-- ("bueno"), and the comparative ("mejor").
-- special comparison with "mais" as default
mkA : (bom : A) -> (melhor : A) -> A
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 ;
--
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 ;
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective
= mkNonInflectA ;
mkA : A -> CopulaType -> A -- force copula type
mkA : A -> CopulaType -> A -- force copula type, e.g. "João está doente" instead of "João é doente". Choose among ``serCopula``, ``estarCopula``, and ``ficarCopula``.
= adjCopula ;
} ;
-- The functions above create postfix adjectives. To switch them to
@@ -261,43 +272,58 @@ 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 =
VType : Type ; -- verb is reflexive / verb uses auxiliar X
VType = MorphoPor.VType ;
auxTer : VType ; -- "ter" as auxiliary verb
auxTer = VTer ;
auxHaver : VType ; -- "haver" as auxiliary verb
auxHaver = VHaver ;
auxRefl : VType ; -- verb is reflexive
auxRefl = VRefl ;
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
@@ -331,55 +357,48 @@ 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.
-- "partir". This smart paradigm recognizes other patterns, but
-- it is not perfect. 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"
mkV : (pagar : Str) -> V -- predictable verb, e.g., "comer", "chamar-se"
= regV ;
-- 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 : (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} ;
mkV : V -> VType -> V -- choose auxiliary verb or make verb reflexive
= \v,vt -> v ** {vtyp = vt} ;
-- 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 => (adjPreto pa).s ! (genNum2Aform g n) ;
VPart g n => (mkAdjReg pa).s ! (genNum2Aform g n) ;
p => ve.s ! p
} ;
lock_V = <> ;
p = ve.p ;
vtyp = VHabere
}
} ;
@@ -387,22 +406,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
@@ -411,105 +432,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 ; --%
---
@@ -517,13 +538,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)) ; --%
} ;

View File

@@ -1,26 +1,42 @@
# -*- mode:org -*-
#+TITLE: Portuguese
The Portuguese Resource Grammar is built using the Romance functor at
=romance/=. It mostly follows Brazilian Portuguese.
* language information
- English name: Portuguese
- Autonym: Português
- ISO code: Por
* implementation information
The Portuguese Resource Grammar is built using the Romance functor at
=romance/=, and it mostly follows Brazilian Portuguese.
Romance instantiations differ mostly in their morphological modules
and in the constructions defined in the =Diff*= modules. One relevant
difference for Portuguese is that it uses the /pretérito perfeito/
instead of the auxiliary verb in the present + participle for the RGL
present anterior tense.
* data
# post data sources and add IrregPor and DictPor
** BeschPor
The code used to generate the modules below is in this [[http://gitlab.com/odanoburu/gf-pt][repository]].
** Dict
This module contains nouns and adjectives defined from the forms in
this [[https://github.com/LFG-PTBR/MorphoBr/][morphological resource]]. Variants are not used. =fun= names are
the word's lemmas, plus optional distinguishing feature (e.g.,
/número_N/ for /número/ but /abade_Fem_N/ for /abadessa/).
** Besch
The =BeschPor= module contains the complete inflection tables for all
Portuguese verbs, divided in paradigms following the following books:
- Ryan, M. A. Conjugação dos Verbos em Português. Ática, 1991.
- Freire, A. N. Bescherelle: portugais, les verbes. Hatier, 2008.
** IrregBeschPor
** Irreg
In this lexicon module you will find Portuguese verbs defined using
the paradigms in BeschPor. Please contribute to this list!
the paradigms in =BeschPor=. Please contribute to this list by editing
this [[https://gitlab.com/odanoburu/gf-pt/blob/master/tools/besch/verbs.besch][file]]! (you need only add the verb lemma in the correct paradigm
line)
* history and applications
- mini resource grammars: a [[https://github.com/GrammaticalFramework/gf-summerschool-2018/tree/master/resource][version]] for [[http://school.grammaticalframework.org/2018/][GFSS2018]], [[https://github.com/GrammaticalFramework/gf-contrib/tree/master/mini][mini]] and [[https://github.com/GrammaticalFramework/gf-contrib/tree/master/mini/newmini][newmini]]

View File

@@ -62,12 +62,12 @@ concrete StructuralPor of Structural = CatPor **
but_PConj = ss "mas" ;
by8agent_Prep = mkPrep [] ablative ; -- por
by8means_Prep = mkPrep [] ablative ; -- por
can8know_VV = mkVV B.saber_V ;
can8know_VV = mkVV B.know_V ;
can_VV = mkVV (mkV (poder_Besch "poder")) ;
during_Prep = mkPrep "durante" ;
either7or_DConj = {s1,s2 = "ou" ; n = Sg} ;
everybody_NP = makeNP "todos" Masc Pl ;
every_Det = mkDeterminer "cada" "cada" Sg False ;
every_Det = mkDeterminer "todo" "toda" Sg False ;
everything_NP = pn2np (mkPN "tudo" Masc) ;
everywhere_Adv = ss ["em toda parte"] ;
except_Prep = mkPrep "exceto" ;
@@ -105,7 +105,7 @@ concrete StructuralPor of Structural = CatPor **
s2 = [] ; isNeg = True
} ;
no_Utt = ss "não" ;
not_Predet = {s = \\a,c => prepCase c ++ "não" ; c = Nom ; a = PNoAg} ;
not_Predet = {s = \\a,c => prepCase c ++ "nem" ; c = Nom ; a = PNoAg} ;
nobody_NP = pn2npNeg (mkPN "ninguém") ;
nothing_NP = pn2npNeg (mkPN "nada") ;
@@ -160,8 +160,9 @@ concrete StructuralPor of Structural = CatPor **
lin
as_CAdv = X.mkCAdv "tão" conjThan ; ----
have_V2 = dirV2 B.ter_V ;
have_V2 = dirV2 B.have_V ;
that_Subj = {s = "que" ; m = Conjunct} ;
lin language_title_Utt = ss "português" ;
} ;

View File

@@ -1,4 +1,5 @@
concrete TextPor of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** open Prelude in {
concrete TextPor of Text = CommonX - [Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
** open Prelude in {
flags coding=utf8 ;

View File

@@ -52,7 +52,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
oper mkImperative : Bool -> Person -> VP -> RPolarity => Gender => Number => Str ;
-- To render the copula (ser/estar in Spa,Cat)
-- To render the copula (ser/estar in Spa,Cat,Por)
oper CopulaType : PType ;
oper selectCopula : CopulaType -> Verb ;
@@ -63,6 +63,10 @@ interface DiffRomance = open CommonRomance, Prelude in {
oper iAdvQuestionInv : Direct = DInv ; -- except Fre
oper iCompQuestionInv : Direct = DInv ; -- for Cat,Por,Spa where otherInv will be DDir
oper otherInv : Direct = DInv ; -- except Cat, Por, Spa
--2 Constants that must derivatively depend on language
param NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
@@ -169,5 +173,25 @@ oper
contractInf : Bool -> Bool -> Bool = \_,_ -> False ; -- only True in Ita, by orB
}
chooseTA : RTense -> Anteriority
-> (VF => Str) -> (VF => Str)
-> Number -> Person -> Mood -> Str -> Str * Str ;
chooseTA t a verb vaux n p m part = case <t,a> of {
<RPast,Simul> => <verb ! VFin (VImperf m) n p, []> ; --# notpresent
<RPast,Anter> => <vaux ! VFin (VImperf m) n p, part> ; --# notpresent
<RFut,Simul> => <verb ! VFin VFut n p, []> ; --# notpresent
<RFut,Anter> => <vaux ! VFin VFut n p, part> ; --# notpresent
<RCond,Simul> => <verb ! VFin VCondit n p, []> ; --# notpresent
<RCond,Anter> => <vaux ! VFin VCondit n p, part> ; --# notpresent
<RPasse,Simul> => <verb ! VFin VPasse n p, []> ; --# notpresent
<RPasse,Anter> => <vaux ! VFin VPasse n p, part> ; --# notpresent
<RPres,Anter> => <vaux ! VFin (VPres m) n p, part> ; --# notpresent
<RPres,Simul> => <verb ! VFin (VPres m) n p, []>
} ;
oper
essere_V : Verb ;
stare_V : Verb ;
stare_V = essere_V ;
} ;

View File

@@ -0,0 +1,268 @@
incomplete concrete ExtendRomanceFunctor of Extend =
Cat ** open Grammar, ResRomance in {
lincat
RNP = Grammar.NP ;
RNPList = Grammar.ListNP ;
---- these come from ExtraRomance: how to avoid the repetition?
---- can't seem to be able to use two functors
lincat
VPS = {s : Mood => Agr => Bool => Str} ;
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
lin
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
ConsVPS = consrTable3 Mood Agr Bool comma ;
BaseVPI = variants {} ;
ConsVPI = variants {} ;
BaseVPS2 = variants {} ;
ConsVPS2 = variants {} ;
BaseVPI2 = variants {} ;
ConsVPI2 = variants {} ;
--GenNP = variants {} ;
GenNP np =
let denp = (np.s ! ResRomance.genitive).ton in {
s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ;
s2 = denp ;
isNeg = False ;
} ;
GenIP ip = {s = \\_,_,c => ip.s ! c} ;
GenRP = variants {} ; -- Num -> CN -> RP ; -- whose car
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ;
CompBareCN cn = {
s = \\agr => cn.s ! agr.n ;
cop = serCopula
} ;
StrandQuestSlash = QuestSlash ; -- whom does John live with ; DEFAULT with whom does John live
StrandRelSlash = RelSlash ; -- that he lives in ; DEFAULT in which he lives
EmptyRelSlash = variants {} ;
-- --TODO debug this definition
-- EmptyRelSlash cls = {
-- s = \\agr,t,a,p,m => cls.s ! agr ! DDir ! t ! a ! p ! m ++ cls.c2.s ;
-- c = Nom
-- } ;
lin
PredVPS np vpi = {
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
} ;
MkVPS tm p vp = {
s = \\m,agr,isNeg =>
tm.s ++ p.s ++
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
! DDir ! tm.t ! tm.a ! p.p ! m
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
MkVPI vp = variants {} ; -- Temp -> Pol -> VP -> VPI ; -- to sleep / hasn't slept
ConjVPI = variants {} ; -- Conj -> [VPI] -> VPI ; -- has walked and won't sleep
ComplVPIVV = variants {} ; -- VV -> VPI -> VP ; -- want to sleep and to walk
MkVPS2 = variants {} ; -- : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
ConjVPS2 = variants {} ; -- : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
ComplVPS2 = variants {} ; -- : VPS2 -> NP -> VPS ; -- has loved and now hates that person
MkVPI2 = variants {} ; -- : Ant -> Pol -> VPSlash -> VPI2 ; -- to have loved
ConjVPI2 = variants {} ; -- : Conj -> [VPI2] -> VPI2 ; -- to love and have hated
ComplVPI2 = variants {} ; -- : VPI2 -> NP -> VPI ; -- to love and hate that person
lin
ProDrop p = p ** {
s = table {
Nom => let pn = p.s ! Nom
in {c1 = pn.c1 ; c2 = pn.c2 ; comp = [] ; ton = pn.ton} ;
c => p.s ! c
} ;
isNeg = False
} ;
ICompAP = variants {} ; -- AP -> IComp ; -- "how old"
IAdvAdv = variants {} ; -- Adv -> IAdv ; -- "how often"
CompIQuant iq = {s = \\aa => iq.s ! aa.n ! aa.g ! Nom ; cop = serCopula} ;
PrepCN prep cn = {s = prep.s ++ prepCase prep.c ++ cn.s ! Sg} ;
FocusObj = variants {} ; -- NP -> SSlash -> Utt ; -- her I love
FocusAdv = variants {} ; -- Adv -> S -> Utt ; -- today I will sleep
FocusAdV = variants {} ; -- AdV -> S -> Utt ; -- never will I sleep
FocusAP = variants {} ; -- AP -> NP -> Utt ; -- green was the tree
lin
EmbedPresPart = variants {} ; -- VP -> SC ; -- looking at Mary (is fun)
PresPartAP vp = {
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
isPre = False ;
copTyp = serCopula
} ;
PassVPSlash vps = passVPSlash vps [] ;
PassAgentVPSlash vps np = passVPSlash vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
PastPartAP vps = pastPartAP vps [] ;
PastPartAgentAP vps np = pastPartAP vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
ExistsNP = variants {} ;
NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ;
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
ExistMassCN cn = ExistNP (MassNP cn) ;
ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ;
AdvIsNP adv np = mkClause adv.s False False np.a (UseComp_estar (CompNP np)) ;
lin
ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs
SlashBareV2S = SlashV2S ; -- V2S -> S -> VPSlash ; -- answer (to him) it is good ; DEFAULT answer that it is good
ComplDirectVS vs utt = AdvVP (UseV <lin V vs : V>) (lin Adv {s = ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
ComplDirectVQ vq utt = AdvVP (UseV <lin V vq : V>) (lin Adv {s = ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes
FrontComplDirectVS = variants {} ; -- NP -> VS -> Utt -> Cl ; -- "I am here", she said
FrontComplDirectVQ = variants {} ; -- NP -> VQ -> Utt -> Cl ; -- "where", she asked
PredAPVP ap vp = ImpersCl (UseComp (CompAP (SentAP ap (EmbedVP vp)))) ; -- DEFAULT it is (good to walk)
AdjAsCN ap = {
s =\\n => ap.s ! (genNum2Aform Masc n) ;
g = Masc
} ;
AdjAsNP ap = heavyNP {
s = \\_c => ap.s ! ASg Masc APred ;
a = Ag Masc Sg P3
} ;
lin
ReflRNP = variants {} ; -- VPSlash -> RNP -> VP ; -- love my family and myself
ReflPron = variants {} ; -- RNP ; -- myself
ReflPoss = variants {} ; -- Num -> CN -> RNP ; -- my car(s)
PredetRNP = variants {} ; -- Predet -> RNP -> RNP ; -- all my brothers
ConjRNP = variants {} ; -- Conj -> RNPList -> RNP ; -- my family, John and myself
Base_rr_RNP = variants {} ; -- RNP -> RNP -> RNPList ; -- my family, myself
Base_nr_RNP = variants {} ; -- NP -> RNP -> RNPList ; -- John, myself
Base_rn_RNP = variants {} ; -- RNP -> NP -> RNPList ; -- myself, John
Cons_rr_RNP = variants {} ; -- RNP -> RNPList -> RNPList ; -- my family, myself, John
Cons_nr_RNP = variants {} ; -- NP -> RNPList -> RNPList ; -- John, my family, myself
ComplGenVV = variants {} ; -- VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
ComplSlashPartLast = ComplSlash ;
CompoundN = variants {} ; -- N -> N -> N ; -- control system / controls system / control-system
CompoundAP = variants {} ; -- N -> A -> AP ; -- language independent / language-independent
lin
GerundNP vp = let
neutrAgr = Ag Masc Sg P3
in heavyNP {
s = \\_ => gerVP vp neutrAgr ;
a = neutrAgr
} ;
GerundCN vp = {
s = \\n => gerVP vp {g = Masc ; n = n ; p = P3} ;
g = Masc
} ;
GerundAdv vp = {
s = gerundStr vp
} ;
lin
PurposeVP vp = {
s = infVP vp (Ag Masc Sg P3)
} ;
WithoutVP = variants {} ; -- VP -> Adv ; -- without publishing the document
ByVP vp = {
s = gerundStr vp
} ;
InOrderToVP = variants {} ; -- VP -> Adv ; -- (in order) to publish the document
ApposNP np1 np2 = np1 ** {
s = \\c => {
c1 = (np1.s ! c).c1 ++ (np2.s ! c).c1 ;
c2 = (np1.s ! c).c2 ++ (np2.s ! c).c2 ;
comp = (np1.s ! c).comp ++ (np2.s ! c).comp ;
ton = (np1.s ! c).ton ++ (np2.s ! c).ton
} ;
} ;
AdAdV aa av = {
s = aa.s ++ av.s
} ;
UttAdV av = av ;
PositAdVAdj a = {
s = a.s ! Posit ! AA
} ;
lin
CompS = variants {} ; -- S -> Comp ; -- (the fact is) that she sleeps
CompQS = variants {} ; -- QS -> Comp ; -- (the question is) who sleeps
--TODO: actually use ant
CompVP ant p vp = let
neg = negation ! p.p
in {
s = \\agr => ant.s ++ p.s ++ "de" ++ neg.p1 ++ infVP vp agr ;
cop = serCopula
} ;
lin
DetNPMasc = DetNP ;
DetNPFem = DetNP ;
lin
iFem_Pron = i_Pron ; -- DEFAULT I (masc)
youFem_Pron = youSg_Pron ; -- DEFAULT you (masc)
weFem_Pron = we_Pron ; -- DEFAULT we (masc)
youPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
theyFem_Pron = they_Pron ; -- DEFAULT they (masc)
youPolFem_Pron = youPol_Pron ; -- DEFAULT you polite (masc)
youPolPl_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
youPolPlFem_Pron = youPl_Pron ; -- DEFAULT you plural (masc)
lin
UseComp_estar comp = insertComplement comp.s (predV stare_V) ;
UncontractedNeg = {s = [] ; p = RNeg False} ;
UttAccNP = UttNP ; -- him (accusative) ; DEFAULT he
UttDatNP np = UttAccNP (lin NP np) ; -- him(dative) ; DEFAULT he
UttAccIP = UttIP ; -- whom (accusative) ; DEFAULT who
UttDatIP ip = UttAccIP (lin IP ip) ; -- whom (dative) ; DEFAULT who
UttVPShort = UttVP ;
oper
quoted : Str -> Str = \s -> "\"" ++ s ++ "\"" ; ---- TODO bind ; move to Prelude?
oper
gerundStr : VP -> Str ;
gerundStr vp = gerVP vp (Ag Masc Sg P3) ;
infStr : VP -> Str ;
infStr vp = infVP vp (Ag Masc Sg P3) ;
pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP {
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
isPre = False ;
copTyp = serCopula
} ;
passVPSlash : VPSlash -> Str -> VP ;
passVPSlash vps agent = let
auxvp = predV auxPassive
in
vps ** {
s = auxvp.s ;
agr = auxvp.agr ;
comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ;
} ;
} ;

Some files were not shown because too many files have changed in this diff Show More