1
0
forked from GitHub/gf-rgl

Merge pull request #4 from ppski/polish-inari-update

More smart paradigms
This commit is contained in:
Inari Listenmaa
2020-10-12 08:09:24 +02:00
committed by GitHub
548 changed files with 454048 additions and 363350 deletions

View File

@@ -7,7 +7,7 @@ REM ---
REM Modules to compile for each language
REM TODO read from languages.csv
set langs=Afr Amh Ara Eus Bul Cat Chi Dan Dut Eng Est Fin Fre Grc Gre Heb Hin Ger Ice Ina Ita Jpn Lat Lav Mlt Mon Nep Nor Nno Pes Pol Por Pnb Ron Rus Snd Spa Swe Tha Tur Urd
set langs=Afr Amh Ara Eus Bul Cat Chi Cze Dan Dut Eng Est Fin Fre Grc Gre Heb Hin Hun Ger Ice Ina Ita Jpn Lat Lav Mlt Mon Nep Nor Nno Pes Pol Por Pnb Ron Rus Slo Snd Spa Swe Tha Tur Urd
set modules_langs=All Symbol Compatibility
set modules_api=Try Symbolic

View File

@@ -67,6 +67,16 @@ http://acl.ldc.upenn.edu/W/W07/W07-08.pdf
//and agreement of constructions with numerals.//
===Basque===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/basque (Inari Listenmaa, Francis Tyers)
- **Publications**
Inari Listenmaa.
//Formal Methods for Testing Grammars.// PhD thesis. Chalmers University of Technology and University of Gothenburg. 2019. [PDF https://gupea.ub.gu.se/bitstream/2077/59037/1/gupea_2077_59037_1.pdf]
#BR
//Mentioned in Chapter 5 of the thesis.//
===Bulgarian===
@@ -117,6 +127,10 @@ Appendix to the GF book (A. Ranta, //Grammatical Framework//, CSLI 2011),
http://www.grammaticalframework.org/gf-book/gf-chinese-appendix.pdf
===Czech===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/czech (Aarne Ranta, Michal Měchura)
===Danish===
@@ -155,8 +169,13 @@ The GF Resource Grammar Library.
- **Source**: http://www.grammaticalframework.org/lib/src/estonian (Kaarel Kaljurand, Inari Listenmaa)
%- **Publications**
- **Publications**
Inari Listenmaa and Kaarel Kaljurand.
Computational Estonian Grammar in Grammatical Framework.
//Proceedings of the SALTMIL Workshop at LREC//,
2014.
[PDF http://ixa2.si.ehu.es/~jipsagak/SALTMIL/LREC_2014_Workshop_Proceedings_Saltmil.pdf]
===Finnish===
@@ -256,6 +275,9 @@ In The 3rd Workshop
on South and Southeast Asian NLP, COLING 2012. //Reprinted in Shafqat's thesis//
===Hungarian===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/hungarian (Inari Listenmaa, Julia Jansson)
===Icelandic===
@@ -281,8 +303,6 @@ Bjarki Traustason, MSc thesis, Chalmers
%- **Publications**
===Japanese===
- **Source**: http://www.grammaticalframework.org/lib/src/japanese (Liza Zimina)
@@ -302,14 +322,31 @@ Lecture Notes in Computer Science Volume 7614, 2012, pp 156-167.
http://link.springer.com/chapter/10.1007%2F978-3-642-33983-7_16
===Korean===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/korean (Inari Listenmaa)
===Latin===
- **Source**: http://www.grammaticalframework.org/lib/src/latin (Aarne Ranta)
- **Source**: http://www.grammaticalframework.org/lib/src/latin (Herbert Lange, Aarne Ranta)
%- **Publications**
- **Publications**
Herbert Lange.
Erstellen einer Grammatik für das Lateinische im “Grammatical Framework”,
Masters thesis (Magiserarbeit), Ludwig-Maximilians-University Munich, 2013.
Herbert Lange. Implementation of a Latin Grammar in Grammatical Framework, //DATeCH//, 2017.
Herbert Lange and Peter Ljunglöf.
MULLE: A grammar-based Latin language learning tool to supplement the classroom setting.
//Proceedings of the 5th Workshop on Natural Language Processing Techniques for Educational Applications//,
2018.
[PDF https://www.aclweb.org/anthology/W18-3715.pdf]
#BR
//Latin RGL used in a language-learning application.//
===Latvian===
@@ -397,6 +434,15 @@ Slide presentation, TYPES 2010, Warsaw,
http://www.mimuw.edu.pl/~asl/publications/types2010-slides.pdf
===Portuguese===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/portuguese (Bruno Cuconato)
- **Publications**
Bruno Cuconato Claro.
//A computational grammar for Portuguese//. MSc thesis. Rio de Janeiro, 2019.
===Punjabi===
@@ -438,7 +484,7 @@ LNCS 6008,
===Russian===
- **Source**: http://www.grammaticalframework.org/lib/src/russian (Janna Khegai, Nikita Frolov)
- **Source**: http://www.grammaticalframework.org/lib/src/russian (Janna Khegai, Nikita Frolov, Roman Suzi)
- **Publications**
@@ -475,6 +521,21 @@ MSc Thesis, Chalmers University of Technology,
http://publications.lib.chalmers.se/records/fulltext/163234.pdf
===Slovak===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/slovak (Aarne Ranta, Slavomír Čéplö, Michal Měchura)
===Slovenian===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/slovenian (Krasimir Angelov, Anna Ehrlemark)
===Somali===
- **Source**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/somali (Inari Listenmaa)
===Spanish===
- **Source**: http://www.grammaticalframework.org/lib/src/spanish http://www.grammaticalframework.org/lib/src/romance
@@ -485,7 +546,8 @@ http://publications.lib.chalmers.se/records/fulltext/163234.pdf
===Swahili===
- **Source**: http://www.grammaticalframework.org/lib/src/swahili (Wanjiku Ng'ang'a)
- **Source**: http://www.grammaticalframework.org/lib/src/swahili (Benson Kituku).
- **Previous version**: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/swahili/old (Wanjiku Ng'ang'a).
- **Publications**
@@ -519,10 +581,6 @@ P. Sojka et al (eds), TSD 2012, LNCS 7499, pp. 183-190.
http://link.springer.com/content/pdf/10.1007%2F978-3-642-32790-2_22.pdf
===Thai===
- **Source**: http://www.grammaticalframework.org/lib/src/thai (Aarne Ranta, Chotiros Kairoje)
@@ -556,3 +614,17 @@ July 21-22, 2007, LSA 2007 Linguistic Institute, Stanford University.
2007.
See also **Hindi** above.
===Zulu===
- **Source:** https://github.com/LauretteM/gf-rgl-zul/tree/master/src/zulu (Laurette Marais, Laurette Pretorius)
- **Publications**
Laurette Marais, Johannes A. Louw, Jaco Badenhorst, Karen Calteaux, Ilana Wilken, Nina van Niekerk,and Glenn Stein.
AwezaMed: A Multilingual, MultimodalSpeech-To-Speech Translation Application for Maternal Health Care.
//Proceedings of the 23rd International Conference on Information Fusion//.
July 6-9, 2020.
#BR
//The article presents a health care translation system, which uses the Zulu resource grammar.//

View File

@@ -11,60 +11,63 @@ For another view, see the
[The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/] .
Corrections and additions are welcome! Notice that only those parts of implementations
that are currently available via http://grammaticalframework.org
that are currently available via https://github.com/GrammaticalFramework/gf-rgl/
are marked in the table
|| ISO | Language | Git | Mini | Parad | Lex | Lang | API | Symb | Irreg | Dict | Trans | tested | publ | authors ||
| Afr | Afrikaans | + | - | ++ | + | + | + | - | - | - | - | - | - | *LP,LM
| Amh | Amharic | + | + | ++ | + | + | - | - | - | - | - | - | + | *MK
| Ara | Arabic | + | + | + | + | + | + | + | - | - | - | + | + | AD,*IL
| Bul | Bulgarian | + | + | + | + | + | + | + | + | + | + | ++ | + | *KA
| Cat | Catalan | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *JS,*IL
| Chi | Chinese | + | - | ++ | + | + | + | - | - | + | + | - | + | ZL,*AR,*CP,QH
| Dan | Danish | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
| Dut | Dutch | + | + | ++ | + | + | + | + | + | - | + | + | - | *AR,FJ
| Eng | English | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *AR,BB,KA
| Est | Estonian | + | - | ++ | + | + | + | - | - | + | + | + | + | *KK,*IL
| Eus | Basque | + | - | ++ | + | + | + | - | - | - | - | - | + | *IL
| Fin | Finnish | + | + | ++ | + | + | + | + | - | + | + | ++ | + | *AR,*IL
| Fre | French | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,RE
| Ger | German | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,HH,EG
| Gre | Greek(mod) | + | - | ++ | + | + | + | - | - | - | - | - | + | *IP
| Grc | Greek(anc) | - | - | - | - | - | - | - | - | - | - | - | + | *HLe
| Heb | Hebrew | + | - | - | - | - | - | - | - | - | - | - | + | *DD
| Hin | Hindi | + | + | ++ | + | + | + | + | - | - | + | + | + | *SV,*KP,MH,AR,PK
| Ice | Icelandic | + | - | ++ | + | + | + | - | - | - | - | - | + | *BT
| Ina | Interlingua | + | + | ++ | + | + | - | - | - | - | - | - | - | JB
| Ita | Italian | + | + | ++ | + | + | + | + | - | - | + | ++ | - | *AR,*RE,GP
| Jpn | Japanese | + | - | ++ | + | + | + | - | - | - | + | + | + | *LZ
| Lat | Latin | + | - | - | - | - | - | - | - | + | - | - | - | *AR,*HLa
| Lav | Latvian | + | - | ++ | + | + | + | - | - | - | - | + | + | *NG,*PP
| Mlt | Maltese | + | + | ++ | + | + | + | + | - | - | - | - | + | *JC
| Mon | Mongolian | + | - | ++ | + | + | + | - | - | + | - | - | + | *NE
| Nep | Nepali | + | + | ++ | + | + | - | - | - | - | - | - | + | *DS
| Nno | Norwegian(n) | + | + | ++ | + | + | + | + | + | - | - | - | - | *SRE
| Nor | Norwegian(b) | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
| Pes | Persian | + | - | + | + | + | + | - | - | - | - | + | + | SV,EA,SM,*IL
| Pnb | Punjabi | + | + | + | + | + | + | + | - | - | - | - | + | *SV,MH
| Pol | Polish | + | + | + | + | + | + | + | - | - | - | + | + | IN,*AS
| Por | Portuguese | + | + | ++ | + | + | + | + | + | - | + | + | - | *BC
| Ron | Romanian | + | + | ++ | + | + | + | + | - | - | - | + | + | *RE
| Rus | Russian | + | + | ++ | + | + | + | - | - | + | + | - | + | JK,*NF
| Snd | Sindhi | + | + | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD
| Spa | Spanish | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *AR,IA,TS,*IL
| Swa | Swahili | + | - | - | - | - | - | - | - | - | - | - | + | *WN,JM
| Swe | Swedish | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *MA,*AR,MF
| Tha | Thai | + | - | ++ | + | + | + | + | - | - | + | + | - | *AR,CK
| Tsn | Tswana | - | - | - | - | - | - | - | - | - | - | - | - | *LP,AB
| Tur | Turkish | + | - | ++ | + | - | - | - | - | + | - | - | - | *SC,KA
| Urd | Urdu | + | + | ++ | + | + | + | + | - | - | - | + | + | *SV,MH
|| ISO | Language | Parad | Lex | Lang | API | Symb | Irreg | Dict | WN | tested | publ | authors ||
| Afr | Afrikaans | ++ | + | + | + | - | - | - | - | - | - | *LP,LM |
| Amh | Amharic | ++ | + | + | - | - | - | - | - | - | + | *MK |
| Ara | Arabic | + | + | + | + | + | - | - | - | + | + | AD,*IL |
| Bul | Bulgarian | + | + | + | + | + | + | + | + | ++ | + | *KA |
| Cat | Catalan | ++ | + | + | + | + | + | - | + | ++ | - | *JS,*IL |
| Chi | Chinese | ++ | + | + | + | - | - | + | + | - | + | ZL,*AR,*CP,QH |
| Cze | Czech | + | + | + | + | - | - | - | - | + | - | *AR,*MM |
| Dan | Danish | ++ | + | + | + | + | + | - | - | + | - | *AR |
| Dut | Dutch | ++ | + | + | + | + | + | - | + | + | - | *AR,FJ |
| Eng | English | ++ | + | + | + | + | + | + | + | ++ | + | *AR,BB,KA |
| Est | Estonian | ++ | + | + | + | - | - | + | + | + | + | *KK,*IL |
| Eus | Basque | ++ | + | + | + | - | - | - | - | - | + | *IL |
| Fin | Finnish | ++ | + | + | + | + | - | + | + | ++ | + | *AR,*IL |
| Fre | French | ++ | + | + | + | + | + | + | - | ++ | - | *AR,RE |
| Ger | German | ++ | + | + | + | + | + | + | - | ++ | - | *AR,HH,EG |
| Gre | Greek(mod) | ++ | + | + | + | - | - | - | - | - | + | *IP |
| Grc | Greek(anc) | - | - | - | - | - | - | - | - | - | + | *HLe |
| Heb | Hebrew | - | - | - | - | - | - | - | - | - | + | *DD |
| Hin | Hindi | ++ | + | + | + | + | - | - | - | + | + | *SV,*KP,MH,AR,PK |
| Hun | Hungarian | ++ | + | + | + | + | - | - | - | + | - | *IL,*JJ |
| Ice | Icelandic | ++ | + | + | + | - | - | - | - | - | + | *BT |
| Ina | Interlingua | ++ | + | + | - | - | - | - | - | - | - | JB |
| Ita | Italian | ++ | + | + | + | + | - | - | + | ++ | - | *AR,*RE,GP |
| Jpn | Japanese | ++ | + | + | + | - | - | - | - | + | + | *LZ |
| Kor | Korean | ++ | + | + | + | + | - | - | - | + | - | *IL |
| Lat | Latin | - | - | - | - | - | - | + | - | - | - | *AR,*HLa |
| Lav | Latvian | ++ | + | + | + | - | - | - | - | + | + | *NG,*PP |
| Mlt | Maltese | ++ | + | + | + | + | - | - | - | - | + | *JC |
| Mon | Mongolian | ++ | + | + | + | - | - | + | - | - | + | *NE |
| Nep | Nepali | ++ | + | + | - | - | - | - | - | - | + | *DS |
| Nno | Norwegian(n) | ++ | + | + | + | + | + | - | - | - | - | *SRE |
| Nor | Norwegian(b) | ++ | + | + | + | + | + | - | - | + | - | *AR |
| Pes | Persian | + | + | + | + | - | - | - | - | + | + | SV,EA,SM,*IL |
| Pnb | Punjabi | + | + | + | + | + | - | - | - | - | + | *SV,MH |
| Pol | Polish | + | + | + | + | + | - | - | - | + | + | IN,*AS |
| Por | Portuguese | ++ | + | + | + | + | + | + | + | + | + | *BC |
| Ron | Romanian | ++ | + | + | + | + | - | - | - | + | + | *RE |
| Rus | Russian | ++ | + | + | + | - | - | + | - | - | + | JK,NF,*RS |
| Slk | Slovak | + | + | + | + | - | - | - | - | + | - | *AR,*MM,SČ |
| Slv | Slovene | ++ | + | + | + | - | - | - | + | + | - | *KA,AE |
| Snd | Sindhi | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD |
| Som | Somali | + | - | - | - | - | - | - | - | - | - | *IL |
| Spa | Spanish | ++ | + | + | + | + | + | - | + | ++ | - | *AR,IA,TS,*IL |
| Swa | Swahili | + | + | - | - | - | - | - | - | - | + | *WN,JM,BK |
| Swe | Swedish | ++ | + | + | + | + | + | + | + | ++ | + | *MA,*AR,MF |
| Tha | Thai | ++ | + | + | + | + | - | - | + | + | - | *AR,CK |
| Tur | Turkish | ++ | + | - | - | - | - | + | + | - | - | *SC,KA |
| Urd | Urdu | ++ | + | + | + | + | - | - | - | + | + | *SV,MH |
ISO = 3-letter ISO language code, used in library file names
(mostly ISO 639-2 B (bibliographic))
Git = available in the gf-rgl Git repository
Parad = ``Paradigms`` file complete for major POS, ++ means with smart paradigms
Lex = the resource ``Lexicon`` (nearly) complete
@@ -73,13 +76,13 @@ Lang = the resource ``Syntax`` (nearly) complete
API = the ``Syntax`` compiles
Symb = the ``Symbolic`` API compiles
Symb = the ``Symbolic`` API complete
Irreg = the ``Irreg`` module with irregular verbs exists
Dict = the ``Dict`` module, large-scale morphological lexicon, exists
Trans = large-scale translation module and dictionary exists
WN = [WordNet https://cloud.grammaticalframework.org/wordnet] lexicon exists
tested = tested in some applications, ++ means extensively tested with no major issues
@@ -93,10 +96,12 @@ authors = main contributors, * means still active
AB Ansu Berg,
AD Ali El Dada,
AE Anna Ehrlemark,
AR Aarne Ranta,
AS Adam Slaski,
BB Björn Bringert,
BC Bruno Cuconato,
BK Benson Kituku,
BT Bjarki Traustason,
CK Chotiros Kairoje,
CP Chen Peng,
@@ -116,6 +121,7 @@ IP Ioanna Papadopoulou,
JB Jean-Philippe Bernardy,
JC John J. Camilleri,
JD Jherna Devi,
JJ Julia Jansson,
JK Janna Khegai,
JM Juliet Mutahi,
JS Jordi Saludes,
@@ -129,13 +135,16 @@ MA Malin Ahlberg,
MF Markus Forsberg,
MK Markos Kassa Gobena,
MH Muhammad Humayoun,
MM Michal Měchura,
NE Nyamsuren Erdenebadrakh,
NF Nick Frolov,
NG Normunds Gruzitis,
QH Qiao Haiyan,
RE Ramona Enache,
RS Roman Suzi,
PP Peteris Paikens,
SC Server Cimen,
SČ Slavomír Čéplö,
SM Sofy Moradi,
SRE Stian Rødven Eide,
SV Shafqat Virk,
@@ -147,7 +156,7 @@ ZL Zhuo Lin Qiqige
==Rules==
Only components available at http://grammaticalframework.org are indicated in the table.
Only components available at https://github.com/GrammaticalFramework/gf-rgl/ are indicated in the table.
If you want to work on a language already in the table, please be kind and contact the
active authors of it.

View File

@@ -5,6 +5,7 @@ Ara,Arabic,arabic,,,,,,y,,y
Bul,Bulgarian,bulgarian,,,y,,,,,y
Cat,Catalan,catalan,Romance,,y,,,,y,y
Chi,Chinese (simplified),chinese,,,,,,,,y
Cze,Czech,czech,,,,,,n,,y
Dan,Danish,danish,Scand,,y,,,,,y
Dut,Dutch,dutch,,,y,,,,,y
Eng,English,english,,,y,,,,y,y
@@ -17,11 +18,12 @@ Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n
Gre,Greek,greek,,,,,,,,y
Heb,Hebrew,hebrew,,,,,n,n,,n
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
Hun,Hungarian,hungarian,,,y,n,n,n,,n
Hun,Hungarian,hungarian,,,n,y,y,y,n,n
Ice,Icelandic,icelandic,,,,,,n,,y
Ina,Interlingua,interlingua,,,y,,n,n,,n
Ita,Italian,italian,Romance,,y,,,,y,y
Jpn,Japanese,japanese,,,,,,,,y
Kor,Korean,korean,,,n,y,y,y,n,n
Lat,Latin,latin,,,,,y,y,n,y
Lav,Latvian,latvian,,,,,,,y,y
Mlt,Maltese,maltese,,,,,,,,y
@@ -35,12 +37,13 @@ Pol,Polish,polish,,,,,,,,y
Por,Portuguese,portuguese,Romance,,y,,,,y,y
Ron,Romanian,romanian,,,y,,,,,y
Rus,Russian,russian,,,y,,,,,y
Slo,Slovak,slovak,,,,,,n,,y
Slv,Slovenian,slovenian,,,,,n,n,,n
Snd,Sindhi,sindhi,,,,,,,,y
Spa,Spanish,spanish,Romance,,y,,,,y,y
Swa,Swahili,swahili,,,,n,n,n,y,n
Swa,Swahili,swahili,Bantu,,,n,n,n,n,n
Swe,Swedish,swedish,Scand,,y,,,,y,y
Tel,Telugu,telugu,,,y,n,n,n,,n
Tha,Thai,thai,,to_thai,,,,,,y
Tur,Turkish,turkish,,,,,n,n,,n
Tur,Turkish,turkish,,,y,,,n,,n
Urd,Urdu,urdu,Hindustani,,,,,,,y
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis
5 Bul Bulgarian bulgarian y y
6 Cat Catalan catalan Romance y y y
7 Chi Chinese (simplified) chinese y
8 Cze Czech czech n y
9 Dan Danish danish Scand y y
10 Dut Dutch dutch y y
11 Eng English english y y y
18 Gre Greek greek y
19 Heb Hebrew hebrew n n n
20 Hin Hindi hindi Hindustani to_devanagari y y
21 Hun Hungarian hungarian y n n y n y n y n n
22 Ice Icelandic icelandic n y
23 Ina Interlingua interlingua y n n n
24 Ita Italian italian Romance y y y
25 Jpn Japanese japanese y
26 Kor Korean korean n y y y n n
27 Lat Latin latin y y n y
28 Lav Latvian latvian y y
29 Mlt Maltese maltese y
37 Por Portuguese portuguese Romance y y y
38 Ron Romanian romanian y y
39 Rus Russian russian y y
40 Slo Slovak slovak n y
41 Slv Slovenian slovenian n n n
42 Snd Sindhi sindhi y
43 Spa Spanish spanish Romance y y y
44 Swa Swahili swahili Bantu n n n y n n
45 Swe Swedish swedish Scand y y y
46 Tel Telugu telugu y n n n n
47 Tha Thai thai to_thai y
48 Tur Turkish turkish y n n n
49 Urd Urdu urdu Hindustani y

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsCze = Combinators with
(Cat = CatCze),
(Structural = StructuralCze),
(Constructors = ConstructorsCze)
** open MissingCze in {}

View File

@@ -0,0 +1,7 @@
--# -path=.:alltenses:prelude:src/hungarian
resource CombinatorsHun = Combinators with
(Cat = CatHun),
(Structural = StructuralHun),
(Noun = NounHun),
(Constructors = ConstructorsHun) ** open MissingHun in {} ;

View File

@@ -0,0 +1,7 @@
--# -path=.:alltenses:prelude:../korean
resource CombinatorsKor = Combinators with
(Cat = CatKor),
(Structural = StructuralKor),
(Noun = NounKor),
(Constructors = ConstructorsKor) ** open MissingKor in {} ;

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsSlo = Combinators with
(Cat = CatSlo),
(Structural = StructuralSlo),
(Constructors = ConstructorsSlo)
** open MissingSlo in {}

View File

@@ -0,0 +1,9 @@
--# -path=.:alltenses:prelude
resource CombinatorsTur = Combinators with
(Cat = CatTur),
(Structural = StructuralTur),
(Noun = NounTur),
(Constructors = ConstructorsTur) **
{
}

View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
resource ConstructorsCze = Constructors with (Grammar = GrammarCze)
** open MissingCze in {}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude:../hungarian
resource ConstructorsHun = Constructors with (Grammar = GrammarHun) ** open MissingHun in {} ;

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude:../korean
resource ConstructorsKor = Constructors with (Grammar = GrammarKor) ** open MissingKor in {} ;

View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
resource ConstructorsSlo = Constructors with (Grammar = GrammarSlo)
** open MissingSlo in {}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsTur = Constructors with (Grammar = GrammarTur) ;

6
src/api/SymbolicCze.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../czech:../common:../abstract:../prelude
resource SymbolicCze = Symbolic with
(Symbol = SymbolCze),
(Grammar = GrammarCze)
** open MissingCze in {}

5
src/api/SymbolicHun.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../hungarian:../common:../abstract:../prelude
resource SymbolicHun = Symbolic with
(Symbol = SymbolHun),
(Grammar = GrammarHun) ** open MissingHun in {} ;

5
src/api/SymbolicKor.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../korean:../common:../abstract:../prelude
resource SymbolicKor = Symbolic with
(Symbol = SymbolKor),
(Grammar = GrammarKor) ** open MissingKor in {} ;

6
src/api/SymbolicSlo.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../slovak:../common:../abstract:../prelude
resource SymbolicSlo = Symbolic with
(Symbol = SymbolSlo),
(Grammar = GrammarSlo)
** open MissingSlo in {}

4
src/api/SyntaxCze.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:./alltenses:../prelude
instance SyntaxCze of Syntax =
ConstructorsCze, CatCze, StructuralCze, CombinatorsCze ;

4
src/api/SyntaxHun.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:alltenses:prelude:../hungarian
instance SyntaxHun of Syntax =
ConstructorsHun, CatHun, StructuralHun, CombinatorsHun ;

5
src/api/SyntaxKor.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude:../korean
instance SyntaxKor of Syntax =
ConstructorsKor, CatKor, StructuralKor, CombinatorsKor **
open MissingKor in {} ;

4
src/api/SyntaxSlo.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:./alltenses:../prelude
instance SyntaxSlo of Syntax =
ConstructorsSlo, CatSlo, StructuralSlo, CombinatorsSlo ;

4
src/api/SyntaxTur.gf Normal file
View File

@@ -0,0 +1,4 @@
--# -path=.:alltenses:prelude
instance SyntaxTur of Syntax = ConstructorsTur, CatTur, StructuralTur, CombinatorsTur ;

13
src/api/TryCze.gf Normal file
View File

@@ -0,0 +1,13 @@
--# -path=.:../czech:../common:../abstract:../prelude
resource TryCze = SyntaxCze, LexiconCze, ParadigmsCze -[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsCze) in {
-- oper
-- mkAdv = overload SyntaxCze {
-- mkAdv : Str -> Adv = P.mkAdv ;
-- } ;
}

3
src/api/TryHun.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../hungarian:../common:../abstract:../prelude
resource TryHun = SyntaxHun, LexiconHun, ParadigmsHun - [mkAdv] ;

3
src/api/TryKor.gf Normal file
View File

@@ -0,0 +1,3 @@
--# -path=.:../korean:../common:../abstract:../prelude
resource TryKor = SyntaxKor, LexiconKor, ParadigmsKor - [mkAdv] ;

View File

@@ -1,3 +1,3 @@
--# -path=.:../russian:../common:../abstract:../prelude
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv] ;
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv,mkIAdv,mkOrd] ;

13
src/api/TrySlo.gf Normal file
View File

@@ -0,0 +1,13 @@
--# -path=.:../slovak:../common:../abstract:../prelude
resource TrySlo = SyntaxSlo, LexiconSlo, ParadigmsSlo -[mkAdv, mkDet,mkQuant]**
open (P = ParadigmsSlo) in {
-- oper
-- mkAdv = overload SyntaxSlo {
-- mkAdv : Str -> Adv = P.mkAdv ;
-- } ;
}

11
src/api/TryTur.gf Normal file
View File

@@ -0,0 +1,11 @@
--# -path=.:../turkish:../common:../abstract:../prelude
resource TryTur = SyntaxTur, LexiconTur, ParadigmsTur - [mkAdN,mkAdv,mkNum,mkQuant] **
open (P = ParadigmsTur), (R = ResTur) in {
oper
mkAdv = overload SyntaxTur {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
}

View File

@@ -1,5 +1,5 @@
incomplete concrete CatBantu of Cat =
CommonX - [Pol]
incomplete concrete CatBantu of Cat =
CommonX
** open ResBantu, Prelude, ParamX in {
flags optimize=all_subs ;
@@ -7,8 +7,6 @@ incomplete concrete CatBantu of Cat =
lincat
Pol = {s : Str ; b : Bool} ;
S = {s : Str} ;
QS = {s : QForm => Str} ;
RS = {s : Agr => Str ; c : NPCase} ; -- c for it clefts
@@ -16,7 +14,7 @@ incomplete concrete CatBantu of Cat =
-- Sentence
-- Cl = {s : Tense => Anteriority => Bool => Str} ;
Cl = {s : Tense => Anteriority => Bool => Str} ;
-- ClSlash = {
-- s : ResKam.Tense => Anteriority => Bool => Str ;
-- } ;

View File

@@ -11,6 +11,7 @@ flags
oper
npNom : NPCase = NCase Nom ;
npLoc : NPCase = NCase Loc ;
NPAcc : NPCase = NCase Nom ; -- Added this so that swahili compiles. /IL2020
npcase2case : NPCase -> Case = \nc -> case nc of {NCase c => c ; _ => Nom} ;
@@ -81,14 +82,3 @@ oper
finalComma : Str = pre {"," | "." => []; "" => SOFT_BIND ++ ","; _ => []} ;
frontComma : Str = SOFT_BIND ++ "," ;
}
-- insertObject:
-- p -cat=Cl -tr "la femme te l' envoie"
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
-- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron))
-- la femme te l' a envoyé
--
-- p -cat=Cl -tr "la femme te lui envoie"
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
-- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron))
-- la femme te lui a envoyée

View File

@@ -1,14 +1,10 @@
incomplete concrete SentenceBantu of Sentence =
CatBantu ** open Prelude, CommonBantu, ResBantu in {
{-
flags optimize=all_subs ;
coding=utf8 ;
lin
PredVP np vp = mkClause (np.s ! npNom) np.a vp ;
PredVP np vp = mkClause (np.s ! npNom) (agrFeatures np.a) vp ;
{-
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
ImpVP vp = {
@@ -43,11 +39,12 @@ incomplete concrete SentenceBantu of Sentence =
EmbedS s = {s = conjThat ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = infVP VVInf vp Simul CPos (agrP3 Sg)} ; --- agr
UseCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.b } ;
-}
UseCl t p cl =
let b : Bool = case p.p of {Pos => True ; _ => False}
in {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! b} ;
-- UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! p.b} ;
UseQCl t p cl = {
{- UseQCl t p cl = {
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q
} ;
UseRCl t p cl = {

View File

@@ -1,11 +1,9 @@
incomplete concrete VerbBantu of Verb =
CatBantu ** open Prelude, CommonBantu, ResBantu in {
{-
flags optimize=all_subs ;
lin
UseV = predV ;
{-
SlashV2a v = predV v ** {c2 = v.c2 ; gapInMiddle = False} ;
Slash2V3 v np =
insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predV v ** {c2 = v.c3 ; gapInMiddle = False}) ;

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
PositA a = {
@@ -9,11 +9,11 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
} ;
ComparA a np = {
s = \\aform,_ => "ïî" ++ hyphen ++ a.s ! aform ++ "îò" ++ np.s ! RObj CPrep ;
s = \\aform,_ => "по" ++ hyphen ++ a.s ! aform ++ "от" ++ np.s ! RObj CPrep ;
isPre = True
} ;
UseComparA a = {
s = \\aform,_ => "ïî" ++ hyphen ++ a.s ! aform ;
s = \\aform,_ => "по" ++ hyphen ++ a.s ! aform ;
isPre = True
} ;
@@ -35,7 +35,7 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
} ;
ReflA2 a = {
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["ñåáå ñè"] ;
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["себе си"] ;
isPre = False
} ;

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
PositAdvAdj a = {s = a.adv} ;
@@ -8,7 +8,7 @@ concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ np.s ! RObj CPrep
} ;
ComparAdvAdjS cadv a s = {
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ "êîëêîòî" ++ s.s
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ "колкото" ++ s.s
} ;
PrepNP prep np = {s = prep.s ++ np.s ! RObj prep.c} ;

View File

@@ -83,9 +83,9 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (
A = {s : AForm => Str; adv : Str; isPre : Bool} ;
A2 = {s : AForm => Str; adv : Str; c2 : Preposition} ;
N = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ;
N2 = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ** {c2,c3 : Preposition} ;
N = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ;
N2 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2 : Preposition} ;
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
PN = {s : Str; g : Gender} ;
lindef
@@ -105,9 +105,9 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (
A = \s -> {s = \\_ => s; adv = s; isPre = True};
A2 = \s -> {s = \\_ => s; adv = s; c2 = {s=""; c=Acc}};
N = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman};
N2 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2 = {s=""; c=Acc}};
N3 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2,c3 = {s=""; c=Acc}};
N = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman};
N2 = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman; c2 = {s=""; c=Acc}};
N3 = \s -> {s = \\_ => s; rel = \\_ => s; relType = Pref; g = AMasc NonHuman; c2,c3 = {s=""; c=Acc}};
linref
SSlash = \ss -> ss.s ! agrP3 (GSg Masc) ++ ss.c2.s;

