1
0
forked from GitHub/gf-rgl

162 Commits

Author SHA1 Message Date
Krasimir Angelov
3f4fd4565a better table layout 2025-03-26 18:23:38 +01:00
Krasimir Angelov
11d4f0c770 better table layout 2025-03-26 18:22:53 +01:00
Krasimir Angelov
574ed858bc Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2025-03-26 14:50:07 +01:00
Krasimir Angelov
176d63f0ac initial documentation module for Romanian 2025-03-26 14:49:47 +01:00
Aarne Ranta
607d9240c2 Merge pull request #460 from hleiss/master
(Ger) Added missing linearizations pot21 to pot5plus in NumeralGer
2025-03-17 08:02:35 +01:00
Hans Leiss
35f3b5e206 (Ger) Added missing linearizations pot21 to pot5plus 2025-03-16 15:34:46 +01:00
Aarne Ranta
ababe72fb8 started adding capital letters to Gre.FemAccFinalN; most letters still todo 2025-03-12 16:32:40 +01:00
Aarne Ranta
693cd88f7b heuristic rule for Gre mkPN 2025-02-13 10:43:17 +01:00
Krasimir Angelov
44eec8629b added Extend modules for Hindi, Urdu, Mongolian 2025-02-09 10:15:55 +01:00
Krasimir Angelov
ebba8b5894 for prepositions show the case as well 2025-02-09 09:15:03 +01:00
Krasimir Angelov
1633d11e06 added documentation and some missing paradigm functions 2025-02-08 22:03:10 +01:00
Krasimir Angelov
9e91511724 added mkInterj 2025-02-07 18:32:35 +01:00
Krasimir Angelov
777e572681 added missing paradigm functions 2025-02-07 18:24:27 +01:00
Krasimir Angelov
186a12df0c added linref and lindef for V2 and V3 2025-02-05 11:45:20 +01:00
Krasimir Angelov
904428fb36 don't show indefinte superlative adjectives 2025-02-05 10:53:56 +01:00
Krasimir Angelov
8723bde58e fixes 2025-02-05 09:49:28 +01:00
Krasimir Angelov
7b777c425e more in the documentation 2025-02-05 09:22:01 +01:00
Krasimir Angelov
f3811e8a0e Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2025-02-05 08:30:24 +01:00
Krasimir Angelov
f03d06b81d started DocumentationLav and ExtendLav 2025-02-05 08:30:04 +01:00
Aarne Ranta
6876b79d43 added MarkupFre to LangFre 2025-02-02 15:32:17 +01:00
Inari Listenmaa
33bd050b7a also remove lincat Voc from Kaz 2025-01-24 15:09:18 +01:00
Inari Listenmaa
08793614ab also remove redundant lincats Voc,PConj,Phr,Utt from Sqi 2025-01-24 15:08:17 +01:00
Inari Listenmaa
70e41e47a7 remove redundant lincat Interj (inherited from CommonX) 2025-01-24 14:57:46 +01:00
Inari Listenmaa
66b5e4108f add empty file for MorphoDictChi (TODO populate from WN) 2025-01-24 14:44:35 +01:00
aarneranta
8613a78929 changed a runtime + to BIND in Amharic 2024-12-20 11:17:11 +01:00
Krasimir Angelov
643ea07c3b support unarticulated adjectives 2024-12-08 13:39:55 +01:00
Krasimir Angelov
c6d43a8bbc improve morphology 2024-12-08 13:37:37 +01:00
Krasimir Angelov
1b6f42397d progress on the grammar 2024-12-07 22:17:32 +01:00
Krasimir Angelov
bcf5db743f bugfixes 2024-12-07 20:23:49 +01:00
Krasimir Angelov
02456811ee fix typo 2024-12-07 20:20:10 +01:00
Krasimir Angelov
dcbfb2a464 show word class 2024-12-07 17:53:17 +01:00
Krasimir Angelov
5e02340160 added that_Quant 2024-12-06 06:47:48 +01:00
Krasimir Angelov
4e034425b9 added this_Quant 2024-12-05 21:57:03 +01:00
Krasimir Angelov
7b7752c308 added pronouns 2024-12-05 19:32:22 +01:00
Krasimir Angelov
108bfb4163 added basic syntax 2024-12-05 19:13:13 +01:00
Krasimir Angelov
d8aaeeb682 support linking clitic 2024-12-05 18:23:28 +01:00
Krasimir Angelov
ffaedd718b fix pattern matching error 2024-12-05 16:40:51 +01:00
Krasimir Angelov
b01b94001e added good_A 2024-12-05 16:33:54 +01:00
Krasimir Angelov
dc143cc3ae nicer inflection table for adjectives 2024-12-05 16:31:52 +01:00
Krasimir Angelov
0a1df37340 fill in the inflection tables for adjectives 2024-12-05 16:22:05 +01:00
Krasimir Angelov
ad3fa455b1 another update + rename Alb to Sqi 2024-12-05 14:47:29 +01:00
Krasimir Angelov
b82bcde9f1 improved morphology 2024-12-05 12:42:54 +01:00
Krasimir Angelov
6fcf76e78e added two examples 2024-12-04 11:30:15 +01:00
Krasimir Angelov
aa4dc4c3df added documentation 2024-12-04 11:28:13 +01:00
Krasimir Angelov
3891cef66a added Albanian 2024-12-04 10:31:43 +01:00
Krasimir Angelov
8e47600671 update after changes in the rgl-learner 2024-12-04 07:55:20 +01:00
Krasimir Angelov
89f2a9dea6 update the morphology after the change in the rgl-learner 2024-12-03 20:06:49 +01:00
EkaterinaVoloshina
6b5df036e3 added a contruction; fixed negation 2024-11-26 21:26:54 +01:00
Krasimir Angelov
3dae1cf820 make the noun table even more similar to the one in Turkish 2024-11-11 15:49:49 +01:00
Krasimir Angelov
c4f94ab218 make the noun table two dimensional 2024-11-11 13:32:28 +01:00
Krasimir Angelov
d626f03c48 started documentation 2024-11-11 13:12:54 +01:00
Krasimir Angelov
93a06312a7 cleanup the lincat for V 2024-11-11 13:11:29 +01:00
Krasimir Angelov
d2754c1623 fix the order of cases 2024-11-10 19:54:54 +01:00
Krasimir Angelov
d77c8fa23c added Kazakh morphology 2024-11-10 19:49:50 +01:00
Krasimir Angelov
164cf81477 minimal extensions to Numeral 2024-11-03 20:07:06 +01:00
Krasimir Angelov
4add2fb2de more lexicon building functions 2024-11-03 19:06:18 +01:00
Krasimir Angelov
37e08ad739 support for compounding nouns 2024-11-01 09:15:55 +01:00
Krasimir Angelov
466c7da532 support for aspectual verb pairs 2024-11-01 07:45:59 +01:00
Krasimir Angelov
e8bda853df remove spurious paradigms 2024-10-31 19:26:56 +01:00
Krasimir Angelov
f8bb75a13c added pronouns 2024-10-31 16:14:35 +01:00
Krasimir Angelov
576e17f03a linref for adjectives 2024-10-31 13:47:41 +01:00
Krasimir Angelov
a235cc9594 fixes for verbs 2024-10-31 13:29:48 +01:00
Krasimir Angelov
abf4cd4cb2 support for reflexive verbs 2024-10-31 13:21:27 +01:00
Krasimir Angelov
9e52b2d8a3 linref for nouns 2024-10-31 13:04:13 +01:00
Krasimir Angelov
1111ca0fdd overloaded compoundN 2024-10-31 12:57:46 +01:00
Krasimir Angelov
4de1b64b58 added compound nouns 2024-10-31 10:44:18 +01:00
Krasimir Angelov
f0d74e59a7 forgot the documentation 2024-10-31 09:48:38 +01:00
Krasimir Angelov
a2b20dc6db Macedonian morphology 2024-10-31 09:37:41 +01:00
Krasimir Angelov
21d1a192c8 added linrefs for verbs 2024-10-22 22:26:17 +02:00
Krasimir Angelov
e99bdb6d1a added mkMU 2024-10-22 21:49:22 +02:00
Krasimir Angelov
d44298a4ad added QuantityNP and mkMU 2024-10-22 20:41:16 +02:00
Krasimir Angelov
89dc2a13f0 added NamesIna 2024-10-22 20:26:18 +02:00
Krasimir Angelov
6dfce2943c added ExtendIna 2024-10-22 08:05:50 +02:00
Krasimir Angelov
0814c9da0f added Extend(Dan|Nor|Nno) 2024-10-20 20:09:02 +02:00
Krasimir Angelov
bb7786af7c added documentaion and missing paradigm functions 2024-10-20 17:11:42 +02:00
Krasimir Angelov
650076a867 fix typo N3->N2 2024-10-20 17:11:00 +02:00
Krasimir Angelov
5b636496ef added LN,GN,SN 2024-10-15 16:38:34 +02:00
Krasimir Angelov
41dfd532bd forgot the file 2024-10-15 15:43:51 +02:00
Krasimir Angelov
26e89421d3 Documentation and Names in Danish 2024-10-15 15:42:33 +02:00
Krasimir Angelov
e7a4b71160 Documentation in Bokmål 2024-10-15 15:14:18 +02:00
Krasimir Angelov
81c71043ca Documentation for Nynorsk 2024-10-15 14:36:03 +02:00
Krasimir Angelov
9217669c31 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-10-15 14:20:31 +02:00
Krasimir Angelov
cc964d1853 added the documentation module 2024-10-15 14:20:14 +02:00
Krasimir Angelov
62b5df23d1 some missing bits in Greek 2024-10-10 13:44:54 +02:00
aarneranta
e63a3c9d17 fixed ExtendSwe/VPS in accordance with Ger 2024-09-04 15:03:50 +02:00
Aarne Ranta
d895f4ceeb MorphoDictSpa copied from DictSpa 2024-07-30 17:02:36 +02:00
Aarne Ranta
ba2e4a4964 added Extend.SubjunctRelCN 2024-07-30 08:44:01 +02:00
Aarne Ranta
78f333e79e added a case to MakeStructuralFre.mkDet 2024-07-29 18:03:09 +02:00
Aarne Ranta
710e73688d in Formal.usePrec, removed variant parenthOpt for a better control of parentheses ; use Formal.parenth explicitly if you want to parse superfluous parentheses 2024-07-29 17:44:05 +02:00
Aarne Ranta
82075be37b corrected the formal subject of ExistsNP in Fre 2024-07-26 17:33:32 +02:00
Aarne Ranta
7d631fafa2 put RelVPS into RomanceFunctor and also inherited other VPS functions from there 2024-07-26 17:22:17 +02:00
Aarne Ranta
78fc625174 added VPS functions to Romance Extend modules 2024-07-26 16:47:43 +02:00
Krasimir Angelov
afe544bb29 added anteriority 2024-07-25 21:13:37 +02:00
Krasimir Angelov
ca385925b6 PassAgentVPSlash 2024-07-25 18:41:34 +02:00
Krasimir Angelov
4173353eb0 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-07-25 18:23:55 +02:00
Krasimir Angelov
5135e5c5ca started relative clauses 2024-07-25 18:23:35 +02:00
Krasimir Angelov
b1a5cf93b6 added PositAdAAdj 2024-07-25 18:16:12 +02:00
Aarne Ranta
911cbb06c1 MorphoDictPor 2024-07-25 12:01:19 +02:00
Aarne Ranta
71f3b2dc78 MakeStructural.mkDet in Ita and Por 2024-07-25 11:55:55 +02:00
Aarne Ranta
23ccacf222 mkStrongDet, mkWeakDet in MakeStructuralGer 2024-07-25 09:18:31 +02:00
Krasimir Angelov
d3ecaadef0 implement ProgrVP 2024-07-24 19:57:23 +02:00
Krasimir Angelov
4bb96aa295 mark notpresent 2024-07-24 09:51:10 +02:00
Krasimir Angelov
d198de7395 added PassV2, PassVPSlash 2024-07-24 09:48:08 +02:00
Krasimir Angelov
9b12c13057 added ExtAdvVP, AdvVPSlash, AdVVPSlash 2024-07-24 08:23:29 +02:00
Krasimir Angelov
4f05d5629b added UttVPShort 2024-07-24 08:17:33 +02:00
Krasimir Angelov
6648913d4e Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-07-24 08:05:15 +02:00
Krasimir Angelov
05c65ccbd8 verbal morphology is not syntactic. added negation 2024-07-24 08:04:35 +02:00
Aarne Ranta
d18b889df6 one more fix word order in ExtendGer.PredVPS ; not yet correct for Sub with ConjVPS 2024-07-22 23:59:55 +02:00
Aarne Ranta
6084aef91b trying to fix word order in ExtendGer.PredVPS ; not yet correct for Sub 2024-07-22 23:47:03 +02:00
Aarne Ranta
687f0cefc8 lost AP.ext in CompAP restored, Inv worder still to be fixed 2024-07-22 21:10:50 +02:00
Aarne Ranta
479fe7236f took away duplicates of Structural from MorphoDictEng in conformance with the other MorphoDicts 2024-07-19 18:15:31 +02:00
Aarne Ranta
15ecf3217c fixed import Cat in MorphoDictFinAbs 2024-07-18 19:17:12 +02:00
Aarne Ranta
1f98f642af DictFre copied to MorphoDict 2024-07-17 18:00:52 +02:00
Krasimir Angelov
65a05d223b various extensions in Turkish 2024-07-08 21:58:00 +02:00
Krasimir Angelov
f36bbade45 added CompoundN 2024-06-14 17:02:04 +02:00
Krasimir Angelov
c2b8d98400 fix AdvVPSlash 2024-06-14 10:53:59 +02:00
Krasimir Angelov
d182354238 fix AdvVPSlash and PastPartAP 2024-06-14 10:34:17 +02:00
Krasimir Angelov
1fbec65714 PastPartAP, PastPartAgentAP in French 2024-06-05 12:49:54 +02:00
Krasimir Angelov
d059de5711 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-06-05 12:48:51 +02:00
Krasimir Angelov
7a8cdf5c3d AdvVPSlash and AdVVPSlash 2024-06-05 12:48:24 +02:00
Aarne Ranta
03e81a3fab ImpP3 in Ita, Swe ; order fixed in Fre (but not necessarily the only correct one) 2024-05-07 15:53:33 +02:00
Krasimir Angelov
18716dbbd5 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-05-07 12:43:24 +02:00
Krasimir Angelov
44171d7d73 added VPS 2024-05-07 12:43:03 +02:00
aarneranta
726d04f00f made lincat LN = NP in Arabic, to deal with all names; also added mkLN Str Gender 2024-04-18 10:14:28 +02:00
aarneranta
a251318dad Fin linref NP: Nom, not Acc 2024-04-11 14:11:58 +02:00
Aarne Ranta
2363da4b2f Croatian GenRP corrected 2024-04-03 18:47:59 +02:00
Aarne Ranta
cd3a2e0ac4 unverified definitions of some Croatian functions 2024-04-03 17:44:00 +02:00
Krasimir Angelov
a0c8198a68 guessed DetDAP and UseDAP* 2024-04-03 16:29:39 +02:00
Krasimir Angelov
70223e85f2 guessed QuantityNP and the MU category 2024-04-03 14:25:12 +02:00
Ekaterina Voloshina
b404f4e5b3 fixed cases with ComplSlash (#459)
* fixed Slash functions

* fixed ComplSlash

---------

Co-authored-by: Krasimir Angelov <kr.angelov@gmail.com>
2024-03-25 14:10:47 +01:00
Krasimir Angelov
e7dd5304c7 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-03-23 09:07:40 +01:00
Krasimir Angelov
0df8e6da39 ConjCN,BaseCN,ConsCN in Dutch and Slovenian 2024-03-23 09:07:07 +01:00
aarneranta
bd75a0529c Ara.ExtAdvS 2024-03-22 13:51:20 +01:00
Krasimir Angelov
4957955df0 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-03-22 06:19:25 +01:00
Ekaterina Voloshina
f85fa84ae0 fixed Slash functions (#458) 2024-03-22 06:18:40 +01:00
Aarne Ranta
bb5107fa99 added GenRP to Extend Fin,Fre,Ger,Ita,Swe 2024-03-20 16:34:30 +01:00
Aarne Ranta
97b713520f commas in Ger subord clauses: things remaining to do 2024-03-20 09:27:47 +01:00
Krasimir Angelov
fb42bc6b27 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2024-03-18 16:10:06 +01:00
Krasimir Angelov
13dea0d8ac use pol.s instead of "не" to avoid meta variables in the parser 2024-03-18 16:09:00 +01:00
Krasimir Angelov
38ba6b1d6c added TPastSimple 2024-03-18 16:08:33 +01:00
Inari Listenmaa
04e76381dc Merge pull request #457 from EkaterinaVoloshina/master
added compoundPN and compoundLN
2024-03-16 12:10:14 +01:00
EkaterinaVoloshina
d6cb2806ff fixed order in passive voice 2024-03-15 17:29:34 +01:00
EkaterinaVoloshina
6ae9123f87 fixed passive voice 2024-03-15 17:17:15 +01:00
Ekaterina Voloshina
f7ba54db1c Merge branch 'GrammaticalFramework:master' into master 2024-03-13 16:39:27 +01:00
EkaterinaVoloshina
a338c2c60e added compounds for LN and PN 2024-03-13 16:35:58 +01:00
Ekaterina Voloshina
2eb19b5a2d updated inflection for masculine nouns (#456)
* updated AdjType

* fixed inflection for russian
2024-03-12 07:34:19 +01:00
EkaterinaVoloshina
bffdfdb790 fixed inflection for russian 2024-03-11 17:24:31 +01:00
Ekaterina Voloshina
fa42bf3c41 updated AdjType (#455) 2024-03-11 15:05:57 +01:00
EkaterinaVoloshina
a0a9c31745 updated AdjType 2024-03-11 11:53:39 +01:00
Krasimir Angelov
676e61e255 missed VocRus in InflectionPN 2024-03-11 10:11:40 +01:00
Krasimir Angelov
0fe84ad2cf change lincat PN to make it similar to LN and avoid storing rt and rel 2024-03-11 08:25:12 +01:00
Krasimir Angelov
2aef82181b fix the order of genders for the adjectives and show the adjectives for the nouns 2024-03-11 07:39:31 +01:00
Ekaterina Voloshina
ffcff47545 updated AdjType (#454)
* updated AdjType

* fixed mkA

* fixed AdjType

* fixed numbers

* fixed numbers
2024-03-10 19:52:19 +01:00
Krasimir Angelov
53e731593d use nonExist instead of "" when the noun has no adjective 2024-02-29 20:53:21 +01:00
Ekaterina Voloshina
9193a303a5 restored compoundN (#453) 2024-02-29 19:54:28 +01:00
Ekaterina Voloshina
4b4fbbb401 modified mkPN and added preliminary structure of compounds (#452)
* modified mkPN and added preliminary structure of compounds

* added PassAgentVPSlash

* fixed PassAgentVPSlash and mkN
2024-02-29 11:14:13 +01:00
Inari Listenmaa
600af2b8bf Merge pull request #450 from EkaterinaVoloshina/master
several modifications
2024-02-26 09:55:45 +01:00
Inari Listenmaa
15367fb05d Merge pull request #451 from GrammaticalFramework/fix-listVPS2
(Eng) Keep both prepositions in [VPS2]
2024-02-26 09:52:36 +01:00
Ekaterina Voloshina
4c508979bb Merge branch 'GrammaticalFramework:master' into master 2024-02-16 09:49:43 +01:00
EkaterinaVoloshina
a67af709c2 fixed copula verbs 2024-01-12 23:47:25 +03:00
EkaterinaVoloshina
128f283377 Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl
Merged several updates

^X
2024-01-12 23:44:48 +03:00
EkaterinaVoloshina
7259848d30 fixed copula verbs 2024-01-12 23:42:43 +03:00
205 changed files with 613666 additions and 1718 deletions

View File

@@ -25,9 +25,11 @@ Ice,Icelandic,icelandic,,,,,,n,,y
Ina,Interlingua,interlingua,,,y,,n,n,,n Ina,Interlingua,interlingua,,,y,,n,n,,n
Ita,Italian,italian,Romance,,y,,,,y,y Ita,Italian,italian,Romance,,y,,,,y,y
Jpn,Japanese,japanese,,,,,,,,y Jpn,Japanese,japanese,,,,,,,,y
Kaz,Kazakh,kazakh,,,,y,n,n,n,y
Kor,Korean,korean,,,n,y,y,y,n,n Kor,Korean,korean,,,n,y,y,y,n,n
Lat,Latin,latin,,,,,y,y,n,y Lat,Latin,latin,,,,,y,y,n,y
Lav,Latvian,latvian,,,,,,,y,y Lav,Latvian,latvian,,,,,,,y,y
Mkd,Macedonian,macedonian,,,,y,n,n,n,y
May,Malay,malay,,,y,,,,n,y May,Malay,malay,,,y,,,,n,y
Mlt,Maltese,maltese,,,,,,,,y Mlt,Maltese,maltese,,,,,,,,y
Mon,Mongolian,mongolian,,,,,,n,,y Mon,Mongolian,mongolian,,,,,,n,,y
@@ -44,6 +46,7 @@ Slo,Slovak,slovak,,,,,,n,,y
Slv,Slovenian,slovenian,,,,,n,n,,n Slv,Slovenian,slovenian,,,,,n,n,,n
Snd,Sindhi,sindhi,,,,,,,,y Snd,Sindhi,sindhi,,,,,,,,y
Spa,Spanish,spanish,Romance,,y,,,,y,y Spa,Spanish,spanish,Romance,,y,,,,y,y
Sqi,Albanian,albanian,,,,y,n,n,n,y
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n Swa,Swahili,swahili,Bantu,,,y,n,n,n,n
Swe,Swedish,swedish,Scand,,y,,,,y,y Swe,Swedish,swedish,Scand,,y,,,,y,y
Tam,Tamil,tamil,n,n,n,n,n,n,n,n Tam,Tamil,tamil,n,n,n,n,n,n,n,n
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis
25 Ina Interlingua interlingua y n n n
26 Ita Italian italian Romance y y y
27 Jpn Japanese japanese y
28 Kaz Kazakh kazakh y n n n y
29 Kor Korean korean n y y y n n
30 Lat Latin latin y y n y
31 Lav Latvian latvian y y
32 Mkd Macedonian macedonian y n n n y
33 May Malay malay y n y
34 Mlt Maltese maltese y
35 Mon Mongolian mongolian n y
46 Slv Slovenian slovenian n n n
47 Snd Sindhi sindhi y
48 Spa Spanish spanish Romance y y y
49 Sqi Albanian albanian y n n n y
50 Swa Swahili swahili Bantu y n n n n
51 Swe Swedish swedish Scand y y y
52 Tam Tamil tamil n n n n n n n n

View File

@@ -305,4 +305,7 @@ fun
fun fun
TPastSimple : Tense ; TPastSimple : Tense ;
fun
SubjunctRelCN : CN -> RS -> CN ; -- e.g. Romance languages when subjunctive/conjunctive is needed
} }

View File

@@ -0,0 +1,11 @@
concrete AdjectiveSqi of Adjective = CatSqi ** open ResSqi, Prelude in {
lin
PositA a = {
s = \\spec,c,g,n => case a.clit of {
True => link_clitic ! spec ! c ! g ! n ++ a.s ! c ! g ! n ;
False => a.s ! c ! g ! n
}
} ;
}

4
src/albanian/AllSqi.gf Normal file
View File

@@ -0,0 +1,4 @@
concrete AllSqi of AllSqiAbs =
LangSqi
**
{} ;

View File

@@ -0,0 +1,3 @@
abstract AllSqiAbs =
Lang
** {}

25
src/albanian/CatSqi.gf Normal file
View File

@@ -0,0 +1,25 @@
concrete CatSqi of Cat = CommonX ** open ParamX, Prelude, ResSqi in {
lincat N = Noun ;
lincat N2 = Noun ** {c2 : Compl} ;
lincat N3 = Noun ** {c2,c3 : Compl} ;
lincat A = Adj ;
lincat A2 = Adj ** {c2 : Compl} ;
lincat V, VA, VV, VS, VQ = Verb ;
lincat V2, V2S, V2Q = Verb ** {c2 : Compl} ;
lincat V3, V2A, V2V = Verb ** {c2,c3 : Compl} ;
lincat Prep = Compl ;
lincat Numeral = {s : Str} ;
lincat Digits = {s : Str; n : Number; tail : DTail} ;
lincat Decimal = {s : Str; n : Number; hasDot : Bool} ;
lincat AP = {s: Species => Case => Gender => Number => Str} ;
lincat CN = Noun ;
lincat Num = {s : Str; n : Number} ;
lincat Quant = {s : Case => Gender => Number => Str; spec : Species} ;
lincat Det = {s : Case => Gender => Str; spec : Species; n : Number} ;
lincat NP = {s: Case => Str; a : Agr} ;
lincat Pron = {s: Case => Str; acc_clit, dat_clit : Str; a : Agr} ;
}

View File

@@ -0,0 +1,117 @@
concrete DocumentationSqi of Documentation = CatSqi ** open
ParamX, ResSqi, Prelude, HTML in {
lincat
Inflection = {t : Str; s1,s2,s3 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
lin InflectionN = \x -> {
t="em" ;
s1=heading1 ("Emër" ++
case x.g of {
Masc => "(mashkullor)" ;
Fem => "(femëror)"
}) ;
s2=frameTable (
tr (intagAttr "th" "colspan=\"2\"" "" ++ th "Sg" ++ th "Pl") ++
tr (intagAttr "th" "rowspan=\"4\"" "Indef" ++ th "Nom" ++ td (x.s ! Indef ! Nom ! Sg) ++ td (x.s ! Indef ! Nom ! Pl)) ++
tr (th "Acc" ++ td (x.s ! Indef ! Acc ! Sg) ++ td (x.s ! Indef ! Acc ! Pl)) ++
tr (th "Dat" ++ td (x.s ! Indef ! Dat ! Sg) ++ td (x.s ! Indef ! Dat ! Pl)) ++
tr (th "Ablat" ++ td (x.s ! Indef ! Ablat ! Sg) ++ td (x.s ! Indef ! Ablat ! Pl)) ++
tr (intagAttr "th" "rowspan=\"4\"" "Def" ++ th "Nom" ++ td (x.s ! Def ! Nom ! Sg) ++ td (x.s ! Def ! Nom ! Pl)) ++
tr (th "Acc" ++ td (x.s ! Def ! Acc ! Sg) ++ td (x.s ! Def ! Acc ! Pl)) ++
tr (th "Dat" ++ td (x.s ! Def ! Dat ! Sg) ++ td (x.s ! Def ! Dat ! Pl)) ++
tr (th "Ablat" ++ td (x.s ! Def ! Ablat ! Sg) ++ td (x.s ! Def ! Ablat ! Pl))) ;
s3=[]
} ;
lin InflectionA = \x -> {
t="mb" ;
s1=heading1 "Mbiemër" ;
s2=frameTable (
tr (intagAttr "th" "colspan=\"2\"" "" ++ th "Sg" ++ th "Pl") ++
tr (intagAttr "th" "rowspan=\"2\"" "Nom" ++ th "Masc" ++ td (y ! Nom ! Masc ! Sg) ++ td (y ! Nom ! Masc ! Pl)) ++
tr (th "Fem" ++ td (y ! Nom ! Fem ! Sg) ++ td (y ! Nom ! Fem ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Acc" ++ th "Masc" ++ td (y ! Acc ! Masc ! Sg) ++ td (y ! Acc ! Masc ! Pl)) ++
tr (th "Fem" ++ td (y ! Acc ! Fem ! Sg) ++ td (y ! Acc ! Fem ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Dat" ++ th "Masc" ++ td (y ! Dat ! Masc ! Sg) ++ td (y ! Dat ! Masc ! Pl)) ++
tr (th "Fem" ++ td (y ! Dat ! Fem ! Sg) ++ td (y ! Dat ! Fem ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Ablat" ++ th "Masc" ++ td (y ! Ablat ! Masc ! Sg) ++ td (y ! Ablat ! Masc ! Pl)) ++
tr (th "Fem" ++ td (y ! Ablat ! Fem ! Sg) ++ td (y ! Ablat ! Fem ! Pl))) ;
s3=[]
} where {
y : Case => Gender => Number => Str =
\\c,g,n => case x.clit of {
True => link_clitic ! Indef ! c ! g ! n ++ x.s ! c ! g ! n ;
False => x.s ! c ! g ! n
} ;
} ;
lin InflectionV = \x -> {
t="fl" ;
s1=heading1 "Folje" ;
s2=frameTable (
tr (intagAttr "th" "rowspan=\"24\"" "Indicative" ++ intagAttr "th" "rowspan=\"6\"" "Pres" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Pres ! Sg ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Pres ! Sg ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Pres ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Pres ! Pl ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Pres ! Pl ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Pres ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Past" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Past ! Sg ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Past ! Sg ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Past ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Past ! Pl ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Past ! Pl ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Past ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Aorist" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Aorist ! Sg ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Aorist ! Sg ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Aorist ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Aorist ! Pl ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Aorist ! Pl ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Aorist ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Imperfect" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Imperfect ! Sg ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Imperfect ! Sg ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Imperfect ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Imperfect ! Pl ! P1)) ++
tr (th "P2" ++ td (x.Indicative ! Imperfect ! Pl ! P2)) ++
tr (th "P3" ++ td (x.Indicative ! Imperfect ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Imperative" ++ th "Sg" ++ td (x.Imperative ! Sg)) ++
tr (th "Pl" ++ td (x.Imperative ! Pl)) ++
tr (th "participle" ++ td (x.participle)) ++
tr (intagAttr "th" "rowspan=\"6\"" "pres_optative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.pres_optative ! Sg ! P1)) ++
tr (th "P2" ++ td (x.pres_optative ! Sg ! P2)) ++
tr (th "P3" ++ td (x.pres_optative ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.pres_optative ! Pl ! P1)) ++
tr (th "P2" ++ td (x.pres_optative ! Pl ! P2)) ++
tr (th "P3" ++ td (x.pres_optative ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "perf_optative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.perf_optative ! Sg ! P1)) ++
tr (th "P2" ++ td (x.perf_optative ! Sg ! P2)) ++
tr (th "P3" ++ td (x.perf_optative ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.perf_optative ! Pl ! P1)) ++
tr (th "P2" ++ td (x.perf_optative ! Pl ! P2)) ++
tr (th "P3" ++ td (x.perf_optative ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "pres_admirative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.pres_admirative ! Sg ! P1)) ++
tr (th "P2" ++ td (x.pres_admirative ! Sg ! P2)) ++
tr (th "P3" ++ td (x.pres_admirative ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.pres_admirative ! Pl ! P1)) ++
tr (th "P2" ++ td (x.pres_admirative ! Pl ! P2)) ++
tr (th "P3" ++ td (x.pres_admirative ! Pl ! P3)) ++
tr (intagAttr "th" "rowspan=\"6\"" "imperf_admirative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.imperf_admirative ! Sg ! P1)) ++
tr (th "P2" ++ td (x.imperf_admirative ! Sg ! P2)) ++
tr (th "P3" ++ td (x.imperf_admirative ! Sg ! P3)) ++
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.imperf_admirative ! Pl ! P1)) ++
tr (th "P2" ++ td (x.imperf_admirative ! Pl ! P2)) ++
tr (th "P3" ++ td (x.imperf_admirative ! Pl ! P3))) ;
s3=[]
} ;
lin InflectionAdv = \x -> {
t="nd" ;
s1=heading1 "Ndajfolje" ;
s2=frameTable (
tr (th "s" ++ td (x.s))) ;
s3=[]
} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Example:</b>"++e.s++"</p>"};lin MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ; MkTag i = {s = i.t} ;}

View File

@@ -0,0 +1,9 @@
concrete GrammarSqi of Grammar =
NounSqi,
AdjectiveSqi,
NumeralSqi,
PhraseSqi,
StructuralSqi
** {
} ;

10
src/albanian/LangSqi.gf Normal file
View File

@@ -0,0 +1,10 @@
--# -path=.:../abstract
concrete LangSqi of Lang =
GrammarSqi,
LexiconSqi
,DocumentationSqi --# notpresent
** {
flags startcat = Phr ;
}

View File

@@ -0,0 +1,8 @@
concrete LexiconSqi of Lexicon = CatSqi ** open ParadigmsSqi in {
lin
airplane_N = mkN032 "aeroplan" ;
apple_N = mkN069 "mollë" ;
good_A = mkA "mirë" ;
}

42501
src/albanian/MorphoSqi.gf Normal file

File diff suppressed because it is too large Load Diff

40
src/albanian/NounSqi.gf Normal file
View File

@@ -0,0 +1,40 @@
concrete NounSqi of Noun = CatSqi ** open MorphoSqi, ResSqi in {
flags optimize=all_subs ;
lin
DetCN det cn = {
s = \\c => det.s ! c ! cn.g ++ cn.s ! det.spec ! c ! det.n ;
a = agrgP3 cn.g det.n
} ;
UsePron p = p ;
DetQuant quant num = {
s = \\c,g => quant.s ! c ! g ! num.n ++ num.s ;
n = num.n ;
spec = quant.spec
} ;
NumSg = {s = []; n = Sg} ;
NumPl = {s = []; n = Pl} ;
DefArt = {
s = \\c,g,n => [] ;
spec = Def
} ;
IndefArt = {
s = \\c,g => table Number ["një"; []] ;
spec = Indef
} ;
UseN n = n ;
UseN2 n = n ;
AdjCN ap cn = {
s = \\spec,c,n => cn.s ! spec ! c ! n ++ ap.s ! spec ! c ! cn.g ! n ;
g = cn.g
} ;
}

View File

@@ -0,0 +1,93 @@
concrete NumeralSqi of Numeral = CatSqi ** open ParamX, Prelude in {
oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ;
param DForm = unit | teen | ten ;
oper LinDigit = {s : DForm => Str };
oper LinSub100 = {s : Str } ;
lincat Digit = LinDigit ;
lincat Sub10 = LinDigit ;
lincat Sub100 = LinSub100 ;
lincat Sub1000 = LinSub100 ;
lincat Sub1000000 = { s : Str } ;
oper mkNum : Str -> LinDigit = \tri ->
{ s = table {unit => tri ; teen => tri + "mbë" + "dhjetë" ; ten => tri + "dhjetë" }};
lin num x = {s = x.s } ;
lin n2 = {s = table {unit => "dy" ; teen => "dy" + "mbë" + "dhjetë" ; ten => "njëzet" }};
lin n3 = mkNum "tre" ;
lin n4 = {s = table {unit => "katër" ; teen => "katër" + "mbë" + "dhjetë" ; ten => "dyzet" } };
lin n5 = mkNum "pesë" ;
lin n6 = mkNum "gjashtë";
lin n7 = mkNum "shtatë";
lin n8 = mkNum "tetë";
lin n9 = mkNum "nëntë";
oper mkR : Str -> LinSub100 = \n -> {s = n } ;
lin pot01 = { s = table {_ => "një" }};
lin pot0 d = d ;
lin pot110 = mkR "dhjetë" ;
lin pot111 = mkR ("një" + "mbë" + "dhjetë") ;
lin pot1to19 d = mkR (d.s ! teen) ;
lin pot0as1 n = mkR (n.s ! unit) ;
lin pot1 d = mkR (d.s ! ten) ;
lin pot1plus d e = mkR ((d.s ! ten) ++ "e" ++ (e.s ! unit)) ;
lin pot1as2 n = n ;
lin pot2 d = mkR (bind (d.s ! unit) "qind") ;
lin pot2plus d e = mkR ((bind (d.s ! unit) "qind") ++ "e" ++ e.s) ;
lin pot2as3 n = {s = n.s };
lin pot3 n = {s = n.s ++ "mijë" } ;
lin pot3plus n m = {s = n.s ++ "mijë" ++ m.s} ;
lincat Dig = {s : Str; n : Number} ;
lin IDig d = d ** {tail = T1} ;
IIDig d i = {
s = d.s ++ spaceIf i.tail ++ i.s ;
n = Pl ;
tail = inc i.tail
} ;
D_0 = mkDig "0" Pl ;
D_1 = mkDig "1" Sg ;
D_2 = mkDig "2" Pl ;
D_3 = mkDig "3" Pl ;
D_4 = mkDig "4" Pl ;
D_5 = mkDig "5" Pl ;
D_6 = mkDig "6" Pl ;
D_7 = mkDig "7" Pl ;
D_8 = mkDig "8" Pl ;
D_9 = mkDig "9" Pl ;
lin PosDecimal d = d ** {hasDot=False} ;
NegDecimal d = {s="-" ++ BIND ++ d.s; hasDot=False; n = Pl} ;
IFrac d i = {
s=d.s ++
if_then_Str d.hasDot BIND (BIND++","++BIND) ++
i.s ;
hasDot=True;
n = Pl
} ;
oper
mkDig : Str -> Number -> Dig = \s,n -> lin Dig {s=s; n=n} ;
spaceIf : DTail -> Str = \t -> case t of {
T3 => "" ;
_ => BIND
} ;
inc : DTail -> DTail = \t -> case t of {
T1 => T2 ;
T2 => T3 ;
T3 => T1
} ;
}

1375
src/albanian/ParadigmsSqi.gf Normal file

File diff suppressed because it is too large Load Diff

13
src/albanian/PhraseSqi.gf Normal file
View File

@@ -0,0 +1,13 @@
concrete PhraseSqi of Phrase = CatSqi ** open Prelude, ResSqi in {
lin
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
UttNP np = {s = np.s ! Nom} ;
UttInterj i = i ;
NoPConj = {s = []} ;
NoVoc = {s = []} ;
}

261
src/albanian/ResSqi.gf Normal file
View File

@@ -0,0 +1,261 @@
resource ResSqi = ParamX-[Tense,Past,Pres] ** open Prelude in {
oper Compl = {s : Str} ;
param Species = Indef | Def ;
param Case = Nom | Acc | Dat | Ablat ;
param Gender = Masc | Fem ;
param GenNum = GSg Gender | GPl ;
oper Agr = {gn : GenNum; p : Person} ;
oper Noun = {s: Species => Case => Number => Str; g: Gender} ; -- 3978
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,g ->
{ s = table {
Indef => table {
Nom => table {
Sg => f1 ;
Pl => f2
} ;
Acc => table {
Sg => f3 ;
Pl => f4
} ;
Dat => table {
Sg => f5 ;
Pl => f6
} ;
Ablat => table {
Sg => f7 ;
Pl => f8
}
} ;
Def => table {
Nom => table {
Sg => f9 ;
Pl => f10
} ;
Acc => table {
Sg => f11 ;
Pl => f12
} ;
Dat => table {
Sg => f13 ;
Pl => f14
} ;
Ablat => table {
Sg => f15 ;
Pl => f16
}
}
} ;
g = g
} ;
oper Adj = {s: Case => Gender => Number => Str; clit: Bool} ; -- 462
oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Bool -> Adj =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,clit ->
{ s = table {
Nom => table {
Masc => table {
Sg => f1 ;
Pl => f2
} ;
Fem => table {
Sg => f3 ;
Pl => f4
}
} ;
Acc => table {
Masc => table {
Sg => f5 ;
Pl => f6
} ;
Fem => table {
Sg => f7 ;
Pl => f8
}
} ;
Dat => table {
Masc => table {
Sg => f9 ;
Pl => f10
} ;
Fem => table {
Sg => f11 ;
Pl => f12
}
} ;
Ablat => table {
Masc => table {
Sg => f13 ;
Pl => f14
} ;
Fem => table {
Sg => f15 ;
Pl => f16
}
}
} ;
clit = clit
} ;
param Tense = Pres | Past | Imperfect | Aorist ;
oper Verb = {Indicative: Tense => Number => Person => Str; Imperative: Number => Str; participle: Str; pres_optative: Number => Person => Str; perf_optative: Number => Person => Str; pres_admirative: Number => Person => Str; imperf_admirative: Number => Person => Str} ; -- 758
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31,f32,f33,f34,f35,f36,f37,f38,f39,f40,f41,f42,f43,f44,f45,f46,f47,f48,f49,f50,f51 ->
{ Indicative = table {
Pres => table {
Sg => table {
P1 => f1 ;
P2 => f2 ;
P3 => f3
} ;
Pl => table {
P1 => f4 ;
P2 => f5 ;
P3 => f6
}
} ;
Past => table {
Sg => table {
P1 => f7 ;
P2 => f8 ;
P3 => f9
} ;
Pl => table {
P1 => f10 ;
P2 => f11 ;
P3 => f12
}
} ;
Aorist => table {
Sg => table {
P1 => f13 ;
P2 => f14 ;
P3 => f15
} ;
Pl => table {
P1 => f16 ;
P2 => f17 ;
P3 => f18
}
} ;
Imperfect => table {
Sg => table {
P1 => f19 ;
P2 => f20 ;
P3 => f21
} ;
Pl => table {
P1 => f22 ;
P2 => f23 ;
P3 => f24
}
}
} ;
Imperative = table {
Sg => f25 ;
Pl => f26
} ;
participle = f27 ;
pres_optative = table {
Sg => table {
P1 => f28 ;
P2 => f29 ;
P3 => f30
} ;
Pl => table {
P1 => f31 ;
P2 => f32 ;
P3 => f33
}
} ;
perf_optative = table {
Sg => table {
P1 => f34 ;
P2 => f35 ;
P3 => f36
} ;
Pl => table {
P1 => f37 ;
P2 => f38 ;
P3 => f39
}
} ;
pres_admirative = table {
Sg => table {
P1 => f40 ;
P2 => f41 ;
P3 => f42
} ;
Pl => table {
P1 => f43 ;
P2 => f44 ;
P3 => f45
}
} ;
imperf_admirative = table {
Sg => table {
P1 => f46 ;
P2 => f47 ;
P3 => f48
} ;
Pl => table {
P1 => f49 ;
P2 => f50 ;
P3 => f51
}
}
} ;
oper link_clitic : Species => Case => Gender => Number => Str =
table {
Indef => table {
Nom => table {
Masc => table {
Sg => "i" ;
Pl => "të"
} ;
Fem => table {
Sg => "e" ;
Pl => "të"
}
} ;
_ => \\_,_ => "të"
} ;
Def => table {
Nom => table {
Masc => table {
Sg => "i" ;
Pl => "e"
} ;
Fem => table {
Sg => "e" ;
Pl => "e"
}
} ;
Acc => \\_,_ => "e" ;
_ => table {
Masc => \\_ => "të" ;
Fem => table {
Sg => "së" ;
Pl => "të"
}
}
}
} ;
oper genNum : Gender -> Number -> GenNum = \g,n ->
case n of {
Sg => GSg g ;
Pl => GPl
} ;
agrgP3 : Gender -> Number -> Agr =
\g,n -> {gn=genNum g n; p=P3} ;
}

View File

@@ -0,0 +1,19 @@
concrete StructuralSqi of Structural = CatSqi ** open ResSqi, ParadigmsSqi in {
lin i_Pron = mkPron "unë" "mua" "mua" "meje" "më" "më" (GSg Masc) P1 ;
lin youSg_Pron = mkPron "ti" "ty" "ty" "teje" "të" "të" (GSg Masc) P2 ;
lin he_Pron = mkPron "ai" "atë" "atij" "atij" "e" "i" (GSg Masc) P3 ;
lin she_Pron = mkPron "ajo" "atë" "asaj" "asaj" "e" "i" (GSg Fem) P3 ;
lin it_Pron = mkPron "ai" "atë" "atij" "atij" "e" "i" (GSg Masc) P3 ;
lin we_Pron = mkPron "ne" "ne" "neve" "nesh" "na" "na" GPl P1 ;
lin youPl_Pron = mkPron "ju" "ju" "juve" "jush" "ju" "ju" GPl P2 ;
lin they_Pron = mkPron "ata" "ata" "atyre" "atyre" "i" "u" GPl P3 ;
lin this_Quant = mkQuant "ky" "këta" "kjo" "këto"
"këtë" "këtyre" "këtë" "këtyre"
"këtij" "këtyre" "kësaj" "këtyre"
"këtij" "këtyre" "kësaj" "këtyre" ;
lin that_Quant = mkQuant "ai" "ata" "ajo" "ato"
"atë" "ata" "atë" "ato"
"atij" "atyre" "asaj" "atyre"
"atij" "atyre" "asaj" "atyre" ;
}

View File

@@ -995,8 +995,8 @@ pronNP : (N,A,G,D : Str) -> PerNumGen -> NP = \N,A,G,D,png-> {
{ {
s = \\c =>case c of s = \\c =>case c of
{ {
Gen|Dat => affix!c + word; Gen|Dat => affix!c ++ Predef.BIND ++ word;
_ => word + affix!c _ => word ++ Predef.BIND ++ affix!c
}; };
a = {png = Per3 n Masc ; isPron = False }; a = {png = Per3 n Masc ; isPron = False };
lock_NP = <> lock_NP = <>

View File

@@ -1,3 +1,16 @@
--# -path=.:../danish:../scandinavian:../common:../abstract:../prelude --# -path=.:../danish:../scandinavian:../common:../abstract:../prelude
resource TryDan = SyntaxDan, LexiconDan, ParadigmsDan - [mkAdv] ; resource TryDan = SyntaxDan-[mkAdN], LexiconDan, ParadigmsDan - [mkAdv,mkAdN] **
open (P = ParadigmsDan) in {
oper
mkAdv = overload SyntaxDan {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxDan.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
}

View File

@@ -1,17 +1,21 @@
--# -path=.:../greek:../common:../abstract:../prelude --# -path=.:../greek:../common:../abstract:../prelude
resource TryGre = SyntaxGre, LexiconGre, ParadigmsGre ; resource TryGre = SyntaxGre-[mkAdN,mkVoc], LexiconGre, ParadigmsGre - [mkAdN,mkAdv,mkVoc] **
{-
-[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsGre) in { open (P = ParadigmsGre) in {
oper oper
mkAdv = overload SyntaxGre { mkAdv = overload SyntaxGre {
mkAdv : Str -> Adv = P.mkAdv ; mkAdv : Str -> Adv = P.mkAdv ;
} ; } ;
} mkVoc = overload {
mkVoc : NP -> Voc = SyntaxGre.mkVoc ;
mkVoc : Str -> Voc = P.mkVoc ;
} ;
-} mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxGre.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
}

View File

@@ -1,3 +1,12 @@
--# -path=.:../icelandic:../common:../abstract:../prelude --# -path=.:../icelandic:../common:../abstract:../prelude
resource TryIce = SyntaxIce, LexiconIce, ParadigmsIce - [mkAdv,mkAdN,mkOrd] ; resource TryIce = SyntaxIce-[mkVoc], LexiconIce, ParadigmsIce - [mkAdv,mkAdN,mkOrd,mkVoc] **
open (P = ParadigmsIce) in {
oper
mkVoc = overload {
mkVoc : NP -> Voc = SyntaxIce.mkVoc ;
mkVoc : Str -> Voc = P.mkVoc ;
} ;
}

View File

@@ -1,3 +1,16 @@
--# -path=.:../nynorsk:../scandinavian:../common:../abstract:../prelude --# -path=.:../nynorsk:../scandinavian:../common:../abstract:../prelude
resource TryNno = SyntaxNno, LexiconNno, ParadigmsNno - [mkAdv] ; resource TryNno = SyntaxNno-[mkAdN], LexiconNno, ParadigmsNno - [mkAdv,mkAdN] **
open (P = ParadigmsNno) in {
oper
mkAdv = overload SyntaxNno {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxNno.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
}

View File

@@ -1,3 +1,16 @@
--# -path=.:../norwegian:../scandinavian:../common:../abstract:../prelude --# -path=.:../norwegian:../scandinavian:../common:../abstract:../prelude
resource TryNor = SyntaxNor, LexiconNor, ParadigmsNor - [mkAdv] ; resource TryNor = SyntaxNor-[mkAdN], LexiconNor, ParadigmsNor - [mkAdv,mkAdN] **
open (P = ParadigmsNor) in {
oper
mkAdv = overload SyntaxNor {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxNor.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
}

View File

@@ -54,7 +54,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
Card = ResAra.NumOrdCard ; Card = ResAra.NumOrdCard ;
Predet = ResAra.Predet ; Predet = ResAra.Predet ;
Det = ResAra.Det ; DAP, Det = ResAra.Det ;
-- {s : Species => Gender => Case => Str ; -- {s : Species => Gender => Case => Str ;
-- d : State; n : Size; isNum : Bool } ; -- d : State; n : Size; isNum : Bool } ;
Quant = ResAra.Quant ; Quant = ResAra.Quant ;
@@ -92,7 +92,8 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
N = ResAra.Noun ; N = ResAra.Noun ;
N2 = ResAra.Noun2 ; N2 = ResAra.Noun2 ;
N3 = ResAra.Noun3 ; N3 = ResAra.Noun3 ;
GN, SN, LN, PN = {s : Case => Str; g : Gender; h : Species} ; GN, SN, PN = {s : Case => Str; g : Gender; h : Species} ;
LN = ResAra.NP ;
linref linref

View File

@@ -1,4 +1,4 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
-- documenting Arabic inflection -- documenting Arabic inflection
---- so far with English titles and tags, AR 2024-01-31 ---- so far with English titles and tags, AR 2024-01-31
@@ -32,7 +32,7 @@ lin
) )
} ; } ;
InflectionPN, InflectionLN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN InflectionPN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN
t = "pn" ; t = "pn" ;
s1 = heading1 ("Proper Name" ++ s1 = heading1 ("Proper Name" ++
case pn.g of { case pn.g of {

View File

@@ -8,7 +8,7 @@ concrete ExtendAra of Extend =
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS, VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
EmbedSSlash, AdjAsNP, GerundNP, EmbedSSlash, AdjAsNP, GerundNP,
PassVPSlash, ---- bogus implementation, see below PassVPSlash, ---- bogus implementation, see below
CompoundN CompoundN, UseDAP, UseDAPMasc, UseDAPFem
] ]
with (Grammar=GrammarAra) with (Grammar=GrammarAra)
** open ** open
@@ -105,4 +105,31 @@ lin
s2 = \\n, s, c => b.s2 ! n ! Const ! c ++ a.s2 ! n ! s ! c s2 = \\n, s, c => b.s2 ! n ! Const ! c ++ a.s2 ! n ! s ! c
} ; } ;
lin UseDAP dap = case dap.isEmpty of {
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
<Def,One> => it_Pron ;
<Def,_> => they_Pron ;
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
} ;
False => emptyNP ** {s = dap.s ! NoHum ! Masc} } ;
lin UseDAPMasc dap = case dap.isEmpty of {
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
<Def,One> => it_Pron ;
<Def,_> => theyMasc_Pron ;
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
} ;
False => emptyNP ** {s = dap.s ! NoHum ! Masc} } ;
lin UseDAPFem dap = case dap.isEmpty of {
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
<Def,One> => it_Pron ;
<Def,_> => theyFem_Pron ;
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Fem} ;
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Fem}
} ;
False => emptyNP ** {s = dap.s ! NoHum ! Fem} } ;
} }

View File

@@ -9,11 +9,10 @@ lin FullName gn sn = emptyNP ** {
a = {pgn = Per3 gn.g Sg ; isPron = False} ; a = {pgn = Per3 gn.g Sg ; isPron = False} ;
} ; } ;
lin UseLN pn = emptyNP ** { lin UseLN ln = ln ;
s = pn.s ;
a = {pgn = Per3 pn.g Sg ; isPron = False} ;
} ;
lin InLN n = A.PrepNP S.in_Prep (N.UsePN n) ; ---- TODO: alternative prepositions lin PlainLN ln = ln ;
lin InLN n = A.PrepNP S.in_Prep n ; ---- TODO: alternative prepositions
} }

View File

@@ -237,6 +237,11 @@ lin
} }
}; };
-- : CN -> NP -> CN ; -- glass of wine DetDAP d = d ;
--PartNP
QuantityNP n m = emptyNP ** {
s = \\c => preOrPost m.isPre m.s n.s ;
a = { pgn = agrP3 NoHum Masc (sizeToNumber n.n);
isPron = False }
};
} }

View File

@@ -30,6 +30,7 @@ resource ParadigmsAra = open
ResAra, ResAra,
OrthoAra, OrthoAra,
(A=AdjectiveAra), (A=AdjectiveAra),
(N=NounAra),
CatAra CatAra
in { in {
@@ -97,12 +98,17 @@ resource ParadigmsAra = open
mkLN = overload { mkLN = overload {
mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum. mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum.
= \s -> lin LN (smartPN s) ; = \s -> lin LN (N.UsePN (smartPN s)) ;
mkLN : Str -> Gender -> LN
= \s, g -> lin LN (N.UsePN (smartPN s ** {g = g})) ;
mkLN : N -> LN -- Make a LN out of N. The LN is in construct state. mkLN : N -> LN -- Make a LN out of N. The LN is in construct state.
= \n -> lin LN (n ** { = \n -> lin LN (N.MassNP (N.UseN n)) ;
s = \\c => n.s ! Sg ! Const ! c ----(n ** { ---- cannot get this to compile AR 2024-04-18
++ 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 ---- 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
---- }))) ;
mkLN : NP -> LN
= \np -> np ;
} ; } ;
--3 Relational nouns --3 Relational nouns
@@ -206,6 +212,10 @@ resource ParadigmsAra = open
mkConj : Str -> Str -> Number -> Conj ; -- either, or, sg mkConj : Str -> Str -> Number -> Conj ; -- either, or, sg
} ; } ;
--2 Measurement Units
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
--2 Verbs --2 Verbs
-- Overloaded operations -- Overloaded operations

View File

@@ -71,4 +71,5 @@ concrete SentenceAra of Sentence = CatAra ** open
UseSlash t p cls = UseCl t p (complClSlash cls) ; UseSlash t p cls = UseCl t p (complClSlash cls) ;
AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ; AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
ExtAdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
} }

View File

@@ -1,7 +1,9 @@
--# -path=alltenses:../common:../abstract:../romance --# -path=alltenses:../common:../abstract:../romance
concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- - concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
-- [ -- [
-- ]
-- ]
-- don't forget to put the names of your own -- don't forget to put the names of your own
-- definitions here -- definitions here
with with
@@ -15,4 +17,6 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
ParadigmsCat in { ParadigmsCat in {
-- put your own definitions here -- put your own definitions here
} ; } ;

View File

@@ -137,6 +137,8 @@ lin
ExistNPQS t p np = UseQCl t p (QuestCl (ExistNP np)) ; ExistNPQS t p np = UseQCl t p (QuestCl (ExistNP np)) ;
ExistIPQS t p np = UseQCl t p (ExistIP np) ; ExistIPQS t p np = UseQCl t p (ExistIP np) ;
SubjunctRelCN cn rs = RelCN cn rs ; -- no difference from indicative
lincat lincat
X = {s : Str} ; X = {s : Str} ;

View File

@@ -6,4 +6,6 @@ lin
s = prep.s ++ np.prep ! prep.c s = prep.s ++ np.prep ! prep.c
} ; } ;
AdnCAdv a = a ; AdnCAdv a = a ;
SubjS subj s = {s = subj.s ++ s.s} ;
} }

