1
0
forked from GitHub/gf-rgl

179 Commits

Author SHA1 Message Date
Inari Listenmaa
51cb9c3091 the latest tag is called release-3.12, use it here 2025-08-12 15:29:06 +02:00
Inari Listenmaa
b84cbcfc28 Merge pull request #463 from inariksit/release-morphodict
Build morphodict and put in GF_LIB_PATH
2025-08-12 15:18:27 +02:00
Inari Listenmaa
de5468e40a control morphodict from Makefile (easy to comment out if desired) 2025-08-12 15:13:51 +02:00
Inari Listenmaa
b93fd7f051 add morphodict into Setup.hs 2025-08-12 15:13:19 +02:00
Inari Listenmaa
5aa5718ca5 add MorphoDict to languages.csv 2025-08-12 15:00:45 +02:00
Krasimir Angelov
fd0706fbc1 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2025-08-12 11:13:50 +02:00
Krasimir Angelov
145e1affe9 added missing bits and pieces 2025-08-12 11:13:29 +02:00
Inari Listenmaa
3d0aa460c5 build morphodict 2025-08-11 15:32:05 +02:00
Inari Listenmaa
a0a8d99872 don't use record extension with PTypes
the current (non-majestic) runtime doesn't support it
2025-08-11 14:43:38 +02:00
Inari Listenmaa
cdc1108a36 update GitHub workflows for GF 3.12 + newer runner 2025-08-11 14:40:02 +02:00
Krasimir Angelov
1308eb85d9 fix type errors detected by the new type checker 2025-08-07 13:35:36 +02:00
Krasimir Angelov
42d06dfafd added some missing funs and cats 2025-08-07 12:19:10 +02:00
Krasimir Angelov
04df53a17a remove dead code as detected by the new typechecker 2025-05-21 14:43:45 +02:00
Krasimir Angelov
41906a31c4 TTAnt must be reimplemented for Bulgarian after we changed the tenses 2025-05-21 13:46:25 +02:00
Krasimir Angelov
2d22802af4 Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl 2025-05-21 13:45:46 +02:00
Krasimir Angelov
76f09c2464 fix vocative for paradigm N008b 2025-05-21 13:45:26 +02:00
Inari Listenmaa
1825904f4d (Chi) add mkAdv instance that doesn't pattern match any strings 2025-05-09 15:29:21 +02:00
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
245 changed files with 613954 additions and 1893 deletions

View File

@@ -8,19 +8,26 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-18.04 runs-on: ubuntu-24.04
env: env:
GF_VERSION: 3.10-1 GF_VERSION: 3.12
DEST: gf-rgl-${{ github.event.inputs.tag }} DEST: gf-rgl-${{ github.event.inputs.tag }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Download GF
uses: dsaltares/fetch-gh-release-asset@1.1.1
with:
repo: 'GrammaticalFramework/gf-core'
version: 'tags/release-${{ env.GF_VERSION }}'
file: 'gf-${{ env.GF_VERSION }}-ubuntu-24.04.deb'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install GF - name: Install GF
run: | run: |
curl -s https://www.grammaticalframework.org/download/gf_${GF_VERSION}_amd64.deb -o gf.deb sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb
sudo dpkg -i gf.deb
- name: Build RGL - name: Build RGL
run: | run: |

View File

@@ -6,26 +6,26 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
env: env:
GF_VERSION: 3.11 GF_VERSION: 3.12
DEST: gf-rgl DEST: gf-rgl
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Download GF - name: Download GF
uses: dsaltares/fetch-gh-release-asset@1.1.1 uses: dsaltares/fetch-gh-release-asset@1.1.1
with: with:
repo: 'GrammaticalFramework/gf-core' repo: 'GrammaticalFramework/gf-core'
version: 'tags/${{ env.GF_VERSION }}' version: 'tags/release-${{ env.GF_VERSION }}'
file: 'gf-${{ env.GF_VERSION }}-ubuntu-20.04.deb' file: 'gf-${{ env.GF_VERSION }}-ubuntu-24.04.deb'
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Install GF - name: Install GF
run: | run: |
sudo dpkg -i gf-${GF_VERSION}-ubuntu-20.04.deb sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb
- name: Build RGL - name: Build RGL
run: | run: |

View File

@@ -25,6 +25,7 @@ data LangInfo = LangInfo
, langSymbolic :: Bool , langSymbolic :: Bool
, langCompatibility :: Bool , langCompatibility :: Bool
, langSynopsis :: Bool -- ^ include in RGL synopsis , langSynopsis :: Bool -- ^ include in RGL synopsis
, langMorphodict :: Bool
} deriving (Show,Eq) } deriving (Show,Eq)
-- | Load language information from default config file -- | Load language information from default config file
@@ -55,6 +56,7 @@ loadLangsFrom configFile = do
, langSymbolic = boolBit bits 8 True , langSymbolic = boolBit bits 8 True
, langCompatibility = boolBit bits 9 False , langCompatibility = boolBit bits 9 False
, langSynopsis = boolBit bits 10 False , langSynopsis = boolBit bits 10 False
, langMorphodict = boolBit bits 11 False
} }
-- | Separate a string on a character -- | Separate a string on a character