View File

@@ -4,21 +4,21 @@ concrete CompatibilityBul of Compatibility = CatBul ** open Prelude, ResBul in {
-- from Noun 19/4/2008
flags
coding = cp1251 ;
coding = utf8 ;
lin
NumInt n = {s = \\_ => n.s; n = Pl; nonEmpty = True} ;
OrdInt n = {s = \\aform => n.s ++ "-" ++
case aform of {
ASg Masc Indef => "òè" ;
ASg Fem Indef => "òà" ;
ASg Neut Indef => "òî" ;
ASg Masc Def => "òèÿ" ;
ASg Fem Def => "òàòà" ;
ASg Neut Def => "òîòî" ;
ASgMascDefNom => "òèÿò" ;
APl Indef => "òè" ;
APl Def => "òèòå"
ASg Masc Indef => "ти" ;
ASg Fem Indef => "та" ;
ASg Neut Indef => "то" ;
ASg Masc Def => "тия" ;
ASg Fem Def => "тата" ;
ASg Neut Def => "тото" ;
ASgMascDefNom => "тият" ;
APl Indef => "ти" ;
APl Def => "тите"
}
} ;

View File

@@ -1,7 +1,7 @@
--# -coding=cp1251
--# -coding=utf8
concrete ConjunctionBul of Conjunction =
CatBul ** open ResBul, Coordination, Prelude, Predef in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;

View File

@@ -133,7 +133,7 @@ lin
oper
mkMonth : Str -> Str -> N = \n,a -> lin N {
s = \\_ => n ;
rel = (mkA078 a).s ; relPost = False ;
rel = (mkA078 a).s ; relType = R.AdjMod ;
g = R.AMasc R.NonHuman
} ;
}

View File

@@ -31,24 +31,29 @@ lin
tr (intagAttr "th" "colspan=\"2\"" "звателна форма" ++ td (n.s ! NFVocative)) ++
tr (intagAttr "th" "colspan=\"2\"" "бройна форма" ++ td (n.s ! NFPlCount))
) ;
s3= heading1 ("Прилагателно") ++
frameTable (
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
th "нечленувано" ++
td (n.rel ! (ASg Masc Indef))) ++
tr (th "непълен член" ++ td (n.rel ! (ASg Masc Def))) ++
tr (th "пълен член" ++ td (n.rel ! ASgMascDefNom)) ++
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Fem Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Fem Def))) ++
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Neut Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Neut Def))) ++
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
th "нечленувано" ++ td (n.rel ! (APl Indef))) ++
tr (th "членувано" ++ td (n.rel ! (APl Def)))
)
s3= case n.relType of {
Pref => [] ;
AdjMod => heading1 ("Прилагателно") ++
frameTable (
tr (intagAttr "th" "rowspan=\"7\"" "ед.ч." ++
intagAttr "th" "rowspan=\"3\"" "мн.ч." ++
th "нечленувано" ++
td (n.rel ! (ASg Masc Indef))) ++
tr (th "непълен член" ++ td (n.rel ! (ASg Masc Def))) ++
tr (th "пълен член" ++ td (n.rel ! ASgMascDefNom)) ++
tr (intagAttr "th" "rowspan=\"2\"" "ж.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Fem Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Fem Def))) ++
tr (intagAttr "th" "rowspan=\"2\"" "ср.р." ++
th "нечленувано" ++ td (n.rel ! (ASg Neut Indef))) ++
tr (th "членувано" ++ td (n.rel ! (ASg Neut Def))) ++
tr (intagAttr "th" "colspan=\"2\" rowspan=\"2\"" "мн.ч." ++
th "нечленувано" ++ td (n.rel ! (APl Indef))) ++
tr (th "членувано" ++ td (n.rel ! (APl Def)))
) ;
AdvMod => heading1 ("Наречие") ++
paragraph (n.rel ! (ASg Masc Def))
}
} ;
InflectionN2,InflectionN3 = \n -> {
@@ -136,7 +141,7 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение";
s2= inflVerb v ;
s3= ""
@@ -152,9 +157,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "арг1"++
v.c3.s ++
linPrep v.c3 ++
pp "арг2";
s2= inflVerb v ;
s3= ""
@@ -169,9 +174,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
"да" ++ pp "глагол";
s2= inflVerb v ;
s3= ""
@@ -186,9 +191,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
"че" ++ pp "изречение";
s2= inflVerb v ;
s3= ""
@@ -203,9 +208,9 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
v.c3.s ++
linPrep v.c3 ++
pp "въпрос";
s2= inflVerb v ;
s3= ""
@@ -220,7 +225,7 @@ lin
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
} ++
v.s ! Imperf ! VPres Sg P3 ++
v.c2.s ++
linPrep v.c2 ++
pp "допълнение"++
pp "прилагателно";
s2= inflVerb v ;

View File