View File

@@ -18,7 +18,7 @@ concrete CatHrv of Cat =
RS = {s : Agr => Str} ; RS = {s : Agr => Str} ;
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
RP = AdjForms ; RP = {s : Gender => Number => Case => Str} ; -- same as AP
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ---- VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
@@ -33,10 +33,12 @@ concrete CatHrv of Cat =
AdA = {s : Str} ; AdA = {s : Str} ;
N = ResHrv.NounForms ** {g : Gender} ; N = ResHrv.NounForms ** {g : Gender} ;
N2 = ResHrv.NounForms ** {g : Gender ; c : ComplementCase} ;
CN = ResHrv.Noun ; -- {s : Number => Case => Str ; g : Gender} CN = ResHrv.Noun ; -- {s : Number => Case => Str ; g : Gender}
NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns
PN = {s : Case => Str ; g : Gender} ; PN = {s : Case => Str ; g : Gender} ;
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
Predet = {s : Gender => Number => Case => Str} ; -- same as AP
Quant = {s : Gender => Number => Case => Str} ; -- same as AP Quant = {s : Gender => Number => Case => Str} ; -- same as AP
Num = Determiner ; Num = Determiner ;
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;

View File

@@ -3,6 +3,7 @@ concrete ExtendHrv of Extend = CatHrv **
--- ReflPossPron --- ReflPossPron
CardCNCard CardCNCard
---- constant not found (yet) ---- constant not found (yet)
,GenRP
,youPolFem_Pron ,youPolFem_Pron
,UttVPShort ,UttVPShort
,UttAccIP ,UttAccIP
@@ -32,14 +33,19 @@ concrete ExtendHrv of Extend = CatHrv **
with (Grammar = GrammarHrv) with (Grammar = GrammarHrv)
** **
open open
ResHrv ResHrv, ParadigmsHrv
in { in {
---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ; ---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;
lin CardCNCard card cn = { lin
CardCNCard card cn = {
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ; s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
size = NS_20_ size = NS_20_
} ; } ;
GenRP num cn = {
s = \\g, n, c => (adjFormsAdjective (mkA "čiji").posit).s ! g ! n ! c ++ num.s ! cn.g ! c ++ cn.s ! n ! c
} ;
} }