View File

@@ -19,6 +19,7 @@ default: build copy
build: src/*/*.gf build: src/*/*.gf
ifneq (, $(RUNGHC)) ifneq (, $(RUNGHC))
$(RUNGHC) build $(RUNGHC) build
$(RUNGHC) build morphodict
else else
./Setup.sh ./Setup.sh
endif endif
@@ -26,6 +27,7 @@ endif
copy: copy:
ifneq (, $(RUNGHC)) ifneq (, $(RUNGHC))
$(RUNGHC) copy $(RUNGHC) copy
$(RUNGHC) copy morphodict
endif endif
install: build copy install: build copy

View File

@@ -1,4 +1,4 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP, LambdaCase #-}
-- | Main build script for RGL -- | Main build script for RGL
@@ -150,11 +150,12 @@ getRGLBuildSubDir mode =
case mode of case mode of
Present -> "present" Present -> "present"
AllTenses -> "alltenses" AllTenses -> "alltenses"
MorphoDict -> "morphodict"
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Build modes -- Build modes
data Mode = Present | AllTenses data Mode = Present | AllTenses | MorphoDict
deriving (Show,Eq) deriving (Show,Eq)
all_modes :: [String] all_modes :: [String]
@@ -187,6 +188,7 @@ rglCommands =
, RGLCommand "lang" False $ gfcp [l,s] , RGLCommand "lang" False $ gfcp [l,s]
, RGLCommand "api" False $ gfcp [t,sc] , RGLCommand "api" False $ gfcp [t,sc]
, RGLCommand "compat" False $ gfcp [c] , RGLCommand "compat" False $ gfcp [c]
, RGLCommand "morphodict" False $ gfcp [m]
-- Special command, invoked when command ends in .gf -- Special command, invoked when command ends in .gf
, RGLCommand "modules" False $ \modes args bi -> do , RGLCommand "modules" False $ \modes args bi -> do
@@ -223,14 +225,20 @@ rglCommands =
s mode args = (symbol,optml mode langTry args) s mode args = (symbol,optml mode langTry args)
c mode args = (compat,optml AllTenses langCompatibility args) c mode args = (compat,optml AllTenses langCompatibility args)
t mode args = (try,optml mode langTry args) t mode args = (try,optml mode langTry args)
m mode args = (morphodict,optml mode langMorphodict args)
sc mode args = (symbolic,optml mode langSymbolic args) sc mode args = (symbolic,optml mode langSymbolic args)
optml :: Mode -> (LangInfo -> Bool) -> [String] -> ([LangInfo] -> [LangInfo]) optml :: Mode -> (LangInfo -> Bool) -> [String] -> ([LangInfo] -> [LangInfo])
optml mode pred args = optml mode pred args =
\langsAll -> \langsAll ->
let langsDefault = filter (if mode == Present then langPresent else const True) (filter pred langsAll) let langsDefault = filter (mode2langinfo mode) (filter pred langsAll)
in getOptLangs langsAll langsDefault args in getOptLangs langsAll langsDefault args
mode2langinfo = \case
Present -> langPresent
MorphoDict -> langMorphodict
_ -> const True
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Getting module paths/names -- Getting module paths/names
@@ -260,6 +268,9 @@ syntax l = sourceDir </> "api" </> ("Syntax" ++ langCode l ++ ".gf")
symbolic :: LangInfo -> FilePath symbolic :: LangInfo -> FilePath
symbolic l = sourceDir </> "api" </> ("Symbolic" ++ langCode l ++ ".gf") symbolic l = sourceDir </> "api" </> ("Symbolic" ++ langCode l ++ ".gf")
morphodict :: LangInfo -> FilePath
morphodict l = sourceDir </> "morphodict" </> ("MorphoDict" ++ langCode l ++ ".gf")
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Argument helpers -- Argument helpers
@@ -302,8 +313,9 @@ getOptMode args =
else explicit_modes else explicit_modes
where where
explicit_modes = explicit_modes =
[Present|have "present"]++ [Present | have "present"] ++
[AllTenses|have "alltenses"] [AllTenses | have "alltenses"] ++
[MorphoDict | have "morphodict"]
have mode = mode `elem` args have mode = mode `elem` args
-- | List of languages overriding the default definitions -- | List of languages overriding the default definitions
@@ -366,8 +378,8 @@ gfcn :: Info -> Mode -> String -> [FilePath] -> IO ()
gfcn bi mode summary files = do gfcn bi mode summary files = do
let dir = getRGLBuildDir bi mode let dir = getRGLBuildDir bi mode
preproc = case mode of preproc = case mode of
Present -> "--preproc=mkPresent" Present -> "--preproc=mkPresent"
AllTenses -> "" _ -> ""
createDirectoryIfMissing True dir createDirectoryIfMissing True dir
if length files > 0 if length files > 0
then do then do