@@ -1,5 +1,7 @@
--# -path=.:../abstract:../common:prelude
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in {
flags
coding=utf8;
lin
GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP (mkPrep "на") np)) ;
@@ -7,18 +9,19 @@ lin
AdAdV a adv = {s = a.s ++ adv.s; p = adv.p} ;
EmptyRelSlash slash = {
s = \\t,a,p,agr => slash.c2.s ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
s = \\t,a,p,agr => linPrep slash.c2 ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
} ;
CompoundN n1 n2 =
let comp : NForm => Str
= \\nf => case n1.relPost of {
True => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g ;
False => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf
= \\nf => case n1.relType of {
Pref => n1.rel ! nform2aform nf n2.g ++ n2.s ! nf ;
AdjMod => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf ;
AdvMod => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g
}
in {
s = comp ;
rel = \\af => "на" ++ comp ! NF Sg Def ; relPost = True ;
rel = \\af => "на" ++ comp ! NF Sg Def ; relType = AdvMod ;
g = n2.g
} ;
@@ -71,9 +74,10 @@ lin
{s = vp.ad.s ++
vp.s ! Imperf ! VGerund ++
case vp.vtype of {
VNormal => "" ;
VMedial c => reflClitics ! c ;
VPhrasal c => personalClitics (agrP3 (GSg Masc)) ! c
VNormal => vp.clitics ;
VMedial c => vp.clitics++reflClitics ! c ;
VPhrasal Dat => personalClitics (agrP3 (GSg Masc)) ! Dat++vp.clitics ;
VPhrasal c => vp.clitics++personalClitics (agrP3 (GSg Masc)) ! c
} ++
vp.compl ! {gn=GSg Neut; p=P3}} ;
@@ -101,9 +105,14 @@ lin
UttVPShort vp = {
s = let agr = agrP3 (GSg Neut) ;
clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
VNormal => {s=vp.clitics; agr=agr} ;
VMedial c => {s=vp.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=case c of {
Dat => personalClitics agr ! c++vp.clitics;
c => vp.clitics++personalClitics agr ! c
} ;
agr={gn=GSg Neut; p=P3}
}
} ;
in vp.ad.s ++ clitic.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++

View File

@@ -1,7 +1,7 @@
--# -coding=cp1251
--# -coding=utf8
concrete ExtraBul of ExtraBulAbs = CatBul **
open ResBul, MorphoFunsBul, Coordination, Prelude, Predef in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin
@@ -30,21 +30,21 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
s = \\t,a,p,agr => slash.c2.s ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
} ;
i8fem_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Fem) PronP1 ;
i8neut_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Neut) PronP1 ;
i8fem_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) PronP1 ;
i8neut_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Neut) PronP1 ;
whatSg8fem_IP = mkIP "êàêâà" "êàêâà" (GSg Fem) ;
whatSg8neut_IP = mkIP "êàêâî" "êàêâî" (GSg Neut) ;
whatSg8fem_IP = mkIP "каква" "каква" (GSg Fem) ;
whatSg8neut_IP = mkIP "какво" "какво" (GSg Neut) ;
whoSg8fem_IP = mkIP "êîÿ" "êîãî" (GSg Fem) ;
whoSg8neut_IP = mkIP "êîå" "êîãî" (GSg Neut) ;
whoSg8fem_IP = mkIP "коя" "кого" (GSg Fem) ;
whoSg8neut_IP = mkIP "кое" "кого" (GSg Neut) ;
youSg8fem_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Fem) PronP2 ;
youSg8neut_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Neut) PronP2 ;
youSg8fem_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Fem) PronP2 ;
youSg8neut_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Neut) PronP2 ;
onePl_Num = {s = table {
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "åäíè" ;
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "åäíèòå"
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "едни" ;
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "едните"
} ;
nn = NCountable;
nonEmpty = True
@@ -53,7 +53,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
UttImpSg8fem pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
UttImpSg8neut pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
IAdvAdv adv = {s = \\qf => (mkIAdv "êîëêî").s ! qf ++ adv.s} ;
IAdvAdv adv = {s = \\qf => (mkIAdv "колко").s ! qf ++ adv.s} ;
lincat
VPI = {s : Agr => Str} ;
@@ -95,7 +95,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
PassAgentVPSlash vp np =
insertObj (\\_ => "îò" ++ np.s ! RObj CPrep) Pos
insertObj (\\_ => "от" ++ np.s ! RObj CPrep) Pos
(insertObj (\\a => vp.ad.s ++ vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ;

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
abstract ExtraBulAbs = Extra ** {
flags coding=cp1251 ;
flags coding=utf8 ;
fun

View File

@@ -1,5 +1,5 @@
--# -path=.:../abstract:../common:prelude
--# -coding=cp1251
--# -coding=utf8
concrete GrammarBul of Grammar =
NounBul,
@@ -17,7 +17,7 @@ concrete GrammarBul of Grammar =
IdiomBul,
TenseX - [CAdv,IAdv,AdV,SC]
** {
flags coding=cp1251 ;
flags coding=utf8 ;
flags startcat = Phr ; unlexer = text ; lexer = text ;

View File

@@ -1,19 +1,19 @@
--# -coding=cp1251
--# -coding=utf8
concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
lin
ImpersCl vp = mkClause [] (GSg Neut) (NounP3 Pos) vp ;
GenericCl vp = mkClause "íÿêîé" (GSg Neut) (NounP3 Pos) vp ;
GenericCl vp = mkClause "някой" (GSg Neut) (NounP3 Pos) vp ;
CleftNP np rs =
mkClause (np.s ! RSubj)
(GSg Neut) np.p
(insertObj (\\_ => thisRP ! np.gn ++ rs.s ! personAgr np.gn np.p) (personPol np.p) (predV verbBe)) ;
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"íå"} ++ ad.s ++ s.s } ;
CleftAdv ad s = {s = \\t,a,p,o => case p of {Pos=>[]; Neg=>"не"} ++ ad.s ++ s.s } ;
ExistNP np = ExistNPAdv np (lin Adv {s = ""}) ;
ExistIP ip = ExistIPAdv ip (lin Adv {s = ""}) ;
@@ -21,8 +21,8 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
ExistNPAdv np adv =
{ s = \\t,a,p,o =>
let verb = case orPol p (personPol np.p) of {
Pos => mkV186 "èìàì" ;
Neg => mkV186 "íÿìàì"
Pos => mkV186 "имам" ;
Neg => mkV186 "нямам"
} ;
agr=agrP3 (GSg Neut);
@@ -42,21 +42,21 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
<Pres,Anter> => {aux1=[]; aux2=auxPres; main=perfect} ; --# notpresent
<Past,Simul> => {aux1=[]; aux2=[]; main=aorist} ; --# notpresent
<Past,Anter> => {aux1=[]; aux2=auxAorist; main=perfect} ; --# notpresent
<Fut, Simul> => {aux1="ùå"; aux2=[]; main=present} ; --# notpresent
<Fut, Anter> => {aux1="ùå"++auxPres; aux2=[]; main=perfect} ; --# notpresent
<Fut, Simul> => {aux1="ще"; aux2=[]; main=present} ; --# notpresent
<Fut, Anter> => {aux1="ще"++auxPres; aux2=[]; main=perfect} ; --# notpresent
<Cond,_> => {aux1=auxCondS; aux2=[]; main=perfect} --# notpresent
} ;
in case o of {
Main => v.aux1 ++ v.main ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s ;
Inv => np.s ! RObj Acc ++ v.aux1 ++ v.main ++ v.aux2 ++ adv.s ;
Quest => v.aux1 ++ v.main ++ "ëè" ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s
Quest => v.aux1 ++ v.main ++ "ли" ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s
}
} ;
ExistIPAdv ip adv =
mkQuestion {s = ip.s ! RSubj}
(mkClause "òóê" ip.gn (NounP3 Pos) (insertObj (\\_ => adv.s) Pos (predV verbBe))) ;
(mkClause "тук" ip.gn (NounP3 Pos) (insertObj (\\_ => adv.s) Pos (predV verbBe))) ;
ProgrVP vp = {
s = \\_ => vp.s ! Imperf ;
@@ -68,6 +68,6 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
isSimple = False
} ;
ImpPl1 vp = {s = "íåêà" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ;
ImpPl1 vp = {s = "нека" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ;
}

View File

@@ -1,383 +1,383 @@
--# -path=.:prelude
--# -coding=cp1251
--# -coding=utf8
concrete LexiconBul of Lexicon = CatBul **
open ParadigmsBul, ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags
optimize=values ;
lin
airplane_N = mkN007 "ñàìîëåò" ;
answer_V2S = mkV2S (actionV (mkV187 "îòãîâàðÿì") (mkV173 "îòãîâîðÿ")) naP noPrep ;
apartment_N = mkN007 "àïàðòàìåíò" ;
apple_N = mkN041 "ÿáúëêà" ;
art_N = mkN054 "èçêóñòâî" ;
ask_V2Q = mkV2Q (stateV (mkV186 "ïèòàì")) noPrep noPrep ;
baby_N = mkN065 "áåáå" ;
bad_A = mkA076 "ëîø" ;
bank_N = mkN041 "áàíêà" ;
beautiful_A = mkA076 "êðàñèâ" ;
become_VA = mkVA (actionV (mkV186 "ñòàâàì") (mkV152 "ñòàíà")) ;
beer_N = mkN041 "áèðà" ;
beg_V2V = mkV2V (stateV (mkV173 "ìîëÿ")) noPrep zaP ;
big_A = mkA081 "ãîëÿì" ;
bike_N = mkN061 "êîëåëî" ;
bird_N = mkN041 "ïòèöà" ;
black_A = mkA079 "÷åðåí" ;
blue_A = mkA086 "ñèí" ;
boat_N = mkN007 "êîðàá" ;
book_N = mkN041 "êíèãà" ;
boot_N = mkN041 "îáóâêà" ;
boss_N = mkN001 "øåô" ;
boy_N = mkN065 "ìîì÷å" ;
bread_N = mkN001 "õëÿá" ;
break_V2 = dirV2 (actionV (mkV173 "÷óïÿ") (mkV173 "ñ÷óïÿ")) ;
broad_A = mkA079 "îáøèðåí" ;
brother_N2 = prepN2 (mkN025 "áðàò") naP ;
brown_A = mkA076 "êàôÿâ" ;
butter_N = mkN054 "ìàñëî" ;
buy_V2 = dirV2 (actionV (mkV186 "êóïóâàì") (mkV173 "êóïÿ")) ;
camera_N = mkN041 "êàìåðà" ;
cap_N = mkN041 "øàïêà" ;
car_N = mkN041 "êîëà" ;
carpet_N = mkN007 "êèëèì" ;
cat_N = mkN041 "êîòêà" ;
ceiling_N = mkN007 "òàâàí" ;
chair_N = mkN001 "ñòîë" ;
cheese_N = mkN066 "ñèðåíå" ;
child_N = mkN067 "äåòå" ;
church_N = mkN041 "öúðêâà" ;
city_N = mkN001 "ãðàä" ;
clean_A = mkA076 "÷èñò" ;
clever_A = mkA079 "óìåí" ;
close_V2 = dirV2 (actionV (mkV187 "çàòâàðÿì") (mkV173 "çàòâîðÿ")) ;
coat_N = mkN054 "ïàëòî" ;
cold_A = mkA076 "ñòóäåí" ;
come_V = actionV (mkV186 "èäâàì") (table { -- special case "äîéäè", "äîéäåòå" are archaic
VImperative Sg => "åëà";
VImperative Pl => "åëàòå";
vform => mkV146a "äîéäà" ! vform}) ;
computer_N = mkN009 "êîìïþòúð" ;
country_N = mkN041 "äúðæàâà" ;
cousin_N = mkN007a "áðàòîâ÷åä" ;
cow_N = mkN041 "êðàâà" ;
die_V = actionV (mkV186 "óìèðàì") (mkV150a "óìðà") ;
dirty_A = mkA079 "ìðúñåí" ;
distance_N3 = prepN3 (mkN072 "ðàçñòîÿíèå") otP doP ;
doctor_N = mkN007a "äîêòîð" ;
dog_N = mkN065 "êó÷å" ;
door_N = mkN041 "âðàòà" ;
drink_V2 = dirV2 (stateV (mkV163 "ïèÿ")) ;
easy_A2V = mkA2V (mkA079 "ëåñåí") zaP ;
eat_V2 = dirV2 (stateV (mkV169 "ÿì")) ;
empty_A = mkA079 "ïðàçåí" ;
enemy_N = mkN001 "âðàã" ;
factory_N = mkN041 "ôàáðèêà" ;
father_N2 = prepN2 (mkN038 "áàùà") naP ;
fear_VS = mkVS (stateV (mkV186 "ñòðàõóâàì")) ;
find_V2 = dirV2 (actionV (mkV186 "íàìèðàì") (mkV173 "íàìåðÿ")) ;
fish_N = mkN041 "ðèáà" ;
floor_N = mkN007 "åòàæ" ;
fridge_N = mkN007 "ôðèçåð" ;
friend_N = mkN031a "ïðèÿòåë" ;
fruit_N = mkN001 "ïëîä" ;
fun_AV = mkA079 "çàáàâåí" ;
forget_V2 = dirV2 (actionV (mkV187 "çàáðàâÿì") (mkV173 "çàáðàâÿ")) ;
garden_N = mkN041 "ãðàäèíà" ;
girl_N = mkN065 "ìîìè÷å" ;
glove_N = mkN041 "ðúêàâèöà" ;
gold_N = mkN054 "çëàòî" ;
good_A = adjAdv (mkA080 "äîáúð") "äîáðå" ;
go_V = actionV (mkV186 "îòèâàì") (mkV146 "îòèäà") ;
green_A = mkA076 "çåëåí" ;
harbour_N = mkN066 "ïðèñòàíèùå" ;
hate_V2 = dirV2 (stateV (mkV173 "ìðàçÿ")) ;
hat_N = mkN041 "øàïêà" ;
hear_V2 = dirV2 (actionV (mkV186 "÷óâàì") (mkV163 "÷óÿ")) ;
hill_N = mkN001 "õúëì" ;
hope_VS = mkVS (medialV (stateV (mkV186 "íàäÿâàì")) Acc) ;
horse_N = mkN035 "êîí" ;
hot_A = mkA076 "ãîðåù" ;
house_N = mkN041 "êúùà" ;
important_A = mkA079 "âàæåí" ;
industry_N = mkN047 "èíäóñòðèÿ" ;
iron_N = mkN057 "æåëÿçî" ;
king_N = mkN035a "öàð" ;
airplane_N = mkN007 "самолет" ;
answer_V2S = mkV2S (actionV (mkV187 "отговарям") (mkV173 "отговоря")) naP noPrep ;
apartment_N = mkN007 "апартамент" ;
apple_N = mkN041 "ябълка" ;
art_N = mkN054 "изкуство" ;
ask_V2Q = mkV2Q (stateV (mkV186 "питам")) noPrep noPrep ;
baby_N = mkN065 "бебе" ;
bad_A = mkA076 "лош" ;
bank_N = mkN041 "банка" ;
beautiful_A = mkA076 "красив" ;
become_VA = mkVA (actionV (mkV186 "ставам") (mkV152 "стана")) ;
beer_N = mkN041 "бира" ;
beg_V2V = mkV2V (stateV (mkV173 "моля")) noPrep zaP ;
big_A = mkA081 "голям" ;
bike_N = mkN061 "колело" ;
bird_N = mkN041 "птица" ;
black_A = mkA079 "черен" ;
blue_A = mkA086 "син" ;
boat_N = mkN007 "кораб" ;
book_N = mkN041 "книга" ;
boot_N = mkN041 "обувка" ;
boss_N = mkN001 "шеф" ;
boy_N = mkN065 "момче" ;
bread_N = mkN001 "хляб" ;
break_V2 = dirV2 (actionV (mkV173 "чупя") (mkV173 "счупя")) ;
broad_A = mkA079 "обширен" ;
brother_N2 = prepN2 (mkN025 "брат") naP ;
brown_A = mkA076 "кафяв" ;
butter_N = mkN054 "масло" ;
buy_V2 = dirV2 (actionV (mkV186 "купувам") (mkV173 "купя")) ;
camera_N = mkN041 "камера" ;
cap_N = mkN041 "шапка" ;
car_N = mkN041 "кола" ;
carpet_N = mkN007 "килим" ;
cat_N = mkN041 "котка" ;
ceiling_N = mkN007 "таван" ;
chair_N = mkN001 "стол" ;
cheese_N = mkN066 "сирене" ;
child_N = mkN067 "дете" ;
church_N = mkN041 "църква" ;
city_N = mkN001 "град" ;
clean_A = mkA076 "чист" ;
clever_A = mkA079 "умен" ;
close_V2 = dirV2 (actionV (mkV187 "затварям") (mkV173 "затворя")) ;
coat_N = mkN054 "палто" ;
cold_A = mkA076 "студен" ;
come_V = actionV (mkV186 "идвам") (table { -- special case "дойди", "дойдете" are archaic
VImperative Sg => "ела";
VImperative Pl => "елате";
vform => mkV146a "дойда" ! vform}) ;
computer_N = mkN009 "компютър" ;
country_N = mkN041 "държава" ;
cousin_N = mkN007a "братовчед" ;
cow_N = mkN041 "крава" ;
die_V = actionV (mkV186 "умирам") (mkV150a "умра") ;
dirty_A = mkA079 "мръсен" ;
distance_N3 = prepN3 (mkN072 "разстояние") otP doP ;
doctor_N = mkN007a "доктор" ;
dog_N = mkN065 "куче" ;
door_N = mkN041 "врата" ;
drink_V2 = dirV2 (stateV (mkV163 "пия")) ;
easy_A2V = mkA2V (mkA079 "лесен") zaP ;
eat_V2 = dirV2 (stateV (mkV169 "ям")) ;
empty_A = mkA079 "празен" ;
enemy_N = mkN001 "враг" ;
factory_N = mkN041 "фабрика" ;
father_N2 = prepN2 (mkN038 "баща") naP ;
fear_VS = mkVS (stateV (mkV186 "страхувам")) ;
find_V2 = dirV2 (actionV (mkV186 "намирам") (mkV173 "намеря")) ;
fish_N = mkN041 "риба" ;
floor_N = mkN007 "етаж" ;
fridge_N = mkN007 "фризер" ;
friend_N = mkN031a "приятел" ;
fruit_N = mkN001 "плод" ;
fun_AV = mkA079 "забавен" ;
forget_V2 = dirV2 (actionV (mkV187 "забравям") (mkV173 "забравя")) ;
garden_N = mkN041 "градина" ;
girl_N = mkN065 "момиче" ;
glove_N = mkN041 "ръкавица" ;
gold_N = mkN054 "злато" ;
good_A = adjAdv (mkA080 "добър") "добре" ;
go_V = actionV (mkV186 "отивам") (mkV146 "отида") ;
green_A = mkA076 "зелен" ;
harbour_N = mkN066 "пристанище" ;
hate_V2 = dirV2 (stateV (mkV173 "мразя")) ;
hat_N = mkN041 "шапка" ;
hear_V2 = dirV2 (actionV (mkV186 "чувам") (mkV163 "чуя")) ;
hill_N = mkN001 "хълм" ;
hope_VS = mkVS (medialV (stateV (mkV186 "надявам")) Acc) ;
horse_N = mkN035 "кон" ;
hot_A = mkA076 "горещ" ;
house_N = mkN041 "къща" ;
important_A = mkA079 "важен" ;
industry_N = mkN047 "индустрия" ;
iron_N = mkN057 "желязо" ;
king_N = mkN035a "цар" ;
know_V2 = dirV2 {
s = \\_,vform => case vform of {
VPassive aform => (mkA079 "èçâåñòåí").s ! aform ;
_ => mkV162 "çíàÿ" ! vform
VPassive aform => (mkA079 "известен").s ! aform ;
_ => mkV162 "зная" ! vform
} ;
vtype = VNormal ;
lock_V = <>
} ;
know_VQ = mkVQ (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
know_VS = mkVS (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
lake_N = mkN054 "åçåðî" ;
lamp_N = mkN041 "ëàìïà" ;
learn_V2 = dirV2 (actionV (mkV176 "ó÷à") (mkV176 "íàó÷à")) ;
leather_N = mkN041 "êîæà" ;
leave_V2 = dirV2 (actionV (mkV187 "îñòàâÿì") (mkV173 "îñòàâÿ")) ;
like_V2 = dirV2 (actionV (mkV186 "õàðåñâàì") (mkV186 "õàðåñàì")) ;
listen_V2 = dirV2 (stateV (mkV186 "ñëóøàì")) ;
live_V = stateV (mkV160 "æèâåÿ") ;
long_A = mkA080 "äúëúã" ;
lose_V2 = dirV2 (actionV (mkV173 "ãóáÿ") (mkV173 "çàãóáÿ")) ;
love_N = mkN049 "ëþáîâ" ;
love_V2 = dirV2 (stateV (mkV186 "îáè÷àì")) ;
man_N = mkN024 "ìúæ" ;
married_A2 = mkA2 (mkA076 "æåíåí") zaP ;
meat_N = mkN054 "ìåñî" ;
milk_N = mkN057 "ìëÿêî" ;
moon_N = mkN041 "ëóíà" ;
mother_N2 = prepN2 (mkN041a "ìàéêà") naP ;
mountain_N = mkN041 "ïëàíèíà" ;
music_N = mkN041 "ìóçèêà" ;
narrow_A = mkA084 "òåñåí" ;
new_A = mkA076 "íîâ" ;
newspaper_N = mkN014 "âåñòíèê" ;
oil_N = mkN065 "îëèî" ;
old_A = mkA076 "ñòàð" ;
open_V2 = dirV2 (actionV (mkV187 "îòâàðÿì") (mkV173 "îòâîðÿ")) ;
paint_V2A = mkV2A (actionV (mkV186 "ðèñóâàì") (mkV186 "íàðèñóâàì")) noPrep ;
paper_N = mkN047 "õàðòèÿ" ;
paris_PN = mkPN "Ïàðèæ" Masc ;
peace_N = mkN040a "ìèð" ;
pen_N = mkN041 "ïèñàëêà" ;
planet_N = mkN041 "ïëàíåòà" ;
plastic_N = mkN041 "ïëàñòìàñà" ;
play_V2 = dirV2 (stateV (mkV161 "èãðàÿ")) ;
policeman_N = mkN032a "ïîëèöàé" ;
priest_N = mkN014 "ñâåùåíèê" ;
probable_AS = mkA079 "âåðîÿòåí" ;
queen_N = mkN041 "êðàëèöà" ;
radio_N = mkN054 "ðàäèî" ;
rain_V0 = mkV0 (stateV (mkV174 "âàëè")) ;
read_V2 = dirV2 (stateV (mkV145 "÷åòà")) ;
red_A = mkA076 "÷åðâåí" ;
religion_N = mkN047 "ðåëèãèÿ" ;
restaurant_N = mkN007 "ðåñòîðàíò" ;
river_N = mkN041 "ðåêà" ;
rock_N = mkN041 "ñêàëà" ;
roof_N = mkN007 "ïîêðèâ" ;
rubber_N = mkN041 "ãóìà" ;
run_V = stateV (mkV186 "áÿãàì") ;
say_VS = mkVS (actionV (mkV186 "êàçâàì") (mkV156 "êàæà")) ;
school_N = mkN066 "ó÷èëèùå" ;
science_N = mkN041 "íàóêà" ;
sea_N = mkN065 "ìîðå" ;
seek_V2 = dirV2 (stateV (mkV173 "òúðñÿ")) ;
see_V2 = dirV2 (actionV (mkV186 "âèæäàì") (mkV181 "âèäÿ")) ;
sell_V3 = dirV3 (stateV (mkV186 "ïðîäàâàì")) naP ;
send_V3 = dirV3 (actionV (mkV186 "ïðàùàì") (mkV173 "ïðàòÿ")) doP ;
sheep_N = mkN044 "îâöà" ;
ship_N = mkN007 "êîðàá" ;
shirt_N = mkN041 "ðèçà" ;
shoe_N = mkN041 "îáóâêà" ;
shop_N = mkN007 "ìàãàçèí" ;
short_A = mkA076 "êúñ" ;
silver_N = mkN054 "ñðåáðî" ;
sister_N = mkN041a "ñåñòðà" ;
sleep_V = stateV (mkV182 "ñïÿ") ;
small_A = mkA080 "ìàëúê" ;
snake_N = mkN047 "çìèÿ" ;
sock_N = mkN007 "÷îðàï" ;
speak_V2 = dirV2 (stateV (mkV173 "ãîâîðÿ")) ;
star_N = mkN041 "çâåçäà" ;
steel_N = mkN041 "ñòîìàíà" ;
stone_N = mkN017 "êàìúê" ;
stove_N = mkN041 "ïå÷êà" ;
student_N = mkN007a "ñòóäåíò" ;
stupid_A = mkA076 "ãëóïàâ" ;
sun_N = mkN066 "ñëúíöå" ;
switch8off_V2 = dirV2 (actionV (mkV186 "èçêëþ÷âàì") (mkV176 "èçêëþ÷à")) ;
switch8on_V2 = dirV2 (actionV (mkV186 "âêëþ÷âàì") (mkV176 "âêëþ÷à")) ;
table_N = mkN041 "ìàñà" ;
talk_V3 = mkV3 (stateV (mkV173 "ãîâîðÿ")) naP zaP ;
teacher_N = mkN031a "ó÷èòåë" ;
teach_V2 = dirV2 (actionV (mkV186 "ïðåïîäàâàì") (mkV168 "ïðåïîäàì")) ;
television_N = mkN047 "òåëåâèçèÿ" ;
thick_A = mkA076 "äåáåë" ;
thin_A = mkA080 "òúíúê" ;
train_N = mkN001 "âëàê" ;
travel_V = stateV (mkV186 "ïúòóâàì") ;
tree_N = mkN061 "äúðâî" ;
ugly_A = mkA076 "ãëóïàâ" ;
understand_V2 = dirV2 (actionV (mkV186 "ðàçáèðàì") (mkV170 "ðàçáåðà")) ;
university_N = mkN007 "óíèâåðñèòåò" ;
village_N = mkN054 "ñåëî" ;
wait_V2 = prepV2 (stateV (mkV186 "÷àêàì")) zaP ;
walk_V = stateV (mkV173 "õîäÿ") ;
warm_A = mkA080 "òîïúë" ;
war_N = mkN041 "âîéíà" ;
watch_V2 = dirV2 (stateV (mkV186 "ãëåäàì")) ;
water_N = mkN041 "âîäà" ;
white_A = mkA081 "áÿë" ;
window_N = mkN008 "ïðîçîðåö" ;
wine_N = mkN054 "âèíî" ;
win_V2 = dirV2 (actionV (mkV186 "ïîáåæäàâàì") (mkV174 "ïîáåäÿ")) ;
woman_N = mkN041a "æåíà" ;
wonder_VQ = mkVQ (medialV (actionV (mkV186 "ó÷óäâàì") (mkV173 "÷óäÿ")) Acc) ;
wood_N = mkN041 "äúðâåñèíà" ;
write_V2 = dirV2 (stateV (mkV159 "ïèøà")) ;
yellow_A = mkA076 "æúëò" ;
young_A = mkA076 "ìëàä" ;
do_V2 = dirV2 (actionV (mkV173 "ïðàâÿ") (mkV173 "íàïðàâÿ")) ;
now_Adv = mkAdv "ñåãà" ;
already_Adv = mkAdv "âå÷å" ;
song_N = mkN050 "ïåñåí" ;
add_V3 = dirV3 (actionV (mkV186 "ñúáèðàì") (mkV170 "ñúáåðà")) sP ;
number_N = mkN054 "÷èñëî" ;
put_V2 = prepV2 (actionV (mkV186 "ñëàãàì") (mkV176 "ñëîæà")) noPrep ;
stop_V = actionV (mkV186 "ñïèðàì") (mkV150 "ñïðà") ;
jump_V = actionV (mkV186 "ñêà÷àì") (mkV176 "ñêî÷à") ;
left_Ord = mkA081 "ëÿâ" ** {nonEmpty=True} ;
right_Ord = mkA084 "äåñåí" ** {nonEmpty=True} ;
far_Adv = mkAdv "äàëå÷å" ;
correct_A = mkA079 "ïðàâèëåí" ;
dry_A = mkA076 "ñóõ" ;
dull_A = mkA076 "òúï" ;
full_A = mkA079 "ïúëåí" ;
heavy_A = mkA080 "òåæúê" ;
near_A = mkA080 "áëèçúê" ;
rotten_A = mkA076 "ïðîãíèë" ;
round_A = mkA080 "êðúãúë" ;
sharp_A = mkA080 "îñòúð" ;
smooth_A = mkA080 "ãëàäúê" ;
straight_A = mkA081 "ïðÿê" ;
wet_A = mkA080 "ìîêúð" ; ----
wide_A = mkA076 "øèðîê" ;
animal_N = mkN062 "æèâîòíî" ;
ashes_N = mkN049 "ïåïeë" ;
back_N = mkN003 "ãðúá" ;
bark_N = mkN028 "ëàé" ;
belly_N = mkN007 "êîðåì" ;
blood_N = mkN053 "êðúâ" ;
bone_N = mkN049 "êîñò" ;
breast_N = mkN041 "ãúðäà" ;
cloud_N = mkN014 "îáëàê" ;
day_N = mkN033 "äåí" ;
dust_N = mkN001 "ïðàõ" ;
ear_N = mkN064 "óõî" ;
earth_N = mkN047 "çåìÿ" ;
egg_N = mkN066 "ÿéöå" ;
eye_N = mkN063 "îêî" ;
fat_N = mkN041 "ìàçíèíà" ;
feather_N = mkN054 "ïåðî" ;
fingernail_N = mkN034 "íîêúò" ;
fire_N = mkN030 "îãúí" ;
flower_N = mkN068 "öâåòå" ;
fog_N = mkN041 "ìúãëà" ;
foot_N = mkN041 "ñòúïêà" ;
forest_N = mkN041 "ãîðà" ;
grass_N = mkN041 "òðåâà" ;
guts_N = mkN054 "÷åðâî" ;
hair_N = mkN041 "êîñà" ;
hand_N = mkN045 "ðúêà" ;
head_N = mkN041 "ãëàâà" ;
heart_N = mkN066 "ñúðöå" ;
horn_N = mkN001 "ðîã" ;
husband_N = mkN015 "ñúïðóã" ; -- personal
ice_N = mkN001 "ëåä" ;
knee_N = mkN058 "êîëÿíî" ;
leaf_N = mkN054 "ëèñòî" ;
leg_N = mkN022 "êðàê" ;
liver_N = mkN001 "äðîá" ;
louse_N = mkN041 "âúøêà" ;
mouth_N = mkN042 "óñòà" ;
name_N = mkN069 "èìå" ;
neck_N = mkN003 "ãðúá" ;
night_N = mkN049 "íîù" ;
nose_N = mkN001 "íîñ" ;
person_N = mkN014 "÷îâåê" ;
rain_N = mkN001 "äúæä" ;
road_N = mkN037 "ïúò" ;
root_N = mkN007 "êîðåí" ;
rope_N = mkN065 "âúæå" ;
salt_N = mkN049 "ñîë" ;
sand_N = mkN014 "ïÿñúê" ;
seed_N = mkN069 "ñåìå" ;
skin_N = mkN041 "êîæà" ;
sky_N = mkN070 "íåáå" ;
smoke_N = mkN014 "ïóøåê" ;
snow_N = mkN002 "ñíÿã" ;
stick_N = mkN041 "ïðú÷êà" ;
tail_N = mkN041 "îïàøêà" ;
tongue_N = mkN014 "åçèê" ;
tooth_N = mkN007 "çúá" ;
wife_N = mkN041 "ñúïðóãà" ;
wind_N = mkN004 "âÿòúð" ;
wing_N = mkN056 "êðèëî" ;
worm_N = mkN032 "÷åðâåé" ;
year_N = mkN041 "ãîäèíà" ;
blow_V = stateV (mkV186 "äóõàì") ;
breathe_V = dirV2 (stateV (mkV186 "äèøàì")) ;
burn_V = actionV (mkV187 "èçãàðÿì") (mkV177 "èçãîðÿ") ;
dig_V = stateV (mkV161 "êîïàÿ") ;
fall_V = actionV (mkV186 "ïàäàì") (mkV152 "ïàäíà") ;
float_V = stateV (mkV186 "ïëàâàì") ;
flow_V = stateV (mkV148 "òåêà") ;
fly_V = stateV (mkV177 "ëåòÿ") ;
freeze_V = stateV (mkV186 "çàìðúçâàì") ;
give_V3 = dirV3 (actionV (mkV186 "äàâàì") (mkV186 "äàì")) naP ;
laugh_V = medialV (stateV (mkV160 "ñìåÿ")) Acc ;
lie_V = stateV (mkV178 "ëåæà") ;
play_V = stateV (mkV161 "èãðàÿ") ;
sew_V = stateV (mkV163 "øèÿ") ;
sing_V = stateV (mkV164 "ïåÿ") ;
sit_V = stateV (mkV177 "ñåäÿ") ;
smell_V = stateV (mkV159 "ìèðèøà") ;
spit_V = stateV (mkV163 "ïëþÿ") ;
stand_V = stateV (mkV180 "ñòîÿ") ;
swell_V = actionV (mkV186 "íàäóâàì") (mkV163 "íàäóÿ") ;
swim_V = stateV (mkV186 "ïëóâàì") ;
think_V = stateV (mkV173 "ìèñëÿ") ;
turn_V = actionV (mkV186 "îáðúùàì") (mkV152 "îáúðíà") ;
vomit_V = actionV (mkV186 "ïîâðúùàì") (mkV152 "ïîâúðíà") ;
know_VQ = mkVQ (actionV (mkV188 "знам") (mkV162 "зная")) ;
know_VS = mkVS (actionV (mkV188 "знам") (mkV162 "зная")) ;
lake_N = mkN054 "езеро" ;
lamp_N = mkN041 "лампа" ;
learn_V2 = dirV2 (actionV (mkV176 "уча") (mkV176 "науча")) ;
leather_N = mkN041 "кожа" ;
leave_V2 = dirV2 (actionV (mkV187 "оставям") (mkV173 "оставя")) ;
like_V2 = dirV2 (actionV (mkV186 "харесвам") (mkV186 "харесам")) ;
listen_V2 = dirV2 (stateV (mkV186 "слушам")) ;
live_V = stateV (mkV160 "живея") ;
long_A = mkA080 "дълъг" ;
lose_V2 = dirV2 (actionV (mkV173 "губя") (mkV173 "загубя")) ;
love_N = mkN049 "любов" ;
love_V2 = dirV2 (stateV (mkV186 "обичам")) ;
man_N = mkN024 "мъж" ;
married_A2 = mkA2 (mkA076 "женен") zaP ;
meat_N = mkN054 "месо" ;
milk_N = mkN057 "мляко" ;
moon_N = mkN041 "луна" ;
mother_N2 = prepN2 (mkN041a "майка") naP ;
mountain_N = mkN041 "планина" ;
music_N = mkN041 "музика" ;
narrow_A = mkA084 "тесен" ;
new_A = mkA076 "нов" ;
newspaper_N = mkN014 "вестник" ;
oil_N = mkN065 "олио" ;
old_A = mkA076 "стар" ;
open_V2 = dirV2 (actionV (mkV187 "отварям") (mkV173 "отворя")) ;
paint_V2A = mkV2A (actionV (mkV186 "рисувам") (mkV186 "нарисувам")) noPrep ;
paper_N = mkN047 "хартия" ;
paris_PN = mkPN "Париж" Masc ;
peace_N = mkN040a "мир" ;
pen_N = mkN041 "писалка" ;
planet_N = mkN041 "планета" ;
plastic_N = mkN041 "пластмаса" ;
play_V2 = dirV2 (stateV (mkV161 "играя")) ;
policeman_N = mkN032a "полицай" ;
priest_N = mkN014 "свещеник" ;
probable_AS = mkA079 "вероятен" ;
queen_N = mkN041 "кралица" ;
radio_N = mkN054 "радио" ;
rain_V0 = mkV0 (stateV (mkV174 "вали")) ;
read_V2 = dirV2 (stateV (mkV145 "чета")) ;
red_A = mkA076 "червен" ;
religion_N = mkN047 "религия" ;
restaurant_N = mkN007 "ресторант" ;
river_N = mkN041 "река" ;
rock_N = mkN041 "скала" ;
roof_N = mkN007 "покрив" ;
rubber_N = mkN041 "гума" ;
run_V = stateV (mkV186 "бягам") ;
say_VS = mkVS (actionV (mkV186 "казвам") (mkV156 "кажа")) ;
school_N = mkN066 "училище" ;
science_N = mkN041 "наука" ;
sea_N = mkN065 "море" ;
seek_V2 = dirV2 (stateV (mkV173 "търся")) ;
see_V2 = dirV2 (actionV (mkV186 "виждам") (mkV181 "видя")) ;
sell_V3 = dirV3 (stateV (mkV186 "продавам")) naP ;
send_V3 = dirV3 (actionV (mkV186 "пращам") (mkV173 "пратя")) doP ;
sheep_N = mkN044 "овца" ;
ship_N = mkN007 "кораб" ;
shirt_N = mkN041 "риза" ;
shoe_N = mkN041 "обувка" ;
shop_N = mkN007 "магазин" ;
short_A = mkA076 "къс" ;
silver_N = mkN054 "сребро" ;
sister_N = mkN041a "сестра" ;
sleep_V = stateV (mkV182 "спя") ;
small_A = mkA080 "малък" ;
snake_N = mkN047 "змия" ;
sock_N = mkN007 "чорап" ;
speak_V2 = dirV2 (stateV (mkV173 "говоря")) ;
star_N = mkN041 "звезда" ;
steel_N = mkN041 "стомана" ;
stone_N = mkN017 "камък" ;
stove_N = mkN041 "печка" ;
student_N = mkN007a "студент" ;
stupid_A = mkA076 "глупав" ;
sun_N = mkN066 "слънце" ;
switch8off_V2 = dirV2 (actionV (mkV186 "изключвам") (mkV176 "изключа")) ;
switch8on_V2 = dirV2 (actionV (mkV186 "включвам") (mkV176 "включа")) ;
table_N = mkN041 "маса" ;
talk_V3 = mkV3 (stateV (mkV173 "говоря")) naP zaP ;
teacher_N = mkN031a "учител" ;
teach_V2 = dirV2 (actionV (mkV186 "преподавам") (mkV168 "преподам")) ;
television_N = mkN047 "телевизия" ;
thick_A = mkA076 "дебел" ;
thin_A = mkA080 "тънък" ;
train_N = mkN001 "влак" ;
travel_V = stateV (mkV186 "пътувам") ;
tree_N = mkN061 "дърво" ;
ugly_A = mkA076 "глупав" ;
understand_V2 = dirV2 (actionV (mkV186 "разбирам") (mkV170 "разбера")) ;
university_N = mkN007 "университет" ;
village_N = mkN054 "село" ;
wait_V2 = prepV2 (stateV (mkV186 "чакам")) zaP ;
walk_V = stateV (mkV173 "ходя") ;
warm_A = mkA080 "топъл" ;
war_N = mkN041 "война" ;
watch_V2 = dirV2 (stateV (mkV186 "гледам")) ;
water_N = mkN041 "вода" ;
white_A = mkA081 "бял" ;
window_N = mkN008 "прозорец" ;
wine_N = mkN054 "вино" ;
win_V2 = dirV2 (actionV (mkV186 "побеждавам") (mkV174 "победя")) ;
woman_N = mkN041a "жена" ;
wonder_VQ = mkVQ (medialV (actionV (mkV186 "учудвам") (mkV173 "чудя")) Acc) ;
wood_N = mkN041 "дървесина" ;
write_V2 = dirV2 (stateV (mkV159 "пиша")) ;
yellow_A = mkA076 "жълт" ;
young_A = mkA076 "млад" ;
do_V2 = dirV2 (actionV (mkV173 "правя") (mkV173 "направя")) ;
now_Adv = mkAdv "сега" ;
already_Adv = mkAdv "вече" ;
song_N = mkN050 "песен" ;
add_V3 = dirV3 (actionV (mkV186 "събирам") (mkV170 "събера")) sP ;
number_N = mkN054 "число" ;
put_V2 = prepV2 (actionV (mkV186 "слагам") (mkV176 "сложа")) noPrep ;
stop_V = actionV (mkV186 "спирам") (mkV150 "спра") ;
jump_V = actionV (mkV186 "скачам") (mkV176 "скоча") ;
left_Ord = mkA081 "ляв" ** {nonEmpty=True} ;
right_Ord = mkA084 "десен" ** {nonEmpty=True} ;
far_Adv = mkAdv "далече" ;
correct_A = mkA079 "правилен" ;
dry_A = mkA076 "сух" ;
dull_A = mkA076 "тъп" ;
full_A = mkA079 "пълен" ;
heavy_A = mkA080 "тежък" ;
near_A = mkA080 "близък" ;
rotten_A = mkA076 "прогнил" ;
round_A = mkA080 "кръгъл" ;
sharp_A = mkA080 "остър" ;
smooth_A = mkA080 "гладък" ;
straight_A = mkA081 "пряк" ;
wet_A = mkA080 "мокър" ; ----
wide_A = mkA076 "широк" ;
animal_N = mkN062 "животно" ;
ashes_N = mkN049 "пепeл" ;
back_N = mkN003 "гръб" ;
bark_N = mkN028 "лай" ;
belly_N = mkN007 "корем" ;
blood_N = mkN053 "кръв" ;
bone_N = mkN049 "кост" ;
breast_N = mkN041 "гърда" ;
cloud_N = mkN014 "облак" ;
day_N = mkN033 "ден" ;
dust_N = mkN001 "прах" ;
ear_N = mkN064 "ухо" ;
earth_N = mkN047 "земя" ;
egg_N = mkN066 "яйце" ;
eye_N = mkN063 "око" ;
fat_N = mkN041 "мазнина" ;
feather_N = mkN054 "перо" ;
fingernail_N = mkN034 "нокът" ;
fire_N = mkN030 "огън" ;
flower_N = mkN068 "цвете" ;
fog_N = mkN041 "мъгла" ;
foot_N = mkN041 "стъпка" ;
forest_N = mkN041 "гора" ;
grass_N = mkN041 "трева" ;
guts_N = mkN054 "черво" ;
hair_N = mkN041 "коса" ;
hand_N = mkN045 "ръка" ;
head_N = mkN041 "глава" ;
heart_N = mkN066 "сърце" ;
horn_N = mkN001 "рог" ;
husband_N = mkN015 "съпруг" ; -- personal
ice_N = mkN001 "лед" ;
knee_N = mkN058 "коляно" ;
leaf_N = mkN054 "листо" ;
leg_N = mkN022 "крак" ;
liver_N = mkN001 "дроб" ;
louse_N = mkN041 "въшка" ;
mouth_N = mkN042 "уста" ;
name_N = mkN069 "име" ;
neck_N = mkN003 "гръб" ;
night_N = mkN049 "нощ" ;
nose_N = mkN001 "нос" ;
person_N = mkN014 "човек" ;
rain_N = mkN001 "дъжд" ;
road_N = mkN037 "път" ;
root_N = mkN007 "корен" ;
rope_N = mkN065 "въже" ;
salt_N = mkN049 "сол" ;
sand_N = mkN014 "пясък" ;
seed_N = mkN069 "семе" ;
skin_N = mkN041 "кожа" ;
sky_N = mkN070 "небе" ;
smoke_N = mkN014 "пушек" ;
snow_N = mkN002 "сняг" ;
stick_N = mkN041 "пръчка" ;
tail_N = mkN041 "опашка" ;
tongue_N = mkN014 "език" ;
tooth_N = mkN007 "зъб" ;
wife_N = mkN041 "съпруга" ;
wind_N = mkN004 "вятър" ;
wing_N = mkN056 "крило" ;
worm_N = mkN032 "червей" ;
year_N = mkN041 "година" ;
blow_V = stateV (mkV186 "духам") ;
breathe_V = dirV2 (stateV (mkV186 "дишам")) ;
burn_V = actionV (mkV187 "изгарям") (mkV177 "изгоря") ;
dig_V = stateV (mkV161 "копая") ;
fall_V = actionV (mkV186 "падам") (mkV152 "падна") ;
float_V = stateV (mkV186 "плавам") ;
flow_V = stateV (mkV148 "тека") ;
fly_V = stateV (mkV177 "летя") ;
freeze_V = stateV (mkV186 "замръзвам") ;
give_V3 = dirV3 (actionV (mkV186 "давам") (mkV186 "дам")) naP ;
laugh_V = medialV (stateV (mkV160 "смея")) Acc ;
lie_V = stateV (mkV178 "лежа") ;
play_V = stateV (mkV161 "играя") ;
sew_V = stateV (mkV163 "шия") ;
sing_V = stateV (mkV164 "пея") ;
sit_V = stateV (mkV177 "седя") ;
smell_V = stateV (mkV159 "мириша") ;
spit_V = stateV (mkV163 "плюя") ;
stand_V = stateV (mkV180 "стоя") ;
swell_V = actionV (mkV186 "надувам") (mkV163 "надуя") ;
swim_V = stateV (mkV186 "плувам") ;
think_V = stateV (mkV173 "мисля") ;
turn_V = actionV (mkV186 "обръщам") (mkV152 "обърна") ;
vomit_V = actionV (mkV186 "повръщам") (mkV152 "повърна") ;
bite_V2 = dirV2 (stateV (mkV154 "õàïÿ")) ;
count_V2 = dirV2 (stateV (mkV175 "áðîÿ")) ;
cut_V2 = dirV2 (stateV (mkV157 "ðåæà")) ;
fear_V2 = prepV2 (medialV (stateV (mkV186 "ñòðàõóâàì")) Acc) otP;
fight_V2 = prepV2 (medialV (stateV (mkV173 "áîðÿ")) Acc) sP;
hit_V2 = dirV2 (actionV (mkV187 "óäðÿì") (mkV173 "óäàðÿ")) ;
hold_V2 = dirV2 (stateV (mkV179 "äúðæà")) ;
hunt_V2 = dirV2 (stateV (mkV174 "ëîâÿ")) ;
kill_V2 = dirV2 (actionV (mkV186 "óáèâàì") (mkV163 "óáèÿ")) ;
pull_V2 = dirV2 (stateV (mkV186 "äúðïàì")) ;
push_V2 = dirV2 (stateV (mkV186 "áóòàì")) ;
rub_V2 = dirV2 (stateV (mkV163 "òðèÿ")) ;
scratch_V2 = dirV2 (actionV (mkV186 "äðàñêàì") (mkV152 "äðàñíà")) ;
split_V2 = dirV2 (actionV (mkV187 "ðàçäåëÿì") (mkV174 "ðàçäåëÿ")) ;
squeeze_V2 = dirV2 (actionV (mkV186 "ñòèñêàì") (mkV152 "ñòèñíà")) ;
stab_V2 = dirV2 (actionV (mkV186 "ïðîìóøâàì") (mkV176 "ïðîìóøà")) ;
suck_V2 = dirV2 (stateV (mkV155 "ñó÷à")) ;
throw_V2 = dirV2 (actionV (mkV187 "õâúðëÿì") (mkV173 "õâúðëÿ")) ;
tie_V2 = dirV2 (actionV (mkV186 "âðúçâàì") (mkV156 "âúðæà")) ;
wash_V2 = dirV2 (stateV (mkV163 "ìèÿ")) ;
wipe_V2 = dirV2 (stateV (mkV159 "áúðøà")) ;
bite_V2 = dirV2 (stateV (mkV154 "хапя")) ;
count_V2 = dirV2 (stateV (mkV175 "броя")) ;
cut_V2 = dirV2 (stateV (mkV157 "режа")) ;
fear_V2 = prepV2 (medialV (stateV (mkV186 "страхувам")) Acc) otP;
fight_V2 = prepV2 (medialV (stateV (mkV173 "боря")) Acc) sP;
hit_V2 = dirV2 (actionV (mkV187 "удрям") (mkV173 "ударя")) ;
hold_V2 = dirV2 (stateV (mkV179 "държа")) ;
hunt_V2 = dirV2 (stateV (mkV174 "ловя")) ;
kill_V2 = dirV2 (actionV (mkV186 "убивам") (mkV163 "убия")) ;
pull_V2 = dirV2 (stateV (mkV186 "дърпам")) ;
push_V2 = dirV2 (stateV (mkV186 "бутам")) ;
rub_V2 = dirV2 (stateV (mkV163 "трия")) ;
scratch_V2 = dirV2 (actionV (mkV186 "драскам") (mkV152 "драсна")) ;
split_V2 = dirV2 (actionV (mkV187 "разделям") (mkV174 "разделя")) ;
squeeze_V2 = dirV2 (actionV (mkV186 "стискам") (mkV152 "стисна")) ;
stab_V2 = dirV2 (actionV (mkV186 "промушвам") (mkV176 "промуша")) ;
suck_V2 = dirV2 (stateV (mkV155 "суча")) ;
throw_V2 = dirV2 (actionV (mkV187 "хвърлям") (mkV173 "хвърля")) ;
tie_V2 = dirV2 (actionV (mkV186 "връзвам") (mkV156 "вържа")) ;
wash_V2 = dirV2 (stateV (mkV163 "мия")) ;
wipe_V2 = dirV2 (stateV (mkV159 "бърша")) ;
grammar_N = mkN041 "ãðàìàòèêà" ;
language_N = mkN014 "åçèê" ;
rule_N = mkN054 "ïðàâèëî" ;
grammar_N = mkN041 "граматика" ;
language_N = mkN014 "език" ;
rule_N = mkN054 "правило" ;
john_PN = mkPN "Äæîí" Masc ;
question_N = mkN007 "âúïðîñ" ;
ready_A = mkA076 "ãîòîâ" ;
reason_N = mkN041 "ïðè÷èíà" ;
today_Adv = mkAdv "äíåñ" ;
uncertain_A = mkA079 "íåÿñåí" ;
john_PN = mkPN "Джон" Masc ;
question_N = mkN007 "въпрос" ;
ready_A = mkA076 "готов" ;
reason_N = mkN041 "причина" ;
today_Adv = mkAdv "днес" ;
uncertain_A = mkA079 "неясен" ;
oper
zaP = mkPrep "çà" Acc ;
zaP = mkPrep "за" Acc ;
naP = mkPrep [] Dat ;
otP = mkPrep "îò" Acc ;
doP = mkPrep "äî" Acc ;
sP = mkPrep (pre { "ñ" ;
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
otP = mkPrep "от" Acc ;
doP = mkPrep "до" Acc ;
sP = mkPrep (pre { "с" ;
"със" / strs {"с" ; "з" ; "С" ; "З"}
}) Acc ;
} ;

View File

@@ -1,5 +1,5 @@
--# -path=.:../../prelude
--# -coding=cp1251
--# -coding=utf8
--1 A Simple English Resource Morphology
--
@@ -14,7 +14,7 @@ resource MorphoBul = ResBul ** open
Prelude,
CatBul
in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all ;
@@ -95,73 +95,73 @@ oper
\cheta,chete,chetoh,chetqh,chel,chetql,cheten,chetqst,cheti,chetene ->
table {
VPres Sg P1 => cheta;
VPres Sg P2 => chete + "ø";
VPres Sg P2 => chete + "ш";
VPres Sg P3 => chete;
VPres Pl P1 => case chete of {
_ + ("à"|"ÿ") => chete + "ìå";
_ => chete + "ì"
_ + ("а"|"я") => chete + "ме";
_ => chete + "м"
};
VPres Pl P2 => chete + "òå";
VPres Pl P2 => chete + "те";
VPres Pl P3 => case cheta of {
vika + "ì" => case chete of {
zn + "àå" => zn + "àÿò";
dad + "å" => dad + "àò";
vika => vika + "ò"
vika + "м" => case chete of {
zn + "ае" => zn + "аят";
dad + "е" => dad + "ат";
vika => vika + "т"
};
_ => cheta + "ò"
_ => cheta + "т"
};
VAorist Sg P1 => chetoh;
VAorist Sg _ => case chetoh of {
chet+"îõ" => chete;
zova+ "õ" => zova
chet+"ох" => chete;
zova+ "х" => zova
};
VAorist Pl P1 => chetoh + "ìå";
VAorist Pl P2 => chetoh + "òå";
VAorist Pl P3 => chetoh + "à";
VAorist Pl P1 => chetoh + "ме";
VAorist Pl P2 => chetoh + "те";
VAorist Pl P3 => chetoh + "а";
VImperfect Sg P1 => chetqh;
VImperfect Sg _ => case chete of {
rabot + "è" => rabot + "eøå";
_ => chete + "øå"
rabot + "и" => rabot + "eше";
_ => chete + "ше"
};
VImperfect Pl P1 => chetqh + "ìå";
VImperfect Pl P2 => chetqh + "òå";
VImperfect Pl P3 => chetqh + "à";
VImperfect Pl P1 => chetqh + "ме";
VImperfect Pl P2 => chetqh + "те";
VImperfect Pl P3 => chetqh + "а";
VPerfect aform =>let chel1 : Str =
case chel of {
pas+"úë" => pas+"ë";
pas+"ъл" => pas+"л";
_ => chel
} ;
chel2 : Str =
case chel of {
w+"ëÿçúë" => w+"ëåçë";
w+"лязъл" => w+"лезл";
_ => chel
}
in (mkAdjective chel
(chel2+"èÿ")
(chel2+"èÿò")
(chel2+"ия")
(chel2+"ият")
(chel1+"a")
(chel1+"àòà")
(chel1+"î")
(chel1+"îòî")
(ia2e chel1+"è")
(ia2e chel1+"èòå")).s ! aform ;
(chel1+"ата")
(chel1+"о")
(chel1+"ото")
(ia2e chel1+"и")
(ia2e chel1+"ите")).s ! aform ;
VPluPerfect aform => regAdjective chetql ! aform ;
VPassive aform => regAdjective cheten ! aform ;
VPresPart aform => regAdjective chetqst ! aform ;
VImperative Sg => cheti;
VImperative Pl => case cheti of {
chet + "è" => chet + "åòå";
ela => ela + "òå"
chet + "и" => chet + "ете";
ela => ela + "те"
};
VNoun nform => let v0 = init chetene
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut) ! nform;
VGerund => case chete of {
rabot + "è" => rabot + "åéêè";
_ => chete + "éêè"
rabot + "и" => rabot + "ейки";
_ => chete + "йки"
}
} ;
@@ -172,51 +172,51 @@ oper
table {
NF Sg Indef => sg ;
NF Sg Def => case sg of {
_+"à"=>sg+"òà" ;
_+"ÿ"=>sg+"òà" ;
_+"î"=>sg+"òî" ;
_+"ó"=>sg+"òî" ;
_+"å"=>sg+"òî" ;
_+"è"=>sg+"òî" ;
s+"é"=>s +"ÿ" ;
_+("úð")
=>sg +"à" ;
_+("òåë"|"àð"|"ÿð"|"äåí"
|"ïúò"|"îãúí"|"ñúí"
|"êîí"|"êðàë"|"öàð"
|"çåò"|"ëàêúò"|"íîêúò")
=>sg +"ÿ" ;
_+"а"=>sg+"та" ;
_+"я"=>sg+"та" ;
_+"о"=>sg+"то" ;
_+"у"=>sg+"то" ;
_+"е"=>sg+"то" ;
_+"и"=>sg+"то" ;
s+"й"=>s +"я" ;
_+("ър")
=>sg +"а" ;
_+("тел"|"ар"|"яр"|"ден"
|"път"|"огън"|"сън"
|"кон"|"крал"|"цар"
|"зет"|"лакът"|"нокът")
=>sg +"я" ;
_ =>case g of {
AFem => sg+"òà" ;
_ => sg+"à"
AFem => sg+"та" ;
_ => sg+"а"
}
} ;
NF Pl Indef => pl ;
NF Pl Def => case pl of {
_+"à"=>pl+"òà" ;
_+"å"=>pl+"òå" ;
_+"è"=>pl+"òå" ;
_+"ÿ"=>pl+"òà" ;
_ =>pl+"òå"
_+"а"=>pl+"та" ;
_+"е"=>pl+"те" ;
_+"и"=>pl+"те" ;
_+"я"=>pl+"та" ;
_ =>pl+"те"
} ;
NFSgDefNom => case sg of {
_+"à"=>sg+"òà" ;
_+"ÿ"=>sg+"òà" ;
_+"î"=>sg+"òî" ;
_+"ó"=>sg+"òî" ;
_+"å"=>sg+"òî" ;
_+"è"=>sg+"òî" ;
s+"é"=>s +"ÿò" ;
_+("úð")
=>sg +"úò" ;
_+("òåë"|"àð"|"ÿð"|"äåí"
|"ïúò"|"îãúí"|"ñúí"
|"êîí"|"êðàë"|"öàð"
|"çåò"|"ëàêúò"|"íîêúò")
=>sg+"ÿò" ;
_+"а"=>sg+"та" ;
_+"я"=>sg+"та" ;
_+"о"=>sg+"то" ;
_+"у"=>sg+"то" ;
_+"е"=>sg+"то" ;
_+"и"=>sg+"то" ;
s+"й"=>s +"ят" ;
_+("ър")
=>sg +"ът" ;
_+("тел"|"ар"|"яр"|"ден"
|"път"|"огън"|"сън"
|"кон"|"крал"|"цар"
|"зет"|"лакът"|"нокът")
=>sg+"ят" ;
_ =>case g of {
AFem => sg+"òà" ;
_ => sg+"úò"
AFem => sg+"та" ;
_ => sg+"ът"
}
} ;
NFPlCount => count ;

View File

@@ -1,4 +1,4 @@
--# -coding=cp1251
--# -coding=utf8
--# -path=.:../abstract:../../prelude:../common
resource MorphoFunsBul = open
@@ -6,7 +6,7 @@ resource MorphoFunsBul = open
CatBul,
MorphoBul
in {
flags coding=cp1251 ;
flags coding=utf8 ;
oper
@@ -57,11 +57,11 @@ oper
dualV : VTable -> VTable -> V ;
dualV imperf perf = {
s = table {Imperf=>imperf; Perf=>perf};
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "í"
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "н"
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut).s;
vtype = VNormal;
lock_V=<>
@@ -72,11 +72,11 @@ oper
singleV : VTable -> V ;
singleV vtable = {
s = \\_=>vtable;
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "í"
in (mkNoun (v0+"å")
(v0+"èÿ")
(v0+"èÿ")
(v0+"å")
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "н"
in (mkNoun (v0+"е")
(v0+"ия")
(v0+"ия")
(v0+"е")
ANeut).s;
vtype = VNormal;
lock_V=<>
@@ -136,6 +136,9 @@ oper
mkV2V : V -> Prep -> Prep -> V2V ;
mkV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = False ; lock_V2V = <>} ;
imperfV2V : V -> VV ;
imperfV2V v = v ** {typ = VVInf Imperf; lock_VV = <>} ;
subjCtrlV2V : V -> Prep -> Prep -> V2V ;
subjCtrlV2V v p t = prepV2 v p ** {c3 = t ; subjCtrl = True ; lock_V2V = <>} ;
@@ -198,9 +201,9 @@ oper
compoundN = overload {
compoundN : Str -> N -> N
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relPost = True; 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 ; anim=n.anim ; lock_N = <>} ;
compoundN : N -> Str -> N
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relPost = True; 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 ; anim=n.anim ; lock_N = <>} ;
compoundN : N -> N -> N
= \n1,n2 -> lin N
{s = table {
@@ -209,14 +212,14 @@ oper
NFPlCount => n1.s ! NFPlCount ++ n2.s ! (NF Pl Indef) ;
NFVocative => n1.s ! NFVocative ++ n2.s ! (NF Sg Indef)
} ;
rel = \\aform => n1.rel ! aform; relPost = True;
rel = \\aform => n1.rel ! aform; relType = AdvMod;
g = n1.g
} ;
compoundN : A -> N -> N
= \a,n -> lin N
{s = \\nf => (a.s ! nform2aform nf n.g) ++ (n.s ! (indefNForm nf)) ;
rel = \\aform => a.s ! aform ++ n.rel ! indefAForm aform ;
relPost = False ;
relType = AdjMod ;
g = n.g
} ;
} ;
@@ -224,7 +227,7 @@ oper
dualN = overload {
dualN : N -> A -> N
= \n,a -> lin N { s = n.s;
rel = a.s; relPost = False;
rel = a.s; relType = AdjMod;
g = n.g
} ;
@@ -232,14 +235,14 @@ oper
= \n,p -> lin N { s = n.s;
rel = \\_ => linPrep p ++
n.s ! NF Sg Def ;
relPost = True;
relType = AdvMod;
g = n.g
} ;
dualN : N -> Str -> N
= \n,adv -> lin N { s = n.s;
rel = \\_ => adv ;
relPost = True;
relType = AdvMod;
g = n.g
}
@@ -250,7 +253,7 @@ oper
substantiveN : A -> AGender -> N;
substantiveN a g = lin N {
s = \\nform => a.s ! nform2aform nform g;
rel = a.s; relPost = False;
rel = a.s; relType = AdjMod;
g = g
} ;
@@ -283,5 +286,5 @@ oper
--
mkIAdv : Str -> IAdv ;
mkIAdv s = {s = table {QDir=>s;QIndir=>s+"òî"}; lock_IAdv = <>} ;
mkIAdv s = {s = table {QDir=>s;QIndir=>s+"то"}; lock_IAdv = <>} ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
flags optimize=all_subs ; coding=cp1251 ;
flags optimize=all_subs ; coding=utf8 ;
lin
DetCN det cn =
@@ -123,17 +123,17 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
AdNum adn num = {s = \\gspec => adn.s ++ num.s ! gspec; nn = num.nn} ;
OrdSuperl a = {s = \\aform => "íàé" ++ hyphen ++ a.s ! aform} ;
OrdSuperl a = {s = \\aform => "най" ++ hyphen ++ a.s ! aform} ;
DefArt = {
s = table {
True => \\_ => [] ;
False => table {
ASg Masc _ => "òîé" ;
ASgMascDefNom => "òîé" ;
ASg Fem _ => "òÿ" ;
ASg Neut _ => "òî" ;
APl _ => "òå"
ASg Masc _ => "той" ;
ASgMascDefNom => "той" ;
ASg Fem _ => "тя" ;
ASg Neut _ => "то" ;
APl _ => "те"
}
} ;
nonEmpty = False ;
@@ -145,11 +145,11 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
s = table {
True => \\_ => [] ;
False => table {
ASg Masc _ => "åäèí" ;
ASgMascDefNom => "åäèí" ;
ASg Fem _ => "åäíà" ;
ASg Neut _ => "åäíî" ;
APl _ => "åäíè"
ASg Masc _ => "един" ;
ASgMascDefNom => "един" ;
ASg Fem _ => "една" ;
ASg Neut _ => "едно" ;
APl _ => "едни"
}
} ;
nonEmpty = False ;
@@ -171,10 +171,10 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
UseN2 noun = noun ;
ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; g=f.g} ;
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; rel = \\af => f.rel ! af ++ f.c2.s ++ x.s ! RObj f.c2.c; relPost = True; c2 = f.c3; g=f.g} ;
ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; rel = \\af => f.rel ! af ++ f.c2.s ++ x.s ! RObj f.c2.c; relType = AdvMod; c2 = f.c3; g=f.g} ;
Use2N3 f = {s = f.s ; rel = f.rel ; relPost = f.relPost ; g=f.g ; c2 = f.c2} ;
Use3N3 f = {s = f.s ; rel = f.rel ; relPost = f.relPost ; g=f.g ; c2 = f.c3} ;
Use2N3 f = {s = f.s ; rel = f.rel ; relType = f.relType ; g=f.g ; c2 = f.c2} ;
Use3N3 f = {s = f.s ; rel = f.rel ; relType = f.relType ; g=f.g ; c2 = f.c3} ;
AdjCN ap cn = {
@@ -197,9 +197,9 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
ApposCN cn np = {s = \\nf => cn.s ! nf ++ np.s ! RSubj; g=cn.g} ;
PossNP cn np = {s = \\nf => cn.s ! nf ++ "íà" ++ np.s ! (RObj CPrep); g = cn.g} ;
PossNP cn np = {s = \\nf => cn.s ! nf ++ "на" ++ np.s ! (RObj CPrep); g = cn.g} ;
PartNP cn np = {s = \\nf => cn.s ! nf ++ "îò" ++ np.s ! (RObj CPrep); g = cn.g} ;
PartNP cn np = {s = \\nf => cn.s ! nf ++ "от" ++ np.s ! (RObj CPrep); g = cn.g} ;
CountNP det np = {
s = \\role => let g = case np.gn of { -- this is lossy

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
lincat
@@ -11,43 +11,43 @@ lincat
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
lin n2 = mkDigit "äâà" "äâàìà" "äâå" "âòîðè" "äâàéñåò" "äâåñòà" "äâåñòàòà" ;
lin n3 = mkDigit "òðè" "òðèìà" "òðè" "òðåòè" "òðèéñåò" "òðèñòà" "òðèñòàòà" ;
lin n4 = mkDigit "÷åòèðè" "÷åòèðèìà" "÷åòèðè" "÷åòâúðòè" "÷åòèðèéñåò" "÷åòèðèñòîòèí" "÷åòèðèñòîòèíòå" ;
lin n5 = mkDigit "ïåò" "ïåòèìà" "ïåò" "ïåòè" "ïåòäåñåò" "ïåòñòîòèí" "ïåòñòîòèíòå" ;
lin n6 = mkDigit "øåñò" "øåñòèìà" "øåñò" "øåñòè" "øåéñåò" "øåñòñòîòèí" "øåñòñòîòèíòå" ;
lin n7 = mkDigit "ñåäåì" "ñåäìèíà" "ñåäåì" "ñåäìè" "ñåäåìäåñåò" "ñåäåìñòîòèí" "ñåäåìñòîòèíòå" ;
lin n8 = mkDigit "îñåì" "îñìèíà" "îñåì" "îñìè" "îñåìäåñåò" "îñåìñòîòèí" "îñåìñòîòèíòå" ;
lin n9 = mkDigit "äåâåò" "äåâåòèìà" "äåâåò" "äåâåòè" "äåâåòäåñåò" "äåâåòñòîòèí" "äåâåòñòîòèíòå" ;
lin n2 = mkDigit "два" "двама" "две" "втори" "двайсет" "двеста" "двестата" ;
lin n3 = mkDigit "три" "трима" "три" "трети" "трийсет" "триста" "тристата" ;
lin n4 = mkDigit "четири" "четирима" "четири" "четвърти" "четирийсет" "четиристотин" "четиристотинте" ;
lin n5 = mkDigit "пет" "петима" "пет" "пети" "петдесет" "петстотин" "петстотинте" ;
lin n6 = mkDigit "шест" "шестима" "шест" "шести" "шейсет" "шестстотин" "шестстотинте" ;
lin n7 = mkDigit "седем" "седмина" "седем" "седми" "седемдесет" "седемстотин" "седемстотинте" ;
lin n8 = mkDigit "осем" "осмина" "осем" "осми" "осемдесет" "осемстотин" "осемстотинте" ;
lin n9 = mkDigit "девет" "деветима" "девет" "девети" "деветдесет" "деветстотин" "деветстотинте" ;
lin pot01 =
{s = table {
unit => table {
NCard (CFMasc Indef _) => "åäèí" ;
NCard (CFMasc Def _) => "åäèíèÿ" ;
NCard (CFMascDefNom _) => "åäèíèÿò" ;
NCard (CFFem Indef) => "åäíà" ;
NCard (CFFem Def) => "åäíàòà" ;
NCard (CFNeut Indef) => "åäíî" ;
NCard (CFNeut Def) => "åäíîòî" ;
NCard (CFMasc Indef _) => "един" ;
NCard (CFMasc Def _) => "единия" ;
NCard (CFMascDefNom _) => "единият" ;
NCard (CFFem Indef) => "една" ;
NCard (CFFem Def) => "едната" ;
NCard (CFNeut Indef) => "едно" ;
NCard (CFNeut Def) => "едното" ;
NOrd aform => case aform of {
ASg Masc Indef => "ïúðâè" ;
ASg Masc Def => "ïúðâèÿ" ;
ASgMascDefNom => "ïúðâèÿò" ;
ASg Fem Indef => "ïúðâà" ;
ASg Fem Def => "ïúðâàòà" ;
ASg Neut Indef => "ïúðâî" ;
ASg Neut Def => "ïúðâîòî" ;
APl Indef => "ïúðâè" ;
APl Def => "ïúðâèòå"
ASg Masc Indef => "първи" ;
ASg Masc Def => "първия" ;
ASgMascDefNom => "първият" ;
ASg Fem Indef => "първа" ;
ASg Fem Def => "първата" ;
ASg Neut Indef => "първо" ;
ASg Neut Def => "първото" ;
APl Indef => "първи" ;
APl Def => "първите"
}
} ;
teen nf => case nf of {
Formal => mkCardOrd "åäèíàäåñåò" "åäèíàäåñåòèìà" "åäèíàäåñåò" "åäèíàäåñåòè" ;
Informal => mkCardOrd "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñòè"
Formal => mkCardOrd "единадесет" "единадесетима" "единадесет" "единадесети" ;
Informal => mkCardOrd "единайсет" "единайсет" "единайсет" "единайсти"
} ;
ten nf => mkCardOrd "äåñåò" "äåñåòèìà" "äåñåò" "äåñåòè" ;
hundred => mkCardOrd100 "ñòî" "ñòîòå" "ñòîòåí"
ten nf => mkCardOrd "десет" "десетима" "десет" "десети" ;
hundred => mkCardOrd100 "сто" "стоте" "стотен"
}
;n = Sg
} ;
@@ -59,12 +59,12 @@ lin pot1to19 d = {s = \\c,nf => d.s ! teen nf ! c; n = Pl; i = True} ;
lin pot0as1 n = {s = \\c,nf => n.s ! unit ! c; n = n.n; i = True} ;
lin pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
lin pot1plus d e = {
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "è" ++ e.s ! unit ! c ; n = Pl; i = False} ;
s = \\c,nf => d.s ! ten nf ! NCard (CFMasc Indef NonHuman) ++ "и" ++ e.s ! unit ! c ; n = Pl; i = False} ;
lin pot1as2 n = n ;
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
lin pot2plus d e = {
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "è"} ++ e.s ! c ! nf ;
s = \\c,nf => d.s ! hundred ! NCard (CFMasc Indef NonHuman) ++ case e.i of {False => []; True => "и"} ++ e.s ! c ! nf ;
n = Pl ;
i = False
} ;
@@ -72,17 +72,17 @@ lin pot2plus d e = {
lin pot2as3 n = n ;
lin pot3 n = {
s = \\c,nf => case n.n of {
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! c ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäèòå" "õèëÿäåí" ! c
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! c ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! c
} ;
n = Pl
} ;
lin pot3plus n m = {
s = \\c,nf => case n.n of {
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! NCard (CFMasc Indef NonHuman) ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäèòå" "õèëÿäåí" ! NCard (CFMasc Indef NonHuman)
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! NCard (CFMasc Indef NonHuman) ;
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! NCard (CFMasc Indef NonHuman)
}
++ case m.i of {False => []; True => "è"} ++ m.s ! c ! nf ;
++ case m.i of {False => []; True => "и"} ++ m.s ! c ! nf ;
n = Pl
} ;
@@ -101,16 +101,16 @@ lin pot3plus n m = {
tail = inc i.tail
} ;
D_0 = mk3Dig "0" "0" "0åâ" Pl ;
D_1 = mk3Dig "1" "1" "1âè" Sg ;
D_2 = mk2Dig "2" "2ðè" ;
D_0 = mk3Dig "0" "0" "0ев" Pl ;
D_1 = mk3Dig "1" "1" "1ви" Sg ;
D_2 = mk2Dig "2" "2ри" ;
D_3 = mkDig "3" ;
D_4 = mkDig "4" ;
D_5 = mkDig "5" ;
D_6 = mkDig "6" ;
D_7 = mk3Dig "7" "7íà" "7ìè" Pl ;
D_8 = mk3Dig "8" "8íà" "8ìè" Pl ;
D_9 = mk3Dig "9" "9èìà" "9òè" Pl ;
D_7 = mk3Dig "7" "7на" "7ми" Pl ;
D_8 = mk3Dig "8" "8на" "8ми" Pl ;
D_9 = mk3Dig "9" "9има" "9ти" Pl ;
oper
spaceIf : DTail -> Str = \t -> case t of {
@@ -124,8 +124,8 @@ lin pot3plus n m = {
T3 => T1
} ;
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ìà") o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "òè") ;
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ма") o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "ти") ;
mk3Dig : Str -> Str -> Str -> Number -> TDigit = \c1,c2,o,n -> {
s = mkCardOrd c1 c2 c1 o ;

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
lin

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -12,7 +12,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
let cls = cl.s ! t ! a ! p
in table {
QDir => cls ! Quest ;
QIndir => "àêî" ++ cls ! Main
QIndir => "ако" ++ cls ! Main
} ---- "whether" in ExtEng
} ;
@@ -22,7 +22,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
} ;
QuestSlash ip slash =
mkQuestion {s = \\qform => slash.c2.s ++ case slash.c2.c of {Dat=>"íà";_=>[]} ++ ip.s ! (RObj slash.c2.c) ! qform}
mkQuestion {s = \\qform => slash.c2.s ++ case slash.c2.c of {Dat=>"на";_=>[]} ++ ip.s ! (RObj slash.c2.c) ! qform}
{s = slash.s ! (agrP3 ip.gn) } ;
QuestIAdv iadv cl = mkQuestion iadv cl ;
@@ -30,7 +30,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
QuestIComp icomp np =
mkQuestion icomp (mkClause (np.s ! RSubj) np.gn np.p (predV verbBe)) ;
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"íà";_=>[]} ++ ip.s ! RSubj ! qform} ;
PrepIP p ip = {s = \\qform => p.s ++ case p.c of {Dat=>"на";_=>[]} ++ ip.s ! RSubj ! qform} ;
AdvIP ip adv = {
s = \\role,qform => ip.s ! role ! qform ++ adv.s ;

View File

@@ -1,13 +1,13 @@
--# -coding=cp1251
--# -coding=utf8
concrete RelativeBul of Relative = CatBul ** open ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
lin
RelCl cl = {
s = \\t,a,p,agr => suchRP ! agr.gn ++ "֌" ++ cl.s ! t ! a ! p ! Main
s = \\t,a,p,agr => suchRP ! agr.gn ++ "че" ++ cl.s ! t ! a ! p ! Main
} ;
RelVP rp vp = {

View File

@@ -1,5 +1,5 @@
--# -path=.:../abstract:../common:../../prelude
--# -coding=cp1251
--# -coding=utf8
--1 Bulgarian auxiliary operations.
@@ -11,7 +11,7 @@
resource ResBul = ParamX ** open Prelude, Predef in {
flags
coding=cp1251 ; optimize=all ;
coding=utf8 ; optimize=all ;
-- Some parameters, such as $Number$, are inherited from $ParamX$.
@@ -30,7 +30,9 @@ resource ResBul = ParamX ** open Prelude, Predef in {
| NFPlCount
| NFVocative
;
NRelType = Pref | AdjMod | AdvMod ;
NNumber =
NNum Number
| NCountable
@@ -326,149 +328,149 @@ resource ResBul = ParamX ** open Prelude, Predef in {
auxBe : VTable =
table {
VPres Sg P1 => "ñúì" ;
VPres Sg P2 => "ñè" ;
VPres Sg P3 => "å" ;
VPres Pl P1 => "ñìå" ;
VPres Pl P2 => "ñòå" ;
VPres Pl P3 => "ñà" ;
VAorist Sg P1 => "áÿõ" ;
VAorist Sg _ => "áåøå" ;
VAorist Pl P1 => "áÿõìå" ;
VAorist Pl P2 => "áÿõòå" ;
VAorist Pl P3 => "áÿõà" ;
VImperfect Sg P1 => "áÿõ" ;
VImperfect Sg _ => "áåøå" ;
VImperfect Pl P1 => "áÿõìå" ;
VImperfect Pl P2 => "áÿõòå" ;
VImperfect Pl P3 => "áÿõà" ;
VPerfect aform => regAdjective "áèë" ! aform ;
VPluPerfect aform => regAdjective "áèë" ! aform ;
VPassive aform => regAdjective "áúäåí" ! aform ;
VPresPart aform => regAdjective "áúäåù" ! aform ;
VImperative Sg => "áúäè" ;
VImperative Pl => "áúäåòå" ;
VNoun _ => "áúäåíå";
VGerund => "áèäåéêè"
VPres Sg P1 => "съм" ;
VPres Sg P2 => "си" ;
VPres Sg P3 => "е" ;
VPres Pl P1 => "сме" ;
VPres Pl P2 => "сте" ;
VPres Pl P3 => "са" ;
VAorist Sg P1 => "бях" ;
VAorist Sg _ => "беше" ;
VAorist Pl P1 => "бяхме" ;
VAorist Pl P2 => "бяхте" ;
VAorist Pl P3 => "бяха" ;
VImperfect Sg P1 => "бях" ;
VImperfect Sg _ => "беше" ;
VImperfect Pl P1 => "бяхме" ;
VImperfect Pl P2 => "бяхте" ;
VImperfect Pl P3 => "бяха" ;
VPerfect aform => regAdjective "бил" ! aform ;
VPluPerfect aform => regAdjective "бил" ! aform ;
VPassive aform => regAdjective "бъден" ! aform ;
VPresPart aform => regAdjective "бъдещ" ! aform ;
VImperative Sg => "бъди" ;
VImperative Pl => "бъдете" ;
VNoun _ => "бъдене";
VGerund => "бидейки"
} ;
auxWould : VTable =
table {
VPres Sg P1 => "áúäà" ;
VPres Sg P2 => "áúäåø" ;
VPres Sg P3 => "áúäå" ;
VPres Pl P1 => "áúäåì" ;
VPres Pl P2 => "áúäåòå" ;
VPres Pl P3 => "áúäàò" ;
VAorist Sg P1 => "áÿõ" ;
VAorist Sg _ => "áåøå" ;
VAorist Pl P1 => "áÿõìå" ;
VAorist Pl P2 => "áÿõòå" ;
VAorist Pl P3 => "áÿõà" ;
VImperfect Sg P1 => "áúäåõ" ;
VImperfect Sg _ => "áúäåøå" ;
VImperfect Pl P1 => "áúäåõìå" ;
VImperfect Pl P2 => "áúäåõòå" ;
VImperfect Pl P3 => "áúäåõà" ;
VPerfect aform => regAdjective "áèë" ! aform ;
VPluPerfect aform => regAdjective "áúäåë" ! aform ;
VPassive aform => regAdjective "áúäåí" ! aform ;
VPresPart aform => regAdjective "áúäåù" ! aform ;
VImperative Sg => "áúäè" ;
VImperative Pl => "áúäåòå" ;
VNoun _ => "áúäåíå";
VGerund => "áúäåéêè"
VPres Sg P1 => "бъда" ;
VPres Sg P2 => "бъдеш" ;
VPres Sg P3 => "бъде" ;
VPres Pl P1 => "бъдем" ;
VPres Pl P2 => "бъдете" ;
VPres Pl P3 => "бъдат" ;
VAorist Sg P1 => "бях" ;
VAorist Sg _ => "беше" ;
VAorist Pl P1 => "бяхме" ;
VAorist Pl P2 => "бяхте" ;
VAorist Pl P3 => "бяха" ;
VImperfect Sg P1 => "бъдех" ;
VImperfect Sg _ => "бъдеше" ;
VImperfect Pl P1 => "бъдехме" ;
VImperfect Pl P2 => "бъдехте" ;
VImperfect Pl P3 => "бъдеха" ;
VPerfect aform => regAdjective "бил" ! aform ;
VPluPerfect aform => regAdjective "бъдел" ! aform ;
VPassive aform => regAdjective "бъден" ! aform ;
VPresPart aform => regAdjective "бъдещ" ! aform ;
VImperative Sg => "бъди" ;
VImperative Pl => "бъдете" ;
VNoun _ => "бъдене";
VGerund => "бъдейки"
} ;
auxCond : Number => Person => Str =
table {
Sg => table {
P1 => "áèõ" ;
_ => "áè"
P1 => "бих" ;
_ => "би"
} ;
Pl => table {
P1 => "áèõìå" ;
P2 => "áèõòå" ;
P3 => "áèõà"
P1 => "бихме" ;
P2 => "бихте" ;
P3 => "биха"
}
} ;
verbBe : Verb = {s=table Aspect [auxBe; auxWould] ; vtype=VNormal} ;
reflClitics : Case => Str = table {Acc => "ñå"; Dat => "ñè"; WithPrep => with_Word ++ "ñåáå ñè"; CPrep => "ñåáå ñè"} ;
reflClitics : Case => Str = table {Acc => "се"; Dat => "си"; WithPrep => with_Word ++ "себе си"; CPrep => "себе си"} ;
personalClitics : Agr -> Case => Str = \agr ->
table {
Acc => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìå" ;
P2 => "òå" ;
P1 => "ме" ;
P2 => "те" ;
P3 => case g of {
Masc => "ãî" ;
Fem => "ÿ" ;
Neut => "ãî"
Masc => "го" ;
Fem => "я" ;
Neut => "го"
}
} ;
GPl => case agr.p of {
P1 => "íè" ;
P2 => "âè" ;
P3 => "ãè"
P1 => "ни" ;
P2 => "ви" ;
P3 => "ги"
}
} ;
Dat => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìè" ;
P2 => "òè" ;
P1 => "ми" ;
P2 => "ти" ;
P3 => case g of {
Masc => "ìó" ;
Fem => "é" ;
Neut => "ìó"
Masc => "му" ;
Fem => "й" ;
Neut => "му"
}
} ;
GPl => case agr.p of {
P1 => "íè" ;
P2 => "âè" ;
P3 => "èì"
P1 => "ни" ;
P2 => "ви" ;
P3 => "им"
}
} ;
WithPrep => case agr.gn of {
GSg g => case agr.p of {
P1 => with_Word ++ "ìåí" ;
P2 => with_Word ++ "òåá" ;
P1 => with_Word ++ "мен" ;
P2 => with_Word ++ "теб" ;
P3 => case g of {
Masc => with_Word ++ "íåãî" ;
Fem => with_Word ++ "íåÿ" ;
Neut => with_Word ++ "íåãî"
Masc => with_Word ++ "него" ;
Fem => with_Word ++ "нея" ;
Neut => with_Word ++ "него"
}
} ;
GPl => case agr.p of {
P1 => with_Word ++ "íàñ" ;
P2 => with_Word ++ "âàñ" ;
P3 => with_Word ++ "òÿõ"
P1 => with_Word ++ "нас" ;
P2 => with_Word ++ "вас" ;
P3 => with_Word ++ "тях"
}
} ;
CPrep => case agr.gn of {
GSg g => case agr.p of {
P1 => "ìåí" ;
P2 => "òåá" ;
P1 => "мен" ;
P2 => "теб" ;
P3 => case g of {
Masc => "íåãî" ;
Fem => "íåÿ" ;
Neut => "íåãî"
Masc => "него" ;
Fem => "нея" ;
Neut => "него"
}
} ;
GPl => case agr.p of {
P1 => "íàñ" ;
P2 => "âàñ" ;
P3 => "òÿõ"
P1 => "нас" ;
P2 => "вас" ;
P3 => "тях"
}
}
} ;
ia2e : Str -> Str = -- to be used when the next syllable has vowel different from "à","ú","î" or "ó"
ia2e : Str -> Str = -- to be used when the next syllable has vowel different from "а","ъ","о" or "у"
\s -> case s of {
x@(_*+_) + "ÿ" + y@(("á"|"â"|"ã"|"ä"|"æ"|"ç"|"ê"|"ë"|"ì"|"í"|"ï"|"ð"|"ñ"|"ò"|"ô"|"õ"|"ö"|"÷"|"ø")*)
=> x+"å"+y;
x@(_*+_) + "я" + y@(("б"|"в"|"г"|"д"|"ж"|"з"|"к"|"л"|"м"|"н"|"п"|"р"|"с"|"т"|"ф"|"х"|"ц"|"ч"|"ш")*)
=> x+"е"+y;
_ => s
};
@@ -476,19 +478,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\base ->
let base0 : Str
= case base of {
x+"è" => x;
x+"и" => x;
x => x
}
in table {
ASg Masc Indef => base ;
ASg Masc Def => (base0+"èÿ") ;
ASgMascDefNom => (base0+"èÿò") ;
ASg Fem Indef => (base0+"à") ;
ASg Fem Def => (base0+"aòa") ;
ASg Neut Indef => (base0+"î") ;
ASg Neut Def => (base0+"îòî") ;
APl Indef => (ia2e base0+"è") ;
APl Def => (ia2e base0+"èòå")
ASg Masc Def => (base0+"ия") ;
ASgMascDefNom => (base0+"ият") ;
ASg Fem Indef => (base0+"а") ;
ASg Fem Def => (base0+"ата") ;
ASg Neut Indef => (base0+"о") ;
ASg Neut Def => (base0+"ото") ;
APl Indef => (ia2e base0+"и") ;
APl Def => (ia2e base0+"ите")
};
-- For $Sentence$.
@@ -543,37 +545,37 @@ resource ResBul = ParamX ** open Prelude, Predef in {
_ => auxPres++s++clitic.s
} ;
li0 = case <verb.ad.isEmpty,q0> of {<False,True> => "ëè"; _ => []} ;
li0 = case <verb.ad.isEmpty,q0> of {<False,True> => "ли"; _ => []} ;
q = case verb.ad.isEmpty of {True => q0; False => False} ;
li = case q of {True => "ëè"; _ => []} ;
li = case q of {True => "ли"; _ => []} ;
vf1 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => case q of {True => {s1=[]; s2="ëè"++apc []};
Pos => case q of {True => {s1=[]; s2="ли"++apc []};
False => {s1=apc []; s2=[]}} ;
Neg => {s1="íå"++apc li; s2=[]}
Neg => {s1="не"++apc li; s2=[]}
} ;
vf2 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => case q of {True => {s1=[]; s2="ëè"++s};
Pos => case q of {True => {s1=[]; s2="ли"++s};
False => {s1=s; s2=[]}} ;
Neg => case verb.vtype of
{VNormal => {s1="íå"++s; s2=li} ;
_ => {s1="íå"++s++li; s2=[]}}
{VNormal => {s1="не"++s; s2=li} ;
_ => {s1="не"++s++li; s2=[]}}
} ;
vf3 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => {s1="ùå"++s; s2=li} ;
Neg => {s1="íÿìà"++li++"äà"++s; s2=[]}
Pos => {s1="ще"++s; s2=li} ;
Neg => {s1="няма"++li++"да"++s; s2=[]}
} ;
vf4 : Str -> {s1 : Str; s2 : Str} = \s ->
case p of {
Pos => {s1= s++li++clitic.s; s2=[]} ;
Neg => {s1="íå"++s++li++clitic.s; s2=[]}
Neg => {s1="не"++s++li++clitic.s; s2=[]}
} ;
verbs : {aux:{s1:Str; s2:Str}; main:Str} =
@@ -598,8 +600,8 @@ resource ResBul = ParamX ** open Prelude, Predef in {
VPhrasal Dat => {s=personalClitics agr ! Dat++vp.clitics; agr={gn=GSg Neut; p=P3}} ;
VPhrasal c => {s=vp.clitics++personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
} ;
pol = case p of {Pos => ""; Neg => "íå"}
in vp.ad.s ++ "äà" ++ pol ++ clitic.s ++
pol = case p of {Pos => ""; Neg => "не"}
in vp.ad.s ++ "да" ++ pol ++ clitic.s ++
case a of {
Simul => vp.s ! asp ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ;
Anter => auxBe ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++
@@ -611,9 +613,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\vp ->
let agr = {gn = GSg Neut; p = P1};
clitic = case vp.vtype of {
VNormal => {s=[]; agr=agr} ;
VMedial c => {s=reflClitics ! c; agr=agr} ;
VPhrasal c => {s=personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
VNormal => {s=vp.clitics; agr=agr} ;
VMedial c => {s=vp.clitics++reflClitics ! c; agr=agr} ;
VPhrasal c => {s=case c of {
Dat => personalClitics agr ! Dat++vp.clitics;
_ => vp.clitics++personalClitics agr ! c
};
agr={gn=GSg Neut; p=P3}
}
} ;
in vp.ad.s ++
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++ clitic.s ++
@@ -622,10 +629,10 @@ resource ResBul = ParamX ** open Prelude, Predef in {
linCase : Case -> Polarity -> Str =
\c,p -> case c of {
Acc => "" ;
Dat => "íà" ;
Dat => "на" ;
WithPrep => case p of {
Pos => with_Word ;
Neg => "áåç"
Neg => "без"
} ;
CPrep => ""
} ;
@@ -649,17 +656,17 @@ resource ResBul = ParamX ** open Prelude, Predef in {
{s = table {
unit => mkCardOrd dva dvama dve vtori ;
teen nf => case nf of {
Formal => mkCardOrd (dva+"íàäåñåò") (dva+"íàäåñåòèìà") (dva+"íàäåñåò") (dva+"íàäåñåòè") ;
Informal => mkCardOrd (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñòè")
Formal => mkCardOrd (dva+"надесет") (dva+"надесетима") (dva+"надесет") (dva+"надесети") ;
Informal => mkCardOrd (dva+"найсет") (dva+"найсет") (dva+"найсет") (dva+"найсти")
} ;
ten nf => case nf of {
Formal => mkCardOrd (dva+"äåñåò") (dva+"äåñåòèìà") (dva+"äåñåò") (dva+"äåñåòè") ;
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"è")
Formal => mkCardOrd (dva+"десет") (dva+"десетима") (dva+"десет") (dva+"десети") ;
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"и")
} ;
hundred => let dvesten : Str
= case dvesta of {
dvest+"à" => dvest+"åí" ;
chetiristot+"èí" => chetiristot+"åí"
dvest+"а" => dvest+"ен" ;
chetiristot+"ин" => chetiristot+"ен"
}
in mkCardOrd100 dvesta dvestata dvesten
}
@@ -669,19 +676,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\dva, dvama, dve, vtori ->
table {
NCard dg => digitGenderSpecies dva dvama dve ! dg ;
NOrd aform => let vtora : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "à" ;
vtoro : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "î";
i : Str = case vtori of {_+"â" => "è"; _ => ""}
NOrd aform => let vtora : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "а" ;
vtoro : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "о";
i : Str = case vtori of {_+"в" => "и"; _ => ""}
in case aform of {
ASg Masc Indef => vtori ;
ASg Masc Def => vtori+i+"ÿ" ;
ASgMascDefNom => vtori+i+"ÿò" ;
ASg Masc Def => vtori+i+"я" ;
ASgMascDefNom => vtori+i+"ят" ;
ASg Fem Indef => vtora ;
ASg Fem Def => vtora+"òà" ;
ASg Fem Def => vtora+"та" ;
ASg Neut Indef => vtoro ;
ASg Neut Def => vtoro+"òî" ;
ASg Neut Def => vtoro+"то" ;
APl Indef => vtori+i ;
APl Def => vtori+i+"òå"
APl Def => vtori+i+"те"
}
} ;
@@ -698,14 +705,14 @@ resource ResBul = ParamX ** open Prelude, Predef in {
NOrd aform => let stotn = init (init stoten) + last stoten ;
in case aform of {
ASg Masc Indef => stoten ;
ASg Masc Def => stotn+"èÿ" ;
ASgMascDefNom => stotn+"èÿò" ;
ASg Fem Indef => stotn+"à" ;
ASg Fem Def => stotn+"àòà" ;
ASg Neut Indef => stotn+"î" ;
ASg Neut Def => stotn+"îòî" ;
APl Indef => stotn+"è" ;
APl Def => stotn+"èòå"
ASg Masc Def => stotn+"ия" ;
ASgMascDefNom => stotn+"ият" ;
ASg Fem Indef => stotn+"а" ;
ASg Fem Def => stotn+"ата" ;
ASg Neut Indef => stotn+"о" ;
ASg Neut Def => stotn+"ото" ;
APl Indef => stotn+"и" ;
APl Def => stotn+"ите"
}
} ;
@@ -713,12 +720,12 @@ resource ResBul = ParamX ** open Prelude, Predef in {
\dva, dvama, dve
-> let addDef : Str -> Gender -> Str =
\s,g -> case s of {
dves+"òà" => dves+"òàòå" ;
dv+"à" => dv+"àòà" ;
"0" => s+"òà" ;
"1" => s+case g of {Masc => "ÿò"; Fem => "òà"; Neut => "òî"} ;
"2" => s+case g of {Masc => "òà"; _ => "òå"} ;
x => x+"òå"
dves+"та" => dves+"тате" ;
dv+"а" => dv+"ата" ;
"0" => s+"та" ;
"1" => s+case g of {Masc => "ят"; Fem => "та"; Neut => "то"} ;
"2" => s+case g of {Masc => "та"; _ => "те"} ;
x => x+"те"
}
in table {
CFMasc Indef NonHuman => dva ;
@@ -736,19 +743,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
mkIP : Str -> Str -> GenNum -> {s : Role => QForm => Str ; gn : GenNum} =
\koi,kogo,gn -> {
s = table {
RSubj => table QForm [koi; koi+"òî"] ;
RObj Acc => table QForm [kogo; kogo+"òî"] ;
RObj Dat => table QForm ["íà" ++ kogo; "íà" ++ kogo+"òî"] ;
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"òî"] ;
RObj CPrep => table QForm [kogo; kogo+"òî"] ;
RVoc => table QForm [koi; koi+"òî"]
RSubj => table QForm [koi; koi+"то"] ;
RObj Acc => table QForm [kogo; kogo+"то"] ;
RObj Dat => table QForm ["на" ++ kogo; "на" ++ kogo+"то"] ;
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"то"] ;
RObj CPrep => table QForm [kogo; kogo+"то"] ;
RVoc => table QForm [koi; koi+"то"]
} ;
gn = gn
} ;
with_Word : Str
= pre { "ñ" ;
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
= pre { "с" ;
"със" / strs {"с" ; "з" ; "С" ; "З"}
} ;
mkPron : (az,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) ->
@@ -805,43 +812,43 @@ resource ResBul = ParamX ** open Prelude, Predef in {
whichRP : GenNum => Str
= table {
GSg Masc => "êîéòî" ;
GSg Fem => "êîÿòî" ;
GSg Neut => "êîåòî" ;
GPl => "êîèòî"
GSg Masc => "който" ;
GSg Fem => "която" ;
GSg Neut => "което" ;
GPl => "които"
} ;
suchRP : GenNum => Str
= table {
GSg Masc => "òàêúâ" ;
GSg Fem => "òàêàâà" ;
GSg Neut => "òàêîâà" ;
GPl => "òàêèâà"
GSg Masc => "такъв" ;
GSg Fem => "такава" ;
GSg Neut => "такова" ;
GPl => "такива"
} ;
thisRP : GenNum => Str
= table {
GSg Masc => "òîçè" ;
GSg Fem => "òaçè" ;
GSg Neut => "òîâà" ;
GPl => "òåçè"
GSg Masc => "този" ;
GSg Fem => "тaзи" ;
GSg Neut => "това" ;
GPl => "тези"
} ;
linCoord : Str -> Ints 4 => Str ;
linCoord comma = table {0 => "è"; 1=>"èëè"; 2=>"íèòî"; 3=>comma; 4=>[]} ;
linCoord comma = table {0 => "и"; 1=>"или"; 2=>"нито"; 3=>comma; 4=>[]} ;
hyphen : Str = SOFT_BIND ++ "-" ++ SOFT_BIND ;
reflPron : AForm => Str =
table {
ASg Masc Indef => "ñâîé" ;
ASg Masc Def => "ñâîÿ" ;
ASgMascDefNom => "ñâîÿò" ;
ASg Fem Indef => "ñâîÿ" ;
ASg Fem Def => "ñâîÿòà" ;
ASg Neut Indef => "ñâîå" ;
ASg Neut Def => "ñâîåòî" ;
APl Indef => "ñâîè" ;
APl Def => "ñâîèòå"
ASg Masc Indef => "свой" ;
ASg Masc Def => "своя" ;
ASgMascDefNom => "своят" ;
ASg Fem Indef => "своя" ;
ASg Fem Def => "своята" ;
ASg Neut Indef => "свое" ;
ASg Neut Def => "своето" ;
APl Indef => "свои" ;
APl Def => "своите"
} ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -27,7 +27,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
}
in case orPol p vp.p of {
Pos => vp.ad.s ++ verb Perf ++ clitic ;
Neg => "íå" ++ vp.ad.s ++ clitic ++ verb Imperf
Neg => "не" ++ vp.ad.s ++ clitic ++ verb Imperf
} ++ compl ;
} ;
@@ -51,11 +51,11 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
SlashVS np vs slash = {
s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p
(insertObj (\\_ => "֌" ++ slash.s ! agr) Pos (predV vs))).s ;
(insertObj (\\_ => "че" ++ slash.s ! agr) Pos (predV vs))).s ;
c2 = slash.c2
} ;
EmbedS s = {s = "֌" ++ s.s} ;
EmbedS s = {s = "че" ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
EmbedVP vp = {s = daComplex Simul vp.p vp ! Perf ! agrP3 (GSg Masc)} ;

View File

@@ -1,132 +1,132 @@
--# -coding=cp1251
--# -coding=utf8
concrete StructuralBul of Structural = CatBul **
open MorphoBul, ParadigmsBul, Prelude, (X = ConstructX) in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all ;
lin
above_Prep = mkPrep "íàä" ;
after_Prep = mkPrep "ñëåä" ;
all_Predet = {s = table GenNum ["âñè÷êèÿ";"âñè÷êàòà";"âñè÷êîòî";"âñè÷êèòå"]} ;
almost_AdA, almost_AdN = ss "ïî÷òè" ;
at_least_AdN, at_most_AdN = ss "ïî÷òè" ; ---- AR
although_Subj = ss ["âúïðåêè ÷å"] ;
always_AdV = mkAdV "âèíàãè" ;
and_Conj = mkConj "è" Pl ;
because_Subj = ss "çàùîòî" ;
before_Prep = mkPrep "ïðåäè" ;
behind_Prep = mkPrep "çàä" ;
between_Prep = mkPrep "ìåæäó" ;
both7and_DConj = mkConj "è" Pl ** {sep=0} ;
but_PConj = ss "íî" ;
by8agent_Prep = mkPrep "÷ðåç" ;
by8means_Prep = mkPrep "÷ðåç" ;
can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ;
during_Prep = mkPrep ["ïî âðåìå íà"] ;
either7or_DConj = mkConj "èëè" Sg ** {sep=1} ;
everybody_NP = mkNP "âñåêè" (GSg Masc) (NounP3 Pos);
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
everything_NP = mkNP "âñè÷êî" (GSg Neut) (NounP3 Pos);
everywhere_Adv = ss "íàâñÿêúäå" ;
few_Det = {s = \\_,_,_ => "íÿêîëêî"; nn = NCountable; spec = Indef; p = Pos} ;
above_Prep = mkPrep "над" ;
after_Prep = mkPrep "след" ;
all_Predet = {s = table GenNum ["всичкия";"всичката";"всичкото";"всичките"]} ;
almost_AdA, almost_AdN = ss "почти" ;
at_least_AdN, at_most_AdN = ss "почти" ; ---- AR
although_Subj = ss ["въпреки че"] ;
always_AdV = mkAdV "винаги" ;
and_Conj = mkConj "и" Pl ;
because_Subj = ss "защото" ;
before_Prep = mkPrep "преди" ;
behind_Prep = mkPrep "зад" ;
between_Prep = mkPrep "между" ;
both7and_DConj = mkConj "и" Pl ** {sep=0} ;
but_PConj = ss "но" ;
by8agent_Prep = mkPrep "чрез" ;
by8means_Prep = mkPrep "чрез" ;
can8know_VV, can_VV = mkVV (stateV (mkV166 "мога")) ;
during_Prep = mkPrep ["по време на"] ;
either7or_DConj = mkConj "или" Sg ** {sep=1} ;
everybody_NP = mkNP "всеки" (GSg Masc) (NounP3 Pos);
every_Det = mkDeterminerSg "всеки" "всяка" "всяко";
everything_NP = mkNP "всичко" (GSg Neut) (NounP3 Pos);
everywhere_Adv = ss "навсякъде" ;
few_Det = {s = \\_,_,_ => "няколко"; nn = NCountable; spec = Indef; p = Pos} ;
--- first_Ord = ss "first" ; DEPRECATED
for_Prep = mkPrep "çà" ;
from_Prep = mkPrep "îò" ;
he_Pron = mkPron "òîé" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Masc) PronP3 ;
here_Adv = ss "òóê" ;
here7to_Adv = ss ["äî òóê"] ;
here7from_Adv = ss ["îò òóê"] ;
how_IAdv = mkIAdv "êàê" ;
how8much_IAdv = mkIAdv "êîëêî" ;
how8many_IDet = {s = \\_ => table QForm ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "àêî" ;
in8front_Prep = mkPrep "ïðåä" ;
i_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "â" ;
"âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"}
for_Prep = mkPrep "за" ;
from_Prep = mkPrep "от" ;
he_Pron = mkPron "той" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Masc) PronP3 ;
here_Adv = ss "тук" ;
here7to_Adv = ss ["до тук"] ;
here7from_Adv = ss ["от тук"] ;
how_IAdv = mkIAdv "как" ;
how8much_IAdv = mkIAdv "колко" ;
how8many_IDet = {s = \\_ => table QForm ["колко";"колкото"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "ако" ;
in8front_Prep = mkPrep "пред" ;
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
in_Prep = mkPrep (pre { "в" ;
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
}) ;
it_Pron = mkPron "òî" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) PronP3 ;
less_CAdv = X.mkCAdv "ïî-ìàëêî" "îò" ;
many_Det = mkDeterminerPl "ìíîãî" ;
more_CAdv = X.mkCAdv "ïîâå÷å" "îò" ;
most_Predet = {s = \\_ => "ïîâå÷åòî"} ;
much_Det = mkDeterminerSg "ìíîãî" "ìíîãî" "ìíîãî";
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
less_CAdv = X.mkCAdv "по-малко" "от" ;
many_Det = mkDeterminerPl "много" ;
more_CAdv = X.mkCAdv "повече" "от" ;
most_Predet = {s = \\_ => "повечето"} ;
much_Det = mkDeterminerSg "много" "много" "много";
must_VV =
mkVV {
s = \\_=>table {
VPres _ _ => "òðÿáâà" ;
VAorist _ _ => "òðÿáâàøå" ;
VImperfect _ _ => "òðÿáâàëî" ;
VPerfect _ => "òðÿáâàëî" ;
VPluPerfect _ => "òðÿáâàëî" ;
VPassive _ => "òðÿáâàëî" ;
VPresPart _ => "òðÿáâàëî" ;
VImperative Sg => "òðÿáâàé" ;
VImperative Pl => "òðÿáâàéòå" ;
VNoun _ => "òðÿáâàíå" ;
VGerund => "òðÿáâàéêè"
VPres _ _ => "трябва" ;
VAorist _ _ => "трябваше" ;
VImperfect _ _ => "трябвало" ;
VPerfect _ => "трябвало" ;
VPluPerfect _ => "трябвало" ;
VPassive _ => "трябвало" ;
VPresPart _ => "трябвало" ;
VImperative Sg => "трябвай" ;
VImperative Pl => "трябвайте" ;
VNoun _ => "трябване" ;
VGerund => "трябвайки"
} ;
vtype=VNormal ;
lock_V=<>
} ;
no_Utt = ss "íå" ;
on_Prep = mkPrep "íà" ;
no_Utt = ss "не" ;
on_Prep = mkPrep "на" ;
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
only_Predet = {s = \\_ => "ñàìî"} ;
or_Conj = mkConj "èëè" Sg ;
otherwise_PConj = ss "èíà÷å" ;
part_Prep = mkPrep "îò" ;
please_Voc = ss "ìîëÿ" ;
only_Predet = {s = \\_ => "само"} ;
or_Conj = mkConj "или" Sg ;
otherwise_PConj = ss "иначе" ;
part_Prep = mkPrep "от" ;
please_Voc = ss "моля" ;
possess_Prep = mkPrep [] Dat ;
quite_Adv = ss "äîñòà" ;
she_Pron = mkPron "òÿ" "íåèí" "íåéíèÿ" "íåéíèÿò" "íåéíà" "íåéíàòà" "íåéíî" "íåéíîòî" "íåéíè" "íåéíèòå" (GSg Fem) PronP3 ;
so_AdA = ss "òîëêîâà" ;
somebody_NP = mkNP "íÿêîé" (GSg Masc) (NounP3 Pos);
someSg_Det = mkDeterminerSg "íÿêîé" "íÿêîÿ" "íÿêîå" ;
somePl_Det = mkDeterminerPl "íÿêîè" ;
something_NP = mkNP "íåùî" (GSg Neut) (NounP3 Pos);
somewhere_Adv = ss "íÿêúäå" ;
that_Quant = mkQuant "îíçè" "îíàçè" "îíîâà" "îíåçè" ;
that_Subj = ss "֌" ;
there_Adv = ss "òàì" ;
there7to_Adv = ss ["äî òàì"] ;
there7from_Adv = ss ["îò òàì"] ;
therefore_PConj = ss ["òàêà ÷å"] ;
they_Pron = mkPron "òå" "òåõåí" "òåõíèÿ" "òåõíèÿò" "òÿõíà" "òÿõíàòà" "òÿõíî" "òÿõíîòî" "òåõíè" "òåõíèòå" GPl PronP3 ;
this_Quant = mkQuant "òîçè" "òàçè" "òîâà" "òåçè" ;
through_Prep = mkPrep "ïðåç" ;
too_AdA = ss "ïðåêàëåíî" ;
to_Prep = mkPrep "äî" ;
under_Prep = mkPrep "ïîä" ;
very_AdA = ss "ìíîãî" ;
want_VV = mkVV (stateV (mkV186 "èñêàì")) ;
we_Pron = mkPron "íèå" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl PronP1 ;
whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ;
whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ;
when_IAdv = mkIAdv "êîãà" ;
when_Subj = ss "êîãàòî" ;
where_IAdv = mkIAdv "êúäå" ;
which_IQuant = {s = table GenNum [table QForm ["êîé";"êîéòî"];
table QForm ["êîÿ";"êîÿòî"];
table QForm ["êîå";"êîåòî"];
table QForm ["êîè";"êîèòî"]]} ;
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
whoPl_IP = mkIP "êîè" "êîè" GPl ;
why_IAdv = mkIAdv "çàùî" ;
without_Prep = mkPrep "áåç" ;
quite_Adv = ss "доста" ;
she_Pron = mkPron "тя" "неин" "нейния" "нейният" "нейна" "нейната" "нейно" "нейното" "нейни" "нейните" (GSg Fem) PronP3 ;
so_AdA = ss "толкова" ;
somebody_NP = mkNP "някой" (GSg Masc) (NounP3 Pos);
someSg_Det = mkDeterminerSg "някой" "някоя" "някое" ;
somePl_Det = mkDeterminerPl "някои" ;
something_NP = mkNP "нещо" (GSg Neut) (NounP3 Pos);
somewhere_Adv = ss "някъде" ;
that_Quant = mkQuant "онзи" "онази" "онова" "онези" ;
that_Subj = ss "че" ;
there_Adv = ss "там" ;
there7to_Adv = ss ["до там"] ;
there7from_Adv = ss ["от там"] ;
therefore_PConj = ss ["така че"] ;
they_Pron = mkPron "те" "техен" "техния" "техният" "тяхна" "тяхната" "тяхно" "тяхното" "техни" "техните" GPl PronP3 ;
this_Quant = mkQuant "този" "тази" "това" "тези" ;
through_Prep = mkPrep "през" ;
too_AdA = ss "прекалено" ;
to_Prep = mkPrep "до" ;
under_Prep = mkPrep "под" ;
very_AdA = ss "много" ;
want_VV = mkVV (stateV (mkV186 "искам")) ;
we_Pron = mkPron "ние" "наш" "нашия" "нашият" "наша" "нашата" "наше" "нашето" "наши" "нашите" GPl PronP1 ;
whatPl_IP = mkIP "какви" "какви" GPl ;
whatSg_IP = mkIP "какъв" "какъв" (GSg Masc) ;
when_IAdv = mkIAdv "кога" ;
when_Subj = ss "когато" ;
where_IAdv = mkIAdv "къде" ;
which_IQuant = {s = table GenNum [table QForm ["кой";"който"];
table QForm ["коя";"която"];
table QForm ["кое";"което"];
table QForm ["кои";"които"]]} ;
whoSg_IP = mkIP "кой" "кого" (GSg Masc) ;
whoPl_IP = mkIP "кои" "кои" GPl ;
why_IAdv = mkIAdv "защо" ;
without_Prep = mkPrep "без" ;
with_Prep = mkPrep "" WithPrep ;
yes_Utt = ss "äà" ;
youSg_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Masc) PronP2 ;
youPl_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
youPol_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
yes_Utt = ss "да" ;
youSg_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Masc) PronP2 ;
youPl_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ;
youPol_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ;
as_CAdv = X.mkCAdv [] "êîëêîòî" ;
as_CAdv = X.mkCAdv [] "колкото" ;
have_V2 = dirV2 (stateV (mkV186 "èìàì")) ;
have_V2 = dirV2 (stateV (mkV186 "имам")) ;
lin language_title_Utt = ss "Áúëãàðñêè" ;
lin language_title_Utt = ss "Български" ;
}

View File

@@ -1,10 +1,10 @@
--# -path=.:../abstract:../common:../prelude
--# -coding=cp1251
--# -coding=utf8
concrete SymbolBul of Symbol = CatBul ** open Prelude, ResBul in {
flags
coding = cp1251 ;
coding = utf8 ;
lin
SymbPN i = {s = i.s ; g = Neut} ;
@@ -32,15 +32,15 @@ lin
SymbNum sy = {s = \\_ => sy.s; nn = NNum Pl} ;
SymbOrd sy = {s = \\aform => sy.s ++ "-" ++
case aform of {
ASg Masc Indef => "òè" ;
ASg Fem Indef => "òà" ;
ASg Neut Indef => "òî" ;
ASg Masc Def => "òèÿ" ;
ASg Fem Def => "òàòà" ;
ASg Neut Def => "òîòî" ;
ASgMascDefNom => "òèÿò" ;
APl Indef => "òè" ;
APl Def => "òèòå"
ASg Masc Indef => "ти" ;
ASg Fem Indef => "та" ;
ASg Neut Indef => "то" ;
ASg Masc Def => "тия" ;
ASg Fem Def => "тата" ;
ASg Neut Def => "тото" ;
ASgMascDefNom => "тият" ;
APl Indef => "ти" ;
APl Def => "тите"
}
} ;
@@ -52,7 +52,7 @@ lin
MkSymb s = s ;
BaseSymb = infixSS "è" ;
BaseSymb = infixSS "и" ;
ConsSymb = infixSS bindComma ;
}

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete TextBul of Text = CatBul ** open Prelude in {
flags coding=cp1251 ;
flags coding=utf8 ;
-- This will work for almost all languages except Spanish.

View File

@@ -1,6 +1,6 @@
--# -coding=cp1251
--# -coding=utf8
concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
flags coding=cp1251 ;
flags coding=utf8 ;
flags optimize=all_subs ;
@@ -39,7 +39,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
}) vp.p
(predV vv) ;
ComplVS v s = insertObj (\\_ => bindComma ++ "֌" ++ s.s) Pos (predV v) ;
ComplVS v s = insertObj (\\_ => bindComma ++ "че" ++ s.s) Pos (predV v) ;
ComplVQ v q = insertObj (\\_ => q.s ! QDir) Pos (predV v) ;
ComplVA v ap =
@@ -50,7 +50,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
insertSlashObj2 (\\a => v.c3.s ++ ap.s ! aform a.gn Indef (RObj Acc) ! a.p) Pos (slashV v v.c2 v.subjCtrl) ;
-- test: I saw a boy to whom she said that they are here
SlashV2S v s = insertSlashObj2 (\\_ => bindComma ++ "֌" ++ s.s) Pos (slashV v v.c2 False) ;
SlashV2S v s = insertSlashObj2 (\\_ => bindComma ++ "че" ++ s.s) Pos (slashV v v.c2 False) ;
-- test: I saw a boy whom she asked who is here
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2 False) ;

23
src/czech/AdjectiveCze.gf Normal file
View File

@@ -0,0 +1,23 @@
concrete AdjectiveCze of Adjective = CatCze ** open ResCze, Prelude in {
lin
PositA a = adjFormsAdjective a ** {isPost = False} ;
AdAP ada ap = ap ** {s = \\g,n,c => ada.s ++ ap.s ! g ! n ! c} ;
ComplA2 a np =
let ap = adjFormsAdjective a
in
ap ** {
s = \\g,n,c => ap.s ! g ! n ! c ++ a.c.s ++ np.s ! a.c.c ;
isPost = True ;
} ;
UseA2 a = adjFormsAdjective a ** {isPost = True} ;
UseComparA a = adjFormsAdjective a ** {isPost = False} ; ---- TODO: this gives positive forms
AdvAP ap adv = ap ** {s = \\g,n,c => ap.s ! g ! n ! c ++ adv.s; isPost = True} ;
}

9
src/czech/AdverbCze.gf Normal file
View File

@@ -0,0 +1,9 @@
concrete AdverbCze of Adverb = CatCze **
open ResCze, Prelude in {
lin
PrepNP prep np = {
s = prep.s ++ np.prep ! prep.c
} ;
}

6
src/czech/AllCze.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common:../api
concrete AllCze of AllCzeAbs =
LangCze
;

6
src/czech/AllCzeAbs.gf Normal file
View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common:prelude
abstract AllCzeAbs =
Lang
;

70
src/czech/CatCze.gf Normal file
View File

@@ -0,0 +1,70 @@
concrete CatCze of Cat =
--- CommonX **
open ResCze, Prelude in {
lincat
Text = {s : Str} ;
Phr = {s : Str} ;
Utt = {s : Str} ;
S = {s : Str} ;
Cl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ;
Comp = {s : Agr => Str} ;
QS = {s : Str} ; ---- TODO: indirect questions
QCl = {subj,clit,compl : Str ; verb : VerbForms ; a : Agr} ; -- = Cl ---- check if enough
IAdv = {s : Str} ;
RS = {s : Agr => Str} ;
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
RP = AdjForms ;
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
V = ResCze.VerbForms ;
V2 = ResCze.VerbForms ** {c : ComplementCase} ;
A = ResCze.AdjForms ;
AP = ResCze.Adjective ** {isPost : Bool} ; -- {s : Gender => Number => Case => Str}
A2 = ResCze.AdjForms ** {c : ComplementCase} ;
AdA = {s : Str} ;
N = ResCze.NounForms ;
CN = ResCze.Noun ; -- {s : Number => Case => Str ; g : Gender}
NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns
PN = {s : Case => Str ; g : Gender} ;
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
Num = Determiner ;
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
Pron = PronForms ;
Adv = {s : Str} ;
Prep = ResCze.ComplementCase ; -- {s : Str ; c : Case ; hasPrep : Bool} ;
Conj = {s1,s2 : Str} ; ---- may need a number
Pol = {s : Str ; p : Bool} ;
Temp = {s : Str ; t : CTense} ;
Tense = {s : Str ; t : CTense} ;
Ant = {s : Str ; t : CTense} ;
PConj = {s : Str} ;
Voc = {s : Str} ;
AdN = {s : Str} ;
AdV = {s : Str} ;
CAdv = {s : Str} ;
SC = {s : Str} ;
linref
N = \s -> s.snom ;
A = \s -> s.msnom ;
lincat Numeral = Determiner ; ---- TODO: should contain Ord as well
lincat Digits = {s:Str ; size : NumSize} ;
}

View File

@@ -0,0 +1,56 @@
concrete ConjunctionCze of Conjunction = CatCze **
open ResCze, Coordination, Prelude in {
lincat
[Adv] = {s1,s2 : Str} ;
[AP] = {s1,s2 : Gender => Number => Case => Str ; isPost : Bool} ;
[NP] = {s1,s2,prep1,prep2 : Case => Str ; a : Agr} ;
[S] = {s1,s2 : Str} ;
[RS] = {s1,s2 : Agr => Str} ;
lin
BaseAdv = twoSS ;
ConsAdv = consrSS comma ;
BaseAP x y = twoTable3 Gender Number Case x y
** {isPost = orB x.isPost y.isPost} ; ---- should be so in Pol too
ConsAP x xs = consrTable3 Gender Number Case comma x xs
** {isPost = orB x.isPost xs.isPost} ;
BaseNP x y = {
s1 = x.s ;
s2 = y.s ;
prep1 = x.prep ;
prep2 = y.prep ;
a = y.a
} ; -- clitics disappear ---- Agr TODO
ConsNP x xs = {
s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ;
s2 = xs.s2 ;
prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ;
prep2 = xs.prep2 ;
a = xs.a ----
} ;
BaseS = twoSS ;
ConsS = consrSS comma ;
BaseRS = twoTable Agr ;
ConsRS = consrTable Agr comma ;
ConjAdv = conjunctDistrSS ;
ConjAP conj xs = conjunctDistrTable3 Gender Number Case conj xs
** {isPost = xs.isPost} ;
ConjNP conj xs = {
s,clit = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
prep = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! c ;
a = xs.a ; ---- dep. on conj as well
hasClit = False ;
} ;
ConjS = conjunctDistrSS ;
ConjRS = conjunctDistrTable Agr ;
}

19
src/czech/GrammarCze.gf Normal file
View File

@@ -0,0 +1,19 @@
--# -path=.:../abstract:../common:prelude
concrete GrammarCze of Grammar =
NounCze,
VerbCze,
AdjectiveCze,
AdverbCze,
NumeralCze,
SentenceCze,
QuestionCze,
RelativeCze,
ConjunctionCze,
PhraseCze,
TextCze,
StructuralCze,
IdiomCze,
TenseCze
** {
}

5
src/czech/IdiomCze.gf Normal file
View File

@@ -0,0 +1,5 @@
concrete IdiomCze of Idiom = CatCze ** open Prelude, ResCze in {
}

10
src/czech/LangCze.gf Normal file
View File

@@ -0,0 +1,10 @@
--# -path=.:../abstract:../common:../api
concrete LangCze of Lang =
GrammarCze,
LexiconCze
-- ,ConstructionCze
-- ,DocumentationCze --# notpresent
** {
}

59
src/czech/LexiconCze.gf Normal file
View File

@@ -0,0 +1,59 @@
concrete LexiconCze of Lexicon =
CatCze
**
open
ResCze, ParadigmsCze
in {
lin
boy_N = declPAN "kluk" ;
man_N = declMUZ "muž" ;
teacher_N = declMUZ "učitel" ;
horse_N = declMUZ "kůň" ;
father_N = declMUZ "otec" ;
husband_N = declPAN "manžel" ;
castle_N = declHRAD "hrad" ;
forest_N = declHRAD "les" ;
machine_N = declSTROJ "stroj" ;
woman_N = declZENA "žena" ;
school_N = declZENA "škola" ; ----
skirt_N = declRUZE "sukně";
street_N = declRUZE "ulice" ;
rose_N = declRUZE "růže" ;
song_N = declPISEN "píseň" ;
bed_N = declPISEN "postel" ;
door_N = declRUZE "dveře" ;
bone_N = declKOST "kost" ;
village_N = declKOST "ves" ; ----
city_N = declMESTO "město" ;
apple_N = declMESTO "jablko" ; ----
sea_N = declMORE "moře" ;
airport_N = declMORE "letiště" ;
chicken_N = declKURE "kuře" ;
house_N = declSTAVENI "stavení" ; --- building, house
station_N = declSTAVENI "nádraží" ;
young_A = mkA "mladý" ;
old_A = mkA "starý" ;
good_A = mkA "dobrý" ;
bad_A = mkA "špatný" ;
beautiful_A = mkA "krásný" ;
clean_A = mkA "čistý" ;
dirty_A = mkA "špinavý" ;
white_A = mkA "bílý" ;
black_A = mkA "černý" ;
red_A = mkA "červený" ;
brown_A = mkA "hnědý" ;
blue_A = mkA "modrý" ;
green_A = mkA "zelený" ;
yellow_A = mkA "žlutý" ;
buy_V2 = mkV2 (iii_kupovatVerbForms "kupovat") ;
love_V2 = mkV2 (iii_kupovatVerbForms "milovat") ;
}

102
src/czech/MissingCze.gf Normal file
View File

@@ -0,0 +1,102 @@
resource MissingCze = open GrammarCze, Prelude in {
-- temporary definitions to enable the compilation of RGL API
oper AAnter : Ant = notYet "AAnter" ;
oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
oper AdNum : AdN -> Card -> Card = notYet "AdNum" ;
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
oper CompCN : CN -> Comp = notYet "CompCN" ;
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
oper CompIP : IP -> IComp = notYet "CompIP" ;
oper ComparA : A -> NP -> AP = notYet "ComparA" ;
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ;
oper ComplVS : VS -> S -> VP = notYet "ComplVS" ;
oper ComplVV : VV -> VP -> VP = notYet "ComplVV" ;
oper DetNP : Det -> NP = notYet "DetNP" ;
oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ;
oper EmbedQS : QS -> SC = notYet "EmbedQS" ;
oper EmbedS : S -> SC = notYet "EmbedS" ;
oper EmbedVP : VP -> SC = notYet "EmbedVP" ;
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
oper ExistNP : NP -> Cl = notYet "ExistNP" ;
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
oper GenericCl : VP -> Cl = notYet "GenericCl" ;
oper IdetCN : IDet -> CN -> IP = notYet "IdetCN" ;
oper IdetIP : IDet -> IP = notYet "IdetIP" ;
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ;
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
oper PassV2 : V2 -> VP = notYet "PassV2" ;
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
oper PossPron : Pron -> Quant = notYet "PossPron" ;
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
oper QuestVP : IP -> VP -> QCl = notYet "QuestVP" ;
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
oper RelCl : Cl -> RCl = notYet "RelCl" ;
oper RelNP : NP -> RS -> NP = notYet "RelNP" ;
oper RelSlash : RP -> ClSlash -> RCl = notYet "RelSlash" ;
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
oper Slash3V3 : V3 -> NP -> VPSlash = notYet "Slash3V3" ;
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
oper TCond : Tense = notYet "TCond" ;
oper TFut : Tense = notYet "TFut" ;
oper TPast : Tense = notYet "TPast" ;
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
oper UseN2 : N2 -> CN = notYet "UseN2" ;
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
oper UttCard : Card -> Utt = notYet "UttCard" ;
oper UttIAdv : IAdv -> Utt = notYet "UttIAdv" ;
oper UttIP : IP -> Utt = notYet "UttIP" ;
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
oper UttImpSg : Pol -> Imp -> Utt = notYet "UttImpSg" ;
oper UttQS : QS -> Utt = notYet "UttQS" ;
oper UttVP : VP -> Utt = notYet "UttVP" ;
oper by8agent_Prep : Prep = notYet "by8agent_Prep" ;
oper it_Pron : Pron = notYet "it_Pron" ;
oper they_Pron : Pron = notYet "they_Pron" ;
oper we_Pron : Pron = notYet "we_Pron" ;
oper whatSg_IP : IP = notYet "whatSg_IP" ;
oper which_IQuant : IQuant = notYet "which_IQuant" ;
oper whoSg_IP : IP = notYet "whoSg_IP" ;
oper youPl_Pron : Pron = notYet "youPl_Pron" ;
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
}

100
src/czech/NounCze.gf Normal file
View File

@@ -0,0 +1,100 @@
concrete NounCze of Noun =
CatCze
**
open ResCze, Prelude in {
lin
DetCN det cn = {
s,prep,clit = \\c => det.s ! cn.g ! c ++ numSizeForm cn.s det.size c ;
a = numSizeAgr cn.g det.size P3 ;
hasClit = False ;
} ;
MassNP cn = {
s,prep,clit = \\c => cn.s ! Sg ! c ;
a = Ag cn.g Sg P3 ;
hasClit = False ;
} ;
DetQuant quant num = {
s = \\g,c => num.s ! g ! c ++ quant.s ! g ! numSizeNumber num.size ! c ;
size = num.size
} ;
DefArt = {s = \\_,_,_ => []} ;
IndefArt = {s = \\_,_,_ => []} ;
NumPl = {s = \\_,_ => [] ; size = Num2_4} ; ---- size
NumSg = {s = \\_,_ => [] ; size = Num1} ;
UsePron pron = {
s = table {
Nom | Voc => pron.nom ;
Gen => pron.gen ;
Dat => pron.dat ;
Acc => pron.acc ;
Loc => pron.loc ;
Ins => pron.ins
} ;
clit = table {
Nom => pron.cnom ;
Voc => pron.nom ;
Gen => pron.cgen ;
Dat => pron.cdat ;
Acc => pron.cacc ;
Loc => pron.loc ;
Ins => pron.ins
} ;
prep = table {
Nom | Voc => pron.nom ;
Gen => pron.pgen ;
Dat => pron.pdat ;
Acc => pron.pacc ;
Loc => pron.loc ;
Ins => pron.pins
} ;
a = pron.a ;
hasClit = True ;
} ;
UsePN pn = {
s,clit,prep = \\c => pn.s ! c ;
a = Ag pn.g Sg P3 ;
hasClit = False ;
} ;
AdjCN ap cn = {
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
g = cn.g
} ;
RelCN cn rs = {
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
g = cn.g
} ;
AdvCN cn adv = {
s = \\n,c => cn.s ! n ! c ++ adv.s ;
g = cn.g
} ;
AdvNP np adv = {
s,clit = \\c => np.s ! c ++ adv.s ;
prep = \\c => np.prep ! c ++ adv.s ;
a = np.a ;
hasClit = False ;
} ;
UseN n = nounFormsNoun n ;
ApposCN cn np = {
s = \\n,c => cn.s ! n ! c ++ np.s ! c ; ---- TODO check apposition order
g = cn.g
} ;
NumCard c = c ;
NumDigits ds = ds ** {s = \\_,_ => ds.s} ;
NumNumeral nu = nu ;
}

120
src/czech/NumeralCze.gf Normal file
View File

@@ -0,0 +1,120 @@
concrete NumeralCze of Numeral =
CatCze [Numeral,Digits] **
open
ResCze,
Prelude
in {
-- from gf-contrib/numerals/czech.gf, added inflections
-- AR 2020-03-20
---- TODO ordinal forms
oper LinNumeral = Determiner ; -- {s : NumeralForms ; size : NumSize} ;
oper LinDigit = {unit : Gender => Case => Str ; teen, ten, hundred : Str ; size : NumSize} ;
lincat Digit = LinDigit ;
lincat Sub10 = LinDigit ;
lincat Sub100 = LinNumeral ;
lincat Sub1000 = LinNumeral ;
lincat Sub1000000 = LinNumeral ;
oper mkNum : Determiner -> Str -> Str -> Str -> LinDigit =
\dva, dvanast, dvadsat, dveste -> {
unit = dva.s ;
teen = dvanast + "náct" ;
ten = dvadsat ;
hundred = dveste ;
size = dva.size ;
} ;
oper mk2Num : Determiner -> Str -> Str -> Str -> LinDigit =
\unit, teenbase, tenbase, hundred ->
mkNum unit teenbase (tenbase + "cet") hundred ;
oper mk5Num : Str -> Str -> Str -> Str -> LinDigit =
\unit,uniti, teenbase, tenbase ->
mkNum (regNumeral unit uniti) teenbase (tenbase + "desát") (unit ++ "set") ;
oper bigNumeral : Str -> LinNumeral = \s -> invarNumeral s ;
lin num x = x ;
lin n2 = mk2Num twoNumeral "dva" "dva" ("dvě" ++ "stě") ;
lin n3 = mk2Num threeNumeral "tři" "tři" ("tři" ++ "sta") ;
lin n4 = mk2Num fourNumeral "čtr" "čtyři" ("čtyři" ++ "sta") ;
lin n5 = mk5Num "pět" "pěti" "pat" "pa" ;
lin n6 = mk5Num "šest" "šesti" "šest" "še" ;
lin n7 = mk5Num "sedm" "sedmi" "sedm" "sedm";
lin n8 = mk5Num "osm" "osmi" "osm" "osm";
lin n9 = mk5Num "devět" "devíti" "devate" "deva" ;
lin pot01 = {
unit = oneNumeral.s ; hundred = "sto" ; ten = "deset" ; teen = "jedenáct" ;
size = Num1
} ;
lin pot0 d = d ;
lin pot110 = bigNumeral "deset" ;
lin pot111 = bigNumeral "jedenáct" ;
lin pot1to19 d = bigNumeral d.teen ;
lin pot0as1 n = {s = n.unit ; size = n.size} ;
lin pot1 d = bigNumeral d.ten ;
lin pot1plus d e = {
s = (invarNumeral (d.ten ++ determinerStr (e ** {s = e.unit}))).s ; ---- TODO inflection?
size = tfSize e.size
} ;
---- variants { d.s ! ten ++ e.s ! unit ; glue (glue (e.s ! unit) "a") (d.s ! ten)} ; size = tfSize e.size} ;
lin pot1as2 n = n ;
lin pot2 d = bigNumeral d.hundred ;
lin pot2plus d e = {
s = (invarNumeral (d.hundred ++ determinerStr e)).s ; ---- TODO inflection?
size = tfSize e.size
} ;
lin pot2as3 n = n ;
lin pot3 n = bigNumeral (mkTh (determinerStr n) n.size) ;
lin pot3plus n m = {
s = (invarNumeral (mkTh (determinerStr n) n.size ++ determinerStr m)).s ; ---- TODO inflection?
size = tfSize m.size
} ;
oper tfSize : NumSize -> NumSize = \sz ->
table {Num1 => Num5 ; other => other} ! sz ;
oper mkTh : Str -> NumSize -> Str = \attr,size ->
case size of {
Num1 => "tisíc" ;
Num2_4 => attr ++ "tisíce" ;
Num5 => attr ++ "tisíc"
} ;
oper determinerStr : Determiner -> Str = \d -> d.s ! Masc Anim ! Nom ;
-- -- Numerals as sequences of digits have a separate, simpler grammar
lincat Dig = {s:Str ; size : NumSize} ;
lin
IDig d = d ;
IIDig d dd = {s = d.s ++ Predef.BIND ++ dd.s ; size = Num5} ; ---- leading zeros ??
D_0 = { s = "0" ; size = Num1} ; ---- ??
D_1 = { s = "1" ; size = Num1} ;
D_2 = { s = "2" ; size = Num2_4} ;
D_3 = { s = "3" ; size = Num2_4} ;
D_4 = { s = "4" ; size = Num2_4} ;
D_5 = { s = "5" ; size = Num5} ;
D_6 = { s = "6" ; size = Num5} ;
D_7 = { s = "7" ; size = Num5} ;
D_8 = { s = "8" ; size = Num5} ;
D_9 = { s = "9" ; size = Num5} ;
}

138
src/czech/ParadigmsCze.gf Normal file
View File

@@ -0,0 +1,138 @@
resource ParadigmsCze = open CatCze, ResCze, Prelude in {
----------------
-- Parameters
oper
singular : Number
= Sg ;
plural : Number
= Pl ;
mascAnimate : Gender
= Masc Anim ;
mascInanimate : Gender
= Masc Inanim ;
feminine : Gender
= Fem ;
neuter : Gender
= Neutr ;
nominative : Case
= Nom ;
genitive : Case
= Gen ;
dative : Case
= Dat ;
accusative : Case
= Acc ;
vocative : Case
= ResCze.Voc ;
locative : Case
= Loc ;
instrumental : Case
= Ins ;
------------------------------
-- Nouns
oper
mkN = overload {
mkN : (nom : Str) -> N
= \nom -> lin N (guessNounForms nom) ;
mkN : (nom,gen : Str) -> Gender -> N
= \nom,gen,g -> lin N (declensionNounForms nom gen g) ;
} ;
-- The following standard declensions can be used with good accuracy.
-- However, they have some defaults that may have to be overwritten.
-- This can be done easily by overriding those formes with record extension (**).
-- The default extensions are shown in comments; if the default is correct, no extension is needed.
panN : Str -> N -- default ** {pnom = +i}
= \s -> lin N (declPAN s) ;
predsedaN : Str -> N -- default ** {sgen = +i}
= \s -> lin N (declPREDSEDA s) ;
hradN : Str -> N -- default ** {sgen,sloc = +u}
= \s -> lin N (declHRAD s) ;
zenaN : Str -> N -- default ** {pgen = zen}
= \s -> lin N (declZENA s) ;
mestoN : Str -> N -- default ** {sloc = +u ; pgen = mest ; ploc = +ech}
= \s -> lin N (declMESTO s) ;
muzN : Str -> N
= \s -> lin N (declMUZ s) ;
soudceN : Str -> N -- default ** {sdat,sloc = +i ; pnom = +i}
= \s -> lin N (declSOUDCE s) ;
strojN : Str -> N
= \s -> lin N (declSTROJ s) ;
ruzeN : Str -> N
= \s -> lin N (declRUZE s) ;
pisenN : Str -> N
= \s -> lin N (declPISEN s) ;
kostN : Str -> N
= \s -> lin N (declKOST s) ;
kureN : Str -> N
= \s -> lin N (declKURE s) ;
moreN : Str -> N -- default ** {pgen = +í}
= \s -> lin N (declMORE s) ;
staveniN : Str -> N
= \s -> lin N (declSTAVENI s) ;
-- The full definition of the noun record is
-- {
-- snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ;
-- g : Gender
-- }
---------------------
-- Adjectives
-- Only positive forms so far ----
mkA = overload {
mkA : Str -> A
= \s -> lin A (guessAdjForms s) ;
} ;
mladyA : Str -> A
= \s -> lin A (mladyAdjForms s) ;
jarniA : Str -> A
= \s -> lin A (jarniAdjForms s) ;
otcuvA : Str -> A
= \s -> lin A (otcuvAdjForms s) ;
matcinA : Str -> A
= \s -> lin A (matcinAdjForms s) ;
invarA : Str -> A
= \s -> lin A (invarAdjForms s) ;
mkA2 : A -> Prep -> A2
= \a,p -> lin A2 (a ** {c = p}) ;
-------------------------
-- Verbs
mkV2 = overload {
mkV2 : VerbForms -> VerbForms ** {c : ComplementCase}
= \vf -> vf ** {c = {s = [] ; c = Acc ; hasPrep = False}} ;
mkV2 : VerbForms -> Case -> VerbForms ** {c : ComplementCase}
= \vf,c -> vf ** {c = {s = [] ; c = c ; hasPrep = False}} ;
mkV2 : VerbForms -> ComplementCase -> VerbForms ** {c : ComplementCase}
= \vf,c -> vf ** {c = c} ;
} ;
------------------------
-- Adverbs, prepositions, conjunctions, ...
mkAdv : Str -> Adv
= \s -> lin Adv {s = s} ;
mkPrep : Str -> Case -> Prep
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ; ---- True if s /= ""
mkConj : Str -> Conj
= \s -> lin Conj {s1 = [] ; s2 = s} ;
}

19
src/czech/PhraseCze.gf Normal file
View File

@@ -0,0 +1,19 @@
concrete PhraseCze of Phrase = CatCze ** open Prelude, ResCze in {
lin
UttS s = s ;
UttAdv adv = adv ;
UttCN cn = {s = cn.s ! Sg ! Nom} ;
UttAP ap = {s = ap.s ! Masc Anim ! Sg ! Nom} ;
UttNP np = {s = np.s ! Nom} ;
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
NoPConj = {s = []} ;
PConjConj conj = {s = conj.s2} ;
NoVoc = {s = []} ;
VocNP np = {s = np.s ! Voc} ;
}

7
src/czech/QuestionCze.gf Normal file
View File

@@ -0,0 +1,7 @@
concrete QuestionCze of Question = CatCze **
open ResCze, Prelude in {
lin
QuestCl cl = cl ; ----
}

18
src/czech/RelativeCze.gf Normal file
View File

@@ -0,0 +1,18 @@
concrete RelativeCze of Relative = CatCze ** open
ParadigmsCze,
ResCze,
Prelude in {
lin
RelVP rp vp = vp ** {
subj =
let rel = (adjFormsAdjective rp).s
in \\a => case a of {
Ag g n _ => rel ! g ! n ! Nom
}
} ;
IdRP = mkA "který" ;
}

898
src/czech/ResCze.gf Normal file
View File

@@ -0,0 +1,898 @@
resource ResCze = open Prelude in {
-- AR March 2020
-- sources:
-- Wiki = https://en.wikipedia.org/wiki/Czech_declension, https://en.wikipedia.org/wiki/Czech_conjugation
-- CEG = J. Naughton, Czech: an Essential Grammar, Routledge 2005.
-- parameters
param
Number = Sg | Pl ;
Animacy = Anim | Inanim ;
Gender = Masc Animacy | Fem | Neutr ;
Case = Nom | Gen | Dat | Acc | Voc | Loc | Ins ; -- traditional order
Person = P1 | P2 | P3 ;
Agr = Ag Gender Number Person ;
CTense = CTPres | CTPast ; ----- TODO complete the tense system to match Czech verb morphology
-- phonology
oper
hardConsonant : pattern Str = #("d"|"t"|"g"|"h"|"k"|"n"|"r") ;
softConsonant : pattern Str = #("ť"|"ď"|"j"|"ň"|"ř"|"š"|"c"|"č"|"ž") ;
neutralConsonant : pattern Str = #("b"|"f"|"l"|"m"|"p"|"s"|"v") ;
consonant : pattern Str =
#(
"d" | "t" | "g" | "h" | "k" | "n" | "r" |
"ť" | "ď" | "j" | "ň" | "ř" | "š" | "c" | "č" | "ž" |
"b" | "f" | "l" | "m" | "p" | "s" | "v"
) ;
dropFleetingE : Str -> Str = \s -> case s of {
x + "e" + c@("k"|"c"|"n") => x + c ;
x + "e" + "ň" => x + "n" ;
_ => s
} ;
shortenVowel : Str -> Str = \s -> case s of {
x + "á" + y => x + "a" + y ;
x + "é" + y => x + "e" + y ;
x + "í" + y => x + "i" + y ;
x + "ý" + y => x + "y" + y ;
x + "ó" + y => x + "o" + y ;
x + "ú" + y => x + "u" + y ;
x + "ů" + y => x + "o" + y ;
_ => s
} ;
addI : Str -> Str = \s -> case s of {
klu + "k" => klu + "ci" ;
vra + "h" => vra + "zi" ;
ce + "ch" => ce + "ši" ;
dokto + "r" => dokto + "ři" ;
pan => pan + "i"
} ;
addAdjI : Str -> Str = \s -> case s of {
angli + "ck" => angli + "čtí" ;
ce + "sk" => ce + "ští" ;
_ => init (addI s) + "í"
} ;
-- 3.4.10, in particular when also final 'a' is dropped
addE : Str -> Str = \s -> case s of {
re + "k" => re + "ce" ;
pra + ("g"|"h") => pra + "ze" ;
stre + "ch" => stre + "še" ;
sest + "r" => sest + "ře" ;
pan => pan + "ě"
} ;
addEch : Str -> Str = \s -> case s of {
klu + "k" => klu + "cich" ;
vra + ("h"|"g") => vra + "zich" ;
ce + "ch" => ce + "šich" ;
pan => pan + "ech"
} ;
shortFemPlGen : Str -> Str = \s -> case s of {
ul + "ice" => ul + "ic" ;
koleg + "yně" => koleg + "yň" ;
ruz + "e" => ruz + "í" ;
_ => "" + s -- Predef.error ("shortFemPlGen does not apply to" ++ s)
} ;
---------------
-- Nouns
---------------
-- novel idea (for RGL): lexical items stored as records rather than tables
-- advantages:
-- - easier to make exceptions to paradigms (by ** {})
-- - easier to keep the number of forms minimal
-- - easier to see what is happening than with lots of anonymous arguments to mkN, mkA, mkV
-- so this is the lincat of N
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sloc,sins, pnom,pgen,pdat,pacc,ploc,pins : Str ; g : Gender} ;
-- But traditional tables make agreement easier to handle in syntax
-- so this is the lincat of CN
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
-- this is used in UseN
nounFormsNoun : NounForms -> Noun
= \forms -> {
s = table {
Sg => table {
Nom => forms.snom ;
Gen => forms.sgen ;
Dat => forms.sdat ;
Acc => forms.sacc ;
Voc => forms.svoc ;
Loc => forms.sloc ;
Ins => forms.sins
} ;
Pl => table {
Nom | Voc => forms.pnom ;
Gen => forms.pgen ;
Dat => forms.pdat ;
Acc => forms.pacc ;
Loc => forms.ploc ;
Ins => forms.pins
}
} ;
g = forms.g
} ;
-- terminology of CEG
DeclensionType : Type = Str -> NounForms ;
declensionNounForms : (nom,gen : Str) -> Gender -> NounForms
= \nom,gen,g ->
let decl : DeclensionType = case <g, nom, gen> of {
<Masc Anim, _ + #hardConsonant, _ + "a"> => declPAN ;
<Masc Anim, _ + "a" , _ + "a"> => declPREDSEDA ;
<Masc Inanim, _ + #hardConsonant, _ + "u"> => declHRAD ;
<Fem, _ + "a" , _ + "y"> => declZENA ;
<Neutr, _ + "o" , _ + "a"> => declMESTO ;
<Masc Anim, _ + #softConsonant, _ + "e"> => declMUZ ;
<Masc Anim, _ + "tel" , _ + "e"> => declMUZ ;
<Masc Anim, _ + "ce" , _ + "e"> => declSOUDCE ;
<Masc Inanim, _ + #softConsonant, _ + "e"> => declSTROJ ;
<Fem, _ + ("e"|"ě") , _ + ("e"|"ě")> => declRUZE ;
<Fem, _ + #softConsonant, _ + "e"> => declPISEN ;
<Fem, _ + "ost" , _ + "i"> => declKOST ; --- also many other "st" 3.6.3
<Neutr, _ + "e" , _+"ete"> => declKURE ;
<Neutr, _ + "e" , _ + "e"> => declMORE ;
<Neutr, _ + "í" , _ + "í"> => declSTAVENI ;
_ => (\s -> declSTROJ ("" + s)) -- Predef.error ("cannot infer declension type for" ++ nom ++ gen)
}
in decl nom ;
-- the "smartest" one-argument mkN
guessNounForms : Str -> NounForms
= \s -> case s of {
_ + "ost" => declKOST s ;
_ + "tel" => declMUZ s ;
_ + #hardConsonant => declHRAD s ;
_ + #softConsonant => declSTROJ s ;
_ + "a" => declZENA s ;
_ + "o" => declMESTO s ;
_ + "ce" => declSOUDCE s ;
_ + "e" => declMORE s ;
_ + "í" => declSTAVENI s ;
_ => declSTROJ ("" + s) -- Predef.error ("cannot guess declension type for" ++ s)
} ;
-- the traditional declensions, in both CEG and Wiki
-- they are also exported in ParadigmsCze with names panN etc
declPAN : DeclensionType = \pan -> --- plural nom ové|i|é can be changed with ** {pnom = ...} CEG 3.5.1
{
snom = pan ;
sgen,sacc = pan + "a" ;
sdat,sloc = pan + "ovi" ; --- pánu
svoc = shortenVowel pan + "e" ; --- "irregular shortening" 3.5.1
sins = pan + "em" ;
pnom = addI pan ; -- pani, kluk-kluci --- panové, host-hosté
pgen = pan + "ů" ;
pdat = pan + "ům" ;
pacc,pins = pan + "y" ;
ploc = addEch pan ;
g = Masc Anim
} ;
declPREDSEDA : DeclensionType = \predseda -> --- 3.5.4: sgen y/i
let predsed = init predseda
in
{
snom = predseda ;
sgen = predsed + "y" ; -- pacc,pins --- i
sdat,sloc = predsed + "ovi" ;
sacc = predsed + "u" ;
svoc = predsed + "o" ;
sins = predsed + "ou" ;
pnom = case predseda of {
tur + "ista" => tur + "isté" ;
_ => predsed + "ové"
} ;
pgen = predsed + "ů" ;
pdat = predsed + "ům" ;
pacc,pins = predsed + "y" ;
ploc = addEch predsed ;
g = Masc Anim
} ;
declHRAD : DeclensionType = \hrad -> --- 3.5.2: sloc u/ě/e extra arg, sport-u, hrad-ě ; sgen u/a
let hrd = dropFleetingE hrad
in
{
snom,sacc = hrad ;
sgen,sdat = hrd + "u" ; --- Berlín-a
sloc = hrd + "u" ; --- addE hrad ; -- stůl-stole
svoc = hrd + "e" ;
sins = hrd + "em" ;
pnom,pacc,pins = hrd + "y" ;
pgen = hrd + "ů" ;
pdat = hrd + "ům" ;
ploc = addEch hrd ;
g = Masc Inanim
} ;
declZENA : DeclensionType = \zena -> --- 3.6.1 sge y/i ; pgen sometimes shortening
let zen = init zena
in
{
snom = zena ;
sgen = zen + "y" ; --- i after soft cons sometimes
sdat,sloc = zen + "ě" ; --- i after soft cons sometimes ; skol+e
sacc = zen + "u" ;
svoc = shortenVowel zen + "o" ; ---- shorten ?
sins = zen + "ou" ;
pnom,pacc = zen + "y" ; --- also sgen
pgen = zen ; --- sometimes with vowel shortening
pdat = zen + "ám" ;
ploc = zen + "ách" ;
pins = zen + "ami" ;
g = Fem
} ;
declMESTO : DeclensionType = \mesto -> --- 3.7.1 sloc u/e ; pgen vowel shortening sometimes ; ploc variations
let mest = init mesto
in
{
snom,sacc,svoc = mesto ;
sgen = mest + "a" ;
sdat = mest + "u" ;
sloc = mest + "u" ; --- "ě"
sins = mest + "em" ;
pnom,pacc = mest + "a" ;
pgen = mest ; --- léta - let
pdat = mest + "ům" ;
ploc = mest + "ech" ; --- with variations
pins = mest + "y" ;
g = Neutr
} ;
declMUZ : DeclensionType = \muz_ -> --- 3.5.3 : sdat,sloc ; pnom
let muz = dropFleetingE muz_
in
{
snom = muz_ ;
sgen,sacc = muz + "e" ; --- pacc
sdat,sloc = muz + "i" ; --- muzovi
svoc = case muz_ of {
chlap + "ec" => chlap + "če" ;
_ => muz + "i"
} ;
sins = muz + "em" ;
pnom = case muz_ of {
uci + "tel" => uci + "telé" ;
_ => muz + "i" --- muzové
} ;
pgen = muz + "ů" ;
pacc = muz + "e" ;
pdat = muz + "ům" ;
ploc = muz + "ích" ;
pins = muz + "i" ;
g = Masc Anim
} ;
declSOUDCE : DeclensionType = \soudce -> --- 3.5.3: sdat/sloc i,ovi ; pnom i/ové
let soudc = init soudce
in
{
snom,sgen,sacc,svoc = soudce ; ---- pacc
sdat,sloc = soudc + "i" ; --- soudcovi
sins = soudc + "em" ;
pnom = soudc + "i" ; --- soudcové
pgen = soudc + "ů" ;
pdat = soudc + "ům" ;
pacc = soudce ;
ploc = soudc + "ích" ;
pins = soudc + "i" ;
g = Masc Anim
} ;
declSTROJ : DeclensionType = \stroj ->
{
snom,sacc = stroj ;
sgen = stroj + "e" ; --- pnom,pacc
sdat,svoc,sloc = stroj + "i" ; --- pins ---- svoc shorten?
sins = stroj + "em" ;
pnom,pacc = stroj + "e" ;
pgen = stroj + "ů" ;
pdat = stroj + "ům" ;
ploc = stroj + "ích" ;
pins = stroj + "i" ;
g = Masc Inanim
} ;
declRUZE : DeclensionType = \ruze -> --- 3.6.2: pgen ulice-ulic, chvile-cvil
let ruz = init ruze
in
{
snom,sgen,svoc = ruze ; --- pnom,pacc
sdat,sacc,sloc = ruz + "i" ;
sins = ruz + "í" ;
pnom,pacc = ruze ;
pgen = shortFemPlGen ruze ;
pdat = ruz + "ím" ;
ploc = ruz + "ích" ;
pins = ruz + "emi" ;
g = Fem
} ;
declPISEN : DeclensionType = \pisen ->
let pisn = dropFleetingE pisen
in
{
snom,sacc = pisen ;
sgen = pisn + "ě" ;
sdat,svoc,sloc = pisn + "i" ; -- not shortened
sins = pisn + "í" ;
pnom,pacc = pisn + "ě" ;
pgen = pisn + "í" ;
pdat = pisn + "ím" ;
ploc = pisn + "ích" ;
pins = pisn + "ěmi" ;
g = Fem
} ;
declKOST : DeclensionType = \kost ->
{
snom,sacc = kost ;
sgen,sdat,svoc,sloc = kost + "i" ; --- pnom,pacc
sins = kost + "í" ; --- pgen
pnom,pacc = kost + "i" ;
pgen = kost + "í" ;
pdat = kost + "em" ;
ploc = kost + "ech" ;
pins = kost + "mi" ;
g = Fem
} ;
declKURE : DeclensionType = \kure ->
let kur = init kure
in
{
snom,sacc,svoc = kure ;
sgen = kur + "ete" ;
sdat,sloc = kur + "eti" ;
sins = kur + "etem" ;
pnom,pacc = kur + "ata" ;
pgen = kur + "at" ;
pdat = kur + "atům" ;
ploc = kur + "atech" ;
pins = kur + "aty" ;
g = Neutr
} ;
declMORE : DeclensionType = \more -> --- 3.7.2 pgen zero sometimes
let mor = init more
in
{
snom,sgen,sacc,svoc = more ; --- pnom
sdat,sloc = mor + "i" ; --- pins
sins = mor + "em" ;
pnom,pacc = more ;
pgen = mor + "í" ; ---
pdat = mor + "ím" ;
ploc = mor + "ích" ;
pins = mor + "i" ;
g = Neutr
} ;
declSTAVENI : DeclensionType = \staveni ->
{
snom,sgen,sdat,sacc,svoc,sloc = staveni ;
sins = staveni + "m" ;
pnom,pgen,pacc = staveni ;
pdat = staveni + "m" ;
ploc = staveni + "ch" ;
pins = staveni + "mi" ;
g = Neutr
} ;
---------------------------
-- Adjectives
-- to be used for AP: 56 forms for each degree
Adjective : Type = {s : Gender => Number => Case => Str} ;
-- to be used for A, in three degrees: 15 forms in each
---- TODO other degrees than positive
AdjForms : Type = {
msnom, fsnom, nsnom : Str ; -- svoc = snom
msgen, fsgen : Str ; -- nsgen = msgen, pacc = fsgen
msdat, fsdat : Str ; -- nsdat = msdat
fsacc : Str ; -- amsacc = msgen, imsacc = msnom, nsacc = nsnom
msloc : Str ; -- fsloc = fsdat, nsloc = msloc
msins, fsins : Str ; -- nsins = msins, pdat = msins
mpnom,fpnom : Str ; -- pvoc = pnom, impnom = fpnom, npnom = fsnom
pgen : Str ; -- ploc = pgen
pins : Str ;
} ;
invarAdjForms : Str -> AdjForms = \s -> {
msnom, fsnom, nsnom, msgen, fsgen, msdat, fsdat, fsacc,
msloc, msins, fsins, mpnom, fpnom, pgen, pins = s ;
} ;
-- used in PositA but will also work in Compar and Superl by calling their record fields
adjFormsAdjective : AdjForms -> Adjective = \afs -> {
s = \\g,n,c => case <n,c,g> of {
<Sg, Nom|Voc, Masc _>
| <Sg, Acc, Masc Inanim> => afs.msnom ;
<Sg, Nom|Voc, Fem>
| <Pl, Nom|Acc|Voc, Neutr> => afs.fsnom ;
<Sg, Nom|Acc|Voc, Neutr> => afs.nsnom ;
<Sg, Gen, Masc _ | Neutr>
| <Sg,Acc,Masc Anim> => afs.msgen ;
<Sg, Gen, Fem>
| <Pl,Acc,Masc _|Fem> => afs.fsgen ;
<Sg, Dat, Masc _|Neutr> => afs.msdat ;
<Sg, Dat|Loc, Fem> => afs.fsdat ;
<Sg, Acc, Fem> => afs.fsacc ;
<Sg, Loc, Masc _|Neutr> => afs.msloc ;
<Sg, Ins, Masc _|Neutr>
| <Pl,Dat,_> => afs.msins ;
<Sg, Ins, Fem> => afs.fsins ;
<Pl, Nom|Voc, Masc Anim> => afs.mpnom ;
<Pl, Nom|Voc, Masc Inanim|Fem> => afs.fpnom ;
<Pl, Gen|Loc,_> => afs.pgen ;
<Pl, Ins,_> => afs.pins
}
} ;
guessAdjForms : Str -> AdjForms = \s -> case s of {
_ + "ý" => mladyAdjForms s ;
_ + "í" => jarniAdjForms s ;
_ + "ův" => otcuvAdjForms s ;
_ + "in" => matcinAdjForms s ;
_ => matcinAdjForms ("" + s) -- Predef.error ("no mkA for" ++ s)
} ;
-- hard declension
mladyAdjForms : Str -> AdjForms = \mlady ->
let mlad = init mlady
in {
msnom = mlad + "ý" ;
fsnom = mlad + "á" ;
nsnom,fsgen,fsdat,fpnom = mlad + "é" ;
msgen = mlad + "ého" ;
msdat = mlad + "ému" ;
fsacc,fsins = mlad + "ou" ;
msloc = mlad + "ém" ;
msins,pdat = mlad + "ým" ;
mpnom = addAdjI mlad ;
pgen = mlad + "ých" ;
pins = mlad + "ými" ;
} ;
-- soft declension
jarniAdjForms : Str -> AdjForms = \jarni ->
{
msnom,fsnom,nsnom,
fsgen,fsdat,fsacc,fsins,
mpnom,fpnom = jarni ;
msgen = jarni + "ho" ;
msdat = jarni + "mu" ;
msloc,msins = jarni + "m" ;
pgen = jarni + "ch" ;
pins = jarni + "mi" ;
} ;
-- masculine possession: the same endings as in feminine
otcuvAdjForms : Str -> AdjForms = \otcuv ->
let otcov = Predef.tk 2 otcuv + "ov"
in
matcinAdjForms otcov ** {msnom = otcuv} ;
-- feminine possession
matcinAdjForms : Str -> AdjForms = \matcin ->
{
msnom = matcin ;
fsnom,msgen = matcin + "a" ;
nsnom = matcin + "o" ;
fsgen,fpnom = matcin + "y" ;
msdat,fsacc = matcin + "u" ;
fsdat,msloc = matcin + "ě" ;
msins = matcin + "ým" ;
fsins = matcin + "ou" ;
mpnom = matcin + "i" ;
pgen = matcin + "ých" ;
pins = matcin + "ými" ;
} ;
---------------------
-- Verbs
VerbForms : Type = { ---- TODO more forms to add
inf,
pressg1, pressg2, pressg3,
prespl1, prespl2, prespl3,
pastpartsg, pastpartpl,
---- passpart,
negpressg3 : Str -- matters only for copula
} ;
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
verbAgr : VerbForms -> Agr -> Bool -> Str ---- TODO tenses
= \vf,a,b -> case a of {
Ag _ Sg P1 => vf.pressg1 ;
Ag _ Sg P2 => vf.pressg2 ;
Ag _ Sg P3 => case b of {
True => vf.pressg3 ;
False => vf.negpressg3 -- matters only for copula
} ;
Ag _ Pl P1 => vf.prespl1 ;
Ag _ Pl P2 => vf.prespl2 ;
Ag _ Pl P3 => vf.prespl3
} ;
copulaVerbForms : VerbForms = {
inf = "být" ;
pressg1 = "jsem" ;
pressg2 = "jsi" ;
pressg3 = "je" ;
prespl1 = "jsme" ;
prespl2 = "jste" ;
prespl3 = "jsou" ;
pastpartsg = "byl" ;
pastpartpl = "byli" ;
negpressg3 = "ní" ; -- ne is added to this
} ;
haveVerbForms : VerbForms = {
inf = "mít" ;
pressg1 = "mám" ;
pressg2 = "máš" ;
pressg3, negpressg3 = "má" ;
prespl1 = "máme" ;
prespl2 = "máte" ;
prespl3 = "mají" ;
pastpartsg = "měl" ;
pastpartpl = "měli" ;
} ;
-- just an example of a traditional paradigm
---- TODO other traditional paradigms
iii_kupovatVerbForms : Str -> VerbForms = \kupovat ->
let
kupo = Predef.tk 3 kupovat ;
kupu = Predef.tk 1 kupo + "u"
in
{
inf = kupovat ;
pressg1 = kupu + "ji" ; --- kupuju
pressg2 = kupu + "ješ" ;
pressg3, negpressg3 = kupu + "je" ;
prespl1 = kupu + "jeme" ;
prespl2 = kupu + "jete" ;
prespl3 = kupu + "jí" ; --- kupujou
pastpartsg = kupo + "val" ;
pastpartpl = kupo + "vali" ;
} ;
---------------------------
-- Pronouns
PronForms : Type = {
nom, cnom, -- cnom is the pro-drop subject
gen, cgen,pgen, -- bare, clitic, prepositional
acc, cacc,pacc,
dat, cdat,pdat,
loc,
ins,pins : Str ;
a : Agr
} ;
---- TODO: possessives
personalPron : Agr -> PronForms = \a ->
{a = a ; cnom = []} **
case a of {
Ag _ Sg P1 => {
nom = "já" ;
gen,acc,pgen,pacc = "mne" ;
cgen,cacc = "mě" ;
dat,pdat,loc = "mně" ;
cdat = "mi" ;
ins,pins = "mnou"
} ;
Ag _ Sg P2 => {
nom = "ty" ;
gen,acc,pgen,pacc = "tebe" ;
cgen,cacc = "tě" ;
dat,pdat,loc = "tobě" ;
cdat = "ti" ;
ins,pins = "tebou"
} ;
Ag (Masc _) Sg P3 => {
nom = "on" ;
gen,acc = "jeho" ;
cgen,cacc = "ho" ;
pgen,pacc = "něho" ;
dat = "jemu" ;
cdat = "mu" ;
pdat = "němu" ;
loc = "něm" ;
ins = "jím" ;
pins = "ním" ;
} ;
Ag Fem Sg P3 => {
nom = "ona" ;
gen = "její" ;
dat,acc,cgen,cacc,cdat,ins = "ji" ;
pgen,pdat,pacc,loc,pins = "ní" ;
} ;
Ag Neutr Sg P3 => {
nom = "ono" ;
gen = "jeho" ;
cgen,cacc = "ho" ;
pgen = "něho" ;
dat = "jemu" ;
acc = "je" ;
pacc = "ně" ;
cdat = "mu" ;
pdat = "němu" ;
loc = "něm" ;
ins = "jím" ;
pins = "ním" ;
} ;
Ag _ Pl P1 => {
nom = "my" ;
gen,acc,
cgen,cacc,
pgen,pacc,
loc = "nás" ;
dat,cdat,pdat = "nám" ;
ins,pins = "námi" ;
} ;
Ag _ Pl P2 => {
nom = "vy" ;
gen,acc,
cgen,cacc,
pgen,pacc,
loc = "vás" ;
dat,cdat,pdat = "vám" ;
ins,pins = "vámi" ;
} ;
Ag g Pl P3 => {
nom = case g of {
Masc _ => "oni" ;
Fem => "ony" ;
Neutr => "ona"
} ;
gen,cgen = "jich" ;
pgen = "nich" ;
dat,cdat = "jim" ;
pdat = "nim" ;
acc,cacc = "je" ;
pacc = "ně" ;
loc = "nich" ;
ins = "jimi" ;
pins = "nimi" ;
}
} ;
--------------------------------
-- demonstrative pronouns, used for Quant and Det
oper
DemPronForms : Type = {
msnom, fsnom, nsnom,
msgen, fsgen,
msdat, -- fsdat = fsgen unlike AdjForms
fsacc,
msloc,
msins, fsins,
mpnom, fpnom, -- mpacc = fpacc = fpnom
pgen,
pdat, -- NOT msins like AdjForms
pins : Str
} ;
demPronFormsAdjective : DemPronForms -> Str -> Adjective =
\dem,s ->
let
demAdj = dem ** {fsdat = dem.fsgen} ;
adjAdj = adjFormsAdjective demAdj
in {
s = \\g,n,c => case <g,n,c> of {
<_,Pl,Dat> => dem.pdat ;
<Masc _ | Fem, Pl, Acc> => dem.fpnom ;
_ => adjAdj.s ! g ! n ! c
} + s
} ;
Determiner : Type = {
s : Gender => Case => Str ;
size : NumSize
} ;
mkDemPronForms : Str -> DemPronForms = \t -> {
msnom = t + "en" ;
fsnom = t + "a" ;
nsnom = t + "o" ;
msgen = t + "oho" ;
fsgen = t + "é" ;
msdat = t + "omu" ;
fsacc = t + "u" ;
msloc = t + "om" ;
msins = t + "ím" ;
fsins = t + "ou" ;
mpnom = t + "i" ;
fpnom = t + "y" ;
pgen = t + "ěch" ;
pdat = t + "ěm" ;
pins = t + "ěmi" ;
} ;
invarDemPronForms : Str -> DemPronForms = \s -> {
msnom, fsnom, nsnom, msgen, fsgen,
msdat, fsacc, msloc, msins, fsins,
mpnom, fpnom, pgen, pdat, pins = s ;
} ;
-- interrogatives
kdoForms : Case => Str = table {
Nom => "kdo" ;
Gen | Acc | Voc => "koho" ;
Dat => "komu" ;
Loc => "kom" ;
Ins => "kým"
} ;
coForms : Case => Str = table {
Nom|Acc|Voc => "co" ;
Gen => "čeho" ;
Dat => "čemu" ;
Loc => "čem" ;
Ins => "čím"
} ;
-- Numerals
-- singular forms of demonstratives
NumeralForms : Type = {
msnom, fsnom, nsnom,
msgen, fsgen,
msdat,
fsacc,
msloc,
msins, fsins : Str
} ;
numeralFormsDeterminer : NumeralForms -> NumSize -> Determiner =
\nume,size ->
let
dem = nume **
{mpnom, fpnom, pgen, pdat, pins = nume.msnom} ; --- plural forms not used
demAdj = dem ** {fsdat = dem.fsgen} ;
adjAdj = adjFormsAdjective demAdj
in {
s = \\g,c => adjAdj.s ! g ! Sg ! c ;
size = size
} ;
-- example: number 1
oneNumeral : Determiner = numeralFormsDeterminer ((mkDemPronForms "jedn") ** {msnom = "jeden"}) Num1 ;
-- numbers 2,3,4 ---- to check if everything comes out right with the determiner type
twoNumeral : Determiner =
let forms = {
msnom = "dva" ; fsnom, nsnom, fsacc = "dvě" ;
msgen, fsgen, msloc = "dvou" ;
msdat, msins, fsins = "dvěma"
}
in numeralFormsDeterminer forms Num2_4 ;
threeNumeral : Determiner =
let forms = {
msnom, fsnom, nsnom, fsacc, msgen, fsgen = "tři" ;
msdat = "třem" ;
msloc = "třech" ;
msins,fsins = "třemi" ;
}
in numeralFormsDeterminer forms Num2_4 ;
fourNumeral : Determiner =
let forms = {
msnom, fsnom, nsnom, fsacc = "čtyři" ;
msgen, fsgen = "čtyř" ;
msdat = "čtyřem" ;
msloc = "čtyřech" ;
msins,fsins = "čtyřmi" ;
}
in numeralFormsDeterminer forms Num2_4 ;
-- for the numbers 5 upwards
regNumeral : Str -> Str -> Determiner = \pet,peti ->
let forms = {
msnom,fsnom,nsnom = pet ;
msgen, fsgen, msdat, fsacc, msloc, msins, fsins = peti
}
in numeralFormsDeterminer forms Num5 ;
invarDeterminer : Str -> NumSize -> Determiner = \sto,size ->
regNumeral sto sto ;
invarNumeral : Str -> Determiner = \s -> invarDeterminer s Num5 ;
--------------------------------
-- combining nouns with numerals
param
NumSize = Num1 | Num2_4 | Num5 ; -- CEG 6.1
oper
numSizeForm : (Number => Case => Str) -> NumSize -> Case -> Str
= \cns,n,c -> case n of {
Num1 => cns ! Sg ! c ;
Num2_4 => cns ! Pl ! c ;
Num5 => case c of {
Nom | Acc => cns ! Pl ! Gen ;
_ => cns ! Pl ! c
}
} ;
numSizeAgr : Gender -> NumSize -> Person -> Agr
= \g,ns,p -> case ns of {
Num5 => Ag Neutr Sg p ; -- essential grammar 6.1.4
Num2_4 => Ag g Pl p ;
Num1 => Ag g Sg p
} ;
numSizeNumber : NumSize -> Number = \ns -> case ns of {
Num1 => Sg ;
_ => Pl ---- TO CHECK
} ;
}