View File

@@ -10,4 +10,13 @@ lin
ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ; ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ;
ImpersCl vp =
let npa = Ag Neutr Sg P3 in {
subj = "" ;
verb = vp.verb ;
clit = vp.clit ! npa ;
compl = vp.compl ! npa ;
a = npa ;
} ;
} }

View File

@@ -6,12 +6,10 @@ oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ; oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ; oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ; oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
oper CompCN : CN -> Comp = notYet "CompCN" ;
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ; oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
oper CompIP : IP -> IComp = notYet "CompIP" ; oper CompIP : IP -> IComp = notYet "CompIP" ;
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ; oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
@@ -34,14 +32,12 @@ oper IdetIP : IDet -> IP = notYet "IdetIP" ;
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ; oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ; oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper ImpVP : VP -> Imp = notYet "ImpVP" ; oper ImpVP : VP -> Imp = notYet "ImpVP" ;
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ; oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PassV2 : V2 -> VP = notYet "PassV2" ; oper PassV2 : V2 -> VP = notYet "PassV2" ;
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ; oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ; oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
oper ProgrVP : VP -> VP = notYet "ProgrVP" ; oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ; oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
@@ -66,7 +62,6 @@ oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ; oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ; oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ; oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper TCond : Tense = notYet "TCond" ; oper TCond : Tense = notYet "TCond" ;
oper TFut : Tense = notYet "TFut" ; oper TFut : Tense = notYet "TFut" ;
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ; oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;

View File

@@ -63,6 +63,15 @@ lin
g = cn.g g = cn.g
} ; } ;
PredetNP predet np =
case np.a of {
Ag g n _ => {
s,clit,prep = \\c => predet.s ! g ! n ! c ++ np.s ! c ;
a = np.a ;
hasClit = False
}
} ;
RelCN cn rs = { RelCN cn rs = {
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ; s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
g = cn.g g = cn.g

View File

@@ -6,13 +6,12 @@ concrete RelativeHrv of Relative = CatHrv ** open
lin lin
RelVP rp vp = vp ** { RelVP rp vp = vp ** {
subj = subj =
let rel = (adjFormsAdjective rp).s let rel = rp.s
in \\a => case a of { in \\a => case a of {
Ag g n _ => rel ! g ! n ! Nom Ag g n _ => rel ! g ! n ! Nom
} }
} ; } ;
IdRP = (mkA "koji").posit ; IdRP = adjFormsAdjective (mkA "koji").posit ;
} }

View File

@@ -29,4 +29,8 @@ lin
rcl.compl ! a ; rcl.compl ! a ;
} ; ---- TODO tenses } ; ---- TODO tenses
AdvS adv s = {s = adv.s ++ s.s} ;
ExtAdvS adv s = {s = adv.s ++ Predef.BIND ++ "," ++ s.s} ;
} }

View File

@@ -31,4 +31,17 @@ lin
somewhere_Adv = mkAdv "negdje" ; somewhere_Adv = mkAdv "negdje" ;
if_Subj = lin Subj {s = "ako"} ;
every_Det = {s = \\g, c => (adjFormsAdjective (velikA "svaki")).s ! g ! Sg ! c ; size = NS_1} ;
all_Predet = adjFormsAdjective (velikA "svi") ;
that_Subj = lin Subj {s = "da"} ;
someSg_Det = {s = \\g, c => (adjFormsAdjective (velikA "neki")).s ! g ! Sg ! c ; size = NS_1} ;
at_least_AdN = lin AdN {s = "najmanje"} ;
part_Prep = mkPrep genitive ;
-- ExtAdvS
-- mkN2
-- mkA2
} }

View File

@@ -37,6 +37,12 @@ lin
s = \\a_ => np.s ! Nom ; s = \\a_ => np.s ! Nom ;
} ; } ;
CompCN cn = {
s = \\a => case a of {
Ag _ n _ => cn.s ! n ! Nom
} ;
} ;
CompAdv adv = { CompAdv adv = {
s = \\a_ => adv.s s = \\a_ => adv.s
} ; } ;

View File

@@ -3,5 +3,5 @@
concrete AllDan of AllDanAbs = concrete AllDan of AllDanAbs =
LangDan, LangDan,
IrregDan - [fly_V], IrregDan - [fly_V],
ExtraDan ExtendDan
** {} ; ** {} ;

View File

@@ -0,0 +1,282 @@
concrete DocumentationDan of Documentation = CatDan ** open
ResDan,
CommonScand,
HTML
in {
flags coding=utf8 ;
lincat
Inflection = {t : Str; s1,s2 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
{-
-} --# notpresent
lin
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "s" ;
s1 = heading1 ("Substantiv" ++ case noun.g of {
Utr => "(utrum)" ;
Neutr => "(neutr)"
}) ;
s2 = frameTable (
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
tr (intagAttr "th" "rowspan=2" "nom" ++
th "sg" ++ td (noun.s ! Sg ! Indef ! Nom) ++ td (noun.s ! Sg ! Def ! Nom)) ++
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Nom) ++ td (noun.s ! Pl ! Def ! Nom)) ++
tr (intagAttr "th" "rowspan=2" "gen" ++
th "sg" ++ td (noun.s ! Sg ! Indef ! Gen) ++ td (noun.s ! Sg ! Def ! Gen)) ++
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Gen) ++ td (noun.s ! Pl ! Def ! Gen))
)
} ;
InflectionLN = \n -> {
t = "nm" ;
s1 = heading1 ("Platsnamn" ++ case n.g of {
Utr => "(utr)" ;
Neutr => "(neutr)"
}) ;
s2 = frameTable (
tr (th "nom" ++ td (n.s ! Nom)) ++
tr (th "gen" ++ td (n.s ! Gen))
) ;
} ;
InflectionGN = \pn -> {
t = "fnm" ;
s1 = heading1 ("Förnamn" ++ case pn.g of {
Male => "(man)" ;
Female => "(kvinna)"
}) ;
s2 = frameTable (
tr (th "nom" ++ td (pn.s ! Nom)) ++
tr (th "gen" ++ td (pn.s ! Gen))
)
} ;
InflectionSN = \pn -> {
t = "enm" ;
s1 = heading1 "Efternamn" ;
s2 = frameTable (
tr (th "nom" ++ td (pn.s ! Male ! Nom)) ++
tr (th "gen" ++ td (pn.s ! Male ! Gen))
)
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjektiv" ;
s2 = frameTable (
tr (intagAttr "th" "colspan=5" "nominativ") ++
tr (intagAttr "th" "colspan=2" "posit" ++
th "posit" ++
th "kompar" ++
th "superl") ++
caseInfl Nom ++
tr (intagAttr "th" "colspan=5" "genitiv") ++
caseInfl Nom
) ++
heading1 ("Adverb") ++
paragraph (adj.s ! AAdv) ;
} where {
caseInfl : Case -> Str = \c ->
tr (intagAttr "th" "rowspan=3" "obest" ++
th "utr" ++
td (adj.s ! (AF (APosit (Strong (GSg Utr))) c)) ++
intagAttr "td" "rowspan=5" (adj.s ! (AF ACompar c)) ++
intagAttr "td" "rowspan=3" (adj.s ! (AF (ASuperl SupStrong) c))) ++
tr (th "neut" ++
td (adj.s ! (AF (APosit (Strong (GSg Neutr))) c))) ++
tr (th "pl" ++
td (adj.s ! (AF (APosit (Strong GPl)) c))) ++
tr (intagAttr "th" "rowspan=2" "best" ++
th "sg" ++
td (adj.s ! (AF (APosit (Weak Sg)) c)) ++
intagAttr "td" "rowspan=2" (adj.s ! (AF (ASuperl SupWeak) c))) ++
tr (th "pl" ++
td (adj.s ! (AF (APosit (Weak Pl)) c))) ;
} ;
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
t = "adv" ;
s1 = heading1 "Adverb" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 "Preposition" ;
s2 = paragraph p.s
} ;
InflectionV v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part);
s2 = inflVerb v
} ;
InflectionV2 v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++ v.c2.s ++
pp "objekt") ;
s2 = inflVerb v
} ;
InflectionV3 v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "arg1" ++
v.c3.s ++ pp "arg2") ;
s2 = inflVerb v
} ;
InflectionV2V v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
v.c3.s ++ pp "verb") ;
s2 = inflVerb v
} ;
InflectionV2S v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
conjThat ++ pp "mening") ;
s2 = inflVerb v
} ;
InflectionV2Q v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
pp "fråga") ;
s2 = inflVerb v
} ;
InflectionV2A v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
v.c2.s ++ pp "objekt" ++
pp "adjektiv") ;
s2 = inflVerb v
} ;
InflectionVV v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "verb") ;
s2 = inflVerb v
} ;
InflectionVS v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
conjThat ++ pp "mening") ;
s2 = inflVerb v
} ;
InflectionVQ v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "fråga") ;
s2 = inflVerb v
} ;
InflectionVA v = {
t = "v" ;
s1 = heading1 "Verb" ++
paragraph (pp "subjekt" ++
v.s ! VI (VInfin Act) ++ v.part ++
pp "adjektiv") ;
s2 = inflVerb v
} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Exempel:</b>"++e.s++"</p>"};
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ; -- explanation appended in a new paragraph
MkTag i = {s = i.t} ;
oper
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th "" ++ th "active" ++ th "passive") ++
tr (th "infitiv" ++ td (verb.s ! VI (VInfin Act)) ++ td (verb.s ! VI (VInfin Pass))) ++
tr (th "presens" ++ td (verb.s ! VF (VPres Act)) ++ td (verb.s ! VF (VPres Pass))) ++
tr (th "preteritum" ++ td (verb.s ! VF (VPret Act)) ++ td (verb.s ! VF (VPret Pass))) ++
tr (th "supinum" ++ td (verb.s ! VI (VSupin Act)) ++ td (verb.s ! VI (VSupin Pass))) ++
tr (th "imperativ" ++ td (verb.s ! VF (VImper Act)) ++ td (verb.s ! VF (VImper Pass)))
) ++
heading2 "Particip Presens" ++
frameTable (
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
tr (intagAttr "th" "rowspan=2" "nom" ++
th "sg" ++
td (verb.s ! VI (VPtPres Sg Indef Nom)) ++
td (verb.s ! VI (VPtPres Sg Def Nom))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPres Pl Indef Nom)) ++
td (verb.s ! VI (VPtPres Pl Def Nom))) ++
tr (intagAttr "th" "rowspan=2" "gen" ++
th "sg" ++
td (verb.s ! VI (VPtPres Sg Indef Gen)) ++
td (verb.s ! VI (VPtPres Sg Def Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPres Pl Indef Gen)) ++
td (verb.s ! VI (VPtPres Pl Def Gen)))
) ++
heading2 "Particip Perfekt" ++
frameTable (
tr (intagAttr "th" "colspan=2" "" ++
th "nom" ++
th "gen") ++
tr (intagAttr "th" "rowspan=3" "obest" ++
th "utr" ++
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Nom)) ++
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Gen))) ++
tr (th "neut" ++
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Nom)) ++
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPret (Strong GPl) Nom)) ++
td (verb.s ! VI (VPtPret (Strong GPl) Gen))) ++
tr (intagAttr "th" "rowspan=2" "best" ++
th "sg" ++
td (verb.s ! VI (VPtPret (Weak Sg) Nom)) ++
td (verb.s ! VI (VPtPret (Weak Sg) Gen))) ++
tr (th "pl" ++
td (verb.s ! VI (VPtPret (Weak Pl) Nom)) ++
td (verb.s ! VI (VPtPret (Weak Pl) Gen)))
) ;
pp : Str -> Str = \s -> "&lt;"+s+"&gt;";
{- --# notpresent
-}
}

26
src/danish/ExtendDan.gf Normal file
View File

@@ -0,0 +1,26 @@
--# -path=.:../scandinavian:../abstract:../common:prelude
concrete ExtendDan of Extend = CatDan **
ExtendFunctor -
[
GenNP, GenModNP, ComplBareVS, CompBareCN,
ApposNP, DetNPMasc, DetNPFem,
StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
PassVPSlash, PassAgentVPSlash, UttVPShort, ByVP, InOrderToVP,
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, RelVPS,
MkVPS2, ConjVPS2, ComplVPS2, ReflVPS2, MkVPI2, ConjVPI2, ComplVPI2,
ICompAP,ProDrop,EmbedSSlash,
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron,
CompoundN, CompoundAP, AdvIsNP,
A2VPSlash, N2VPSlash,
CardCNCard,
GenRP
]
with (Grammar = GrammarDan)
** {
flags coding=utf8 ;
}

View File

@@ -14,7 +14,8 @@ concrete GrammarDan of Grammar =
TextX - [Tense,Temp] , TextX - [Tense,Temp] ,
IdiomDan, IdiomDan,
StructuralDan, StructuralDan,
TenseDan TenseDan,
NamesDan
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -3,6 +3,7 @@
concrete LangDan of Lang = concrete LangDan of Lang =
GrammarDan, GrammarDan,
LexiconDan LexiconDan
,DocumentationDan --# notpresent
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;

2
src/danish/NamesDan.gf Normal file
View File

@@ -0,0 +1,2 @@
concrete NamesDan of Noun = CatDan ** NamesScand with
(ResScand = ResDan) ;

View File

@@ -144,7 +144,6 @@ oper
mkPN : N -> PN ; --% mkPN : N -> PN ; --%
} ; } ;
--2 Adjectives --2 Adjectives
-- The regular pattern works for many adjectives, e.g. those ending -- The regular pattern works for many adjectives, e.g. those ending
@@ -182,6 +181,7 @@ oper
-- Adverbs modifying adjectives and sentences can also be formed. -- Adverbs modifying adjectives and sentences can also be formed.
mkAdA : Str -> AdA ; -- modify adjective, e.g. "meget" mkAdA : Str -> AdA ; -- modify adjective, e.g. "meget"
mkAdN : Str -> AdN ;
--2 Verbs --2 Verbs
@@ -386,6 +386,7 @@ oper
mkAdv x = ss x ** {lock_Adv = <>} ; mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ; mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdA x = ss x ** {lock_AdA = <>} ; mkAdA x = ss x ** {lock_AdA = <>} ;
mkAdN x = ss x ** {lock_AdN = <>} ;
mk6V a b c d e f = mkVerb6 a b c d e f ** mk6V a b c d e f = mkVerb6 a b c d e f **
{part = [] ; vtype = VAct ; lock_V = <> ; isVaere = False} ; {part = [] ; vtype = VAct ; lock_V = <> ; isVaere = False} ;
@@ -491,6 +492,25 @@ oper
mk2PN : Str -> Gender -> PN ; mk2PN : Str -> Gender -> PN ;
nounPN : N -> PN ; nounPN : N -> PN ;
mkLN = overload {
mkLN : Str -> LN = \s -> lin LN (regPN s) ** {n=Sg}; -- default gender utrum
mkLN : Str -> Gender -> LN = \s,g -> lin LN (mk2PN s g) ** {n=Sg} ; -- set other gender
mkLN : Str -> Gender -> Number -> LN = \s,g,n -> lin LN (mk2PN s g) ** {n=n} ; -- set other gender and number
} ;
mkGN = overload {
mkGN : Str -> GN = \s -> lin GN {s = \\c => mkCase c s ; g = Male}; -- default gender utrum
mkGN : Str -> Sex -> GN = \s,g -> lin GN {s = \\c => mkCase c s ; g = g} ; -- set other gender
} ;
mkSN = overload {
mkSN : Str -> SN = \s -> lin SN {s = \\_,c => mkCase c s; pl = \\c => mkCase c s}; -- default gender utrum
mkSN : Str -> Str -> Str -> SN =
\male,female,pl -> lin SN {s = table {Male => \\c => mkCase c male;
Female => \\c => mkCase c female} ;
pl = \\c => mkCase c pl
} ;
} ;
mkA = overload { mkA = overload {
mkA : (fin : Str) -> A = regADeg ; mkA : (fin : Str) -> A = regADeg ;
mkA : (fin,fint : Str) -> A = mk2ADeg ; mkA : (fin,fint : Str) -> A = mk2ADeg ;
@@ -533,4 +553,9 @@ oper
mk2V2 : V -> Prep -> V2 ; mk2V2 : V -> Prep -> V2 ;
dirV2 : V -> V2 ; dirV2 : V -> V2 ;
mkInterj : Str -> Interj
= \s -> lin Interj {s = s} ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ; } ;

View File

@@ -19,6 +19,10 @@ concrete ConjunctionDut of Conjunction =
ConjRS conj ss = conjunctDistrTable2 Gender Number conj ss ; ConjRS conj ss = conjunctDistrTable2 Gender Number conj ss ;
ConjCN conj ss = conjunctDistrTable2 Adjf NForm conj ss ** {
g = Utr
} ;
-- These fun's are generated from the list cat's. -- These fun's are generated from the list cat's.
BaseS = twoTable Order ; BaseS = twoTable Order ;
@@ -31,6 +35,8 @@ concrete ConjunctionDut of Conjunction =
ConsAP xs x = consrTable2 Agr AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ; ConsAP xs x = consrTable2 Agr AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
BaseRS x y = twoTable2 Gender Number x y ** {c = y.c} ; BaseRS x y = twoTable2 Gender Number x y ** {c = y.c} ;
ConsRS xs x = consrTable2 Gender Number comma xs x ; ConsRS xs x = consrTable2 Gender Number comma xs x ;
BaseCN x y = twoTable2 Adjf NForm x y ;
ConsCN xs x = consrTable2 Adjf NForm comma xs x ;
lincat lincat
[S] = {s1,s2 : Order => Str} ; [S] = {s1,s2 : Order => Str} ;
@@ -38,5 +44,6 @@ concrete ConjunctionDut of Conjunction =
[NP] = {s1,s2 : NPCase => Str ; a : Agr} ; [NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
[AP] = {s1,s2 : Agr => AForm => Str ; isPre : Bool} ; [AP] = {s1,s2 : Agr => AForm => Str ; isPre : Bool} ;
[RS] = {s1,s2 : Gender => Number => Str} ; [RS] = {s1,s2 : Gender => Number => Str} ;
[CN] = {s1,s2 : Adjf => NForm => Str} ;
} }