View File

@@ -59,6 +59,7 @@ gfc="${gf} --batch --quiet --gf-lib-path=${dist}"
mkdir -p "${dist}/prelude" mkdir -p "${dist}/prelude"
mkdir -p "${dist}/present" mkdir -p "${dist}/present"
mkdir -p "${dist}/alltenses" mkdir -p "${dist}/alltenses"
mkdir -p "${dist}/morphodict"
# Build: prelude # Build: prelude
echo "Building [prelude]" echo "Building [prelude]"
@@ -68,6 +69,7 @@ ${gfc} --gfo-dir="${dist}"/prelude "${src}"/prelude/*.gf
# Gather all language modules for building # Gather all language modules for building
modules_present= modules_present=
modules_alltenses= modules_alltenses=
modules_morphodict=
for lang in $langs; do for lang in $langs; do
for mod in $modules_langs $modules_api; do for mod in $modules_langs $modules_api; do
if [ $mod == "Compatibility" ] && [[ "$langs_compat" != *"$lang"* ]]; then continue; fi if [ $mod == "Compatibility" ] && [[ "$langs_compat" != *"$lang"* ]]; then continue; fi
@@ -80,8 +82,12 @@ for lang in $langs; do
modules_alltenses="${modules_alltenses} ${file}" modules_alltenses="${modules_alltenses} ${file}"
done done
done done
file="${src}/morphodict/MorphoDict${lang}.gf"
if [ ! -f "$file" ]; then continue; fi
modules_morphodict="${modules_morphodict} ${file}"
done done
# Build: present # Build: present
echo "Building [present]" echo "Building [present]"
if [ $verbose = true ]; then echo $modules_present; fi if [ $verbose = true ]; then echo $modules_present; fi
@@ -96,6 +102,13 @@ for module in $modules_alltenses; do
${gfc} --no-pmcfg --gfo-dir="${dist}"/alltenses "${module}" ${gfc} --no-pmcfg --gfo-dir="${dist}"/alltenses "${module}"
done done
# Build: morphodict
echo "Building [morphodict]"
if [ $verbose = true ]; then echo $modules_morphodict; fi
for module in $modules_morphodict; do
${gfc} --no-pmcfg --gfo-dir="${dist}"/morphodict "${module}"
done
# Copy # Copy
if [ $dest == $dist ]; then exit 0; fi if [ $dest == $dist ]; then exit 0; fi
echo "Copying to ${dest}" echo "Copying to ${dest}"

View File

@@ -1,55 +1,58 @@
Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis,MorphoDict
Afr,Afrikaans,afrikaans,,,,,,n,,y Afr,Afrikaans,afrikaans,,,,,,n,,y,n
Amh,Amharic,amharic,,,,,n,n,,n Amh,Amharic,amharic,,,,,n,n,,n,n
Ara,Arabic,arabic,,,,,,y,,y Ara,Arabic,arabic,,,,,,y,,y,y
Bul,Bulgarian,bulgarian,,,y,,,,,y Bul,Bulgarian,bulgarian,,,y,,,,,y,n
Cat,Catalan,catalan,Romance,,y,,,,y,y Cat,Catalan,catalan,Romance,,y,,,,y,y,n
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y Cgg,Rukiga,rukiga,,,y,y,n,n,y,y,n
Chi,Chinese (simplified),chinese,,,,,,,,y Chi,Chinese (simplified),chinese,,,,,,,,y,y
Cze,Czech,czech,,,,,,n,,y Cze,Czech,czech,,,,,,n,,y,n
Dan,Danish,danish,Scand,,y,,,,,y Dan,Danish,danish,Scand,,y,,,,,y,n
Dut,Dutch,dutch,,,y,,,,,y Dut,Dutch,dutch,,,y,,,,,y,n
Eng,English,english,,,y,,,,y,y Eng,English,english,,,y,,,,y,y,y
Est,Estonian,estonian,,,,,,,,y Est,Estonian,estonian,,,,,,,,y,n
Eus,Basque,basque,,,,,,,,y Eus,Basque,basque,,,,,,,,y,n
Fin,Finnish,finnish,,,y,,,,y,y Fin,Finnish,finnish,,,y,,,,y,y,y
Fre,French,french,Romance,,y,,,,y,y Fre,French,french,Romance,,y,,,,y,y,y
Ger,German,german,,,y,,,,,y Ger,German,german,,,y,,,,,y,y
Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n,n
Gre,Greek,greek,,,,,,,,y Gre,Greek,greek,,,,,,,,y,n
Heb,Hebrew,hebrew,,,,,n,n,,n Heb,Hebrew,hebrew,,,,,n,n,,n,n
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y,n
Hrv,Croatian,croatian,,,,,,y,,n Hrv,Croatian,croatian,,,,,,y,,n,n
Hun,Hungarian,hungarian,,,n,y,y,y,n,n Hun,Hungarian,hungarian,,,n,y,y,y,n,n,n
Ice,Icelandic,icelandic,,,,,,n,,y Ice,Icelandic,icelandic,,,,,,n,,y,n
Ina,Interlingua,interlingua,,,y,,n,n,,n Ina,Interlingua,interlingua,,,y,,n,n,,n,n
Ita,Italian,italian,Romance,,y,,,,y,y Ita,Italian,italian,Romance,,y,,,,y,y,y
Jpn,Japanese,japanese,,,,,,,,y Jpn,Japanese,japanese,,,,,,,,y,n
Kor,Korean,korean,,,n,y,y,y,n,n Kaz,Kazakh,kazakh,,,,y,n,n,n,y,n
Lat,Latin,latin,,,,,y,y,n,y Kor,Korean,korean,,,n,y,y,y,n,n,n
Lav,Latvian,latvian,,,,,,,y,y Lat,Latin,latin,,,,,y,y,n,y,n
May,Malay,malay,,,y,,,,n,y Lav,Latvian,latvian,,,,,,,y,y,n
Mlt,Maltese,maltese,,,,,,,,y Mkd,Macedonian,macedonian,,,,y,n,n,n,y,n
Mon,Mongolian,mongolian,,,,,,n,,y May,Malay,malay,,,y,,,,n,y,n
Nep,Nepali,nepali,,,,,,n,,y Mlt,Maltese,maltese,,,,,,,,y,n
Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y Mon,Mongolian,mongolian,,,,,,n,,y,n
Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y Nep,Nepali,nepali,,,,,,n,,y,n
Pes,Persian,persian,,,,,,,,y Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y,n
Pnb,Punjabi,punjabi,,,y,,,,,y Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y,n
Pol,Polish,polish,,,,,,,,y Pes,Persian,persian,,,,,,,,y,n
Por,Portuguese,portuguese,Romance,,y,,,,y,y Pnb,Punjabi,punjabi,,,y,,,,,y,n
Ron,Romanian,romanian,,,y,,,,,y Pol,Polish,polish,,,,,,,,y,n
Rus,Russian,russian,,,y,,,,,y Por,Portuguese,portuguese,Romance,,y,,,,y,y,y
Slo,Slovak,slovak,,,,,,n,,y Ron,Romanian,romanian,,,y,,,,,y,n
Slv,Slovenian,slovenian,,,,,n,n,,n Rus,Russian,russian,,,y,,,,,y,n
Snd,Sindhi,sindhi,,,,,,,,y Slo,Slovak,slovak,,,,,,n,,y,n
Spa,Spanish,spanish,Romance,,y,,,,y,y Slv,Slovenian,slovenian,,,,,n,n,,n,n
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n Snd,Sindhi,sindhi,,,,,,,,y,n
Swe,Swedish,swedish,Scand,,y,,,,y,y Spa,Spanish,spanish,Romance,,y,,,,y,y,y
Tam,Tamil,tamil,n,n,n,n,n,n,n,n Sqi,Albanian,albanian,,,,y,n,n,n,y,n
Tel,Telugu,telugu,,,y,n,n,n,,n Swa,Swahili,swahili,Bantu,,,y,n,n,n,n,n
Tha,Thai,thai,,to_thai,,,,,,y Swe,Swedish,swedish,Scand,,y,,,,y,y,y
Tur,Turkish,turkish,,,y,,,n,,n Tam,Tamil,tamil,n,n,n,n,n,n,n,n,n
Urd,Urdu,urdu,Hindustani,,,,,,,y Tel,Telugu,telugu,,,y,n,n,n,,n,n
Som,Somali,somali,,,,,n,n,,n Tha,Thai,thai,,to_thai,,,,,,y,n
Zul,Zulu,zulu,,,,,n,n,,n Tur,Turkish,turkish,,,y,,,n,,n,n
Urd,Urdu,urdu,Hindustani,,,,,,,y,n
Som,Somali,somali,,,,,n,n,,n,n
Zul,Zulu,zulu,,,,,n,n,,n,n
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis MorphoDict
2 Afr Afrikaans afrikaans n y n
3 Amh Amharic amharic n n n n
4 Ara Arabic arabic y y y
5 Bul Bulgarian bulgarian y y n
6 Cat Catalan catalan Romance y y y n
7 Cgg Rukiga rukiga y y n n y y n
8 Chi Chinese (simplified) chinese y y
9 Cze Czech czech n y n
10 Dan Danish danish Scand y y n
11 Dut Dutch dutch y y n
12 Eng English english y y y y
13 Est Estonian estonian y n
14 Eus Basque basque y n
15 Fin Finnish finnish y y y y
16 Fre French french Romance y y y y
17 Ger German german y y y
18 Grc Ancient Greek ancient_greek y n n n n
19 Gre Greek greek y n
20 Heb Hebrew hebrew n n n n
21 Hin Hindi hindi Hindustani to_devanagari y y n
22 Hrv Croatian croatian y n n
23 Hun Hungarian hungarian n y y y n n n
24 Ice Icelandic icelandic n y n
25 Ina Interlingua interlingua y n n n n
26 Ita Italian italian Romance y y y y
27 Jpn Japanese japanese y n
28 Kor Kaz Korean Kazakh korean kazakh n y y n y n n n y n
29 Lat Kor Latin Korean latin korean n y y y n y n n
30 Lav Lat Latvian Latin latvian latin y y y n y n
31 May Lav Malay Latvian malay latvian y n y y n
32 Mlt Mkd Maltese Macedonian maltese macedonian y n n n y n
33 Mon May Mongolian Malay mongolian malay y n n y n
34 Nep Mlt Nepali Maltese nepali maltese n y n
35 Nno Mon Norwegian (nynorsk) Mongolian nynorsk mongolian y n y n
36 Nor Nep Norwegian (bokmål) Nepali norwegian nepali Scand y n y n
37 Pes Nno Persian Norwegian (nynorsk) persian nynorsk y y n
38 Pnb Nor Punjabi Norwegian (bokmål) punjabi norwegian Scand y y n
39 Pol Pes Polish Persian polish persian y n
40 Por Pnb Portuguese Punjabi portuguese punjabi Romance y y y n
41 Ron Pol Romanian Polish romanian polish y y n
42 Rus Por Russian Portuguese russian portuguese Romance y y y y
43 Slo Ron Slovak Romanian slovak romanian y n y n
44 Slv Rus Slovenian Russian slovenian russian y n n n y n
45 Snd Slo Sindhi Slovak sindhi slovak n y n
46 Spa Slv Spanish Slovenian spanish slovenian Romance y n n y y n n
47 Swa Snd Swahili Sindhi swahili sindhi Bantu y n n n n y n
48 Swe Spa Swedish Spanish swedish spanish Scand Romance y y y y
49 Tam Sqi Tamil Albanian tamil albanian n n n n y n n n n y n
50 Tel Swa Telugu Swahili telugu swahili Bantu y n y n n n n n
51 Tha Swe Thai Swedish thai swedish Scand to_thai y y y y
52 Tur Tam Turkish Tamil turkish tamil n n y n n n n n n n
53 Urd Tel Urdu Telugu urdu telugu Hindustani y n n n y n n
54 Som Tha Somali Thai somali thai to_thai n n n y n
55 Zul Tur Zulu Turkish zulu turkish y n n n n
56 Urd Urdu urdu Hindustani y n
57 Som Somali somali n n n n
58 Zul Zulu zulu 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

@@ -315,7 +315,7 @@ param
--2 Transformations between parameter types --2 Transformations between parameter types
oper Agr : Type = {g : Gender ; n : Number ; p : Person} ; oper Agr : PType = {g : Gender ; n : Number ; p : Person} ;
oper oper
agrP3 : Number -> Agr = agrgP3 Neutr ; agrP3 : Number -> Agr = agrgP3 Neutr ;

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,17 @@
--# -path=.:../hungarian:../common:../abstract:../prelude --# -path=.:../hungarian:../common:../abstract:../prelude
resource TryHun = SyntaxHun, LexiconHun, ParadigmsHun - [mkAdv] ; resource TryHun = SyntaxHun-[mkAdN], LexiconHun, ParadigmsHun - [mkAdv,mkAdN] **
open (P = ParadigmsHun) in {
oper
mkAdv = overload SyntaxHun {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxHun.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

@@ -19,7 +19,7 @@ param
oper oper
-- AGRE = {g : Gender ; n : Number ; p : Person} ; -- AGRE = {g : Gender ; n : Number ; p : Person} ;
Agre : Type = {g : Gender ; n : Number ; p : Person} ; Agre : PType = {g : Gender ; n : Number ; p : Person} ;
agre : Gender -> Number -> Person -> Agre = \g,n,p -> {g = g ; n = n ; p = p} ; agre : Gender -> Number -> Person -> Agre = \g,n,p -> {g = g ; n = n ; p = p} ;
agrFeatures : Agr -> Agre = \a -> case a of {Ag g n p => {g = g ; n = n ; p = p}} ; agrFeatures : Agr -> Agre = \a -> case a of {Ag g n p => {g = g ; n = n ; p = p}} ;

View File

@@ -1,5 +1,5 @@
--# -coding=utf8 --# -coding=utf8
concrete CatBul of Cat = CommonX - [Temp,Tense,IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in { concrete CatBul of Cat = CommonX - [Temp,Tense,TTAnt,IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in {
lincat lincat
-- Tensed/Untensed -- Tensed/Untensed

View File

@@ -32,7 +32,6 @@ concrete ConjunctionBul of Conjunction =
ConjAP conj ss = { ConjAP conj ss = {
s = \\aform,p => linCoord []!conj.sep ++ ss.s!aform!p!conj.sep ++ conj.s ++ ss.s!aform!p!4; s = \\aform,p => linCoord []!conj.sep ++ ss.s!aform!p!conj.sep ++ conj.s ++ ss.s!aform!p!4;
adv = ss.adv!conj.conj ++ conj.s ++ ss.adv!4;
isPre = ss.isPre isPre = ss.isPre
} ; } ;

View File

@@ -33,13 +33,13 @@ oper
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkAS : A -> AS ; mkAS : A -> AS ;
mkAS v = v ** {lock_A = <>} ; mkAS v = v ;
mkA2S : A -> Prep -> A2S ; mkA2S : A -> Prep -> A2S ;
mkA2S v p = mkA2 v p ** {lock_A = <>} ; mkA2S v p = mkA2 v p ;
mkAV : A -> AV ; mkAV : A -> AV ;
mkAV v = v ** {lock_A = <>} ; mkAV v = v ;
mkA2V : A -> Prep -> A2V ; mkA2V : A -> Prep -> A2V ;
mkA2V v p = mkA2 v p ** {lock_A2 = <>} ; mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
@@ -75,7 +75,6 @@ oper
compoundV : V -> Str -> V ; compoundV : V -> Str -> V ;
compoundV v adv = { compoundV v adv = {
s = \\asp,vform => v.s ! asp ! vform ++ adv ; s = \\asp,vform => v.s ! asp ! vform ++ adv ;
n = \\nform => v.n ! nform ++ adv ;
vtype = VNormal; vtype = VNormal;
lock_V=<> lock_V=<>
} ; } ;
@@ -105,7 +104,7 @@ oper
-- the first one or both can be absent. -- the first one or both can be absent.
mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about
mkV3 v p q = {s = v.s; s1 = v.s1; c2 = p; c3 = q; vtype = v.vtype; lock_V3 = <>} ; mkV3 v p q = {s = v.s; c2 = p; c3 = q; vtype = v.vtype; lock_V3 = <>} ;
dirV3 : V -> Prep -> V3 ; -- give,_,to dirV3 : V -> Prep -> V3 ; -- give,_,to
dirV3 v p = mkV3 v noPrep p ; dirV3 v p = mkV3 v noPrep p ;
@@ -189,9 +188,9 @@ oper
compoundN = overload { compoundN = overload {
compoundN : Str -> N -> N compoundN : Str -> N -> N
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ; = \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relType = AdvMod; g=n.g ; lock_N = <>} ;
compoundN : N -> Str -> N compoundN : N -> Str -> N
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ; = \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relType = AdvMod; g=n.g ; lock_N = <>} ;
compoundN : N -> N -> N compoundN : N -> N -> N
= \n1,n2 -> lin N = \n1,n2 -> lin N
{s = table { {s = table {

View File

@@ -187,7 +187,7 @@ oper
in {s = mkNoun (v0+"е"+v1) in {s = mkNoun (v0+"е"+v1)
(v0+v1+"и") (v0+v1+"и")
(v0+"е"+v1+"а") (v0+"е"+v1+"а")
(v0+"е"+v1+"е") (v0+v1+"ьо")
g ; g ;
rel = \\_ => base ; relType = Pref ; rel = \\_ => base ; relType = Pref ;
g = g ; g = g ;

View File

@@ -70,8 +70,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q
} ; } ;
UseRCl t p cl = { UseRCl t p cl = {
s = \\agr => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! agr ; s = \\agr => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! agr
role = cl.role
} ; } ;
UseSlash t p cl = { UseSlash t p cl = {
s = \\agr => t.s ++ p.s ++ cl.s ! agr ! t.t ! t.a ! p.p ! Main ; s = \\agr => t.s ++ p.s ++ cl.s ! agr ! t.t ! t.a ! p.p ! Main ;

View File

@@ -1,6 +1,7 @@
concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in { concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TTAnt,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in {
lin lin
TTAnt t a = {s = a.s ++ t.s ; a = a.a ; t = t.t} ;
TPres = {s = []} ** {t = VPresent} ; TPres = {s = []} ** {t = VPresent} ;
TPast = {s = []} ** {t = VPastImperfect} ; --# notpresent TPast = {s = []} ** {t = VPastImperfect} ; --# notpresent
TFut = {s = []} ** {t = VFut} ; --# notpresent TFut = {s = []} ** {t = VFut} ; --# notpresent

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

@@ -42,14 +42,14 @@ flags
-- To abstract over gender names, we define the following identifiers. -- To abstract over gender names, we define the following identifiers.
oper oper
Gender : Type ; Gender : PType ;
masculine : Gender ; masculine : Gender ;
feminine : Gender ; feminine : Gender ;
-- To abstract over number names, we define the following. -- To abstract over number names, we define the following.
Number : Type ; Number : PType ;
singular : Number ; singular : Number ;
plural : Number ; plural : Number ;

View File

@@ -155,6 +155,8 @@ oper
= \s,at -> lin Adv {s = word s ; advType = at ; hasDe = advTypeHasDe at} ; = \s,at -> lin Adv {s = word s ; advType = at ; hasDe = advTypeHasDe at} ;
mkAdv : Adv -> AdvType -> Adv -- To fix the AdvType in an Adv produced by SyntaxChi.mkAdv mkAdv : Adv -> AdvType -> Adv -- To fix the AdvType in an Adv produced by SyntaxChi.mkAdv
= \adv,at -> adv ** {advType = at ; hasDe = advTypeHasDe at} ; = \adv,at -> adv ** {advType = at ; hasDe = advTypeHasDe at} ;
mkAdv : Str -> AdvType -> Bool -> Adv
= \s,at,hasDe -> lin Adv {s = word s ; advType = at ; hasDe = hasDe} ;
} ; } ;

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
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ; CardCNCard card cn = {
size = NS_20_ s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
} ; 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

@@ -512,8 +512,8 @@ param
-- IL2018-02: a whole lot of times we only need number and person, not gender -- IL2018-02: a whole lot of times we only need number and person, not gender
-- maybe switch to PersAgr at some point and halve the number of fields -- maybe switch to PersAgr at some point and halve the number of fields
oper PersAgr : Type = {n : Number ; p : Person} ; oper PersAgr : PType = {n : Number ; p : Person} ;
oper Agr : Type = PersAgr ** {g : Gender} ; oper Agr : PType = {n : Number ; p : Person ; g : Gender} ;
oper oper
pagr : Agr -> PersAgr = \agr -> { p = agr.p ; n = agr.n } ; pagr : Agr -> PersAgr = \agr -> { p = agr.p ; n = agr.n } ;

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

@@ -62,7 +62,7 @@ oper
-- Adjectives --- could be made more compact by pressing comparison forms down to a few -- Adjectives --- could be made more compact by pressing comparison forms down to a few
oper oper
SAForm : Type = AForm ; SAForm : PType = AForm ;
oper oper
SAdj = {s : SAForm => Str ; h : Harmony} ; SAdj = {s : SAForm => Str ; h : Harmony} ;
@@ -112,7 +112,7 @@ oper
-- verbs -- verbs
oper oper
SVForm : Type = VForm ; SVForm : PType = VForm ;
SVerb : Type = {s : SVForm => Str ; h : Harmony} ; SVerb : Type = {s : SVForm => Str ; h : Harmony} ;
ollaSVerbForms : SVForm => Str = verbOlla.s ; ollaSVerbForms : SVForm => Str = verbOlla.s ;

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

@@ -40,14 +40,14 @@ resource ParadigmsFre =
-- To abstract over gender names, we define the following identifiers. -- To abstract over gender names, we define the following identifiers.
oper oper
Gender : Type ; Gender : PType ;
masculine : Gender ; masculine : Gender ;
feminine : Gender ; feminine : Gender ;
-- To abstract over number names, we define the following. -- To abstract over number names, we define the following.
Number : Type ; --% Number : PType ; --%
singular : Number ; --% singular : Number ; --%
plural : Number ; --% plural : Number ; --%

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

@@ -39,7 +39,7 @@ resource ResGre = ParamX ** open Prelude in {
oper oper
AAgr : Type = {g : Gender ; n : Number} ; AAgr : PType = {g : Gender ; n : Number} ;
VP = { v : Verb ; clit,clit2 : Str ; comp : Agr => Str ; isNeg : Bool ; voice : Voice ; aspect :Aspect} ; VP = { v : Verb ; clit,clit2 : Str ; comp : Agr => Str ; isNeg : Bool ; voice : Voice ; aspect :Aspect} ;
@@ -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

@@ -117,7 +117,7 @@ concrete CatHun of Cat = CommonX - [Adv] ** open ResHun, Prelude in {
N, N,
N2, N2,
N3 = ResHun.Noun ; N3 = ResHun.Noun ;
PN = ResHun.NounPhrase ; PN,LN,GN,SN = ResHun.NounPhrase ;
Adv = {s : Str ; isPre : Bool} ; Adv = {s : Str ; isPre : Bool} ;

View File

@@ -6,7 +6,10 @@ lincat
Sub10 = LinDigit ; Sub10 = LinDigit ;
Sub100, Sub100,
Sub1000, Sub1000,
Sub1000000 = ResHun.Numeral ; Sub1000000,
Sub1000000000,
Sub1000000000000 = ResHun.Numeral ;
lin lin
-- TODO: Add case inflection and ordinal forms to all numerals -- TODO: Add case inflection and ordinal forms to all numerals
@@ -72,6 +75,9 @@ lin
{s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ; {s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ;
n = numNumber ; numtype = IsNum} ; n = numNumber ; numtype = IsNum} ;
pot3as4 n = n ;
pot4as5 n = n ;
oper oper
LinDigit : Type = {s : DForm*Place => Str ; n : Number} ; LinDigit : Type = {s : DForm*Place => Str ; n : Number} ;

View File

@@ -31,6 +31,14 @@ oper
-- mkPN : N -> Number -> PN ; -- mkPN : N -> Number -> PN ;
} ; } ;
mkLN : overload {
mkLN : Str -> PN ; -- Singular PN out of a string
mkLN : Str -> Number -> PN -- PN with a given number
} ;
mkGN : Str -> PN ; -- GN out of a string
mkSN : Str -> SN ; -- SN out of a string
--2 Adjectives --2 Adjectives
mkA : overload { mkA : overload {
@@ -110,6 +118,9 @@ oper
mkAdA : Str -> AdA mkAdA : Str -> AdA
= \s -> lin AdA {s = s} ; = \s -> lin AdA {s = s} ;
mkAdN : Str -> AdN
= \s -> lin AdN {s = s} ;
--. --.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@@ -184,6 +195,14 @@ oper
-- mkPN : N -> Number -> PN ; -- mkPN : N -> Number -> PN ;
} ; } ;
mkLN = overload {
mkLN : Str -> LN = \s -> lin LN (defNP s Sg) ;
mkLN : Str -> Number -> LN = \s,n -> lin LN (defNP s n) ;
} ;
mkGN s = lin GN (defNP s Sg) ;
mkSN s = lin SN (defNP s Sg) ;
mkA = overload { mkA = overload {
mkA : (sgnom : Str) -> A = \s -> lin A (mkAdj s) ; mkA : (sgnom : Str) -> A = \s -> lin A (mkAdj s) ;
mkA : (sgnom,sgacc : Str) -> A = \nom,acc -> mkA : (sgnom,sgacc : Str) -> A = \nom,acc ->
@@ -213,17 +232,54 @@ oper
copula = ResHun.copula ; copula = ResHun.copula ;
mkVS = overload {
mkVS : Str -> VS = \v -> lin VS (mkVerb v) ;
mkVS : V -> VS = \v -> lin VS v ;
} ;
mkVQ = overload {
mkVQ : Str -> VQ = \v -> lin VQ (mkVerb v) ;
mkVQ : V -> VQ = \v -> lin VQ v ;
} ;
mkVA = overload {
mkVA : Str -> VA = \v -> lin VA (mkVerb v) ;
mkVA : V -> VA = \v -> lin VA v ;
} ;
mkV2 = overload { mkV2 = overload {
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ; mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
mkV2 : V -> V2 = vtov2 ; mkV2 : V -> V2 = vtov2 ;
} ; } ;
mkVV = overload {
mkVV : Str -> VV = \v -> lin VV (mkVerb2 v) ;
mkVV : V -> VV = \v -> lin VV (vtov2 v) ;
} ;
mkV2A = overload {
mkV2A : Str -> V2A = \v -> lin V2A (mkVerb2 v) ;
mkV2A : V -> V2A = \v -> lin V2A (vtov2 v) ;
} ;
mkV2V = overload {
mkV2V : Str -> V2V = \v -> lin V2V (mkVerb2 v) ;
mkV2V : V -> V2V = \v -> lin V2V (vtov2 v) ;
} ;
mkV2S = overload {
mkV2S : Str -> V2S = \v -> lin V2S (mkVerb2 v) ;
mkV2S : V -> V2S = \v -> lin V2S (vtov2 v) ;
} ;
mkV2Q = overload {
mkV2Q : Str -> V2Q = \v -> lin V2Q (mkVerb2 v) ;
mkV2Q : V -> V2Q = \v -> lin V2Q (vtov2 v) ;
} ;
mkV3 = overload { mkV3 = overload {
mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ; mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ;
} ; } ;
--
-- mkVV = overload {
-- } ;
mkPrep = overload { mkPrep = overload {
mkPrep : (e : Str) -> Prep mkPrep : (e : Str) -> Prep
@@ -234,6 +290,8 @@ oper
casePrep : Case -> Prep casePrep : Case -> Prep
= \c -> lin Prep (ResHun.caseAdp c) ; = \c -> lin Prep (ResHun.caseAdp c) ;
mkInterj : Str -> Interj = \s -> lin Interj {s = s} ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
} }

View File

@@ -121,12 +121,12 @@ lin under_Prep = nomAdp "alatt" ;
-- Pron -- Pron
-- Pronouns are closed class, no constructor in ParadigmsHun. -- Pronouns are closed class, no constructor in ParadigmsHun.
-- it_Pron =
i_Pron = pronTable ! <P1,Sg> ; i_Pron = pronTable ! <P1,Sg> ;
youPol_Pron, youPol_Pron,
youSg_Pron = pronTable ! <P2,Sg> ; youSg_Pron = pronTable ! <P2,Sg> ;
he_Pron, he_Pron,
she_Pron = pronTable ! <P3,Sg> ; she_Pron,
it_Pron = pronTable ! <P3,Sg> ;
we_Pron = pronTable ! <P1,Pl> ; we_Pron = pronTable ! <P1,Pl> ;
youPl_Pron = pronTable ! <P2,Pl> ; youPl_Pron = pronTable ! <P2,Pl> ;
they_Pron = pronTable ! <P3,Pl> ; they_Pron = pronTable ! <P3,Pl> ;

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 ;

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