32
src/czech/SentenceCze.gf Normal file
View File

@@ -0,0 +1,32 @@
concrete SentenceCze of Sentence = CatCze **
open Prelude, ResCze in {
lin
PredVP np vp = {
subj = case np.hasClit of {
True => np.clit ! Nom ; -- pro-drop
False => np.s ! Nom
} ;
verb = vp.verb ;
clit = vp.clit ! np.a ;
compl = vp.compl ! np.a ;
a = np.a ;
} ;
UseCl temp pol cl = {
s = temp.s ++ cl.subj ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.compl ;
} ;
--- TODO is inversion the standard? ; add indirect questions
UseQCl temp pol cl = {
s = temp.s ++ cl.clit ++ pol.s ++ verbAgr cl.verb cl.a pol.p ++ cl.subj ++ cl.compl ;
} ;
UseRCl temp pol rcl = {
s = \\a => temp.s ++
rcl.subj ! a ++ rcl.clit ! a ++
pol.s ++ verbAgr rcl.verb a pol.p ++
rcl.compl ! a ;
} ;
}

View File

@@ -0,0 +1,27 @@
concrete StructuralCze of Structural = CatCze **
open ParadigmsCze, ResCze, Prelude in {
lin
and_Conj = mkConj "a" ;
by8agent_Prep = mkPrep "od" Gen ; ---- TODO this means "from", there might be no good translation
few_Det = invarNumeral "málo" ; -- CEG 6.8 --- TODO genitive mála
for_Prep = mkPrep "pro" accusative ;
from_Prep = mkPrep (pre {"s"|"z" => "ze" ; _ => "z"}) Gen ; ---- consonant clusters
have_V2 = mkV2 haveVerbForms ;
in_Prep = mkPrep (pre {"v"|"m" => "ve" ; _ => "v"}) Loc ; ----
many_Det = regNumeral "mnoho" "mnoha" ; -- CEG 6.8 ----
or_Conj = mkConj "nebo" ;
somePl_Det = regNumeral "několik" "několika" ; -- CEG 6.8 ----
something_NP = {s,clit,prep = \\c => "ně" + coForms ! c ; a = Ag Neutr Sg P3 ; hasClit = False} ; -- CEG 5.6.3
possess_Prep = mkPrep "" Gen ;
that_Quant = demPronFormsAdjective (mkDemPronForms "tamt") "" ;
this_Quant = demPronFormsAdjective (mkDemPronForms "t") "to" ;
to_Prep = mkPrep "do" Gen ;
with_Prep = mkPrep (pre {"s"|"z" => "se" ; _ => "s"}) Ins ; ----
i_Pron = personalPron (Ag (Masc Anim) Sg P1) ;
youSg_Pron = personalPron (Ag (Masc Anim) Sg P2) ;
he_Pron = personalPron (Ag (Masc Anim) Sg P3) ;
she_Pron = personalPron (Ag Fem Sg P3) ;
}