View File

@@ -6,7 +6,8 @@ concrete ExtendDut of Extend =
VPS, VPS,
BaseVPS, ConsVPS, BaseVPS, ConsVPS,
MkVPS, ConjVPS, PredVPS, MkVPS, ConjVPS, PredVPS,
PassVPSlash, PassAgentVPSlash PassVPSlash, PassAgentVPSlash,
CompoundN
] ]
with with
(Grammar = GrammarDut) ** (Grammar = GrammarDut) **
@@ -121,4 +122,9 @@ lin
isPron = False isPron = False
} ; } ;
lin CompoundN n1 n2 = {
s = \\n => n1.s ! NF Sg Nom ++ BIND ++ n2.s ! n ;
g = n2.g
} ;
} }

View File

@@ -86,6 +86,9 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
AdVVP adv vp = insertAdV adv.s vp ; AdVVP adv vp = insertAdV adv.s vp ;
AdvVPSlash vp adv = vp ** {a2 = vp.a2 ++ adv.s; isHeavy=True} ;
AdVVPSlash adv vp = vp ** {a1 = \\a => adv.s ++ vp.a1 ! a} ;
ReflVP vp = insertObj (\\a => appPrep vp.c2.p1 ReflVP vp = insertObj (\\a => appPrep vp.c2.p1
(npLite (\\_ => reflPron ! a)) (npLite (\\_ => reflPron ! a))
) vp ; ) vp ;

View File

@@ -104,7 +104,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
linref linref
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ; SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ; ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ;
NP = \np -> np.s ! NPAcc ; ----NPSep ; NP = \np -> np.s ! NPCase Nom ; ----NPSep ;
CN = cnRef ; CN = cnRef ;
VP = vpRef ; VP = vpRef ;

View File

@@ -5,7 +5,7 @@ concrete ExtendFin of Extend =
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS, VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
,ExistCN, ExistMassCN, ICompAP, ByVP ,ExistCN, ExistMassCN, ICompAP, ByVP
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash ,CompoundN, GenNP, GenIP, GenRP, AdvIsNP, EmbedSSlash
,PassVPSlash, PassAgentVPSlash ,PassVPSlash, PassAgentVPSlash
,CardCNCard ,CardCNCard
,UttAccNP ,UttAccNP
@@ -191,6 +191,15 @@ lin
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ; GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
GenRP num cn = {
s = \\n,c =>
let k = npform2case num.n c
in relPron ! n ! Gen ++ linCN (NCase num.n k) cn ;
--- a = RNoAg
a = RAg (agrP3 num.n)
} ;
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ? 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)) ; AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;

View File

@@ -61,8 +61,10 @@ concrete IdiomFin of Idiom = CatFin **
ImpP3 np vp = ImpP3 np vp =
let vps = (sverb2verbSep vp.s).s ! ImperP3 (verbAgr np.a).n let vps = (sverb2verbSep vp.s).s ! ImperP3 (verbAgr np.a).n
in in
{s = np.s ! subjcase2npform vp.s.sc ++ vps ++ {s = vps ++
vp.s2 ! True ! Pos ! np.a ++ vp.adv ! Pos ++ vp.ext np.s ! subjcase2npform vp.s.sc ++
vp.s2 ! True ! Pos ! np.a ++
vp.adv ! Pos ++ vp.ext
} ; } ;
SelfAdvVP vp = insertAdv (\\_ => "itse") vp ; SelfAdvVP vp = insertAdv (\\_ => "itse") vp ;

View File

@@ -330,8 +330,8 @@ instance DiffFre of DiffRomance - [
<_, _, True> => <_, _, True> =>
neg.p1 ++ clit ++ fin ++ bindHyphen ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ; neg.p1 ++ clit ++ fin ++ bindHyphen ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ;
-- est loin la ville -- est Paris loin
_ => neg.p1 ++ clit ++ fin ++ neg.p2 ++ inf ++ compl ++ subj ++ ext _ => neg.p1 ++ clit ++ fin ++ neg.p2 ++ subj ++ inf ++ compl ++ ext
} ; } ;
bindHyphensT : Str = bindHyphen ++ "t" ++ bindHyphen ; bindHyphensT : Str = bindHyphen ++ "t" ++ bindHyphen ;

View File

@@ -4,8 +4,10 @@ concrete ExtendFre of Extend =
CatFre ** ExtendFunctor - CatFre ** ExtendFunctor -
[ [
---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron, ---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron,
GenRP,
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP, ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
PassVPSlash, PassAgentVPSlash, ApposNP, CompoundN PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP, ApposNP, CompoundN,
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP
] -- put the names of your own definitions here ] -- put the names of your own definitions here
with with
(Grammar = GrammarFre) ** (Grammar = GrammarFre) **
@@ -23,6 +25,16 @@ lincat
RNP = {s : Agr => Case => Str} ; RNP = {s : Agr => Case => Str} ;
lin lin
GenRP nu cn = {
s = \\_b,_aagr,_c => "dont" ++ num ++ artDef False g n Nom ++ cn.s ! n ;
a = aagr g n ;
hasAgr = True
} where {
g = cn.g ;
n = nu.n ;
num = if_then_Str nu.isNum (nu.s ! g) []
} ;
ExistCN cn = ExistCN cn =
let let
pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
@@ -46,6 +58,9 @@ lin PassVPSlash vps = passVPSlash vps [] ;
PassAgentVPSlash vps np = passVPSlash PassAgentVPSlash vps np = passVPSlash
vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ; 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) ;
ReflRNP v rnp = -- VPSlash -> RNP -> VP ; -- love my family and myself ReflRNP v rnp = -- VPSlash -> RNP -> VP ; -- love my family and myself
case v.c2.isDir of { case v.c2.isDir of {
True => insertRefl v ; True => insertRefl v ;
@@ -67,6 +82,13 @@ oper
comp = \\a => (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ vps.comp ! a ++ agent ; comp = \\a => (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ vps.comp ! a ++ agent ;
} ; } ;
pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP {
s = \\af => vps.s.s ! VPart (aform2gender af) (aform2number af) ++ vps.comp ! (aform2aagr af ** {p = P3}) ++ agent ;
isPre = False ;
copTyp = serCopula
} ;
lin ApposNP np1 np2 = np1 ** { -- guessed by KA lin ApposNP np1 np2 = np1 ** { -- guessed by KA
s = \\c => np1.s ! c ** {ton =(np1.s ! c).ton ++ "," ++ (np2.s ! Nom).ton; s = \\c => np1.s ! c ** {ton =(np1.s ! c).ton ++ "," ++ (np2.s ! Nom).ton;
comp =(np1.s ! c).comp ++ "," ++ (np2.s ! Nom).comp comp =(np1.s ! c).comp ++ "," ++ (np2.s ! Nom).comp
@@ -112,4 +134,35 @@ lin UseDAP = \dap ->
hasClit = False hasClit = False
} ; } ;
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 ;
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 ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
ExistsNP np =
mkClause "il" True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV (mkV "exister"))) ;
} }

View File

@@ -3,6 +3,7 @@
concrete LangFre of Lang = concrete LangFre of Lang =
GrammarFre, GrammarFre,
LexiconFre LexiconFre
,MarkupFre - [stringMark]
,DocumentationFre --# notpresent ,DocumentationFre --# notpresent
,ConstructionFre ,ConstructionFre
** { ** {

View File

@@ -44,6 +44,11 @@ oper
spn = \\c => prepCase c ++ s ; spn = \\c => prepCase c ++ s ;
n = Sg ; s2 = \\g => [] ; isNeg = False n = Sg ; s2 = \\g => [] ; isNeg = False
} ; } ;
mkDet : Str -> Number -> Det = \s, n -> lin Det {
s,sp = \\_,c => prepCase c ++ s ;
spn = \\c => prepCase c ++ s ;
n = n ; s2 = \\g => [] ; isNeg = False
} ;
mkDet : Str -> Str -> Number -> Det = \m,f,n -> lin Det { mkDet : Str -> Str -> Number -> Det = \m,f,n -> lin Det {
s,sp = \\g,c => prepCase c ++ case g of {Masc => m ; Fem => f} ; s,sp = \\g,c => prepCase c ++ case g of {Masc => m ; Fem => f} ;
spn = \\c => prepCase c ++ m ; spn = \\c => prepCase c ++ m ;

View File

@@ -16,7 +16,7 @@ concrete AdverbGer of Adverb = CatGer ** open ResGer, Prelude in {
PositAdAAdj a = {s = a.s ! Posit ! APred} ; PositAdAAdj a = {s = a.s ! Posit ! APred} ;
SubjS subj s = {s = subj.s ++ s.s ! Sub} ; SubjS subj s = {s = {- Predef.BIND ++ "," ++ -} subj.s ++ s.s ! Sub} ; --- comma needed in some uses
AdnCAdv cadv = {s = cadv.s ++ conjThan} ; AdnCAdv cadv = {s = cadv.s ++ conjThan} ;

View File

@@ -3,7 +3,7 @@
concrete ExtendGer of Extend = concrete ExtendGer of Extend =
CatGer ** ExtendFunctor CatGer ** ExtendFunctor
- [ -- remove the default implementations of: - [ -- remove the default implementations of:
GenNP, EmptyRelSlash, GenNP, GenRP, EmptyRelSlash,
VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ICompAP, IAdvAdv, CompIQuant, PrepCN, ICompAP, IAdvAdv, CompIQuant, PrepCN,
@@ -36,6 +36,13 @@ concrete ExtendGer of Extend =
delCardOne = False delCardOne = False
} ; } ;
GenRP nu cn = {
s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Weak ! nu.n ! c ;
a = RAg nu.n P3
} ;
EmptyRelSlash slash = { EmptyRelSlash slash = {
s = \\m,t,a,p,gn => s = \\m,t,a,p,gn =>
appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ;
@@ -46,15 +53,50 @@ concrete ExtendGer of Extend =
lincat lincat
VPI = {s : Bool => Str} ; VPI = {s : Bool => Str} ;
[VPI] = {s1,s2 : Bool => Str} ; [VPI] = {s1,s2 : Bool => Str} ;
VPS = {s : Order => Agr => Str} ; VPS = {s : Order => Agr => {verb, compl : Str}} ;
[VPS] = {s1,s2 : Order => Agr => Str} ; [VPS] = {s : Order => Agr => {s1, s2, s3 : Str}} ; -- liebe, (ich) dich, (und) bin glücklich
lin lin
BaseVPI = twoTable Bool ; BaseVPI = twoTable Bool ;
ConsVPI = consrTable Bool comma ; ConsVPI = consrTable Bool comma ;
BaseVPS = twoTable2 Order Agr ; BaseVPS v w = {
ConsVPS = consrTable2 Order Agr comma ; s = \\ord, agr =>
let
vs = v.s ! ord ! agr ;
ws = w.s ! ord ! agr ;
in {
s1 = vs.verb ;
s2 = vs.compl ;
s3 = case ord of {
Sub => ws.compl ++ ws.verb ;
_ => ws.verb ++ ws.compl
}
}
} ;
ConsVPS v vv = {
s = \\ord, agr =>
let
vs = v.s ! ord ! agr ;
vvs = vv.s ! ord ! agr ;
in {
s1 = vs.verb ;
s2 = vs.compl ++ comma ++ vvs.s1 ++ vvs.s2 ;
s3 = vvs.s3
}
} ;
ConjVPS conj vv = {
s = \\ord, agr =>
let
vvs = vv.s ! ord ! agr
in {
verb = vvs.s1 ;
compl = conj.s1 ++ vvs.s2 ++ conj.s2 ++ vvs.s3
}
} ;
MkVPS tm p vp = MkVPS tm p vp =
let vps = useVP vp in { let vps = useVP vp in {
@@ -105,26 +147,29 @@ concrete ExtendGer of Extend =
} ; } ;
extra = vp.inf.extr!agr ++ vp.ext ; extra = vp.inf.extr!agr ++ vp.ext ;
in in
--- AR 22/7/2024 as the subject comes to a wrong place in PredVPS Inv
{verb = verb.fin ; compl = compl ++ infCompl ++ pred.inf ++ extra}
{-
case o of { case o of {
Main => subj ++ verb.fin ++ compl ++ infCompl ++ pred.inf ++ extra ; Main => verb.fin ++ compl ++ infCompl ++ pred.inf ++ extra ;
Inv => verb.fin ++ subj ++ compl ++ infCompl ++ pred.inf ++ extra ; Inv => verb.fin ++ subj ++ compl ++ infCompl ++ pred.inf ++ extra ;
Subj => subj ++ compl ++ pred.infComplfin ++ extra Subj => subj ++ compl ++ pred.infComplfin ++ extra
} }
-}
} ; } ;
ConjVPS = conjunctDistrTable2 Order Agr ;
PredVPS np vpi = PredVPS np vps =
let let
subj = np.s ! False ! Nom ++ bigNP np ; subj = np.s ! False ! Nom ++ bigNP np ;
agr = np.a ; agr = np.a ;
in { in {
s = \\o => s = \\o =>
let verb = vpi.s ! o ! agr let verb = vps.s ! o ! agr
in case o of { in case o of {
Main => subj ++ verb ; Main => subj ++ verb.verb ++ verb.compl ;
Inv => verb ++ subj ; ---- älskar henne och sover jag Inv => verb.verb ++ subj ++ verb.compl ; -- älskar jag henne och sover
Sub => subj ++ verb Sub => subj ++ verb.compl ++ verb.verb --- not quite correct in ConjVPS
} }
} ; } ;

View File

@@ -36,4 +36,12 @@ oper
sp = \\gn,c => q.s ! False ! gn ! c + a.s ! Posit ! agrAdj q.a gn c sp = \\gn,c => q.s ! False ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
} ; } ;
mkStrongDet : Str -> Number -> Det = \adj, n -> lin Det {
s,sp = \\_,g,c => adj + adjEnding ! (gennum g Pl) ! c ;
n = n ; a = Strong ; isDef = False ; hasDefArt = False} ;
mkWeakDet : Str -> Number -> Det = \adj, n -> lin Det {
s,sp = \\_,g,c => adj + adjEnding ! (gennum g Pl) ! c ;
n = n ; a = Weak ; isDef = False ; hasDefArt = False} ;
} }

View File

@@ -40,29 +40,82 @@ lin
e.s ! DUnit ! invNum ++ BIND ++ "und" ++ BIND ++ d.s ! DTen ! g; n = Pl} ; e.s ! DUnit ! invNum ++ BIND ++ "und" ++ BIND ++ d.s ! DTen ! g; n = Pl} ;
pot1as2 n = n ; pot1as2 n = n ;
-- HL 15.3.2025 added:
-- pot21, pot31, pot41, pot4, pot4plus, pot51, pot5, pot5plus, pot5decimal
-- and opers oneCardOrd, cardOrdNum, toFem
-- changed: multiple to get pot21 = hundert (Eng: a hundred, Swe: hundra)
-- versus pot2 pot01 = einhundert (Eng: one hundred, Swe: etthundra)
-- likewise for [ein]tausend, [eine] Million, Milliarde
-- Q: add BIND or "und" in pot4plus, pot5plus ?
pot21 = {s = \\g => cardOrd "hundert" "hundertste" ! g ; n = Pl} ;
pot2 d = {s = \\g => pot2 d = {s = \\g =>
multiple (d.s ! DUnit) d.n ++ cardOrd "hundert" "hundertste" ! g ; n = Pl} ; multiple (d.s ! DUnit) d.n ++ cardOrd "hundert" "hundertste" ! g ; n = Pl} ;
pot2plus d e = {s = \\g => pot2plus d e = {s = \\g =>
multiple (d.s ! DUnit) d.n ++ "hundert" ++ BIND ++ e.s ! g ; n = Pl} ; multiple (d.s ! DUnit) d.n ++ "hundert" ++ BIND ++ e.s ! g ; n = Pl} ;
pot2as3 n = n ; pot2as3 n = n ;
pot31 = {s = \\g => cardOrd "tausend" "tausendste" ! g ; n = Pl} ;
pot3 n = {s = \\g => pot3 n = {s = \\g =>
multiple n.s n.n ++ cardOrd "tausend" "tausendste" ! g ; n = Pl} ; multiple n.s n.n ++ cardOrd "tausend" "tausendste" ! g ; n = Pl} ;
pot3plus n m = {s = \\g => pot3plus n m = {s = \\g =>
multiple n.s n.n ++ "tausend" ++ m.s ! g ; n = Pl} ; multiple n.s n.n ++ "tausend" ++ m.s ! g ; n = Pl} ;
pot3as4 n = n ; pot3as4 n = n ;
pot3decimal d = {s = \\g => pot3decimal d = {s = \\g =>
d.s ! invNum ++ cardOrd "tausend" "tausendste" ! g ; n = Pl} ; d.s ! invNum ++ cardOrd "Tausend" "tausendste" ! g ; n = Pl} ;
pot41 = {s = \\g => oneCardOrd "Million" "millionste" ! g ; n = Pl} ;
pot4 n = let tab = cardOrdNum n.n "Million" "millionste" in {
s = table{
NCard af => n.s ! (NCard (toFem af)) ++ tab ! (NCard af) ;
NOrd af => n.s ! (NCard APred) ++ BIND ++ tab ! (NOrd af)
} ;
n = Pl} ;
pot4plus n m = let tab = cardOrdNum n.n "million" "millionste" in {
s = table{
NCard af => n.s ! (NCard (toFem af)) ++ BIND ++ tab ! (NCard af) ++ m.s ! NCard af ;
NOrd af => n.s ! (NCard (toFem APred)) ++ BIND ++ tab ! (NCard (toFem af)) ++ m.s ! NOrd af
} ;
n = Pl} ;
pot4as5 n = n ; pot4as5 n = n ;
pot4decimal d = {s = \\g => pot4decimal d = {s = \\g =>
d.s ! invNum ++ cardOrd "Millionen" "Millionste" ! g ; n = Pl} ; -- * 1 Million d.s ! invNum ++ cardOrdNum d.n "Million" "-millionste" ! g ; n = Pl} ;
pot51 = {s = \\g => "einer Milliarde"; n = Pl} ; -- KA: case inflection missing pot51 = {s = \\g => oneCardOrd "Milliarde" "milliardste" ! g ; n = Pl} ;
pot5 n = let tab = cardOrdNum n.n "Milliarde" "milliardste" in {
s = table{
NCard af => n.s ! (NCard (toFem af)) ++ tab ! (NCard af) ;
NOrd af => n.s ! (NCard APred) ++ BIND ++ tab ! (NOrd af)
} ;
n = Pl} ;
pot5plus n m = let tab = cardOrdNum n.n "milliarde" "milliardste" in {
s = table{
NCard af => n.s ! (NCard (toFem af)) ++ BIND ++ tab ! (NCard af) ++ "und" ++ m.s ! NCard af ;
NOrd af => n.s ! (NCard (toFem APred)) ++ BIND ++ tab ! (NCard (toFem af)) ++ m.s ! NOrd af
} ;
n = Pl} ;
pot5decimal d = {s = \\g =>
d.s ! invNum ++ cardOrdNum d.n "Milliarde" "-milliardste" ! g ; n = Pl} ;
oper oper
multiple : (CardOrd => Str) -> Number -> Str = \d,n -> multiple : (CardOrd => Str) -> Number -> Str = \d,n ->
case n of {Sg => [] ; _ => d ! invNum ++ BIND} ; -- case n of {Sg => [] ; _ => d ! invNum ++ BIND} ;
d ! invNum ++ BIND ; -- HL
oneCardOrd : Str -> Str -> CardOrd => Str =
\million,millionste -> table {
NCard (AMod (GSg _) c) => "ein" + pronEnding ! (GSg Fem) ! c ++ million ;
NCard (AMod GPl _) => pluralN million ;
NCard APred => "ein" + pronEnding ! (GSg Fem) ! Nom ++ million ;
NOrd a => (regA (init millionste)).s ! Posit ! a
} ;
cardOrdNum : Number -> Str -> Str -> CardOrd => Str = \n,drei,dritte ->
case n of {Sg => cardOrd drei dritte ; _ => cardOrd (pluralN drei) dritte} ;
toFem : AForm -> AForm = \af -> case af of {
AMod _ c => AMod (GSg Fem) c ;
APred => AMod (GSg Fem) Nom} ;
-------------------- --------------------
@@ -81,15 +134,15 @@ oper
-- 101ter,...,119ter,120ster,... , 200ster -- 101ter,...,119ter,120ster,... , 200ster
IIDig d i = IIDig d i =
let isPld : Bool = case d.n of {Sg => False ; _ => True} ; let isPld : Bool = case d.n of {Sg => False ; _ => True} ;
i = lin Digits i ; -- suppress warning missing lock_Digits
b : Bool = case i.isDig of {True => isPld ; _ => notB i.tail1to19} ; b : Bool = case i.isDig of {True => isPld ; _ => notB i.tail1to19} ;
i' : Digits = case b of {True => IDig (mkDig (i.s ! invNum ++ BIND ++ "s")) ; i' : Digits = case b of {True => IDig (mkDig (i.s ! invNum ++ BIND ++ "s")) ;
_ => i } _ => i}
in {s = table {NCard af => d.s ! invNum ++ BIND ++ i.s ! NCard af ; in {s = table {NCard af => d.s ! invNum ++ BIND ++ i.s ! NCard af ;
NOrd af => d.s ! invNum ++ BIND ++ i'.s ! NOrd af} ; NOrd af => d.s ! invNum ++ BIND ++ i'.s ! NOrd af} ;
n = Pl ; n = Pl ;
isDig = False ; isDig = False ;
tail1to19 = case i.isDig of {True => notB isPld ; False => i.tail1to19} ; tail1to19 = case i.isDig of {True => notB isPld ; False => i.tail1to19} ;
lock_Digits = <>
} ; } ;
D_0 = mkDig "0" ** {isZero = True} ; D_0 = mkDig "0" ** {isZero = True} ;
@@ -123,7 +176,7 @@ oper
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> { mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
s = table {NCard _ => c ; -- 0,...,9 s = table {NCard _ => c ; -- 0,...,9
NOrd af => (regA o).s ! Posit ! af} ; -- (ein) 0ter .. 9ter | (der) 0te ... 9te NOrd af => (regA o).s ! Posit ! af} ; -- (ein) 0ter .. 9ter | (der) 0te ... 9te
n = n ; -- NOrd APred: "0",... or "am 0ten",... ? n = n ; -- NOrd APred: "0t"
isZero = False isZero = False
} ; } ;

View File

@@ -4,8 +4,8 @@ concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in {
lin lin
RelCl cl = { RelCl cl = { --- no comma before derart
s = \\m,t,a,b,_ => "derart" ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ; s = \\m,t,a,b,_ => "derart" ++ Predef.BIND ++ "," ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ;
c = Nom c = Nom
} ; } ;

View File

@@ -109,7 +109,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
UseCopula = predV sein_V ; UseCopula = predV sein_V ;
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ; CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.s2 ! Nom ++ ap.ext} ;
CompNP np = {s = \\_ => np.s ! False ! Nom ++ np.rc ; ext = np.ext} ; CompNP np = {s = \\_ => np.s ! False ! Nom ++ np.rc ; ext = np.ext} ;
CompAdv a = {s = \\_ => a.s ; ext = []} ; CompAdv a = {s = \\_ => a.s ; ext = []} ;

View File

@@ -92,7 +92,6 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in {
A2 = {s :Degree => Gender => Number => Case => Str ; adv : Degree => Str ;c2 : Compl } ; A2 = {s :Degree => Gender => Number => Case => Str ; adv : Degree => Str ;c2 : Compl } ;
N = Noun; N = Noun;
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Compl} ; N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Compl} ;
@@ -101,4 +100,6 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in {
PN = PName ; PN = PName ;
LN, GN, SN = {s : Str} ;
} }

View File

