mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Compare commits
149 Commits
experiment
...
build-acti
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
519a31e88a | ||
|
|
aa3b6648f3 | ||
|
|
2d102d2549 | ||
|
|
7505813fa5 | ||
|
|
6cedca7f4f | ||
|
|
dd102142f5 | ||
|
|
aa8840b61b | ||
|
|
33d7b7173e | ||
|
|
ae7e895b14 | ||
|
|
ad76508743 | ||
|
|
43e39af33a | ||
|
|
0875fde0e7 | ||
|
|
c4bffc32f1 | ||
|
|
fc7bede563 | ||
|
|
e14cdf99e3 | ||
|
|
2ef7fed0d2 | ||
|
|
0c5d685d8a | ||
|
|
02d92f6cc9 | ||
|
|
24d3d2abaa | ||
|
|
9ba407f051 | ||
|
|
aad7b002aa | ||
|
|
b776f47c6b | ||
|
|
c96156116e | ||
|
|
b2e2631269 | ||
|
|
6ca4907c11 | ||
|
|
d4aba3bded | ||
|
|
5dc5433068 | ||
|
|
7c997ea280 | ||
|
|
5c9885d0a2 | ||
|
|
e48097f8a5 | ||
|
|
7368d1a80c | ||
|
|
622f0da641 | ||
|
|
2f83cadc2e | ||
|
|
2406c9bfd9 | ||
|
|
b3b1f4ebd8 | ||
|
|
479136bfc5 | ||
|
|
272484b1fd | ||
|
|
895ee33a95 | ||
|
|
bf3609c083 | ||
|
|
08896eb34b | ||
|
|
244b6c2447 | ||
|
|
42fb9fd465 | ||
|
|
6661bdff95 | ||
|
|
a793daaf11 | ||
|
|
58cfa9e8dc | ||
|
|
c759a3f5f4 | ||
|
|
d4ee4addc5 | ||
|
|
dd813bc7cc | ||
|
|
39b9918060 | ||
|
|
9d9349a17a | ||
|
|
7f05718d5c | ||
|
|
cae8e43d21 | ||
|
|
f072f56f3f | ||
|
|
eb08304c10 | ||
|
|
b422417d4b | ||
|
|
2ef1e7d8b6 | ||
|
|
adcc4c4c81 | ||
|
|
fe50ca3fa6 | ||
|
|
0f4f1f78c1 | ||
|
|
6bd9193b7e | ||
|
|
44e1f6fab0 | ||
|
|
6ff11a2458 | ||
|
|
db8f3ebf72 | ||
|
|
1c92a0826b | ||
|
|
454164a521 | ||
|
|
e679629d70 | ||
|
|
6b874440db | ||
|
|
a06732a064 | ||
|
|
36dffcb152 | ||
|
|
a233e33bf8 | ||
|
|
70540a7e19 | ||
|
|
f7f784aeb1 | ||
|
|
0e363f02dd | ||
|
|
93876d6f1c | ||
|
|
c34b05d9df | ||
|
|
0ca88f2caf | ||
|
|
32606cfa59 | ||
|
|
5a3f5e430a | ||
|
|
ecb032770e | ||
|
|
7a100120af | ||
|
|
1665b277a0 | ||
|
|
e0380cfa62 | ||
|
|
36b0fb1e69 | ||
|
|
5132f66809 | ||
|
|
1d726ed956 | ||
|
|
4abec966a9 | ||
|
|
eb6244bc85 | ||
|
|
bfcae3bbbb | ||
|
|
98f65975ae | ||
|
|
bf4b4b2d22 | ||
|
|
bcadbaaf32 | ||
|
|
84361d473d | ||
|
|
13ee63e25d | ||
|
|
f9467bffd3 | ||
|
|
c0734bdfbb | ||
|
|
68290c590e | ||
|
|
a17f4fd401 | ||
|
|
7a07513f8e | ||
|
|
bbbe9bbb03 | ||
|
|
b07a19d8c1 | ||
|
|
1be01b549e | ||
|
|
d47d2ce52f | ||
|
|
8e824083a2 | ||
|
|
8b5e28b948 | ||
|
|
6ad61614b8 | ||
|
|
e4f9b85f53 | ||
|
|
a6fc60e2d3 | ||
|
|
49d97eeef9 | ||
|
|
979808415b | ||
|
|
71868cc361 | ||
|
|
642beb9169 | ||
|
|
f9437f01a9 | ||
|
|
f22f5d4abf | ||
|
|
14f183a577 | ||
|
|
a76a017064 | ||
|
|
9918e391b3 | ||
|
|
1f1dec615b | ||
|
|
118240d38d | ||
|
|
3fc6efec77 | ||
|
|
74485ab138 | ||
|
|
f719268045 | ||
|
|
ea7f9aba0f | ||
|
|
662b731dd0 | ||
|
|
1f9e6aeaad | ||
|
|
88b8e84cab | ||
|
|
e53684c2f2 | ||
|
|
0fbe5a14cd | ||
|
|
78146df910 | ||
|
|
4d3e106148 | ||
|
|
7f2a5bf18f | ||
|
|
9922d750db | ||
|
|
2cf9c2ff1e | ||
|
|
267e457cc2 | ||
|
|
2aaccfface | ||
|
|
d1f0e4ab0d | ||
|
|
b33a65bbb5 | ||
|
|
7403f44eda | ||
|
|
203ea9c061 | ||
|
|
d1d481b6e8 | ||
|
|
7ba3842ced | ||
|
|
49fbbffacc | ||
|
|
270067291a | ||
|
|
e199fbbb0c | ||
|
|
71782b8e04 | ||
|
|
27f7d5397a | ||
|
|
c686004c4a | ||
|
|
7528e87dcd | ||
|
|
334038fee2 | ||
|
|
962a94cb24 |
61
.github/workflows/release.yml
vendored
Normal file
61
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Create RGL release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag (should be YYYYMMDD format)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
GF_VERSION: 3.10-1
|
||||
DEST: gf-rgl-${{ github.event.inputs.tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install GF
|
||||
run: |
|
||||
curl -s https://www.grammaticalframework.org/download/gf_${GF_VERSION}_amd64.deb -o gf.deb
|
||||
sudo dpkg -i gf.deb
|
||||
|
||||
- name: Build RGL
|
||||
run: |
|
||||
mkdir -p ${DEST}
|
||||
bash Setup.sh --dest=${DEST} --gf=gf --verbose
|
||||
|
||||
- name: Create archive
|
||||
run: |
|
||||
zip asset.zip -r ${{ env.DEST }}
|
||||
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: gf-rgl-${{ github.sha }}
|
||||
# path: ${{ env.DEST }}
|
||||
# if-no-files-found: error
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.tag }}
|
||||
release_name: Release ${{ github.event.inputs.tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload release asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: asset.zip
|
||||
asset_name: gf-rgl-${{ github.event.inputs.tag }}.zip
|
||||
asset_content_type: application/zip
|
||||
10
RELEASE.md
Normal file
10
RELEASE.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# RGL releases
|
||||
|
||||
The RGL does not use semantic versioning.
|
||||
Releases are instead made periodically, as snapshots of the current state of the library.
|
||||
Releases are Git tagged `YYYYMMDD`, and for each release a binary package (as `.gfo` files) is made available as a GitHub release.
|
||||
|
||||
## Creating a new release
|
||||
|
||||
1. Run the "Create release" workflow through the GitHub actions interface
|
||||
(instructions [here](https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow)).
|
||||
2
Setup.sh
2
Setup.sh
@@ -97,4 +97,4 @@ done
|
||||
|
||||
# Copy
|
||||
echo "Copying to ${dest}"
|
||||
cp -R -p "${dist}"/* "${dest}"
|
||||
cp -R "${dist}"/* "${dest}"
|
||||
|
||||
@@ -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”,
|
||||
Master’s 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.//
|
||||
|
||||
109
doc/status.txt
109
doc/status.txt
@@ -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.
|
||||
|
||||
@@ -4,6 +4,7 @@ Amh,Amharic,amharic,,,,,n,n,,n
|
||||
Ara,Arabic,arabic,,,,,,y,,y
|
||||
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
||||
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
||||
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y
|
||||
Chi,Chinese (simplified),chinese,,,,,,,,y
|
||||
Cze,Czech,czech,,,,,,n,,y
|
||||
Dan,Danish,danish,Scand,,y,,,,,y
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
--# -path=.:../russian:../common:../abstract:../prelude
|
||||
|
||||
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv] ;
|
||||
resource TryRus = SyntaxRus, LexiconRus, ParadigmsRus - [mkAdv,mkIAdv,mkOrd] ;
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
@@ -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 => "тите"
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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)) ;
|
||||
|
||||
@@ -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)) ;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -coding=cp1251
|
||||
--# -coding=utf8
|
||||
abstract ExtraBulAbs = Extra ** {
|
||||
flags coding=cp1251 ;
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
fun
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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}} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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=<>
|
||||
@@ -286,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 = <>} ;
|
||||
}
|
||||
|
||||
@@ -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 ;
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
--# -coding=cp1251
|
||||
--# -coding=utf8
|
||||
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
||||
flags coding=cp1251 ;
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
lin
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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$.
|
||||
@@ -328,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
|
||||
};
|
||||
|
||||
@@ -478,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+"àòà") ;
|
||||
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$.
|
||||
@@ -545,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} =
|
||||
@@ -600,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 ++
|
||||
@@ -629,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 => ""
|
||||
} ;
|
||||
@@ -656,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
|
||||
}
|
||||
@@ -676,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+"те"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -705,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+"ите"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -720,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 ;
|
||||
@@ -743,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) ->
|
||||
@@ -812,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 => "своите"
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -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)} ;
|
||||
|
||||
|
||||
@@ -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 "Български" ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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) ;
|
||||
|
||||
@@ -39,7 +39,7 @@ concrete CatCze of Cat =
|
||||
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
Num = Determiner ;
|
||||
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
||||
Pron = PronForms ;
|
||||
Pron = PronForms ** {poss : DemPronForms} ;
|
||||
|
||||
Adv = {s : Str} ;
|
||||
Prep = ResCze.ComplementCase ; -- {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||
|
||||
@@ -99,4 +99,4 @@ oper whoSg_IP : IP = notYet "whoSg_IP" ;
|
||||
oper youPl_Pron : Pron = notYet "youPl_Pron" ;
|
||||
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,33 +30,35 @@ lin
|
||||
UsePron pron = {
|
||||
s = table {
|
||||
Nom | Voc => pron.nom ;
|
||||
Gen => pron.gen ;
|
||||
Dat => pron.dat ;
|
||||
Acc => pron.acc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.ins
|
||||
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
|
||||
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
|
||||
Gen => pron.pgen ;
|
||||
Dat => pron.pdat ;
|
||||
Acc => pron.pacc ;
|
||||
Loc => pron.loc ;
|
||||
Ins => pron.pins
|
||||
} ;
|
||||
a = pron.a ;
|
||||
hasClit = True ;
|
||||
} ;
|
||||
|
||||
PossPron pron = justDemPronFormsAdjective pron.poss ;
|
||||
|
||||
UsePN pn = {
|
||||
s,clit,prep = \\c => pn.s ! c ;
|
||||
a = Ag pn.g Sg P3 ;
|
||||
|
||||
@@ -722,6 +722,41 @@ adjFormsAdjective : AdjForms -> Adjective = \afs -> {
|
||||
|
||||
} ;
|
||||
|
||||
possessivePron : Agr -> DemPronForms = \a -> case a of {
|
||||
Ag _ Sg P1 => mladyAdjForms "my" ** {msnom = "můj" ; pdat = "mým"} ; --- alts: moje, moji,...
|
||||
Ag _ Sg P2 => mladyAdjForms "tvy" ** {msnom = "tvůj" ; pdat = "tvým"} ;
|
||||
|
||||
Ag _ Pl P1 => jarniAdjForms "naše" ** {
|
||||
msnom = "náš" ;
|
||||
msins = "naším" ;
|
||||
fsgen,mpnom = "naši" ;
|
||||
fsins = "naší" ;
|
||||
pdat, msins = "našim" ;
|
||||
pgen = "našich" ;
|
||||
pins = "našimi" ;
|
||||
} ;
|
||||
Ag _ Pl P2 => jarniAdjForms "vaše" ** {
|
||||
msnom = "váš" ;
|
||||
msins = "vaším" ;
|
||||
fsgen,mpnom = "vaši" ;
|
||||
fsins = "vaší" ;
|
||||
pdat, msins = "vašim" ;
|
||||
pgen = "vašich" ;
|
||||
pins = "vašimi" ;
|
||||
} ;
|
||||
|
||||
Ag Fem Sg P3 => jarniAdjForms "její" ** {pdat = "jejím"} ;
|
||||
|
||||
Ag (Masc _ | Neutr) Sg P3 => invarDemPronForms "jeho" ** {pdat = "jeho"} ;
|
||||
Ag _ Pl P3 => invarDemPronForms "jejich" ** {pdat = "jejich"}
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
mkPron : Agr -> PronForms ** {poss : DemPronForms} = \a ->
|
||||
personalPron a ** {poss = possessivePron a} ;
|
||||
|
||||
--------------------------------
|
||||
-- demonstrative pronouns, used for Quant and Det
|
||||
|
||||
@@ -751,6 +786,20 @@ oper
|
||||
_ => adjAdj.s ! g ! n ! c
|
||||
} + s
|
||||
} ;
|
||||
|
||||
justDemPronFormsAdjective : DemPronForms -> Adjective =
|
||||
\dem ->
|
||||
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
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
Determiner : Type = {
|
||||
s : Gender => Case => Str ;
|
||||
|
||||
@@ -19,9 +19,12 @@ lin
|
||||
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) ;
|
||||
i_Pron = mkPron (Ag (Masc Anim) Sg P1) ; --- to add Fem pronouns in Extend
|
||||
youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ;
|
||||
he_Pron = mkPron (Ag (Masc Anim) Sg P3) ;
|
||||
she_Pron = mkPron (Ag Fem Sg P3) ;
|
||||
we_Pron = mkPron (Ag (Masc Anim) Pl P1) ;
|
||||
youPl_Pron = mkPron (Ag (Masc Anim) Pl P2) ;
|
||||
they_Pron = mkPron (Ag (Masc Anim) Pl P3) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
}
|
||||
@@ -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 ++ "了") ;
|
||||
|
||||
|
||||
}
|
||||
@@ -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)) ;
|
||||
|
||||
|
||||
}
|
||||
@@ -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)) ;
|
||||
|
||||
|
||||
}
|
||||
@@ -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)) ;
|
||||
|
||||
|
||||
}
|
||||
@@ -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) ;
|
||||
|
||||
}
|
||||
@@ -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 ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
}
|
||||
@@ -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} ;
|
||||
}
|
||||
|
||||
@@ -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} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDLiftChi of NDLift =
|
||||
RGLBaseChi - [Pol,Tense,Ant]
|
||||
,NDPredChi
|
||||
|
||||
** NDLiftFunctor with (Lift = LiftChi) ;
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDLiftEng of NDLift =
|
||||
RGLBaseEng - [Pol,Tense]
|
||||
,NDPredEng
|
||||
|
||||
** NDLiftFunctor with (Lift = LiftEng) ;
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDLiftFin of NDLift =
|
||||
RGLBaseFin - [Pol,Tense]
|
||||
,NDPredFin
|
||||
|
||||
** NDLiftFunctor with (Lift = LiftFin) ;
|
||||
@@ -1,34 +0,0 @@
|
||||
incomplete concrete NDLiftFunctor of NDLift =
|
||||
RGLBase - [Pol,Tense]
|
||||
,NDPred
|
||||
|
||||
** open Lift in {
|
||||
|
||||
lin
|
||||
LiftV = Lift.LiftV ;
|
||||
LiftV2 = Lift.LiftV2 ;
|
||||
LiftVS = Lift.LiftVS ;
|
||||
LiftVQ = Lift.LiftVQ ;
|
||||
LiftVV = Lift.LiftVV ;
|
||||
LiftVA = Lift.LiftVA ;
|
||||
LiftVN = Lift.LiftVN ;
|
||||
|
||||
LiftV3 = Lift.LiftV3 ;
|
||||
LiftV2S = Lift.LiftV2S ;
|
||||
LiftV2Q = Lift.LiftV2Q ;
|
||||
LiftV2V = Lift.LiftV2V ;
|
||||
LiftV2A = Lift.LiftV2A ;
|
||||
LiftV2N = Lift.LiftV2N ;
|
||||
|
||||
LiftAP = Lift.LiftAP ;
|
||||
LiftA2 = Lift.LiftA2 ;
|
||||
LiftCN = Lift.LiftCN ;
|
||||
LiftN2 = Lift.LiftN2 ;
|
||||
|
||||
AppAPCN = Lift.AppAPCN ;
|
||||
|
||||
LiftAdv = Lift.LiftAdv ;
|
||||
LiftAdV = Lift.LiftAdV ;
|
||||
LiftPrep = Lift.LiftPrep ;
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDLiftSwe of NDLift =
|
||||
RGLBaseSwe - [Pol,Tense]
|
||||
,NDPredSwe
|
||||
|
||||
** NDLiftFunctor with (Lift = LiftSwe) ;
|
||||
@@ -1,292 +0,0 @@
|
||||
abstract NDPred = Cat [Ant,NP,Utt,IP,IAdv,IComp,Conj,RS,RP] ** {
|
||||
|
||||
cat
|
||||
--< Arg ;
|
||||
|
||||
--< PrV Arg ;
|
||||
PrV_none ; PrV_np ; PrV_v ; PrV_s ; PrV_q ; PrV_a ; PrV_n ;
|
||||
PrV_np_np ; PrV_np_v ; PrV_np_s ; PrV_np_q ; PrV_np_a ; PrV_np_n ;
|
||||
|
||||
--< PrVP Arg ;
|
||||
PrVP_none ; PrVP_np ; PrVP_v ; PrVP_s ; PrVP_q ; PrVP_a ; PrVP_n ;
|
||||
PrVP_np_np ; PrVP_np_v ; PrVP_np_s ; PrVP_np_q ; PrVP_np_a ; PrVP_np_n ;
|
||||
|
||||
--< PrVPI Arg ; -- infinitive VP
|
||||
PrVPI_none ;
|
||||
PrVPI_np ;
|
||||
|
||||
--< VPC Arg ; -- conjunction of VP
|
||||
VPC_none ;
|
||||
VPC_np ;
|
||||
|
||||
Tense ;
|
||||
Pol ;
|
||||
|
||||
--< PrCl Arg ;
|
||||
PrCl_none ;
|
||||
PrCl_np ;
|
||||
|
||||
--< ClC Arg ; -- conjunction of Cl
|
||||
ClC_none ;
|
||||
ClC_np ;
|
||||
|
||||
--< PrQCl Arg ;
|
||||
PrQCl_none ;
|
||||
PrQCl_np ;
|
||||
|
||||
--< PrAdv Arg ;
|
||||
PrAdv_none ;
|
||||
PrAdv_np ;
|
||||
|
||||
PrS ;
|
||||
|
||||
--< PrAP Arg ;
|
||||
PrAP_none ;
|
||||
PrAP_np ;
|
||||
|
||||
--< PrCN Arg ; -- the country he became the president of
|
||||
PrCN_none ;
|
||||
PrCN_np ;
|
||||
|
||||
fun
|
||||
--< aNone, aS, aV, aQ, aA, aN : Arg ;
|
||||
--< aNP : Arg -> Arg ;
|
||||
|
||||
TPres, TPast, TFut, TCond : Tense ;
|
||||
PPos, PNeg : Pol ;
|
||||
ASimul, AAnter : Ant ;
|
||||
|
||||
--< UseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV a -> PrVP a ;
|
||||
UseV_none : Ant -> Tense -> Pol -> PrV_none -> PrVP_none ;
|
||||
UseV_np : Ant -> Tense -> Pol -> PrV_np -> PrVP_np ;
|
||||
UseV_v : Ant -> Tense -> Pol -> PrV_v -> PrVP_v ;
|
||||
UseV_s : Ant -> Tense -> Pol -> PrV_s -> PrVP_s ;
|
||||
UseV_a : Ant -> Tense -> Pol -> PrV_a -> PrVP_a ;
|
||||
UseV_q : Ant -> Tense -> Pol -> PrV_q -> PrVP_q ;
|
||||
UseV_n : Ant -> Tense -> Pol -> PrV_v -> PrVP_n ;
|
||||
UseV_np_np : Ant -> Tense -> Pol -> PrV_np_np -> PrVP_np_np ;
|
||||
UseV_np_v : Ant -> Tense -> Pol -> PrV_np_v -> PrVP_np_v ;
|
||||
UseV_np_s : Ant -> Tense -> Pol -> PrV_np_s -> PrVP_np_s ;
|
||||
UseV_np_a : Ant -> Tense -> Pol -> PrV_np_a -> PrVP_np_a ;
|
||||
UseV_np_q : Ant -> Tense -> Pol -> PrV_np_q -> PrVP_np_q ;
|
||||
UseV_np_n : Ant -> Tense -> Pol -> PrV_np_n -> PrVP_np_n ;
|
||||
|
||||
--< PassUseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV (aNP a) -> PrVP a ;
|
||||
PassUseV_none : Ant -> Tense -> Pol -> PrV_np -> PrVP_none ;
|
||||
PassUseV_np : Ant -> Tense -> Pol -> PrV_np_np -> PrVP_np ;
|
||||
PassUseV_v : Ant -> Tense -> Pol -> PrV_np_v -> PrVP_v ;
|
||||
PassUseV_s : Ant -> Tense -> Pol -> PrV_np_s -> PrVP_s ;
|
||||
PassUseV_a : Ant -> Tense -> Pol -> PrV_np_a -> PrVP_a ;
|
||||
PassUseV_q : Ant -> Tense -> Pol -> PrV_np_q -> PrVP_q ;
|
||||
PassUseV_n : Ant -> Tense -> Pol -> PrV_np_n -> PrVP_n ;
|
||||
|
||||
--< AgentPassUseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV (aNP a) -> NP -> PrVP a ;
|
||||
AgentPassUseV_none : Ant -> Tense -> Pol -> PrV_np -> NP -> PrVP_none ;
|
||||
AgentPassUseV_np : Ant -> Tense -> Pol -> PrV_np_np -> NP -> PrVP_np ;
|
||||
AgentPassUseV_v : Ant -> Tense -> Pol -> PrV_np_v -> NP -> PrVP_v ;
|
||||
AgentPassUseV_s : Ant -> Tense -> Pol -> PrV_np_s -> NP -> PrVP_s ;
|
||||
AgentPassUseV_a : Ant -> Tense -> Pol -> PrV_np_a -> NP -> PrVP_a ;
|
||||
AgentPassUseV_q : Ant -> Tense -> Pol -> PrV_np_q -> NP -> PrVP_q ;
|
||||
AgentPassUseV_n : Ant -> Tense -> Pol -> PrV_np_n -> NP -> PrVP_n ;
|
||||
|
||||
--< ComplV2 : (a : Arg) -> PrVP (aNP a) -> NP -> PrVP a ; -- she loves him
|
||||
ComplV2_none : PrVP_np -> NP -> PrVP_none ;
|
||||
|
||||
--< ComplVS : (a : Arg) -> PrVP aS -> PrCl a -> PrVP a ; -- she says that I am here
|
||||
ComplVS_none : PrVP_s -> PrCl_none -> PrVP_none ;
|
||||
ComplVS_np : PrVP_s -> PrCl_np -> PrVP_np ;
|
||||
|
||||
--< ComplVV : (a : Arg) -> PrVP aV -> PrVPI a -> PrVP a ; -- she wants to sleep
|
||||
ComplVV_none : PrVP_v -> PrVPI_none -> PrVP_none ;
|
||||
ComplVV_np : PrVP_v -> PrVPI_np -> PrVP_np ;
|
||||
|
||||
--< ComplVQ : (a : Arg) -> PrVP aQ -> PrQCl a -> PrVP a ; -- she wonders who is here
|
||||
ComplVQ_none : PrVP_q -> PrQCl_none -> PrVP_none ;
|
||||
|
||||
--< ComplVA : (a : Arg) -> PrVP aA -> PrAP a -> PrVP a ; -- she becomes old
|
||||
ComplVA_none : PrVP_a -> PrAP_none -> PrVP_none ;
|
||||
|
||||
--< ComplVN : (a : Arg) -> PrVP aN -> PrCN a -> PrVP a ; -- she becomes a professor
|
||||
ComplVN_none : PrVP_n -> PrCN_none -> PrVP_none ;
|
||||
|
||||
--< SlashV3 : (a : Arg) -> PrVP (aNP (aNP a)) -> NP -> PrVP (aNP a) ; -- she shows X to him
|
||||
SlashV3_none : PrVP_np_np -> NP -> PrVP_np ;
|
||||
|
||||
--< SlashV2S : (a : Arg) -> PrVP (aNP aS) -> PrCl a -> PrVP (aNP a) ; -- she tells X that I am here
|
||||
SlashV2S_none : PrVP_np_s -> PrCl_none -> PrVP_np ;
|
||||
|
||||
--< SlashV2V : (a : Arg) -> PrVP (aNP aV) -> PrVPI a -> PrVP (aNP a) ; -- she forces X to sleep
|
||||
SlashV2V_none : PrVP_np_v -> PrVPI_none -> PrVP_np ;
|
||||
SlashV2V_np : PrVP_np_v -> PrVPI_np -> PrVP_np_np ;
|
||||
|
||||
--< SlashV2A : (a : Arg) -> PrVP (aNP aA) -> PrAP a -> PrVP (aNP a) ; -- she makes X crazy
|
||||
SlashV2A_none : PrVP_np_a -> PrAP_none -> PrVP_np ;
|
||||
|
||||
--< SlashV2N : (a : Arg) -> PrVP (aNP aN) -> PrCN a -> PrVP (aNP a) ; -- she makes X a professor
|
||||
SlashV2N_none : PrVP_np_n -> PrCN_none -> PrVP_np ;
|
||||
|
||||
--< SlashV2Q : (a : Arg) -> PrVP (aNP aA) -> PrQCl a -> PrVP (aNP a) ; -- she asks X who is here
|
||||
SlashV2Q_none : PrVP_np_q -> PrQCl_none -> PrVP_np ;
|
||||
|
||||
--< UseAP : (a : Arg) -> Ant -> Tense -> Pol -> PrAP a -> PrVP a ; -- she is married to X
|
||||
UseAP_none : Ant -> Tense -> Pol -> PrAP_none -> PrVP_none ;
|
||||
UseAP_np : Ant -> Tense -> Pol -> PrAP_np -> PrVP_np ;
|
||||
|
||||
--< UseAdv : (a : Arg) -> Ant -> Tense -> Pol -> PrAdv a -> PrVP a ; -- she is in X
|
||||
UseAdv_none : Ant -> Tense -> Pol -> PrAdv_none -> PrVP_none ;
|
||||
UseAdv_np : Ant -> Tense -> Pol -> PrAdv_np -> PrVP_np ;
|
||||
|
||||
--< UseCN : (a : Arg) -> Ant -> Tense -> Pol -> PrCN a -> PrVP a ; -- she is a member of X
|
||||
UseCN_none : Ant -> Tense -> Pol -> PrCN_none -> PrVP_none ;
|
||||
UseCN_np : Ant -> Tense -> Pol -> PrCN_np -> PrVP_np ;
|
||||
|
||||
-- the following are only for aNone
|
||||
UseNP_none : Ant -> Tense -> Pol -> NP -> PrVP_none ;
|
||||
UseS_none : Ant -> Tense -> Pol -> PrCl_none -> PrVP_none ; -- the fact is that she sleeps
|
||||
UseQ_none : Ant -> Tense -> Pol -> PrQCl_none -> PrVP_none ; -- the question is who sleeps
|
||||
UseVP_none : Ant -> Tense -> Pol -> PrVPI_none -> PrVP_none ; -- the goal is to sleep
|
||||
|
||||
--< InfVP : (a : Arg) -> PrVP a -> PrVPI a ;
|
||||
InfVP_none : PrVP_none -> PrVPI_none ;
|
||||
InfVP_np : PrVP_np -> PrVPI_np ;
|
||||
|
||||
--< PredVP : (a : Arg) -> NP -> PrVP a -> PrCl a ;
|
||||
PredVP_none : NP -> PrVP_none -> PrCl_none ;
|
||||
PredVP_np : NP -> PrVP_np -> PrCl_np ;
|
||||
|
||||
--< SlashClNP : (a : Arg) -> PrCl (aNP a) -> NP -> PrCl a ; -- slash consumption: hon tittar på + oss
|
||||
SlashClNP_none : PrCl_np -> NP -> PrCl_none ;
|
||||
|
||||
--< ReflVP : (a : Arg) -> PrVP (aNP a) -> PrVP a ; -- refl on first position (direct object)
|
||||
ReflVP_none : PrVP_np -> PrVP_none ;
|
||||
ReflVP_np : PrVP_np_np -> PrVP_np ;
|
||||
ReflVP_v : PrVP_np_v -> PrVP_v ;
|
||||
ReflVP_s : PrVP_np_s -> PrVP_s ;
|
||||
ReflVP_q : PrVP_np_q -> PrVP_q ;
|
||||
ReflVP_a : PrVP_np_a -> PrVP_a ;
|
||||
ReflVP_n : PrVP_np_n -> PrVP_n ;
|
||||
|
||||
--< ReflVP2 : (a : Arg) -> PrVP (aNP (aNP a)) -> PrVP (aNP a) ; -- refl on second position (indirect object)
|
||||
ReflVP2_np : PrVP_np_np -> PrVP_np ;
|
||||
|
||||
--< QuestVP : (a : Arg) -> IP -> PrVP a -> PrQCl a ;
|
||||
QuestVP_none : IP -> PrVP_none -> PrQCl_none ;
|
||||
|
||||
--< QuestSlash : (a : Arg) -> IP -> PrQCl (aNP a) -> PrQCl a ;
|
||||
QuestSlash_none : IP -> PrQCl_np -> PrQCl_none ;
|
||||
|
||||
--< QuestCl : (a : Arg) -> PrCl a -> PrQCl a ;
|
||||
QuestCl_none : PrCl_none -> PrQCl_none ;
|
||||
QuestCl_np : PrCl_np -> PrQCl_np ;
|
||||
|
||||
--< QuestIAdv : (a : Arg) -> IAdv -> PrCl a -> PrQCl a ;
|
||||
QuestIAdv_none : IAdv -> PrCl_none -> PrQCl_none ;
|
||||
|
||||
QuestIComp_none : Ant -> Tense -> Pol -> IComp -> NP -> PrQCl_none ; -- where is she
|
||||
|
||||
|
||||
--< UseCl : PrCl aNone -> PrS ;
|
||||
UseCl_none : PrCl_none -> PrS ;
|
||||
|
||||
--< UseQCl : PrQCl aNone -> PrS ;
|
||||
UseQCl_none : PrQCl_none -> PrS ;
|
||||
|
||||
--< UseAdvCl : PrAdv aNone -> PrCl aNone -> PrS ; -- lift adv to front
|
||||
UseAdvCl_none : PrAdv_none -> PrCl_none -> PrS ;
|
||||
|
||||
UttPrS : PrS -> Utt ;
|
||||
|
||||
--< AdvCl : (a : Arg) -> PrAdv a -> PrCl aNone -> PrCl a ;
|
||||
AdvCl_none : PrAdv_none -> PrCl_none -> PrCl_none ;
|
||||
AdvCl_np : PrAdv_np -> PrCl_none -> PrCl_np ;
|
||||
|
||||
--< AdvQCl : (a : Arg) -> PrAdv a -> PrQCl aNone -> PrQCl a ;
|
||||
AdvQCl_none : PrAdv_none -> PrQCl_none -> PrQCl_none ;
|
||||
AdvQCl_np : PrAdv_np -> PrQCl_none -> PrQCl_np ;
|
||||
|
||||
-- relatives: just one of each
|
||||
RelCl_none : PrCl_none -> RS ;
|
||||
RelVP_none : RP -> PrVP_none -> RS ;
|
||||
RelSlash_none : RP -> PrCl_np -> RS ;
|
||||
|
||||
-- imperatives: just one of each
|
||||
|
||||
PrImpSg : PrVP_none -> Utt ;
|
||||
PrImpPl : PrVP_none -> Utt ;
|
||||
|
||||
-- participles as adjectives
|
||||
|
||||
--< PresPartAP : (a : Arg) -> PrV a -> PrAP a ;
|
||||
PresPartAP_none : PrV_none -> PrAP_none ;
|
||||
PresPartAP_np : PrV_np -> PrAP_np ;
|
||||
|
||||
--< PastPartAP : (a : Arg) -> PrV (aNP a) -> PrAP a ;
|
||||
PastPartAP_none : PrV_np -> PrAP_none ;
|
||||
|
||||
--< AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
||||
AgentPastPartAP_none : PrV_np -> NP -> PrAP_none ;
|
||||
|
||||
-- for aNone only
|
||||
NomVPNP_none : PrVPI_none -> NP ; -- translating a document
|
||||
|
||||
--< ByVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- by translating a document
|
||||
ByVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
--< WhenVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- when translating a document
|
||||
WhenVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
--< BeforeVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- before translating a document
|
||||
BeforeVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
--< AfterVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- after translating a document
|
||||
AfterVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
--< InOrderVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- in order to translate a document
|
||||
InOrderVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
--< WithoutVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- without translating a document
|
||||
WithoutVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||
|
||||
|
||||
-- PrVP coordination
|
||||
|
||||
--< StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
||||
StartVPC_none : Conj -> PrVP_none -> PrVP_none -> VPC_none ;
|
||||
StartVPC_np : Conj -> PrVP_np -> PrVP_np -> VPC_np ;
|
||||
---- ...
|
||||
|
||||
--< ContVPC : (a : Arg) -> PrVP a -> VPC a -> VPC a ;
|
||||
ContVPC_none : PrVP_none -> VPC_none -> VPC_none ;
|
||||
ContVPC_np : PrVP_np -> VPC_np -> VPC_np ;
|
||||
---- ...
|
||||
|
||||
--< UseVPC : (a : Arg) -> VPC a -> PrVP a ;
|
||||
UseVPC_none : VPC_none -> PrVP_none ;
|
||||
UseVPC_np : VPC_np -> PrVP_np ;
|
||||
|
||||
-- clause coordination, including "she loves and we look at (her)"
|
||||
|
||||
--< StartClC : (a : Arg) -> Conj -> PrCl a -> PrCl a -> ClC a ;
|
||||
StartClC_none : Conj -> PrCl_none -> PrCl_none -> ClC_none ;
|
||||
StartClC_np : Conj -> PrCl_np -> PrCl_np -> ClC_np ;
|
||||
|
||||
--< ContClC : (a : Arg) -> PrCl a -> ClC a -> ClC a ;
|
||||
ContClC_none : PrCl_none -> ClC_none -> ClC_none ;
|
||||
ContClC_np : PrCl_np -> ClC_np -> ClC_np ;
|
||||
|
||||
--< UseClC : (a : Arg) -> ClC a -> PrCl a ;
|
||||
UseClC_none : ClC_none -> PrCl_none ;
|
||||
UseClC_np : ClC_np -> PrCl_np ;
|
||||
|
||||
--< ComplAdv : (a : Arg) -> PrAdv (aNP a) -> NP -> PrAdv a ; -- typically: formation of preposition phrase
|
||||
ComplAdv_none : PrAdv_np -> NP -> PrAdv_none ;
|
||||
|
||||
--< SubjUttPreS : Subj -> PrCl aNone -> PrCl aNone -> Utt ;
|
||||
SubjUttPreS : Subj -> PrCl_none -> PrCl_none -> Utt ;
|
||||
--< SubjUttPreQ : Subj -> PrCl aNone -> PrQCl aNone -> Utt ;
|
||||
SubjUttPreQ : Subj -> PrCl_none -> PrQCl_none -> Utt ;
|
||||
--< SubjUttPost : Subj -> PrCl aNone -> Utt -> Utt ;
|
||||
SubjUttPost : Subj -> PrCl_none -> Utt -> Utt ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
concrete NDPredChi of NDPred =
|
||||
CatChi [NP,Utt,IP,IAdv,IComp,Conj,RS,RP,Subj] **
|
||||
NDPredFunctor
|
||||
with
|
||||
(PredInterface = PredInstanceChi),
|
||||
(Pred = PredChi) ** open PredChi in {
|
||||
|
||||
lincat Ant = PredChi.Ant ;
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDPredEng of NDPred =
|
||||
CatEng [Ant,NP,Utt,IP,IAdv,IComp,Conj,RS,RP,Subj] **
|
||||
NDPredFunctor with
|
||||
(PredInterface = PredInstanceEng),
|
||||
(Pred = PredEng) ;
|
||||
@@ -1,6 +0,0 @@
|
||||
concrete NDPredFin of NDPred =
|
||||
CatFin [Ant,NP,Utt,IP,IAdv,IComp,Conj,Subj,RS,RP] **
|
||||
NDPredFunctor
|
||||
with
|
||||
(PredInterface = PredInstanceFin),
|
||||
(Pred = PredFin) ;
|
||||
@@ -1,226 +0,0 @@
|
||||
incomplete concrete NDPredFunctor of NDPred =
|
||||
Cat [Ant,NP,Utt,IP,IAdv,Conj,RS,RP,Subj] **
|
||||
open
|
||||
PredInterface,
|
||||
Pred,
|
||||
ParamX,
|
||||
Prelude
|
||||
in {
|
||||
|
||||
------------------------------------
|
||||
-- lincats
|
||||
-------------------------------------
|
||||
|
||||
lincat
|
||||
Tense = Pred.Tense ;
|
||||
Pol = Pred.Pol ;
|
||||
|
||||
PrV_none, PrV_np, PrV_v, PrV_s, PrV_q, PrV_a, PrV_n,
|
||||
PrV_np_np, PrV_np_v, PrV_np_s, PrV_np_q, PrV_np_a, PrV_np_n = Pred.PrV ;
|
||||
|
||||
PrVP_none, PrVP_np, PrVP_v, PrVP_s, PrVP_q, PrVP_a, PrVP_n,
|
||||
PrVP_np_np, PrVP_np_v, PrVP_np_s, PrVP_np_q, PrVP_np_a, PrVP_np_n = Pred.PrVP ;
|
||||
|
||||
PrVPI_none, PrVPI_np = Pred.PrVPI ;
|
||||
|
||||
PrCl_none, PrCl_np = Pred.PrCl ;
|
||||
|
||||
PrQCl_none, PrQCl_np = Pred.PrQCl ;
|
||||
|
||||
VPC_none, VPC_np = Pred.VPC ;
|
||||
|
||||
ClC_none, ClC_np = Pred.ClC ;
|
||||
|
||||
PrAdv_none, PrAdv_np = Pred.PrAdv ;
|
||||
|
||||
PrS = Pred.PrS ;
|
||||
|
||||
PrAP_none, PrAP_np = Pred.PrAP ;
|
||||
|
||||
PrCN_none, PrCN_np = Pred.PrCN ;
|
||||
|
||||
-- reference linearizations for chunking
|
||||
---- should be by functor as well
|
||||
|
||||
linref
|
||||
PrVP_none, PrVP_np, PrVP_v, PrVP_s, PrVP_q, PrVP_a, PrVP_n,
|
||||
PrVP_np_np, PrVP_np_v, PrVP_np_s, PrVP_np_q, PrVP_np_a, PrVP_np_n
|
||||
= linrefPrVP ;
|
||||
PrCl_none, PrCl_np = linrefPrCl ;
|
||||
PrQCl_none, PrQCl_np = linrefPrQCl ;
|
||||
PrAdv_none, PrAdv_np = linrefPrAdv ;
|
||||
---- PrAP_none, PrAP_np = \ap -> ap.s ! defaultAgr ++ ap.obj1 ! defaultAgr ;
|
||||
---- PrCN_none, PrCN_np = \cn -> cn.s ! Sg ++ cn.obj1 ! defaultAgr ;
|
||||
|
||||
----------------------------
|
||||
--- linearization rules ----
|
||||
----------------------------
|
||||
|
||||
lin
|
||||
|
||||
-- standard general
|
||||
|
||||
TPres = Pred.TPres ;
|
||||
TPast = Pred.TPast ;
|
||||
TFut = Pred.TFut ;
|
||||
TCond = Pred.TCond ;
|
||||
ASimul = Pred.ASimul ;
|
||||
AAnter = Pred.AAnter ;
|
||||
PPos = Pred.PPos ;
|
||||
PNeg = Pred.PNeg ;
|
||||
|
||||
UseV_none, UseV_np, UseV_v, UseV_s, UseV_q, UseV_a, UseV_n, UseV_np_np, UseV_np_v, UseV_np_s, UseV_np_q, UseV_np_a, UseV_np_n
|
||||
= Pred.UseV Pred.aNone ;
|
||||
PassUseV_none, PassUseV_np, PassUseV_v, PassUseV_s, PassUseV_q, PassUseV_a, PassUseV_n
|
||||
= Pred.PassUseV Pred.aNone ;
|
||||
AgentPassUseV_none, AgentPassUseV_np, AgentPassUseV_v, AgentPassUseV_s, AgentPassUseV_q, AgentPassUseV_a, AgentPassUseV_n
|
||||
= Pred.AgentPassUseV Pred.aNone ;
|
||||
|
||||
UseAP_none, UseAP_np
|
||||
= Pred.UseAP Pred.aNone ;
|
||||
UseCN_none, UseCN_np
|
||||
= Pred.UseCN Pred.aNone ;
|
||||
UseAdv_none, UseAdv_np
|
||||
= Pred.UseAdv Pred.aNone ;
|
||||
UseNP_none
|
||||
= Pred.UseNP ;
|
||||
UseS_none
|
||||
= Pred.UseS ;
|
||||
UseQ_none
|
||||
= Pred.UseQ ;
|
||||
UseVP_none
|
||||
= Pred.UseVP ;
|
||||
|
||||
ComplV2_none
|
||||
= Pred.ComplV2 Pred.aNone ;
|
||||
ComplVV_none, ComplVV_np
|
||||
= Pred.ComplVV Pred.aNone ;
|
||||
ComplVS_none, ComplVS_np
|
||||
= Pred.ComplVS Pred.aNone ;
|
||||
ComplVA_none
|
||||
= Pred.ComplVA Pred.aNone ;
|
||||
ComplVQ_none
|
||||
= Pred.ComplVQ Pred.aNone ;
|
||||
ComplVN_none
|
||||
= Pred.ComplVN Pred.aNone ;
|
||||
|
||||
SlashV3_none
|
||||
= Pred.SlashV3 Pred.aNone ;
|
||||
SlashV2V_none, SlashV2V_np
|
||||
= Pred.SlashV2V Pred.aNone ;
|
||||
SlashV2S_none
|
||||
= Pred.SlashV2S Pred.aNone ;
|
||||
SlashV2Q_none
|
||||
= Pred.SlashV2Q Pred.aNone ;
|
||||
SlashV2A_none
|
||||
= Pred.SlashV2A Pred.aNone ;
|
||||
SlashV2N_none
|
||||
= Pred.SlashV2N Pred.aNone ;
|
||||
|
||||
ReflVP_none, ReflVP_np, ReflVP_v, ReflVP_s, ReflVP_q, ReflVP_a, ReflVP_n
|
||||
= Pred.ReflVP Pred.aNone ;
|
||||
ReflVP2_np
|
||||
= Pred.ReflVP2 Pred.aNone ;
|
||||
|
||||
InfVP_none, InfVP_np
|
||||
= Pred.InfVP Pred.aNone ;
|
||||
|
||||
PredVP_none, PredVP_np
|
||||
= Pred.PredVP Pred.aNone ;
|
||||
|
||||
SlashClNP_none
|
||||
= Pred.SlashClNP Pred.aNone ;
|
||||
|
||||
QuestCl_none, QuestCl_np
|
||||
= Pred.QuestCl Pred.aNone ;
|
||||
|
||||
QuestIAdv_none
|
||||
= Pred.QuestIAdv Pred.aNone ;
|
||||
|
||||
QuestIComp_none
|
||||
= Pred.QuestIComp ;
|
||||
|
||||
QuestVP_none
|
||||
= Pred.QuestVP Pred.aNone ;
|
||||
|
||||
QuestSlash_none
|
||||
= Pred.QuestSlash Pred.aNone ;
|
||||
|
||||
UseCl_none
|
||||
= Pred.UseCl ;
|
||||
UseQCl_none
|
||||
= Pred.UseQCl ;
|
||||
|
||||
UseAdvCl_none
|
||||
= Pred.UseAdvCl ;
|
||||
|
||||
UttPrS
|
||||
= Pred.UttPrS ;
|
||||
|
||||
AdvCl_none, AdvCl_np
|
||||
= Pred.AdvCl Pred.aNone ;
|
||||
AdvQCl_none, AdvQCl_np
|
||||
= Pred.AdvQCl Pred.aNone ;
|
||||
|
||||
---- RelCl_none
|
||||
---- = Pred.RelCl Pred.aNone ;
|
||||
RelVP_none
|
||||
= Pred.RelVP ;
|
||||
RelSlash_none
|
||||
= Pred.RelSlash ;
|
||||
|
||||
PrImpSg
|
||||
= Pred.PrImpSg ;
|
||||
PrImpPl
|
||||
= Pred.PrImpPl ;
|
||||
|
||||
PresPartAP_none, PresPartAP_np
|
||||
= Pred.PresPartAP Pred.aNone ;
|
||||
|
||||
PastPartAP_none
|
||||
= Pred.PastPartAP Pred.aNone ;
|
||||
|
||||
AgentPastPartAP_none
|
||||
= Pred.AgentPastPartAP Pred.aNone ;
|
||||
|
||||
NomVPNP_none
|
||||
= Pred.NomVPNP ;
|
||||
|
||||
ByVP_none
|
||||
= Pred.ByVP Pred.aNone ;
|
||||
WhenVP_none
|
||||
= Pred.WhenVP Pred.aNone ;
|
||||
BeforeVP_none
|
||||
= Pred.BeforeVP Pred.aNone ;
|
||||
AfterVP_none
|
||||
= Pred.AfterVP Pred.aNone ;
|
||||
InOrderVP_none
|
||||
= Pred.InOrderVP Pred.aNone ;
|
||||
WithoutVP_none
|
||||
= Pred.WithoutVP Pred.aNone ;
|
||||
|
||||
StartVPC_none, StartVPC_np
|
||||
= Pred.StartVPC Pred.aNone ;
|
||||
ContVPC_none, ContVPC_np
|
||||
= Pred.ContVPC Pred.aNone ;
|
||||
UseVPC_none, UseVPC_np
|
||||
= Pred.UseVPC Pred.aNone ;
|
||||
|
||||
StartClC_none, StartClC_np
|
||||
= Pred.StartClC Pred.aNone ;
|
||||
ContClC_none, ContClC_np
|
||||
= Pred.ContClC Pred.aNone ;
|
||||
UseClC_none, UseClC_np
|
||||
= Pred.UseClC Pred.aNone ;
|
||||
|
||||
ComplAdv_none
|
||||
= Pred.ComplAdv Pred.aNone ;
|
||||
|
||||
SubjUttPreS
|
||||
= Pred.SubjUttPreS ;
|
||||
SubjUttPreQ
|
||||
= Pred.SubjUttPreQ ;
|
||||
SubjUttPost
|
||||
= Pred.SubjUttPost ;
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
concrete NDPredSwe of NDPred =
|
||||
CatSwe [Ant,NP,Utt,IP,IAdv,IComp,Conj,RS,RP,Subj] **
|
||||
NDPredFunctor with
|
||||
(PredInterface = PredInstanceSwe),
|
||||
(Pred = PredSwe) ;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
--# -path=.:../translator
|
||||
|
||||
abstract NDTrans =
|
||||
NDLift
|
||||
,Extensions [CN,NP,AdA,AdV,CompoundCN,AdAdV,UttAdV,ApposNP]
|
||||
,Documentation - [Pol,Tense]
|
||||
,Dictionary - [Pol,Tense]
|
||||
,Chunk
|
||||
** {
|
||||
flags
|
||||
startcat = TransUnit ;
|
||||
-- heuristic_search_factor=0.60;
|
||||
-- meta_prob=1.0e-5;
|
||||
-- meta_token_prob=1.1965149246222233e-9;
|
||||
|
||||
cat
|
||||
TransUnit ;
|
||||
|
||||
fun
|
||||
SFullstop : Phr -> TransUnit ;
|
||||
SQuestmark : Phr -> TransUnit ;
|
||||
SExclmark : Phr -> TransUnit ;
|
||||
SUnmarked : Phr -> TransUnit ;
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
--# -path=.:../translator
|
||||
|
||||
concrete NDTransChi of NDTrans =
|
||||
NDLiftChi
|
||||
,ExtensionsChi [CN,NP,AdA,AdV,CompoundCN,AdAdV,UttAdV,ApposNP]
|
||||
,DictionaryChi - [Pol,Tense,Ant]
|
||||
,DocumentationChi - [Pol,Tense,Ant]
|
||||
,ChunkChi
|
||||
** open ResChi, PredInstanceChi, (Pr=PredChi), Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
lincat
|
||||
TransUnit = {s : Str} ;
|
||||
|
||||
lin
|
||||
SFullstop p = {s = p.s ++ fullstop_s} ;
|
||||
SQuestmark p = {s = p.s ++ questmark_s} ;
|
||||
SExclmark p = {s = p.s ++ exclmark_s} ;
|
||||
SUnmarked p = {s = p.s} ;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--# -path=.:../translator
|
||||
|
||||
concrete NDTransEng of NDTrans =
|
||||
NDLiftEng
|
||||
,ExtensionsEng [CN,NP,AdA,AdV,CompoundCN,AdAdV,UttAdV,ApposNP]
|
||||
,DictionaryEng - [Pol,Tense]
|
||||
,DocumentationEng - [Pol,Tense]
|
||||
,ChunkEng
|
||||
** open ResEng, PredInstanceEng, Prelude, (Pr = PredEng) in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
lincat
|
||||
TransUnit = {s : Str} ;
|
||||
|
||||
lin
|
||||
SFullstop p = {s = p.s ++ "."} ;
|
||||
SQuestmark p = {s = p.s ++ "?"} ;
|
||||
SExclmark p = {s = p.s ++ "!"} ;
|
||||
SUnmarked p = {s = p.s} ;
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
--# -path=.:../finnish/stemmed:../finnish:../api:../translator:alltenses
|
||||
|
||||
concrete NDTransFin of NDTrans =
|
||||
NDLiftFin
|
||||
,ExtensionsFin [CN,NP,AdA,AdV,CompoundCN,AdAdV,UttAdV,ApposNP]
|
||||
,DictionaryFin - [Pol,Tense]
|
||||
,ChunkFin
|
||||
,DocumentationFin - [Pol,Tense]
|
||||
|
||||
** {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
lincat
|
||||
TransUnit = {s : Str} ;
|
||||
|
||||
lin
|
||||
SFullstop p = {s = p.s ++ "."} ;
|
||||
SQuestmark p = {s = p.s ++ "?"} ;
|
||||
SExclmark p = {s = p.s ++ "!"} ;
|
||||
SUnmarked p = {s = p.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
--# -path=.:../translator
|
||||
|
||||
concrete NDTransSwe of NDTrans =
|
||||
NDLiftSwe
|
||||
,ExtensionsSwe [CN,NP,AdA,AdV,CompoundCN,AdAdV,UttAdV,ApposNP]
|
||||
,DictionarySwe - [Pol,Tense]
|
||||
,DocumentationSwe - [Pol,Tense]
|
||||
,ChunkSwe
|
||||
** open CommonScand, ResSwe, PredInstanceSwe, (Pr=PredSwe), Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
lincat
|
||||
TransUnit = {s : Str} ;
|
||||
|
||||
lin
|
||||
SFullstop p = {s = p.s ++ "."} ;
|
||||
SQuestmark p = {s = p.s ++ "?"} ;
|
||||
SExclmark p = {s = p.s ++ "!"} ;
|
||||
SUnmarked p = {s = p.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
abstract Pred = Cat [Ant,NP,Utt,IP,IAdv,Conj,RS,RP,Subj] ** {
|
||||
|
||||
cat
|
||||
Arg ;
|
||||
PrV Arg ;
|
||||
PrVP Arg ;
|
||||
PrVPI Arg ;
|
||||
VPC Arg ; -- conjunction of VP
|
||||
Tense ;
|
||||
Pol ;
|
||||
PrCl Arg ;
|
||||
ClC Arg ; -- conjunction of Cl
|
||||
PrQCl Arg ;
|
||||
PrAdv Arg ;
|
||||
PrS ;
|
||||
PrAP Arg ;
|
||||
PrCN Arg ; -- the country he became the president of
|
||||
|
||||
fun
|
||||
aNone, aS, aV, aQ, aA, aN : Arg ;
|
||||
aNP : Arg -> Arg ;
|
||||
TPres, TPast, TFut, TCond : Tense ;
|
||||
PPos, PNeg : Pol ;
|
||||
ASimul, AAnter : Ant ;
|
||||
|
||||
UseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV a -> PrVP a ;
|
||||
PassUseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV (aNP a) -> PrVP a ;
|
||||
AgentPassUseV : (a : Arg) -> Ant -> Tense -> Pol -> PrV (aNP a) -> NP -> PrVP a ;
|
||||
|
||||
ComplV2 : (a : Arg) -> PrVP (aNP a) -> NP -> PrVP a ; -- she loves him
|
||||
ComplVS : (a : Arg) -> PrVP aS -> PrCl a -> PrVP a ; -- she says that I am here
|
||||
ComplVV : (a : Arg) -> PrVP aV -> PrVPI a -> PrVP a ; -- she wants to sleep
|
||||
ComplVQ : (a : Arg) -> PrVP aQ -> PrQCl a -> PrVP a ; -- she wonders who is here
|
||||
ComplVA : (a : Arg) -> PrVP aA -> PrAP a -> PrVP a ; -- she becomes old
|
||||
ComplVN : (a : Arg) -> PrVP aN -> PrCN a -> PrVP a ; -- she becomes a professor
|
||||
SlashV3 : (a : Arg) -> PrVP (aNP (aNP a)) -> NP -> PrVP (aNP a) ; -- she shows X to him
|
||||
SlashV2S : (a : Arg) -> PrVP (aNP aS) -> PrCl a -> PrVP (aNP a) ; -- she tells X that I am here
|
||||
SlashV2V : (a : Arg) -> PrVP (aNP aV) -> PrVPI a -> PrVP (aNP a) ; -- she forces X to sleep
|
||||
SlashV2A : (a : Arg) -> PrVP (aNP aA) -> PrAP a -> PrVP (aNP a) ; -- she makes X crazy
|
||||
SlashV2N : (a : Arg) -> PrVP (aNP aN) -> PrCN a -> PrVP (aNP a) ; -- she makes X a professor
|
||||
SlashV2Q : (a : Arg) -> PrVP (aNP aA) -> PrQCl a -> PrVP (aNP a) ; -- she asks X who is here
|
||||
|
||||
InfVP : (a : Arg) -> PrVP a -> PrVPI a ; -- to love X
|
||||
|
||||
UseAP : (a : Arg) -> Ant -> Tense -> Pol -> PrAP a -> PrVP a ; -- she is married to X
|
||||
UseAdv : (a : Arg) -> Ant -> Tense -> Pol -> PrAdv a -> PrVP a ; -- she is in X
|
||||
UseCN : (a : Arg) -> Ant -> Tense -> Pol -> PrCN a -> PrVP a ; -- she is a member of X
|
||||
UseNP : Ant -> Tense -> Pol -> NP -> PrVP aNone ; -- she is the person
|
||||
UseS : Ant -> Tense -> Pol -> PrCl aNone -> PrVP aNone ; -- the fact is that she sleeps
|
||||
UseQ : Ant -> Tense -> Pol -> PrQCl aNone -> PrVP aNone ; -- the question is who sleeps
|
||||
UseVP : Ant -> Tense -> Pol -> PrVPI aNone -> PrVP aNone ; -- the goal is to sleep
|
||||
|
||||
PredVP : (a : Arg) -> NP -> PrVP a -> PrCl a ;
|
||||
|
||||
SlashClNP : (a : Arg) -> PrCl (aNP a) -> NP -> PrCl a ; -- slash consumption: hon tittar på + oss
|
||||
|
||||
ReflVP : (a : Arg) -> PrVP (aNP a) -> PrVP a ; -- refl on first position (direct object)
|
||||
ReflVP2 : (a : Arg) -> PrVP (aNP (aNP a)) -> PrVP (aNP a) ; -- refl on second position (indirect object)
|
||||
|
||||
QuestVP : (a : Arg) -> IP -> PrVP a -> PrQCl a ;
|
||||
QuestSlash : (a : Arg) -> IP -> PrQCl (aNP a) -> PrQCl a ;
|
||||
QuestCl : (a : Arg) -> PrCl a -> PrQCl a ;
|
||||
QuestIAdv : (a : Arg) -> IAdv -> PrCl a -> PrQCl a ;
|
||||
QuestIComp : Ant -> Tense -> Pol -> IComp -> NP -> PrQCl aNone ; -- where is she
|
||||
|
||||
UseCl : PrCl aNone -> PrS ;
|
||||
UseQCl : PrQCl aNone -> PrS ; -- deprecate QS
|
||||
|
||||
UseAdvCl : PrAdv aNone -> PrCl aNone -> PrS ; -- lift adv to front
|
||||
|
||||
UttPrS : PrS -> Utt ;
|
||||
|
||||
AdvCl : (a : Arg) -> PrAdv a -> PrCl aNone -> PrCl a ;
|
||||
|
||||
AdvQCl : (a : Arg) -> PrAdv a -> PrQCl aNone -> PrQCl a ;
|
||||
|
||||
-- relatives
|
||||
RelCl : PrCl aNone -> RS ;
|
||||
RelVP : RP -> PrVP aNone -> RS ;
|
||||
RelSlash : RP -> PrCl (aNP aNone) -> RS ;
|
||||
|
||||
-- imperatives
|
||||
|
||||
PrImpSg : PrVP aNone -> Utt ;
|
||||
PrImpPl : PrVP aNone -> Utt ;
|
||||
|
||||
-- participles as adjectives
|
||||
|
||||
PresPartAP : (a : Arg) -> PrV a -> PrAP a ;
|
||||
PastPartAP : (a : Arg) -> PrV (aNP a) -> PrAP a ;
|
||||
AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
||||
|
||||
-- nominalization
|
||||
NomVPNP : PrVPI aNone -> NP ; -- translating a document
|
||||
|
||||
-- other uses of VP's
|
||||
ByVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- by translating a document
|
||||
WhenVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- when translating a document
|
||||
BeforeVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- before translating a document
|
||||
AfterVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- after translating a document
|
||||
InOrderVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- in order to translate a document
|
||||
WithoutVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- without translating a document
|
||||
|
||||
-- PrVP coordination
|
||||
|
||||
StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
||||
ContVPC : (a : Arg) -> PrVP a -> VPC a -> VPC a ;
|
||||
UseVPC : (a : Arg) -> VPC a -> PrVP a ;
|
||||
|
||||
-- clause coordination, including "she loves and we look at (her)"
|
||||
StartClC : (a : Arg) -> Conj -> PrCl a -> PrCl a -> ClC a ;
|
||||
ContClC : (a : Arg) -> PrCl a -> ClC a -> ClC a ;
|
||||
UseClC : (a : Arg) -> ClC a -> PrCl a ;
|
||||
|
||||
ComplAdv : (a : Arg) -> PrAdv (aNP a) -> NP -> PrAdv a ; -- typically: formation of preposition phrase
|
||||
|
||||
-- subjunction ; we want to preserve the order in translation
|
||||
-- Pre is more specialized to make inverted S order
|
||||
---- Imp to do
|
||||
|
||||
SubjUttPreS : Subj -> PrCl aNone -> PrCl aNone -> Utt ;
|
||||
SubjUttPreQ : Subj -> PrCl aNone -> PrQCl aNone -> Utt ;
|
||||
SubjUttPost : Subj -> PrCl aNone -> Utt -> Utt ;
|
||||
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
concrete PredChi of Pred =
|
||||
CatChi [NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Imp,Subj] **
|
||||
PredFunctor - [UseNP,ComplV2,SlashV3,ContVPC, StartVPC, StartClC,
|
||||
RelVP, RelSlash, QuestVP, QuestSlash, QuestIComp,PredVP,
|
||||
SubjUttPreS, SubjUttPreQ, SubjUttPost,
|
||||
UseAdv, ComplAdv, UseAdvCl, AdvQCl, AdvCl
|
||||
]
|
||||
with
|
||||
(PredInterface = PredInstanceChi) ** open ResChi, (P = ParadigmsChi), TenseX in {
|
||||
|
||||
lincat
|
||||
Ant = {s : Str ; a : PredInstanceChi.Anteriority} ;
|
||||
|
||||
lin
|
||||
UseNP a t p np = useCopula a t p ** {
|
||||
adj = \\a => np.s
|
||||
} ;
|
||||
|
||||
UseAdv x a t p adv =
|
||||
let verb = case adv.advType of {
|
||||
ATPlace True => liftV noVerb ;
|
||||
_ => liftV zai_V
|
||||
}
|
||||
in initPrVerbPhraseV a t p verb ** {
|
||||
adv = adv.prepPre ++ adv.prepPost ;
|
||||
} ;
|
||||
|
||||
ComplAdv x p np = {prepPre = appComplCase p np ; prepPost = [] ; advType = p.advType} ;
|
||||
|
||||
UseAdvCl adv cl = {s = adv.prepPre ++ adv.prepPost ++ declInvCl cl} ;
|
||||
|
||||
AdvCl, AdvQCl = \x,adv,cl ->
|
||||
let advs = adv.prepPre ++ adv.prepPost in
|
||||
case adv.advType of {
|
||||
ATManner => cl ** {obj1 = deVAdv_s ++ advs ++ cl.obj1} ; -- he sleeps *well*
|
||||
ATPlace True => cl ** {adv = cl.adv ++ advs} ; -- he today *in the house* sleeps
|
||||
ATPlace False => cl ** {adv = cl.adv ++ zai_V.s ++ advs} ; -- he today *here* sleeps
|
||||
ATTime | _ => cl ** {adv = advs ++ cl.adv} -- he *today* here sleeps ---- also: **today** he here sleeps
|
||||
} ;
|
||||
|
||||
ComplV2 x vp np = vp ** {
|
||||
obj1 : (Agr => Str) * Agr = <\\a => appObjCase np, UUnit>
|
||||
} ;
|
||||
|
||||
SlashV3 x vp np = addObj2VP vp (\\a => np.s) ;
|
||||
|
||||
RelVP rp vp =
|
||||
let
|
||||
rpa = UUnit ;
|
||||
cl : PrClause = vp ** {
|
||||
v = applyVerb vp (agr2vagr rpa) ;
|
||||
subj = rp.s ;
|
||||
adj = vp.adj ! rpa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => rpa ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
}
|
||||
in {s = declCl cl ; c = subjCase} ;
|
||||
|
||||
RelSlash rp cl = {
|
||||
s = rp.s ++ declCl cl ; ---- rp case
|
||||
c = objCase
|
||||
} ;
|
||||
|
||||
PredVP x np vp =
|
||||
let npa = UUnit in
|
||||
vp ** {
|
||||
v = applyVerb vp (agr2vagr npa) ;
|
||||
subj = appSubjCase np ;
|
||||
adj = vp.adj ! npa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! npa ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! npa ;
|
||||
c3 = vp.c1 ; -- in case there is any free slot left ---- could be c2
|
||||
} ;
|
||||
|
||||
StartVPC x c v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.p1 ++ v.adV ++ vv.p2 ++ vv.p3 ++ v.adj ! vpa ++
|
||||
appPrep v.c1 (v.obj1.p1 ! vpa) ++ appPrep v.c2 (v.obj2.p1 ! vpa) ++ v.adv ++ v.ext
|
||||
++ (c.s ! CPhr CVPhrase).s2 ++
|
||||
wv.p1 ++ w.adV ++ wv.p2 ++ wv.p3 ++ w.adj ! vpa ++ ---- appComplCase
|
||||
appPrep w.c1 (w.obj1.p1 ! vpa) ++ appPrep w.c2 (w.obj2.p1 ! vpa) ++ w.adv ++ w.ext ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ (c.s ! CPhr CVPhrase).s2 ++ infVP vt a w ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ (c.s ! CPhr CVPhrase).s2 ++ impVP i w ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = (c.s ! CPhr CVPhrase).s1 ;
|
||||
} ;
|
||||
|
||||
ContVPC x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.p1 ++ v.adV ++ vv.p2 ++ vv.p3 ++ v.adj ! vpa ++
|
||||
appPrep v.c1 (v.obj1.p1 ! vpa) ++ appPrep v.c2 (v.obj2.p1 ! vpa) ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ "," ++
|
||||
wv ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ "," ++ w.inf ! a ! vt ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ "," ++ w.imp ! i ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = w.s1 ;
|
||||
} ;
|
||||
|
||||
StartClC x c a b = {
|
||||
s = declCl a ++ (c.s ! CSent).s2 ++ declCl b ;
|
||||
c3 = b.c3 ; ----
|
||||
s1 = (c.s ! CSent).s1 ;
|
||||
} ;
|
||||
|
||||
QuestVP x ip vp =
|
||||
let
|
||||
ipa = ipagr2agr UUnit
|
||||
in {
|
||||
v = applyVerb vp UUnit ;
|
||||
foc = ip.s ;
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
adj = vp.adj ! ipa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! ipa ; ---- appComplCase
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ipa ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
adv = vp.adv ;
|
||||
adV = vp.adV ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
QuestSlash x ip cl =
|
||||
let
|
||||
prep = cl.c3 ;
|
||||
ips = ip.s ; -- in Cl/NP, c3 is the only prep ---- appComplCase for ip
|
||||
focobj = case cl.focType of {
|
||||
NoFoc => <ips, [], FocObj,prep> ; -- put ip object to focus if there is no focus yet
|
||||
t => <[], strComplCase prep ++ ips, t,noComplCase> -- put ip object in situ if there already is a focus
|
||||
} ;
|
||||
in
|
||||
cl ** { -- preposition stranding
|
||||
foc = focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = focobj.p4 ;
|
||||
} ;
|
||||
|
||||
QuestIComp a t p icomp np =
|
||||
let vagr = UUnit in
|
||||
initPrClause ** {
|
||||
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
subj = appSubjCase np ;
|
||||
adV = negAdV p ;
|
||||
foc = icomp.s ;
|
||||
focType = FocObj ;
|
||||
} ;
|
||||
|
||||
NomVPNP vp = ss (vp.s ! UUnit ! UUnit) ;----
|
||||
|
||||
|
||||
SubjUttPreS subj cl s = ss (subj.prePart ++ declSubordCl cl ++ subj.sufPart ++ declInvCl s) ;
|
||||
SubjUttPreQ subj cl q = ss (subj.prePart ++ declSubordCl cl ++ subj.sufPart ++ questCl q) ;
|
||||
SubjUttPost subj cl utt = ss (utt.s ++ subj.prePart ++ declSubordCl cl ++ subj.sufPart) ;
|
||||
|
||||
|
||||
---- todo
|
||||
|
||||
AfterVP,
|
||||
BeforeVP,
|
||||
ByVP,
|
||||
InOrderVP,
|
||||
WhenVP,
|
||||
WithoutVP
|
||||
= variants {} ;
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
concrete PredEng of Pred =
|
||||
CatEng [Ant,NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Subj] **
|
||||
PredFunctor - [
|
||||
-- for all these, special qforms added in Eng
|
||||
PassUseV,
|
||||
AgentPassUseV,
|
||||
UseVPC,
|
||||
PredVP,
|
||||
QuestVP,
|
||||
RelVP,
|
||||
|
||||
UseCN, -- insert article
|
||||
|
||||
UseCl, -- for contracted forms
|
||||
|
||||
QuestIComp ---- IComp has no parameters in Eng
|
||||
]
|
||||
with
|
||||
(PredInterface = PredInstanceEng)
|
||||
|
||||
** open PredInstanceEng, (R = ResEng) in {
|
||||
|
||||
-- overrides
|
||||
|
||||
lin
|
||||
PassUseV x a t p v = initPrVerbPhraseV a t p v ** {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
vc = \\agr => tenseVContracted (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
AgentPassUseV x a t p v np = initPrVerbPhraseV a t p v ** {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
v = \\agr => tenseVContracted (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
adv = appComplCase agentCase np ;
|
||||
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
UseCN x a t p cn = useCopula a t p ** {
|
||||
c1 = cn.c1 ;
|
||||
c2 = cn.c2 ;
|
||||
adj = \\a => case agr2nagr a of {Sg => R.artIndef ++ cn.s ! Sg ; Pl => cn.s ! Pl} ;
|
||||
obj1 = <cn.obj1, defaultAgr> ;
|
||||
} ;
|
||||
|
||||
PredVP x np vp = vp ** {
|
||||
v = applyVerb vp (agr2vagr np.a) ;
|
||||
vc = vp.vc ! (agr2vagr np.a) ;
|
||||
subj = appSubjCase np ;
|
||||
adj = vp.adj ! np.a ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = vp.c1 ; -- in case there is any free slot left ---- could be c2
|
||||
qforms = qformsVP vp (agr2vagr np.a) ;
|
||||
} ;
|
||||
|
||||
QuestVP x ip vp =
|
||||
let
|
||||
ipa = ipagr2agr ip.n
|
||||
in {
|
||||
v = applyVerb vp (ipagr2vagr ip.n) ;
|
||||
vc = vp.vc ! (ipagr2vagr ip.n) ;
|
||||
foc = ip.s ! subjCase ;
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
adj = vp.adj ! ipa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! ipa ; ---- appComplCase
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ipa ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
adv = vp.adv ;
|
||||
adV = vp.adV ;
|
||||
ext = vp.ext ;
|
||||
qforms = qformsVP vp (ipagr2vagr ip.n) ;
|
||||
} ;
|
||||
|
||||
UseCl cl = {s = declCl cl}
|
||||
| {s = declClContracted cl} ;
|
||||
|
||||
RelVP rp vp =
|
||||
let
|
||||
cl : Agr -> PrClause = \a ->
|
||||
let rpa = rpagr2agr rp.a a in
|
||||
|
||||
vp ** {
|
||||
v = applyVerb vp (agr2vagr rpa) ;
|
||||
vc = vp.vc ! (agr2vagr rpa) ;
|
||||
subj = rp.s ! subjRPCase a ;
|
||||
adj = vp.adj ! rpa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => rpa ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
qforms = qformsVP vp (agr2vagr rpa) ;
|
||||
}
|
||||
in {s = \\a => declCl (cl a) ; c = subjCase} ;
|
||||
|
||||
UseVPC x vpc = initPrVerbPhrase ** { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = \\a => <[], [], vpc.s1 ++ vpc.v ! a> ;
|
||||
inf = \\vt => vpc.inf ! defaultAgr ! vt ; ---- agr
|
||||
imp = vpc.imp ;
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
qforms = \\a => <"do", vpc.inf ! defaultAgr ! vvInfinitive> ; ---- do/does/did
|
||||
} ;
|
||||
|
||||
lin
|
||||
QuestIComp a t p icomp np =
|
||||
let vagr = (agr2vagr np.a) in
|
||||
initPrClause ** {
|
||||
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
vc = tenseCopulaC (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
subj = np.s ! subjCase ;
|
||||
foc = icomp.s ;
|
||||
focType = FocObj ;
|
||||
qforms = qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
} ;
|
||||
|
||||
-- not in functor anyway
|
||||
|
||||
NomVPNP vpi = {
|
||||
s = \\c => vpi.s ! R.VVPresPart ! defaultAgr ;
|
||||
a = defaultAgr
|
||||
} ;
|
||||
|
||||
ByVP x vp vpi = vp ** {adv = "by" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||
WhenVP x vp vpi = vp ** {adv = "when" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||
BeforeVP x vp vpi = vp ** {adv = "before" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||
AfterVP x vp vpi = vp ** {adv = "after" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||
InOrderVP x vp vpi = vp ** {adv = "in order" ++ vpi.s ! R.VVInf ! defaultAgr} ; ---- agr
|
||||
WithoutVP x vp vpi = vp ** {adv = "without" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
--# -path=.:../finnish/stemmed:../finnish:../common:alltenses
|
||||
|
||||
concrete PredFin of Pred =
|
||||
CatFin [Ant,NP,Utt,IP,IAdv,IComp,Conj,Subj,RP,RS] **
|
||||
PredFunctor
|
||||
- [
|
||||
|
||||
-- overridden
|
||||
UseV
|
||||
,UseAP
|
||||
,UseNP
|
||||
,UseCN
|
||||
,QuestVP
|
||||
,PredVP
|
||||
,ComplV2
|
||||
,ReflVP2
|
||||
,ReflVP
|
||||
,RelVP
|
||||
,RelSlash
|
||||
,QuestIComp
|
||||
,PassUseV
|
||||
,PresPartAP
|
||||
,PastPartAP
|
||||
,AgentPastPartAP
|
||||
,AgentPassUseV
|
||||
,UseVPC
|
||||
,StartVPC
|
||||
,ContVPC
|
||||
,ComplVV
|
||||
,SlashV2V
|
||||
]
|
||||
|
||||
with
|
||||
(PredInterface = PredInstanceFin) ** open PredInstanceFin, (S = StemFin), ResFin in {
|
||||
|
||||
lin
|
||||
ComplVV x vp vpo = addObj2VP vp (\\a => vpo.s ! VPIVV vp.vvtype ! a) ;
|
||||
SlashV2V x vp vpo = addObj2VP vp (\\a => vpo.s ! VPIVV vp.vvtype ! a) ;
|
||||
|
||||
UseV x a t p verb = initPrVerbPhraseV a t p verb ;
|
||||
|
||||
UseAP x a t p ap = useCopula a t p ** {
|
||||
c1 = ap.c1 ;
|
||||
c2 = ap.c2 ;
|
||||
adj = \\a => ap.s ! agr2aagr a ;
|
||||
} ;
|
||||
|
||||
UseNP a t p np = useCopula a t p ** {
|
||||
adj = \\a => np.s ! subjCase ;
|
||||
} ;
|
||||
|
||||
UseCN x a t p cn = useCopula a t p ** {
|
||||
c1 = cn.c1 ;
|
||||
c2 = cn.c2 ;
|
||||
adj = \\a => cn.s ! agr2nagr a ;
|
||||
} ;
|
||||
|
||||
ComplV2 x vp np = vp ** {
|
||||
obj1 = \\_ => appCompl True Pos vp.c1 np ; ---- True,Pos ?
|
||||
} ;
|
||||
|
||||
PredVP x np vp = vp ** {
|
||||
subj : Str = appSubjCase vp.sc np ;
|
||||
verb : {fin,inf : Str} = vp.v ! np.a ;
|
||||
adj : Str = vp.adj ! np.a ;
|
||||
obj1 : Str = vp.obj1 ! np.a ;
|
||||
obj2 : Str = vp.obj2 ! np.a ;
|
||||
c3 : Compl = vp.c1 ; ---- could be c2
|
||||
} ;
|
||||
|
||||
ReflVP x vp = vp ** {
|
||||
obj1 = \\a => (reflPron a).s ! vp.c1.c ; ---- prep
|
||||
} ;
|
||||
|
||||
ReflVP2 x vp = vp ** {
|
||||
obj2 = \\a => (reflPron a).s ! vp.c2.c ; ---- prep
|
||||
} ;
|
||||
|
||||
QuestVP x ip vp =
|
||||
let
|
||||
ipa = ipagr2agr ip.n
|
||||
in vp ** {
|
||||
foc = ip.s ! subjCase ; ---- appSubjCase ip
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
verb : {fin,inf : Str} = vp.v ! ipa ;
|
||||
adj : Str = vp.adj ! ipa ;
|
||||
obj1 : Str = vp.obj1 ! ipa ;
|
||||
obj2 : Str = vp.obj2 ! ipa ;
|
||||
c3 : Compl = noComplCase ;
|
||||
qforms = \\_ => <[],[]> ;
|
||||
} ;
|
||||
|
||||
QuestIComp a t p icomp np =
|
||||
let
|
||||
vagr = (agr2vagr np.a)
|
||||
in
|
||||
initPrClause ** {
|
||||
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
subj = np.s ! subjCase ;
|
||||
foc = icomp.s ! np.a ;
|
||||
focType = FocObj ;
|
||||
qforms = qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
} ;
|
||||
|
||||
RelVP rp vp =
|
||||
let
|
||||
cl : Agr -> PrClause = \a ->
|
||||
let
|
||||
rpa = rpagr2agr rp.a a ;
|
||||
rnp = {s = rp.s ! (complNumAgr rpa) ; a = rpa ; isPron = False}
|
||||
in
|
||||
vp ** {
|
||||
v = applyVerb vp (agr2vagr rpa) ;
|
||||
subj : Str = appSubjCase vp.sc rnp ;
|
||||
verb : {fin,inf : Str} = vp.v ! rpa ;
|
||||
adj : Str = vp.adj ! rpa ;
|
||||
obj1 : Str = vp.obj1 ! rpa ;
|
||||
obj2 : Str = vp.obj2 ! rpa ;
|
||||
c3 : Compl = noComplCase ;
|
||||
}
|
||||
in {s = \\a => declCl (cl a) ; c = subjCase} ; ---- case
|
||||
|
||||
RelSlash rp cl = {
|
||||
s = \\a =>
|
||||
let
|
||||
rpa = rpagr2agr rp.a a ;
|
||||
rnp = appCompl True Pos cl.c3 {s = rp.s ! (complNumAgr rpa) ; a = rpa ; isPron = False}
|
||||
in
|
||||
rnp ++ declCl cl ;
|
||||
c = objCase ---- case
|
||||
} ;
|
||||
|
||||
NomVPNP vpi = {
|
||||
s = \\c => vpi.s ! vvInfinitive ! defaultAgr ;
|
||||
isNeg = False ; ----
|
||||
isPron = False ; ----
|
||||
a = defaultAgr
|
||||
} ;
|
||||
|
||||
|
||||
PassUseV x a t p verb = initPrVerbPhraseV a t p verb ** {
|
||||
v : Agr => {fin,inf : Str} = case verb.sc of {
|
||||
SCNom => \\agr => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass agr (lin PrV verb) ;
|
||||
_ => \\_ => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass defaultAgr (lin PrV verb)
|
||||
} ;
|
||||
inf : VPIType => Str = \\vtt => tenseInfV (a.s ++ p.s) a.a p.p Pass (lin PrV verb) vtt ; ---- still Act
|
||||
imp : ImpType => Str = \\it => imperativeV p.s p.p it (lin PrV verb) ; ---- still Act
|
||||
isPass : Bool = True ;
|
||||
c1 : Compl = noComplCase ;
|
||||
c2 : Compl = verb.c2 ;
|
||||
vvtype = verb.vvtype ;
|
||||
sc = npform2subjcase verb.c1.c ;
|
||||
h = case a.a of {Anter => Back ; _ => verb.h} ;
|
||||
} ;
|
||||
|
||||
AgentPassUseV x a t p verb np = initPrVerbPhraseV a t p verb ** {
|
||||
sc = npform2subjcase verb.c1.c ;
|
||||
obj1 = \\a => appSubjCase verb.sc np ;
|
||||
} ;
|
||||
|
||||
PresPartAP x v = {
|
||||
s = \\a => vPresPart v a ;
|
||||
c1 = v.c1 ; -- looking at her
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
PastPartAP x v = {
|
||||
s = \\a => vPastPart v a ;
|
||||
c1 = v.c1 ; -- looking at her
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
AgentPastPartAP x v np = {
|
||||
s = \\a => (S.sverb2verbSep v).s ! AgentPart (aForm a) ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = \\_ => appComplCase agentCase np ; ---- addObj
|
||||
} ;
|
||||
|
||||
|
||||
StartVPC x c v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.fin ++ v.adV ++ vv.inf ++ v.adj ! vpa ++
|
||||
v.obj1 ! vpa ++ v.obj2 ! vpa ++ v.adv ++ v.ext
|
||||
++ c.s2 ++
|
||||
wv.fin ++ w.adV ++ wv.inf ++ w.adj ! vpa ++
|
||||
w.obj1 ! vpa ++ w.obj2 ! vpa ++ w.adv ++ w.ext ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ c.s2 ++ infVP vt a w ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ c.s2 ++ impVP i w ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = c.s1 ;
|
||||
} ;
|
||||
|
||||
ContVPC x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.fin ++ v.adV ++ vv.inf ++ v.adj ! vpa ++
|
||||
v.obj1 ! vpa ++ v.obj2 ! vpa ++ v.adv ++ v.ext
|
||||
++ "," ++
|
||||
wv ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ "," ++ w.inf ! a ! vt ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ "," ++ w.imp ! i ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = w.s1 ;
|
||||
} ;
|
||||
|
||||
UseVPC x vpc = initPrVerbPhrase ** { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = \\a => {fin = vpc.s1 ++ vpc.v ! a ; inf = []} ;
|
||||
inf = \\vt => vpc.inf ! defaultAgr ! vt ; ---- agr
|
||||
imp = vpc.imp ;
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
} ;
|
||||
|
||||
|
||||
ByVP x vp vpi = vp ** {adv = vpi.s ! VPIInf3Adess ! defaultAgr} ; -- tekemällä
|
||||
WhenVP x vp vpi = vp ** {adv = vpi.s ! VPIInf2Iness ! defaultAgr} ; -- tehdessä ---- agr
|
||||
BeforeVP x vp vpi = vp ** {adv = "ennen" ++ vpi.s ! VPIInf4Part ! defaultAgr} ; -- ennen tekemistä
|
||||
InOrderVP x vp vpi = vp ** {adv = vpi.s ! VPIInf1Long ! defaultAgr} ; -- tehdäkseen ---- agr
|
||||
WithoutVP x vp vpi = vp ** {adv = vpi.s ! VPIInf3Abess ! defaultAgr} ; -- tekemättä
|
||||
|
||||
AfterVP -- tehtyä
|
||||
= variants {} ;
|
||||
|
||||
}
|
||||
@@ -1,372 +0,0 @@
|
||||
incomplete concrete PredFunctor of Pred = Cat [Ant,NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Subj,Imp] **
|
||||
open
|
||||
PredInterface,
|
||||
ParamX,
|
||||
Prelude
|
||||
in {
|
||||
|
||||
------------------------------------
|
||||
-- lincats
|
||||
-------------------------------------
|
||||
|
||||
lincat
|
||||
Tense = {s : Str ; t : PredInterface.STense} ;
|
||||
Pol = {s : Str ; p : PredInterface.Polarity} ;
|
||||
|
||||
Arg = {s : Str} ;
|
||||
|
||||
PrV = PrVerb ;
|
||||
PrVP = PrVerbPhrase ;
|
||||
PrCl = PrClause ;
|
||||
|
||||
PrQCl = PrQuestionClause ;
|
||||
|
||||
PrVPI = {s : PredInterface.VVType => Agr => Str} ;
|
||||
|
||||
VPC = {
|
||||
v : VAgr => Str ;
|
||||
inf : Agr => PredInterface.VVType => Str ;
|
||||
imp : ImpType => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
s1 : Str ; -- storing both in both-and
|
||||
} ;
|
||||
|
||||
ClC = {
|
||||
s : Str ;
|
||||
c3 : ComplCase ;
|
||||
s1 : Str ;
|
||||
} ;
|
||||
|
||||
PrAdv = PrAdverb ;
|
||||
PrS = {s : Str} ;
|
||||
|
||||
PrAP = {
|
||||
s : AAgr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 : Agr => Str
|
||||
} ;
|
||||
|
||||
PrCN = {
|
||||
s : NAgr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 : Agr => Str
|
||||
} ;
|
||||
|
||||
-- reference linearizations for chunking
|
||||
|
||||
linref
|
||||
PrVP = linrefPrVP ;
|
||||
PrCl = linrefPrCl ;
|
||||
PrQCl = linrefPrQCl ;
|
||||
PrAdv = linrefPrAdv ;
|
||||
|
||||
----------------------------
|
||||
--- linearization rules ----
|
||||
----------------------------
|
||||
|
||||
lin
|
||||
|
||||
-- standard general
|
||||
|
||||
TPres = {s = [] ; t = Pres} ;
|
||||
TPast = {s = [] ; t = Past} ;
|
||||
TFut = {s = [] ; t = Fut} ;
|
||||
TCond = {s = [] ; t = Cond} ;
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
-- predication specific
|
||||
|
||||
aNone, aS, aV, aA, aQ, aN = {s = []} ;
|
||||
aNP a = a ;
|
||||
|
||||
UseV x a t p v = initPrVerbPhraseV a t p v ;
|
||||
|
||||
PassUseV x a t p v = initPrVerbPhraseV a t p v ** {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
} ;
|
||||
|
||||
AgentPassUseV x a t p v np = initPrVerbPhraseV a t p v ** {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p passive agr v ;
|
||||
inf = \\vt => tenseInfV a.s a.a p.p passive v vt ;
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
adv = appComplCase agentCase np ;
|
||||
} ;
|
||||
|
||||
UseAP x a t p ap = useCopula a t p ** {
|
||||
c1 = ap.c1 ;
|
||||
c2 = ap.c2 ;
|
||||
adj = \\a => ap.s ! agr2aagr a ;
|
||||
obj1 = <ap.obj1, defaultAgr> ;
|
||||
} ;
|
||||
|
||||
UseCN x a t p cn = useCopula a t p ** {
|
||||
c1 = cn.c1 ;
|
||||
c2 = cn.c2 ;
|
||||
adj = \\a => cn.s ! agr2nagr a ;
|
||||
obj1 = <cn.obj1, defaultAgr> ;
|
||||
} ;
|
||||
|
||||
UseAdv x a t p adv = useCopula a t p ** {
|
||||
c1 = adv.c1 ;
|
||||
adj = \\a => adv.s ;
|
||||
} ;
|
||||
|
||||
UseNP a t p np = useCopula a t p ** {
|
||||
adj = \\a => appSubjCase np ;
|
||||
} ;
|
||||
|
||||
UseS a t p cl = addExtVP (useCopula a t p) (that_Compl ++ declSubordCl cl) ; ---- sentence form
|
||||
UseQ a t p cl = addExtVP (useCopula a t p) (questSubordCl cl) ;
|
||||
UseVP a t p vp = addExtVP (useCopula a t p) (vp.s ! vvInfinitive ! defaultAgr) ;
|
||||
|
||||
ComplV2 x vp np = vp ** {
|
||||
obj1 = <\\a => appObjCase np, np.a> -- np.a for object control
|
||||
} ;
|
||||
|
||||
ComplVS x vp cl = addExtVP vp (that_Compl ++ declSubordCl cl) ; ---- sentence form
|
||||
|
||||
ComplVQ x vp qcl = addExtVP vp (questSubordCl qcl) ; ---- question form
|
||||
|
||||
ComplVV x vp vpo = addObj2VP vp (\\a => vpo.s ! vp.vvtype ! a) ;
|
||||
|
||||
ComplVA x vp ap = addObj2VP vp (\\a => ap.s ! agr2aagr a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
ComplVN x vp cn = addObj2VP vp (\\a => cn.s ! agr2nagr a ++ cn.obj1 ! a) ; ---- cnForm
|
||||
|
||||
SlashV3 x vp np = addObj2VP vp (\\a => appObjCase np) ; -- control is preserved
|
||||
|
||||
SlashV2S x vp cl = addExtVP vp (that_Compl ++ declSubordCl cl) ; ---- sentence form
|
||||
|
||||
SlashV2Q x vp cl = addExtVP vp (questSubordCl cl) ; ---- question form
|
||||
|
||||
SlashV2V x vp vpo = addObj2VP vp (\\a => vpo.s ! vp.vvtype ! a) ;
|
||||
|
||||
SlashV2A x vp ap = addObj2VP vp (\\a => ap.s ! agr2aagr a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
SlashV2N x vp cn = addObj2VP vp (\\a => cn.s ! agr2nagr a ++ cn.obj1 ! a) ; ---- cn form
|
||||
|
||||
ReflVP x vp = vp ** {
|
||||
obj1 = <\\a => reflPron a, defaultAgr> ; --- defaultAgr will not be used but subj.a instead
|
||||
} ;
|
||||
|
||||
ReflVP2 x vp = vp ** {
|
||||
obj2 = <\\a => reflPron a, vp.obj2.p2> ; --- subj/obj control doesn't matter any more
|
||||
} ;
|
||||
|
||||
InfVP x vp = {s = \\vvt,a => infVP vvt a vp} ;
|
||||
|
||||
PredVP x np vp = vp ** {
|
||||
v = applyVerb vp (agr2vagr np.a) ;
|
||||
subj = appSubjCase np ;
|
||||
adj = vp.adj ! np.a ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = vp.c1 ; -- in case there is any free slot left ---- could be c2
|
||||
} ;
|
||||
|
||||
SlashClNP x cl np = cl ** { -- Cl ::= Cl/NP NP
|
||||
obj2 = cl.obj2 ++ appComplCase cl.c3 np ; ---- again, adv just added
|
||||
c3 = noComplCase ; -- complCase has been consumed
|
||||
} ;
|
||||
|
||||
QuestCl x cl = cl ** {foc = [] ; focType = NoFoc} ; -- NoFoc implies verb first: does she love us
|
||||
|
||||
QuestIAdv x iadv cl = cl ** {foc = iadv.s ; focType = FocObj} ; -- FocObj implies Foc + V + Subj: why does she love us
|
||||
|
||||
QuestVP x ip vp =
|
||||
let
|
||||
ipa = ipagr2agr ip.n
|
||||
in {
|
||||
v = applyVerb vp (ipagr2vagr ip.n) ;
|
||||
foc = ip.s ! subjCase ;
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
adj = vp.adj ! ipa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! ipa ; ---- appComplCase
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ipa ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
adv = vp.adv ;
|
||||
adV = vp.adV ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
QuestSlash x ip cl =
|
||||
let
|
||||
prep = cl.c3 ;
|
||||
ips = ip.s ! objCase ; -- in Cl/NP, c3 is the only prep ---- appComplCase for ip
|
||||
focobj = case cl.focType of {
|
||||
NoFoc => <ips, [], FocObj,prep> ; -- put ip object to focus if there is no focus yet
|
||||
t => <[], strComplCase prep ++ ips, t,noComplCase> -- put ip object in situ if there already is a focus
|
||||
} ;
|
||||
in
|
||||
cl ** { -- preposition stranding
|
||||
foc = focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = focobj.p4 ;
|
||||
} ;
|
||||
{-
|
||||
---- this is giving four records instead of two AR 5/2/2014
|
||||
|
|
||||
cl ** { -- pied piping
|
||||
foc = focobj.p4 ++ focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = noComplCase ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
QuestIComp a t p icomp np =
|
||||
let vagr = (agr2vagr np.a) in
|
||||
initPrClause ** {
|
||||
v = tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||
subj = appSubjCase np ;
|
||||
adV = negAdV p ;
|
||||
foc = icomp.s ! agr2icagr np.a ;
|
||||
focType = FocObj ;
|
||||
} ;
|
||||
|
||||
RelVP rp vp =
|
||||
let
|
||||
cl : Agr -> PrClause = \a ->
|
||||
let rpa = rpagr2agr rp.a a in
|
||||
|
||||
vp ** {
|
||||
v = applyVerb vp (agr2vagr rpa) ;
|
||||
subj = rp.s ! subjRPCase a ;
|
||||
adj = vp.adj ! rpa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => rpa ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
}
|
||||
in {s = \\a => declCl (cl a) ; c = subjCase} ;
|
||||
|
||||
RelSlash rp cl = {
|
||||
s = \\a => rp.s ! subjRPCase (rpagr2agr rp.a a) ++ declCl cl ; ---- rp case
|
||||
c = objCase
|
||||
} ;
|
||||
|
||||
PrImpSg vp = {s = impVP Sg vp} ;
|
||||
PrImpPl vp = {s = impVP Pl vp} ;
|
||||
|
||||
UseCl cl = {s = declCl cl} ;
|
||||
UseQCl cl = {s = questCl cl} ;
|
||||
|
||||
UseAdvCl adv cl = {s = adv.s ++ declInvCl cl} ;
|
||||
|
||||
UttPrS s = s ;
|
||||
|
||||
|
||||
|
||||
|
||||
AdvCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
AdvQCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
PresPartAP x v = {
|
||||
s = \\a => vPresPart v a ;
|
||||
c1 = v.c1 ; -- looking at her
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
PastPartAP x v = {
|
||||
s = \\a => vPastPart v a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
AgentPastPartAP x v np = {
|
||||
s = \\a => vPastPart v a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = \\_ => appComplCase agentCase np ; ---- addObj
|
||||
} ;
|
||||
|
||||
StartVPC x c v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.p1 ++ v.adV ++ vv.p2 ++ vv.p3 ++ v.adj ! vpa ++
|
||||
v.c1 ++ v.obj1.p1 ! vpa ++ v.c2 ++ v.obj2.p1 ! vpa ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ c.s2 ++
|
||||
wv.p1 ++ w.adV ++ wv.p2 ++ wv.p3 ++ w.adj ! vpa ++ ---- appComplCase
|
||||
w.c1 ++ w.obj1.p1 ! vpa ++ w.c2 ++ w.obj2.p1 ! vpa ++ w.adv ++ w.ext ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ c.s2 ++ infVP vt a w ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ c.s2 ++ impVP i w ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = c.s1 ;
|
||||
} ;
|
||||
|
||||
ContVPC x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.p1 ++ v.adV ++ vv.p2 ++ vv.p3 ++ v.adj ! vpa ++
|
||||
v.c1 ++ v.obj1.p1 ! vpa ++ v.c2 ++ v.obj2.p1 ! vpa ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ "," ++
|
||||
wv ;
|
||||
inf = \\a,vt =>
|
||||
infVP vt a v ++ "," ++ w.inf ! a ! vt ;
|
||||
imp = \\i =>
|
||||
impVP i v ++ "," ++ w.imp ! i ;
|
||||
c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = noComplCase ; ---- w.c2 ?
|
||||
s1 = w.s1 ;
|
||||
} ;
|
||||
|
||||
UseVPC x vpc = initPrVerbPhrase ** { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = \\a => <[], [], vpc.s1 ++ vpc.v ! a> ;
|
||||
inf = \\vt => vpc.inf ! defaultAgr ! vt ; ---- agr
|
||||
imp = vpc.imp ;
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
|
||||
} ;
|
||||
|
||||
StartClC x c a b = {
|
||||
s = declCl a ++ c.s2 ++ declCl b ;
|
||||
c3 = b.c3 ; ----
|
||||
s1 = c.s1 ;
|
||||
} ;
|
||||
|
||||
ContClC x a b = {
|
||||
s = declCl a ++ "," ++ b.s ;
|
||||
c3 = b.c3 ; ----
|
||||
s1 = b.s1 ;
|
||||
} ;
|
||||
|
||||
UseClC x cl = initPrClause ** {
|
||||
v = <[],[], cl.s1 ++ cl.s> ; ----
|
||||
c3 = cl.c3 ;
|
||||
} ;
|
||||
|
||||
ComplAdv x p np = {s = appComplCase p.c1 np ; isAdV = p.isAdV ; c1 = noComplCase} ;
|
||||
|
||||
SubjUttPreS subj cl s = ss (subj.s ++ declSubordCl cl ++ ("," | []) ++ declInvCl s) ;
|
||||
SubjUttPreQ subj cl q = ss (subj.s ++ declSubordCl cl ++ ("," | []) ++ questCl q) ;
|
||||
SubjUttPost subj cl utt = ss (utt.s ++ ("," | []) ++ subj.s ++ declSubordCl cl) ;
|
||||
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
instance PredInstanceChi of
|
||||
PredInterface - [PrVerb,initPrVerb,NounPhrase,appSubjCase,appObjCase,PrAdverb,linrefPrAdv] =
|
||||
|
||||
open ResChi, (P = ParadigmsChi), (X = ParamX), (S = SyntaxChi), Prelude in {
|
||||
|
||||
-- overrides
|
||||
|
||||
oper
|
||||
PrVerb = {
|
||||
s : ResChi.Verb ;
|
||||
p : Str ; -- verb particle
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
hasPrep : Bool ;
|
||||
|
||||
isSubjectControl : Bool ; --- junk in Chi
|
||||
vtype : VType ;
|
||||
vvtype : VVType ;
|
||||
|
||||
} ;
|
||||
|
||||
NounPhrase = {s : Str} ;
|
||||
appSubjCase : NounPhrase -> Str = \np -> np.s ;
|
||||
appObjCase : NounPhrase -> Str = \np -> np.s ;
|
||||
|
||||
PrAdverb = Preposition ;
|
||||
|
||||
linrefPrAdv : PrAdverb -> Str = \adv -> adv.prepPre ++ adv.prepPost ;
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
oper
|
||||
Gender = Unit ;
|
||||
Agr = Unit ;
|
||||
Case = Unit ;
|
||||
NPCase = Unit ;
|
||||
VForm = Unit ; ----
|
||||
VVType = Unit ; ----
|
||||
VType = Unit ; ----
|
||||
|
||||
VAgr = Unit ;
|
||||
|
||||
SVoice = CVoice ;
|
||||
|
||||
param CVoice = CAct | CPass ;
|
||||
|
||||
oper
|
||||
active = CAct ;
|
||||
passive = CPass ;
|
||||
|
||||
defaultVType = UUnit ; ----
|
||||
|
||||
subjCase = UUnit ;
|
||||
objCase = UUnit ;
|
||||
|
||||
agentCase : ComplCase = S.by8agent_Prep ;
|
||||
|
||||
ComplCase = Preposition ;
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> appPrep p np.s ; ---- advType
|
||||
noComplCase : ComplCase = P.mkPrep [] ;
|
||||
strComplCase : ComplCase -> Str = \c -> c.prepPre ++ c.prepPost ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
RPCase = Unit ;
|
||||
subjRPCase : Agr -> RPCase = \a -> UUnit ;
|
||||
|
||||
NAgr = Unit ;
|
||||
IPAgr = Unit ;
|
||||
RPAgr = Unit ;
|
||||
ICAgr = Unit ;
|
||||
|
||||
defaultAgr : Agr = UUnit ;
|
||||
|
||||
-- omitting rich Agr information
|
||||
agr2vagr : Agr -> VAgr = \a -> a ;
|
||||
|
||||
agr2aagr : Agr -> AAgr = \a -> a ;
|
||||
|
||||
agr2icagr : Agr -> ICAgr = \a -> a ;
|
||||
|
||||
agr2nagr : Agr -> NAgr = \a -> a ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr = \a -> a ;
|
||||
|
||||
ipagr2vagr : IPAgr -> VAgr = \n -> n ;
|
||||
|
||||
rpagr2agr : RPAgr -> Agr -> Agr = \ra,a -> a ;
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr = \a -> defaultAgr ;
|
||||
|
||||
vPastPart : PrVerb -> AAgr -> Str = \v,a -> v.s.s ; ----
|
||||
vPresPart : PrVerb -> AAgr -> Str = \v,a -> v.s.s ; ----
|
||||
|
||||
vvInfinitive : VVType = UUnit ; ----
|
||||
|
||||
isRefl : PrVerb -> Bool = \v -> False ; ----
|
||||
|
||||
|
||||
------------------
|
||||
--- opers --------
|
||||
------------------
|
||||
|
||||
oper
|
||||
reflPron : Agr -> Str = \a -> (ResChi.mkNP ResChi.reflPron).s ;
|
||||
|
||||
infVP : VVType -> Agr -> PrVerbPhrase -> Str = \vt, a,vp ->
|
||||
vp.adV ++ vp.adv ++ ---- adv order
|
||||
vp.inf ! UUnit ++
|
||||
vp.adj ! a ++ appPrep vp.c1 (vp.obj1.p1 ! a) ++ appPrep vp.c2 (vp.obj2.p1 ! a) ++ vp.ext ;
|
||||
|
||||
impVP : Number -> PrVerbPhrase -> Str = \n,vp ->
|
||||
infVP UUnit UUnit vp ;
|
||||
|
||||
|
||||
declCl : PrClause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.adv ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : PrClause -> Str = declCl ;
|
||||
declInvCl : PrClause -> Str = declCl ;
|
||||
|
||||
questCl : PrQuestionClause -> Str = \cl ->
|
||||
cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.adv ++ cl.v.p2 ++ restCl cl ++ question_s ; ---- plus redupl
|
||||
|
||||
questSubordCl : PrQuestionClause -> Str = questCl ;
|
||||
|
||||
that_Compl : Str = say_s ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : PrClause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.ext ; ---- c3
|
||||
|
||||
negAdV : {s : Str ; p : Polarity} -> Str = \p -> p.s ; ---- not used in negation formation ++ not_Str p.p ;
|
||||
|
||||
not_Str = \p -> case p of {Pos => [] ; Neg => neg_s} ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
||||
\sta,t,a,p,o,_,v ->
|
||||
let
|
||||
bu_neg = not_Str p ;
|
||||
vneg = case p of {Pos => [] ; Neg => v.s.neg} ;
|
||||
pass = case o of {CAct => [] ; CPass => passive_s}
|
||||
in case <t,a> of {
|
||||
<X.Past,_> => <sta ++ pass, bu_neg, v.s.s ++ v.s.pp> ;
|
||||
<_,X.Anter> => <sta ++ pass, bu_neg, v.s.s ++ v.s.pp> ;
|
||||
_ => <sta ++ pass, vneg, v.s.s>
|
||||
} ; ---- other aspects
|
||||
|
||||
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str = \sa,a,p,o,v,_ -> ---- vvtype
|
||||
let tv = tenseV sa X.Pres a p o UUnit v
|
||||
in tv.p1 ++ tv.p2 ++ tv.p3 ;
|
||||
|
||||
imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str = \s,p,it,v ->
|
||||
tenseInfV s X.Simul p CAct v UUnit ;
|
||||
|
||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str =
|
||||
\s,t,a,p,agr -> tenseV s t a p CAct agr (liftV copula) ;
|
||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str =
|
||||
\s,a,p,vt -> tenseInfV s a p CAct (liftV copula) vt ;
|
||||
tenseImpCopula : Str -> Polarity -> ImpType -> Str =
|
||||
\s,p,n -> imperativeV s p n (liftV copula) ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
addObj2VP : PrVerbPhrase -> (Agr => Str) -> PrVerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : PrVerbPhrase -> Str -> PrVerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
liftV : Verb -> PrVerb = \v ->
|
||||
{s = v ; p = [] ; c1,c2 = P.mkPrep [] ; isSubjectControl = False ; vtype = UUnit ; vvtype = UUnit ; hasPrep = False} ;
|
||||
|
||||
--- junk
|
||||
|
||||
qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str =
|
||||
\sta,t,a,p,agr,v -> <[],[]> ;
|
||||
qformsCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str =
|
||||
\sta,t,a,p,agr -> <[],[]> ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,455 +0,0 @@
|
||||
instance PredInstanceEng of PredInterface - [
|
||||
PrVerbPhrase, PrClause,
|
||||
initPrVerbPhrase, initPrVerbPhraseV, initPrClause,
|
||||
useCopula, questCl, linrefPrQCl
|
||||
] =
|
||||
|
||||
open ResEng, (X = ParamX), Prelude in {
|
||||
|
||||
----- overrides ----------------
|
||||
|
||||
oper
|
||||
|
||||
-- add contracted verb forms and forms for question
|
||||
|
||||
PrVerbPhrase = BasePrVerbPhrase ** {vc : VAgr => Str * Str * Str ; qforms : VAgr => Str * Str} ;
|
||||
PrClause = BasePrClause ** {vc : Str * Str * Str ; qforms : Str * Str} ;
|
||||
|
||||
initPrVerbPhrase : PrVerbPhrase = initBasePrVerbPhrase ** {
|
||||
vc : VAgr => Str * Str * Str = \\_ => <[],[],[]> ;
|
||||
qforms = \\agr => <[],[]> ;
|
||||
} ;
|
||||
|
||||
initPrVerbPhraseV :
|
||||
{s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} -> PrVerb -> PrVerbPhrase =
|
||||
\a,t,p,v -> initBasePrVerbPhraseV a t p v ** {
|
||||
vc = \\agr => tenseVContracted (a.s ++ t.s ++ p.s) t.t a.a p.p active agr v ;
|
||||
qforms = \\agr => qformsV (a.s ++ t.s ++ p.s) t.t a.a p.p agr v
|
||||
} ;
|
||||
|
||||
initPrClause : PrClause = initBasePrClause ** {
|
||||
vc = <[],[],[]> ;
|
||||
qforms = <[],[]> ;
|
||||
} ;
|
||||
|
||||
useCopula : {s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} ->
|
||||
PrVerbPhrase =
|
||||
\a,t,p -> initPrVerbPhrase ** {
|
||||
v = \\agr => tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
vc = \\agr => tenseCopulaC (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
inf = \\vt => tenseInfCopula a.s a.a p.p vt ;
|
||||
imp = \\n => tenseImpCopula p.s p.p n ;
|
||||
adV = negAdV p ;
|
||||
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
questCl : PrQuestionClause -> Str = \cl -> case cl.focType of {
|
||||
NoFoc => cl.foc ++ cl.qforms.p1 ++ cl.subj ++ cl.adV ++ cl.qforms.p2 ++ restCl cl ; -- does she sleep
|
||||
FocObj => cl.foc ++ cl.qforms.p1 ++ cl.subj ++ cl.adV ++ cl.qforms.p2 ++ restCl cl ; -- who does she love
|
||||
FocSubj => cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl -- who loves her
|
||||
} ;
|
||||
|
||||
linrefPrQCl : PrQuestionClause -> Str = \qcl -> questCl qcl ;
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
oper
|
||||
Gender = ResEng.Gender ;
|
||||
Agr = ResEng.Agr ;
|
||||
Case = ResEng.Case ;
|
||||
NPCase = ResEng.NPCase ;
|
||||
VForm = ResEng.VVForm ; ---- VVForm to get contracted aux verbs
|
||||
VVType = ResEng.VVType ;
|
||||
SVoice = Voice ;
|
||||
|
||||
VAgr = EVAgr ;
|
||||
VType = EVType ;
|
||||
|
||||
param --- have to do this clumsy way because param P and oper P : PType don't unify
|
||||
EVAgr = VASgP1 | VASgP3 | VAPl ;
|
||||
EVType = VTAct | VTRefl | VTAux ;
|
||||
|
||||
oper
|
||||
active : SVoice = Act ;
|
||||
passive : SVoice = Pass ;
|
||||
|
||||
defaultVType : VType = VTAct ;
|
||||
|
||||
subjCase : NPCase = NCase Nom ;
|
||||
objCase : NPCase = NPAcc ;
|
||||
|
||||
agentCase : ComplCase = "by" ;
|
||||
|
||||
ComplCase = Str ; -- preposition
|
||||
|
||||
NounPhrase = {s : NPCase => Str ; a : Agr} ;
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> p ++ np.s ! objCase ;
|
||||
noComplCase : ComplCase = [] ;
|
||||
strComplCase : ComplCase -> Str = \c -> c ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
RPCase = ResEng.RCase ;
|
||||
subjRPCase : Agr -> RPCase = \a -> RC (fromAgr a).g npNom ;
|
||||
|
||||
NAgr = Number ;
|
||||
IPAgr = Number ;
|
||||
RPAgr = ResEng.RAgr ;
|
||||
ICAgr = Unit ;
|
||||
|
||||
defaultAgr : Agr = AgP3Sg Neutr ;
|
||||
|
||||
-- omitting rich Agr information
|
||||
agr2vagr : Agr -> VAgr = \a -> case a of {
|
||||
AgP1 Sg => VASgP1 ;
|
||||
AgP3Sg _ => VASgP3 ;
|
||||
_ => VAPl
|
||||
} ;
|
||||
|
||||
agr2aagr : Agr -> AAgr = \a -> a ;
|
||||
|
||||
agr2nagr : Agr -> NAgr = \a -> case a of {
|
||||
AgP1 n => n ;
|
||||
AgP2 n => n ;
|
||||
AgP3Sg _ => Sg ;
|
||||
AgP3Pl _ => Pl
|
||||
} ;
|
||||
|
||||
agr2icagr : Agr -> ICAgr = \a -> UUnit ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr = \n -> case n of {
|
||||
Sg => AgP3Sg Neutr ; ---- gender
|
||||
Pl => AgP3Pl Neutr
|
||||
} ;
|
||||
|
||||
ipagr2vagr : IPAgr -> VAgr = \n -> case n of {
|
||||
Sg => VASgP3 ;
|
||||
Pl => VAPl
|
||||
} ;
|
||||
|
||||
rpagr2agr : RPAgr -> Agr -> Agr = \ra,a -> case ra of {
|
||||
RAg ag => ag ;
|
||||
RNoAg => a
|
||||
} ;
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr = \a -> case a of {
|
||||
VASgP1 => AgP1 Sg ;
|
||||
VASgP3 => AgP3Sg Neutr ;
|
||||
VAPl => AgP3Pl Neutr
|
||||
} ;
|
||||
|
||||
vPastPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VVF VPPart ;
|
||||
vPresPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VVF VPresPart ;
|
||||
|
||||
vvInfinitive : VVType = VVInf ;
|
||||
|
||||
isRefl : PrVerb -> Bool = \v -> case v.vtype of {VTRefl => True ; _ => False} ;
|
||||
|
||||
-----------------------
|
||||
-- concrete opers
|
||||
-----------------------
|
||||
|
||||
oper
|
||||
reflPron : Agr -> Str = \a -> ResEng.reflPron ! a ;
|
||||
|
||||
infVP : VVType -> Agr -> PrVerbPhrase -> Str = \vt, a,vp ->
|
||||
let
|
||||
a2 = case vp.obj2.p2 of {True => a ; False => vp.obj1.p2} ;
|
||||
in
|
||||
vp.adV ++ vp.inf ! vt ++ vp.part ++
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
|
||||
|
||||
impVP : Number -> PrVerbPhrase -> Str = \n,vp ->
|
||||
let
|
||||
a = AgP2 n
|
||||
in
|
||||
vp.adV ++ vp.imp ! n ++ vp.part ++
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a ++ vp.adv ++ vp.ext ;
|
||||
|
||||
qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str =
|
||||
\sta,t,a,p,agr,v ->
|
||||
let
|
||||
verb = tenseActV sta t a Neg agr v ;
|
||||
averb = tenseActV sta t a p agr v
|
||||
in case <v.vtype, t, a> of {
|
||||
<VTAct|VTRefl, Pres|Past, Simul> => case p of {
|
||||
Pos => < verb.p1, verb.p3> ; -- does , sleep
|
||||
Neg => < verb.p1, verb.p2> -- does , not sleep ---- TODO: doesn't , sleep
|
||||
} ;
|
||||
_ => <averb.p1, averb.p2>
|
||||
} ;
|
||||
|
||||
qformsCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str =
|
||||
\sta,t,a,p,agr ->
|
||||
let verb = be_AuxL sta t a p agr
|
||||
in <verb.p1, verb.p2> ; -- is , not ---- TODO isn't ,
|
||||
|
||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \s,t,a,p,agr ->
|
||||
be_AuxL s t a p agr ;
|
||||
tenseCopulaC : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \s,t,a,p,agr ->
|
||||
be_AuxC s t a p agr ;
|
||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str = \s,a,p,vt ->
|
||||
tenseInfV s a p Act be_V vt ;
|
||||
tenseImpCopula : Str -> Polarity -> ImpType -> Str = \s,p,n ->
|
||||
imperativeV s p n be_V ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
||||
\sta,t,a,p,o,agr,v ->
|
||||
case o of {
|
||||
Act => tenseActV sta t a p agr v ;
|
||||
Pass => tensePassV sta t a p agr v
|
||||
} ;
|
||||
|
||||
---- leaving out these variants makes compilation time go down from 900ms to 300ms.
|
||||
---- parsing time of "she sleeps" goes down from 300ms to 60ms. 4/2/2014
|
||||
|
||||
tenseVContracted : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
||||
\sta,t,a,p,o,agr,v ->
|
||||
case o of {
|
||||
Act => tenseActVContracted sta t a p agr v ;
|
||||
Pass => tensePassVContracted sta t a p agr v
|
||||
} ;
|
||||
|
||||
tenseActV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let vt : ResEng.VForm = case <t,agr> of {
|
||||
<Pres,VASgP3> => VPres ;
|
||||
<Past|Cond,_ > => VPast ;
|
||||
_ => VInf
|
||||
} ;
|
||||
in
|
||||
case <t,a> of {
|
||||
<Pres|Past, Simul> =>
|
||||
case v.vtype of {
|
||||
VTAux => case t of {
|
||||
Pres => <sta ++ v.s ! VVF VPres, not_Str p, []> ; -- can I/she/we
|
||||
_ => <sta ++ v.s ! VVF vt, not_Str p, []> -- could ...
|
||||
} ;
|
||||
_ => case p of {
|
||||
Pos => <[], sta ++ v.s ! VVF vt, []> ; -- this is the deviating case
|
||||
Neg => <do_Aux vt Pos, not_Str p, sta ++ v.s ! VVF VInf>
|
||||
}
|
||||
} ;
|
||||
|
||||
<Pres|Past, Anter> => <have_Aux vt Pos, not_Str p, sta ++ v.s ! VVF VPPart> ;
|
||||
<Fut|Cond, Simul> => <will_Aux vt Pos, not_Str p, sta ++ v.s ! VVF VInf> ;
|
||||
<Fut|Cond, Anter> => <will_Aux vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.s ! VVF VPPart>
|
||||
} ;
|
||||
|
||||
tenseActVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let vt : ResEng.VForm * VVForm = case <t,agr> of {
|
||||
<Pres,VASgP3> => <VPres, VVPresNeg> ;
|
||||
<Past|Cond,_ > => <VPast, VVPastNeg> ;
|
||||
_ => <VInf, VVF VInf>
|
||||
} ;
|
||||
in
|
||||
|
||||
case <t,a> of {
|
||||
<Pres|Past, Simul> =>
|
||||
case v.vtype of {
|
||||
VTAux => case p of {
|
||||
Pos => <sta ++ v.s ! VVF vt.p1, [], []> ;
|
||||
Neg => <sta ++ v.s ! vt.p2, [], []>
|
||||
} ;
|
||||
_ => case p of {
|
||||
Pos => <[], sta ++ v.s ! VVF vt.p1, []> ; -- this is the deviating case
|
||||
Neg => <do_Aux vt.p1 p, [], sta ++ v.s ! VVF VInf>
|
||||
}
|
||||
} ;
|
||||
<Pres|Past, Anter> => <have_AuxC vt.p1 p, [], sta ++ v.s ! VVF VPPart> ;
|
||||
---- | <have_AuxC vt.p1 Pos, not_Str p, sta ++ v.s ! VVF VPPart> ;
|
||||
<Fut|Cond, Simul> => <will_AuxC vt.p1 p, [], sta ++ v.s ! VVF VInf> ;
|
||||
---- | <will_AuxC vt.p1 Pos, not_Str p, sta ++ v.s ! VVF VInf> ;
|
||||
<Fut|Cond, Anter> => <will_AuxC vt.p1 p, have_Aux VInf Pos, sta ++ v.s ! VVF VPPart>
|
||||
---- | <will_AuxC vt.p1 Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.s ! VVF VPPart>
|
||||
} ;
|
||||
|
||||
tensePassV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let
|
||||
be = be_AuxL sta t a p agr ;
|
||||
done = v.s ! VVF VPPart
|
||||
in
|
||||
<be.p1, be.p2, be.p3 ++ done> ;
|
||||
tensePassVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let
|
||||
be = be_AuxC sta t a p agr ;
|
||||
done = v.s ! VVF VPPart
|
||||
in
|
||||
<be.p1, be.p2, be.p3 ++ done> ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str = \sa,a,p,o,v,vt ->
|
||||
let
|
||||
not = case p of {Pos => [] ; Neg => "not"} ;
|
||||
in
|
||||
case vt of {
|
||||
VVInf =>
|
||||
case a of {
|
||||
Simul => not ++ "to" ++ sa ++ v.s ! VVF VInf ; -- (she wants) (not) to sleep
|
||||
Anter => not ++ "to" ++ have_Aux VInf Pos ++ sa ++ v.s ! VVF VPPart -- (she wants) (not) to have slept
|
||||
} ;
|
||||
VVAux =>
|
||||
case a of {
|
||||
Simul => not ++ sa ++ v.s ! VVF VInf ; -- (she must) (not) sleep
|
||||
Anter => not ++ have_Aux VInf Pos ++ sa ++ v.s ! VVF VPPart -- (she must) (not) have slept
|
||||
} ;
|
||||
VVPresPart =>
|
||||
case a of {
|
||||
Simul => not ++ sa ++ v.s ! VVF VPresPart ; -- (she starts) (not) sleeping
|
||||
Anter => not ++ "having" ++ sa ++ v.s ! VVF VPPart -- (she starts) (not) having slept
|
||||
}
|
||||
} ;
|
||||
|
||||
imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str = \s,p,it,v ->
|
||||
s ++ case p of {
|
||||
Pos => v.s ! VVF VInf ;
|
||||
Neg => ("do not" | "don't") ++ v.s ! VVF VInf
|
||||
} ;
|
||||
|
||||
|
||||
----- dangerous variants for PMCFG generation - keep apart as long as possible
|
||||
be_Aux : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
be_AuxL sta t a p agr ;
|
||||
|
||||
be_AuxL : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
let
|
||||
beV = tenseActV sta t a p agr be_V
|
||||
in
|
||||
case <t,a,p,agr> of {
|
||||
<Pres,Simul,Pos,VASgP3> => <"is" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VASgP1> => <"am" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VAPl> => <"are" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP3> => <"is" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VASgP1> => <"am" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VAPl> => <"are" ++ sta, "not", []> ;
|
||||
<Past,Simul,Pos,VAPl> => <"were" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,VAPl> => <"were" ++ sta, "not", []> ;
|
||||
<Past,Simul,Neg,_> => <"was" ++ sta, "not", []> ;
|
||||
_ => beV
|
||||
} ;
|
||||
be_AuxC : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
let
|
||||
beV = tenseActVContracted sta t a p agr be_V
|
||||
in
|
||||
case <t,a,p,agr> of {
|
||||
<Pres,Simul,Pos,VASgP3> => <Predef.BIND ++ "'s" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VASgP1> => <Predef.BIND ++ "'m" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VAPl> => <Predef.BIND ++ "'re" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP3> => ---- <Predef.BIND ++ "'s" ++ sta, "not", []>
|
||||
<"isn't" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP1> => <Predef.BIND ++ "'m" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VAPl> => ---- <Predef.BIND ++ "'re" ++ sta, "not", []>
|
||||
<"aren't" ++ sta, [], []> ;
|
||||
<Past,Simul,Pos,VAPl> => <"were" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,VAPl> => <"weren't" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,_> => <"wasn't" ++ sta, [], []> ;
|
||||
_ => beV
|
||||
} ;
|
||||
|
||||
declCl : PrClause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : PrClause -> Str = declCl ;
|
||||
declInvCl : PrClause -> Str = declCl ;
|
||||
|
||||
declClContracted : PrClause -> Str = \cl -> cl.subj ++ cl.vc.p1 ++ cl.adV ++ cl.vc.p2 ++ restCl cl ; -- contracted forms
|
||||
|
||||
questSubordCl : PrQuestionClause -> Str = \cl ->
|
||||
let
|
||||
rest = cl.subj ++ cl.adV ++ cl.v.p1 ++ cl.v.p2 ++ restCl cl
|
||||
in case cl.focType of {
|
||||
NoFoc => "if" ++ cl.foc ++ rest ; -- if she sleeps
|
||||
FocObj => cl.foc ++ rest ; -- who she loves / why she sleeps
|
||||
FocSubj => cl.foc ++ rest -- who loves her
|
||||
} ;
|
||||
|
||||
|
||||
--- only needed in Eng because of do questions
|
||||
qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str ;
|
||||
qformsCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str ;
|
||||
|
||||
qformsVP : PrVerbPhrase -> VAgr -> Str * Str
|
||||
= \vp,vagr -> vp.qforms ! vagr ;
|
||||
|
||||
|
||||
that_Compl : Str = "that" | [] ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : PrClause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ;
|
||||
|
||||
|
||||
addObj2VP : PrVerbPhrase -> (Agr => Str) -> PrVerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : PrVerbPhrase -> Str -> PrVerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
oper
|
||||
be_V : PrVerb = {
|
||||
s = table {
|
||||
VVF VInf => "be" ;
|
||||
VVF VPres => "is" ;
|
||||
VVF VPast => "was" ;
|
||||
VVF VPPart => "been" ;
|
||||
VVF VPresPart => "being" ;
|
||||
VVPresNeg => "isn't" ;
|
||||
VVPastNeg => "wasn't"
|
||||
} ;
|
||||
p,c1,c2 = [] ; vtype = VTAux ; vvtype = VVInf ; isSubjectControl = False
|
||||
} ;
|
||||
|
||||
negAdV : {s : Str ; p : Polarity} -> Str = \p -> p.s ;
|
||||
|
||||
|
||||
|
||||
|
||||
oper
|
||||
---- have to split the tables to two to get reasonable PMCFG generation
|
||||
will_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf|VPres, Pos> => varAux "will" "ll" ;
|
||||
<VInf|VPres, Neg> => "won't" ;
|
||||
<VPast|_ , Pos> => varAux "would" "d" ;
|
||||
<VPast|_ , Neg> => "wouldn't"
|
||||
} ;
|
||||
will_AuxC : ResEng.VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf|VPres, Pos> => varAuxC "will" "ll" ;
|
||||
<VInf|VPres, Neg> => "won't" ;
|
||||
<VPast|_ , Pos> => varAuxC "would" "d" ;
|
||||
<VPast|_ , Neg> => "wouldn't"
|
||||
} ;
|
||||
|
||||
have_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => varAux "have" "ve" ; --- slightly overgenerating if used in infinitive
|
||||
<VInf, Neg> => "haven't" ;
|
||||
<VPres, Pos> => varAux "has" "s" ;
|
||||
<VPres, Neg> => "hasn't" ;
|
||||
<VPast|_ , Pos> => varAux "had" "d" ;
|
||||
<VPast|_ , Neg> => "hadn't"
|
||||
} ;
|
||||
have_AuxC : ResEng.VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => varAuxC "have" "ve" ; --- slightly overgenerating if used in infinitive
|
||||
<VInf, Neg> => "haven't" ;
|
||||
<VPres, Pos> => varAuxC "has" "s" ;
|
||||
<VPres, Neg> => "hasn't" ;
|
||||
<VPast|_ , Pos> => varAuxC "had" "d" ;
|
||||
<VPast|_ , Neg> => "hadn't"
|
||||
} ;
|
||||
|
||||
do_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => "do" ;
|
||||
<VInf, Neg> => "don't" ;
|
||||
<VPres, Pos> => "does" ;
|
||||
<VPres, Neg> => "doesn't" ;
|
||||
<VPast|_ , Pos> => "did" ;
|
||||
<VPast|_ , Neg> => "didn't"
|
||||
} ;
|
||||
|
||||
varAux : Str -> Str -> Str = \long,short -> long ; ----| Predef.BIND ++ ("'" + short) ;
|
||||
varAuxC : Str -> Str -> Str = \long,short -> Predef.BIND ++ ("'" + short) ;
|
||||
|
||||
not_Str : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => "not"} ;
|
||||
|
||||
}
|
||||
@@ -1,335 +0,0 @@
|
||||
instance PredInstanceFin of
|
||||
PredInterface - [
|
||||
NounPhrase,
|
||||
PrVerb, initPrVerb,
|
||||
PrVerbPhrase, initPrVerbPhrase, initPrVerbPhraseV, useCopula, linrefPrVP, qformsVP, applyVerb, addObj2VP,
|
||||
initBasePrVerbPhrase, initBasePrVerbPhraseV,
|
||||
PrClause, initPrClause
|
||||
] =
|
||||
open ResFin, (P = ParadigmsFin), (S = StemFin), (X = ParamX), Prelude in {
|
||||
|
||||
-- overrides
|
||||
|
||||
oper
|
||||
NounPhrase = ResFin.NP ;
|
||||
|
||||
PrVerb = StemFin.SVerb1 ** {
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
vvtype : ResFin.VVType ;
|
||||
} ;
|
||||
|
||||
initPrVerb : PrVerb = {
|
||||
s = \\_ => [] ;
|
||||
sc = SCNom ;
|
||||
h = Back ;
|
||||
p = [] ;
|
||||
c1,c2 = noComplCase ; isSubjectControl = True ; vtype = Act ; vvtype = VVInf ;
|
||||
} ;
|
||||
|
||||
PrVerbPhrase = {
|
||||
v : Agr => {fin,inf : Str} ;
|
||||
inf : VPIType => Str ;
|
||||
imp : ImpType => Str ;
|
||||
adj : Agr => Str ;
|
||||
obj1 : Agr => Str ; -- Bool => Polarity => Agr => Str ; -- talo/talon/taloa
|
||||
obj2 : Agr => Str ; -- Bool => Polarity => Agr => Str ; -- talo/talon/taloa
|
||||
adv : Str ; -- Polarity => Str ; -- ainakin/ainakaan
|
||||
adV : Str ; -- Polarity => Str ; -- ainakin/ainakaan
|
||||
ext : Str ;
|
||||
isNeg : Bool ; -- True if some complement is negative
|
||||
isPass : Bool ; -- True if the verb is rendered in the passive
|
||||
vvtype : ResFin.VVType ;
|
||||
sc : SubjCase ;
|
||||
h : Harmony ;
|
||||
c1 : Compl ;
|
||||
c2 : Compl ;
|
||||
qforms : VAgr => Str * Str ;
|
||||
} ;
|
||||
|
||||
initPrVerbPhrase : PrVerbPhrase = {
|
||||
v : Agr => {fin,inf : Str} = \\_ => {fin,inf = []} ;
|
||||
inf : VPIType => Str = \\vtt => [] ;
|
||||
imp : ImpType => Str = \\_ => [] ;
|
||||
adj : Agr => Str = \\_ => [] ;
|
||||
obj1 : Agr => Str = \\_ => [] ;
|
||||
obj2 : Agr => Str = \\_ => [] ;
|
||||
adv : Str = [] ;
|
||||
adV : Str = [] ;
|
||||
ext : Str = [] ;
|
||||
isNeg : Bool = True ;
|
||||
isPass : Bool = False ;
|
||||
c1 : Compl = noComplCase ;
|
||||
c2 : Compl = noComplCase ;
|
||||
vvtype = VVInf ;
|
||||
sc = SCNom ;
|
||||
h = Back ;
|
||||
qforms : VAgr => Str * Str = \\_ => <[],[]> -- special Eng for introducing "do" in questions
|
||||
} ;
|
||||
|
||||
initPrVerbPhraseV :
|
||||
{s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} -> PrVerb -> PrVerbPhrase =
|
||||
\a,t,p,verb ->
|
||||
initPrVerbPhrase ** {
|
||||
v : Agr => {fin,inf : Str} = case verb.sc of {
|
||||
SCNom => \\agr => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Act agr (lin PrV verb) ;
|
||||
_ => \\_ => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Act defaultAgr (lin PrV verb)
|
||||
} ;
|
||||
inf : VPIType => Str = \\vtt => tenseInfV (a.s ++ p.s) a.a p.p Act (lin PrV verb) vtt ;
|
||||
imp : ImpType => Str = \\it => imperativeV p.s p.p it (lin PrV verb) ;
|
||||
adj : Agr => Str = \\_ => [] ;
|
||||
obj1 : Agr => Str = \\_ => [] ;
|
||||
obj2 : Agr => Str = \\_ => [] ;
|
||||
adv : Str = [] ;
|
||||
adV : Str = [] ;
|
||||
ext : Str = [] ;
|
||||
isNeg : Bool = False ;
|
||||
isPass : Bool = False ;
|
||||
c1 : Compl = verb.c1 ;
|
||||
c2 : Compl = verb.c2 ;
|
||||
vvtype = verb.vvtype ;
|
||||
sc = verb.sc ;
|
||||
h = case a.a of {Anter => Back ; _ => verb.h} ;
|
||||
} ;
|
||||
|
||||
useCopula : {s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} -> PrVerbPhrase =
|
||||
\a,t,p -> initPrVerbPhraseV a t p (liftV P.olla_V) ;
|
||||
|
||||
linrefPrVP : PrVerbPhrase -> Str = \_ -> "verbphrase" ; ----
|
||||
|
||||
PrClause = {
|
||||
subj : Str ;
|
||||
verb : {fin,inf : Str} ;
|
||||
adj : Str ;
|
||||
obj1 : Str ;
|
||||
obj2 : Str ;
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
h : Harmony ;
|
||||
c3 : Compl ;
|
||||
} ;
|
||||
initPrClause : PrClause = {
|
||||
subj : Str = [] ;
|
||||
verb : {fin,inf : Str} = {fin,inf = []} ;
|
||||
adj : Str = [] ;
|
||||
obj1 : Str = [] ;
|
||||
obj2 : Str = [] ;
|
||||
adv : Str = [] ;
|
||||
adV : Str = [] ;
|
||||
ext : Str = [] ;
|
||||
h : Harmony = Back ;
|
||||
c3 : Compl = noComplCase ;
|
||||
} ;
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
oper
|
||||
Agr = ResFin.Agr ;
|
||||
Case = ResFin.Case ;
|
||||
NPCase = ResFin.NPForm ;
|
||||
VForm = S.SVForm ;
|
||||
VVType = VPIType ;
|
||||
VType = Voice ; ----
|
||||
Gender = Unit ; ----
|
||||
|
||||
VAgr = Agr ;
|
||||
|
||||
SVoice = Voice ;
|
||||
|
||||
oper
|
||||
active = Act ;
|
||||
passive = Pass ;
|
||||
|
||||
defaultVType = Act ;
|
||||
defaultVVType = vvInfinitive ;
|
||||
|
||||
subjCase : NPCase = ResFin.NPCase Nom ;
|
||||
objCase : NPCase = NPAcc ;
|
||||
|
||||
ComplCase = ResFin.Compl ; -- preposition
|
||||
agentCase : ComplCase = P.postGenPrep "toimesta" ;
|
||||
strComplCase : ComplCase -> Str = \c -> c.s.p1 ++ c.s.p2 ;
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> appCompl True Pos p np ;
|
||||
noComplCase : ComplCase = P.accPrep ; ----
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
RPCase = NPCase ;
|
||||
subjRPCase : Agr -> RPCase = \a -> subjCase ;
|
||||
|
||||
NAgr = Number ;
|
||||
IPAgr = Number ; --- two separate fields in RGL
|
||||
RPAgr = ResFin.RAgr ;
|
||||
ICAgr = Agr ;
|
||||
|
||||
defaultAgr : Agr = Ag Sg P3 ;
|
||||
|
||||
-- omitting rich Agr information
|
||||
agr2vagr : Agr -> VAgr = \a -> a ;
|
||||
|
||||
agr2aagr : Agr -> AAgr = \a -> a ;
|
||||
|
||||
agr2nagr : Agr -> NAgr = \a -> case a of {Ag n _ => n ; AgPol => Sg} ; -- minä olen pomo / te olette pomoja / te olette pomo
|
||||
|
||||
agr2icagr : Agr -> ICAgr = \a -> a ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr = \a -> Ag a P3 ;
|
||||
|
||||
ipagr2vagr : IPAgr -> VAgr = \n -> Ag n P3 ;
|
||||
|
||||
rpagr2agr : RPAgr -> Agr -> Agr = \ra,a -> case ra of {
|
||||
RAg ag => ag ;
|
||||
RNoAg => a
|
||||
} ;
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr = \a -> a ;
|
||||
|
||||
vPastPart : PrVerb -> AAgr -> Str = \v,a -> (S.sverb2verbSep v).s ! PastPartPass (aForm a) ;
|
||||
vPresPart : PrVerb -> AAgr -> Str = \v,a -> (S.sverb2verbSep v).s ! PresPartAct (aForm a) ;
|
||||
|
||||
-- predicative adjective form
|
||||
aForm : AAgr -> AForm = \a -> case a of {
|
||||
Ag Pl _ => AN (NCase Pl Part) ;
|
||||
_ => AN (NCase Sg Nom)
|
||||
} ;
|
||||
---- TODO: case system of PrAP
|
||||
|
||||
vvInfinitive : VVType = VPIVV VVInf ;
|
||||
|
||||
isRefl : PrVerb -> Bool = \_ -> False ; ----
|
||||
|
||||
-- the forms outside VPIVV to be used in adverbials such as "tekemällä"
|
||||
param
|
||||
VPIType = VPIVV (ResFin.VVType)
|
||||
| VPIInf3Adess | VPIInf3Abess | VPIInf2Iness | VPIInf1Long {- | VPIPastPartPassPart -} | VPIInf4Part ;
|
||||
-- tekemällä, tekemättä, tehdessä, tehdäkseen, tehtyään, tekemistä
|
||||
|
||||
------------------
|
||||
--- opers --------
|
||||
------------------
|
||||
|
||||
oper
|
||||
reflPron : Agr -> Str = \a -> (ResFin.reflPron a).s ! NPAcc ; ---- case
|
||||
|
||||
finV : Str -> STense -> Anteriority -> Polarity -> SVoice -> Agr -> PrVerb -> {fin,inf : Str} =
|
||||
\sta,t,a,pol,o,agr,v ->
|
||||
let
|
||||
vit = case o of {Act => VIFin t ; Pass => VIPass t} ;
|
||||
ovps = (S.vp2old_vp (S.predV v)).s ! vit ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
|
||||
in
|
||||
{fin = sta ++ ovps.fin ; inf = ovps.inf} ;
|
||||
|
||||
infV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VPIType -> Str =
|
||||
\sa,a,pol,o,v,vvt ->
|
||||
let
|
||||
vt = case vvt of {
|
||||
VPIVV vi => VIInf (vvtype2infform vi) ;
|
||||
VPIInf3Adess => VIInf Inf3Adess ;
|
||||
VPIInf3Abess => VIInf Inf3Abess ;
|
||||
VPIInf2Iness => VIInf Inf2Iness ;
|
||||
VPIInf1Long => VIInf Inf1Long ;
|
||||
---- VPIPastPartPassPart => PastPartPass (AN (NCase Sg Part)) ;
|
||||
VPIInf4Part => VIInf Inf4Part
|
||||
} ;
|
||||
ovps = (S.vp2old_vp (S.predV v)).s ! vt ! a ! pol ! defaultAgr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
|
||||
in
|
||||
sa ++ ovps.fin ++ ovps.inf ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str = infV ;
|
||||
{-
|
||||
\sa,a,pol,o,v,vt ->
|
||||
let vt = Inf1 ; ----
|
||||
ovps = (S.vp2old_vp (S.predV v)).s ! VIInf vt ! a ! pol ! defaultAgr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
|
||||
in
|
||||
sa ++ ovps.fin ++ ovps.inf ;
|
||||
-}
|
||||
|
||||
infVP : VVType -> Agr -> PrVerbPhrase -> Str = \vvt,agr,vp ->
|
||||
vp.inf ! vvt ++ vp.adV ++ vp.adj ! agr ++ vp.obj1 ! agr ++ vp.obj2 ! agr ++ vp.adv ++ vp.ext ;
|
||||
|
||||
impVP : Number -> PrVerbPhrase -> Str = \n,vp ->
|
||||
let agr = Ag n P2 in
|
||||
vp.imp ! n ++ vp.adV ++ vp.adj ! agr ++ vp.obj1 ! agr ++ vp.obj2 ! agr ++ vp.adv ++ vp.ext ;
|
||||
|
||||
declCl : PrClause -> Str = \cl ->
|
||||
cl.subj ++ cl.verb.fin ++ cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ;
|
||||
|
||||
declSubordCl : PrClause -> Str = declCl ;
|
||||
declInvCl : PrClause -> Str = declCl ; ---
|
||||
|
||||
questCl : PrQuestionClause -> Str = \cl ->
|
||||
let
|
||||
ko = case cl.h of {Back => "ko" ; Front => "kö"}
|
||||
in
|
||||
case cl.focType of {
|
||||
NoFoc => cl.verb.fin ++ Predef.BIND ++ ko ++
|
||||
cl.subj ++ cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ;
|
||||
_ => cl.foc ++ cl.subj ++ cl.verb.fin ++
|
||||
cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext
|
||||
} ;
|
||||
|
||||
questSubordCl : PrQuestionClause -> Str = questCl ;
|
||||
|
||||
that_Compl : Str = "että" ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
--- restCl : PrClause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ++ cl.c3.s.p1 ++ cl.c3.s.p2 ; ---- c3
|
||||
|
||||
negAdV : {s : Str ; p : Polarity} -> Str = \p -> p.s ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
||||
\sta,t,a,pol,o,agr,v ->
|
||||
let
|
||||
vit = case o of {Act => VIFin t ; Pass => VIPass t} ;
|
||||
ovps = (S.vp2old_vp (S.predV v)).s ! vit ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
|
||||
in
|
||||
<sta ++ ovps.fin, ovps.inf, []> ;
|
||||
|
||||
imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str = \s,p,it,v ->
|
||||
let
|
||||
ovps = (S.vp2old_vp (S.predV v)).s ! VIImper ! Simul ! p ! Ag it P2 ;
|
||||
in
|
||||
s ++ ovps.fin ++ ovps.inf ;
|
||||
|
||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str =
|
||||
\s,t,a,p,agr -> tenseV s t a p Act agr (liftV P.olla_V) ;
|
||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str =
|
||||
\s,a,p,vt -> tenseInfV s a p Act (liftV P.olla_V) vt ;
|
||||
tenseImpCopula : Str -> Polarity -> ImpType -> Str =
|
||||
\s,p,it -> imperativeV s p it (liftV P.olla_V) ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
applyVerb : PrVerbPhrase -> VAgr -> {inf,fin : Str}
|
||||
= \vp,agr -> vp.v ! agr ;
|
||||
|
||||
addObj2VP : PrVerbPhrase -> (Agr => Str) -> PrVerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = \\a => vp.obj2 ! a ++ obj ! a ;
|
||||
} ;
|
||||
|
||||
addExtVP : PrVerbPhrase -> Str -> PrVerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
not_Str : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => "inte"} ;
|
||||
|
||||
liftV : S.SVerb1 -> PrVerb = \v -> initPrVerb ** v ;
|
||||
|
||||
--- junk
|
||||
|
||||
qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str =
|
||||
\sta,t,a,p,agr,v -> <[],[]> ;
|
||||
qformsCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str =
|
||||
\sta,t,a,p,agr -> <[],[]> ;
|
||||
|
||||
qformsVP : PrVerbPhrase -> VAgr -> Str * Str
|
||||
= \vp,vagr -> <[],[]> ;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
instance PredInstanceSwe of PredInterface = open CommonScand, ResSwe, (P = ParadigmsSwe), (X = ParamX), Prelude in {
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
oper
|
||||
Gender = CommonScand.Gender ;
|
||||
Agr = CommonScand.Agr ;
|
||||
Case = CommonScand.Case ;
|
||||
NPCase = CommonScand.NPForm ;
|
||||
VForm = CommonScand.VForm ;
|
||||
VVType = Unit ; -----
|
||||
VType = CommonScand.VType ;
|
||||
|
||||
VAgr = Unit ;
|
||||
|
||||
SVoice = CommonScand.Voice ;
|
||||
|
||||
oper
|
||||
active = CommonScand.Act ;
|
||||
passive = CommonScand.Pass ;
|
||||
|
||||
defaultVType = VAct ;
|
||||
|
||||
subjCase : NPCase = NPNom ;
|
||||
objCase : NPCase = NPAcc ;
|
||||
|
||||
agentCase : ComplCase = "av" ;
|
||||
|
||||
ComplCase = Str ; -- preposition
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> p ++ np.s ! objCase ;
|
||||
noComplCase : ComplCase = [] ;
|
||||
strComplCase : ComplCase -> Str = \c -> c ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
RPCase = CommonScand.RCase ;
|
||||
subjRPCase : Agr -> RPCase = \a -> RNom ;
|
||||
|
||||
NAgr = Number ; --- only Indef Nom forms are needed here
|
||||
IPAgr = Number ; ----{g : Gender ; n : Number} ; --- two separate fields in RGL
|
||||
RPAgr = RAgr ;
|
||||
ICAgr = AFormPos ;
|
||||
|
||||
defaultAgr : Agr = {g = Utr ; n = Sg ; p = P3} ;
|
||||
|
||||
-- omitting rich Agr information
|
||||
agr2vagr : Agr -> VAgr = \a -> UUnit ;
|
||||
|
||||
agr2aagr : Agr -> AAgr = \a -> a ;
|
||||
|
||||
agr2icagr : Agr -> ICAgr = agr2aformpos ;
|
||||
|
||||
--- could use this?
|
||||
agr2aformpos : Agr -> AFormPos = \a ->
|
||||
case a.n of {
|
||||
Sg => Strong (GSg a.g) ;
|
||||
Pl => Strong GPl
|
||||
} ;
|
||||
|
||||
agr2nagr : Agr -> NAgr = \a -> a.n ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr = \a -> {g = Utr ; n = a ; p = P3} ; ----
|
||||
|
||||
ipagr2vagr : IPAgr -> VAgr = \n -> UUnit ;
|
||||
|
||||
rpagr2agr : RPAgr -> Agr -> Agr = \ra,a -> case ra of {
|
||||
RAg g n p => {g = g ; n = n ; p = p} ;
|
||||
RNoAg => a
|
||||
} ;
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr = \a -> defaultAgr ;
|
||||
|
||||
vPastPart : PrVerb -> AAgr -> Str = \v,a -> v.s ! VI (VPtPret (agr2aformpos a) Nom) ;
|
||||
vPresPart : PrVerb -> AAgr -> Str = \v,a -> v.s ! VI (VPtPres Sg Indef Nom) ;
|
||||
|
||||
vvInfinitive : VVType = UUnit ; ----
|
||||
|
||||
isRefl : PrVerb -> Bool = \v -> case v.vtype of {VRefl => True ; _ => False} ;
|
||||
|
||||
|
||||
------------------
|
||||
--- opers --------
|
||||
------------------
|
||||
|
||||
oper
|
||||
reflPron : Agr -> Str = ResSwe.reflPron ;
|
||||
|
||||
infVP : VVType -> Agr -> PrVerbPhrase -> Str = \vt, a,vp ->
|
||||
let
|
||||
a2 = case vp.obj2.p2 of {True => a ; False => vp.obj1.p2}
|
||||
in
|
||||
vp.adV ++ vp.inf ! UUnit ++
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
|
||||
|
||||
impVP : Number -> PrVerbPhrase -> Str = \n,vp ->
|
||||
let
|
||||
a = {g = Utr ; n = n ; p = P2}
|
||||
in
|
||||
vp.imp ! n ++ vp.part ++ ---- AdV contains inte
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a ++ vp.adv ++ vp.ext ;
|
||||
|
||||
|
||||
declCl : PrClause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : PrClause -> Str = \cl -> cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl ;
|
||||
declInvCl : PrClause -> Str = \cl -> cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questCl : PrQuestionClause -> Str = \cl -> cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questSubordCl : PrQuestionClause -> Str = \cl ->
|
||||
let
|
||||
rest = cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl
|
||||
in case cl.focType of {
|
||||
NoFoc => "om" ++ cl.foc ++ rest ; -- om hon sover
|
||||
FocObj => cl.foc ++ rest ; -- vem älskar hon / varför hon sover
|
||||
FocSubj => cl.foc ++ "som" ++ rest -- vem som älskar henne
|
||||
} ;
|
||||
|
||||
that_Compl : Str = "att" | [] ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : PrClause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ;
|
||||
|
||||
negAdV : {s : Str ; p : Polarity} -> Str = \p -> p.s ++ case p.p of {Pos => [] ; Neg => inte_Str} ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str = --- Polarity, VAgr not needed in Swe
|
||||
\sta,t,a,_,o,_,v ->
|
||||
let act = CommonScand.Act in
|
||||
case <t,a> of { --- sta dummy s field of Ant and Tense
|
||||
<Pres,Simul> => <sta ++ v.s ! VF (VPres o), [], []> ;
|
||||
<Past,Simul> => <sta ++ v.s ! VF (VPret o), [], []> ;
|
||||
<Fut, Simul> => <skola_V.s ! VF (VPres act), [], sta ++ v.s ! VI (VInfin o)> ;
|
||||
<Cond,Simul> => <skola_V.s ! VF (VPret act), [], sta ++ v.s ! VI (VInfin o)> ;
|
||||
<Pres,Anter> => <hava_V.s ! VF (VPres act), [], sta ++ v.s ! VI (VSupin o)> ;
|
||||
<Past,Anter> => <hava_V.s ! VF (VPret act), [], sta ++ v.s ! VI (VSupin o)> ;
|
||||
<Fut, Anter> => <skola_V.s ! VF (VPres act), hava_V.s ! VI (VInfin act), sta ++ v.s ! VI (VSupin o)> ;
|
||||
<Cond,Anter> => <skola_V.s ! VF (VPret act), hava_V.s ! VI (VInfin act), sta ++ v.s ! VI (VSupin o)>
|
||||
} ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str = \sa,a,_,o,v,_ -> ---- vvtype
|
||||
case a of {
|
||||
Simul => sa ++ v.s ! VI (VInfin o) ; -- hon vill sova
|
||||
Anter => hava_V.s ! VI (VInfin CommonScand.Act) ++ sa ++ v.s ! VI (VSupin o) -- hon vill (ha) sovit ---- discont?
|
||||
} ;
|
||||
|
||||
imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str = \s,p,it,v ->
|
||||
s ++ case p of {
|
||||
Pos => v.s ! VF (VImper CommonScand.Act) ; ---- deponents
|
||||
Neg => v.s ! VF (VImper CommonScand.Act) ++ inte_Str
|
||||
} ;
|
||||
|
||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str =
|
||||
\s,t,a,p,_ -> tenseV s t a p CommonScand.Act UUnit (liftV be_V) ;
|
||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str =
|
||||
\s,a,p,vt -> tenseInfV s a p CommonScand.Act (liftV be_V) vt ;
|
||||
tenseImpCopula : Str -> Polarity -> ImpType -> Str =
|
||||
\s,p,n -> imperativeV s p n (liftV be_V) ;
|
||||
|
||||
hava_V : Verb = P.mkV "ha" "har" "ha" "hade" "haft" "havd" ; -- havd not used
|
||||
be_V : Verb = P.mkV "vara" "är" "var" "var" "varit" "varen" ; -- varen not used
|
||||
skola_V : Verb = P.mkV "skola" ("ska" | "skall") "ska" "skulle" "skolat" "skolad" ; ---- not used but ska and skulle
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
addObj2VP : PrVerbPhrase -> (Agr => Str) -> PrVerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : PrVerbPhrase -> Str -> PrVerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
not_Str : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => inte_Str} ;
|
||||
|
||||
inte_Str = "inte" | "icke" | "ej" ;
|
||||
|
||||
liftV : Verb -> PrVerb = \v ->
|
||||
{s = v.s ; p = v.part ; c1,c2 = [] ; isSubjectControl = True ; vtype = v.vtype ; vvtype = vvInfinitive} ; ---- vvtype
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,278 +0,0 @@
|
||||
interface PredInterface = open Prelude, (X = ParamX) in {
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
-- standard usually general
|
||||
oper
|
||||
Number : PType = X.Number ;
|
||||
Person : PType = X.Person ;
|
||||
Anteriority : PType = X.Anteriority ;
|
||||
Polarity : PType = X.Polarity ;
|
||||
STense : PType = X.Tense ;
|
||||
SVoice : PType ;
|
||||
|
||||
ImpType : PType = Number ;
|
||||
|
||||
param
|
||||
Voice = Act | Pass ; --- should be in ParamX
|
||||
Unit = UUnit ; --- should be in Prelude
|
||||
|
||||
-- this works for typical "wh movement" languages
|
||||
|
||||
FocusType = NoFoc | FocSubj | FocObj ; -- sover hon/om hon sover, vem älskar hon/vem hon älskar, vem sover/vem som sover
|
||||
|
||||
-- language-dependent
|
||||
|
||||
oper
|
||||
Gender : PType ;
|
||||
Agr : PType ; -- full agreement, inherent in NP
|
||||
Case : PType ; -- case of CN
|
||||
NPCase : PType ; -- full case of NP
|
||||
VForm : PType ; -- inflection form of V
|
||||
VVType : PType ; -- infinitive form required by VV
|
||||
|
||||
|
||||
-- language dependent
|
||||
|
||||
VAgr : PType ; -- agr features that a verb form depends on
|
||||
VType : PType ; -- reflexive, auxiliary, deponent,...
|
||||
|
||||
oper
|
||||
active : SVoice ;
|
||||
passive : SVoice ;
|
||||
|
||||
defaultVType : VType ;
|
||||
|
||||
subjCase : NPCase ;
|
||||
objCase : NPCase ;
|
||||
|
||||
ComplCase : Type ; -- e.g. preposition
|
||||
agentCase : ComplCase ;
|
||||
strComplCase : ComplCase -> Str ;
|
||||
|
||||
NounPhrase : Type = {s : NPCase => Str ; a : Agr} ;
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str ;
|
||||
noComplCase : ComplCase ;
|
||||
|
||||
appSubjCase : NounPhrase -> Str = \np -> np.s ! subjCase ;
|
||||
appObjCase : NounPhrase -> Str = \np -> np.s ! objCase ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
RPCase : PType ;
|
||||
subjRPCase : Agr -> RPCase ;
|
||||
|
||||
NAgr : PType ;
|
||||
AAgr = Agr ; -- because of reflexives: "happy with itself"
|
||||
IPAgr : PType ; -- agreement of IP
|
||||
RPAgr : PType ; -- agreement of RP
|
||||
ICAgr : PType ; -- agreement to IComp
|
||||
|
||||
defaultAgr : Agr ;
|
||||
|
||||
-- omitting parts of Agr information
|
||||
|
||||
agr2vagr : Agr -> VAgr ;
|
||||
agr2aagr : Agr -> AAgr ;
|
||||
agr2nagr : Agr -> NAgr ;
|
||||
agr2icagr : Agr -> ICAgr ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr ;
|
||||
ipagr2vagr : IPAgr -> VAgr ;
|
||||
rpagr2agr : RPAgr -> Agr -> Agr ; -- the agr can come from the RP itself or from above
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr ;
|
||||
|
||||
-- participles as adjectives
|
||||
vPastPart : PrVerb -> AAgr -> Str ;
|
||||
vPresPart : PrVerb -> AAgr -> Str ;
|
||||
|
||||
vvInfinitive : VVType ;
|
||||
|
||||
isRefl : PrVerb -> Bool ;
|
||||
|
||||
applyVerb : PrVerbPhrase -> VAgr -> Str * Str * Str
|
||||
= \vp,a -> vp.v ! a ;
|
||||
|
||||
-------------------------------
|
||||
--- type synonyms
|
||||
-------------------------------
|
||||
|
||||
oper
|
||||
PrVerb = BasePrVerb ;
|
||||
PrVerbPhrase = BasePrVerbPhrase ;
|
||||
PrClause = BasePrClause ;
|
||||
PrQuestionClause = BasePrQuestionClause ;
|
||||
|
||||
initPrVerb = initBasePrVerb ;
|
||||
initPrVerbPhrase = initBasePrVerbPhrase ;
|
||||
initPrVerbPhraseV = initBasePrVerbPhraseV ;
|
||||
initPrClause = initBasePrClause ;
|
||||
|
||||
|
||||
|
||||
BasePrVerb = {
|
||||
s : VForm => Str ;
|
||||
p : Str ; -- verb particle
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
isSubjectControl : Bool ;
|
||||
vtype : VType ;
|
||||
vvtype : VVType ;
|
||||
} ;
|
||||
|
||||
initBasePrVerb : BasePrVerb = {
|
||||
s = \\_ => [] ;
|
||||
p = [] ;
|
||||
c1 = noComplCase ;
|
||||
c2 = noComplCase ;
|
||||
isSubjectControl = True ;
|
||||
vtype = defaultVType ;
|
||||
vvtype = vvInfinitive ;
|
||||
} ;
|
||||
|
||||
BasePrVerbPhrase = {
|
||||
v : VAgr => Str * Str * Str ; -- would,have,slept
|
||||
inf : VVType => Str ; -- (not) ((to)(sleep|have slept) | (sleeping|having slept)
|
||||
imp : ImpType => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
part : Str ; -- (look) up
|
||||
adj : Agr => Str ;
|
||||
obj1 : (Agr => Str) * Agr ; -- agr for object control
|
||||
obj2 : (Agr => Str) * Bool ; -- subject control = True
|
||||
vvtype : VVType ; -- type of VP complement
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
} ;
|
||||
|
||||
initBasePrVerbPhrase : BasePrVerbPhrase = {
|
||||
v : VAgr => Str * Str * Str = \\_ => <[],[],[]> ;
|
||||
inf : VVType => Str = \\_ => [] ;
|
||||
imp : ImpType => Str = \\_ => [] ;
|
||||
c1 : ComplCase = noComplCase ;
|
||||
c2 : ComplCase = noComplCase ;
|
||||
part : Str = [] ; -- (look) up
|
||||
adj : Agr => Str = noObj ;
|
||||
obj1 : (Agr => Str) * Agr = <\\_ => [], defaultAgr> ; -- agr for object control
|
||||
obj2 : (Agr => Str) * Bool = <\\_ => [], True>; -- subject control = True
|
||||
vvtype : VVType = vvInfinitive ; -- type of VP complement
|
||||
adv : Str = [] ;
|
||||
adV : Str = [] ;
|
||||
ext : Str = [] ;
|
||||
} ;
|
||||
|
||||
initBasePrVerbPhraseV :
|
||||
{s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} -> PrVerb -> BasePrVerbPhrase =
|
||||
\a,t,p,v -> initBasePrVerbPhrase ** {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p active agr v ;
|
||||
inf = \\vt => tenseInfV a.s a.a p.p active v vt ;
|
||||
imp = \\it => imperativeV p.s p.p it v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
part = v.p ;
|
||||
obj1 = <case isRefl v of {True => \\a => reflPron a ; _ => \\_ => []}, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, v.isSubjectControl> ;
|
||||
vvtype = v.vvtype ;
|
||||
adV = negAdV p ; --- just p.s in Eng
|
||||
} ;
|
||||
|
||||
BasePrClause = {
|
||||
v : Str * Str * Str ;
|
||||
adj,obj1,obj2 : Str ;
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
subj : Str ;
|
||||
c3 : ComplCase ; -- for a slashed adjunct, not belonging to the verb valency
|
||||
} ;
|
||||
|
||||
initBasePrClause : BasePrClause = {
|
||||
v : Str * Str * Str = <[],[],[]> ;
|
||||
adj,obj1,obj2 : Str = [] ;
|
||||
adv,adV,ext : Str = [] ;
|
||||
subj : Str = [] ;
|
||||
c3 : ComplCase = noComplCase ; -- for a slashed adjunct, not belonging to the verb valency
|
||||
} ;
|
||||
|
||||
BasePrQuestionClause = PrClause ** {
|
||||
foc : Str ; -- the focal position at the beginning: *who* does she love
|
||||
focType : FocusType ; --- if already filled, then use other place: who loves *who*
|
||||
} ;
|
||||
|
||||
PrAdverb = {s : Str ; isAdV : Bool ; c1 : ComplCase} ;
|
||||
|
||||
|
||||
useCopula : {s : Str ; a : Anteriority} -> {s : Str ; t : STense} -> {s : Str ; p : Polarity} ->
|
||||
PrVerbPhrase =
|
||||
\a,t,p -> initPrVerbPhrase ** {
|
||||
v = \\agr => tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
inf = \\vt => tenseInfCopula a.s a.a p.p vt ;
|
||||
imp = \\n => tenseImpCopula p.s p.p n ;
|
||||
adV = negAdV p ;
|
||||
} ;
|
||||
|
||||
|
||||
linrefPrVP : PrVerbPhrase -> Str = \vp ->
|
||||
let
|
||||
agr = defaultAgr ;
|
||||
vagr = agr2vagr agr ;
|
||||
verb = vp.v ! vagr ;
|
||||
in
|
||||
verb.p1 ++ verb.p2 ++ vp.adV ++ verb.p3 ++ vp.part ++
|
||||
vp.adj ! agr ++ vp.obj1.p1 ! agr ++ vp.obj2.p1 ! agr ++ vp.adv ++ vp.ext ;
|
||||
|
||||
linrefPrCl : PrClause -> Str = \cl -> declCl cl ;
|
||||
linrefPrQCl : PrQuestionClause -> Str = \qcl -> questCl qcl ;
|
||||
linrefPrAdv : PrAdverb -> Str = \adv -> strComplCase adv.c1 ++ adv.s ;
|
||||
---- linrefPrAP = \ap -> ap.s ! defaultAgr ++ ap.obj1 ! defaultAgr ;
|
||||
---- linrefPrCN = \cn -> cn.s ! Sg ++ cn.obj1 ! defaultAgr ;
|
||||
|
||||
|
||||
---------------------------
|
||||
---- concrete syntax opers
|
||||
---------------------------
|
||||
|
||||
oper
|
||||
reflPron : Agr -> Str ;
|
||||
|
||||
infVP : VVType -> Agr -> PrVerbPhrase -> Str ;
|
||||
|
||||
impVP : Number -> PrVerbPhrase -> Str ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str ;
|
||||
|
||||
imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str ;
|
||||
|
||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str ;
|
||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str ;
|
||||
tenseImpCopula : Str -> Polarity -> ImpType -> Str ;
|
||||
|
||||
declCl : PrClause -> Str ;
|
||||
declSubordCl : PrClause -> Str ;
|
||||
declInvCl : PrClause -> Str ;
|
||||
|
||||
questCl : PrQuestionClause -> Str ;
|
||||
questSubordCl : PrQuestionClause -> Str ;
|
||||
|
||||
that_Compl : Str ;
|
||||
|
||||
addObj2VP : PrVerbPhrase -> (Agr => Str) -> PrVerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : PrVerbPhrase -> Str -> PrVerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
not_Str : Polarity -> Str ;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
concrete PredSwe of Pred =
|
||||
CatSwe [Ant,NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Imp,Subj] **
|
||||
PredFunctor - [RelVP,RelSlash] ---- incompatible arity: to be fixed in RGL
|
||||
with
|
||||
(PredInterface = PredInstanceSwe)
|
||||
|
||||
** open ResSwe, CommonScand in {
|
||||
|
||||
lin
|
||||
RelVP rp vp =
|
||||
let
|
||||
cl : Agr -> RCase -> PrClause = \a,c ->
|
||||
let rpa = rpagr2agr rp.a a in
|
||||
|
||||
vp ** {
|
||||
v = applyVerb vp (agr2vagr rpa) ;
|
||||
subj = rp.s ! a.g ! a.n ! subjRPCase a ;
|
||||
adj = vp.adj ! rpa ;
|
||||
obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => rpa ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
}
|
||||
in {s = \\a,c => declCl (cl a c) ; c = subjCase} ;
|
||||
|
||||
RelSlash rp cl = {
|
||||
s = \\a,c => rp.s ! a.g ! a.n ! subjRPCase (rpagr2agr rp.a a) ++ declCl cl ; ---- rp case
|
||||
c = objCase
|
||||
} ;
|
||||
|
||||
NomVPNP vpi = {
|
||||
s = \\c => "att" ++ vpi.s ! vvInfinitive ! defaultAgr ;
|
||||
a = defaultAgr ** {g = Neutr} ;
|
||||
} ;
|
||||
|
||||
ByVP x vp vpi = vp ** {adv = "genom att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||
WhenVP x vp vpi = vp ** {adv = "vid att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr ----
|
||||
BeforeVP x vp vpi = vp ** {adv = "innan att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr ----
|
||||
AfterVP x vp vpi = vp ** {adv = "efter att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||
InOrderVP x vp vpi = vp ** {adv = "för att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||
WithoutVP x vp vpi = vp ** {adv = "utan att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# Experimental
|
||||
|
||||
This directory is removed from the main repo, and kept only in the branch `experimental`.
|
||||
@@ -1,20 +0,0 @@
|
||||
abstract RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
Noun - [PPartNP], -- to be generalized
|
||||
Adjective,
|
||||
Numeral,
|
||||
Conjunction,
|
||||
Adverb,
|
||||
Phrase,
|
||||
---- Sentence,
|
||||
Question - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
Relative - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
Symbol [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseBul of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
TenseX - [CAdv,IAdv,TTAnt],
|
||||
NounBul - [PPartNP], -- to be generalized
|
||||
AdjectiveBul,
|
||||
NumeralBul,
|
||||
ConjunctionBul,
|
||||
AdverbBul,
|
||||
PhraseBul,
|
||||
---- Sentence,
|
||||
QuestionBul - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeBul - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolBul [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseChi of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
NounChi - [PPartNP], -- to be generalized
|
||||
AdjectiveChi,
|
||||
NumeralChi,
|
||||
ConjunctionChi,
|
||||
AdverbChi,
|
||||
PhraseChi,
|
||||
---- Sentence,
|
||||
QuestionChi - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeChi - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolChi [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseEng of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
NounEng - [PPartNP], -- to be generalized
|
||||
AdjectiveEng,
|
||||
NumeralEng,
|
||||
ConjunctionEng,
|
||||
AdverbEng,
|
||||
PhraseEng,
|
||||
---- Sentence,
|
||||
QuestionEng - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeEng - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolEng [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseFin of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
NounFin - [PPartNP], -- to be generalized
|
||||
AdjectiveFin,
|
||||
NumeralFin,
|
||||
ConjunctionFin,
|
||||
AdverbFin,
|
||||
PhraseFin,
|
||||
---- Sentence,
|
||||
QuestionFin - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeFin - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolFin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseFre of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
TenseFre - [TTAnt],
|
||||
NounFre - [PPartNP], -- to be generalized
|
||||
AdjectiveFre,
|
||||
NumeralFre,
|
||||
ConjunctionFre,
|
||||
AdverbFre,
|
||||
PhraseFre,
|
||||
---- Sentence,
|
||||
QuestionFre - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeFre - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolFre [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseGer of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
TenseGer - [TTAnt],
|
||||
NounGer - [PPartNP], -- to be generalized
|
||||
AdjectiveGer,
|
||||
NumeralGer,
|
||||
ConjunctionGer,
|
||||
AdverbGer,
|
||||
PhraseGer,
|
||||
---- Sentence,
|
||||
QuestionGer - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeGer - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolGer [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,21 +0,0 @@
|
||||
concrete RGLBaseHin of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
TenseX - [TTAnt,Adv,AdN,SC],
|
||||
NounHin - [PPartNP], -- to be generalized
|
||||
AdjectiveHin,
|
||||
NumeralHin,
|
||||
ConjunctionHin,
|
||||
AdverbHin,
|
||||
PhraseHin,
|
||||
---- Sentence,
|
||||
QuestionHin - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeHin - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolHin [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseIta of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
TenseIta - [TTAnt],
|
||||
NounIta - [PPartNP], -- to be generalized
|
||||
AdjectiveIta,
|
||||
NumeralIta,
|
||||
ConjunctionIta,
|
||||
AdverbIta,
|
||||
PhraseIta,
|
||||
---- Sentence,
|
||||
QuestionIta - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeIta - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolIta [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseSpa of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
TenseSpa - [TTAnt],
|
||||
NounSpa - [PPartNP], -- to be generalized
|
||||
AdjectiveSpa,
|
||||
NumeralSpa,
|
||||
ConjunctionSpa,
|
||||
AdverbSpa,
|
||||
PhraseSpa,
|
||||
---- Sentence,
|
||||
QuestionSpa - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeSpa - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolSpa [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,20 +0,0 @@
|
||||
concrete RGLBaseSwe of RGLBase =
|
||||
|
||||
-- modules in Grammar, excluding Structural, Verb, Sentence, Question
|
||||
---- Tense,
|
||||
NounSwe - [PPartNP], -- to be generalized
|
||||
AdjectiveSwe,
|
||||
NumeralSwe,
|
||||
ConjunctionSwe,
|
||||
AdverbSwe,
|
||||
PhraseSwe,
|
||||
---- Sentence,
|
||||
QuestionSwe - [QuestCl,QuestVP,QuestSlash,QuestIAdv,QuestIComp],
|
||||
RelativeSwe - [RelCl,RelVP,RelSlash],
|
||||
---- Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP], ---- why only these?
|
||||
|
||||
SymbolSwe [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP] ; ---- why only these?
|
||||
|
||||
---- Construction,
|
||||
---- Extensions,
|
||||
---- Documentation ;
|
||||
@@ -1,230 +0,0 @@
|
||||
incomplete concrete NDPredFunctor of NDPred =
|
||||
Cat [Ant,NP,Utt,IP,IAdv,Conj,RS,RP,Subj] **
|
||||
open
|
||||
PredInterface,
|
||||
Pred,
|
||||
ParamX,
|
||||
Prelude
|
||||
in {
|
||||
|
||||
------------------------------------
|
||||
-- lincats
|
||||
-------------------------------------
|
||||
|
||||
lincat
|
||||
Tense = Pred.Tense ;
|
||||
Pol = Pred.Pol ;
|
||||
|
||||
PrV_none, PrV_np, PrV_v, PrV_s, PrV_q, PrV_a, PrV_n,
|
||||
PrV_np_np, PrV_np_v, PrV_np_s, PrV_np_q, PrV_np_a, PrV_np_n = Pred.PrV ;
|
||||
|
||||
PrVP_none, PrVP_np, PrVP_v, PrVP_s, PrVP_q, PrVP_a, PrVP_n,
|
||||
PrVP_np_np, PrVP_np_v, PrVP_np_s, PrVP_np_q, PrVP_np_a, PrVP_np_n = Pred.PrVP ;
|
||||
|
||||
PrVPI_none, PrVPI_np = Pred.PrVPI ;
|
||||
|
||||
PrCl_none, PrCl_np = Pred.PrCl ;
|
||||
|
||||
PrQCl_none, PrQCl_np = Pred.PrQCl ;
|
||||
|
||||
VPC_none, VPC_np = Pred.VPC ;
|
||||
|
||||
ClC_none, ClC_np = Pred.ClC ;
|
||||
|
||||
PrAdv_none, PrAdv_np = Pred.PrAdv ;
|
||||
|
||||
PrS = Pred.PrS ;
|
||||
|
||||
PrAP_none, PrAP_np = Pred.PrAP ;
|
||||
|
||||
PrCN_none, PrCN_np = Pred.PrCN ;
|
||||
|
||||
-- reference linearizations for chunking
|
||||
---- should be by functor as well
|
||||
|
||||
linref
|
||||
PrVP_none, PrVP_np, PrVP_v, PrVP_s, PrVP_q, PrVP_a, PrVP_n,
|
||||
PrVP_np_np, PrVP_np_v, PrVP_np_s, PrVP_np_q, PrVP_np_a, PrVP_np_n
|
||||
= linrefPrVP ;
|
||||
PrCl_none, PrCl_np = linrefPrCl ;
|
||||
PrQCl_none, PrQCl_np = linrefPrQCl ;
|
||||
PrAdv_none, PrAdv_np = linrefPrAdv ;
|
||||
---- PrAP_none, PrAP_np = \ap -> ap.s ! defaultAgr ++ ap.obj1 ! defaultAgr ;
|
||||
---- PrCN_none, PrCN_np = \cn -> cn.s ! Sg ++ cn.obj1 ! defaultAgr ;
|
||||
|
||||
----------------------------
|
||||
--- linearization rules ----
|
||||
----------------------------
|
||||
|
||||
lin
|
||||
|
||||
-- standard general
|
||||
|
||||
TPres = Pred.TPres ;
|
||||
TPast = Pred.TPast ;
|
||||
TFut = Pred.TFut ;
|
||||
TCond = Pred.TCond ;
|
||||
ASimul = Pred.ASimul ;
|
||||
AAnter = Pred.AAnter ;
|
||||
PPos = Pred.PPos ;
|
||||
PNeg = Pred.PNeg ;
|
||||
|
||||
UseV_none, UseV_np, UseV_v, UseV_s, UseV_q, UseV_a, UseV_n, UseV_np_np, UseV_np_v, UseV_np_s, UseV_np_q, UseV_np_a, UseV_np_n
|
||||
= Pred.UseV Pred.aNone ;
|
||||
{-
|
||||
PassUseV_none, PassUseV_np, PassUseV_v, PassUseV_s, PassUseV_q, PassUseV_a, PassUseV_n
|
||||
= Pred.PassUseV Pred.aNone ;
|
||||
AgentPassUseV_none, AgentPassUseV_np, AgentPassUseV_v, AgentPassUseV_s, AgentPassUseV_q, AgentPassUseV_a, AgentPassUseV_n
|
||||
= Pred.AgentPassUseV Pred.aNone ;
|
||||
-}
|
||||
UseAP_none, UseAP_np
|
||||
= Pred.UseAP Pred.aNone ;
|
||||
UseCN_none, UseCN_np
|
||||
= Pred.UseCN Pred.aNone ;
|
||||
UseAdv_none, UseAdv_np
|
||||
= Pred.UseAdv Pred.aNone ;
|
||||
UseNP_none
|
||||
= Pred.UseNP ;
|
||||
{-
|
||||
UseS_none
|
||||
= Pred.UseS ;
|
||||
UseQ_none
|
||||
= Pred.UseQ ;
|
||||
UseVP_none
|
||||
= Pred.UseVP ;
|
||||
-}
|
||||
ComplV2_none
|
||||
= Pred.ComplV2 Pred.aNone ;
|
||||
{-
|
||||
ComplVV_none, ComplVV_np
|
||||
= Pred.ComplVV Pred.aNone ;
|
||||
ComplVS_none, ComplVS_np
|
||||
= Pred.ComplVS Pred.aNone ;
|
||||
ComplVA_none
|
||||
= Pred.ComplVA Pred.aNone ;
|
||||
ComplVQ_none
|
||||
= Pred.ComplVQ Pred.aNone ;
|
||||
ComplVN_none
|
||||
= Pred.ComplVN Pred.aNone ;
|
||||
|
||||
SlashV3_none
|
||||
= Pred.SlashV3 Pred.aNone ;
|
||||
SlashV2V_none, SlashV2V_np
|
||||
= Pred.SlashV2V Pred.aNone ;
|
||||
SlashV2S_none
|
||||
= Pred.SlashV2S Pred.aNone ;
|
||||
SlashV2Q_none
|
||||
= Pred.SlashV2Q Pred.aNone ;
|
||||
SlashV2A_none
|
||||
= Pred.SlashV2A Pred.aNone ;
|
||||
SlashV2N_none
|
||||
= Pred.SlashV2N Pred.aNone ;
|
||||
|
||||
ReflVP_none, ReflVP_np, ReflVP_v, ReflVP_s, ReflVP_q, ReflVP_a, ReflVP_n
|
||||
= Pred.ReflVP Pred.aNone ;
|
||||
ReflVP2_np
|
||||
= Pred.ReflVP2 Pred.aNone ;
|
||||
|
||||
InfVP_none, InfVP_np
|
||||
= Pred.InfVP Pred.aNone ;
|
||||
-}
|
||||
PredVP_none, PredVP_np
|
||||
= Pred.PredVP Pred.aNone ;
|
||||
{-
|
||||
SlashClNP_none
|
||||
= Pred.SlashClNP Pred.aNone ;
|
||||
-}
|
||||
QuestCl_none, QuestCl_np
|
||||
= Pred.QuestCl Pred.aNone ;
|
||||
|
||||
QuestIAdv_none
|
||||
= Pred.QuestIAdv Pred.aNone ;
|
||||
|
||||
QuestIComp_none
|
||||
= Pred.QuestIComp ;
|
||||
|
||||
QuestVP_none
|
||||
= Pred.QuestVP Pred.aNone ;
|
||||
{-
|
||||
QuestSlash_none
|
||||
= Pred.QuestSlash Pred.aNone ;
|
||||
|
||||
UseCl_none
|
||||
= Pred.UseCl ;
|
||||
UseQCl_none
|
||||
= Pred.UseQCl ;
|
||||
|
||||
UseAdvCl_none
|
||||
= Pred.UseAdvCl ;
|
||||
-}
|
||||
UttPrS
|
||||
= Pred.UttPrS ;
|
||||
|
||||
AdvCl_none, AdvCl_np
|
||||
= Pred.AdvCl Pred.aNone ;
|
||||
{-
|
||||
AdvQCl_none, AdvQCl_np
|
||||
= Pred.AdvQCl Pred.aNone ;
|
||||
|
||||
---- RelCl_none
|
||||
---- = Pred.RelCl Pred.aNone ;
|
||||
RelVP_none
|
||||
= Pred.RelVP ;
|
||||
RelSlash_none
|
||||
= Pred.RelSlash ;
|
||||
|
||||
PrImpSg
|
||||
= Pred.PrImpSg ;
|
||||
PrImpPl
|
||||
= Pred.PrImpPl ;
|
||||
|
||||
PresPartAP_none, PresPartAP_np
|
||||
= Pred.PresPartAP Pred.aNone ;
|
||||
|
||||
PastPartAP_none
|
||||
= Pred.PastPartAP Pred.aNone ;
|
||||
|
||||
AgentPastPartAP_none
|
||||
= Pred.AgentPastPartAP Pred.aNone ;
|
||||
|
||||
NomVPNP_none
|
||||
= Pred.NomVPNP ;
|
||||
|
||||
ByVP_none
|
||||
= Pred.ByVP Pred.aNone ;
|
||||
WhenVP_none
|
||||
= Pred.WhenVP Pred.aNone ;
|
||||
BeforeVP_none
|
||||
= Pred.BeforeVP Pred.aNone ;
|
||||
AfterVP_none
|
||||
= Pred.AfterVP Pred.aNone ;
|
||||
InOrderVP_none
|
||||
= Pred.InOrderVP Pred.aNone ;
|
||||
WithoutVP_none
|
||||
= Pred.WithoutVP Pred.aNone ;
|
||||
|
||||
StartVPC_none, StartVPC_np
|
||||
= Pred.StartVPC Pred.aNone ;
|
||||
ContVPC_none, ContVPC_np
|
||||
= Pred.ContVPC Pred.aNone ;
|
||||
UseVPC_none, UseVPC_np
|
||||
= Pred.UseVPC Pred.aNone ;
|
||||
|
||||
StartClC_none, StartClC_np
|
||||
= Pred.StartClC Pred.aNone ;
|
||||
ContClC_none, ContClC_np
|
||||
= Pred.ContClC Pred.aNone ;
|
||||
UseClC_none, UseClC_np
|
||||
= Pred.UseClC Pred.aNone ;
|
||||
|
||||
ComplAdv_none
|
||||
= Pred.ComplAdv Pred.aNone ;
|
||||
|
||||
SubjUttPreS
|
||||
= Pred.SubjUttPreS ;
|
||||
SubjUttPreQ
|
||||
= Pred.SubjUttPreQ ;
|
||||
SubjUttPost
|
||||
= Pred.SubjUttPost ;
|
||||
-}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
abstract Test =
|
||||
Lift - [MkSymb]
|
||||
,Lexicon - [Pol,Tense]
|
||||
,Structural - [Pol,Tense]
|
||||
|
||||
** {
|
||||
flags
|
||||
startcat=Phr;
|
||||
-- heuristic_search_factor=0.60;
|
||||
-- meta_prob=1.0e-5;
|
||||
-- meta_token_prob=1.1965149246222233e-9;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
concrete TestChi of Test =
|
||||
LiftChi - [MkSymb]
|
||||
,LexiconChi - [Pol,Tense,Ant]
|
||||
,StructuralChi - [Pol,Tense,Ant]
|
||||
|
||||
** open ResChi, PredInstanceChi, Prelude in {
|
||||
|
||||
--flags literal=Symb ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
concrete TestEng of Test =
|
||||
LiftEng - [MkSymb]
|
||||
,LexiconEng - [Pol,Tense]
|
||||
,StructuralEng - [Pol,Tense]
|
||||
|
||||
** open ResEng, PredInstanceEng, Prelude, (Pr = PredEng) in {
|
||||
|
||||
--flags literal=Symb ;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
--# -path=.:../finnish/stemmed:../finnish:../common:alltenses
|
||||
|
||||
concrete TestFin of Test =
|
||||
LiftFin - [MkSymb]
|
||||
,LexiconFin - [Pol,Tense]
|
||||
,StructuralFin - [Pol,Tense]
|
||||
;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
concrete TestSwe of Test =
|
||||
LiftSwe - [MkSymb]
|
||||
,LexiconSwe - [Pol,Tense]
|
||||
,StructuralSwe - [Pol,Tense]
|
||||
|
||||
** open CommonScand, ResSwe, PredInstanceSwe, Prelude in {
|
||||
|
||||
--flags literal=Symb ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
abstract Predication = {
|
||||
|
||||
flags
|
||||
startcat = Utt ;
|
||||
|
||||
cat
|
||||
Arg ;
|
||||
V Arg ;
|
||||
VP Arg ;
|
||||
VPC Arg ; -- conjunction of VP
|
||||
Ant ;
|
||||
Tense ;
|
||||
Pol ;
|
||||
Cl Arg ;
|
||||
ClC Arg ; -- conjunction of Cl
|
||||
QCl Arg ;
|
||||
NP ;
|
||||
Adv Arg ; -- preposition is Adv aNP
|
||||
S ;
|
||||
Utt ;
|
||||
AP Arg ;
|
||||
CN Arg ; -- the country he became the president of
|
||||
IP ;
|
||||
Conj ;
|
||||
IAdv ;
|
||||
|
||||
fun
|
||||
aNone, aS, aV, aQ, aA, aN : Arg ;
|
||||
aNP : Arg -> Arg ;
|
||||
TPres, TPast, TFut, TCond : Tense ;
|
||||
PPos, PNeg : Pol ;
|
||||
ASimul, AAnter : Ant ;
|
||||
|
||||
UseV : Ant -> Tense -> Pol -> (a : Arg) -> V a -> VP a ;
|
||||
PassUseV : Ant -> Tense -> Pol -> (a : Arg) -> V (aNP a) -> VP a ;
|
||||
AgentPassUseV : Ant -> Tense -> Pol -> (a : Arg) -> V (aNP a) -> NP -> VP a ;
|
||||
|
||||
SlashV2 : (a : Arg) -> VP (aNP a) -> NP -> VP a ; -- consuming first NP
|
||||
SlashV3 : (a : Arg) -> VP (aNP (aNP a)) -> NP -> VP (aNP a) ; -- consuming second NP
|
||||
ComplVS : (a : Arg) -> VP aS -> Cl a -> VP a ;
|
||||
ComplVV : (a : Arg) -> VP aV -> VP a -> VP a ;
|
||||
ComplVQ : (a : Arg) -> VP aQ -> QCl a -> VP a ;
|
||||
ComplVA : (a : Arg) -> VP aA -> AP a -> VP a ;
|
||||
ComplVN : (a : Arg) -> VP aN -> CN a -> VP a ;
|
||||
SlashV2S : (a : Arg) -> VP (aNP aS) -> Cl a -> VP (aNP a) ; -- a:Arg gives slash propagation, SlashVS
|
||||
SlashV2V : (a : Arg) -> VP (aNP aV) -> VP a -> VP (aNP a) ;
|
||||
SlashV2A : (a : Arg) -> VP (aNP aA) -> AP a -> VP (aNP a) ;
|
||||
SlashV2N : (a : Arg) -> VP (aNP aN) -> CN a -> VP (aNP a) ;
|
||||
SlashV2Q : (a : Arg) -> VP (aNP aA) -> QCl a -> VP (aNP a) ;
|
||||
|
||||
UseAP : Ant -> Tense -> Pol -> (a : Arg) -> AP a -> VP a ;
|
||||
|
||||
PredVP : (a : Arg) -> NP -> VP a -> Cl a ;
|
||||
|
||||
SlashClNP : (a : Arg) -> Cl (aNP a) -> NP -> Cl a ; -- slash consumption: hon tittar på + oss
|
||||
|
||||
ReflVP : (a : Arg) -> VP (aNP a) -> VP a ; -- refl on first position (direct object)
|
||||
ReflVP2 : (a : Arg) -> VP (aNP (aNP a)) -> VP (aNP a) ; -- refl on second position (indirect object)
|
||||
|
||||
QuestVP : (a : Arg) -> IP -> VP a -> QCl a ;
|
||||
QuestSlash : (a : Arg) -> IP -> QCl (aNP a) -> QCl a ;
|
||||
QuestCl : (a : Arg) -> Cl a -> QCl a ;
|
||||
QuestIAdv : (a : Arg) -> IAdv -> Cl a -> QCl a ;
|
||||
|
||||
UseCl : Cl aNone -> S ;
|
||||
UseQCl : QCl aNone -> S ; -- deprecate QS
|
||||
|
||||
UseAdvCl : Adv aNone -> Cl aNone -> S ; -- lift adv to front
|
||||
|
||||
UttS : S -> Utt ;
|
||||
|
||||
-- when to add adverbs
|
||||
|
||||
---- AdvVP : Adv -> (a : Arg) -> VP a -> VP a ; ---- these create many ambiguities
|
||||
---- "hon tvingar oss att sova idag": 196 parses, 13s. With AdvVP restricted to top level: 32 parses, 7s
|
||||
---- with AdvCl, just 16 parses, 0.2 s
|
||||
|
||||
AdvCl : (a : Arg) -> Adv a -> Cl aNone -> Cl a ;
|
||||
|
||||
AdvQCl : (a : Arg) -> Adv a -> QCl aNone -> QCl a ;
|
||||
|
||||
|
||||
-- participles as adjectives
|
||||
|
||||
PresPartAP : (a : Arg) -> V a -> AP a ;
|
||||
PastPartAP : (a : Arg) -> V (aNP a) -> AP a ;
|
||||
AgentPastPartAP : (a : Arg) -> V (aNP a) -> NP -> AP a ;
|
||||
|
||||
-- VP coordination
|
||||
|
||||
StartVPC : Conj -> (a : Arg) -> VP a -> VP a -> VPC a ;
|
||||
ContVPC : (a : Arg) -> VP a -> VPC a -> VPC a ;
|
||||
UseVPC : (a : Arg) -> VPC a -> VP a ;
|
||||
|
||||
-- clause coordination, including "she loves and we look at (her)"
|
||||
StartClC : Conj -> (a : Arg) -> Cl a -> Cl a -> ClC a ;
|
||||
ContClC : (a : Arg) -> Cl a -> ClC a -> ClC a ;
|
||||
UseClC : (a : Arg) -> ClC a -> Cl a ;
|
||||
|
||||
ComplAdv : (a : Arg) -> Adv (aNP a) -> NP -> Adv a ; -- typically: formation of preposition phrase
|
||||
|
||||
--------------- from now on, to be inherited from standard RGL; here just for test purposes
|
||||
|
||||
|
||||
-- lexicon
|
||||
|
||||
sleep_V : V aNone ;
|
||||
walk_V : V aNone ;
|
||||
love_V2 : V (aNP aNone) ;
|
||||
look_V2 : V (aNP aNone) ;
|
||||
believe_VS : V aS ;
|
||||
tell_V2S : V (aNP aS) ;
|
||||
prefer_V3 : V (aNP (aNP aNone)) ;
|
||||
want_VV : V aV ;
|
||||
force_V2V : V (aNP aV) ;
|
||||
promise_V2V : V (aNP aV) ;
|
||||
wonder_VQ : V aQ ;
|
||||
become_VA : V aA ;
|
||||
become_VN : V aN ;
|
||||
make_V2A : V (aNP aA) ;
|
||||
ask_V2Q : V (aNP aQ) ;
|
||||
promote_V2N : V (aNP aN) ;
|
||||
|
||||
old_A : AP aNone ;
|
||||
married_A2 : AP (aNP aNone) ; -- married to her
|
||||
eager_AV : AP aV ; -- eager to sleep
|
||||
easy_A2V : AP (aNP aV) ; -- easy for him to sleep
|
||||
professor_N : CN aNone ;
|
||||
manager_N2 : CN (aNP aNone) ; -- manager of X
|
||||
|
||||
she_NP : NP ;
|
||||
we_NP : NP ;
|
||||
|
||||
today_Adv : Adv aNone ;
|
||||
always_AdV : Adv aNone ;
|
||||
who_IP : IP ;
|
||||
|
||||
with_Prep : Adv (aNP aNone) ;
|
||||
and_Conj : Conj ;
|
||||
why_IAdv : IAdv ;
|
||||
|
||||
}
|
||||
@@ -1,766 +0,0 @@
|
||||
concrete PredicationEng of Predication = open Prelude in {
|
||||
|
||||
-- English predication, based on Swedish
|
||||
-- two principles:
|
||||
-- - keep records discontinuous as long as possible (last step from Cl to S)
|
||||
-- - select from tables as soon as possible (first step from V to VP)
|
||||
-- a question: would it make sense to make this into a functor?
|
||||
|
||||
---------------------
|
||||
-- parameters -------
|
||||
---------------------
|
||||
|
||||
-- standard general
|
||||
param
|
||||
Number = Sg | Pl ;
|
||||
Person = P1 | P2 | P3 ;
|
||||
Anteriority = Simul | Anter ;
|
||||
Polarity = Pos | Neg ;
|
||||
STense = Pres | Past | Fut | Cond ;
|
||||
Voice = Act | Pass ;
|
||||
Unit = UUnit ;
|
||||
|
||||
-- predication specific
|
||||
FocusType = NoFoc | FocSubj | FocObj ; -- sover hon/om hon sover, vem älskar hon/vem hon älskar, vem sover/vem som sover
|
||||
|
||||
-- standard English
|
||||
Gender = Neutr | Masc | Fem ;
|
||||
Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ;
|
||||
Case = Nom | Acc ;
|
||||
NPCase = NCase Case | NPAcc | NPNomPoss ;
|
||||
VForm = VInf | VPres | VPast | VPPart | VPresPart ;
|
||||
|
||||
-- language dependent
|
||||
VAgr = VASgP1 | VASgP3 | VAPl ;
|
||||
|
||||
oper
|
||||
subjCase : NPCase = NCase Nom ;
|
||||
objCase : NPCase = NPAcc ;
|
||||
|
||||
agentCase : ComplCase = "by" ;
|
||||
|
||||
ComplCase = Str ; -- preposition
|
||||
|
||||
appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> p ++ np.s ! objCase ;
|
||||
noComplCase : ComplCase = [] ;
|
||||
prepComplCase : Preposition -> ComplCase = \p -> p.s ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
NAgr = Number ;
|
||||
AAgr = Unit ;
|
||||
IPAgr = Number ;
|
||||
|
||||
defaultAgr : Agr = AgP3Sg Neutr ;
|
||||
|
||||
-- omitting rich Agr information
|
||||
agr2vagr : Agr -> VAgr = \a -> case a of {
|
||||
AgP1 Sg => VASgP1 ;
|
||||
AgP3Sg _ => VASgP3 ;
|
||||
_ => VAPl
|
||||
} ;
|
||||
|
||||
agr2aagr : Agr -> AAgr = \n -> UUnit ;
|
||||
|
||||
agr2nagr : Agr -> NAgr = \a -> case a of {
|
||||
AgP1 n => n ;
|
||||
AgP2 n => n ;
|
||||
AgP3Sg _ => Sg ;
|
||||
AgP3Pl => Pl
|
||||
} ;
|
||||
|
||||
-- restoring full Agr
|
||||
ipagr2agr : IPAgr -> Agr = \n -> case n of {
|
||||
Sg => AgP3Sg Neutr ; ---- gender
|
||||
Pl => AgP3Pl
|
||||
} ;
|
||||
|
||||
ipagr2vagr : IPAgr -> VAgr = \n -> case n of {
|
||||
Sg => VASgP3 ;
|
||||
Pl => VAPl
|
||||
} ;
|
||||
|
||||
--- this is only needed in VPC formation
|
||||
vagr2agr : VAgr -> Agr = \a -> case a of {
|
||||
VASgP1 => AgP1 Sg ;
|
||||
VASgP3 => AgP3Sg Neutr ;
|
||||
VAPl => AgP3Pl
|
||||
} ;
|
||||
|
||||
vPastPart : AAgr -> VForm = \_ -> VPPart ;
|
||||
vPresPart : AAgr -> VForm = \_ -> VPresPart ;
|
||||
|
||||
------------------------------------
|
||||
-- lincats
|
||||
-------------------------------------
|
||||
|
||||
-- standard general
|
||||
lincat
|
||||
Tense = {s : Str ; t : STense} ;
|
||||
Ant = {s : Str ; a : Anteriority} ;
|
||||
Pol = {s : Str ; p : Polarity} ;
|
||||
Utt = {s : Str} ;
|
||||
IAdv = {s : Str} ;
|
||||
|
||||
-- predication-specific
|
||||
Arg = {s : Str} ;
|
||||
|
||||
V = {
|
||||
v : VForm => Str ;
|
||||
p : Str ; -- verb particle
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
isSubjectControl : Bool ;
|
||||
isAux : Bool ;
|
||||
isRefl : Bool ;
|
||||
} ;
|
||||
|
||||
oper
|
||||
VerbPhrase = {
|
||||
v : VAgr => Str * Str * Str ; -- would,have,slept
|
||||
inf : Str * Str ; -- have,slept
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
part : Str ; -- (look) up
|
||||
adj : Agr => Str ;
|
||||
obj1 : (Agr => Str) * Agr ; -- agr for object control
|
||||
obj2 : (Agr => Str) * Bool ; -- subject control = True
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
qforms : VAgr => Str * Str -- special Eng for introducing "do" in questions
|
||||
} ;
|
||||
|
||||
Clause = {
|
||||
v : Str * Str * Str ;
|
||||
inf : Str * Str ;
|
||||
adj,obj1,obj2 : Str ;
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
subj : Str ;
|
||||
c3 : ComplCase ; -- for a slashed adjunct, not belonging to the verb valency
|
||||
qforms : Str * Str
|
||||
} ;
|
||||
|
||||
lincat
|
||||
VP = VerbPhrase ;
|
||||
Cl = Clause ;
|
||||
|
||||
QCl = Clause ** {
|
||||
foc : Str ; -- the focal position at the beginning: *who* does she love
|
||||
focType : FocusType ; --- if already filled, then use other place: who loves *who*
|
||||
} ;
|
||||
|
||||
VPC = {
|
||||
v : VAgr => Str ;
|
||||
inf : Agr => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase
|
||||
} ;
|
||||
|
||||
ClC = {
|
||||
s : Str ;
|
||||
c3 : ComplCase ;
|
||||
} ;
|
||||
|
||||
Adv = {s : Str ; isAdV : Bool ; c1 : ComplCase} ;
|
||||
S = {s : Str} ;
|
||||
|
||||
AP = {
|
||||
s : AAgr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 : Agr => Str
|
||||
} ;
|
||||
|
||||
CN = {
|
||||
s : NAgr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 : Agr => Str
|
||||
} ;
|
||||
|
||||
-- language specific
|
||||
|
||||
NP = NounPhrase ;
|
||||
IP = {s : NPCase => Str ; n : IPAgr} ; ---- n : Number in Eng
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
|
||||
oper
|
||||
NounPhrase = {s : NPCase => Str ; a : Agr} ;
|
||||
Preposition = {s : Str} ;
|
||||
|
||||
----------------------------
|
||||
--- linearization rules ----
|
||||
----------------------------
|
||||
|
||||
-- standard general
|
||||
|
||||
lin
|
||||
TPres = {s = [] ; t = Pres} ;
|
||||
TPast = {s = [] ; t = Past} ;
|
||||
TFut = {s = [] ; t = Fut} ;
|
||||
TCond = {s = [] ; t = Cond} ;
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
-- predication specific
|
||||
|
||||
aNone, aS, aV, aA, aQ, aN = {s = []} ;
|
||||
aNP a = a ;
|
||||
|
||||
UseV a t p _ v = {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p Act agr v ;
|
||||
inf = tenseInfV a.s a.a p.p Act v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
part = v.p ;
|
||||
adj = noObj ;
|
||||
obj1 = <case v.isRefl of {True => \\a => reflPron ! a ; False => \\_ => []}, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, v.isSubjectControl> ;
|
||||
adV = negAdV p ; --- just p.s in Eng
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
qforms = \\agr => qformsV (a.s ++ t.s ++ p.s) t.t a.a p.p agr v ;
|
||||
} ;
|
||||
|
||||
PassUseV a t p _ v = {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass agr v ;
|
||||
inf = tenseInfV a.s a.a p.p Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
part = v.p ;
|
||||
adj = noObj ;
|
||||
obj1 = <noObj, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
adV = negAdV p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
qforms = \\agr => qformsBe (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
AgentPassUseV a t p _ v np = {
|
||||
v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass agr v ;
|
||||
inf = tenseInfV a.s a.a p.p Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
part = v.p ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj, True> ;
|
||||
adV = negAdV p ;
|
||||
adv = appComplCase agentCase np ;
|
||||
ext = [] ;
|
||||
qforms = \\agr => qformsBe (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
UseAP a t p _ ap = {
|
||||
v = \\agr => be_Aux (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
inf = tenseInfV a.s a.a p.p Act be_V ;
|
||||
c1 = ap.c1 ;
|
||||
c2 = ap.c2 ;
|
||||
part = [] ;
|
||||
adj = \\a => ap.s ! agr2aagr a ;
|
||||
obj1 = <ap.obj1, defaultAgr> ;
|
||||
obj2 = <noObj, True> ; --- there are no A3's
|
||||
adV = negAdV p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
qforms = \\agr => qformsBe (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||
} ;
|
||||
|
||||
SlashV2 x vp np = vp ** {
|
||||
obj1 : (Agr => Str) * Agr = <\\a => np.s ! objCase, np.a> -- np.a for object control
|
||||
} ;
|
||||
|
||||
SlashV3 x vp np = addObj2VP vp (\\a => np.s ! objCase) ; -- control is preserved
|
||||
|
||||
ComplVS x vp cl = addExtVP vp (that_Compl ++ declSubordCl (lin Cl cl)) ; ---- sentence form
|
||||
|
||||
ComplVQ x vp qcl = addExtVP vp (questSubordCl qcl) ; ---- question form
|
||||
|
||||
ComplVV x vp vpo = addObj2VP vp (\\a => infVP a vpo) ; ---- infForm
|
||||
|
||||
ComplVA x vp ap = addObj2VP vp (\\a => ap.s ! agr2aagr a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
ComplVN x vp cn = addObj2VP vp (\\a => cn.s ! agr2nagr a ++ cn.obj1 ! a) ; ---- cnForm
|
||||
|
||||
SlashV2S x vp cl = addExtVP vp (that_Compl ++ declSubordCl (lin Cl cl)) ; ---- sentence form
|
||||
|
||||
SlashV2Q x vp cl = addExtVP vp (questSubordCl (lin QCl cl)) ; ---- question form
|
||||
|
||||
SlashV2V x vp vpo = addObj2VP vp (\\a => infVP a (lin VP vpo)) ; ---- infForm
|
||||
|
||||
SlashV2A x vp ap = addObj2VP vp (\\a => ap.s ! agr2aagr a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
SlashV2N x vp cn = addObj2VP vp (\\a => cn.s ! agr2nagr a ++ cn.obj1 ! a) ; ---- cn form
|
||||
|
||||
ReflVP x vp = vp ** {
|
||||
obj1 : (Agr => Str) * Agr = <\\a => reflPron ! a, defaultAgr> ; --- defaultAgr will not be used but subj.a instead
|
||||
} ;
|
||||
|
||||
ReflVP2 x vp = vp ** {
|
||||
obj2 : (Agr => Str) * Bool = <\\a => reflPron ! a, vp.obj2.p2> ; --- subj/obj control doesn't matter any more
|
||||
} ;
|
||||
|
||||
PredVP x np vp = vp ** {
|
||||
v = vp.v ! agr2vagr np.a ;
|
||||
subj = np.s ! subjCase ;
|
||||
adj = vp.adj ! np.a ;
|
||||
obj1 = vp.part ++ vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase ---- place of part depends on obj
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
qforms = vp.qforms ! agr2vagr np.a ;
|
||||
} ;
|
||||
|
||||
PrepCl p x cl = cl ** { -- Cl/NP ::= Cl PP/NP
|
||||
c3 = prepComplCase p ;
|
||||
} ;
|
||||
|
||||
SlashClNP x cl np = cl ** { -- Cl ::= Cl/NP NP
|
||||
adv = cl.adv ++ appComplCase cl.c3 np ; ---- again, adv just added
|
||||
c3 = noComplCase ; -- complCase has been consumed
|
||||
} ;
|
||||
|
||||
|
||||
-- QCl ::= Cl by just adding focus field
|
||||
QuestCl x cl = cl ** {foc = [] ; focType = NoFoc} ; -- NoFoc implies verb first: does she love us
|
||||
|
||||
QuestIAdv x iadv cl = cl ** {foc = iadv.s ; focType = FocObj} ; -- FocObj implies Foc + V + Subj: why does she love us
|
||||
|
||||
QuestVP x ip vp = let ipa = ipagr2agr ip.n in
|
||||
vp ** {
|
||||
v = vp.v ! ipagr2vagr ip.n ;
|
||||
foc = ip.s ! subjCase ; -- who (loves her)
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
adj = vp.adj ! ipa ;
|
||||
obj1 = vp.part ++ vp.c1 ++ vp.obj1.p1 ! ipa ; ---- appComplCase
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ipa ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
qforms = vp.qforms ! ipagr2vagr ip.n ;
|
||||
} ;
|
||||
|
||||
QuestSlash x ip cl =
|
||||
let
|
||||
prep = cl.c3 ;
|
||||
ips = ip.s ! objCase ; -- in Cl/NP, c3 is the only prep ---- appComplCase for ip
|
||||
focobj = case cl.focType of {
|
||||
NoFoc => <ips, [], FocObj,prep> ; -- put ip object to focus if there is no focus yet
|
||||
t => <[], prep ++ ips, t,noComplCase> -- put ip object in situ if there already is a focus
|
||||
} ;
|
||||
in
|
||||
cl ** { -- preposition stranding
|
||||
foc = focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = focobj.p4 ;
|
||||
} ;
|
||||
{-
|
||||
---- this is giving four records instead of two AR 5/2/2014
|
||||
|
|
||||
cl ** { -- pied piping
|
||||
foc = focobj.p4 ++ focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = noComplCase ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
UseCl cl = {s = declCl cl} ;
|
||||
UseQCl cl = {s = questCl cl} ;
|
||||
|
||||
UseAdvCl adv cl = {s = adv.s ++ declInvCl cl} ;
|
||||
|
||||
UttS s = s ;
|
||||
|
||||
AdvCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
AdvQCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
|
||||
PresPartAP x v = {
|
||||
s = \\a => v.v ! vPresPart a ;
|
||||
c1 = v.c1 ; -- looking at her
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
PastPartAP x v = {
|
||||
s = \\a => v.v ! vPastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
AgentPastPartAP x v np = {
|
||||
s = \\a => v.v ! vPastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = \\_ => appComplCase agentCase np ; ---- addObj
|
||||
} ;
|
||||
|
||||
StartVPC c x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
let
|
||||
vv = v.v ! a ;
|
||||
wv = w.v ! a ;
|
||||
vpa = vagr2agr a ;
|
||||
in
|
||||
vv.p1 ++ v.adV ++ vv.p2 ++ vv.p3 ++ v.adj ! vpa ++
|
||||
v.c1 ++ v.obj1.p1 ! vpa ++ v.c2 ++ v.obj2.p1 ! vpa ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ c.s2 ++
|
||||
wv.p1 ++ w.adV ++ wv.p2 ++ wv.p3 ++ w.adj ! vpa ++ ---- appComplCase
|
||||
w.c1 ++ w.obj1.p1 ! vpa ++ w.c2 ++ w.obj2.p1 ! vpa ++ w.adv ++ w.ext ;
|
||||
inf = \\a =>
|
||||
infVP a (lin VP v) ++ c.s2 ++ infVP a (lin VP w) ;
|
||||
c1 = [] ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = [] ; ---- w.c2 ?
|
||||
} ;
|
||||
|
||||
UseVPC x vpc = { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = \\a => <[], [], vpc.v ! a> ;
|
||||
inf = <[], vpc.inf ! defaultAgr> ; ---- agreement
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
part = [] ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj,True> ;
|
||||
adv,adV = [] ;
|
||||
ext = [] ;
|
||||
qforms = \\a => <"do", vpc.inf ! defaultAgr> ; ---- do/does/did
|
||||
} ;
|
||||
|
||||
StartClC c x a b = {
|
||||
s = declCl (lin Cl a) ++ c.s2 ++ declCl (lin Cl b) ;
|
||||
c3 = b.c3 ; ----
|
||||
} ;
|
||||
|
||||
UseClC x cl = {
|
||||
subj = [] ;
|
||||
v = <[],[],cl.s> ; ----
|
||||
inf = <[],[]> ;
|
||||
adj = [] ;
|
||||
obj1 = [] ;
|
||||
obj2 = [] ;
|
||||
adV = [] ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
c3 = cl.c3 ;
|
||||
qforms = <[],[]> ; ---- qforms
|
||||
} ;
|
||||
|
||||
ComplAdv x p np = {s = p.c1 ++ np.s ! objCase ; isAdV = p.isAdV ; c1 = []} ;
|
||||
|
||||
|
||||
---- the following may become parameters for a functor
|
||||
|
||||
oper
|
||||
|
||||
be_V : V = lin V {v = mkVerb "be" "is" "was" "been" "being" ; p,c1,c2 = [] ; isAux = True ; isSubjectControl,isRefl = False} ;
|
||||
|
||||
negAdV : Pol -> Str = \p -> p.s ;
|
||||
|
||||
reflPron : Agr => Str = table {
|
||||
AgP1 Sg => "myself" ;
|
||||
AgP2 Sg => "yourself" ;
|
||||
AgP3Sg Masc => "himself" ;
|
||||
AgP3Sg Fem => "herself" ;
|
||||
AgP3Sg Neutr => "itself" ;
|
||||
AgP1 Pl => "ourselves" ;
|
||||
AgP2 Pl => "yourselves" ;
|
||||
AgP3Pl => "themselves"
|
||||
} ;
|
||||
|
||||
infVP : Agr -> VP -> Str = \a,vp ->
|
||||
let
|
||||
a2 = case vp.obj2.p2 of {True => a ; False => vp.obj1.p2}
|
||||
in
|
||||
vp.adV ++ vp.inf.p1 ++ vp.inf.p2 ++ vp.part ++
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
|
||||
|
||||
qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> V -> Str * Str =
|
||||
\sta,t,a,p,agr,v ->
|
||||
let
|
||||
verb = tenseActV sta t a Neg agr v ;
|
||||
averb = tenseActV sta t a p agr v
|
||||
in case <v.isAux, t, a> of {
|
||||
<False,Pres|Past,Simul> => case p of {
|
||||
Pos => < verb.p1, verb.p3> ; -- does , sleep
|
||||
Neg => < verb.p1, verb.p2> -- does , not sleep ---- TODO: doesn't , sleep
|
||||
} ;
|
||||
_ => <averb.p1, averb.p2>
|
||||
} ;
|
||||
|
||||
qformsBe : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str =
|
||||
\sta,t,a,p,agr ->
|
||||
let verb = be_AuxL sta t a p agr
|
||||
in <verb.p1, verb.p2> ; -- is , not ---- TODO isn't ,
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Polarity -> Voice -> VAgr -> V -> Str * Str * Str =
|
||||
\sta,t,a,p,o,agr,v ->
|
||||
case o of {
|
||||
Act => tenseActV sta t a p agr v ;
|
||||
Pass => tensePassV sta t a p agr v
|
||||
} {-
|
||||
| ---- leaving out these variants makes compilation time go down from 900ms to 300ms.
|
||||
---- parsing time of "she sleeps" goes down from 300ms to 60ms. 4/2/2014
|
||||
case o of {
|
||||
Act => tenseActVContracted sta t a p agr v ;
|
||||
Pass => tensePassVContracted sta t a p agr v
|
||||
-} ;
|
||||
|
||||
tenseActV : Str -> STense -> Anteriority -> Polarity -> VAgr -> V -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let vt : VForm = case <t,agr> of {
|
||||
<Pres,VASgP3> => VPres ;
|
||||
<Past|Cond,_ > => VPast ;
|
||||
_ => VInf
|
||||
} ;
|
||||
in
|
||||
case <t,a> of {
|
||||
<Pres|Past, Simul> =>
|
||||
case v.isAux of {
|
||||
True => <sta ++ v.v ! vt, [], []> ;
|
||||
False => case p of {
|
||||
Pos => <[], sta ++ v.v ! vt, []> ; -- this is the deviating case
|
||||
Neg => <do_Aux vt Pos, not_Str p, sta ++ v.v ! VInf>
|
||||
}
|
||||
} ;
|
||||
|
||||
<Pres|Past, Anter> => <have_Aux vt Pos, not_Str p, sta ++ v.v ! VPPart> ;
|
||||
<Fut|Cond, Simul> => <will_Aux vt Pos, not_Str p, sta ++ v.v ! VInf> ;
|
||||
<Fut|Cond, Anter> => <will_Aux vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.v ! VPPart>
|
||||
} ;
|
||||
|
||||
tenseActVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> V -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let vt : VForm = case <t,agr> of {
|
||||
<Pres,VASgP3> => VPres ;
|
||||
<Past|Cond,_ > => VPast ;
|
||||
_ => VInf
|
||||
} ;
|
||||
in
|
||||
|
||||
case <t,a> of {
|
||||
<Pres|Past, Simul> =>
|
||||
case v.isAux of {
|
||||
True => <sta ++ v.v ! vt, [], []> ;
|
||||
False => case p of {
|
||||
Pos => <[], sta ++ v.v ! vt, []> ; -- this is the deviating case
|
||||
Neg => <do_Aux vt p, [], sta ++ v.v ! VInf>
|
||||
}
|
||||
} ;
|
||||
<Pres|Past, Anter> => <have_AuxC vt p, [], sta ++ v.v ! VPPart>
|
||||
| <have_AuxC vt Pos, not_Str p, sta ++ v.v ! VPPart> ;
|
||||
<Fut|Cond, Simul> => <will_AuxC vt p, [], sta ++ v.v ! VInf>
|
||||
| <will_AuxC vt Pos, not_Str p, sta ++ v.v ! VInf> ;
|
||||
<Fut|Cond, Anter> => <will_AuxC vt p, have_Aux VInf Pos, sta ++ v.v ! VPPart>
|
||||
| <will_AuxC vt Pos, not_Str p ++ have_Aux VInf Pos, sta ++ v.v ! VPPart>
|
||||
} ;
|
||||
|
||||
tensePassV : Str -> STense -> Anteriority -> Polarity -> VAgr -> V -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let
|
||||
be = be_AuxL sta t a p agr ;
|
||||
done = v.v ! VPPart
|
||||
in
|
||||
<be.p1, be.p2, be.p3 ++ done> ;
|
||||
tensePassVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> V -> Str * Str * Str = \sta,t,a,p,agr,v ->
|
||||
let
|
||||
be = be_AuxC sta t a p agr ;
|
||||
done = v.v ! VPPart
|
||||
in
|
||||
<be.p1, be.p2, be.p3 ++ done> ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Polarity -> Voice -> V -> Str * Str = \sa,a,p,o,v ->
|
||||
case a of {
|
||||
Simul => <[], sa ++ v.v ! VInf> ; -- (she wants to) sleep
|
||||
Anter => <have_Aux VInf Pos, sa ++ v.v ! VPPart> -- (she wants to) have slept
|
||||
} ;
|
||||
|
||||
----- dangerous variants for PMCFG generation - keep apart as long as possible
|
||||
be_Aux : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
be_AuxL sta t a p agr | be_AuxC sta t a p agr ;
|
||||
be_AuxL : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
let
|
||||
beV = tenseActV sta t a p agr be_V
|
||||
in
|
||||
case <t,a,p,agr> of {
|
||||
<Pres,Simul,Pos,VASgP3> => <"is" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VASgP1> => <"am" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VAPl> => <"are" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP3> => <"is" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VASgP1> => <"am" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VAPl> => <"are" ++ sta, "not", []> ;
|
||||
<Past,Simul,Pos,VAPl> => <"were" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,VAPl> => <"were" ++ sta, "not", []> ;
|
||||
<Past,Simul,Neg,_> => <"was" ++ sta, "not", []> ;
|
||||
_ => beV
|
||||
} ;
|
||||
be_AuxC : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str = \sta,t,a,p,agr ->
|
||||
let
|
||||
beV = tenseActVContracted sta t a p agr be_V
|
||||
in
|
||||
case <t,a,p,agr> of {
|
||||
<Pres,Simul,Pos,VASgP3> => <Predef.BIND ++ "'s" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VASgP1> => <Predef.BIND ++ "'m" ++ sta, [], []> ;
|
||||
<Pres,Simul,Pos,VAPl> => <Predef.BIND ++ "'re" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP3> => <Predef.BIND ++ "'s" ++ sta, "not", []>
|
||||
| <"isn't" ++ sta, [], []> ;
|
||||
<Pres,Simul,Neg,VASgP1> => <Predef.BIND ++ "'m" ++ sta, "not", []> ;
|
||||
<Pres,Simul,Neg,VAPl> => <Predef.BIND ++ "'re" ++ sta, "not", []>
|
||||
| <"aren't" ++ sta, [], []> ;
|
||||
<Past,Simul,Pos,VAPl> => <"were" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,VAPl> => <"weren't" ++ sta, [], []> ;
|
||||
<Past,Simul,Neg,_> => <"wasn't" ++ sta, [], []> ;
|
||||
_ => beV
|
||||
} ;
|
||||
|
||||
declCl : Clause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : Clause -> Str = declCl ;
|
||||
declInvCl : Clause -> Str = declCl ;
|
||||
|
||||
questCl : QCl -> Str = \cl -> case cl.focType of {
|
||||
NoFoc => cl.foc ++ cl.qforms.p1 ++ cl.subj ++ cl.adV ++ cl.qforms.p2 ++ restCl cl ; -- does she sleep
|
||||
FocObj => cl.foc ++ cl.qforms.p1 ++ cl.subj ++ cl.adV ++ cl.qforms.p2 ++ restCl cl ; -- who does she love
|
||||
FocSubj => cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl -- who loves her
|
||||
} ;
|
||||
|
||||
questSubordCl : QCl -> Str = \cl ->
|
||||
let
|
||||
rest = cl.subj ++ cl.adV ++ cl.v.p1 ++ cl.v.p2 ++ restCl cl
|
||||
in case cl.focType of {
|
||||
NoFoc => "if" ++ cl.foc ++ rest ; -- om she sleeps
|
||||
FocObj => cl.foc ++ rest ; -- who she loves / why she sleeps
|
||||
FocSubj => cl.foc ++ rest -- who loves her
|
||||
} ;
|
||||
|
||||
that_Compl : Str = "that" | [] ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : Clause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ++ cl.c3 ;
|
||||
|
||||
|
||||
addObj2VP : VerbPhrase -> (Agr => Str) -> VerbPhrase = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : VerbPhrase -> Str -> VerbPhrase = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
---- the lexicon is just for testing: use standard Eng lexicon and morphology instead
|
||||
|
||||
lin
|
||||
sleep_V = mkV "sleep" "slept" "slept" [] [] ;
|
||||
walk_V = mkV "walk" ;
|
||||
love_V2 = mkV "love" ;
|
||||
look_V2 = mkV "look" "at" [] ;
|
||||
believe_VS = mkV "believe" ;
|
||||
tell_V2S = mkV "tell" "told" "told" [] [] ;
|
||||
prefer_V3 = mkV "prefer" [] "to" ;
|
||||
want_VV = mkV "want" [] "to" ;
|
||||
force_V2V = mkV "force" [] "to" ;
|
||||
--- promise_V2V = mkV "promise" [] "to" ** {isSubjectControl = True} ;
|
||||
wonder_VQ = mkV "wonder" ;
|
||||
become_VA = mkV "become" "became" "become" [] [] ;
|
||||
become_VN = mkV "become" "became" "become" [] [] ;
|
||||
make_V2A = mkV "make" "made" "made" [] [] ;
|
||||
promote_V2N = mkV "promote" [] "to" ;
|
||||
ask_V2Q = mkV "ask" ;
|
||||
|
||||
old_A = {s = \\_ => "old" ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
married_A2 = {s = \\_ => "married" ; c1 = "to" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
eager_AV = {s = \\_ => "eager" ; c1 = [] ; c2 = "to" ; obj1 = \\_ => []} ;
|
||||
easy_A2V = {s = \\_ => "easy" ; c1 = "for" ; c2 = "to" ; obj1 = \\_ => []} ;
|
||||
|
||||
professor_N = {s = table {Sg => "professor" ; Pl => "professors"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
manager_N2 = {s = table {Sg => "manager" ; Pl => "managers"} ; c1 = "for" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
|
||||
she_NP = {s = table {NCase Nom => "she" ; _ => "her"} ; a = AgP3Sg Fem} ;
|
||||
we_NP = {s = table {NCase Nom => "we" ; _ => "us"} ; a = AgP1 Pl} ;
|
||||
|
||||
today_Adv = {s = "today" ; isAdV = False ; c1 = []} ;
|
||||
always_AdV = {s = "always" ; isAdV = True ; c1 = []} ;
|
||||
|
||||
who_IP = {s = \\_ => "who" ; n = Sg} ;
|
||||
|
||||
with_Prep = {s = [] ; c1 = "with" ; isAdV = False} ;
|
||||
|
||||
and_Conj = {s1 = [] ; s2 = "and" ; n = Pl} ;
|
||||
|
||||
why_IAdv = {s = "why"} ;
|
||||
|
||||
oper
|
||||
mkV = overload {
|
||||
mkV : Str -> V = \s -> lin V {v = mkVerb s (s + "s") (edV s) (edV s) (ingV s) ; p,c1,c2 = [] ; isAux,isSubjectControl,isRefl = False} ;
|
||||
mkV : Str -> Str -> Str -> V = \s,p,q -> lin V {v = mkVerb s (s + "s") (edV s) (edV s) (ingV s) ; p = [] ; c1 = p ; c2 = q ; isAux,isSubjectControl,isRefl = False} ;
|
||||
mkV : Str -> Str -> Str -> Str -> Str -> V = \s,t,u,p,q -> lin V {v = mkVerb s (s + "s") t u (ingV s) ; p = [] ; c1 = p ; c2 = q ; isAux,isSubjectControl,isRefl = False} ;
|
||||
} ;
|
||||
|
||||
mkVerb : Str -> Str -> Str -> Str -> Str -> VForm => Str = \go,goes,went,gone,going -> table {
|
||||
VInf => go ;
|
||||
VPres => goes ;
|
||||
VPast => went ;
|
||||
VPPart => gone ;
|
||||
VPresPart => going
|
||||
} ;
|
||||
|
||||
edV : Str -> Str = \s -> case s of {us + "e" => us ; _ => s} + "ed" ;
|
||||
ingV : Str -> Str = \s -> case s of {us + "e" => us ; _ => s} + "ing" ;
|
||||
|
||||
---- have to split the tables to two to get reasonable PMCFG generation
|
||||
will_Aux : VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf|VPres, Pos> => varAux "will" "ll" ;
|
||||
<VInf|VPres, Neg> => "won't" ;
|
||||
<VPast|_ , Pos> => varAux "would" "d" ;
|
||||
<VPast|_ , Neg> => "wouldn't"
|
||||
} ;
|
||||
will_AuxC : VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf|VPres, Pos> => varAuxC "will" "ll" ;
|
||||
<VInf|VPres, Neg> => "won't" ;
|
||||
<VPast|_ , Pos> => varAuxC "would" "d" ;
|
||||
<VPast|_ , Neg> => "wouldn't"
|
||||
} ;
|
||||
|
||||
have_Aux : VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => varAux "have" "ve" ; --- slightly overgenerating if used in infinitive
|
||||
<VInf, Neg> => "haven't" ;
|
||||
<VPres, Pos> => varAux "has" "s" ;
|
||||
<VPres, Neg> => "hasn't" ;
|
||||
<VPast|_ , Pos> => varAux "had" "d" ;
|
||||
<VPast|_ , Neg> => "hadn't"
|
||||
} ;
|
||||
have_AuxC : VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => varAuxC "have" "ve" ; --- slightly overgenerating if used in infinitive
|
||||
<VInf, Neg> => "haven't" ;
|
||||
<VPres, Pos> => varAuxC "has" "s" ;
|
||||
<VPres, Neg> => "hasn't" ;
|
||||
<VPast|_ , Pos> => varAuxC "had" "d" ;
|
||||
<VPast|_ , Neg> => "hadn't"
|
||||
} ;
|
||||
|
||||
do_Aux : VForm -> Polarity -> Str = \vf,p -> case <vf,p> of {
|
||||
<VInf, Pos> => "do" ;
|
||||
<VInf, Neg> => "don't" ;
|
||||
<VPres, Pos> => "does" ;
|
||||
<VPres, Neg> => "doesn't" ;
|
||||
<VPast|_ , Pos> => "did" ;
|
||||
<VPast|_ , Neg> => "didn't"
|
||||
} ;
|
||||
|
||||
varAux : Str -> Str -> Str = \long,short -> long ; ----| Predef.BIND ++ ("'" + short) ;
|
||||
varAuxC : Str -> Str -> Str = \long,short -> Predef.BIND ++ ("'" + short) ;
|
||||
|
||||
not_Str : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => "not"} ;
|
||||
|
||||
}
|
||||
@@ -1,697 +0,0 @@
|
||||
concrete PredicationSwO of Predication = open Prelude in {
|
||||
|
||||
-- Swedish predication: simpler and purer than English.
|
||||
-- two principles:
|
||||
-- - keep records discontinuous as long as possible (last step from Cl to S)
|
||||
-- - select from tables as soon as possible (first step from V to VP)
|
||||
-- a question: would it make sense to make this into a functor?
|
||||
|
||||
param
|
||||
Agr = Sg | Pl ;
|
||||
Case = Nom | Acc ;
|
||||
STense = Pres | Past | Perf | Fut ;
|
||||
Anteriority = Simul | Anter ;
|
||||
Polarity = Pos | Neg ;
|
||||
VTense = VInf | VPres | VPret | VSup ;
|
||||
VForm = TV Voice VTense | PastPart Agr | PresPart ;
|
||||
Voice = Act | Pass ;
|
||||
|
||||
|
||||
FocusType = NoFoc | FocSubj | FocObj ; -- sover hon/om hon sover, vem älskar hon/vem hon älskar, vem sover/vem som sover
|
||||
|
||||
oper
|
||||
defaultAgr = Sg ;
|
||||
ComplCase = Str ; -- preposition
|
||||
|
||||
lincat
|
||||
Arg = {s : Str} ;
|
||||
|
||||
V = {
|
||||
v : VForm => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
isSubjectControl : Bool ;
|
||||
} ;
|
||||
|
||||
VP = {
|
||||
v : Str * Str * Str ; -- ska,ha,sovit
|
||||
inf : Str * Str ; -- ha,sovit
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
adj : Agr => Str ;
|
||||
obj1 : (Agr => Str) * Agr ;
|
||||
obj2 : (Agr => Str) * Bool ; -- subject control = True
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str
|
||||
} ;
|
||||
|
||||
oper Clause = {
|
||||
v : Str * Str * Str ;
|
||||
inf : Str * Str ;
|
||||
adj,obj1,obj2 : Str ;
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
subj : Str ;
|
||||
c3 : ComplCase -- for a slashed adjunct, not belonging to the verb valency
|
||||
} ;
|
||||
|
||||
lincat
|
||||
Cl = Clause ;
|
||||
|
||||
QCl = Clause ** {
|
||||
foc : Str ; -- the focal position at the beginning, e.g. *vem* älskar hon
|
||||
focType : FocusType ; --- if already filled, then use other place: vem älskar *vem*
|
||||
} ;
|
||||
|
||||
VPC = {
|
||||
v : Agr => Str ;
|
||||
inf : Agr => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase
|
||||
} ;
|
||||
|
||||
ClC = {
|
||||
s : Str ;
|
||||
c3 : ComplCase ;
|
||||
} ;
|
||||
|
||||
Tense = {s : Str ; t : STense} ;
|
||||
Ant = {s : Str ; a : Anteriority} ;
|
||||
Pol = {s : Str ; p : Polarity} ;
|
||||
|
||||
NP = {s : Case => Str ; a : Agr} ;
|
||||
Adv = {s : Str} ;
|
||||
AdV = {s : Str} ;
|
||||
S = {s : Str} ;
|
||||
Utt = {s : Str} ;
|
||||
AP = {
|
||||
s : Agr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 :
|
||||
Agr => Str
|
||||
} ;
|
||||
CN = {
|
||||
s : Agr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 :
|
||||
Agr => Str
|
||||
} ;
|
||||
IP = {s : Str ; a : Agr} ;
|
||||
Prep = {s : Str} ;
|
||||
Conj = {s : Str} ;
|
||||
IAdv = {s : Str} ;
|
||||
|
||||
lin
|
||||
aNone, aS, aV, aA, aQ, aN = {s = []} ;
|
||||
aNP a = a ;
|
||||
|
||||
TPres = {s = [] ; t = Pres} ;
|
||||
TPast = {s = [] ; t = Past} ;
|
||||
TFut = {s = [] ; t = Fut} ;
|
||||
TCond = {s = [] ; t = Perf} ;
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
UseV a t p _ v = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Act v ;
|
||||
inf = tenseInfV a.s a.a Act v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = noObj ;
|
||||
obj1 = <noObj, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, v.isSubjectControl> ;
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
PassUseV a t p _ v = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Pass v ;
|
||||
inf = tenseInfV a.s a.a Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = noObj ;
|
||||
obj1 = <noObj, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
AgentPassUseV a t p _ v np = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Pass v ;
|
||||
inf = tenseInfV a.s a.a Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj, True> ;
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = appComplCase agentCase np ; ---- add a specific field for agent?
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
UseAP a t p _ ap = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Act be_V ;
|
||||
inf = tenseInfV a.s a.a Act be_V ;
|
||||
c1 = ap.c1 ;
|
||||
c2 = ap.c2 ;
|
||||
adj = \\a => ap.s ! a ;
|
||||
obj1 = <ap.obj1, defaultAgr> ;
|
||||
obj2 = <noObj, True> ; --- there are no A3's
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
SlashV2 x vp np = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ; ---- should be consumed now
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = <\\a => np.s ! Acc, np.a> ; -- np.a for object control ---- Acc to be abstracted
|
||||
obj2 = vp.obj2 ;
|
||||
adv = vp.adv ;
|
||||
adV = vp.adV ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
SlashV3 x vp np = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- should be consumed now
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => np.s ! Acc, vp.obj2.p2> ; -- control is preserved ---- Acc to be abstracted
|
||||
adv = vp.adv ;
|
||||
adV = vp.adV ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
ComplVS x vp cl = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ; ---- consumed
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = that_Compl ++ declSubordCl (lin Cl cl) ; ---- sentence form
|
||||
} ;
|
||||
|
||||
ComplVQ x vp qcl = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ; ---- consumed
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = questSubordCl qcl ; ---- question form
|
||||
} ;
|
||||
|
||||
ComplVV x vp vpo = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => infVP a vpo, vp.obj2.p2> ; ---- infForm
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
ComplVA x vp ap = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ; ---- consumed
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => ap.s ! a ++ ap.obj1 ! a, vp.obj2.p2> ; ---- adjForm
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
ComplVN x vp cn = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ; ---- consumed
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => cn.s ! a ++ cn.obj1 ! a, vp.obj2.p2> ; ---- cnForm
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
SlashV2S x vp cl = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = that_Compl ++ declSubordCl (lin Cl cl) ; ---- sentence form
|
||||
} ;
|
||||
|
||||
SlashV2Q x vp cl = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = questSubordCl (lin QCl cl) ; ---- question form
|
||||
} ;
|
||||
|
||||
SlashV2V x vp vpo = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => infVP a (lin VP vpo), vp.obj2.p2> ; ---- infForm
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
SlashV2A x vp ap = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => ap.s ! a ++ ap.obj1 ! a, vp.obj2.p2> ; ---- adjForm
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
SlashV2N x vp cn = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => cn.s ! a ++ cn.obj1 ! a, vp.obj2.p2> ; ---- cn form
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
ReflVP x vp = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ; ---- consumed
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = <\\a => reflPron a, defaultAgr> ; --- hack: defaultAgr will not be used but subj.a instead
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
ReflVP2 x vp = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ; ---- consumed
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = <\\a => reflPron a, vp.obj2.p2> ; --- subj/obj control doesn't matter any more
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
PredVP x np vp = {
|
||||
subj = np.s ! Nom ;
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
adj = vp.adj ! np.a ;
|
||||
obj1 = vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
} ;
|
||||
|
||||
PrepCl p x cl = { -- Cl/NP ::= Cl PP/NP
|
||||
subj = cl.subj ;
|
||||
v = cl.v ;
|
||||
inf = cl.inf ;
|
||||
adj = cl.adj ;
|
||||
obj1 = cl.obj1 ;
|
||||
obj2 = cl.obj2 ;
|
||||
adV = cl.adV ;
|
||||
adv = cl.adv ;
|
||||
ext = cl.ext ;
|
||||
c3 = prepComplCase p ;
|
||||
} ;
|
||||
|
||||
SlashClNP x cl np = { -- Cl ::= Cl/NP NP
|
||||
subj = cl.subj ;
|
||||
v = cl.v ;
|
||||
inf = cl.inf ;
|
||||
adj = cl.adj ;
|
||||
obj1 = cl.obj1 ;
|
||||
obj2 = cl.obj2 ;
|
||||
adV = cl.adV ;
|
||||
adv = cl.adv ++ appComplCase cl.c3 np ; ---- again, adv just added
|
||||
ext = cl.ext ;
|
||||
c3 = noComplCase ; -- complCase has been consumed
|
||||
} ;
|
||||
|
||||
|
||||
-- QCl ::= Cl by just adding focus field
|
||||
QuestCl x cl = cl ** {foc = [] ; focType = NoFoc} ; -- NoFoc implies verb first: älskar hon oss
|
||||
|
||||
QuestIAdv x iadv cl = cl ** {foc = iadv.s ; focType = FocObj} ; -- FocObj implies Foc + V + Subj: varför älskar hon oss
|
||||
|
||||
QuestVP x ip vp = {
|
||||
foc = ip.s ; -- vem älskar henne
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
adj = vp.adj ! ip.a ;
|
||||
obj1 = vp.c1 ++ vp.obj1.p1 ! ip.a ; ---- appComplCase
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ip.a ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
} ;
|
||||
|
||||
QuestSlash x ip cl =
|
||||
let
|
||||
ips = cl.c3 ++ ip.s ; -- in Cl/NP, c3 is the only prep ---- appComplCase for ip
|
||||
focobj = case cl.focType of {
|
||||
NoFoc => <ips, [], FocObj> ; -- put ip object to focus if there is no focus yet
|
||||
t => <[], ips, t> -- put ip object in situ if there already is a focus
|
||||
} ;
|
||||
in {
|
||||
foc = focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
subj = cl.subj ;
|
||||
v = cl.v ;
|
||||
inf = cl.inf ;
|
||||
adj = cl.adj ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
obj2 = cl.obj2 ; ---- slash to this part? maybe with one more value of focType?
|
||||
adV = cl.adV ;
|
||||
adv = cl.adv ;
|
||||
ext = cl.ext ;
|
||||
c3 = noComplCase ;
|
||||
} ;
|
||||
|
||||
UseCl cl = {s = declCl cl} ;
|
||||
UseQCl cl = {s = questCl cl} ;
|
||||
|
||||
UttS s = s ;
|
||||
|
||||
AdvCl a x cl = {
|
||||
subj = cl.subj ;
|
||||
v = cl.v ;
|
||||
inf = cl.inf ;
|
||||
adj = cl.adj ;
|
||||
obj1 = cl.obj1 ;
|
||||
obj2 = cl.obj2 ;
|
||||
adV = cl.adV ;
|
||||
adv = cl.adv ++ a.s ;
|
||||
ext = cl.ext ;
|
||||
c3 = cl.c3 ;
|
||||
} ;
|
||||
|
||||
AdVCl a x cl = {
|
||||
subj = cl.subj ;
|
||||
v = cl.v ;
|
||||
inf = cl.inf ;
|
||||
adj = cl.adj ;
|
||||
obj1 = cl.obj1 ;
|
||||
obj2 = cl.obj2 ;
|
||||
adV = cl.adV ++ a.s ;
|
||||
adv = cl.adv ;
|
||||
ext = cl.ext ;
|
||||
c3 = cl.c3 ;
|
||||
} ;
|
||||
|
||||
|
||||
{-
|
||||
AdvVP adv x vp = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ;
|
||||
adv = vp.adv ++ adv.s ; ---- all adverbs become one field - how to front one of them?
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
AdVVP adv _ vp = {
|
||||
v = vp.v ;
|
||||
inf = vp.inf ;
|
||||
c1 = vp.c1 ;
|
||||
c2 = vp.c2 ;
|
||||
adj = vp.adj ;
|
||||
obj1 = vp.obj1 ;
|
||||
obj2 = vp.obj2 ;
|
||||
adV = vp.adV ++ adv.s ; ---- all adV's become one field - how to front one of them?
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PresPartAP x v = {
|
||||
s = \\a => v.v ! PresPart ;
|
||||
c1 = v.c1 ; -- tittande på henne
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
PastPartAP x v = {
|
||||
s = \\a => v.v ! PastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
AgentPastPartAP x v np = {
|
||||
s = \\a => v.v ! PastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = \\_ => appComplCase agentCase np ; ---- addObj
|
||||
} ;
|
||||
|
||||
StartVPC c x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
v.v.p1 ++ v.adV ++ v.v.p2 ++ v.v.p3 ++ v.adj ! a ++
|
||||
v.c1 ++ v.obj1.p1 ! a ++ v.c2 ++ v.obj2.p1 ! a ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ c.s ++
|
||||
w.v.p1 ++ w.adV ++ w.v.p2 ++ w.v.p3 ++ w.adj ! a ++ ---- appComplCase
|
||||
w.c1 ++ w.obj1.p1 ! a ++ w.c2 ++ w.obj2.p1 ! a ++ w.adv ++ w.ext ;
|
||||
inf = \\a =>
|
||||
infVP a (lin VP v) ++ c.s ++ infVP a (lin VP w) ;
|
||||
c1 = [] ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = [] ; ---- w.c2 ?
|
||||
} ;
|
||||
|
||||
UseVPC x vpc = { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = <[], [], vpc.v ! defaultAgr> ; ---- agreement
|
||||
inf = <[], vpc.inf ! defaultAgr> ; ---- agreement
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj,True> ;
|
||||
adv,adV = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
StartClC c x a b = {
|
||||
s = declCl (lin Cl a) ++ c.s ++ declCl (lin Cl b) ;
|
||||
c3 = b.c3 ; ----
|
||||
} ;
|
||||
|
||||
UseClC x cl = {
|
||||
subj = [] ;
|
||||
v = <[],[],cl.s> ; ----
|
||||
inf = <[],[]> ;
|
||||
adj = [] ;
|
||||
obj1 = [] ;
|
||||
obj2 = [] ;
|
||||
adV = [] ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
c3 = cl.c3 ;
|
||||
} ;
|
||||
|
||||
---- the lexicon is just for testing: use standard Swe lexicon and morphology instead
|
||||
|
||||
sleep_V = mkV "sova" "sover" "sov" "sovit" "soven" "sovna" ;
|
||||
walk_V = mkV "gå" "går" "gick" "gått" "gången" "gångna" ;
|
||||
love_V2 = mkV "älska" "älskar" "älskade" "älskat" "älskad" "älskade" ;
|
||||
look_V2 = mkV "titta" "tittar" "tittade" "tittat" "tittad" "tittade" "på" [] ;
|
||||
believe_VS = mkV "tro" "tror" "trodde" "trott" "trodd" "trodda" ;
|
||||
tell_V2S = mkV "berätta" "berättar" "berättade" "berättat" "berättad" "berättade" "för" [] ;
|
||||
prefer_V3 = mkV "föredra" "föredrar" "föredrog" "föredragit" "föredragen" "föredragna" [] "framför" ;
|
||||
want_VV = mkV "vilja" "vill" "ville" "velat" "velad" "velade" ;
|
||||
force_V2V = let tvinga : V = mkV "tvinga" "tvingar" "tvingade" "tvingat" "tvingad" "tvingade" in
|
||||
{v = tvinga.v ; c1 = [] ; c2 = "att" ; isSubjectControl = False} ;
|
||||
promise_V2V = mkV "lova" "lovar" "lovade" "lovat" "lovad" "lovade" [] "att" ;
|
||||
wonder_VQ = mkV "undra" "undrar" "undrade" "undrat" "undrad" "undrade" ;
|
||||
become_VA = mkV "bli" "blir" "blev" "blivit" "bliven" "blivna" ;
|
||||
become_VN = mkV "bli" "blir" "blev" "blivit" "bliven" "blivna" ;
|
||||
make_V2A = let gora : V = mkV "göra" "gör" "gjorde" "gjort" "gjord" "gjorda" in
|
||||
{v = table {TV Pass VPres => "görs" ; f => gora.v ! f} ; c1 = [] ; c2 = [] ; isSubjectControl = False} ;
|
||||
promote_V2N = let befordra : V = mkV "befordra" "befordrar" "befordrade" "befordrat" "befordrad" "befordrade"
|
||||
in {v = befordra.v ; c1 = [] ; c2 = "till" ; isSubjectControl = False} ; ---- ? de befordrade dem till chefer för sig/dem
|
||||
ask_V2Q = mkV "fråga" "frågar" "frågade" "frågat" "frågad" "frågade" ;
|
||||
|
||||
old_A = {s = table {Sg => "gammal" ; Pl => "gamla"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
married_A2 = {s = table {Sg => "gift" ; Pl => "gifta"} ; c1 = "med" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
eager_AV = {s = table {Sg => "ivrig" ; Pl => "ivriga"} ; c1 = [] ; c2 = "att" ; obj1 = \\_ => []} ;
|
||||
easy_A2V = {s = table {Sg => "lätt" ; Pl => "lätta"} ; c1 = "för" ; c2 = "att" ; obj1 = \\_ => []} ;
|
||||
professor_N = {s = table {Sg => "professor" ; Pl => "professorer"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
manager_N2 = {s = table {Sg => "chef" ; Pl => "chefer"} ; c1 = "för" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
|
||||
she_NP = {s = table {Nom => "hon" ; Acc => "henne"} ; a = Sg} ;
|
||||
we_NP = {s = table {Nom => "vi" ; Acc => "oss"} ; a = Pl} ;
|
||||
|
||||
today_Adv = {s = "idag"} ;
|
||||
always_AdV = {s = "alltid"} ;
|
||||
|
||||
who_IP = {s = "vem" ; a = Sg} ;
|
||||
|
||||
PrepNP p np = {s = p.s ++ np.s ! Acc} ;
|
||||
|
||||
with_Prep = {s = "med"} ;
|
||||
|
||||
and_Conj = {s = "och"} ;
|
||||
|
||||
why_IAdv = {s = "varför"} ;
|
||||
|
||||
oper
|
||||
mkV = overload {
|
||||
mkV : (x,y,z,u,v,w : Str) -> V = \x,y,z,u,v,w ->
|
||||
lin V {
|
||||
v = table {
|
||||
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
|
||||
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s" ;
|
||||
PastPart Sg => v ; PastPart Pl => w ; PresPart => x + "nde"
|
||||
} ;
|
||||
c1 = [] ; c2 = [] ; isSubjectControl = True} ;
|
||||
mkV : (x,y,z,u,v,w : Str) -> Str -> Str -> V = \x,y,z,u,v,w,p,q ->
|
||||
lin V {
|
||||
v = table {
|
||||
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
|
||||
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s" ;
|
||||
PastPart Sg => v ; PastPart Pl => w ; PresPart => x + "nde"
|
||||
} ;
|
||||
c1 = p ; c2 = q ; isSubjectControl = True} ;
|
||||
} ;
|
||||
|
||||
be_V : V = mkV "vara" "är" "var" "varit" "varen" "varna" ;
|
||||
|
||||
have_V : V = mkV "ha" "har" "hade" "haft" "havd" "havda" ;
|
||||
|
||||
shall_V : V = mkV "skola" "ska" "skulle" "skolat" "skolad" "skolade" ;
|
||||
|
||||
|
||||
---- the following may become parameters for a functor
|
||||
|
||||
neg : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => "inte"} ;
|
||||
|
||||
reflPron : Agr -> Str = \a -> case a of {Sg => "sig" ; Pl => "oss"} ;
|
||||
|
||||
infVP : Agr -> VP -> Str = \a,vp ->
|
||||
let
|
||||
a2 = case vp.obj2.p2 of {True => a ; False => vp.obj1.p2}
|
||||
in
|
||||
vp.adV ++ (vp.inf.p1 | []) ++ vp.inf.p2 ++ ---- *hon tvingar oss att sovit
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Voice -> V -> Str * Str * Str = \sta,t,a,o,v -> case <t,a> of { --- sta dummy s field of Ant and Tense
|
||||
<Pres,Simul> => <sta ++ v.v ! TV o VPres, [], []> ;
|
||||
<Past,Simul> => <sta ++ v.v ! TV o VPret, [], []> ;
|
||||
<Fut, Simul> => <shall_V.v ! TV Act VPres, [], sta ++ v.v ! TV o VInf> ;
|
||||
<Cond,Simul> => <shall_V.v ! TV Act VPret, [], sta ++ v.v ! TV o VInf> ;
|
||||
<Pres,Anter> => <[], have_V.v ! TV Act VPres, sta ++ v.v ! TV o VSup> ;
|
||||
<Past,Anter> => <[], have_V.v ! TV Act VPret, sta ++ v.v ! TV o VSup> ;
|
||||
<Fut, Anter> => <shall_V.v ! TV Act VPres, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup> ;
|
||||
<Cond,Anter> => <shall_V.v ! TV Act VPret, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup>
|
||||
} ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Voice -> V -> Str * Str = \sa,a,o,v ->
|
||||
case a of {
|
||||
Simul => <[], sa ++ v.v ! TV o VInf> ; -- hon vill sova
|
||||
Anter => <have_V.v ! TV Act VInf, sa ++ v.v ! TV o VSup> -- hon vill (ha) sovit
|
||||
} ;
|
||||
|
||||
|
||||
declCl : Clause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : Clause -> Str = \cl -> cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl ;
|
||||
declInvCl : Clause -> Str = \cl -> cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questCl : QCl -> Str = \cl -> cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questSubordCl : QCl -> Str = \cl ->
|
||||
let
|
||||
rest = cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl
|
||||
in case cl.focType of {
|
||||
NoFoc => "om" ++ cl.foc ++ rest ; -- om hon sover
|
||||
FocObj => cl.foc ++ rest ; -- vem älskar hon / varför hon sover
|
||||
FocSubj => cl.foc ++ "som" ++ rest -- vem som älskar henne
|
||||
} ;
|
||||
|
||||
that_Compl : Str = "att" | [] ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : Clause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ++ cl.c3 ;
|
||||
|
||||
agentCase : ComplCase = "av" ;
|
||||
|
||||
appComplCase : ComplCase -> NP -> Str = \p,np -> p ++ np.s ! Acc ;
|
||||
|
||||
noComplCase : ComplCase = [] ;
|
||||
|
||||
prepComplCase : Prep -> ComplCase = \p -> p.s ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
}
|
||||
@@ -1,492 +0,0 @@
|
||||
concrete PredicationSwe of Predication = open Prelude in {
|
||||
|
||||
-- Swedish predication: simpler and purer than English.
|
||||
-- two principles:
|
||||
-- - keep records discontinuous as long as possible (last step from Cl to S)
|
||||
-- - select from tables as soon as possible (first step from V to VP)
|
||||
-- a question: would it make sense to make this into a functor?
|
||||
|
||||
param
|
||||
Agr = Sg | Pl ;
|
||||
Case = Nom | Acc ;
|
||||
STense = Pres | Past | Perf | Fut ;
|
||||
Anteriority = Simul | Anter ;
|
||||
Polarity = Pos | Neg ;
|
||||
VTense = VInf | VPres | VPret | VSup ;
|
||||
VForm = TV Voice VTense | PastPart Agr | PresPart ;
|
||||
Voice = Act | Pass ;
|
||||
|
||||
|
||||
FocusType = NoFoc | FocSubj | FocObj ; -- sover hon/om hon sover, vem älskar hon/vem hon älskar, vem sover/vem som sover
|
||||
|
||||
oper
|
||||
defaultAgr = Sg ;
|
||||
ComplCase = Str ; -- preposition
|
||||
objCase = Acc ;
|
||||
|
||||
lincat
|
||||
Arg = {s : Str} ;
|
||||
|
||||
V = {
|
||||
v : VForm => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
isSubjectControl : Bool ;
|
||||
} ;
|
||||
|
||||
VP = {
|
||||
v : Str * Str * Str ; -- ska,ha,sovit
|
||||
inf : Str * Str ; -- ha,sovit
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase ;
|
||||
adj : Agr => Str ;
|
||||
obj1 : (Agr => Str) * Agr ;
|
||||
obj2 : (Agr => Str) * Bool ; -- subject control = True
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str
|
||||
} ;
|
||||
|
||||
oper Clause = {
|
||||
v : Str * Str * Str ;
|
||||
inf : Str * Str ;
|
||||
adj,obj1,obj2 : Str ;
|
||||
adv : Str ;
|
||||
adV : Str ;
|
||||
ext : Str ;
|
||||
subj : Str ;
|
||||
c3 : ComplCase -- for a slashed adjunct, not belonging to the verb valency
|
||||
} ;
|
||||
|
||||
lincat
|
||||
Cl = Clause ;
|
||||
|
||||
QCl = Clause ** {
|
||||
foc : Str ; -- the focal position at the beginning, e.g. *vem* älskar hon
|
||||
focType : FocusType ; --- if already filled, then use other place: vem älskar *vem*
|
||||
} ;
|
||||
|
||||
VPC = {
|
||||
v : Agr => Str ;
|
||||
inf : Agr => Str ;
|
||||
c1 : ComplCase ;
|
||||
c2 : ComplCase
|
||||
} ;
|
||||
|
||||
ClC = {
|
||||
s : Str ;
|
||||
c3 : ComplCase ;
|
||||
} ;
|
||||
|
||||
Tense = {s : Str ; t : STense} ;
|
||||
Ant = {s : Str ; a : Anteriority} ;
|
||||
Pol = {s : Str ; p : Polarity} ;
|
||||
|
||||
NP = {s : Case => Str ; a : Agr} ;
|
||||
Adv = {s : Str ; isAdV : Bool ; c1 : ComplCase} ;
|
||||
S = {s : Str} ;
|
||||
Utt = {s : Str} ;
|
||||
AP = {
|
||||
s : Agr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 :
|
||||
Agr => Str
|
||||
} ;
|
||||
CN = {
|
||||
s : Agr => Str ;
|
||||
c1, c2 : ComplCase ;
|
||||
obj1 :
|
||||
Agr => Str
|
||||
} ;
|
||||
IP = {s : Str ; a : Agr} ;
|
||||
Conj = {s : Str} ;
|
||||
IAdv = {s : Str} ;
|
||||
|
||||
lin
|
||||
aNone, aS, aV, aA, aQ, aN = {s = []} ;
|
||||
aNP a = a ;
|
||||
|
||||
TPres = {s = [] ; t = Pres} ;
|
||||
TPast = {s = [] ; t = Past} ;
|
||||
TFut = {s = [] ; t = Fut} ;
|
||||
TCond = {s = [] ; t = Perf} ;
|
||||
ASimul = {s = [] ; a = Simul} ;
|
||||
AAnter = {s = [] ; a = Anter} ;
|
||||
|
||||
PPos = {s = [] ; p = Pos} ;
|
||||
PNeg = {s = [] ; p = Neg} ;
|
||||
|
||||
UseV a t p _ v = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Act v ;
|
||||
inf = tenseInfV a.s a.a Act v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = noObj ;
|
||||
obj1 = <noObj, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, v.isSubjectControl> ;
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
PassUseV a t p _ v = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Pass v ;
|
||||
inf = tenseInfV a.s a.a Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = noObj ;
|
||||
obj1 = <noObj, defaultAgr> ; ---- not used, just default value
|
||||
obj2 = <noObj, True> ; -- becomes subject control even if object control otherwise "*she was promised by us to love ourselves"
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
AgentPassUseV a t p _ v np = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Pass v ;
|
||||
inf = tenseInfV a.s a.a Pass v ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj, True> ;
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = appComplCase agentCase np ; ---- add a specific field for agent?
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
UseAP a t p _ ap = {
|
||||
v = tenseV (a.s ++ t.s) t.t a.a Act be_V ;
|
||||
inf = tenseInfV a.s a.a Act be_V ;
|
||||
c1 = ap.c1 ;
|
||||
c2 = ap.c2 ;
|
||||
adj = \\a => ap.s ! a ;
|
||||
obj1 = <ap.obj1, defaultAgr> ;
|
||||
obj2 = <noObj, True> ; --- there are no A3's
|
||||
adV = p.s ++ neg p.p ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
SlashV2 x vp np = vp ** {
|
||||
obj1 : (Agr => Str) * Agr = <\\a => np.s ! Acc, np.a> -- np.a for object control ---- Acc to be abstracted
|
||||
} ;
|
||||
|
||||
SlashV3 x vp np = addObj2VP vp (\\a => np.s ! Acc) ; -- control is preserved ---- Acc to be abstracted
|
||||
|
||||
ComplVS x vp cl = addExtVP vp (that_Compl ++ declSubordCl (lin Cl cl)) ; ---- sentence form
|
||||
|
||||
ComplVQ x vp qcl = addExtVP vp (questSubordCl qcl) ; ---- question form
|
||||
|
||||
ComplVV x vp vpo = addObj2VP vp (\\a => infVP a vpo) ; ---- infForm
|
||||
|
||||
ComplVA x vp ap = addObj2VP vp (\\a => ap.s ! a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
ComplVN x vp cn = addObj2VP vp (\\a => cn.s ! a ++ cn.obj1 ! a) ; ---- cnForm
|
||||
|
||||
SlashV2S x vp cl = addExtVP vp (that_Compl ++ declSubordCl (lin Cl cl)) ; ---- sentence form
|
||||
|
||||
SlashV2Q x vp cl = addExtVP vp (questSubordCl (lin QCl cl)) ; ---- question form
|
||||
|
||||
SlashV2V x vp vpo = addObj2VP vp (\\a => infVP a (lin VP vpo)) ; ---- infForm
|
||||
|
||||
SlashV2A x vp ap = addObj2VP vp (\\a => ap.s ! a ++ ap.obj1 ! a) ; ---- adjForm
|
||||
|
||||
SlashV2N x vp cn = addObj2VP vp (\\a => cn.s ! a ++ cn.obj1 ! a) ; ---- cn form
|
||||
|
||||
ReflVP x vp = vp ** {
|
||||
obj1 : (Agr => Str) * Agr = <\\a => reflPron a, defaultAgr> ; --- hack: defaultAgr will not be used but subj.a instead
|
||||
} ;
|
||||
|
||||
ReflVP2 x vp = vp ** {
|
||||
obj2 : (Agr => Str) * Bool = <\\a => reflPron a, vp.obj2.p2> ; --- subj/obj control doesn't matter any more
|
||||
} ;
|
||||
|
||||
PredVP x np vp = vp ** {
|
||||
subj = np.s ! Nom ;
|
||||
adj = vp.adj ! np.a ;
|
||||
obj1 = vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash
|
||||
} ;
|
||||
|
||||
SlashClNP x cl np = cl ** { -- Cl ::= Cl/NP NP
|
||||
adv = cl.adv ++ appComplCase cl.c3 np ; ---- again, adv just added
|
||||
c3 = noComplCase ; -- complCase has been consumed
|
||||
} ;
|
||||
|
||||
|
||||
-- QCl ::= Cl by just adding focus field
|
||||
QuestCl x cl = cl ** {foc = [] ; focType = NoFoc} ; -- NoFoc implies verb first: älskar hon oss
|
||||
|
||||
QuestIAdv x iadv cl = cl ** {foc = iadv.s ; focType = FocObj} ; -- FocObj implies Foc + V + Subj: varför älskar hon oss
|
||||
|
||||
QuestVP x ip vp = vp ** {
|
||||
foc = ip.s ; -- vem älskar henne
|
||||
focType = FocSubj ;
|
||||
subj = [] ;
|
||||
adj = vp.adj ! ip.a ;
|
||||
obj1 = vp.c1 ++ vp.obj1.p1 ! ip.a ; ---- appComplCase
|
||||
obj2 = vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => ip.a ; False => vp.obj1.p2}) ; ---- appComplCase
|
||||
c3 = noComplCase ; -- for one more prep to build ClSlash ---- ever needed for QCl?
|
||||
} ;
|
||||
|
||||
|
||||
QuestSlash x ip cl =
|
||||
let
|
||||
prep = cl.c3 ;
|
||||
ips = ip.s ; -- in Cl/NP, c3 is the only prep ---- appComplCase for ip
|
||||
focobj = case cl.focType of {
|
||||
NoFoc => <ips, [], FocObj,prep> ; -- put ip object to focus if there is no focus yet
|
||||
t => <[], prep ++ ips, t,noComplCase> -- put ip object in situ if there already is a focus
|
||||
} ;
|
||||
in
|
||||
cl ** { -- preposition stranding
|
||||
foc = focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = focobj.p4 ;
|
||||
} ;
|
||||
{-
|
||||
---- this is giving four records instead of two AR 5/2/2014
|
||||
|
|
||||
cl ** { -- pied piping
|
||||
foc = focobj.p4 ++ focobj.p1 ;
|
||||
focType = focobj.p3 ;
|
||||
obj1 = cl.obj1 ++ focobj.p2 ; ---- just add to a field?
|
||||
c3 = noComplCase ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
|
||||
|
||||
UseCl cl = {s = declCl cl} ;
|
||||
UseQCl cl = {s = questCl cl} ;
|
||||
|
||||
UseAdvCl adv cl = {s = adv.s ++ declInvCl cl} ;
|
||||
|
||||
UttS s = s ;
|
||||
|
||||
AdvCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
AdvQCl x a cl = case a.isAdV of {
|
||||
True => cl ** {adV = cl.adV ++ a.s ; adv = cl.adv ; c3 = a.c1} ;
|
||||
False => cl ** {adv = cl.adv ++ a.s ; adV = cl.adV ; c3 = a.c1}
|
||||
} ;
|
||||
|
||||
PresPartAP x v = {
|
||||
s = \\a => v.v ! PresPart ;
|
||||
c1 = v.c1 ; -- tittande på henne
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
PastPartAP x v = {
|
||||
s = \\a => v.v ! PastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = noObj ;
|
||||
} ;
|
||||
|
||||
AgentPastPartAP x v np = {
|
||||
s = \\a => v.v ! PastPart a ;
|
||||
c1 = v.c1 ;
|
||||
c2 = v.c2 ;
|
||||
obj1 = \\_ => appComplCase agentCase np ; ---- addObj
|
||||
} ;
|
||||
|
||||
StartVPC c x v w = { ---- some loss of quality seems inevitable
|
||||
v = \\a =>
|
||||
v.v.p1 ++ v.adV ++ v.v.p2 ++ v.v.p3 ++ v.adj ! a ++
|
||||
v.c1 ++ v.obj1.p1 ! a ++ v.c2 ++ v.obj2.p1 ! a ++ v.adv ++ v.ext ---- appComplCase
|
||||
++ c.s ++
|
||||
w.v.p1 ++ w.adV ++ w.v.p2 ++ w.v.p3 ++ w.adj ! a ++ ---- appComplCase
|
||||
w.c1 ++ w.obj1.p1 ! a ++ w.c2 ++ w.obj2.p1 ! a ++ w.adv ++ w.ext ;
|
||||
inf = \\a =>
|
||||
infVP a (lin VP v) ++ c.s ++ infVP a (lin VP w) ;
|
||||
c1 = [] ; ---- w.c1 ? --- the full story is to unify v and w...
|
||||
c2 = [] ; ---- w.c2 ?
|
||||
} ;
|
||||
|
||||
UseVPC x vpc = { ---- big loss of quality (overgeneration) seems inevitable
|
||||
v = <[], [], vpc.v ! defaultAgr> ; ---- agreement
|
||||
inf = <[], vpc.inf ! defaultAgr> ; ---- agreement
|
||||
c1 = vpc.c1 ;
|
||||
c2 = vpc.c2 ;
|
||||
adj = \\a => [] ;
|
||||
obj1 = <noObj, defaultAgr> ;
|
||||
obj2 = <noObj,True> ;
|
||||
adv,adV = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
StartClC c x a b = {
|
||||
s = declCl (lin Cl a) ++ c.s ++ declCl (lin Cl b) ;
|
||||
c3 = b.c3 ; ----
|
||||
} ;
|
||||
|
||||
UseClC x cl = {
|
||||
subj = [] ;
|
||||
v = <[],[],cl.s> ; ----
|
||||
inf = <[],[]> ;
|
||||
adj = [] ;
|
||||
obj1 = [] ;
|
||||
obj2 = [] ;
|
||||
adV = [] ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
c3 = cl.c3 ;
|
||||
} ;
|
||||
|
||||
ComplAdv x p np = {s = p.c1 ++ np.s ! objCase ; isAdV = p.isAdV ; c1 = []} ;
|
||||
|
||||
|
||||
---- the following may become parameters for a functor
|
||||
oper
|
||||
be_V : V = mkV "vara" "är" "var" "varit" "varen" "varna" ;
|
||||
|
||||
neg : Polarity -> Str = \p -> case p of {Pos => [] ; Neg => "inte"} ;
|
||||
|
||||
reflPron : Agr -> Str = \a -> case a of {Sg => "sig" ; Pl => "oss"} ;
|
||||
|
||||
infVP : Agr -> VP -> Str = \a,vp ->
|
||||
let
|
||||
a2 = case vp.obj2.p2 of {True => a ; False => vp.obj1.p2}
|
||||
in
|
||||
vp.adV ++ (vp.inf.p1 | []) ++ vp.inf.p2 ++ ---- *hon tvingar oss att sovit
|
||||
vp.adj ! a ++ vp.c1 ++ vp.obj1.p1 ! a ++ vp.c2 ++ vp.obj2.p1 ! a2 ++ vp.adv ++ vp.ext ;
|
||||
|
||||
tenseV : Str -> STense -> Anteriority -> Voice -> V -> Str * Str * Str = \sta,t,a,o,v -> case <t,a> of { --- sta dummy s field of Ant and Tense
|
||||
<Pres,Simul> => <sta ++ v.v ! TV o VPres, [], []> ;
|
||||
<Past,Simul> => <sta ++ v.v ! TV o VPret, [], []> ;
|
||||
<Fut, Simul> => <shall_V.v ! TV Act VPres, [], sta ++ v.v ! TV o VInf> ;
|
||||
<Cond,Simul> => <shall_V.v ! TV Act VPret, [], sta ++ v.v ! TV o VInf> ;
|
||||
<Pres,Anter> => <have_V.v ! TV Act VPres, [], sta ++ v.v ! TV o VSup> ;
|
||||
<Past,Anter> => <have_V.v ! TV Act VPret, [], sta ++ v.v ! TV o VSup> ;
|
||||
<Fut, Anter> => <shall_V.v ! TV Act VPres, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup> ;
|
||||
<Cond,Anter> => <shall_V.v ! TV Act VPret, have_V.v ! TV Act VInf, sta ++ v.v ! TV o VSup>
|
||||
} ;
|
||||
|
||||
tenseInfV : Str -> Anteriority -> Voice -> V -> Str * Str = \sa,a,o,v ->
|
||||
case a of {
|
||||
Simul => <[], sa ++ v.v ! TV o VInf> ; -- hon vill sova
|
||||
Anter => <have_V.v ! TV Act VInf, sa ++ v.v ! TV o VSup> -- hon vill (ha) sovit
|
||||
} ;
|
||||
|
||||
|
||||
declCl : Clause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
declSubordCl : Clause -> Str = \cl -> cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl ;
|
||||
declInvCl : Clause -> Str = \cl -> cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questCl : QCl -> Str = \cl -> cl.foc ++ cl.v.p1 ++ cl.subj ++ cl.adV ++ cl.v.p2 ++ restCl cl ;
|
||||
|
||||
questSubordCl : QCl -> Str = \cl ->
|
||||
let
|
||||
rest = cl.subj ++ cl.adV ++ cl.v.p1 ++ (cl.v.p2 | []) ++ restCl cl
|
||||
in case cl.focType of {
|
||||
NoFoc => "om" ++ cl.foc ++ rest ; -- om hon sover
|
||||
FocObj => cl.foc ++ rest ; -- vem älskar hon / varför hon sover
|
||||
FocSubj => cl.foc ++ "som" ++ rest -- vem som älskar henne
|
||||
} ;
|
||||
|
||||
that_Compl : Str = "att" | [] ;
|
||||
|
||||
-- this part is usually the same in all reconfigurations
|
||||
restCl : Clause -> Str = \cl -> cl.v.p3 ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ++ cl.c3 ;
|
||||
|
||||
agentCase : ComplCase = "av" ;
|
||||
|
||||
appComplCase : ComplCase -> NP -> Str = \p,np -> p ++ np.s ! Acc ;
|
||||
|
||||
noComplCase : ComplCase = [] ;
|
||||
|
||||
prepComplCase : {s : Str} -> ComplCase = \p -> p.s ;
|
||||
|
||||
noObj : Agr => Str = \\_ => [] ;
|
||||
|
||||
addObj2VP : VP -> (Agr => Str) -> VP = \vp,obj -> vp ** {
|
||||
obj2 = <\\a => vp.obj2.p1 ! a ++ obj ! a, vp.obj2.p2> ;
|
||||
} ;
|
||||
|
||||
addExtVP : VP -> Str -> VP = \vp,ext -> vp ** {
|
||||
ext = ext ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---- the lexicon is just for testing: use standard Swe lexicon and morphology instead
|
||||
lin
|
||||
sleep_V = mkV "sova" "sover" "sov" "sovit" "soven" "sovna" ;
|
||||
walk_V = mkV "gå" "går" "gick" "gått" "gången" "gångna" ;
|
||||
love_V2 = mkV "älska" "älskar" "älskade" "älskat" "älskad" "älskade" ;
|
||||
look_V2 = mkV "titta" "tittar" "tittade" "tittat" "tittad" "tittade" "på" [] ;
|
||||
believe_VS = mkV "tro" "tror" "trodde" "trott" "trodd" "trodda" ;
|
||||
tell_V2S = mkV "berätta" "berättar" "berättade" "berättat" "berättad" "berättade" "för" [] ;
|
||||
prefer_V3 = mkV "föredra" "föredrar" "föredrog" "föredragit" "föredragen" "föredragna" [] "framför" ;
|
||||
want_VV = mkV "vilja" "vill" "ville" "velat" "velad" "velade" ;
|
||||
force_V2V = let tvinga : V = mkV "tvinga" "tvingar" "tvingade" "tvingat" "tvingad" "tvingade" in
|
||||
{v = tvinga.v ; c1 = [] ; c2 = "att" ; isSubjectControl = False} ;
|
||||
promise_V2V = mkV "lova" "lovar" "lovade" "lovat" "lovad" "lovade" [] "att" ;
|
||||
wonder_VQ = mkV "undra" "undrar" "undrade" "undrat" "undrad" "undrade" ;
|
||||
become_VA = mkV "bli" "blir" "blev" "blivit" "bliven" "blivna" ;
|
||||
become_VN = mkV "bli" "blir" "blev" "blivit" "bliven" "blivna" ;
|
||||
make_V2A = let gora : V = mkV "göra" "gör" "gjorde" "gjort" "gjord" "gjorda" in
|
||||
{v = table {TV Pass VPres => "görs" ; f => gora.v ! f} ; c1 = [] ; c2 = [] ; isSubjectControl = False} ;
|
||||
promote_V2N = let befordra : V = mkV "befordra" "befordrar" "befordrade" "befordrat" "befordrad" "befordrade"
|
||||
in {v = befordra.v ; c1 = [] ; c2 = "till" ; isSubjectControl = False} ; ---- ? de befordrade dem till chefer för sig/dem
|
||||
ask_V2Q = mkV "fråga" "frågar" "frågade" "frågat" "frågad" "frågade" ;
|
||||
|
||||
old_A = {s = table {Sg => "gammal" ; Pl => "gamla"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
married_A2 = {s = table {Sg => "gift" ; Pl => "gifta"} ; c1 = "med" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
eager_AV = {s = table {Sg => "ivrig" ; Pl => "ivriga"} ; c1 = [] ; c2 = "att" ; obj1 = \\_ => []} ;
|
||||
easy_A2V = {s = table {Sg => "lätt" ; Pl => "lätta"} ; c1 = "för" ; c2 = "att" ; obj1 = \\_ => []} ;
|
||||
professor_N = {s = table {Sg => "professor" ; Pl => "professorer"} ; c1 = [] ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
manager_N2 = {s = table {Sg => "chef" ; Pl => "chefer"} ; c1 = "för" ; c2 = [] ; obj1 = \\_ => []} ;
|
||||
|
||||
she_NP = {s = table {Nom => "hon" ; Acc => "henne"} ; a = Sg} ;
|
||||
we_NP = {s = table {Nom => "vi" ; Acc => "oss"} ; a = Pl} ;
|
||||
|
||||
today_Adv = {s = "idag" ; isAdV = False ; c1 = []} ;
|
||||
always_AdV = {s = "alltid" ; isAdV = True ; c1 = []} ;
|
||||
|
||||
who_IP = {s = "vem" ; a = Sg} ;
|
||||
|
||||
PrepNP p np = {s = p.s ++ np.s ! Acc ; isAdV = False} ;
|
||||
|
||||
with_Prep = {s = [] ; isAdV = False ; c1 = "med"} ;
|
||||
|
||||
and_Conj = {s = "och"} ;
|
||||
|
||||
why_IAdv = {s = "varför"} ;
|
||||
|
||||
oper
|
||||
mkV = overload {
|
||||
mkV : (x,y,z,u,v,w : Str) -> V = \x,y,z,u,v,w ->
|
||||
lin V {
|
||||
v = table {
|
||||
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
|
||||
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s" ;
|
||||
PastPart Sg => v ; PastPart Pl => w ; PresPart => x + "nde"
|
||||
} ;
|
||||
c1 = [] ; c2 = [] ; isSubjectControl = True} ;
|
||||
mkV : (x,y,z,u,v,w : Str) -> Str -> Str -> V = \x,y,z,u,v,w,p,q ->
|
||||
lin V {
|
||||
v = table {
|
||||
TV Act VInf => x ; TV Act VPres => y ; TV Act VPret => z ; TV Act VSup => u ;
|
||||
TV Pass VInf => x + "s" ; TV Pass VPres => init y + "s" ; TV Pass VPret => z + "s" ; TV Pass VSup => u + "s" ;
|
||||
PastPart Sg => v ; PastPart Pl => w ; PresPart => x + "nde"
|
||||
} ;
|
||||
c1 = p ; c2 = q ; isSubjectControl = True} ;
|
||||
} ;
|
||||
|
||||
|
||||
have_V : V = mkV "ha" "har" "hade" "haft" "havd" "havda" ;
|
||||
|
||||
shall_V : V = mkV "skola" "ska" "skulle" "skolat" "skolad" "skolade" ;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
--# -path=.:../translator
|
||||
|
||||
abstract Trans =
|
||||
RGLBase - [Pol,Tense]
|
||||
,Pred
|
||||
,Dictionary - [Pol,Tense]
|
||||
|
||||
** {
|
||||
flags
|
||||
startcat=Phr;
|
||||
heuristic_search_factor=0.60;
|
||||
meta_prob=1.0e-5;
|
||||
meta_token_prob=1.1965149246222233e-9;
|
||||
|
||||
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 ;
|
||||
LiftCN : CN -> PrCN aNone ;
|
||||
|
||||
LiftAdv : Adv -> PrAdv aNone ;
|
||||
LiftAdV : Adv -> PrAdv aNone ;
|
||||
LiftPrep : Prep -> PrAdv (aNP aNone) ;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user