11
src/czech/SymbolCze.gf Normal file
View File

@@ -0,0 +1,11 @@
--# -path=.:../abstract:../common:../prelude
concrete SymbolCze of Symbol = CatCze ** open Prelude, ResCze in {
lincat
Symb = {s : Str} ;
lin
MkSymb s = s ;
SymbPN s = lin PN {s = \\_ => s.s ; g = Neutr} ;
}

20
src/czech/TenseCze.gf Normal file
View File

@@ -0,0 +1,20 @@
concrete TenseCze of Tense =
CatCze **
open
ResCze,
Prelude
in {
lin
PNeg = {
s = "ne" ++ Predef.BIND ;
p = False
} ;
PPos = {
s = [] ;
p = True
} ;
ASimul = {s = [] ; t = CTPres} ;
TPres = {s = [] ; t = CTPres} ;
TTAnt t a = {s = t.s ++ a.s ; t = t.t} ; ----
}

8
src/czech/TextCze.gf Normal file
View File

@@ -0,0 +1,8 @@
concrete TextCze of Text = CatCze ** open ResCze in {
lin
TEmpty = {s = []} ;
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ;
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ;
}

48
src/czech/VerbCze.gf Normal file
View File

@@ -0,0 +1,48 @@
concrete VerbCze of Verb = CatCze ** open ResCze, Prelude in {
lin
UseV v = {
verb = v ;
clit,compl = \\_ => []
} ;
ComplSlash vps np = case <np.hasClit, vps.c.hasPrep> of {
<True,False> => vps ** {
clit = \\a => vps.clit ! a ++ np.clit ! vps.c.c
} ;
_ => vps ** {
compl = \\a => vps.compl ! a ++ vps.c.s ++ np.s ! vps.c.c
}
} ;
SlashV2a v = {
verb = v ;
clit,compl = \\_ => [] ;
c = v.c
} ;
UseComp comp = {
verb = copulaVerbForms ;
clit = \\_ => [] ;
compl = comp.s
} ;
CompAP ap = {
s = \\a => case a of {
Ag g n p_ => ap.s ! g ! n ! Nom
}
} ;
CompNP np = {
s = \\a_ => np.s ! Nom ; ---- InstrC in Pol
} ;
CompAdv adv = {
s = \\a_ => adv.s
} ;
AdvVP vp adv = vp ** {
compl = \\a => vp.compl ! a ++ adv.s
} ;
}