@@ -0,0 +1,124 @@
--# -path=.:../abstract:../common
concrete DocumentationGre of Documentation = CatGre ** open
ResGre, HTML, Prelude
in {
lincat
Inflection = {t : Str; s1,s2 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
lin
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "ο" ;
s1 = heading1 "Ουσιαστικό" ;
s2 = inflNoun noun.s
} ;
InflectionPN = \pn -> {
t = "ό" ;
s1 = heading1 "Όνομα" ;
s2 = inflNoun pn.s
} ;
InflectionLN ln = {
t = "ό" ;
s1 = heading1 "Όνομα" ;
s2 = paragraph ln.s
} ;
InflectionGN gn = {
t = "ό" ;
s1 = heading1 "Όνομα" ;
s2 = paragraph gn.s
} ;
InflectionSN sn = {
t = "ό" ;
s1 = heading1 "Όνομα" ;
s2 = paragraph sn.s
} ;
InflectionA, InflectionA2 = \adj -> {
t = "ε" ;
s1 = heading1 "Επίθετο" ;
s2 = inflAdj (adj.s ! Posit) ++
inflAdj (adj.s ! Compar) ++
inflAdj (adj.s ! Superl)
} ;
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
t = "επίρ" ;
s1 = heading1 "Επίρρημα" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "πρ" ;
s1 = heading1 "Πρόθεση" ;
s2 = paragraph p.s
} ;
InflectionV,InflectionV2,InflectionV3,InflectionV2V,InflectionV2S,InflectionV2Q,InflectionV2A,InflectionVV,InflectionVS,InflectionVQ,InflectionVA = \v -> {
t = "ρ" ;
s1 = heading1 "ρήμα" ;
s2 = inflVerb v.s
} ;
oper
inflNoun : (Number => Case => Str) -> Str = \n ->
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "ονομαστική" ++ td (n ! Sg ! Nom) ++ td (n ! Pl ! Nom)) ++
tr (th "γενική" ++ td (n ! Sg ! Gen) ++ td (n ! Pl ! Gen)) ++
tr (th "αιτιατική" ++ td (n ! Sg ! Acc) ++ td (n ! Pl ! Acc)) ++
tr (th "κλητική" ++ td (n ! Sg ! Vocative) ++ td (n ! Pl ! Vocative))
) ;
inflAdj : (Gender => Number => Case => Str) -> Str = \n ->
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "ονομαστική" ++ td (n ! Masc ! Sg ! Nom) ++ td (n ! Masc ! Pl ! Nom) ++ td (n ! Fem ! Sg ! Nom) ++ td (n ! Fem ! Pl ! Nom) ++ td (n ! Neut ! Sg ! Nom) ++ td (n ! Neut ! Pl ! Nom)) ++
tr (th "γενική" ++ td (n ! Masc ! Sg ! Gen) ++ td (n ! Masc ! Pl ! Gen) ++ td (n ! Fem ! Sg ! Gen) ++ td (n ! Fem ! Pl ! Gen) ++ td (n ! Neut ! Sg ! Gen) ++ td (n ! Neut ! Pl ! Gen)) ++
tr (th "αιτιατική" ++ td (n ! Masc ! Sg ! Acc) ++ td (n ! Masc ! Pl ! Acc) ++ td (n ! Fem ! Sg ! Acc) ++ td (n ! Fem ! Pl ! Acc) ++ td (n ! Neut ! Sg ! Acc) ++ td (n ! Neut ! Pl ! Acc)) ++
tr (th "κλητική" ++ td (n ! Masc ! Sg ! Vocative) ++ td (n ! Masc ! Pl ! Vocative) ++ td (n ! Fem ! Sg ! Vocative) ++ td (n ! Fem ! Pl ! Vocative) ++ td (n ! Neut ! Sg ! Vocative) ++ td (n ! Neut ! Pl ! Vocative))
) ;
inflVerb : (VForm => Str) -> Str = \v -> v ! VPres Ind Sg P1 Active Imperf {-
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Imperf) ++ td (v ! VPres Ind Pl P1 Active Imperf)) ++
tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Imperf) ++ td (v ! VPres Ind Pl P2 Active Imperf)) ++
tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Imperf) ++ td (v ! VPres Ind Pl P3 Active Imperf))
) ++
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Imperf) ++ td (v ! VPast Ind Pl P1 Active Imperf)) ++
tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Imperf) ++ td (v ! VPast Ind Pl P2 Active Imperf)) ++
tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Imperf) ++ td (v ! VPast Ind Pl P3 Active Imperf))
) ++
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Perf) ++ td (v ! VPres Ind Pl P1 Active Perf)) ++
tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Perf) ++ td (v ! VPres Ind Pl P2 Active Perf)) ++
tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Perf) ++ td (v ! VPres Ind Pl P3 Active Perf))
) ++
frameTable (
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Perf) ++ td (v ! VPast Ind Pl P1 Active Perf)) ++
tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Perf) ++ td (v ! VPast Ind Pl P2 Active Perf)) ++
tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Perf) ++ td (v ! VPast Ind Pl P3 Active Perf))
) -} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Παράδειγμα: </b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Παράδειγμα: </b>"++t.s++d.s++"</p><p>"++e.s++"</p>"};
lin
MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss (i.t) ;
}

View File

@@ -1,4 +1,5 @@
concrete LangGre of Lang = concrete LangGre of Lang =
GrammarGre, GrammarGre,
LexiconGre LexiconGre
, DocumentationGre --# notpresent
; ;

View File

@@ -72,6 +72,11 @@ oper
= \ nm,gm,am,vm,pn,pa, g -> lin PN (mkName nm gm am vm pn pa g) ; = \ nm,gm,am,vm,pn,pa, g -> lin PN (mkName nm gm am vm pn pa g) ;
} ; } ;
mkLN = overload {
mkLN : Str -> LN
= \s -> lin LN {s=s} ;
} ;
makeNP = overload { makeNP = overload {
makeNP : (_,_,_: Str) -> Number -> Gender -> NP = mkpanta; makeNP : (_,_,_: Str) -> Number -> Gender -> NP = mkpanta;
makeNP : Str -> Number -> Gender ->Bool -> NP = mkkati makeNP : Str -> Number -> Gender ->Bool -> NP = mkkati
@@ -310,7 +315,13 @@ oper
mkGN : Str -> GN = \s -> lin GN {s = s} ;
mkSN : Str -> SN = \s -> lin SN {s = s} ;
mkAdv : Str -> Adv = \s -> lin Adv {s = s} ;
mkAdV : Str -> AdV = \s -> lin AdV {s = s} ;
mkAdA : Str -> AdA = \s -> lin AdA {s = s} ;
mkAdN : Str -> AdN = \s -> lin AdN {s = s} ;
mkInterj : Str -> Interj = \s -> lin Interj {s = s} ;
mkVoc : Str -> Voc = \s -> lin Voc {s = s} ;
}
}

View File

@@ -375,7 +375,8 @@ resource ResGre = ParamX ** open Prelude in {
Fros + "ω" => mkName Giannis (Fros + "ως") (Fros + "ω") (Fros + "ω") ("") ("")Fem ; Fros + "ω" => mkName Giannis (Fros + "ως") (Fros + "ω") (Fros + "ω") ("") ("")Fem ;
Mirt + "ώ" => mkName Giannis (Mirt + "ώς") (Mirt + "ώ") (Mirt + "ώ") ("")("")Fem ; Mirt + "ώ" => mkName Giannis (Mirt + "ώς") (Mirt + "ώ") (Mirt + "ώ") ("")("")Fem ;
Londin + "ο" => mkName Giannis (Londin + "ου") (Londin + "ο") (Londin + "ο") (Londin + "α") (Londin + "ων") Neut ; Londin + "ο" => mkName Giannis (Londin + "ου") (Londin + "ο") (Londin + "ο") (Londin + "α") (Londin + "ων") Neut ;
Paris + "ι" => mkName Giannis (mkStemNouns Paris + "ιού") (Paris + "ι") (Paris + "ι")(Paris + "ια") (mkStemNouns Paris + "ιών") Neut Paris + "ι" => mkName Giannis (mkStemNouns Paris + "ιού") (Paris + "ι") (Paris + "ι")(Paris + "ια") (mkStemNouns Paris + "ιών") Neut ;
x => mkName x x x x x x Neut ---- AR 2025-02-13 guess
}; };
@@ -1379,7 +1380,7 @@ resource ResGre = ParamX ** open Prelude in {
-----Pattern for the final -ν in the Feminine Accusative of the definite article---------- -----Pattern for the final -ν in the Feminine Accusative of the definite article----------
FemAccFinalN : pattern Str = #("ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" ); FemAccFinalN : pattern Str = #("Α" | "Τ" | "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" );
@@ -1405,8 +1406,10 @@ resource ResGre = ParamX ** open Prelude in {
<Masc | Change,Sg,CPrep P_se > => "στον" ; <Masc | Change,Sg,CPrep P_se > => "στον" ;
<Fem, Sg, Nom> => "η" ; <Fem, Sg, Nom> => "η" ;
<Fem, Sg, Gen|CPrep P_Dat> => "της" ; <Fem, Sg, Gen|CPrep P_Dat> => "της" ;
<Fem, Sg, Acc |CPrep PNul> => pre { "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" => "την" ; _=> "τη"} ; <Fem, Sg, Acc |CPrep PNul> =>
<Fem, Sg, CPrep P_se > => pre { "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" => "στην" ; _=> "στη"} ; pre {#FemAccFinalN => "την" ; _=> "τη"} ;
<Fem, Sg, CPrep P_se > =>
pre {#FemAccFinalN => "στην" ; _=> "στη"} ;
<Neut, Sg, Nom | Acc |CPrep PNul> => prepCase c++ "το" ; <Neut, Sg, Nom | Acc |CPrep PNul> => prepCase c++ "το" ;
<Neut, Sg, Gen|CPrep P_Dat> => "του" ; <Neut, Sg, Gen|CPrep P_Dat> => "του" ;
<Neut, Sg, CPrep P_se > => "στο" ; <Neut, Sg, CPrep P_se > => "στο" ;

View File

@@ -2,5 +2,5 @@
concrete AllHin of AllHinAbs = concrete AllHin of AllHinAbs =
LangHin, LangHin,
ExtraHin ExtendHin
** {} ; ** open ExtraHin in {} ;

View File

@@ -1,4 +1,4 @@
abstract AllHinAbs = abstract AllHinAbs =
Lang, Lang,
ExtraHinAbs Extend
** {} ; ** {} ;

11
src/hindi/ExtendHin.gf Normal file
View File

@@ -0,0 +1,11 @@
--# -path=.:../common:../abstract
concrete ExtendHin of Extend =
CatHin ** ExtendFunctor -
[
ComplDirectVQ, ComplDirectVS
]
with
(Grammar = GrammarHin) ** {
}

View File

@@ -7,7 +7,8 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
lincat lincat
Digit = {s : DForm => CardOrd => Str} ; Digit = {s : DForm => CardOrd => Str} ;
Sub10 = {s : DForm => CardOrd => Str ; size : Size} ; Sub10 = {s : DForm => CardOrd => Str ; size : Size} ;
Sub100, Sub1000, Sub1000000 = {s : CardOrd => Str ; size : Size} ; Sub100, Sub1000, Sub1000000, Sub1000000000, Sub1000000000000 =
{s : CardOrd => Str ; size : Size} ;
lin lin
num x = { num x = {
@@ -117,6 +118,9 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
} ; } ;
size = pl size = pl
} ; } ;
pot3as4 n = n ;
pot4as5 n = n ;
oper oper

View File

@@ -256,6 +256,10 @@ resource ParadigmsIce = open
} ; } ;
oper mkLN : Str -> LN = \s -> lin LN {s=s} ;
oper mkGN : Str -> GN = \s -> lin GN {s=s} ;
oper mkSN : Str -> SN = \s -> lin SN {s=s} ;
mkN2 : N -> Preposition -> N2 = \n,prep -> lin N2 (n ** {c2 = prep}) ; mkN2 : N -> Preposition -> N2 = \n,prep -> lin N2 (n ** {c2 = prep}) ;
mkN3 : N -> (_,_ : Preposition) -> N3 = \n,c2,c3 -> lin N3 (n ** {c2 = c2; c3 = c3}) ; mkN3 : N -> (_,_ : Preposition) -> N3 = \n,c2,c3 -> lin N3 (n ** {c2 = c2; c3 = c3}) ;
@@ -442,6 +446,8 @@ resource ParadigmsIce = open
sgNeutNom sgNeutAcc sgNeutDat sgNeutGen plMascNom plMascAcc plMascDat plMascGen sgNeutNom sgNeutAcc sgNeutDat sgNeutGen plMascNom plMascAcc plMascDat plMascGen
plFemNom plFemAcc plFemDat plFemGen plNeutNom plNeutAcc plNeutDat plNeutGen plFemNom plFemAcc plFemDat plFemGen plNeutNom plNeutAcc plNeutDat plNeutGen
weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ; weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ;
mkV : V -> Str -> V = \v,part -> v ;
}; };
depV : V -> V = \verb -> lin V (deponentVerb verb) ; depV : V -> V = \verb -> lin V (deponentVerb verb) ;
@@ -461,6 +467,18 @@ resource ParadigmsIce = open
mk5V : (_,_,_,_,_ : Str) -> V = \telja,tel,taldi,talinn,talið -> mk5V : (_,_,_,_,_ : Str) -> V = \telja,tel,taldi,talinn,talið ->
lin V (vForms2Verb telja (indsub3 telja tel taldi) (impSg taldi) (impPl telja) (presPart telja) talið (weakPP talinn) (strongPP talinn)) ; lin V (vForms2Verb telja (indsub3 telja tel taldi) (impSg taldi) (impPl telja) (presPart telja) talið (weakPP talinn) (strongPP talinn)) ;
oper mkVQ : V -> VQ = \v -> lin VQ v ;
oper mkVV : V -> VV = \v -> lin VV (v ** {c2 = mkPrep "" accusative}) ;
oper mkVS : V -> VS = \v -> lin VS v ;
oper mkVA : V -> VA = \v -> lin VA v ;
oper mkV2V : V -> V2V = \v -> lin V2V (v ** {c2 = mkPrep "" accusative; c3 = mkPrep "" accusative}) ;
oper mkV2S : V -> V2S = \v -> lin V2S (v ** {c2 = mkPrep "" accusative}) ;
oper mkV2A : V -> V2A = \v -> lin V2A (v ** {c2 = mkPrep "" accusative}) ;
oper reflV : V -> V = \v -> v;
indsub1 : Str -> MForms = \inf -> case inf of { indsub1 : Str -> MForms = \inf -> case inf of {
stem@(front + "e" + c) + "ja" => cTelja inf stem (ðiditi (front + "a" + c)) ; stem@(front + "e" + c) + "ja" => cTelja inf stem (ðiditi (front + "a" + c)) ;
stem@(front + "y" + c) + "ja" => cTelja inf stem (ðiditi (front + "u" + c)) ; stem@(front + "y" + c) + "ja" => cTelja inf stem (ðiditi (front + "u" + c)) ;
@@ -807,7 +825,10 @@ resource ParadigmsIce = open
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ; mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
mkAdN : CAdv -> AdN = \cadv -> lin AdN {s = cadv.s ++ cadv.p } ; mkAdN = overload {
mkAdN : Str -> AdN = \s -> lin AdN {s = s} ;
mkAdN : CAdv -> AdN = \cadv -> lin AdN {s = cadv.s ++ cadv.p }
} ;
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ; mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
@@ -826,4 +847,8 @@ resource ParadigmsIce = open
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n -> mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
lin Conj (sd2 x y ** {n = n}) ; lin Conj (sd2 x y ** {n = n}) ;
mkInterj : Str -> Interj = \s -> lin Interj {s=s} ;
mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
} ; } ;

View File

@@ -1,3 +1,3 @@
--# -path=.:../abstract:../common:../prelude --# -path=.:../abstract:../common:../prelude
concrete AllIna of AllInaAbs = LangIna ; concrete AllIna of AllInaAbs = LangIna, ExtendIna ;

View File

@@ -79,5 +79,13 @@ concrete CatIna of Cat = CommonX ** open ResIna, Prelude in {
N3 = {s : Number => Str} ** {p2,p3 : Str; c2,c3 : Case} ; N3 = {s : Number => Str} ** {p2,p3 : Str; c2,c3 : Case} ;
PN = {s : Str} ; PN = {s : Str} ;
LN = {s : Str ; n : Number ; art : Bool} ;
GN = {s : Str ; g : Sex} ;
SN = {s : Sex => Str ; pl : Str} ;
linref
V, VS, VQ, VA, VV = \v -> v.s ! VInf ++ case v.isRefl of {True => "se"; False => []} ;
V2, V2V, V2S, V2Q = \v -> v.s ! VInf ++ case v.isRefl of {True => "se"; False => []} ++ v.p2 ;
V3, V2A = \v -> v.s ! VInf ++ case v.isRefl of {True => "se"; False => []} ++ v.p2 ++ v.p3 ;
} }

View File

@@ -0,0 +1,113 @@
--# -path=.:../abstract:../common
concrete DocumentationIna of Documentation = CatIna ** open
ResIna,
Prelude,
HTML
in {
flags coding=utf8 ;
lincat
Inflection = {t : Str; s1,s2 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
{-
-} --# notpresent
lin
InflectionN, InflectionN2, InflectionN3 = \noun -> {
t = "s" ;
s1 = heading1 "Substantivo" ;
s2 = frameTable (
tr (th "Singular" ++ th "Plural") ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
)
} ;
InflectionPN = \pn -> {
t = "pn" ;
s1 = heading1 ("Nombre Proprio") ;
s2 = pn.s
} ;
InflectionGN = \gn -> {
t = "pn" ;
s1 = heading1 ("Nombre de Pila" ++
case gn.g of {
Male => "(Mascule)" ;
Female => "(Femina)"
}) ;
s2 = gn.s
} ;
InflectionSN = \sn -> {
t = "sn" ;
s1 = heading1 "Apellido" ;
s2 = sn.s ! Male
} ;
InflectionLN = \ln -> {
t = "nl" ;
s1 = heading1 ("Nombre del Lugar") ;
s2 = paragraph ln.s
} ;
InflectionA, InflectionA2 = \adj -> {
t = "a" ;
s1 = heading1 "Adjectivo" ;
s2 = paragraph (adj.s ! AAdj Posit)
} ;
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
t = "adv" ;
s1 = heading1 "Adverbio" ;
s2 = paragraph adv.s
} ;
InflectionPrep p = {
t = "prep" ;
s1 = heading1 "Preposition" ;
s2 = paragraph p.s
} ;
InflectionV, InflectionV2, InflectionV3, InflectionV2V, InflectionV2S, InflectionV2Q, InflectionV2A, InflectionVV, InflectionVS, InflectionVQ, InflectionVA = \v -> {
t = "v" ;
s1 = heading1 "Verbo" ;
s2 = inflVerb v
} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Definición:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Definición:</b>"++t.s++d.s++"</p><p><b>Ejemplo:</b>"++e.s++"</p>"};
lin
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ;
oper
inflVerb : Verb -> Str = \verb ->
frameTable (
tr (th "infinitivo" ++
td (verb.s ! VInf)) ++
tr (th "presente" ++
td (verb.s ! VPres)) ++
tr (th "participio passato" ++
td (verb.s ! VPPart)) ++
tr (th "participio presente" ++
td (verb.s ! VPresPart)) ++
tr (th "passato" ++
td (verb.s ! VPast)) ++
tr (th "futuro" ++
td (verb.s ! VFut)) ++
tr (th "conditional" ++
td (verb.s ! VCond))
) ;
{- --# notpresent
-}
}

View File

@@ -0,0 +1,9 @@
--# -path=.:../abstract:../common:prelude
concrete ExtendIna of Extend = CatIna **
ExtendFunctor
with (Grammar = GrammarIna)
** {
flags coding=utf8 ;
}

View File