View File

@@ -39,9 +39,9 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
DetQuant quant num = {
s = quant.s ! num.hasCard ! num.n ++ num.s ! quant.isDef ! Nom;
sp = \\g,hasAdj,c => case num.hasCard of {
False => quant.sp ! g ! hasAdj ! num.n ! c ++ num.s ! quant.isDef ! Nom ;
True => quant.s ! True ! num.n ++ num.sp ! quant.isDef ! npcase2case c
sp = \\g,hasAdj,c => case <num.hasCard,num.n> of {
<False,Sg> => quant.sp ! g ! hasAdj ! num.n ! c ++ num.s ! quant.isDef ! Nom ;
_ => quant.s ! True ! num.n ++ num.sp ! quant.isDef ! npcase2case c
} ;
n = num.n ;
hasNum = num.hasCard

View File

@@ -99,6 +99,12 @@ oper
mkN : Str -> N -> N -- e.g. baby + boom
} ;
--3 Verbal nouns
--
-- A systematic way to form a verbal noun is the ending "-ing".
verbalN : V -> N ; -- e.g. sing -> singing
--3 Relational nouns
@@ -406,6 +412,8 @@ mkInterj : Str -> Interj
compoundN s n = lin N {s = \\x,y => s ++ n.s ! x ! y ; g=n.g} ;
verbalN v = regN (v.s ! VPresPart) ;
mkPN = overload {
mkPN : Str -> PN = regPN ;
mkPN : N -> PN = nounPN

View File

@@ -1,91 +0,0 @@
abstract Chunk = RGLBase - [Pol,Tense], NDPred ** {
cat
Chunks ;
Chunk ;
fun
OneChunk : Chunk -> Chunks ;
PlusChunk : Chunk -> Chunks -> Chunks ;
ChunkPhr : Chunks -> Phr ;
fun
AP_Chunk : AP -> Chunk ;
AdA_Chunk : AdA -> Chunk ;
Adv_Chunk : Adv -> Chunk ;
AdV_Chunk : AdV -> Chunk ;
AdN_Chunk : AdN -> Chunk ;
Cl_Chunk : PrCl_none -> Chunk ;
Cl_np_Chunk : PrCl_np -> Chunk ;
QCl_Chunk : PrQCl_none -> Chunk ;
QCl_np_Chunk : PrQCl_np -> Chunk ;
CN_Pl_Chunk : CN -> Chunk ;
CN_Sg_Chunk : CN -> Chunk ;
CN_Pl_Gen_Chunk : CN -> Chunk ;
CN_Sg_Gen_Chunk : CN -> Chunk ;
Conj_Chunk : Conj -> Chunk ;
IAdv_Chunk : IAdv -> Chunk ;
IP_Chunk : IP -> Chunk ;
NP_Nom_Chunk : NP -> Chunk ;
NP_Acc_Chunk : NP -> Chunk ;
NP_Gen_Chunk : NP -> Chunk ;
Numeral_Nom_Chunk : Numeral -> Chunk ;
Numeral_Gen_Chunk : Numeral -> Chunk ;
Ord_Nom_Chunk : Ord -> Chunk ;
Ord_Gen_Chunk : Ord -> Chunk ;
Predet_Chunk : Predet -> Chunk ;
Prep_Chunk : Prep -> Chunk ;
RP_Nom_Chunk : RP -> Chunk ;
RP_Gen_Chunk : RP -> Chunk ;
RP_Acc_Chunk : RP -> Chunk ;
Subj_Chunk : Subj -> Chunk ;
VP_none_Chunk, VP_none_inf_Chunk : PrVP_none -> Chunk ;
VP_np_Chunk, VP_np_inf_Chunk : PrVP_np -> Chunk ;
VP_s_Chunk, VP_s_inf_Chunk : PrVP_s -> Chunk ;
VP_v_Chunk, VP_v_inf_Chunk : PrVP_v -> Chunk ;
VP_a_Chunk, VP_a_inf_Chunk : PrVP_a -> Chunk ;
VP_q_Chunk, VP_q_inf_Chunk : PrVP_q -> Chunk ;
VP_np_np_Chunk, VP_np_np_inf_Chunk : PrVP_np_np -> Chunk ;
VP_np_s_Chunk, VP_np_s_inf_Chunk : PrVP_np_s -> Chunk ;
VP_np_v_Chunk, VP_np_v_inf_Chunk : PrVP_np_v -> Chunk ;
VP_np_q_Chunk, VP_np_q_inf_Chunk : PrVP_np_q -> Chunk ;
VP_np_a_Chunk, VP_np_a_inf_Chunk : PrVP_np_a -> Chunk ;
V_none_prespart_Chunk, V_none_pastpart_Chunk : PrV_none -> Chunk ;
V_np_prespart_Chunk, V_np_pastpart_Chunk : PrV_np -> Chunk ;
V_s_prespart_Chunk, V_s_pastpart_Chunk : PrV_s -> Chunk ;
V_v_prespart_Chunk, V_v_pastpart_Chunk : PrV_v -> Chunk ;
V_q_prespart_Chunk, V_q_pastpart_Chunk : PrV_q -> Chunk ;
V_a_prespart_Chunk, V_a_pastpart_Chunk : PrV_q -> Chunk ;
V_np_np_prespart_Chunk, V_np_np_pastpart_Chunk : PrV_np_np -> Chunk ;
V_np_s_prespart_Chunk, V_np_s_pastpart_Chunk : PrV_np_s -> Chunk ;
V_np_v_prespart_Chunk, V_np_v_pastpart_Chunk : PrV_np_v -> Chunk ;
V_np_q_prespart_Chunk, V_np_q_pastpart_Chunk : PrV_np_q -> Chunk ;
V_np_a_prespart_Chunk, V_np_a_pastpart_Chunk : PrV_np_q -> Chunk ;
refl_SgP1_Chunk,
refl_SgP2_Chunk,
refl_SgP3_Chunk,
refl_PlP1_Chunk,
refl_PlP2_Chunk,
refl_PlP3_Chunk : Chunk ;
neg_Chunk : Chunk ;
copula_Chunk : Chunk ;
copula_neg_Chunk : Chunk ;
copula_inf_Chunk : Chunk ;
past_copula_Chunk : Chunk ;
past_copula_neg_Chunk : Chunk ;
future_Chunk : Chunk ;
future_neg_Chunk : Chunk ;
cond_Chunk : Chunk ;
cond_neg_Chunk : Chunk ;
perfect_Chunk : Chunk ;
perfect_neg_Chunk : Chunk ;
past_perfect_Chunk : Chunk ;
past_perfect_neg_Chunk : Chunk ;
}

View File

@@ -1,128 +0,0 @@
concrete ChunkChi of Chunk =
RGLBaseChi - [Pol,Tense,Ant],
NDPredChi
** open (PI=PredInstanceChi), ResChi, Prelude in {
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
lin
OneChunk c = c ;
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
lin
AP_Chunk ap = ap ;
AdA_Chunk ada = ada ;
Adv_Chunk adv = adv ;
AdV_Chunk adv = adv ;
AdN_Chunk adn = adn ;
Cl_Chunk, Cl_np_Chunk = \cl -> ss (PI.declCl cl) ;
QCl_Chunk, QCl_np_Chunk = \cl -> ss (PI.questCl cl) ;
CN_Pl_Chunk cn = cn ;
CN_Sg_Chunk cn = cn ;
CN_Pl_Gen_Chunk cn = ss (cn.s ++ de_s) ;
CN_Sg_Gen_Chunk cn = ss (cn.s ++ de_s) ;
Conj_Chunk conj = ss (conj.s ! CSent).s2 ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = ip ;
NP_Nom_Chunk np = np ;
NP_Acc_Chunk np = np ;
NP_Gen_Chunk np = ss (np.s ++ de_s) ;
Numeral_Nom_Chunk num = ss (num.s ++ ge_s) ;
Numeral_Gen_Chunk num = ss (num.s ++ ge_s ++ de_s) ;
Ord_Nom_Chunk ord = ord ;
Ord_Gen_Chunk ord = ord ;
Predet_Chunk predet = predet ;
Prep_Chunk prep = ss (prep.prepPre ++ prep.prepPost) ;
RP_Nom_Chunk rp = rp ;
RP_Acc_Chunk rp = rp ;
RP_Gen_Chunk rp = ss (rp.s ++ de_s) ;
Subj_Chunk subj = ss (subj.prePart ++ subj.sufPart) ;
VP_none_Chunk,
VP_np_Chunk,
VP_s_Chunk,
VP_v_Chunk,
VP_a_Chunk,
VP_q_Chunk,
VP_np_np_Chunk,
VP_np_s_Chunk,
VP_np_a_Chunk,
VP_np_q_Chunk,
VP_np_v_Chunk
= \vp ->
let verb = vp.v ! PI.UUnit
in ss (
verb.p1 ++ vp.adV ++ vp.adv ++ verb.p2 ++ verb.p3 ++ vp.part ++
vp.adj ! PI.UUnit ++ vp.obj1.p1 ! PI.UUnit ++ vp.obj2.p1 ! PI.UUnit ++ vp.ext
) ;
VP_none_inf_Chunk,
VP_np_inf_Chunk,
VP_s_inf_Chunk,
VP_a_inf_Chunk,
VP_q_inf_Chunk,
VP_v_inf_Chunk,
VP_np_np_inf_Chunk,
VP_np_s_inf_Chunk,
VP_np_a_inf_Chunk,
VP_np_q_inf_Chunk,
VP_np_v_inf_Chunk
= \vp -> ss (PI.infVP PI.UUnit PI.UUnit vp) ;
V_none_prespart_Chunk,
V_np_prespart_Chunk,
V_s_prespart_Chunk,
V_a_prespart_Chunk,
V_q_prespart_Chunk,
V_v_prespart_Chunk,
V_np_np_prespart_Chunk,
V_np_s_prespart_Chunk,
V_np_a_prespart_Chunk,
V_np_q_prespart_Chunk,
V_np_v_prespart_Chunk
= \v -> ss (PI.vPresPart v PI.defaultAgr) ;
V_none_pastpart_Chunk,
V_np_pastpart_Chunk,
V_s_pastpart_Chunk,
V_a_pastpart_Chunk,
V_q_pastpart_Chunk,
V_v_pastpart_Chunk,
V_np_np_pastpart_Chunk,
V_np_s_pastpart_Chunk,
V_np_a_pastpart_Chunk,
V_np_q_pastpart_Chunk,
V_np_v_pastpart_Chunk
= \v -> ss (PI.vPastPart v PI.defaultAgr) ;
copula_inf_Chunk = ss "att vara" | ss "vara" ;
refl_SgP1_Chunk = ss reflPron ;
refl_SgP2_Chunk = ss reflPron ;
refl_SgP3_Chunk = ss reflPron ;
refl_PlP1_Chunk = ss reflPron ;
refl_PlP2_Chunk = ss reflPron ;
refl_PlP3_Chunk = ss reflPron ;
neg_Chunk = ss neg_s ;
copula_Chunk = ss copula_s ;
copula_neg_Chunk = ss (neg_s ++ copula_s) ;
past_copula_Chunk = ss "了" ;
past_copula_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
future_Chunk = ss copula_s ; ----
future_neg_Chunk = ss (neg_s ++ copula_s) ;
cond_Chunk = ss copula_s ; ----
cond_neg_Chunk = ss (neg_s ++ copula_s) ;
perfect_Chunk = ss "了" ;
perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
past_perfect_Chunk = ss "了" ;
past_perfect_neg_Chunk = ss (neg_s ++ copula_s ++ "了") ;
}

View File

@@ -1,138 +0,0 @@
concrete ChunkEng of Chunk =
RGLBaseEng - [Pol,Tense],
NDPredEng
** open (PI=PredInstanceEng), ResEng, Prelude in {
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
lin
OneChunk c = c ;
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
lin
AP_Chunk ap = allAgrSS (\a -> ap.s ! a) ;
AdA_Chunk ada = ada ;
Adv_Chunk adv = adv ;
AdV_Chunk adv = adv ;
AdN_Chunk adn = adn ;
Cl_Chunk, Cl_np_Chunk = \cl -> ss (PI.declCl cl) ;
QCl_Chunk, QCl_np_Chunk = \cl -> ss (PI.questCl cl) ;
CN_Pl_Chunk cn = ss (cn.s ! Pl ! Nom) ;
CN_Sg_Chunk cn = ss (cn.s ! Sg ! Nom) ;
CN_Pl_Gen_Chunk cn = ss (cn.s ! Pl ! Gen) ;
CN_Sg_Gen_Chunk cn = ss (cn.s ! Sg ! Gen) ;
Conj_Chunk conj = ss conj.s2 ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = ss (ip.s ! NCase Nom) ;
NP_Nom_Chunk np = ss (np.s ! NCase Nom) ;
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! NCase Gen) | ss (np.s ! NPNomPoss) ;
Numeral_Nom_Chunk num = ss (num.s ! NCard ! Nom) ;
Numeral_Gen_Chunk num = ss (num.s ! NCard ! Gen) ;
Ord_Nom_Chunk ord = ss (ord.s ! Nom) ;
Ord_Gen_Chunk ord = ss (ord.s ! Gen) ;
Predet_Chunk predet = predet ;
Prep_Chunk prep = prep ;
RP_Nom_Chunk rp = ss (rp.s ! RC Neutr (NCase Nom)) ;
RP_Acc_Chunk rp = ss (rp.s ! RPrep Masc) ; ----
RP_Gen_Chunk rp = ss (rp.s ! RC Neutr (NCase Gen)) ;
Subj_Chunk subj = subj ;
VP_none_Chunk,
VP_np_Chunk,
VP_s_Chunk,
VP_v_Chunk,
VP_a_Chunk,
VP_q_Chunk,
VP_np_np_Chunk,
VP_np_s_Chunk,
VP_np_a_Chunk,
VP_np_q_Chunk,
VP_np_v_Chunk
= \vp ->
let verb = vp.v ! (PI.VASgP1 | PI.VASgP3 | PI.VAPl)
in
allAgrSS (\a ->
verb.p1 ++ verb.p2 ++ vp.adV ++ verb.p3 ++ vp.part ++
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a ++ vp.adv ++ vp.ext
) ;
VP_none_inf_Chunk,
VP_np_inf_Chunk,
VP_s_inf_Chunk,
VP_a_inf_Chunk,
VP_q_inf_Chunk,
VP_v_inf_Chunk,
VP_np_np_inf_Chunk,
VP_np_s_inf_Chunk,
VP_np_a_inf_Chunk,
VP_np_q_inf_Chunk,
VP_np_v_inf_Chunk
= \vp -> allAgrSS (\a -> PI.infVP (VVInf | VVAux) a vp) ;
V_none_prespart_Chunk,
V_np_prespart_Chunk,
V_s_prespart_Chunk,
V_a_prespart_Chunk,
V_q_prespart_Chunk,
V_v_prespart_Chunk,
V_np_np_prespart_Chunk,
V_np_s_prespart_Chunk,
V_np_a_prespart_Chunk,
V_np_q_prespart_Chunk,
V_np_v_prespart_Chunk
= \v -> ss (PI.vPresPart v PI.defaultAgr) ;
V_none_pastpart_Chunk,
V_np_pastpart_Chunk,
V_s_pastpart_Chunk,
V_a_pastpart_Chunk,
V_q_pastpart_Chunk,
V_v_pastpart_Chunk,
V_np_np_pastpart_Chunk,
V_np_s_pastpart_Chunk,
V_np_a_pastpart_Chunk,
V_np_q_pastpart_Chunk,
V_np_v_pastpart_Chunk
= \v -> ss (PI.vPastPart v PI.defaultAgr) ;
copula_inf_Chunk = ss "to be" | ss "be" ;
refl_SgP1_Chunk = ss "myself" ;
refl_SgP2_Chunk = ss "yourself" ;
refl_SgP3_Chunk = ss "himself" | ss "herself" | ss "itself" ;
refl_PlP1_Chunk = ss "ourselves" ;
refl_PlP2_Chunk = ss "yourselves" ;
refl_PlP3_Chunk = ss "themselves" ;
neg_Chunk = ss "not" | ss "doesn't" | ss "don't" ;
copula_Chunk = ss "is" | ss "are" | ss "am" ;
copula_neg_Chunk = ss "isn't" | ss "aren't" ;
past_copula_Chunk = ss "was" | ss "were" ;
past_copula_neg_Chunk = ss "wasn't" | ss "weren't" ;
future_Chunk = ss "will" ;
future_neg_Chunk = ss "won't" ;
cond_Chunk = ss "would" ;
cond_neg_Chunk = ss "wouldn't" ;
perfect_Chunk = ss "has" | ss "have" ;
perfect_neg_Chunk = ss "hasn't" | ss "haven't" ;
past_perfect_Chunk = ss "had" ;
past_perfect_neg_Chunk = ss "hadn't" ;
oper
allAgrSS : (Agr -> Str) -> SS = \f ->
ss (f (AgP3Sg Masc)) ;
---- | ss (f (AgP3Sg Fem)) | ss (f (AgP3Sg Neutr)) |
---- ss (f (AgP1 Sg)) | ss (f (AgP1 Pl)) | ss (f (AgP2 Sg)) | ss (f (AgP2 Pl)) |
---- ss (f (AgP3Pl)) ;
}

View File

@@ -1,139 +0,0 @@
--# -path=.:../finnish/stemmed:../finnish:../api:../translator:alltenses
concrete ChunkFin of Chunk =
RGLBaseFin - [Pol,Tense],
NDPredFin
** open (PI=PredInstanceFin), ResFin, StemFin, Prelude in {
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
lin
OneChunk c = c ;
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
lin
AP_Chunk ap = ss (ap.s ! True ! NCase Sg Nom) ; ---- other agr
AdA_Chunk ada = ada ;
Adv_Chunk adv = adv ;
AdV_Chunk adv = adv ;
AdN_Chunk adn = adn ;
Cl_Chunk, Cl_np_Chunk = \cl -> ss (PI.declCl cl) ;
QCl_Chunk, QCl_np_Chunk = \cl -> ss (PI.questCl cl) ;
CN_Pl_Chunk cn = ss (cn.s ! NCase Pl Nom) ;
CN_Sg_Chunk cn = ss (cn.s ! NCase Sg Nom) ;
CN_Pl_Gen_Chunk cn = ss (cn.s ! NCase Pl Gen) ;
CN_Sg_Gen_Chunk cn = ss (cn.s ! NCase Sg Gen) ;
Conj_Chunk conj = ss conj.s2 ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = ss (ip.s ! NPCase Nom) ;
NP_Nom_Chunk np = ss (np.s ! NPCase Nom) ;
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! NPCase Gen) ;
Numeral_Nom_Chunk num = ss (num.s ! NCard (NCase Sg Nom)) ;
Numeral_Gen_Chunk num = ss (num.s ! NCard (NCase Sg Gen)) ;
Ord_Nom_Chunk ord = ss (ord.s ! NCase Sg Nom) ;
Ord_Gen_Chunk ord = ss (ord.s ! NCase Sg Gen) ;
Predet_Chunk predet = ss (predet.s ! Sg ! NPCase Nom) ;
Prep_Chunk prep = ss (prep.s.p1 ++ prep.s.p2) ;
RP_Nom_Chunk rp = ss (rp.s ! Sg ! NPCase Nom) ;
RP_Acc_Chunk rp = ss (rp.s ! Sg ! NPAcc) ;
RP_Gen_Chunk rp = ss (rp.s ! Sg ! NPCase Gen) ;
Subj_Chunk subj = subj ;
VP_none_Chunk,
VP_np_Chunk,
VP_s_Chunk,
VP_v_Chunk,
VP_a_Chunk,
VP_q_Chunk,
VP_np_np_Chunk,
VP_np_s_Chunk,
VP_np_a_Chunk,
VP_np_q_Chunk,
VP_np_v_Chunk
= \vp ->
let verb = vp.v ! PI.defaultAgr ;
in
allAgrSS (\a ->
verb.fin ++ vp.adV ++ verb.inf ++
vp.adj ! a ++ vp.obj1 ! a ++ vp.obj2 ! a ++ vp.adv ++ vp.ext
) ;
VP_none_inf_Chunk,
VP_np_inf_Chunk,
VP_s_inf_Chunk,
VP_a_inf_Chunk,
VP_q_inf_Chunk,
VP_v_inf_Chunk,
VP_np_np_inf_Chunk,
VP_np_s_inf_Chunk,
VP_np_a_inf_Chunk,
VP_np_q_inf_Chunk,
VP_np_v_inf_Chunk
= \vp -> allAgrSS (\a -> PI.infVP PI.vvInfinitive a vp) ;
V_none_prespart_Chunk,
V_np_prespart_Chunk,
V_s_prespart_Chunk,
V_a_prespart_Chunk,
V_q_prespart_Chunk,
V_v_prespart_Chunk,
V_np_np_prespart_Chunk,
V_np_s_prespart_Chunk,
V_np_a_prespart_Chunk,
V_np_q_prespart_Chunk,
V_np_v_prespart_Chunk
= \v -> ss (PI.vPresPart v PI.defaultAgr) ;
V_none_pastpart_Chunk,
V_np_pastpart_Chunk,
V_s_pastpart_Chunk,
V_a_pastpart_Chunk,
V_q_pastpart_Chunk,
V_v_pastpart_Chunk,
V_np_np_pastpart_Chunk,
V_np_s_pastpart_Chunk,
V_np_a_pastpart_Chunk,
V_np_q_pastpart_Chunk,
V_np_v_pastpart_Chunk
= \v -> ss (PI.vPastPart v PI.defaultAgr) ;
copula_inf_Chunk = ss "olla" ;
refl_SgP1_Chunk = ss "itseni" ;
refl_SgP2_Chunk = ss "itsesi" ;
refl_SgP3_Chunk = ss "itse" ;
refl_PlP1_Chunk = ss "itsemme" ;
refl_PlP2_Chunk = ss "itsenne" ;
refl_PlP3_Chunk = ss "itsensä" ;
neg_Chunk = ss "ei" ;
copula_Chunk = ss "on" ;
copula_neg_Chunk = ss "ei ole" ;
past_copula_Chunk = ss "oli" ;
past_copula_neg_Chunk = ss "ei ollut" ;
future_Chunk = ss "tulee" ;
future_neg_Chunk = ss "ei tule" ;
cond_Chunk = ss "olisi" ;
cond_neg_Chunk = ss "ei olisi" ;
perfect_Chunk = ss "on" ;
perfect_neg_Chunk = ss "ei ole" ;
past_perfect_Chunk = ss "oli" ;
past_perfect_neg_Chunk = ss "ei ollut" ;
oper
allAgrSS : (Agr -> Str) -> SS = \f ->
ss (f PI.defaultAgr) ;
---- | ss (f (AgP3Sg Fem)) | ss (f (AgP3Sg Neutr)) |
---- ss (f (AgP1 Sg)) | ss (f (AgP1 Pl)) | ss (f (AgP2 Sg)) | ss (f (AgP2 Pl)) |
---- ss (f (AgP3Pl)) ;
}

View File

@@ -1,137 +0,0 @@
concrete ChunkSwe of Chunk =
RGLBaseSwe - [Pol,Tense],
NDPredSwe
** open (PI=PredInstanceSwe), CommonScand, ResSwe, Prelude in {
lincat
Chunks = {s : Str} ;
Chunk = {s : Str};
lin
OneChunk c = c ;
PlusChunk c cs = cc2 c cs ;
ChunkPhr c = ss ("*" ++ c.s) | c ;
lin
AP_Chunk ap = ss (ap.s ! (Strong (GSg Utr))) ; ---- other agr
AdA_Chunk ada = ada ;
Adv_Chunk adv = adv ;
AdV_Chunk adv = adv ;
AdN_Chunk adn = adn ;
Cl_Chunk, Cl_np_Chunk = \cl -> ss (PI.declCl cl) ;
QCl_Chunk, QCl_np_Chunk = \cl -> ss (PI.questCl cl) ;
CN_Pl_Chunk cn = ss (cn.s ! Pl ! DIndef ! Nom) ;
CN_Sg_Chunk cn = ss (cn.s ! Sg ! DIndef ! Nom) ;
CN_Pl_Gen_Chunk cn = ss (cn.s ! Pl ! DIndef ! Gen) ;
CN_Sg_Gen_Chunk cn = ss (cn.s ! Sg ! DIndef ! Gen) ;
Conj_Chunk conj = ss conj.s2 ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = ss (ip.s ! NPNom) ;
NP_Nom_Chunk np = ss (np.s ! NPNom) ;
NP_Acc_Chunk np = ss (np.s ! NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! NPPoss (GSg Utr) Nom) ;
Numeral_Nom_Chunk num = ss (num.s ! NCard Utr) ;
Numeral_Gen_Chunk num = ss (num.s ! NCard Utr) ;
Ord_Nom_Chunk ord = ord ;
Ord_Gen_Chunk ord = ord ;
Predet_Chunk predet = ss (predet.s ! Utr ! Sg) ;
Prep_Chunk prep = prep ;
RP_Nom_Chunk rp = ss (rp.s ! Utr ! Sg ! RNom) ;
RP_Acc_Chunk rp = ss (rp.s ! Utr ! Sg ! RNom) ;
RP_Gen_Chunk rp = ss (rp.s ! Utr ! Sg ! RGen) ;
Subj_Chunk subj = subj ;
VP_none_Chunk,
VP_np_Chunk,
VP_s_Chunk,
VP_v_Chunk,
VP_a_Chunk,
VP_q_Chunk,
VP_np_np_Chunk,
VP_np_s_Chunk,
VP_np_a_Chunk,
VP_np_q_Chunk,
VP_np_v_Chunk
= \vp ->
let verb = vp.v ! PI.UUnit
in
allAgrSS (\a ->
verb.p1 ++ verb.p2 ++ vp.adV ++ verb.p3 ++ vp.part ++
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a ++ vp.adv ++ vp.ext
) ;
VP_none_inf_Chunk,
VP_np_inf_Chunk,
VP_s_inf_Chunk,
VP_a_inf_Chunk,
VP_q_inf_Chunk,
VP_v_inf_Chunk,
VP_np_np_inf_Chunk,
VP_np_s_inf_Chunk,
VP_np_a_inf_Chunk,
VP_np_q_inf_Chunk,
VP_np_v_inf_Chunk
= \vp -> allAgrSS (\a -> PI.infVP PI.UUnit a vp) ;
V_none_prespart_Chunk,
V_np_prespart_Chunk,
V_s_prespart_Chunk,
V_a_prespart_Chunk,
V_q_prespart_Chunk,
V_v_prespart_Chunk,
V_np_np_prespart_Chunk,
V_np_s_prespart_Chunk,
V_np_a_prespart_Chunk,
V_np_q_prespart_Chunk,
V_np_v_prespart_Chunk
= \v -> ss (PI.vPresPart v PI.defaultAgr) ;
V_none_pastpart_Chunk,
V_np_pastpart_Chunk,
V_s_pastpart_Chunk,
V_a_pastpart_Chunk,
V_q_pastpart_Chunk,
V_v_pastpart_Chunk,
V_np_np_pastpart_Chunk,
V_np_s_pastpart_Chunk,
V_np_a_pastpart_Chunk,
V_np_q_pastpart_Chunk,
V_np_v_pastpart_Chunk
= \v -> ss (PI.vPastPart v PI.defaultAgr) ;
copula_inf_Chunk = ss "att vara" | ss "vara" ;
refl_SgP1_Chunk = ss "mig själv" ;
refl_SgP2_Chunk = ss "dig själv" ;
refl_SgP3_Chunk = ss "sig själv" ;
refl_PlP1_Chunk = ss "oss själva" ;
refl_PlP2_Chunk = ss "er själva" ;
refl_PlP3_Chunk = ss "sig själva" ;
neg_Chunk = ss "inte" ;
copula_Chunk = ss "är" ;
copula_neg_Chunk = ss "är inte" ;
past_copula_Chunk = ss "var" ;
past_copula_neg_Chunk = ss "var inte" ;
future_Chunk = ss "ska" | ss "skall" ;
future_neg_Chunk = ss "ska inte" | ss "skall inte" ;
cond_Chunk = ss "skulle" ;
cond_neg_Chunk = ss "skulle inte" ;
perfect_Chunk = ss "har" ;
perfect_neg_Chunk = ss "har inte" ;
past_perfect_Chunk = ss "hade" ;
past_perfect_neg_Chunk = ss "hade inte" ;
oper
allAgrSS : (Agr -> Str) -> SS = \f ->
ss (f PI.defaultAgr) ;
---- | ss (f (AgP3Sg Fem)) | ss (f (AgP3Sg Neutr)) |
---- ss (f (AgP1 Sg)) | ss (f (AgP1 Pl)) | ss (f (AgP2 Sg)) | ss (f (AgP2 Pl)) |
---- ss (f (AgP3Pl)) ;
}