@@ -14,7 +14,8 @@ concrete GrammarIna of Grammar =
TextX, TextX,
StructuralIna, StructuralIna,
IdiomIna, IdiomIna,
TenseX TenseX,
NamesIna
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -2,7 +2,8 @@
concrete LangIna of Lang = concrete LangIna of Lang =
GrammarIna, GrammarIna,
LexiconIna LexiconIna,
DocumentationIna
** { ** {
flags startcat = Phr ; unlexer = text ; lexer = text ; flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -7,355 +7,355 @@ concrete LexiconIna of Lexicon = CatIna **
optimize=values ; optimize=values ;
lin lin
airplane_N = regN "avion"; airplane_N = mkN "avion";
answer_V2S = prepV2 aP (regV "responder"); answer_V2S = mkV2 (mkV "responder") aP;
apartment_N = regN "appartamento"; apartment_N = mkN "appartamento";
apple_N = regN "pomo"; apple_N = mkN "pomo";
art_N = regN "arte" ; art_N = mkN "arte" ;
ask_V2Q = mkV2Q aP (regV "demandar") ; ask_V2Q = mkV2Q (mkV "demandar") aP ;
baby_N = regN "bebe" ; baby_N = mkN "bebe" ;
bad_A = regA "mal"; bad_A = mkA "mal";
bank_N = regN "banca" ; bank_N = mkN "banca" ;
beautiful_A = regA "belle" ; beautiful_A = mkA "belle" ;
become_VA = mkVA (regV "devenir") ; become_VA = mkVA (mkV "devenir") ;
beer_N = regN "bira" ; beer_N = mkN "bira" ;
beg_V2V = mkV2V noPrep aP (regV "rogar") ; beg_V2V = mkV2V (mkV "rogar") noPrep aP ;
big_A = regA "magne" ; big_A = mkA "magne" ;
bike_N = regN "bicycletta" ; bike_N = mkN "bicycletta" ;
bird_N = regN "ave" ; bird_N = mkN "ave" ;
black_A = regA "nigre" ; black_A = mkA "nigre" ;
blue_A = regA "blau" ; blue_A = mkA "blau" ;
boat_N = regN "barca" ; boat_N = mkN "barca" ;
book_N = regN "libro" ; book_N = mkN "libro" ;
boot_N = regN "botta"; boot_N = mkN "botta";
boss_N = regN "chef" ; boss_N = mkN "chef" ;
boy_N = regN "puero" ; boy_N = mkN "puero" ;
bread_N = regN "pan" ; bread_N = mkN "pan" ;
break_V2 = dirV2 (regV "rumper") ; break_V2 = mkV2 (mkV "rumper") ;
broad_A = regA "large" ; broad_A = mkA "large" ;
brother_N2 = regN2 "fratre"; brother_N2 = regN2 "fratre";
brown_A = regA "brun" ; brown_A = mkA "brun" ;
butter_N = regN "butyro" ; butter_N = mkN "butyro" ;
buy_V2 = dirV2 (regV "compra"); buy_V2 = mkV2 (mkV "compra");
camera_N = compN (regN "apparato" ) ["photographic"] ; camera_N = compN (mkN "apparato" ) ["photographic"] ;
cap_N = regN "bonetto" ; cap_N = mkN "bonetto" ;
car_N = regN "automobile" ; car_N = mkN "automobile" ;
carpet_N = regN "tapete" ; carpet_N = mkN "tapete" ;
cat_N = regN "catto" ; cat_N = mkN "catto" ;
ceiling_N = regN "tecto" ; -- of room ??? ceiling_N = mkN "tecto" ; -- of room ???
chair_N = regN "sede"; chair_N = mkN "sede";
cheese_N = regN "caseo"; cheese_N = mkN "caseo";
child_N = regN "infante" ; child_N = mkN "infante" ;
church_N = regN "ecclesia" ; church_N = mkN "ecclesia" ;
city_N = regN "urbe" ; -- ??? citate city_N = mkN "urbe" ; -- ??? citate
clean_A = regA "munde" ; clean_A = mkA "munde" ;
clever_A = regA "intelligente" ; clever_A = mkA "intelligente" ;
close_V2 = dirV2 (regV "clauder") ; close_V2 = mkV2 (mkV "clauder") ;
coat_N = regN "mantello" ; coat_N = mkN "mantello" ;
cold_A = regA "frigide" ; cold_A = mkA "frigide" ;
come_V = regV "venir" ; come_V = mkV "venir" ;
computer_N = regN "computator" ; computer_N = mkN "computator" ;
country_N = regN "pais" ; country_N = mkN "pais" ;
cousin_N = regN "cosino" ; ---- cosina cousin_N = mkN "cosino" ; ---- cosina
cow_N = regN "vacca" ; cow_N = mkN "vacca" ;
die_V = regV "morir" ; die_V = mkV "morir" ;
dirty_A = regA "immunde" ; dirty_A = mkA "immunde" ;
distance_N3 = prepN3 aP (prepN2 deP (regN "distantia")) ; --- ??? wtf distance_N3 = prepN3 aP (prepN2 deP (mkN "distantia")) ; --- ??? wtf
doctor_N = regN "medico"; doctor_N = mkN "medico";
dog_N = regN "can"; dog_N = mkN "can";
door_N = regN "porta"; door_N = mkN "porta";
drink_V2 = dirV2 (regV "biber"); drink_V2 = mkV2 (mkV "biber");
easy_A2V = mkA2V (regA "facile") aP ; easy_A2V = mkA2V (mkA "facile") aP ;
eat_V2 = dirV2 (regV "eder"); eat_V2 = mkV2 (mkV "eder");
empty_A = regA "vacue" ; empty_A = mkA "vacue" ;
enemy_N = regN "inimico" ; enemy_N = mkN "inimico" ;
factory_N = regN "fabrica" ; factory_N = mkN "fabrica" ;
father_N2 = regN2 "patre" ; father_N2 = regN2 "patre" ;
fear_VS = mkVS (regV "timer") ; fear_VS = mkVS (mkV "timer") ;
find_V2 = dirV2 (regV "trovar") ; find_V2 = mkV2 (mkV "trovar") ;
fish_N = regN "pisce" ; fish_N = mkN "pisce" ;
floor_N = regN "pavimento" ; floor_N = mkN "pavimento" ;
forget_V2 = dirV2 (regV "oblidar"); forget_V2 = mkV2 (mkV "oblidar");
fridge_N = regN "refrigerator"; fridge_N = mkN "refrigerator";
friend_N = regN "amico" ; friend_N = mkN "amico" ;
fruit_N = regN "fructo" ; fruit_N = mkN "fructo" ;
fun_AV = mkAV (regA "famusante") ; fun_AV = mkAV (mkA "famusante") ;
garden_N = regN "horto" ; garden_N = mkN "horto" ;
girl_N = regN "puera" ; girl_N = mkN "puera" ;
glove_N = regN "guanto" ; glove_N = mkN "guanto" ;
go_V = regV "ir"; go_V = mkV "ir";
gold_N = regN "auro" ; gold_N = mkN "auro" ;
good_A = R.mkAdjective "bon" "melior" "optime"; good_A = R.mkAdjective "bon" "melior" "optime";
green_A = regA "verde" ; green_A = mkA "verde" ;
harbour_N = regN "porto" ; harbour_N = mkN "porto" ;
hate_V2 = dirV2 (regV "detestar0") ; hate_V2 = mkV2 (mkV "detestar0") ;
hat_N = regN "cappello" ; hat_N = mkN "cappello" ;
hear_V2 = dirV2 (regV "audir"); hear_V2 = mkV2 (mkV "audir");
hill_N = regN "monticulo" ; hill_N = mkN "monticulo" ;
hope_VS = mkVS (regV "sperar") ; hope_VS = mkVS (mkV "sperar") ;
horse_N = regN "cavallo" ; horse_N = mkN "cavallo" ;
hot_A = regA "calide" ; hot_A = mkA "calide" ;
house_N = regN "domo" ; house_N = mkN "domo" ;
important_A = regA "importante" ; important_A = mkA "importante" ;
industry_N = regN "industria" ; industry_N = mkN "industria" ;
iron_N = regN "ferro" ; iron_N = mkN "ferro" ;
king_N = regN "rege" ; king_N = mkN "rege" ;
know_V2 = dirV2 (regV "cognoscer") ; -- ??? know_V2 = mkV2 (mkV "cognoscer") ; -- ???
lake_N = regN "laco" ; lake_N = mkN "laco" ;
lamp_N = regN "lampa" ; lamp_N = mkN "lampa" ;
learn_V2 = dirV2 (regV "apprender") ; learn_V2 = mkV2 (mkV "apprender") ;
leather_N = regN "corio" ; leather_N = mkN "corio" ;
leave_V2 = prepV2 deP (regV "partir"); leave_V2 = mkV2 (mkV "partir") deP;
like_V2 = dirV2 (regV "amar") ; like_V2 = mkV2 (mkV "amar") ;
listen_V2 = dirV2 (regV "ascoltar") ; listen_V2 = mkV2 (mkV "ascoltar") ;
live_V = (regV "vive") ; live_V = mkV "vive" ;
long_A = regA "longe" ; long_A = mkA "longe" ;
lose_V2 = dirV2 (regV "perder"); lose_V2 = mkV2 (mkV "perder");
love_N = regN "amor" ; love_N = mkN "amor" ;
love_V2 = dirV2 (regV "adorar") ; love_V2 = mkV2 (mkV "adorar") ;
man_N = regN "viro"; man_N = mkN "viro";
married_A2 = mkA2 (regA "sponsate") aP ; married_A2 = mkA2 (mkA "sponsate") aP ;
meat_N = regN "carne" ; meat_N = mkN "carne" ;
milk_N = regN "lacte" ; milk_N = mkN "lacte" ;
moon_N = regN "luna" ; moon_N = mkN "luna" ;
mother_N2 = regN2 "matre" ; mother_N2 = regN2 "matre" ;
mountain_N = regN "montania" ; mountain_N = mkN "montania" ;
music_N = regN "musica" ; music_N = mkN "musica" ;
narrow_A = regA "stricte" ; narrow_A = mkA "stricte" ;
new_A = regA "nove" ; new_A = mkA "nove" ;
newspaper_N = regN "jornal" ; newspaper_N = mkN "jornal" ;
oil_N = regN "oleo" ; oil_N = mkN "oleo" ;
old_A = regA "vetule" ; old_A = mkA "vetule" ;
open_V2 = dirV2 (regV "operir") ; open_V2 = mkV2 (mkV "operir") ;
paint_V2A = mkV2A noPrep inP (regV "pinger") ; -- ??? preposition might be wrong. (did not find a sample usage) paint_V2A = mkV2A (mkV "pinger") noPrep inP ; -- ??? preposition might be wrong. (did not find a sample usage)
paper_N = regN "papiro" ; paper_N = mkN "papiro" ;
paris_PN = regPN "Paris" ; paris_PN = mkPN "Paris" ;
peace_N = regN "pace" ; peace_N = mkN "pace" ;
pen_N = regN "penna" ; pen_N = mkN "penna" ;
planet_N = regN "planeta" ; planet_N = mkN "planeta" ;
plastic_N = regN "plastico" ; plastic_N = mkN "plastico" ;
play_V2 = dirV2 (regV "sonar") ; -- ??? eg. play the piano play_V2 = mkV2 (mkV "sonar") ; -- ??? eg. play the piano
policeman_N = regN "policero" ; policeman_N = mkN "policero" ;
priest_N = regN "prestre" ; priest_N = mkN "prestre" ;
probable_AS = mkAS (regA "probabile") ; probable_AS = mkAS (mkA "probabile") ;
queen_N = regN "regina" ; queen_N = mkN "regina" ;
radio_N = regN "radio" ; radio_N = mkN "radio" ;
rain_V0 = mkV0 (regV "pluvar") ; rain_V0 = mkV0 (mkV "pluvar") ;
read_V2 = dirV2 (regV "leger"); read_V2 = mkV2 (mkV "leger");
red_A = regA "rubie" ; red_A = mkA "rubie" ;
religion_N = regN "religion" ; religion_N = mkN "religion" ;
restaurant_N = regN "restaurant" ; restaurant_N = mkN "restaurant" ;
river_N = regN "riviera" ; river_N = mkN "riviera" ;
rock_N = regN "rocca" ; rock_N = mkN "rocca" ;
roof_N = regN "tecto" ; roof_N = mkN "tecto" ;
rubber_N = regN "cauchu" ; rubber_N = mkN "cauchu" ;
run_V = regV "currer"; run_V = mkV "currer";
say_VS = mkVS (regV "dicer"); say_VS = mkVS (mkV "dicer");
school_N = regN "schola" ; school_N = mkN "schola" ;
science_N = regN "scientia"; science_N = mkN "scientia";
sea_N = regN "mar" ; sea_N = mkN "mar" ;
seek_V2 = dirV2 (regV "cercar"); seek_V2 = mkV2 (mkV "cercar");
see_V2 = dirV2 (regV "vider"); see_V2 = mkV2 (mkV "vider");
sell_V3 = prepV3 aP (dirV2 (regV "vender")); sell_V3 = mkV3 (mkV "vender") noPrep aP;
send_V3 = prepV3 aP (dirV2 (regV "inviar")); send_V3 = mkV3 (mkV "inviar") noPrep aP;
sheep_N = regN "ove"; sheep_N = mkN "ove";
ship_N = regN "nave" ; ship_N = mkN "nave" ;
shirt_N = regN "camisa" ; shirt_N = mkN "camisa" ;
shoe_N = regN "scapra" ; shoe_N = mkN "scapra" ;
shop_N = regN "boteca" ; shop_N = mkN "boteca" ;
short_A = regA "curte" ; short_A = mkA "curte" ;
silver_N = regN "argento" ; silver_N = mkN "argento" ;
sister_N = regN "soror" ; sister_N = mkN "soror" ;
sleep_V = regV "dormir"; sleep_V = mkV "dormir";
small_A = regA "parve" ; -- !!! This one should be preferably a prefix adjective small_A = mkA "parve" ; -- !!! This one should be preferably a prefix adjective
snake_N = regN "serpente" ; snake_N = mkN "serpente" ;
sock_N = regN "calcetta" ; sock_N = mkN "calcetta" ;
speak_V2 = dirV2 (regV "parlar") ;-- ??? speak_V2 = mkV2 (mkV "parlar") ;-- ???
star_N = regN "stella" ; star_N = mkN "stella" ;
steel_N = regN "aciero" ; steel_N = mkN "aciero" ;
stone_N = regN "petra" ; stone_N = mkN "petra" ;
stove_N = regN "estufa" ; stove_N = mkN "estufa" ;
student_N = regN "studente" ; student_N = mkN "studente" ;
stupid_A = regA "nescie" ; stupid_A = mkA "nescie" ;
sun_N = regN "sol" ; sun_N = mkN "sol" ;
switch8off_V2 = dirV2 (regV "extinguer"); switch8off_V2 = mkV2 (mkV "extinguer");
switch8on_V2 = dirV2 (regV "accender") ; switch8on_V2 = mkV2 (mkV "accender") ;
table_N = regN "tablula" ; table_N = mkN "tablula" ;
talk_V3 = (prepV3 deP (prepV2 aP (regV "parlar"))) ; talk_V3 = mkV3 (mkV "parlar") deP aP ;
teacher_N = regN "professor" ; teacher_N = mkN "professor" ;
teach_V2 = dirV2 (regV "inseniar"); -- ??? aP (preposition is what?) teach_V2 = mkV2 (mkV "inseniar"); -- ??? aP (preposition is what?)
television_N = regN "television" ; television_N = mkN "television" ;
thick_A = regA "spisse" ; thick_A = mkA "spisse" ;
thin_A = regA "magre" ; thin_A = mkA "magre" ;
train_N = regN "convoyo" ; -- ??? train_N = mkN "convoyo" ; -- ???
travel_V = regV "viagiar" ; travel_V = mkV "viagiar" ;
tree_N = regN "tarbore" ; tree_N = mkN "tarbore" ;
---- trousers_N = regN "pantalon" ; --- ??? funky plural in the Abstract lexicon... ---- trousers_N = mkN "pantalon" ; --- ??? funky plural in the Abstract lexicon...
ugly_A = regA "ugly" ; ugly_A = mkA "ugly" ;
understand_V2 = dirV2 (regV "comprender"); understand_V2 = mkV2 (mkV "comprender");
university_N = regN "universitate" ; university_N = mkN "universitate" ;
village_N = regN "village" ; village_N = mkN "village" ;
wait_V2 = dirV2 (regV "wait") ; wait_V2 = mkV2 (mkV "wait") ;
walk_V = (regV "ambular") ; walk_V = (mkV "ambular") ;
warm_A = regA "calde" ; warm_A = mkA "calde" ;
war_N = regN "guerra" ; war_N = mkN "guerra" ;
watch_V2 = dirV2 (regV "spectar") ; watch_V2 = mkV2 (mkV "spectar") ;
water_N = regN "aqua" ; water_N = mkN "aqua" ;
white_A = regA "albe" ; white_A = mkA "albe" ;
window_N = regN "fenestra" ; window_N = mkN "fenestra" ;
wine_N = regN "vino" ; wine_N = mkN "vino" ;
win_V2 = dirV2 (regV "ganiar"); win_V2 = mkV2 (mkV "ganiar");
woman_N = regN "femina"; woman_N = mkN "femina";
wonder_VQ = mkVQ (reflV (regV "demandar")) ; wonder_VQ = mkVQ (reflV (mkV "demandar")) ;
wood_N = regN "ligno"; -- or silva ... wood_N = mkN "ligno"; -- or silva ...
write_V2 = dirV2 (regV "scriber"); write_V2 = mkV2 (mkV "scriber");
yellow_A = regA "jalne" ; yellow_A = mkA "jalne" ;
young_A = regA "juvene" ; young_A = mkA "juvene" ;
lin lin
do_V2 = dirV2 (regV "facer"); do_V2 = mkV2 (mkV "facer");
add_V3 = prepV3 aP (dirV2 (regV "additionar")); add_V3 = mkV3 (mkV "additionar") noPrep aP;
already_Adv = mkAdv "jam" ; already_Adv = mkAdv "jam" ;
animal_N = regN "animal" ; animal_N = mkN "animal" ;
ashes_N = regN "cinere" ; -- plural only??? ashes_N = mkN "cinere" ; -- plural only???
back_N = regN "dorso" ; back_N = mkN "dorso" ;
bark_N = regN "cortice" ; bark_N = mkN "cortice" ;
belly_N = regN "ventre" ; belly_N = mkN "ventre" ;
bite_V2 = dirV2 (regV "morder"); bite_V2 = mkV2 (mkV "morder");
blood_N = regN "sanguine" ; blood_N = mkN "sanguine" ;
blow_V = regV "sufflar"; blow_V = mkV "sufflar";
bone_N = regN "osso" ; bone_N = mkN "osso" ;
breast_N = regN "pectore" ; breast_N = mkN "pectore" ;
breathe_V = dirV2 (regV "respirar") ; breathe_V = mkV "respirar" ;
burn_V = regV "arder"; burn_V = mkV "arder";
cloud_N = regN "nube" ; cloud_N = mkN "nube" ;
correct_A = (regA "correcte") ; correct_A = (mkA "correcte") ;
count_V2 = dirV2 (regV "numerar") ; count_V2 = mkV2 (mkV "numerar") ;
cut_V2 = dirV2 (regV "secar"); cut_V2 = mkV2 (mkV "secar");
day_N = regN "die" ; day_N = mkN "die" ;
dig_V = regV "fossar"; dig_V = mkV "fossar";
dry_A = regA "sic" ; dry_A = mkA "sic" ;
dull_A = regA "enoiose" ; dull_A = mkA "enoiose" ;
dust_N = regN "pulvere" ; dust_N = mkN "pulvere" ;
ear_N = regN "aure" ; ear_N = mkN "aure" ;
earth_N = regN "terra" ; earth_N = mkN "terra" ;
egg_N = regN "ovo" ; egg_N = mkN "ovo" ;
eye_N = regN "oculo" ; eye_N = mkN "oculo" ;
fall_V = regV "cader" ; fall_V = mkV "cader" ;
far_Adv = mkAdv "lontano" ; far_Adv = mkAdv "lontano" ;
fat_N = regN "grasse" ; fat_N = mkN "grasse" ;
fear_V2 = dirV2 (regV "timer") ; fear_V2 = mkV2 (mkV "timer") ;
feather_N = regN "pluma" ; feather_N = mkN "pluma" ;
fight_V2 = dirV2 (regV "combattar"); fight_V2 = mkV2 (mkV "combattar");
fingernail_N = regN "ungual"; fingernail_N = mkN "ungual";
fire_N = regN "foco" ; fire_N = mkN "foco" ;
float_V = regV "flottar" ; float_V = mkV "flottar" ;
flow_V = regV "flucto" ; flow_V = mkV "flucto" ;
flower_N = regN "flore" ; flower_N = mkN "flore" ;
fly_V = regV "volar" ; fly_V = mkV "volar" ;
fog_N = regN "bruma" ; fog_N = mkN "bruma" ;
foot_N = regN "pede"; foot_N = mkN "pede";
forest_N = regN "silva" ; forest_N = mkN "silva" ;
freeze_V = regV "gelar"; freeze_V = mkV "gelar";
full_A = regA "plen" ; full_A = mkA "plen" ;
give_V3 = prepV3 aP (dirV2 (regV "dar")) ; give_V3 = mkV3 (mkV "dar") noPrep aP ;
grammar_N = regN "grammatica" ; grammar_N = mkN "grammatica" ;
grass_N = regN "herba" ; grass_N = mkN "herba" ;
guts_N = regN "tripas" ; -- !!!: no singular guts_N = mkN "tripas" ; -- !!!: no singular
hair_N = regN "pilo" ; hair_N = mkN "pilo" ;
hand_N = regN "mano" ; hand_N = mkN "mano" ;
head_N = regN "capite" ; head_N = mkN "capite" ;
heart_N = regN "corde" ; heart_N = mkN "corde" ;
heavy_A = regA "pesante" ; heavy_A = mkA "pesante" ;
hit_V2 = dirV2 (regV "frappar") ; hit_V2 = mkV2 (mkV "frappar") ;
hold_V2 = dirV2 (regV "retener") ; hold_V2 = mkV2 (mkV "retener") ;
horn_N = regN "corno" ; horn_N = mkN "corno" ;
hunt_V2 = dirV2 (regV "chassar") ; hunt_V2 = mkV2 (mkV "chassar") ;
husband_N = regN "sposo"; husband_N = mkN "sposo";
ice_N = regN "glacie" ; ice_N = mkN "glacie" ;
john_PN = regPN "John" ; john_PN = mkPN "John" ;
jump_V = regV "saltar" ; jump_V = mkV "saltar" ;
kill_V2 = dirV2 (regV "occider") ; kill_V2 = mkV2 (mkV "occider") ;
knee_N = regN "genu" ; knee_N = mkN "genu" ;
language_N = regN "linguage" ; language_N = mkN "linguage" ;
laugh_V = regV "rider" ; laugh_V = mkV "rider" ;
leaf_N = regN "folio" ; leaf_N = mkN "folio" ;
left_Ord = ss "leve" ; left_Ord = ss "leve" ;
leg_N = regN "gamba" ; leg_N = mkN "gamba" ;
lie_V = regV "mentir"; lie_V = mkV "mentir";
liver_N = regN "hepate" ; liver_N = mkN "hepate" ;
louse_N = regN "pediculo"; louse_N = mkN "pediculo";
mouth_N = regN "bucca" ; mouth_N = mkN "bucca" ;
name_N = regN "nomine" ; name_N = mkN "nomine" ;
near_A = regA "proxime" ; near_A = mkA "proxime" ;
neck_N = regN "collo" ; neck_N = mkN "collo" ;
night_N = regN "nocte" ; night_N = mkN "nocte" ;
nose_N = regN "naso" ; nose_N = mkN "naso" ;
now_Adv = mkAdv "nunc" ; now_Adv = mkAdv "nunc" ;
number_N = regN "numero" ; number_N = mkN "numero" ;
person_N = regN "homine" ; person_N = mkN "homine" ;
play_V = regV "jocar" ; play_V = mkV "jocar" ;
pull_V2 = dirV2 (regV "traher") ; pull_V2 = mkV2 (mkV "traher") ;
push_V2 = dirV2 (regV "pulsar") ; push_V2 = mkV2 (mkV "pulsar") ;
put_V2 = dirV2 (regV "placar"); put_V2 = mkV2 (mkV "placar");
question_N = regN "question" ; question_N = mkN "question" ;
rain_N = regN "pluvia" ; rain_N = mkN "pluvia" ;
ready_A = regA "preste" ; ready_A = mkA "preste" ;
reason_N = regN "ration" ; reason_N = mkN "ration" ;
right_Ord = ss "dextra" ; right_Ord = ss "dextra" ;
road_N = regN "via" ; road_N = mkN "via" ;
root_N = regN "radice" ; root_N = mkN "radice" ;
rope_N = regN "corda" ; rope_N = mkN "corda" ;
rotten_A = (regA "corrupte") ; rotten_A = (mkA "corrupte") ;
round_A = regA "ronde" ; round_A = mkA "ronde" ;
rub_V2 = dirV2 (regV "fircar") ; rub_V2 = mkV2 (mkV "fircar") ;
rule_N = regN "regula" ; rule_N = mkN "regula" ;
salt_N = regN "sal" ; salt_N = mkN "sal" ;
sand_N = regN "sablo" ; sand_N = mkN "sablo" ;
scratch_V2 = dirV2 (regV "grattar") ; scratch_V2 = mkV2 (mkV "grattar") ;
seed_N = regN "semine" ; seed_N = mkN "semine" ;
sew_V = regV "suer"; sew_V = mkV "suer";
sharp_A = regA "trenchante" ; sharp_A = mkA "trenchante" ;
sing_V = regV "cantar"; sing_V = mkV "cantar";
sit_V = regV "seder"; sit_V = mkV "seder";
skin_N = regN "pelle" ; skin_N = mkN "pelle" ;
sky_N = regN "celo" ; sky_N = mkN "celo" ;
smell_V = regV "oler" ; smell_V = mkV "oler" ;
smoke_N = regN "fumar" ; smoke_N = mkN "fumar" ;
smooth_A = regA "lisie" ; smooth_A = mkA "lisie" ;
snow_N = regN "niva" ; snow_N = mkN "niva" ;
song_N = regN "canto" ; song_N = mkN "canto" ;
spit_V = regV "sputar"; spit_V = mkV "sputar";
split_V2 = dirV2 (regV "finder"); split_V2 = mkV2 (mkV "finder");
squeeze_V2 = dirV2 (regV "comprimer") ; squeeze_V2 = mkV2 (mkV "comprimer") ;
stab_V2 = dirV2 (regV "dagar") ; stab_V2 = mkV2 (mkV "dagar") ;
stand_V = regV "star"; stand_V = mkV "star";
stick_N = regN "baston" ; stick_N = mkN "baston" ;
stop_V = regV "stoppar" ; stop_V = mkV "stoppar" ;
straight_A = regA "directe" ; straight_A = mkA "directe" ;
suck_V2 = dirV2 (regV "suger") ; suck_V2 = mkV2 (mkV "suger") ;
swell_V = (regV "turger"); swell_V = (mkV "turger");
swim_V = (regV "natada"); swim_V = (mkV "natada");
tail_N = regN "cauda" ; tail_N = mkN "cauda" ;
think_V = regV "pensar"; think_V = mkV "pensar";
throw_V2 = dirV2 (regV "jectar") ; throw_V2 = mkV2 (mkV "jectar") ;
tie_V2 = dirV2 (regV "ligar") ; tie_V2 = mkV2 (mkV "ligar") ;
today_Adv = mkAdv "hodie" ; today_Adv = mkAdv "hodie" ;
tongue_N = regN "lingua" ; tongue_N = mkN "lingua" ;
tooth_N = regN "dente"; tooth_N = mkN "dente";
turn_V = regV "tornar" ; turn_V = mkV "tornar" ;
uncertain_A = regA "incerte" ; uncertain_A = mkA "incerte" ;
vomit_V = regV "vomir" ; vomit_V = mkV "vomir" ;
wash_V2 = dirV2 (regV "abluer") ; wash_V2 = mkV2 (mkV "abluer") ;
wet_A = regA "humid" ; ---- wet_A = mkA "humid" ; ----
wide_A = regA "large" ; wide_A = mkA "large" ;
wife_N = regN "sposa"; wife_N = mkN "sposa";
wind_N = regN "vento" ; wind_N = mkN "vento" ;
wing_N = regN "ala" ; wing_N = mkN "ala" ;
wipe_V2 = dirV2 (regV "essugar") ; wipe_V2 = mkV2 (mkV "essugar") ;
worm_N = regN "verme" ; worm_N = mkN "verme" ;
year_N = regN "anno" ; year_N = mkN "anno" ;
-- other_A = regA "altere" ; -- other_A = mkA "altere" ;
---- added 4/6/2007 ---- added 4/6/2007
-- --
oper oper

View File

@@ -0,0 +1,60 @@
concrete NamesIna of Names = CatIna ** open Prelude, ResIna in {
lin GivenName gn = {
s = \\_ => gn.s;
a = agrP3 Sg;
isPronoun = False
} ;
lin MaleSurname = \sn -> {
s = \\_ => sn.s ! Male;
a = agrP3 Sg;
isPronoun = False
} ;
lin FemaleSurname = \sn -> {
s = \\_ => sn.s ! Female;
a = agrP3 Sg;
isPronoun = False
} ;
lin PlSurname = \sn -> {
s = \\_ => sn.pl;
a = agrP3 Pl;
isPronoun = False
} ;
lin FullName gn sn = {
s = \\_ => gn.s ++ sn.s ! gn.g ;
a = agrP3 Pl;
isPronoun = False
} ;
lin UseLN ln = {
s = \\c => artLN ln c ;
a = agrP3 ln.n;
isPronoun = False
} ;
lin PlainLN ln = {
s = \\_ => ln.s;
a = agrP3 ln.n;
isPronoun = False
} ;
lin InLN ln = {
s = "in" ++ artLN ln Acc ;
} ;
lin AdjLN ap ln = ln ** {
s = preOrPost ap.isPre (ap.s ! agrP3 ln.n) ln.s ;
} ;
oper
artLN : LN -> Case -> Str = \ln,c ->
case ln.art of {
True => case c of {
Dat => "al";
Gen | Abl => "del";
_ => "le"
} ++
ln.s ;
False => ln.s
} ;
}

View File

@@ -118,4 +118,10 @@ concrete NounIna of Noun = CatIna ** open ResIna, Prelude in {
isPronoun = np.isPronoun ---- ?? AR isPronoun = np.isPronoun ---- ?? AR
} ; } ;
QuantityNP n m = {
s = \\c => preOrPost m.isPre m.s (n.s ! NCard) ;
a = agrP3 n.n ;
isPronoun = False
} ;
} }

View File

@@ -29,23 +29,17 @@ resource ParadigmsIna = open
(Predef=Predef), (Predef=Predef),
Prelude, Prelude,
MorphoIna, MorphoIna,
CatIna CatIna,
CommonX
in { in {
--2 Parameters --2 Parameters
-- --
-- To abstract over gender names, we define the following identifiers. -- To abstract over gender names, we define the following identifiers.
oper
male : Sex = Male ;
female : Sex = Female ;
oper oper
-- Gender : Type ;
-- There is no grammatical gender in interlingua.
---- To abstract over number names, we define the following.
--
-- Number : Type ;
--
-- singular : Number ;
-- plural : Number ;
-- To abstract over case names, we define the following. -- To abstract over case names, we define the following.
nominative : Case ; nominative : Case ;
@@ -63,7 +57,7 @@ oper
--2 Nouns --2 Nouns
-- --
-- All nouns are regular, so one should use $regN$ to construct them. -- All nouns are regular, so one should use $mkN$ to construct them.
--3 Relational nouns --3 Relational nouns
-- --
@@ -96,6 +90,7 @@ oper
-- Adverbs modifying adjectives and sentences can also be formed. -- Adverbs modifying adjectives and sentences can also be formed.
mkAdA : Str -> AdA ; mkAdA : Str -> AdA ;
mkAdN : Str -> AdA ;
--2 Prepositions --2 Prepositions
-- --
@@ -124,20 +119,22 @@ oper
-- I decided to provide the following combinators for forming verbs with -- I decided to provide the following combinators for forming verbs with
-- complex grammar rules: -- complex grammar rules:
prepV2 : Prep -> V -> V2 ; mkV2 = overload {
prepV3 : Prep -> V2 -> V3 ; mkV2 : V -> Prep -> V2 = prepV2 ;
dirV2 : V -> V2 ; mkV2 : V -> V2 = dirV2 ;
} ;
mkV3 : V -> Prep -> Prep -> V3 ;
mkV0 : V -> V0 ; mkV0 : V -> V0 ;
mkVS : V -> VS ; mkVS : V -> VS ;
-- mkV2S : V -> Prep -> V2S ; mkV2S : V -> Prep -> V2S ;
-- mkVV : V -> VV ; mkVV : V -> VV ;
mkV2V : Prep -> Prep -> V -> V2V ; mkV2V : V -> Prep -> Prep -> V2V ;
mkVA : V -> VA ; mkVA : V -> VA ;
mkV2A : Prep -> Prep -> V -> V2A ; mkV2A : V -> Prep -> Prep -> V2A ;
mkVQ : V -> VQ ; mkVQ : V -> VQ ;
mkV2Q : Prep -> V -> V2Q ; mkV2Q : V -> Prep -> V2Q ;
mkAS : A -> AS ; mkAS : A -> AS ;
-- mkA2S : A -> Prep -> A2S ; -- mkA2S : A -> Prep -> A2S ;
@@ -163,7 +160,7 @@ oper
dative = Dat ; dative = Dat ;
ablative = Abl ; ablative = Abl ;
regN s = nounReg s ** {lock_N = <>}; mkN s = nounReg s ** {lock_N = <>};
compN : N -> Str -> N; compN : N -> Str -> N;
compN n s = {s = \\x => n.s ! x ++ s; lock_N = <>} ; compN n s = {s = \\x => n.s ! x ++ s; lock_N = <>} ;
@@ -173,7 +170,7 @@ oper
prepN3 : Prep -> N2 -> N3; prepN3 : Prep -> N2 -> N3;
prepN2 = \p,n -> n ** {lock_N2 = <> ; p2 = p.s; c2 = p.c} ; prepN2 = \p,n -> n ** {lock_N2 = <> ; p2 = p.s; c2 = p.c} ;
prepN3 = \p,n -> n ** {lock_N3 = <> ; p3 = p.s; c3 = p.c} ; prepN3 = \p,n -> n ** {lock_N3 = <> ; p3 = p.s; c3 = p.c} ;
regN2 n = prepN2 (mkPrep [] genitive) (regN n) ** {lock_N2 = <>}; regN2 n = prepN2 (mkPrep [] genitive) (mkN n) ** {lock_N2 = <>};
----3 Relational common noun phrases ----3 Relational common noun phrases
---- ----
@@ -187,12 +184,24 @@ oper
-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ; -- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ;
-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ; -- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ;
-- --
regPN n = regGenPN n; mkPN : Str -> PN = regGenPN;
regGenPN n = {s = n; lock_PN = <>} ;
-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; mkLN = overload {
-- mkLN : Str -> LN = \s -> lin LN {s=s; n=Sg; art=False};
-- mk2A a b = mkAdjective a a a b ** {lock_A = <>} ; mkLN : Str -> Number -> LN = \s,n -> lin LN {s=s; n=n; art=False};
regA a = regAdjective a ** {lock_A = <>} ; } ;
mkGN : Str -> Sex -> GN = \s,g -> lin GN {s=s; g=g};
mkSN = overload {
mkSN : Str -> SN = \s -> lin SN {s=\\_ => s; pl=s};
mkSN : Str -> Str -> Str -> SN = \m,f,pl -> lin SN {s=table {Male=>m; Female=>f}; pl=pl};
} ;
regGenPN : Str -> PN ;
regGenPN s = {s = s; lock_PN = <>} ;
mkA : Str -> A ;
mkA a = regAdjective a ** {lock_A = <>} ;
mkA2 a p = a ** {c2 = casePrep p.s p.c ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = casePrep p.s p.c ; lock_A2 = <>} ;
@@ -201,24 +210,25 @@ oper
mkAdv x = ss x ** {lock_Adv = <>} ; mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ; mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdA x = ss x ** {lock_AdA = <>} ; mkAdA x = ss x ** {lock_AdA = <>} ;
mkAdN x = ss x ** {lock_AdA = <>} ;
mkPrep p c = ss p ** {c = c; lock_Prep = <>} ; mkPrep p c = ss p ** {c = c; lock_Prep = <>} ;
noPrep = mkPrep [] accusative ; noPrep = mkPrep [] accusative ;
-- Verb-formation combinators. -- Verb-formation combinators.
regV : Str -> V; mkV : Str -> V;
regV s = mkVerb s ** {lock_V = <>}; mkV s = mkVerb s ** {lock_V = <>};
prepV2 p v = v ** {c2 = p.c; p2 = p.s ; lock_V2 = <>} ; prepV2 : V -> Prep -> V2 ;
prepV3 p v = v ** {c3 = p.c; p3 = p.s ; lock_V3 = <>} ; prepV2 v p = v ** {c2 = p.c; p2 = p.s ; lock_V2 = <>} ;
dirV2 = prepV2 noPrep ;
dirV2 : V -> V2 ;
dirV2 v = prepV2 v noPrep ;
mkV3 v p1 p2 = v ** {c2 = p1.c; p2 = p1.s ; c3 = p2.c; p3 = p2.s ; lock_V3 = <>} ;
mkVS v = v ** {lock_VS = <>} ; mkVS v = v ** {lock_VS = <>} ;
-- mkVV v = { mkVV v = v ** {lock_VV = <>} ;
-- s = table {VVF vf => v.s ! vf ; _ => variants {}} ;
-- isAux = False ; lock_VV = <>
-- } ;
mkVQ v = v ** {lock_VQ = <>} ; mkVQ v = v ** {lock_VQ = <>} ;
V0 : Type = V ; V0 : Type = V ;
@@ -227,88 +237,23 @@ oper
A2V : Type = A2 ; A2V : Type = A2 ;
-- --
mkV0 v = v ** {lock_V = <>} ; mkV0 v = v ** {lock_V = <>} ;
-- mkV2S v p = prepV2 v p ** {lock_V2 = <>} ; mkV2S v p = prepV2 v p ** {lock_V2S = <>} ;
mkV2V p t v = prepV2 p v ** {s4 = t ; lock_V2V = <>} ; mkV2V v p t = prepV2 v p ** {s4 = t ; lock_V2V = <>} ;
mkVA v = v ** {lock_VA = <>} ; mkVA v = v ** {lock_VA = <>} ;
mkV2A p2 p3 v = (prepV3 p3 (prepV2 p2 v)) ** {lock_V2A = <>} ; mkV2A v p2 p3 = mkV3 v p2 p3 ** {lock_V2A = <>} ;
mkV2Q p v = prepV2 p v ** {lock_V2Q = <>} ; mkV2Q p v = prepV2 p v ** {lock_V2Q = <>} ;
mkAS v = v ** {lock_A = <>} ; mkAS v = v ** {lock_A = <>} ;
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
mkAV v = v ** {lock_A = <>} ; mkAV v = v ** {lock_A = <>} ;
mkA2V v p = mkA2 v p ** {lock_A2 = <>} ; mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
-- pre-overload API and overload definitions -- pre-overload API and overload definitions
regN : Str -> N ; mkN : Str -> N ;
-- mk2N : (man,men : Str) -> N ;
-- genderN : Gender -> N -> N ;
-- compN : Str -> N -> N ;
--
--
--
-- mk2A : (free,freely : Str) -> A ;
regA : Str -> A ;
--
-- mkA = overload {
-- mkA : Str -> A = regA ;
-- mkA : (fat,fatter : Str) -> A = \fat,fatter ->
-- mkAdjective fat fatter (init fatter + "st") (fat + "ly") ** {lock_A = <>} ;
-- mkA : (good,better,best,well : Str) -> A = \a,b,c,d ->
-- mkAdjective a b c d ** {lock_A = <>}
-- } ;
--
-- compoundA = compoundADeg ;
--
--
-- mk5V : (go, goes, went, gone, going : Str) -> V ;
-- regV : (cry : Str) -> V ;
-- reg2V : (stop, stopped : Str) -> V;
-- irregV : (drink, drank, drunk : Str) -> V ;
-- irreg4V : (run, ran, run, running : Str) -> V ;
--
-- -- Use reg2V instead
-- regDuplV : Str -> V ;
-- -- Use irreg4V instead
-- irregDuplV : (get, got, gotten : Str) -> V ;
--
------ obsolete mkInterj : Str -> Interj = \s -> lin Interj {s=s};
-- mkVoc : Str -> Voc = variants {} ;
---- Comparison adjectives may two more forms.
--
-- ADeg : Type ;
--
-- mkADeg : (good,better,best,well : Str) -> ADeg ;
--
---- The regular pattern recognizes two common variations:
---- "-e" ("rude" - "ruder" - "rudest") and
---- "-y" ("happy - happier - happiest - happily")
--
-- regADeg : Str -> ADeg ; -- long, longer, longest
--
---- However, the duplication of the final consonant is nor predicted,
---- but a separate pattern is used:
--
-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest
--
---- If comparison is formed by "more", "most", as in general for
---- long adjective, the following pattern is used:
--
-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous
--
---- From a given $ADeg$, it is possible to get back to $A$.
--
-- adegA : ADeg -> A ;
--
--
regPN : Str -> PN ;
regGenPN : Str -> PN ; -- John, John's
--
---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
--
-- nounPN : N -> PN ;
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
} ; } ;

View File

@@ -4,7 +4,6 @@ concrete StructuralIna of Structural = CatIna **
flags optimize=all ; flags optimize=all ;
oper oper
--- mkPrep = P.mkPrep;
pp : Str -> Prep = \s-> P.mkPrep s Acc; pp : Str -> Prep = \s-> P.mkPrep s Acc;
lin lin
above_Prep = pp "supra"; above_Prep = pp "supra";
@@ -22,8 +21,8 @@ concrete StructuralIna of Structural = CatIna **
but_PConj = ss "sed" ; but_PConj = ss "sed" ;
by8agent_Prep = pp "per" ; by8agent_Prep = pp "per" ;
by8means_Prep = pp "per" ; by8means_Prep = pp "per" ;
can_VV = P.regV "poter"; can_VV = P.mkVV (P.mkV "poter");
can8know_VV = P.regV "saper"; can8know_VV = P.mkVV (P.mkV "saper");
during_Prep = pp "durante" ; during_Prep = pp "durante" ;
either7or_DConj = sd2 "o" "o" ** {n = Sg} ; either7or_DConj = sd2 "o" "o" ** {n = Sg} ;
everybody_NP = regNP "totos" ; everybody_NP = regNP "totos" ;
@@ -49,7 +48,7 @@ concrete StructuralIna of Structural = CatIna **
more_CAdv = {s = "plus" ; p = "que"} ; more_CAdv = {s = "plus" ; p = "que"} ;
most_Predet = ss ("le"++"plus"); most_Predet = ss ("le"++"plus");
much_Det = mkDeterminer Sg "tanto" ; much_Det = mkDeterminer Sg "tanto" ;
must_VV = P.regV "deber"; must_VV = P.mkV "deber";
no_Utt = ss "no" ; no_Utt = ss "no" ;
on_Prep = P.mkPrep "super" Acc; on_Prep = P.mkPrep "super" Acc;
only_Predet = ss "unic" ; only_Predet = ss "unic" ;
@@ -81,8 +80,8 @@ concrete StructuralIna of Structural = CatIna **
too_AdA = ss "alsi" ; too_AdA = ss "alsi" ;
to_Prep = P.mkPrep "" Dat; to_Prep = P.mkPrep "" Dat;
under_Prep = pp "infra" ; under_Prep = pp "infra" ;
very_AdA = ss "multo" ; very_AdA = P.mkAdA "multo" ;
want_VV = P.regV "want" ; want_VV = P.mkVV (P.mkV "want") ;
we_Pron = mkPron "nos" "nos" "nostre" Pp1; we_Pron = mkPron "nos" "nos" "nostre" Pp1;
whatPl_IP = mkIP "que" Pl ; whatPl_IP = mkIP "que" Pl ;
whatSg_IP = mkIP "que" Sg ; whatSg_IP = mkIP "que" Sg ;

View File

@@ -1,7 +1,10 @@
--# -path=alltenses:../common:../abstract:../romance --# -path=alltenses:../common:../abstract:../romance
concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor - concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
[ [
PassVPSlash, PassAgentVPSlash GenRP,
PassVPSlash, PassAgentVPSlash,
ExistsNP
] ]
-- don't forget to put the names of your own -- don't forget to put the names of your own
-- definitions here -- definitions here
@@ -13,9 +16,23 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
MorphoIta, MorphoIta,
Coordination, Coordination,
Prelude, Prelude,
ParadigmsIta in { ParadigmsIta,
IrregIta in {
-- put your own definitions here -- put your own definitions here
lin
GenRP nu cn = {
s = \\_b,_aagr,_c => "di cui" ++ num ++ cn.s ! n ;
a = aagr g n ;
hasAgr = True
} where {
g = cn.g ;
n = nu.n ;
num = if_then_Str nu.isNum (nu.s ! g) []
} ;
lin PassVPSlash vps = passVPSlash vps [] ; lin PassVPSlash vps = passVPSlash vps [] ;
PassAgentVPSlash vps np = passVPSlash PassAgentVPSlash vps np = passVPSlash
@@ -31,4 +48,13 @@ oper
comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ; comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ;
} ; } ;
lin
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV esistere_V)) ;
} }

View File

@@ -55,5 +55,10 @@ concrete IdiomIta of Idiom = CatIta **
mkImperative False P1 vp ! RPos ! Masc ! Pl --- fem mkImperative False P1 vp ! RPos ! Masc ! Pl --- fem
} ; } ;
ImpP3 np vp = {
s = (mkClause (np.s ! Nom).comp np.hasClit False np.a vp).s
! DInv ! RPres ! Simul ! RPos ! Conjunct
} ;
} }

View File