View File

@@ -1,32 +0,0 @@
abstract Lift =
RGLBase - [Pol,Tense]
,Pred
** {
fun
LiftV : V -> PrV aNone ;
LiftV2 : V2 -> PrV (aNP aNone) ;
LiftVS : VS -> PrV aS ;
LiftVQ : VQ -> PrV aQ ;
LiftVV : VV -> PrV aV ;
LiftVA : VA -> PrV aA ;
LiftVN : VA -> PrV aN ; ----
LiftV3 : V3 -> PrV (aNP (aNP aNone)) ;
LiftV2S : V2S -> PrV (aNP aS) ;
LiftV2Q : V2Q -> PrV (aNP aQ) ;
LiftV2V : V2V -> PrV (aNP aV) ;
LiftV2A : V2A -> PrV (aNP aA) ;
LiftV2N : V2A -> PrV (aNP aN) ; ----
LiftAP : AP -> PrAP aNone ;
LiftA2 : A2 -> PrAP (aNP aNone) ;
LiftCN : CN -> PrCN aNone ;
LiftN2 : N2 -> PrCN (aNP aNone) ;
AppAPCN : PrAP aNone -> CN -> CN ;
LiftAdv : Adv -> PrAdv aNone ;
LiftAdV : AdV -> PrAdv aNone ;
LiftPrep : Prep -> PrAdv (aNP aNone) ;
}

View File

@@ -1,42 +0,0 @@
concrete LiftChi of Lift =
RGLBaseChi - [Pol,Tense,Ant]
,PredChi
** open CommonScand, ResChi, PredInstanceChi, Prelude in {
--flags literal=Symb ;
oper
liftV = PredInstanceChi.liftV ;
lin
LiftV v = liftV v ;
LiftV2 v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2} ;
LiftVS v = liftV v ;
LiftVQ v = liftV v ;
LiftVA v = liftV v ; ---- c1?
LiftVN v = liftV v ; ---- c1?
LiftVV v = liftV v ;
LiftV3 v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2 ; c2 = v.c3} ;
LiftV2S v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2} ;
LiftV2Q v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2} ;
LiftV2V v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2 ; c2 = v.c3} ;
LiftV2A v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2} ;
LiftV2N v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2} ;
LiftAP ap = {s = \\a => ap.s ; c1,c2 = noComplCase ; obj1 = \\_ => []} ; --- monosyl
LiftA2 ap = {s = \\a => ap.s ; c1 = ap.c2 ; c2 = noComplCase ; obj1 = \\_ => []} ; --- isPre
LiftCN cn = {s = \\n => cn.s ; c1,c2 = noComplCase ; obj1 = \\_ => []} ;
LiftN2 cn = {s = \\n => cn.s ; c1 = cn.c2 ; c2 = noComplCase ; obj1 = \\_ => []} ;
AppAPCN ap cn = {s = ap.s ! UUnit ++ cn.s ; c = cn.c} ; ----
LiftAdv a = {advType = a.advType ; prepPre = a.s ; prepPost = []} ;
LiftAdV a = {advType = ATTime ; prepPre = a.s ; prepPost = []} ; ---- the first adv place
LiftPrep p = p ;
}

View File

@@ -1,46 +0,0 @@
concrete LiftEng of Lift =
RGLBaseEng - [Pol,Tense]
,PredEng
** open ResEng, PredInstanceEng, Prelude, (Pr = PredEng) in {
--flags literal=Symb ;
oper
liftV : ResEng.Verb -> Pr.PrV = \v -> lin PrV {
s = table {VVF f => v.s ! f ; VVPresNeg | VVPastNeg => v.s ! VInf} ; ---- only used for Aux
p = v.p ;
c1,c2 = [] ; isSubjectControl = True ; vtype = VTAct ; vvtype = VVInf
} ;
lin
LiftV v = liftV v ;
LiftV2 v = liftV v ** {c1 = v.c2} ;
LiftVS v = liftV v ;
LiftVQ v = liftV v ;
LiftVA v = liftV v ; ---- c1?
LiftVN v = liftV v ; ---- c1?
LiftVV v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = True ;
vtype = case v.typ of {VVAux => VTAux ; _ => VTAct} ; vvtype = v.typ} ; ---- c1? ---- VVF
LiftV3 v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ;
LiftV2S v = liftV v ** {c1 = v.c2} ;
LiftV2Q v = liftV v ** {c1 = v.c2} ;
LiftV2V v = liftV v ** {c1 = v.c2 ; c2 = v.c3 ; isSubjectControl = False ; vvtype = v.typ} ; ---- subj control should be defined in V2V
LiftV2A v = liftV v ** {c1 = v.c2} ;
LiftV2N v = liftV v ** {c1 = v.c2} ;
LiftAP ap = {s = \\a => ap.s ! a ; c1,c2 = [] ; obj1 = \\_ => []} ; --- isPre
LiftA2 a = {s = \\_ => a.s ! AAdj Posit Nom ; c1 = a.c2 ; c2 = [] ; obj1 = \\_ => []} ; --- isPre
LiftCN cn = {s = \\n => cn.s ! n ! Nom ; c1,c2 = [] ; obj1 = \\_ => []} ;
LiftN2 cn = {s = \\n => cn.s ! n ! Nom ; c1 = cn.c2 ; c2 = [] ; obj1 = \\_ => []} ;
AppAPCN ap cn = {s = \\n,c => cn.s ! n ! c ++ ap.s ! agrgP3 n cn.g ++ ap.obj1 ! agrgP3 n cn.g ; g = cn.g}
| {s = \\n,c => ap.s ! agrgP3 n cn.g ++ ap.obj1 ! agrgP3 n cn.g ++ cn.s ! n ! c ; g = cn.g} ; ---- isPre
LiftAdv a = a ** {isAdV = False ; c1 = []} ;
LiftAdV a = a ** {isAdV = True ; c1 = []} ;
LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ;
}

View File

@@ -1,56 +0,0 @@
concrete LiftFin of Lift =
RGLBaseFin - [Pol,Tense]
,PredFin
** open ResFin,
StemFin,
PredInstanceFin,
Prelude in {
--flags literal=Symb ;
lin
LiftV v = liftV v ;
LiftV2 v = liftV v ** {c1 = v.c2} ;
LiftVS v = liftV v ;
LiftVQ v = liftV v ;
LiftVA v = liftV v ** {c1 = v.c2} ;
LiftVN v = liftV v ** {c1 = v.c2} ;
LiftVV v = liftV v ** {vvtype = v.vi} ;
LiftV3 v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ;
LiftV2S v = liftV v ** {c1 = v.c2} ;
LiftV2Q v = liftV v ** {c1 = v.c2} ;
LiftV2V v = liftV v ** {c1 = v.c2 ; vvtype = v.vi} ;
LiftV2A v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ;
LiftV2N v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ;
LiftAP ap = {s = \\a => ap.s ! False ! NCase (complNumAgr a) Nom ; c1,c2 = noComplCase ; obj1 = \\_ => []} ; --- Part in Pl
---- LiftA2 ap = {s = \\a => ap.s ! AF (APosit (agr2aformpos a)) Nom ; c1 = ap.c2.s ; c2 = noComplCase ; obj1 = \\_ => []} ; --- isPre
LiftCN cn = {s = \\n => cn.s ! NCase n Nom ; c1,c2 = noComplCase ; obj1 = \\_ => []} ;
---- LiftN2 cn = {s = \\n => cn.s ! n ! specDet DIndef ! Nom ; c1 = cn.c2.s ; c2 = [] ; obj1 = \\_ => []} ;
LiftA2,LiftN2,AppAPCN = variants {} ; ---- for functor use
{-
AppAPCN ap cn =
{s = \\n,d,c =>
let
agr = {n = n ; g = cn.g ; p = P3}
in (cn.s ! n ! d ! c) ++ (ap.s ! agr ++ ap.obj1 ! agr) ; -- flicka älskad av alla
g = cn.g ;
isMod = True
}
| {s = \\n,d,c =>
let
agr = {n = n ; g = cn.g ; p = P3}
in (ap.obj1 ! agr ++ ap.s ! agr) ++ (cn.s ! n ! d ! c) ; -- av alla älskad flicka
g = cn.g ;
isMod = True
} ;
-}
LiftAdv a = a ** {isAdV = False ; c1 = noComplCase} ;
LiftAdV a = a ** {isAdV = True ; c1 = noComplCase} ;
LiftPrep p = {s = [] ; isAdV = False ; c1 = p} ;
}

View File

@@ -1,56 +0,0 @@
concrete LiftSwe of Lift =
RGLBaseSwe - [Pol,Tense]
,PredSwe
** open CommonScand, ResSwe, PredInstanceSwe, Prelude in {
--flags literal=Symb ;
oper
liftV = PredInstanceSwe.liftV ;
lin
LiftV v = liftV v ;
LiftV2 v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftVS v = liftV v ;
LiftVQ v = liftV v ;
LiftVA v = liftV v ; ---- c1?
LiftVN v = liftV v ; ---- c1?
LiftVV v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftV3 v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s ; c2 = v.c3.s} ;
LiftV2S v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftV2Q v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftV2V v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s ; c2 = v.c3.s} ;
LiftV2A v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftV2N v = <liftV <v : Verb> : PrVerb> ** {c1 = v.c2.s} ;
LiftAP ap = {s = \\a => ap.s ! agr2aformpos a ; c1,c2 = [] ; obj1 = \\_ => []} ; --- isPre
LiftA2 ap = {s = \\a => ap.s ! AF (APosit (agr2aformpos a)) Nom ; c1 = ap.c2.s ; c2 = [] ; obj1 = \\_ => []} ; --- isPre
LiftCN cn = {s = \\n => cn.s ! n ! DIndef ! Nom ; c1,c2 = [] ; obj1 = \\_ => []} ;
LiftN2 cn = {s = \\n => cn.s ! n ! specDet DIndef ! Nom ; c1 = cn.c2.s ; c2 = [] ; obj1 = \\_ => []} ;
AppAPCN ap cn =
{s = \\n,d,c =>
let
agr = {n = n ; g = cn.g ; p = P3}
in (cn.s ! n ! d ! c) ++ (ap.s ! agr ++ ap.obj1 ! agr) ; -- flicka älskad av alla
g = cn.g ;
isMod = True
}
| {s = \\n,d,c =>
let
agr = {n = n ; g = cn.g ; p = P3}
in (ap.obj1 ! agr ++ ap.s ! agr) ++ (cn.s ! n ! d ! c) ; -- av alla älskad flicka
g = cn.g ;
isMod = True
} ;
LiftAdv a = a ** {isAdV = False ; c1 = []} ;
LiftAdV a = a ** {isAdV = True ; c1 = []} ;
LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ;
}

View File

@@ -1,9 +0,0 @@
all: translator
translator:
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=TransEngSwe NDTransEng.gf NDTransSwe.gf
bigtranslator:
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=TransEngChiFinSwe NDTransEng.gf NDTransSwe.gf NDTransChi.gf NDTransFin.gf +RTS -K200M
midtranslator:
gf -s -make -literal=Symb -probs=NDPredTrans.probs -name=TransEngChiSwe NDTransEng.gf NDTransSwe.gf NDTransChi.gf +RTS -K200M

View File

@@ -1,35 +0,0 @@
abstract NDLift =
RGLBase - [Pol,Tense]
,NDPred
** {
fun
LiftV : V -> PrV_none ;
LiftV2 : V2 -> PrV_np ;
LiftVS : VS -> PrV_s ;
LiftVQ : VQ -> PrV_q ;
LiftVV : VV -> PrV_v ;
LiftVA : VA -> PrV_a ;
LiftVN : VA -> PrV_n ; ----
LiftV3 : V3 -> PrV_np_np ;
LiftV2S : V2S -> PrV_np_s ;
LiftV2Q : V2Q -> PrV_np_q ;
LiftV2V : V2V -> PrV_np_v ;
LiftV2A : V2A -> PrV_np_a ;
LiftV2N : V2A -> PrV_np_n ; ----
LiftAP : AP -> PrAP_none ;
LiftA2 : A2 -> PrAP_np ;
LiftCN : CN -> PrCN_none ;
LiftN2 : N2 -> PrCN_np ;
AppAPCN : PrAP_none -> CN -> CN ;
LiftAdv : Adv -> PrAdv_none ;
LiftAdV : AdV -> PrAdv_none ;
LiftPrep : Prep -> PrAdv_np ;
}

View File

@@ -1,5 +0,0 @@
concrete NDLiftChi of NDLift =
RGLBaseChi - [Pol,Tense,Ant]
,NDPredChi
** NDLiftFunctor with (Lift = LiftChi) ;

View File

@@ -1,5 +0,0 @@
concrete NDLiftEng of NDLift =
RGLBaseEng - [Pol,Tense]
,NDPredEng
** NDLiftFunctor with (Lift = LiftEng) ;

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