@@ -61,7 +61,14 @@ oper
} ; } ;
mkDet = overload { mkDet = overload {
-- Does not inflect for number -- singular, does not inflect for gender
mkDet : Str -> Det = \piu -> lin Det {
s,sp = \\_,_ => piu ;
spn = \\_ => piu ;
n = Sg ;
s2 = \\g => [] ;
isNeg = False
} ;
mkDet : Str -> Number -> Det = \piu,n -> lin Det { mkDet : Str -> Number -> Det = \piu,n -> lin Det {
s,sp = \\_,_ => piu ; s,sp = \\_,_ => piu ;
spn = \\_ => piu ; spn = \\_ => piu ;
@@ -69,7 +76,7 @@ oper
s2 = \\g => [] ; s2 = \\g => [] ;
isNeg = False isNeg = False
} ; } ;
-- Inflects for number -- Inflects for gender
mkDet : Str -> Str -> Number -> Det = \alcuni,alcune,n -> lin Det { mkDet : Str -> Str -> Number -> Det = \alcuni,alcune,n -> lin Det {
s,sp = table { s,sp = table {
Masc => \\_ => alcuni ; Masc => \\_ => alcuni ;

4
src/kazakh/AllKaz.gf Normal file
View File

@@ -0,0 +1,4 @@
concrete AllKaz of AllKazAbs =
LangKaz
**
{} ;

5
src/kazakh/AllKazAbs.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../abstract:../common:prelude
abstract AllKazAbs =
Lang
** {} ;

13
src/kazakh/CatKaz.gf Normal file
View File

@@ -0,0 +1,13 @@
concrete CatKaz of Cat = CommonX ** open ResKaz in {
lincat N = Noun ;
lincat N2 = Noun ** {c2 : Compl} ;
lincat N3 = Noun ** {c2,c3 : Compl} ;
lincat V, VA, VV, VS, VQ = Verb ;
lincat V2, V2S, V2Q = Verb ** {c2 : Compl} ;
lincat V3, V2A, V2V = Verb ** {c2,c3 : Compl} ;
lincat A = {s : Str} ;
lincat A2 = A ** {c2 : Compl} ;
lincat Prep = Compl ;
}

View File

@@ -0,0 +1,161 @@
concrete DocumentationKaz of Documentation = CatKaz ** open
ResKaz, Prelude, HTML in {
lincat
Inflection = {t : Str; s1,s2,s3 : Str} ;
Definition = {s : Str} ;
Document = {s : Str} ;
Tag = {s : Str} ;
lin InflectionN,InflectionN2,InflectionN3 = \x -> {
t="n" ;
s1="" ;
s2=frameTable (
tr (th "" ++ th "Sg" ++ th "Pl") ++
tr (th "Nom" ++ td (x.s ! Nom ! Sg) ++ td (x.s ! Nom ! Pl)) ++
tr (th "Acc" ++ td (x.s ! Acc ! Sg) ++ td (x.s ! Acc ! Pl)) ++
tr (th "Dat" ++ td (x.s ! Dat ! Sg) ++ td (x.s ! Dat ! Pl)) ++
tr (th "Gen" ++ td (x.s ! Gen ! Sg) ++ td (x.s ! Gen ! Pl)) ++
tr (th "Ablat" ++ td (x.s ! Ablat ! Sg) ++ td (x.s ! Ablat ! Pl)) ++
tr (th "Instr" ++ td (x.s ! Instr ! Sg) ++ td (x.s ! Instr ! Pl)) ++
tr (th "Loc" ++ td (x.s ! Loc ! Sg) ++ td (x.s ! Loc ! Pl)) ++
tr (intagAttr "th" "colspan=\"3\"" "poss") ++
tr (th "" ++ th "Sg" ++ th "Pl") ++
tr (th "P1 Sg" ++ td (x.poss ! Sg ! P1 ! Sg) ++ td (x.poss ! Sg ! P1 ! Pl)) ++
tr (th "P1 Pl" ++ td (x.poss ! Pl ! P1 ! Sg) ++ td (x.poss ! Pl ! P1 ! Pl)) ++
tr (th "P2 Sg Informal" ++ td (x.poss ! Sg ! P2 Informal ! Sg) ++ td (x.poss ! Sg ! P2 Informal ! Pl)) ++
tr (th "P2 Sg Formal" ++ td (x.poss ! Sg ! P2 Formal ! Sg) ++ td (x.poss ! Sg ! P2 Formal ! Pl)) ++
tr (th "P3 Sg" ++ td (x.poss ! Sg ! P3 ! Sg) ++ td (x.poss ! Sg ! P3 ! Pl))) ;
s3=[]
} ;
lin InflectionV, InflectionV2, InflectionV3, InflectionV2V, InflectionV2S,
InflectionV2Q, InflectionV2A, InflectionVV, InflectionVS,
InflectionVQ, InflectionVA = \x -> {
t="v" ;
s1="" ;
s2=heading2 "Infinitive" ++ paragraph (x.Infinitive) ++
-- tr (th "Indicative" ++ th "Fut" ++ td (x.Indicative.Fut)) ++
heading2 "Present"++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Pos ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Pos ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Pos ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Pos ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Pos ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Pos ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Pos ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Pos ! P3 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Neg ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Neg ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Neg ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Neg ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Pres.noAspect ! Neg ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.noAspect ! Neg ! P3 ! Pl))) ++
heading2 "Present Progressive"++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Pos ! P1 ! Sg))++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Pos ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Pos ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Pos ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Pos ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Pos ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Pos ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Pos ! P3 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Neg ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Neg ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Neg ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Neg ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Neg ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Pres.Progressive ! Neg ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Pres.Progressive ! Neg ! P3 ! Pl))) ++
heading2 "Past" ++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Pos ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Pos ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Pos ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Pos ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Pos ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Pos ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Pos ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Pos ! P3 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Neg ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Neg ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Neg ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Neg ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Neg ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.noAspect ! Neg ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.noAspect ! Neg ! P3 ! Pl))) ++
heading2 "Past Perfect" ++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Pos ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Pos ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Pos ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Pos ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Pos ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Pos ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Pos ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Pos ! P3 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Neg ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Neg ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Neg ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Neg ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Neg ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.Perfect ! Neg ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Perfect ! Neg ! P3 ! Pl))) ++
heading2 "Past Progressive" ++
frameTable (
tr (intagAttr "th" "rowspan=\"6\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Pos ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Pos ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Pos ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Pos ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Pos ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Pos ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Pos ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Pos ! P3 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"6\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Neg ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Neg ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Neg ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Neg ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Neg ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Neg ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Indicative.Past.Progressive ! Neg ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Indicative.Past.Progressive ! Neg ! P3 ! Pl))) ++
heading2 "Imperative" ++
frameTable (
tr (intagAttr "th" "rowspan=\"4\"" "Pos" ++ intagAttr "th" "rowspan=\"2\"" "Informal" ++ th "Sg" ++ td (x.Imperative_Jussive ! Pos ! Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Imperative_Jussive ! Pos ! Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Formal" ++ th "Sg" ++ td (x.Imperative_Jussive ! Pos ! Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Imperative_Jussive ! Pos ! Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"4\"" "Neg" ++ intagAttr "th" "rowspan=\"2\"" "Informal" ++ th "Sg" ++ td (x.Imperative_Jussive ! Neg ! Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Imperative_Jussive ! Neg ! Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "Formal" ++ th "Sg" ++ td (x.Imperative_Jussive ! Neg ! Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Imperative_Jussive ! Neg ! Formal ! Pl))) ++
heading2 "Subjunctive" ++
frameTable (
tr (intagAttr "th" "rowspan=\"2\"" "P1" ++ th "Sg" ++ td (x.Subjunctive ! P1 ! Sg)) ++
tr (th "Pl" ++ td (x.Subjunctive ! P1 ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Informal" ++ th "Sg" ++ td (x.Subjunctive ! P2 Informal ! Sg)) ++
tr (th "Pl" ++ td (x.Subjunctive ! P2 Informal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P2 Formal" ++ th "Sg" ++ td (x.Subjunctive ! P2 Formal ! Sg)) ++
tr (th "Pl" ++ td (x.Subjunctive ! P2 Formal ! Pl)) ++
tr (intagAttr "th" "rowspan=\"2\"" "P3" ++ th "Sg" ++ td (x.Subjunctive ! P3 ! Sg)) ++
tr (th "Pl" ++ td (x.Subjunctive ! P3 ! Pl))) ;
s3=[]
} ;
lin
NoDefinition t = {s=t.s};
MkDefinition t d = {s="<p><b>Дефиниция:</b>"++t.s++d.s++"</p>"};
MkDefinitionEx t d e = {s="<p><b>Дефиниция:</b>"++t.s++d.s++"</p><p><b>Пример:</b>"++e.s++"</p>"};
lin
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ;
MkTag i = {s = i.t} ;
}

5
src/kazakh/LangKaz.gf Normal file
View File

@@ -0,0 +1,5 @@
concrete LangKaz of Lang =
LexiconKaz
,DocumentationKaz --# notpresent
** {
} ;

6
src/kazakh/LexiconKaz.gf Normal file
View File

@@ -0,0 +1,6 @@
concrete LexiconKaz of Lexicon = CatKaz ** open ParadigmsKaz in {
lin apple_N = mkN017 "алма" ;
lin walk_V = mkV015 "бару" ;
}

18789
src/kazakh/MorphoKaz.gf Normal file

File diff suppressed because it is too large Load Diff

413
src/kazakh/ParadigmsKaz.gf Normal file
View File

@@ -0,0 +1,413 @@
resource ParadigmsKaz = MorphoKaz ** open Predef, Prelude, CatKaz, ResKaz in {
oper
regN : Str -> N -- s;Nom;Sg
= \form -> case form of {
_ + "дас" => mkN004 form;
_ + "нас" => mkN004 form;
_ + "йыс" => mkN004 form;
_ + "дыс" => mkN020 form;
_ + "ніс" => mkN009 form;
_ + "гіс" => mkN009 form;
_ + "тіс" => mkN022 form;
_ + "мес" => mkN009 form;
_ + "ғат" => mkN020 form;
_ + "нат" => mkN004 form;
_ + "пат" => mkN004 form;
_ + "жат" => mkN004 form;
_ + "зат" => mkN020 form;
_ + "ұлт" => mkN004 form;
_ + "ілт" => mkN021 form;
_ + "уыт" => mkN004 form;
_ + "ірт" => mkN009 form;
_ + "орт" => mkN020 form;
_ + "ырт" => mkN020 form;
_ + "шот" => mkN004 form;
_ + "ант" => mkN004 form;
_ + "ент" => mkN021 form;
_ + "хит" => mkN004 form;
_ + "нөт" => mkN009 form;
_ + "тет" => mkN009 form;
_ + "лет" => mkN022 form;
_ + "ует" => mkN022 form;
_ + "шіт" => mkN009 form;
_ + "гіт" => mkN009 form;
_ + "ныш" => mkN001 form;
_ + "лыш" => mkN001 form;
_ + "ңеш" => mkN055 form;
_ + "піш" => mkN021 form;
_ + "ніш" => mkN021 form;
_ + "ліш" => mkN021 form;
_ + "ріш" => mkN022 form;
_ + "шам" => mkN003 form;
_ + "нам" => mkN064 form;
_ + "йым" => mkN026 form;
_ + "рым" => mkN026 form;
_ + "жым" => mkN026 form;
_ + "ным" => mkN066 form;
_ + "тым" => mkN066 form;
_ + "нім" => mkN016 form;
_ + "рім" => mkN035 form;
_ + "дем" => mkN035 form;
_ + "тан" => mkN003 form;
_ + "қан" => mkN003 form;
_ + "ран" => mkN003 form;
_ + "жан" => mkN003 form;
_ + "оян" => mkN003 form;
_ + "мән" => mkN028 form;
_ + "сін" => mkN028 form;
_ + "кін" => mkN028 form;
_ + "гін" => mkN035 form;
_ + "лен" => mkN028 form;
_ + "рен" => mkN028 form;
_ + "йың" => mkN003 form;
_ + "заң" => mkN019 form;
_ + "пап" => mkN004 form;
_ + "лып" => mkN004 form;
_ + "қып" => mkN020 form;
_ + "сық" => mkN004 form;
_ + "шық" => mkN004 form;
_ + "зақ" => mkN004 form;
_ + "уақ" => mkN004 form;
_ + "қақ" => mkN004 form;
_ + "ыла" => mkN030 form;
_ + "ола" => mkN030 form;
_ + "рда" => mkN030 form;
_ + "ұра" => mkN030 form;
_ + "йра" => mkN030 form;
_ + "аға" => mkN030 form;
_ + "ұма" => mkN030 form;
_ + "йна" => mkN030 form;
_ + "хна" => mkN030 form;
_ + "ина" => mkN030 form;
_ + "зба" => mkN030 form;
_ + "шқа" => mkN030 form;
_ + "сқа" => mkN030 form;
_ + "ьша" => mkN024 form;
_ + "ыша" => mkN024 form;
_ + "опа" => mkN024 form;
_ + "ашы" => mkN005 form;
_ + "лшы" => mkN005 form;
_ + "яшы" => mkN005 form;
_ + "юшы" => mkN005 form;
_ + "озы" => mkN005 form;
_ + "аты" => mkN024 form;
_ + "ция" => mkN030 form;
_ + "бар" => mkN017 form;
_ + "уар" => mkN017 form;
_ + "сар" => mkN017 form;
_ + "пар" => mkN017 form;
_ + "мыр" => mkN025 form;
_ + "сыр" => mkN017 form;
_ + "тыр" => mkN017 form;
_ + "жыр" => mkN017 form;
_ + "ңір" => mkN018 form;
_ + "қай" => mkN017 form;
_ + "най" => mkN025 form;
_ + "уру" => mkN006 form;
_ + "іру" => mkN018 form;
_ + "жау" => mkN006 form;
_ + "ғау" => mkN006 form;
_ + "ұну" => mkN017 form;
_ + "діл" => mkN018 form;
_ + "тіл" => mkN018 form;
_ + "ріл" => mkN018 form;
_ + "пал" => mkN038 form;
_ + "сал" => mkN038 form;
_ + "иыл" => mkN025 form;
_ + "қыл" => mkN038 form;
_ + "жол" => mkN038 form;
_ + "дек" => mkN009 form;
_ + "жек" => mkN009 form;
_ + "тек" => mkN009 form;
_ + "рік" => mkN033 form;
_ + "жік" => mkN009 form;
_ + "сік" => mkN033 form;
_ + "шік" => mkN033 form;
_ + "пік" => mkN033 form;
_ + "зік" => mkN033 form;
_ + "біз" => mkN010 form;
_ + "көз" => mkN010 form;
_ + "сөз" => mkN067 form;
_ + "быз" => mkN039 form;
_ + "кше" => mkN042 form;
_ + "рпе" => mkN042 form;
_ + "еде" => mkN023 form;
_ + "йде" => mkN042 form;
_ + "өбе" => mkN042 form;
_ + "ңге" => mkN023 form;
_ + "кте" => mkN042 form;
_ + "мле" => mkN042 form;
_ + "кші" => mkN042 form;
_ + "нші" => mkN042 form;
_ + "зші" => mkN042 form;
_ + "иші" => mkN042 form;
_ + "лші" => mkN042 form;
_ + "пші" => mkN042 form;
_ + "ңкі" => mkN042 form;
_ + "іс" => mkN021 form;
_ + "ес" => mkN021 form;
_ + "үс" => mkN021 form;
_ + "өс" => mkN021 form;
_ + "ит" => mkN021 form;
_ + "өт" => mkN021 form;
_ + "ет" => mkN021 form;
_ + "іт" => mkN021 form;
_ + "ст" => mkN021 form;
_ + "ят" => mkN020 form;
_ + "үт" => mkN022 form;
_ + "аш" => mkN001 form;
_ + "еш" => mkN021 form;
_ + "іш" => mkN009 form;
_ + "үш" => mkN021 form;
_ + "ам" => mkN002 form;
_ + "ым" => mkN003 form;
_ + "ұм" => mkN003 form;
_ + "әм" => mkN016 form;
_ + "ем" => mkN016 form;
_ + "зм" => mkN035 form;
_ + "ын" => mkN003 form;
_ + "он" => mkN003 form;
_ + "ән" => mkN016 form;
_ + "ін" => mkN016 form;
_ + "үн" => mkN016 form;
_ + "ен" => mkN016 form;
_ + "ың" => mkN026 form;
_ + "аң" => mkN003 form;
_ + "оң" => mkN026 form;
_ + "өп" => mkN022 form;
_ + "іп" => mkN009 form;
_ + "оп" => mkN020 form;
_ + "еп" => mkN022 form;
_ + "ық" => mkN020 form;
_ + "оқ" => mkN020 form;
_ + "ңқ" => mkN020 form;
_ + "та" => mkN030 form;
_ + "ша" => mkN030 form;
_ + "ва" => mkN024 form;
_ + "ка" => mkN030 form;
_ + "уа" => mkN024 form;
_ + "са" => mkN030 form;
_ + "жа" => mkN030 form;
_ + "қы" => mkN005 form;
_ + "жы" => mkN005 form;
_ + "йы" => mkN024 form;
_ + "вр" => mkN006 form;
_ + "ур" => mkN006 form;
_ + "ор" => mkN006 form;
_ + "ар" => mkN006 form;
_ + "ыр" => mkN006 form;
_ + "яр" => mkN006 form;
_ + "ір" => mkN036 form;
_ + "ұр" => mkN025 form;
_ + "әр" => mkN036 form;
_ + "ий" => mkN018 form;
_ + "ей" => mkN018 form;
_ + "ау" => mkN017 form;
_ + "қу" => mkN017 form;
_ + "еу" => mkN034 form;
_ + "ел" => mkN007 form;
_ + "іл" => mkN007 form;
_ + "үл" => mkN037 form;
_ + "өл" => mkN037 form;
_ + "ек" => mkN033 form;
_ + "үк" => mkN009 form;
_ + "із" => mkN029 form;
_ + "үз" => mkN029 form;
_ + "өз" => mkN029 form;
_ + "ез" => mkN010 form;
_ + "аз" => mkN039 form;
_ + "әж" => mkN029 form;
_ + "пе" => mkN023 form;
_ + "ке" => mkN042 form;
_ + "ме" => mkN042 form;
_ + "зе" => mkN042 form;
_ + "же" => mkN042 form;
_ + "рі" => mkN042 form;
_ + "ні" => mkN042 form;
_ + "сі" => mkN042 form;
_ + "с" => mkN001 form;
_ + "т" => mkN001 form;
_ + "ш" => mkN004 form;
_ + "м" => mkN028 form;
_ + "н" => mkN026 form;
_ + "ң" => mkN016 form;
_ + "п" => mkN043 form;
_ + "д" => mkN004 form;
_ + "қ" => mkN015 form;
_ + "х" => mkN004 form;
_ + "а" => mkN005 form;
_ + "ы" => mkN030 form;
_ + "я" => mkN024 form;
_ + "р" => mkN034 form;
_ + "и" => mkN006 form;
_ + "й" => mkN006 form;
_ + "ю" => mkN006 form;
_ + "у" => mkN025 form;
_ + "л" => mkN027 form;
_ + "к" => mkN022 form;
_ + "з" => mkN013 form;
_ + "ж" => mkN013 form;
_ + "е" => mkN032 form;
_ + "і" => mkN032 form;
_ + "ә" => mkN032 form;
_ => error "Cannot find an inflection rule"
} ;
reg2N : Str -> Str -> N -- s;Nom;Sg poss;Sg;P3;Pl
= \form1, form2 -> case <form1, form2> of {
<_ + "ғат", _ + "ы"> => mkN001 form1;
<_ + "нат", _ + "ы"> => mkN001 form1;
<_ + "уыт", _ + "ы"> => mkN001 form1;
<_ + "пат", _ + "ы"> => mkN001 form1;
<_ + "дас", _ + "ы"> => mkN001 form1;
<_ + "йым", _ + "ы"> => mkN002 form1;
<_ + "тан", _ + "ы"> => mkN026 form1;
<_ + "қан", _ + "ы"> => mkN026 form1;
<_ + "ран", _ + "ы"> => mkN026 form1;
<_ + "сық", _ + "ы"> => mkN015 form1;
<_ + "шық", _ + "ы"> => mkN015 form1;
<_ + "зба", _ + "ы"> => mkN005 form1;
<_ + "мыр", _ + "ы"> => mkN017 form1;
<_ + "дек", _ + "і"> => mkN033 form1;
<_ + "тек", _ + "і"> => mkN033 form1;
<_ + "көз", _ + "і"> => mkN029 form1;
<_ + "ым", _ + "ы"> => mkN002 form1;
<_ + "ын", _ + "ы"> => mkN026 form1;
<_ + "аң", _ + "ы"> => mkN026 form1;
<_ + "ық", _ + "ы"> => mkN015 form1;
<_ + "та", _ + "ы"> => mkN005 form1;
<_ + "ша", _ + "ы"> => mkN005 form1;
<_ + "ор", _ + "ы"> => mkN017 form1;
<_ + "ар", _ + "ы"> => mkN017 form1;
<_ + "ыр", _ + "ы"> => mkN017 form1;
<_ + "үл", _ + "і"> => mkN007 form1;
<_ + "өл", _ + "і"> => mkN007 form1;
<_ + "іш", _ + "і"> => mkN021 form1;
<_ + "ір", _ + "і"> => mkN034 form1;
<_ + "оп", _ + "ы"> => mkN043 form1;
<_ + "т", _ + "і"> => mkN021 form1;
<_ + "ш", _ + "ы"> => mkN001 form1;
<_ + "ы", _ + "ы"> => mkN005 form1;
<_ + "я", _ + "ы"> => mkN005 form1;
<_ + "й", _ + "ы"> => mkN017 form1;
<_ + "й", _ + "і"> => mkN034 form1;
<_ + "у", _ + "ы"> => mkN017 form1;
<_ + "к", _ + "і"> => mkN033 form1;
<_ + "з", _ + "ы"> => mkN039 form1;
<_ + "м", _ + "і"> => mkN016 form1;
<_ + "е", _ + "і"> => mkN042 form1;
<_ + "і", _ + "і"> => mkN042 form1;
_ => regN form1
} ;
regV : Str -> V -- Infinitive
= \form -> case form of {
_ + "лту" => mkV005 form;
_ + "pту" => mkV007 form;
_ + "eту" => mkV007 form;
_ + "iту" => mkV007 form;
_ + "үту" => mkV010 form;
_ + "тaу" => mkV006 form;
_ + "сaу" => mkV006 form;
_ + "нaу" => mkV011 form;
_ + "қaу" => mkV011 form;
_ + "paу" => mkV026 form;
_ + "apу" => mkV003 form;
_ + "ыpу" => mkV003 form;
_ + "ipу" => mkV023 form;
_ + "ту" => mkV001 form;
_ + "aу" => mkV002 form;
_ + "лу" => mkV033 form;
_ + "шу" => mkV010 form;
_ + "уу" => mkV006 form;
_ + "eу" => mkV009 form;
_ + "су" => mkV010 form;
_ + "бу" => mkV020 form;
_ + "ңу" => mkV023 form;
_ + "у" => mkV016 form;
_ => error "Cannot find an inflection rule"
} ;
reg2V : Str -> Str -> V -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg
= \form1, form2 -> case <form1, form2> of {
<_ + "aу", _ + "iн"> => mkV011 form1;
_ => regV form1
} ;
reg3V : Str -> Str -> Str -> V -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg Indicative;Pres;Progressive;Pos;P1;Pl
= \form1, form2, form3 -> case <form1, form2, form3> of {
_ => reg2V form1 form2
} ;
mkN = overload {
mkN : Str -> N = regN; -- s;Nom;Sg
mkN : Str -> Str -> N = reg2N -- s;Nom;Sg poss;Sg;P3;Pl
} ;
mkN2 = overload {
mkN2 : N -> N2 = \n -> lin N2 n ** {c2=noPrep};
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {c2=p};
} ;
mkPN : Str -> PN = \s -> lin PN {s=s} ;
mkLN : Str -> LN = \s -> lin LN {s=s} ;
mkGN : Str -> GN = \s -> lin GN {s=s} ;
mkSN : Str -> SN = \s -> lin SN {s=s} ;
mkV = overload {
mkV : Str -> V = regV; -- Infinitive
mkV : Str -> Str -> V = reg2V; -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg
mkV : Str -> Str -> Str -> V = reg3V -- Infinitive Indicative;Pres;Progressive;Pos;P1;Sg Indicative;Pres;Progressive;Pos;P1;Pl
} ;
mkV2 = overload {
mkV2 : V -> V2 = \v -> lin V2 v ** {c2=noPrep} ;
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 v ** {c2=p} ;
} ;
mkVV : V -> VV = \v -> lin VV v ;
mkVS : V -> VS = \v -> lin VS v ;
mkVQ : V -> VQ = \v -> lin VQ v ;
mkVA : V -> VA = \v -> lin VA v ;
mkV2V = overload {
mkV2V : V -> V2V = \v -> lin V2V v ** {c2,c3=noPrep} ;
mkV2V : V -> Prep -> Prep -> V2V = \v,p2,p3 -> lin V2V v ** {c2=p2; c3=p3} ;
} ;
mkV2S = overload {
mkV2S : V -> V2S = \v -> lin V2S v ** {c2,c3=noPrep} ;
mkV2S : V -> Prep -> Prep -> V2S = \v,p2,p3 -> lin V2S v ** {c2=p2; c3=p3} ;
} ;
mkV2Q = overload {
mkV2Q : V -> V2Q = \v -> lin V2Q v ** {c2,c3=noPrep} ;
mkV2Q : V -> Prep -> Prep -> V2Q = \v,p2,p3 -> lin V2Q v ** {c2=p2; c3=p3} ;
} ;
mkV2A = overload {
mkV2A : V -> V2A = \v -> lin V2A v ** {c2,c3=noPrep} ;
mkV2A : V -> Prep -> Prep -> V2A = \v,p2,p3 -> lin V2A v ** {c2=p2; c3=p3} ;
} ;
mkV3 = overload {
mkV3 : V -> V3 = \v -> lin V3 v ** {c2,c3=noPrep} ;
mkV3 : V -> Prep -> Prep -> V3 = \v,p2,p3 -> lin V3 v ** {c2=p2; c3=p3} ;
} ;
mkA : Str -> A = \s -> lin A {s=s} ;
mkA2 : A -> A2 = \a -> lin A2 a ** {c2=noPrep} ;
mkAdv : Str -> Adv = \s -> lin Adv {s=s} ;
mkAdV : Str -> AdV = \s -> lin AdV {s=s} ;
mkAdA : Str -> AdA = \s -> lin AdA {s=s} ;
mkAdN : Str -> AdN = \s -> lin AdN {s=s} ;
mkInterj : Str -> Interj = \s -> lin Interj {s=s} ;
mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
mkPrep : Str -> Prep = \s -> lin Prep {s=s} ;
noPrep : Prep = lin Prep {s=""} ;
}

326
src/kazakh/ResKaz.gf Normal file
View File

@@ -0,0 +1,326 @@
resource ResKaz = {
oper Compl = {s : Str} ;
param Case = Nom | Acc | Dat | Loc | Gen | Instr | Ablat ;
param Number = Sg | Pl ;
param Person = P1 | P2 Formality | P3 ;
param Formality = Informal | Formal ;
oper Noun = {s: Case => Number => Str; poss: Number => Person => Number => Str} ; -- 1651
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Noun =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30 ->
{ s = table {
Nom => table {
Sg => f1 ;
Pl => f2
} ;
Acc => table {
Sg => f3 ;
Pl => f4
} ;
Dat => table {
Sg => f5 ;
Pl => f6
} ;
Gen => table {
Sg => f7 ;
Pl => f8
} ;
Ablat => table {
Sg => f9 ;
Pl => f10
} ;
Instr => table {
Sg => f11 ;
Pl => f12
} ;
Loc => table {
Sg => f13 ;
Pl => f14
}
} ;
poss = table {
Sg => table {
P1 => table {
Sg => f15 ;
Pl => f16
} ;
P2 Informal => table {
Sg => f17 ;
Pl => f18
} ;
P2 Formal => table {
Sg => f19 ;
Pl => f20
} ;
P3 => table {
Sg => f21 ;
Pl => f22
}
} ;
Pl => table {
P1 => table {
Sg => f23 ;
Pl => f24
} ;
P2 Informal => table {
Sg => f25 ;
Pl => f26
} ;
P2 Formal => table {
Sg => f27 ;
Pl => f28
} ;
P3 => table {
Sg => f29 ;
Pl => f30
}
}
}
} ;
param Polarity = Pos | Neg ;
oper Verb = {Infinitive: Str; Indicative: {Fut: Str; Pres: {Progressive: Polarity => Person => Number => Str; noAspect: Polarity => Person => Number => Str}; Past: {Perfect: Polarity => Person => Number => Str; Progressive: Polarity => Person => Number => Str; noAspect: Polarity => Person => Number => Str}}; Imperative_Jussive: Polarity => Formality => Number => Str; Subjunctive: Person => Number => Str} ; -- 113
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31,f32,f33,f34,f35,f36,f37,f38,f39,f40,f41,f42,f43,f44,f45,f46,f47,f48,f49,f50,f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64,f65,f66,f67,f68,f69,f70,f71,f72,f73,f74,f75,f76,f77,f78,f79,f80,f81,f82,f83,f84,f85,f86,f87,f88,f89,f90,f91,f92,f93,f94,f95,f96,f97,f98 ->
{ Infinitive = f1 ;
Indicative = { Fut = f2 ;
Pres = { Progressive = table {
Pos => table {
P1 => table {
Sg => f3 ;
Pl => f4
} ;
P2 Informal => table {
Sg => f5 ;
Pl => f6
} ;
P2 Formal => table {
Sg => f7 ;
Pl => f8
} ;
P3 => table {
Sg => f9 ;
Pl => f10
}
} ;
Neg => table {
P1 => table {
Sg => f11 ;
Pl => f12
} ;
P2 Informal => table {
Sg => f13 ;
Pl => f14
} ;
P2 Formal => table {
Sg => f15 ;
Pl => f16
} ;
P3 => table {
Sg => f17 ;
Pl => f18
}
}
} ;
noAspect = table {
Pos => table {
P1 => table {
Sg => f19 ;
Pl => f20
} ;
P2 Informal => table {
Sg => f21 ;
Pl => f22
} ;
P2 Formal => table {
Sg => f23 ;
Pl => f24
} ;
P3 => table {
Sg => f25 ;
Pl => f26
}
} ;
Neg => table {
P1 => table {
Sg => f27 ;
Pl => f28
} ;
P2 Informal => table {
Sg => f29 ;
Pl => f30
} ;
P2 Formal => table {
Sg => f31 ;
Pl => f32
} ;
P3 => table {
Sg => f33 ;
Pl => f34
}
}
}
} ;
Past = { Perfect = table {
Pos => table {
P1 => table {
Sg => f35 ;
Pl => f36
} ;
P2 Informal => table {
Sg => f37 ;
Pl => f38
} ;
P2 Formal => table {
Sg => f39 ;
Pl => f40
} ;
P3 => table {
Sg => f41 ;
Pl => f42
}
} ;
Neg => table {
P1 => table {
Sg => f43 ;
Pl => f44
} ;
P2 Informal => table {
Sg => f45 ;
Pl => f46
} ;
P2 Formal => table {
Sg => f47 ;
Pl => f48
} ;
P3 => table {
Sg => f49 ;
Pl => f50
}
}
} ;
Progressive = table {
Pos => table {
P1 => table {
Sg => f51 ;
Pl => f52
} ;
P2 Informal => table {
Sg => f53 ;
Pl => f54
} ;
P2 Formal => table {
Sg => f55 ;
Pl => f56
} ;
P3 => table {
Sg => f57 ;
Pl => f58
}
} ;
Neg => table {
P1 => table {
Sg => f59 ;
Pl => f60
} ;
P2 Informal => table {
Sg => f61 ;
Pl => f62
} ;
P2 Formal => table {
Sg => f63 ;
Pl => f64
} ;
P3 => table {
Sg => f65 ;
Pl => f66
}
}
} ;
noAspect = table {
Pos => table {
P1 => table {
Sg => f67 ;
Pl => f68
} ;
P2 Informal => table {
Sg => f69 ;
Pl => f70
} ;
P2 Formal => table {
Sg => f71 ;
Pl => f72
} ;
P3 => table {
Sg => f73 ;
Pl => f74
}
} ;
Neg => table {
P1 => table {
Sg => f75 ;
Pl => f76
} ;
P2 Informal => table {
Sg => f77 ;
Pl => f78
} ;
P2 Formal => table {
Sg => f79 ;
Pl => f80
} ;
P3 => table {
Sg => f81 ;
Pl => f82
}
}
}
}
} ;
Imperative_Jussive = table {
Pos => table {
Informal => table {
Sg => f83 ;
Pl => f84
} ;
Formal => table {
Sg => f85 ;
Pl => f86
}
} ;
Neg => table {
Informal => table {
Sg => f87 ;
Pl => f88
} ;
Formal => table {
Sg => f89 ;
Pl => f90
}
}
} ;
Subjunctive = table {
P1 => table {
Sg => f91 ;
Pl => f92
} ;
P2 Informal => table {
Sg => f93 ;
Pl => f94
} ;
P2 Formal => table {
Sg => f95 ;
Pl => f96
} ;
P3 => table {
Sg => f97 ;
Pl => f98
}
}
} ;
}

View File

@@ -2,7 +2,7 @@
concrete AllLav of AllLavAbs = concrete AllLav of AllLavAbs =
LangLav, LangLav,
ExtraLav ExtendLav
** { ** {
flags flags

View File

@@ -1,6 +1,6 @@
--# -path=.:abstract:common:prelude --# -path=.:abstract:common:prelude
concrete CatLav of Cat = CommonX - [Adv, CAdv, Voc] ** open ResLav, Prelude in { concrete CatLav of Cat = CommonX - [Adv, CAdv] ** open ResLav, Prelude in {
flags flags
@@ -110,7 +110,9 @@ lincat
N3 = Noun ** {prep1, prep2 : Preposition ; isPre1, isPre2 : Bool} ; N3 = Noun ** {prep1, prep2 : Preposition ; isPre1, isPre2 : Bool} ;
PN = ProperNoun ; PN,LN = ProperNoun ;
GN = {s : Case => Str ; gend : Gender} ;
SN = {s : Sex => Case => Str; pl : Case => Str} ;
-- Overriden from CommonX -- Overriden from CommonX
@@ -118,4 +120,12 @@ lincat
CAdv = {s, prep : Str ; deg : Degree} ; CAdv = {s, prep : Str ; deg : Degree} ;
lindef
V2 = \s -> {s=\\_,_=>s; leftVal=Nom; rightVal={s=[]; c=\\_ => Acc}} ;
V3 = \s -> {s=\\_,_=>s; leftVal=Nom; rightVal1={s=[]; c=\\_ => Acc}; rightVal2={s=[]; c=\\_ => Dat}} ;
linref
V2 = \v -> v.s ! Pos ! VInf ++ v.rightVal.s ;
V3 = \v -> v.s ! Pos ! VInf ++ v.rightVal1.s ++ v.rightVal2.s ;
} }

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