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
|
# Copy
|
||||||
echo "Copying to ${dest}"
|
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.//
|
//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===
|
===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
|
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===
|
===Danish===
|
||||||
|
|
||||||
@@ -155,8 +169,13 @@ The GF Resource Grammar Library.
|
|||||||
|
|
||||||
- **Source**: http://www.grammaticalframework.org/lib/src/estonian (Kaarel Kaljurand, Inari Listenmaa)
|
- **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===
|
===Finnish===
|
||||||
@@ -256,6 +275,9 @@ In The 3rd Workshop
|
|||||||
on South and Southeast Asian NLP, COLING 2012. //Reprinted in Shafqat's thesis//
|
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===
|
===Icelandic===
|
||||||
@@ -281,8 +303,6 @@ Bjarki Traustason, MSc thesis, Chalmers
|
|||||||
%- **Publications**
|
%- **Publications**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===Japanese===
|
===Japanese===
|
||||||
|
|
||||||
- **Source**: http://www.grammaticalframework.org/lib/src/japanese (Liza Zimina)
|
- **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
|
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===
|
===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===
|
===Latvian===
|
||||||
@@ -397,6 +434,15 @@ Slide presentation, TYPES 2010, Warsaw,
|
|||||||
http://www.mimuw.edu.pl/~asl/publications/types2010-slides.pdf
|
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===
|
===Punjabi===
|
||||||
|
|
||||||
@@ -438,7 +484,7 @@ LNCS 6008,
|
|||||||
|
|
||||||
===Russian===
|
===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**
|
- **Publications**
|
||||||
|
|
||||||
@@ -475,6 +521,21 @@ MSc Thesis, Chalmers University of Technology,
|
|||||||
http://publications.lib.chalmers.se/records/fulltext/163234.pdf
|
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===
|
===Spanish===
|
||||||
|
|
||||||
- **Source**: http://www.grammaticalframework.org/lib/src/spanish http://www.grammaticalframework.org/lib/src/romance
|
- **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===
|
===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**
|
- **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
|
http://link.springer.com/content/pdf/10.1007%2F978-3-642-32790-2_22.pdf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===Thai===
|
===Thai===
|
||||||
|
|
||||||
- **Source**: http://www.grammaticalframework.org/lib/src/thai (Aarne Ranta, Chotiros Kairoje)
|
- **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.
|
2007.
|
||||||
|
|
||||||
See also **Hindi** above.
|
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/] .
|
[The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/] .
|
||||||
|
|
||||||
Corrections and additions are welcome! Notice that only those parts of implementations
|
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
|
are marked in the table
|
||||||
|
|
||||||
|
|
||||||
|| ISO | Language | Git | Mini | Parad | Lex | Lang | API | Symb | Irreg | Dict | Trans | tested | publ | authors ||
|
|| ISO | Language | Parad | Lex | Lang | API | Symb | Irreg | Dict | WN | tested | publ | authors ||
|
||||||
| Afr | Afrikaans | + | - | ++ | + | + | + | - | - | - | - | - | - | *LP,LM
|
| Afr | Afrikaans | ++ | + | + | + | - | - | - | - | - | - | *LP,LM |
|
||||||
| Amh | Amharic | + | + | ++ | + | + | - | - | - | - | - | - | + | *MK
|
| Amh | Amharic | ++ | + | + | - | - | - | - | - | - | + | *MK |
|
||||||
| Ara | Arabic | + | + | + | + | + | + | + | - | - | - | + | + | AD,*IL
|
| Ara | Arabic | + | + | + | + | + | - | - | - | + | + | AD,*IL |
|
||||||
| Bul | Bulgarian | + | + | + | + | + | + | + | + | + | + | ++ | + | *KA
|
| Bul | Bulgarian | + | + | + | + | + | + | + | + | ++ | + | *KA |
|
||||||
| Cat | Catalan | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *JS,*IL
|
| Cat | Catalan | ++ | + | + | + | + | + | - | + | ++ | - | *JS,*IL |
|
||||||
| Chi | Chinese | + | - | ++ | + | + | + | - | - | + | + | - | + | ZL,*AR,*CP,QH
|
| Chi | Chinese | ++ | + | + | + | - | - | + | + | - | + | ZL,*AR,*CP,QH |
|
||||||
| Dan | Danish | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
|
| Cze | Czech | + | + | + | + | - | - | - | - | + | - | *AR,*MM |
|
||||||
| Dut | Dutch | + | + | ++ | + | + | + | + | + | - | + | + | - | *AR,FJ
|
| Dan | Danish | ++ | + | + | + | + | + | - | - | + | - | *AR |
|
||||||
| Eng | English | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *AR,BB,KA
|
| Dut | Dutch | ++ | + | + | + | + | + | - | + | + | - | *AR,FJ |
|
||||||
| Est | Estonian | + | - | ++ | + | + | + | - | - | + | + | + | + | *KK,*IL
|
| Eng | English | ++ | + | + | + | + | + | + | + | ++ | + | *AR,BB,KA |
|
||||||
| Eus | Basque | + | - | ++ | + | + | + | - | - | - | - | - | + | *IL
|
| Est | Estonian | ++ | + | + | + | - | - | + | + | + | + | *KK,*IL |
|
||||||
| Fin | Finnish | + | + | ++ | + | + | + | + | - | + | + | ++ | + | *AR,*IL
|
| Eus | Basque | ++ | + | + | + | - | - | - | - | - | + | *IL |
|
||||||
| Fre | French | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,RE
|
| Fin | Finnish | ++ | + | + | + | + | - | + | + | ++ | + | *AR,*IL |
|
||||||
| Ger | German | + | + | ++ | + | + | + | + | + | + | + | ++ | - | *AR,HH,EG
|
| Fre | French | ++ | + | + | + | + | + | + | - | ++ | - | *AR,RE |
|
||||||
| Gre | Greek(mod) | + | - | ++ | + | + | + | - | - | - | - | - | + | *IP
|
| Ger | German | ++ | + | + | + | + | + | + | - | ++ | - | *AR,HH,EG |
|
||||||
| Grc | Greek(anc) | - | - | - | - | - | - | - | - | - | - | - | + | *HLe
|
| Gre | Greek(mod) | ++ | + | + | + | - | - | - | - | - | + | *IP |
|
||||||
| Heb | Hebrew | + | - | - | - | - | - | - | - | - | - | - | + | *DD
|
| Grc | Greek(anc) | - | - | - | - | - | - | - | - | - | + | *HLe |
|
||||||
| Hin | Hindi | + | + | ++ | + | + | + | + | - | - | + | + | + | *SV,*KP,MH,AR,PK
|
| Heb | Hebrew | - | - | - | - | - | - | - | - | - | + | *DD |
|
||||||
| Ice | Icelandic | + | - | ++ | + | + | + | - | - | - | - | - | + | *BT
|
| Hin | Hindi | ++ | + | + | + | + | - | - | - | + | + | *SV,*KP,MH,AR,PK |
|
||||||
| Ina | Interlingua | + | + | ++ | + | + | - | - | - | - | - | - | - | JB
|
| Hun | Hungarian | ++ | + | + | + | + | - | - | - | + | - | *IL,*JJ |
|
||||||
| Ita | Italian | + | + | ++ | + | + | + | + | - | - | + | ++ | - | *AR,*RE,GP
|
| Ice | Icelandic | ++ | + | + | + | - | - | - | - | - | + | *BT |
|
||||||
| Jpn | Japanese | + | - | ++ | + | + | + | - | - | - | + | + | + | *LZ
|
| Ina | Interlingua | ++ | + | + | - | - | - | - | - | - | - | JB |
|
||||||
| Lat | Latin | + | - | - | - | - | - | - | - | + | - | - | - | *AR,*HLa
|
| Ita | Italian | ++ | + | + | + | + | - | - | + | ++ | - | *AR,*RE,GP |
|
||||||
| Lav | Latvian | + | - | ++ | + | + | + | - | - | - | - | + | + | *NG,*PP
|
| Jpn | Japanese | ++ | + | + | + | - | - | - | - | + | + | *LZ |
|
||||||
| Mlt | Maltese | + | + | ++ | + | + | + | + | - | - | - | - | + | *JC
|
| Kor | Korean | ++ | + | + | + | + | - | - | - | + | - | *IL |
|
||||||
| Mon | Mongolian | + | - | ++ | + | + | + | - | - | + | - | - | + | *NE
|
| Lat | Latin | - | - | - | - | - | - | + | - | - | - | *AR,*HLa |
|
||||||
| Nep | Nepali | + | + | ++ | + | + | - | - | - | - | - | - | + | *DS
|
| Lav | Latvian | ++ | + | + | + | - | - | - | - | + | + | *NG,*PP |
|
||||||
| Nno | Norwegian(n) | + | + | ++ | + | + | + | + | + | - | - | - | - | *SRE
|
| Mlt | Maltese | ++ | + | + | + | + | - | - | - | - | + | *JC |
|
||||||
| Nor | Norwegian(b) | + | + | ++ | + | + | + | + | + | - | - | + | - | *AR
|
| Mon | Mongolian | ++ | + | + | + | - | - | + | - | - | + | *NE |
|
||||||
| Pes | Persian | + | - | + | + | + | + | - | - | - | - | + | + | SV,EA,SM,*IL
|
| Nep | Nepali | ++ | + | + | - | - | - | - | - | - | + | *DS |
|
||||||
| Pnb | Punjabi | + | + | + | + | + | + | + | - | - | - | - | + | *SV,MH
|
| Nno | Norwegian(n) | ++ | + | + | + | + | + | - | - | - | - | *SRE |
|
||||||
| Pol | Polish | + | + | + | + | + | + | + | - | - | - | + | + | IN,*AS
|
| Nor | Norwegian(b) | ++ | + | + | + | + | + | - | - | + | - | *AR |
|
||||||
| Por | Portuguese | + | + | ++ | + | + | + | + | + | - | + | + | - | *BC
|
| Pes | Persian | + | + | + | + | - | - | - | - | + | + | SV,EA,SM,*IL |
|
||||||
| Ron | Romanian | + | + | ++ | + | + | + | + | - | - | - | + | + | *RE
|
| Pnb | Punjabi | + | + | + | + | + | - | - | - | - | + | *SV,MH |
|
||||||
| Rus | Russian | + | + | ++ | + | + | + | - | - | + | + | - | + | JK,*NF
|
| Pol | Polish | + | + | + | + | + | - | - | - | + | + | IN,*AS |
|
||||||
| Snd | Sindhi | + | + | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD
|
| Por | Portuguese | ++ | + | + | + | + | + | + | + | + | + | *BC |
|
||||||
| Spa | Spanish | + | + | ++ | + | + | + | + | + | - | + | ++ | - | *AR,IA,TS,*IL
|
| Ron | Romanian | ++ | + | + | + | + | - | - | - | + | + | *RE |
|
||||||
| Swa | Swahili | + | - | - | - | - | - | - | - | - | - | - | + | *WN,JM
|
| Rus | Russian | ++ | + | + | + | - | - | + | - | - | + | JK,NF,*RS |
|
||||||
| Swe | Swedish | + | + | ++ | + | + | + | + | + | + | + | ++ | + | *MA,*AR,MF
|
| Slk | Slovak | + | + | + | + | - | - | - | - | + | - | *AR,*MM,SČ |
|
||||||
| Tha | Thai | + | - | ++ | + | + | + | + | - | - | + | + | - | *AR,CK
|
| Slv | Slovene | ++ | + | + | + | - | - | - | + | + | - | *KA,AE |
|
||||||
| Tsn | Tswana | - | - | - | - | - | - | - | - | - | - | - | - | *LP,AB
|
| Snd | Sindhi | ++ | + | + | + | + | - | - | - | - | + | *SV,*JD |
|
||||||
| Tur | Turkish | + | - | ++ | + | - | - | - | - | + | - | - | - | *SC,KA
|
| Som | Somali | + | - | - | - | - | - | - | - | - | - | *IL |
|
||||||
| Urd | Urdu | + | + | ++ | + | + | + | + | - | - | - | + | + | *SV,MH
|
| 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
|
ISO = 3-letter ISO language code, used in library file names
|
||||||
(mostly ISO 639-2 B (bibliographic))
|
(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
|
Parad = ``Paradigms`` file complete for major POS, ++ means with smart paradigms
|
||||||
|
|
||||||
Lex = the resource ``Lexicon`` (nearly) complete
|
Lex = the resource ``Lexicon`` (nearly) complete
|
||||||
@@ -73,13 +76,13 @@ Lang = the resource ``Syntax`` (nearly) complete
|
|||||||
|
|
||||||
API = the ``Syntax`` compiles
|
API = the ``Syntax`` compiles
|
||||||
|
|
||||||
Symb = the ``Symbolic`` API compiles
|
Symb = the ``Symbolic`` API complete
|
||||||
|
|
||||||
Irreg = the ``Irreg`` module with irregular verbs exists
|
Irreg = the ``Irreg`` module with irregular verbs exists
|
||||||
|
|
||||||
Dict = the ``Dict`` module, large-scale morphological lexicon, 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
|
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,
|
AB Ansu Berg,
|
||||||
AD Ali El Dada,
|
AD Ali El Dada,
|
||||||
|
AE Anna Ehrlemark,
|
||||||
AR Aarne Ranta,
|
AR Aarne Ranta,
|
||||||
AS Adam Slaski,
|
AS Adam Slaski,
|
||||||
BB Björn Bringert,
|
BB Björn Bringert,
|
||||||
BC Bruno Cuconato,
|
BC Bruno Cuconato,
|
||||||
|
BK Benson Kituku,
|
||||||
BT Bjarki Traustason,
|
BT Bjarki Traustason,
|
||||||
CK Chotiros Kairoje,
|
CK Chotiros Kairoje,
|
||||||
CP Chen Peng,
|
CP Chen Peng,
|
||||||
@@ -116,6 +121,7 @@ IP Ioanna Papadopoulou,
|
|||||||
JB Jean-Philippe Bernardy,
|
JB Jean-Philippe Bernardy,
|
||||||
JC John J. Camilleri,
|
JC John J. Camilleri,
|
||||||
JD Jherna Devi,
|
JD Jherna Devi,
|
||||||
|
JJ Julia Jansson,
|
||||||
JK Janna Khegai,
|
JK Janna Khegai,
|
||||||
JM Juliet Mutahi,
|
JM Juliet Mutahi,
|
||||||
JS Jordi Saludes,
|
JS Jordi Saludes,
|
||||||
@@ -129,13 +135,16 @@ MA Malin Ahlberg,
|
|||||||
MF Markus Forsberg,
|
MF Markus Forsberg,
|
||||||
MK Markos Kassa Gobena,
|
MK Markos Kassa Gobena,
|
||||||
MH Muhammad Humayoun,
|
MH Muhammad Humayoun,
|
||||||
|
MM Michal Měchura,
|
||||||
NE Nyamsuren Erdenebadrakh,
|
NE Nyamsuren Erdenebadrakh,
|
||||||
NF Nick Frolov,
|
NF Nick Frolov,
|
||||||
NG Normunds Gruzitis,
|
NG Normunds Gruzitis,
|
||||||
QH Qiao Haiyan,
|
QH Qiao Haiyan,
|
||||||
RE Ramona Enache,
|
RE Ramona Enache,
|
||||||
|
RS Roman Suzi,
|
||||||
PP Peteris Paikens,
|
PP Peteris Paikens,
|
||||||
SC Server Cimen,
|
SC Server Cimen,
|
||||||
|
SČ Slavomír Čéplö,
|
||||||
SM Sofy Moradi,
|
SM Sofy Moradi,
|
||||||
SRE Stian Rødven Eide,
|
SRE Stian Rødven Eide,
|
||||||
SV Shafqat Virk,
|
SV Shafqat Virk,
|
||||||
@@ -147,7 +156,7 @@ ZL Zhuo Lin Qiqige
|
|||||||
|
|
||||||
==Rules==
|
==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
|
If you want to work on a language already in the table, please be kind and contact the
|
||||||
active authors of it.
|
active authors of it.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Amh,Amharic,amharic,,,,,n,n,,n
|
|||||||
Ara,Arabic,arabic,,,,,,y,,y
|
Ara,Arabic,arabic,,,,,,y,,y
|
||||||
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
||||||
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
||||||
|
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y
|
||||||
Chi,Chinese (simplified),chinese,,,,,,,,y
|
Chi,Chinese (simplified),chinese,,,,,,,,y
|
||||||
Cze,Czech,czech,,,,,,n,,y
|
Cze,Czech,czech,,,,,,n,,y
|
||||||
Dan,Danish,danish,Scand,,y,,,,,y
|
Dan,Danish,danish,Scand,,y,,,,,y
|
||||||
|
|||||||
|
@@ -1,3 +1,3 @@
|
|||||||
--# -path=.:../russian:../common:../abstract:../prelude
|
--# -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 {
|
concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PositA a = {
|
PositA a = {
|
||||||
@@ -9,11 +9,11 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComparA a np = {
|
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
|
isPre = True
|
||||||
} ;
|
} ;
|
||||||
UseComparA a = {
|
UseComparA a = {
|
||||||
s = \\aform,_ => "ïî" ++ hyphen ++ a.s ! aform ;
|
s = \\aform,_ => "по" ++ hyphen ++ a.s ! aform ;
|
||||||
isPre = True
|
isPre = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ReflA2 a = {
|
ReflA2 a = {
|
||||||
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["ñåáå ñè"] ;
|
s = \\aform,_ => a.s ! aform ++ linPrep a.c2 ++ ["себе си"] ;
|
||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.adv} ;
|
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
|
s = cadv.s ++ a.s ! ASg Neut Indef ++ cadv.p ++ np.s ! RObj CPrep
|
||||||
} ;
|
} ;
|
||||||
ComparAdvAdjS cadv a s = {
|
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} ;
|
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
|
-- from Noun 19/4/2008
|
||||||
flags
|
flags
|
||||||
coding = cp1251 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
NumInt n = {s = \\_ => n.s; n = Pl; nonEmpty = True} ;
|
NumInt n = {s = \\_ => n.s; n = Pl; nonEmpty = True} ;
|
||||||
OrdInt n = {s = \\aform => n.s ++ "-" ++
|
OrdInt n = {s = \\aform => n.s ++ "-" ++
|
||||||
case aform of {
|
case aform of {
|
||||||
ASg Masc Indef => "òè" ;
|
ASg Masc Indef => "ти" ;
|
||||||
ASg Fem Indef => "òà" ;
|
ASg Fem Indef => "та" ;
|
||||||
ASg Neut Indef => "òî" ;
|
ASg Neut Indef => "то" ;
|
||||||
ASg Masc Def => "òèÿ" ;
|
ASg Masc Def => "тия" ;
|
||||||
ASg Fem Def => "òàòà" ;
|
ASg Fem Def => "тата" ;
|
||||||
ASg Neut Def => "òîòî" ;
|
ASg Neut Def => "тото" ;
|
||||||
ASgMascDefNom => "òèÿò" ;
|
ASgMascDefNom => "тият" ;
|
||||||
APl Indef => "òè" ;
|
APl Indef => "ти" ;
|
||||||
APl Def => "òèòå"
|
APl Def => "тите"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
concrete ConjunctionBul of Conjunction =
|
concrete ConjunctionBul of Conjunction =
|
||||||
CatBul ** open ResBul, Coordination, Prelude, Predef in {
|
CatBul ** open ResBul, Coordination, Prelude, Predef in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:prelude
|
||||||
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in {
|
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul in {
|
||||||
|
flags
|
||||||
|
coding=utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP (mkPrep "на") np)) ;
|
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 **
|
concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||||
open ResBul, MorphoFunsBul, Coordination, Prelude, Predef in {
|
open ResBul, MorphoFunsBul, Coordination, Prelude, Predef in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
lin
|
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
|
s = \\t,a,p,agr => slash.c2.s ++ whichRP ! agr.gn ++ slash.s ! agr ! t ! a ! p ! Main
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
i8fem_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Fem) PronP1 ;
|
i8fem_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) PronP1 ;
|
||||||
i8neut_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Neut) PronP1 ;
|
i8neut_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Neut) PronP1 ;
|
||||||
|
|
||||||
whatSg8fem_IP = mkIP "êàêâà" "êàêâà" (GSg Fem) ;
|
whatSg8fem_IP = mkIP "каква" "каква" (GSg Fem) ;
|
||||||
whatSg8neut_IP = mkIP "êàêâî" "êàêâî" (GSg Neut) ;
|
whatSg8neut_IP = mkIP "какво" "какво" (GSg Neut) ;
|
||||||
|
|
||||||
whoSg8fem_IP = mkIP "êîÿ" "êîãî" (GSg Fem) ;
|
whoSg8fem_IP = mkIP "коя" "кого" (GSg Fem) ;
|
||||||
whoSg8neut_IP = mkIP "êîå" "êîãî" (GSg Neut) ;
|
whoSg8neut_IP = mkIP "кое" "кого" (GSg Neut) ;
|
||||||
|
|
||||||
youSg8fem_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Fem) PronP2 ;
|
youSg8fem_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Fem) PronP2 ;
|
||||||
youSg8neut_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Neut) PronP2 ;
|
youSg8neut_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Neut) PronP2 ;
|
||||||
|
|
||||||
onePl_Num = {s = table {
|
onePl_Num = {s = table {
|
||||||
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "åäíè" ;
|
CFMasc Indef _ | CFFem Indef | CFNeut Indef => "едни" ;
|
||||||
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "åäíèòå"
|
CFMasc Def _ | CFMascDefNom _ | CFFem Def | CFNeut Def => "едните"
|
||||||
} ;
|
} ;
|
||||||
nn = NCountable;
|
nn = NCountable;
|
||||||
nonEmpty = True
|
nonEmpty = True
|
||||||
@@ -53,7 +53,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
|||||||
UttImpSg8fem pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
|
UttImpSg8fem pol imp = {s = pol.s ++ imp.s ! pol.p ! GSg Fem} ;
|
||||||
UttImpSg8neut 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
|
lincat
|
||||||
VPI = {s : Agr => Str} ;
|
VPI = {s : Agr => Str} ;
|
||||||
@@ -95,7 +95,7 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
|||||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
|
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
|
||||||
|
|
||||||
PassAgentVPSlash vp np =
|
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)) ++
|
(insertObj (\\a => vp.ad.s ++ vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
|
||||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ;
|
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
abstract ExtraBulAbs = Extra ** {
|
abstract ExtraBulAbs = Extra ** {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
fun
|
fun
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--# -path=.:../abstract:../common:prelude
|
--# -path=.:../abstract:../common:prelude
|
||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
|
|
||||||
concrete GrammarBul of Grammar =
|
concrete GrammarBul of Grammar =
|
||||||
NounBul,
|
NounBul,
|
||||||
@@ -17,7 +17,7 @@ concrete GrammarBul of Grammar =
|
|||||||
IdiomBul,
|
IdiomBul,
|
||||||
TenseX - [CAdv,IAdv,AdV,SC]
|
TenseX - [CAdv,IAdv,AdV,SC]
|
||||||
** {
|
** {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
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 {
|
concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
ImpersCl vp = mkClause [] (GSg Neut) (NounP3 Pos) vp ;
|
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 =
|
CleftNP np rs =
|
||||||
mkClause (np.s ! RSubj)
|
mkClause (np.s ! RSubj)
|
||||||
(GSg Neut) np.p
|
(GSg Neut) np.p
|
||||||
(insertObj (\\_ => thisRP ! np.gn ++ rs.s ! personAgr np.gn np.p) (personPol np.p) (predV verbBe)) ;
|
(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 = ""}) ;
|
ExistNP np = ExistNPAdv np (lin Adv {s = ""}) ;
|
||||||
ExistIP ip = ExistIPAdv ip (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 =
|
ExistNPAdv np adv =
|
||||||
{ s = \\t,a,p,o =>
|
{ s = \\t,a,p,o =>
|
||||||
let verb = case orPol p (personPol np.p) of {
|
let verb = case orPol p (personPol np.p) of {
|
||||||
Pos => mkV186 "èìàì" ;
|
Pos => mkV186 "имам" ;
|
||||||
Neg => mkV186 "íÿìàì"
|
Neg => mkV186 "нямам"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
agr=agrP3 (GSg Neut);
|
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
|
<Pres,Anter> => {aux1=[]; aux2=auxPres; main=perfect} ; --# notpresent
|
||||||
<Past,Simul> => {aux1=[]; aux2=[]; main=aorist} ; --# notpresent
|
<Past,Simul> => {aux1=[]; aux2=[]; main=aorist} ; --# notpresent
|
||||||
<Past,Anter> => {aux1=[]; aux2=auxAorist; main=perfect} ; --# notpresent
|
<Past,Anter> => {aux1=[]; aux2=auxAorist; main=perfect} ; --# notpresent
|
||||||
<Fut, Simul> => {aux1="ùå"; aux2=[]; main=present} ; --# notpresent
|
<Fut, Simul> => {aux1="ще"; aux2=[]; main=present} ; --# notpresent
|
||||||
<Fut, Anter> => {aux1="ùå"++auxPres; aux2=[]; main=perfect} ; --# notpresent
|
<Fut, Anter> => {aux1="ще"++auxPres; aux2=[]; main=perfect} ; --# notpresent
|
||||||
<Cond,_> => {aux1=auxCondS; aux2=[]; main=perfect} --# notpresent
|
<Cond,_> => {aux1=auxCondS; aux2=[]; main=perfect} --# notpresent
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
in case o of {
|
in case o of {
|
||||||
Main => v.aux1 ++ v.main ++ v.aux2 ++ np.s ! RObj Acc ++ adv.s ;
|
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 ;
|
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 =
|
ExistIPAdv ip adv =
|
||||||
mkQuestion {s = ip.s ! RSubj}
|
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 = {
|
ProgrVP vp = {
|
||||||
s = \\_ => vp.s ! Imperf ;
|
s = \\_ => vp.s ! Imperf ;
|
||||||
@@ -68,6 +68,6 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
|
|||||||
isSimple = False
|
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
|
--# -path=.:prelude
|
||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
|
|
||||||
concrete LexiconBul of Lexicon = CatBul **
|
concrete LexiconBul of Lexicon = CatBul **
|
||||||
open ParadigmsBul, ResBul, Prelude in {
|
open ParadigmsBul, ResBul, Prelude in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize=values ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
airplane_N = mkN007 "ñàìîëåò" ;
|
airplane_N = mkN007 "самолет" ;
|
||||||
answer_V2S = mkV2S (actionV (mkV187 "îòãîâàðÿì") (mkV173 "îòãîâîðÿ")) naP noPrep ;
|
answer_V2S = mkV2S (actionV (mkV187 "отговарям") (mkV173 "отговоря")) naP noPrep ;
|
||||||
apartment_N = mkN007 "àïàðòàìåíò" ;
|
apartment_N = mkN007 "апартамент" ;
|
||||||
apple_N = mkN041 "ÿáúëêà" ;
|
apple_N = mkN041 "ябълка" ;
|
||||||
art_N = mkN054 "èçêóñòâî" ;
|
art_N = mkN054 "изкуство" ;
|
||||||
ask_V2Q = mkV2Q (stateV (mkV186 "ïèòàì")) noPrep noPrep ;
|
ask_V2Q = mkV2Q (stateV (mkV186 "питам")) noPrep noPrep ;
|
||||||
baby_N = mkN065 "áåáå" ;
|
baby_N = mkN065 "бебе" ;
|
||||||
bad_A = mkA076 "ëîø" ;
|
bad_A = mkA076 "лош" ;
|
||||||
bank_N = mkN041 "áàíêà" ;
|
bank_N = mkN041 "банка" ;
|
||||||
beautiful_A = mkA076 "êðàñèâ" ;
|
beautiful_A = mkA076 "красив" ;
|
||||||
become_VA = mkVA (actionV (mkV186 "ñòàâàì") (mkV152 "ñòàíà")) ;
|
become_VA = mkVA (actionV (mkV186 "ставам") (mkV152 "стана")) ;
|
||||||
beer_N = mkN041 "áèðà" ;
|
beer_N = mkN041 "бира" ;
|
||||||
beg_V2V = mkV2V (stateV (mkV173 "ìîëÿ")) noPrep zaP ;
|
beg_V2V = mkV2V (stateV (mkV173 "моля")) noPrep zaP ;
|
||||||
big_A = mkA081 "ãîëÿì" ;
|
big_A = mkA081 "голям" ;
|
||||||
bike_N = mkN061 "êîëåëî" ;
|
bike_N = mkN061 "колело" ;
|
||||||
bird_N = mkN041 "ïòèöà" ;
|
bird_N = mkN041 "птица" ;
|
||||||
black_A = mkA079 "÷åðåí" ;
|
black_A = mkA079 "черен" ;
|
||||||
blue_A = mkA086 "ñèí" ;
|
blue_A = mkA086 "син" ;
|
||||||
boat_N = mkN007 "êîðàá" ;
|
boat_N = mkN007 "кораб" ;
|
||||||
book_N = mkN041 "êíèãà" ;
|
book_N = mkN041 "книга" ;
|
||||||
boot_N = mkN041 "îáóâêà" ;
|
boot_N = mkN041 "обувка" ;
|
||||||
boss_N = mkN001 "øåô" ;
|
boss_N = mkN001 "шеф" ;
|
||||||
boy_N = mkN065 "ìîì÷å" ;
|
boy_N = mkN065 "момче" ;
|
||||||
bread_N = mkN001 "õëÿá" ;
|
bread_N = mkN001 "хляб" ;
|
||||||
break_V2 = dirV2 (actionV (mkV173 "÷óïÿ") (mkV173 "ñ÷óïÿ")) ;
|
break_V2 = dirV2 (actionV (mkV173 "чупя") (mkV173 "счупя")) ;
|
||||||
broad_A = mkA079 "îáøèðåí" ;
|
broad_A = mkA079 "обширен" ;
|
||||||
brother_N2 = prepN2 (mkN025 "áðàò") naP ;
|
brother_N2 = prepN2 (mkN025 "брат") naP ;
|
||||||
brown_A = mkA076 "êàôÿâ" ;
|
brown_A = mkA076 "кафяв" ;
|
||||||
butter_N = mkN054 "ìàñëî" ;
|
butter_N = mkN054 "масло" ;
|
||||||
buy_V2 = dirV2 (actionV (mkV186 "êóïóâàì") (mkV173 "êóïÿ")) ;
|
buy_V2 = dirV2 (actionV (mkV186 "купувам") (mkV173 "купя")) ;
|
||||||
camera_N = mkN041 "êàìåðà" ;
|
camera_N = mkN041 "камера" ;
|
||||||
cap_N = mkN041 "øàïêà" ;
|
cap_N = mkN041 "шапка" ;
|
||||||
car_N = mkN041 "êîëà" ;
|
car_N = mkN041 "кола" ;
|
||||||
carpet_N = mkN007 "êèëèì" ;
|
carpet_N = mkN007 "килим" ;
|
||||||
cat_N = mkN041 "êîòêà" ;
|
cat_N = mkN041 "котка" ;
|
||||||
ceiling_N = mkN007 "òàâàí" ;
|
ceiling_N = mkN007 "таван" ;
|
||||||
chair_N = mkN001 "ñòîë" ;
|
chair_N = mkN001 "стол" ;
|
||||||
cheese_N = mkN066 "ñèðåíå" ;
|
cheese_N = mkN066 "сирене" ;
|
||||||
child_N = mkN067 "äåòå" ;
|
child_N = mkN067 "дете" ;
|
||||||
church_N = mkN041 "öúðêâà" ;
|
church_N = mkN041 "църква" ;
|
||||||
city_N = mkN001 "ãðàä" ;
|
city_N = mkN001 "град" ;
|
||||||
clean_A = mkA076 "÷èñò" ;
|
clean_A = mkA076 "чист" ;
|
||||||
clever_A = mkA079 "óìåí" ;
|
clever_A = mkA079 "умен" ;
|
||||||
close_V2 = dirV2 (actionV (mkV187 "çàòâàðÿì") (mkV173 "çàòâîðÿ")) ;
|
close_V2 = dirV2 (actionV (mkV187 "затварям") (mkV173 "затворя")) ;
|
||||||
coat_N = mkN054 "ïàëòî" ;
|
coat_N = mkN054 "палто" ;
|
||||||
cold_A = mkA076 "ñòóäåí" ;
|
cold_A = mkA076 "студен" ;
|
||||||
come_V = actionV (mkV186 "èäâàì") (table { -- special case "äîéäè", "äîéäåòå" are archaic
|
come_V = actionV (mkV186 "идвам") (table { -- special case "дойди", "дойдете" are archaic
|
||||||
VImperative Sg => "åëà";
|
VImperative Sg => "ела";
|
||||||
VImperative Pl => "åëàòå";
|
VImperative Pl => "елате";
|
||||||
vform => mkV146a "äîéäà" ! vform}) ;
|
vform => mkV146a "дойда" ! vform}) ;
|
||||||
computer_N = mkN009 "êîìïþòúð" ;
|
computer_N = mkN009 "компютър" ;
|
||||||
country_N = mkN041 "äúðæàâà" ;
|
country_N = mkN041 "държава" ;
|
||||||
cousin_N = mkN007a "áðàòîâ÷åä" ;
|
cousin_N = mkN007a "братовчед" ;
|
||||||
cow_N = mkN041 "êðàâà" ;
|
cow_N = mkN041 "крава" ;
|
||||||
die_V = actionV (mkV186 "óìèðàì") (mkV150a "óìðà") ;
|
die_V = actionV (mkV186 "умирам") (mkV150a "умра") ;
|
||||||
dirty_A = mkA079 "ìðúñåí" ;
|
dirty_A = mkA079 "мръсен" ;
|
||||||
distance_N3 = prepN3 (mkN072 "ðàçñòîÿíèå") otP doP ;
|
distance_N3 = prepN3 (mkN072 "разстояние") otP doP ;
|
||||||
doctor_N = mkN007a "äîêòîð" ;
|
doctor_N = mkN007a "доктор" ;
|
||||||
dog_N = mkN065 "êó÷å" ;
|
dog_N = mkN065 "куче" ;
|
||||||
door_N = mkN041 "âðàòà" ;
|
door_N = mkN041 "врата" ;
|
||||||
drink_V2 = dirV2 (stateV (mkV163 "ïèÿ")) ;
|
drink_V2 = dirV2 (stateV (mkV163 "пия")) ;
|
||||||
easy_A2V = mkA2V (mkA079 "ëåñåí") zaP ;
|
easy_A2V = mkA2V (mkA079 "лесен") zaP ;
|
||||||
eat_V2 = dirV2 (stateV (mkV169 "ÿì")) ;
|
eat_V2 = dirV2 (stateV (mkV169 "ям")) ;
|
||||||
empty_A = mkA079 "ïðàçåí" ;
|
empty_A = mkA079 "празен" ;
|
||||||
enemy_N = mkN001 "âðàã" ;
|
enemy_N = mkN001 "враг" ;
|
||||||
factory_N = mkN041 "ôàáðèêà" ;
|
factory_N = mkN041 "фабрика" ;
|
||||||
father_N2 = prepN2 (mkN038 "áàùà") naP ;
|
father_N2 = prepN2 (mkN038 "баща") naP ;
|
||||||
fear_VS = mkVS (stateV (mkV186 "ñòðàõóâàì")) ;
|
fear_VS = mkVS (stateV (mkV186 "страхувам")) ;
|
||||||
find_V2 = dirV2 (actionV (mkV186 "íàìèðàì") (mkV173 "íàìåðÿ")) ;
|
find_V2 = dirV2 (actionV (mkV186 "намирам") (mkV173 "намеря")) ;
|
||||||
fish_N = mkN041 "ðèáà" ;
|
fish_N = mkN041 "риба" ;
|
||||||
floor_N = mkN007 "åòàæ" ;
|
floor_N = mkN007 "етаж" ;
|
||||||
fridge_N = mkN007 "ôðèçåð" ;
|
fridge_N = mkN007 "фризер" ;
|
||||||
friend_N = mkN031a "ïðèÿòåë" ;
|
friend_N = mkN031a "приятел" ;
|
||||||
fruit_N = mkN001 "ïëîä" ;
|
fruit_N = mkN001 "плод" ;
|
||||||
fun_AV = mkA079 "çàáàâåí" ;
|
fun_AV = mkA079 "забавен" ;
|
||||||
forget_V2 = dirV2 (actionV (mkV187 "çàáðàâÿì") (mkV173 "çàáðàâÿ")) ;
|
forget_V2 = dirV2 (actionV (mkV187 "забравям") (mkV173 "забравя")) ;
|
||||||
garden_N = mkN041 "ãðàäèíà" ;
|
garden_N = mkN041 "градина" ;
|
||||||
girl_N = mkN065 "ìîìè÷å" ;
|
girl_N = mkN065 "момиче" ;
|
||||||
glove_N = mkN041 "ðúêàâèöà" ;
|
glove_N = mkN041 "ръкавица" ;
|
||||||
gold_N = mkN054 "çëàòî" ;
|
gold_N = mkN054 "злато" ;
|
||||||
good_A = adjAdv (mkA080 "äîáúð") "äîáðå" ;
|
good_A = adjAdv (mkA080 "добър") "добре" ;
|
||||||
go_V = actionV (mkV186 "îòèâàì") (mkV146 "îòèäà") ;
|
go_V = actionV (mkV186 "отивам") (mkV146 "отида") ;
|
||||||
green_A = mkA076 "çåëåí" ;
|
green_A = mkA076 "зелен" ;
|
||||||
harbour_N = mkN066 "ïðèñòàíèùå" ;
|
harbour_N = mkN066 "пристанище" ;
|
||||||
hate_V2 = dirV2 (stateV (mkV173 "ìðàçÿ")) ;
|
hate_V2 = dirV2 (stateV (mkV173 "мразя")) ;
|
||||||
hat_N = mkN041 "øàïêà" ;
|
hat_N = mkN041 "шапка" ;
|
||||||
hear_V2 = dirV2 (actionV (mkV186 "÷óâàì") (mkV163 "÷óÿ")) ;
|
hear_V2 = dirV2 (actionV (mkV186 "чувам") (mkV163 "чуя")) ;
|
||||||
hill_N = mkN001 "õúëì" ;
|
hill_N = mkN001 "хълм" ;
|
||||||
hope_VS = mkVS (medialV (stateV (mkV186 "íàäÿâàì")) Acc) ;
|
hope_VS = mkVS (medialV (stateV (mkV186 "надявам")) Acc) ;
|
||||||
horse_N = mkN035 "êîí" ;
|
horse_N = mkN035 "кон" ;
|
||||||
hot_A = mkA076 "ãîðåù" ;
|
hot_A = mkA076 "горещ" ;
|
||||||
house_N = mkN041 "êúùà" ;
|
house_N = mkN041 "къща" ;
|
||||||
important_A = mkA079 "âàæåí" ;
|
important_A = mkA079 "важен" ;
|
||||||
industry_N = mkN047 "èíäóñòðèÿ" ;
|
industry_N = mkN047 "индустрия" ;
|
||||||
iron_N = mkN057 "æåëÿçî" ;
|
iron_N = mkN057 "желязо" ;
|
||||||
king_N = mkN035a "öàð" ;
|
king_N = mkN035a "цар" ;
|
||||||
know_V2 = dirV2 {
|
know_V2 = dirV2 {
|
||||||
s = \\_,vform => case vform of {
|
s = \\_,vform => case vform of {
|
||||||
VPassive aform => (mkA079 "èçâåñòåí").s ! aform ;
|
VPassive aform => (mkA079 "известен").s ! aform ;
|
||||||
_ => mkV162 "çíàÿ" ! vform
|
_ => mkV162 "зная" ! vform
|
||||||
} ;
|
} ;
|
||||||
vtype = VNormal ;
|
vtype = VNormal ;
|
||||||
lock_V = <>
|
lock_V = <>
|
||||||
} ;
|
} ;
|
||||||
know_VQ = mkVQ (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
|
know_VQ = mkVQ (actionV (mkV188 "знам") (mkV162 "зная")) ;
|
||||||
know_VS = mkVS (actionV (mkV188 "çíàì") (mkV162 "çíàÿ")) ;
|
know_VS = mkVS (actionV (mkV188 "знам") (mkV162 "зная")) ;
|
||||||
lake_N = mkN054 "åçåðî" ;
|
lake_N = mkN054 "езеро" ;
|
||||||
lamp_N = mkN041 "ëàìïà" ;
|
lamp_N = mkN041 "лампа" ;
|
||||||
learn_V2 = dirV2 (actionV (mkV176 "ó÷à") (mkV176 "íàó÷à")) ;
|
learn_V2 = dirV2 (actionV (mkV176 "уча") (mkV176 "науча")) ;
|
||||||
leather_N = mkN041 "êîæà" ;
|
leather_N = mkN041 "кожа" ;
|
||||||
leave_V2 = dirV2 (actionV (mkV187 "îñòàâÿì") (mkV173 "îñòàâÿ")) ;
|
leave_V2 = dirV2 (actionV (mkV187 "оставям") (mkV173 "оставя")) ;
|
||||||
like_V2 = dirV2 (actionV (mkV186 "õàðåñâàì") (mkV186 "õàðåñàì")) ;
|
like_V2 = dirV2 (actionV (mkV186 "харесвам") (mkV186 "харесам")) ;
|
||||||
listen_V2 = dirV2 (stateV (mkV186 "ñëóøàì")) ;
|
listen_V2 = dirV2 (stateV (mkV186 "слушам")) ;
|
||||||
live_V = stateV (mkV160 "æèâåÿ") ;
|
live_V = stateV (mkV160 "живея") ;
|
||||||
long_A = mkA080 "äúëúã" ;
|
long_A = mkA080 "дълъг" ;
|
||||||
lose_V2 = dirV2 (actionV (mkV173 "ãóáÿ") (mkV173 "çàãóáÿ")) ;
|
lose_V2 = dirV2 (actionV (mkV173 "губя") (mkV173 "загубя")) ;
|
||||||
love_N = mkN049 "ëþáîâ" ;
|
love_N = mkN049 "любов" ;
|
||||||
love_V2 = dirV2 (stateV (mkV186 "îáè÷àì")) ;
|
love_V2 = dirV2 (stateV (mkV186 "обичам")) ;
|
||||||
man_N = mkN024 "ìúæ" ;
|
man_N = mkN024 "мъж" ;
|
||||||
married_A2 = mkA2 (mkA076 "æåíåí") zaP ;
|
married_A2 = mkA2 (mkA076 "женен") zaP ;
|
||||||
meat_N = mkN054 "ìåñî" ;
|
meat_N = mkN054 "месо" ;
|
||||||
milk_N = mkN057 "ìëÿêî" ;
|
milk_N = mkN057 "мляко" ;
|
||||||
moon_N = mkN041 "ëóíà" ;
|
moon_N = mkN041 "луна" ;
|
||||||
mother_N2 = prepN2 (mkN041a "ìàéêà") naP ;
|
mother_N2 = prepN2 (mkN041a "майка") naP ;
|
||||||
mountain_N = mkN041 "ïëàíèíà" ;
|
mountain_N = mkN041 "планина" ;
|
||||||
music_N = mkN041 "ìóçèêà" ;
|
music_N = mkN041 "музика" ;
|
||||||
narrow_A = mkA084 "òåñåí" ;
|
narrow_A = mkA084 "тесен" ;
|
||||||
new_A = mkA076 "íîâ" ;
|
new_A = mkA076 "нов" ;
|
||||||
newspaper_N = mkN014 "âåñòíèê" ;
|
newspaper_N = mkN014 "вестник" ;
|
||||||
oil_N = mkN065 "îëèî" ;
|
oil_N = mkN065 "олио" ;
|
||||||
old_A = mkA076 "ñòàð" ;
|
old_A = mkA076 "стар" ;
|
||||||
open_V2 = dirV2 (actionV (mkV187 "îòâàðÿì") (mkV173 "îòâîðÿ")) ;
|
open_V2 = dirV2 (actionV (mkV187 "отварям") (mkV173 "отворя")) ;
|
||||||
paint_V2A = mkV2A (actionV (mkV186 "ðèñóâàì") (mkV186 "íàðèñóâàì")) noPrep ;
|
paint_V2A = mkV2A (actionV (mkV186 "рисувам") (mkV186 "нарисувам")) noPrep ;
|
||||||
paper_N = mkN047 "õàðòèÿ" ;
|
paper_N = mkN047 "хартия" ;
|
||||||
paris_PN = mkPN "Ïàðèæ" Masc ;
|
paris_PN = mkPN "Париж" Masc ;
|
||||||
peace_N = mkN040a "ìèð" ;
|
peace_N = mkN040a "мир" ;
|
||||||
pen_N = mkN041 "ïèñàëêà" ;
|
pen_N = mkN041 "писалка" ;
|
||||||
planet_N = mkN041 "ïëàíåòà" ;
|
planet_N = mkN041 "планета" ;
|
||||||
plastic_N = mkN041 "ïëàñòìàñà" ;
|
plastic_N = mkN041 "пластмаса" ;
|
||||||
play_V2 = dirV2 (stateV (mkV161 "èãðàÿ")) ;
|
play_V2 = dirV2 (stateV (mkV161 "играя")) ;
|
||||||
policeman_N = mkN032a "ïîëèöàé" ;
|
policeman_N = mkN032a "полицай" ;
|
||||||
priest_N = mkN014 "ñâåùåíèê" ;
|
priest_N = mkN014 "свещеник" ;
|
||||||
probable_AS = mkA079 "âåðîÿòåí" ;
|
probable_AS = mkA079 "вероятен" ;
|
||||||
queen_N = mkN041 "êðàëèöà" ;
|
queen_N = mkN041 "кралица" ;
|
||||||
radio_N = mkN054 "ðàäèî" ;
|
radio_N = mkN054 "радио" ;
|
||||||
rain_V0 = mkV0 (stateV (mkV174 "âàëè")) ;
|
rain_V0 = mkV0 (stateV (mkV174 "вали")) ;
|
||||||
read_V2 = dirV2 (stateV (mkV145 "÷åòà")) ;
|
read_V2 = dirV2 (stateV (mkV145 "чета")) ;
|
||||||
red_A = mkA076 "÷åðâåí" ;
|
red_A = mkA076 "червен" ;
|
||||||
religion_N = mkN047 "ðåëèãèÿ" ;
|
religion_N = mkN047 "религия" ;
|
||||||
restaurant_N = mkN007 "ðåñòîðàíò" ;
|
restaurant_N = mkN007 "ресторант" ;
|
||||||
river_N = mkN041 "ðåêà" ;
|
river_N = mkN041 "река" ;
|
||||||
rock_N = mkN041 "ñêàëà" ;
|
rock_N = mkN041 "скала" ;
|
||||||
roof_N = mkN007 "ïîêðèâ" ;
|
roof_N = mkN007 "покрив" ;
|
||||||
rubber_N = mkN041 "ãóìà" ;
|
rubber_N = mkN041 "гума" ;
|
||||||
run_V = stateV (mkV186 "áÿãàì") ;
|
run_V = stateV (mkV186 "бягам") ;
|
||||||
say_VS = mkVS (actionV (mkV186 "êàçâàì") (mkV156 "êàæà")) ;
|
say_VS = mkVS (actionV (mkV186 "казвам") (mkV156 "кажа")) ;
|
||||||
school_N = mkN066 "ó÷èëèùå" ;
|
school_N = mkN066 "училище" ;
|
||||||
science_N = mkN041 "íàóêà" ;
|
science_N = mkN041 "наука" ;
|
||||||
sea_N = mkN065 "ìîðå" ;
|
sea_N = mkN065 "море" ;
|
||||||
seek_V2 = dirV2 (stateV (mkV173 "òúðñÿ")) ;
|
seek_V2 = dirV2 (stateV (mkV173 "търся")) ;
|
||||||
see_V2 = dirV2 (actionV (mkV186 "âèæäàì") (mkV181 "âèäÿ")) ;
|
see_V2 = dirV2 (actionV (mkV186 "виждам") (mkV181 "видя")) ;
|
||||||
sell_V3 = dirV3 (stateV (mkV186 "ïðîäàâàì")) naP ;
|
sell_V3 = dirV3 (stateV (mkV186 "продавам")) naP ;
|
||||||
send_V3 = dirV3 (actionV (mkV186 "ïðàùàì") (mkV173 "ïðàòÿ")) doP ;
|
send_V3 = dirV3 (actionV (mkV186 "пращам") (mkV173 "пратя")) doP ;
|
||||||
sheep_N = mkN044 "îâöà" ;
|
sheep_N = mkN044 "овца" ;
|
||||||
ship_N = mkN007 "êîðàá" ;
|
ship_N = mkN007 "кораб" ;
|
||||||
shirt_N = mkN041 "ðèçà" ;
|
shirt_N = mkN041 "риза" ;
|
||||||
shoe_N = mkN041 "îáóâêà" ;
|
shoe_N = mkN041 "обувка" ;
|
||||||
shop_N = mkN007 "ìàãàçèí" ;
|
shop_N = mkN007 "магазин" ;
|
||||||
short_A = mkA076 "êúñ" ;
|
short_A = mkA076 "къс" ;
|
||||||
silver_N = mkN054 "ñðåáðî" ;
|
silver_N = mkN054 "сребро" ;
|
||||||
sister_N = mkN041a "ñåñòðà" ;
|
sister_N = mkN041a "сестра" ;
|
||||||
sleep_V = stateV (mkV182 "ñïÿ") ;
|
sleep_V = stateV (mkV182 "спя") ;
|
||||||
small_A = mkA080 "ìàëúê" ;
|
small_A = mkA080 "малък" ;
|
||||||
snake_N = mkN047 "çìèÿ" ;
|
snake_N = mkN047 "змия" ;
|
||||||
sock_N = mkN007 "÷îðàï" ;
|
sock_N = mkN007 "чорап" ;
|
||||||
speak_V2 = dirV2 (stateV (mkV173 "ãîâîðÿ")) ;
|
speak_V2 = dirV2 (stateV (mkV173 "говоря")) ;
|
||||||
star_N = mkN041 "çâåçäà" ;
|
star_N = mkN041 "звезда" ;
|
||||||
steel_N = mkN041 "ñòîìàíà" ;
|
steel_N = mkN041 "стомана" ;
|
||||||
stone_N = mkN017 "êàìúê" ;
|
stone_N = mkN017 "камък" ;
|
||||||
stove_N = mkN041 "ïå÷êà" ;
|
stove_N = mkN041 "печка" ;
|
||||||
student_N = mkN007a "ñòóäåíò" ;
|
student_N = mkN007a "студент" ;
|
||||||
stupid_A = mkA076 "ãëóïàâ" ;
|
stupid_A = mkA076 "глупав" ;
|
||||||
sun_N = mkN066 "ñëúíöå" ;
|
sun_N = mkN066 "слънце" ;
|
||||||
switch8off_V2 = dirV2 (actionV (mkV186 "èçêëþ÷âàì") (mkV176 "èçêëþ÷à")) ;
|
switch8off_V2 = dirV2 (actionV (mkV186 "изключвам") (mkV176 "изключа")) ;
|
||||||
switch8on_V2 = dirV2 (actionV (mkV186 "âêëþ÷âàì") (mkV176 "âêëþ÷à")) ;
|
switch8on_V2 = dirV2 (actionV (mkV186 "включвам") (mkV176 "включа")) ;
|
||||||
table_N = mkN041 "ìàñà" ;
|
table_N = mkN041 "маса" ;
|
||||||
talk_V3 = mkV3 (stateV (mkV173 "ãîâîðÿ")) naP zaP ;
|
talk_V3 = mkV3 (stateV (mkV173 "говоря")) naP zaP ;
|
||||||
teacher_N = mkN031a "ó÷èòåë" ;
|
teacher_N = mkN031a "учител" ;
|
||||||
teach_V2 = dirV2 (actionV (mkV186 "ïðåïîäàâàì") (mkV168 "ïðåïîäàì")) ;
|
teach_V2 = dirV2 (actionV (mkV186 "преподавам") (mkV168 "преподам")) ;
|
||||||
television_N = mkN047 "òåëåâèçèÿ" ;
|
television_N = mkN047 "телевизия" ;
|
||||||
thick_A = mkA076 "äåáåë" ;
|
thick_A = mkA076 "дебел" ;
|
||||||
thin_A = mkA080 "òúíúê" ;
|
thin_A = mkA080 "тънък" ;
|
||||||
train_N = mkN001 "âëàê" ;
|
train_N = mkN001 "влак" ;
|
||||||
travel_V = stateV (mkV186 "ïúòóâàì") ;
|
travel_V = stateV (mkV186 "пътувам") ;
|
||||||
tree_N = mkN061 "äúðâî" ;
|
tree_N = mkN061 "дърво" ;
|
||||||
ugly_A = mkA076 "ãëóïàâ" ;
|
ugly_A = mkA076 "глупав" ;
|
||||||
understand_V2 = dirV2 (actionV (mkV186 "ðàçáèðàì") (mkV170 "ðàçáåðà")) ;
|
understand_V2 = dirV2 (actionV (mkV186 "разбирам") (mkV170 "разбера")) ;
|
||||||
university_N = mkN007 "óíèâåðñèòåò" ;
|
university_N = mkN007 "университет" ;
|
||||||
village_N = mkN054 "ñåëî" ;
|
village_N = mkN054 "село" ;
|
||||||
wait_V2 = prepV2 (stateV (mkV186 "÷àêàì")) zaP ;
|
wait_V2 = prepV2 (stateV (mkV186 "чакам")) zaP ;
|
||||||
walk_V = stateV (mkV173 "õîäÿ") ;
|
walk_V = stateV (mkV173 "ходя") ;
|
||||||
warm_A = mkA080 "òîïúë" ;
|
warm_A = mkA080 "топъл" ;
|
||||||
war_N = mkN041 "âîéíà" ;
|
war_N = mkN041 "война" ;
|
||||||
watch_V2 = dirV2 (stateV (mkV186 "ãëåäàì")) ;
|
watch_V2 = dirV2 (stateV (mkV186 "гледам")) ;
|
||||||
water_N = mkN041 "âîäà" ;
|
water_N = mkN041 "вода" ;
|
||||||
white_A = mkA081 "áÿë" ;
|
white_A = mkA081 "бял" ;
|
||||||
window_N = mkN008 "ïðîçîðåö" ;
|
window_N = mkN008 "прозорец" ;
|
||||||
wine_N = mkN054 "âèíî" ;
|
wine_N = mkN054 "вино" ;
|
||||||
win_V2 = dirV2 (actionV (mkV186 "ïîáåæäàâàì") (mkV174 "ïîáåäÿ")) ;
|
win_V2 = dirV2 (actionV (mkV186 "побеждавам") (mkV174 "победя")) ;
|
||||||
woman_N = mkN041a "æåíà" ;
|
woman_N = mkN041a "жена" ;
|
||||||
wonder_VQ = mkVQ (medialV (actionV (mkV186 "ó÷óäâàì") (mkV173 "÷óäÿ")) Acc) ;
|
wonder_VQ = mkVQ (medialV (actionV (mkV186 "учудвам") (mkV173 "чудя")) Acc) ;
|
||||||
wood_N = mkN041 "äúðâåñèíà" ;
|
wood_N = mkN041 "дървесина" ;
|
||||||
write_V2 = dirV2 (stateV (mkV159 "ïèøà")) ;
|
write_V2 = dirV2 (stateV (mkV159 "пиша")) ;
|
||||||
yellow_A = mkA076 "æúëò" ;
|
yellow_A = mkA076 "жълт" ;
|
||||||
young_A = mkA076 "ìëàä" ;
|
young_A = mkA076 "млад" ;
|
||||||
do_V2 = dirV2 (actionV (mkV173 "ïðàâÿ") (mkV173 "íàïðàâÿ")) ;
|
do_V2 = dirV2 (actionV (mkV173 "правя") (mkV173 "направя")) ;
|
||||||
now_Adv = mkAdv "ñåãà" ;
|
now_Adv = mkAdv "сега" ;
|
||||||
already_Adv = mkAdv "âå÷å" ;
|
already_Adv = mkAdv "вече" ;
|
||||||
song_N = mkN050 "ïåñåí" ;
|
song_N = mkN050 "песен" ;
|
||||||
add_V3 = dirV3 (actionV (mkV186 "ñúáèðàì") (mkV170 "ñúáåðà")) sP ;
|
add_V3 = dirV3 (actionV (mkV186 "събирам") (mkV170 "събера")) sP ;
|
||||||
number_N = mkN054 "÷èñëî" ;
|
number_N = mkN054 "число" ;
|
||||||
put_V2 = prepV2 (actionV (mkV186 "ñëàãàì") (mkV176 "ñëîæà")) noPrep ;
|
put_V2 = prepV2 (actionV (mkV186 "слагам") (mkV176 "сложа")) noPrep ;
|
||||||
stop_V = actionV (mkV186 "ñïèðàì") (mkV150 "ñïðà") ;
|
stop_V = actionV (mkV186 "спирам") (mkV150 "спра") ;
|
||||||
jump_V = actionV (mkV186 "ñêà÷àì") (mkV176 "ñêî÷à") ;
|
jump_V = actionV (mkV186 "скачам") (mkV176 "скоча") ;
|
||||||
left_Ord = mkA081 "ëÿâ" ** {nonEmpty=True} ;
|
left_Ord = mkA081 "ляв" ** {nonEmpty=True} ;
|
||||||
right_Ord = mkA084 "äåñåí" ** {nonEmpty=True} ;
|
right_Ord = mkA084 "десен" ** {nonEmpty=True} ;
|
||||||
far_Adv = mkAdv "äàëå÷å" ;
|
far_Adv = mkAdv "далече" ;
|
||||||
correct_A = mkA079 "ïðàâèëåí" ;
|
correct_A = mkA079 "правилен" ;
|
||||||
dry_A = mkA076 "ñóõ" ;
|
dry_A = mkA076 "сух" ;
|
||||||
dull_A = mkA076 "òúï" ;
|
dull_A = mkA076 "тъп" ;
|
||||||
full_A = mkA079 "ïúëåí" ;
|
full_A = mkA079 "пълен" ;
|
||||||
heavy_A = mkA080 "òåæúê" ;
|
heavy_A = mkA080 "тежък" ;
|
||||||
near_A = mkA080 "áëèçúê" ;
|
near_A = mkA080 "близък" ;
|
||||||
rotten_A = mkA076 "ïðîãíèë" ;
|
rotten_A = mkA076 "прогнил" ;
|
||||||
round_A = mkA080 "êðúãúë" ;
|
round_A = mkA080 "кръгъл" ;
|
||||||
sharp_A = mkA080 "îñòúð" ;
|
sharp_A = mkA080 "остър" ;
|
||||||
smooth_A = mkA080 "ãëàäúê" ;
|
smooth_A = mkA080 "гладък" ;
|
||||||
straight_A = mkA081 "ïðÿê" ;
|
straight_A = mkA081 "пряк" ;
|
||||||
wet_A = mkA080 "ìîêúð" ; ----
|
wet_A = mkA080 "мокър" ; ----
|
||||||
wide_A = mkA076 "øèðîê" ;
|
wide_A = mkA076 "широк" ;
|
||||||
animal_N = mkN062 "æèâîòíî" ;
|
animal_N = mkN062 "животно" ;
|
||||||
ashes_N = mkN049 "ïåïeë" ;
|
ashes_N = mkN049 "пепeл" ;
|
||||||
back_N = mkN003 "ãðúá" ;
|
back_N = mkN003 "гръб" ;
|
||||||
bark_N = mkN028 "ëàé" ;
|
bark_N = mkN028 "лай" ;
|
||||||
belly_N = mkN007 "êîðåì" ;
|
belly_N = mkN007 "корем" ;
|
||||||
blood_N = mkN053 "êðúâ" ;
|
blood_N = mkN053 "кръв" ;
|
||||||
bone_N = mkN049 "êîñò" ;
|
bone_N = mkN049 "кост" ;
|
||||||
breast_N = mkN041 "ãúðäà" ;
|
breast_N = mkN041 "гърда" ;
|
||||||
cloud_N = mkN014 "îáëàê" ;
|
cloud_N = mkN014 "облак" ;
|
||||||
day_N = mkN033 "äåí" ;
|
day_N = mkN033 "ден" ;
|
||||||
dust_N = mkN001 "ïðàõ" ;
|
dust_N = mkN001 "прах" ;
|
||||||
ear_N = mkN064 "óõî" ;
|
ear_N = mkN064 "ухо" ;
|
||||||
earth_N = mkN047 "çåìÿ" ;
|
earth_N = mkN047 "земя" ;
|
||||||
egg_N = mkN066 "ÿéöå" ;
|
egg_N = mkN066 "яйце" ;
|
||||||
eye_N = mkN063 "îêî" ;
|
eye_N = mkN063 "око" ;
|
||||||
fat_N = mkN041 "ìàçíèíà" ;
|
fat_N = mkN041 "мазнина" ;
|
||||||
feather_N = mkN054 "ïåðî" ;
|
feather_N = mkN054 "перо" ;
|
||||||
fingernail_N = mkN034 "íîêúò" ;
|
fingernail_N = mkN034 "нокът" ;
|
||||||
fire_N = mkN030 "îãúí" ;
|
fire_N = mkN030 "огън" ;
|
||||||
flower_N = mkN068 "öâåòå" ;
|
flower_N = mkN068 "цвете" ;
|
||||||
fog_N = mkN041 "ìúãëà" ;
|
fog_N = mkN041 "мъгла" ;
|
||||||
foot_N = mkN041 "ñòúïêà" ;
|
foot_N = mkN041 "стъпка" ;
|
||||||
forest_N = mkN041 "ãîðà" ;
|
forest_N = mkN041 "гора" ;
|
||||||
grass_N = mkN041 "òðåâà" ;
|
grass_N = mkN041 "трева" ;
|
||||||
guts_N = mkN054 "÷åðâî" ;
|
guts_N = mkN054 "черво" ;
|
||||||
hair_N = mkN041 "êîñà" ;
|
hair_N = mkN041 "коса" ;
|
||||||
hand_N = mkN045 "ðúêà" ;
|
hand_N = mkN045 "ръка" ;
|
||||||
head_N = mkN041 "ãëàâà" ;
|
head_N = mkN041 "глава" ;
|
||||||
heart_N = mkN066 "ñúðöå" ;
|
heart_N = mkN066 "сърце" ;
|
||||||
horn_N = mkN001 "ðîã" ;
|
horn_N = mkN001 "рог" ;
|
||||||
husband_N = mkN015 "ñúïðóã" ; -- personal
|
husband_N = mkN015 "съпруг" ; -- personal
|
||||||
ice_N = mkN001 "ëåä" ;
|
ice_N = mkN001 "лед" ;
|
||||||
knee_N = mkN058 "êîëÿíî" ;
|
knee_N = mkN058 "коляно" ;
|
||||||
leaf_N = mkN054 "ëèñòî" ;
|
leaf_N = mkN054 "листо" ;
|
||||||
leg_N = mkN022 "êðàê" ;
|
leg_N = mkN022 "крак" ;
|
||||||
liver_N = mkN001 "äðîá" ;
|
liver_N = mkN001 "дроб" ;
|
||||||
louse_N = mkN041 "âúøêà" ;
|
louse_N = mkN041 "въшка" ;
|
||||||
mouth_N = mkN042 "óñòà" ;
|
mouth_N = mkN042 "уста" ;
|
||||||
name_N = mkN069 "èìå" ;
|
name_N = mkN069 "име" ;
|
||||||
neck_N = mkN003 "ãðúá" ;
|
neck_N = mkN003 "гръб" ;
|
||||||
night_N = mkN049 "íîù" ;
|
night_N = mkN049 "нощ" ;
|
||||||
nose_N = mkN001 "íîñ" ;
|
nose_N = mkN001 "нос" ;
|
||||||
person_N = mkN014 "÷îâåê" ;
|
person_N = mkN014 "човек" ;
|
||||||
rain_N = mkN001 "äúæä" ;
|
rain_N = mkN001 "дъжд" ;
|
||||||
road_N = mkN037 "ïúò" ;
|
road_N = mkN037 "път" ;
|
||||||
root_N = mkN007 "êîðåí" ;
|
root_N = mkN007 "корен" ;
|
||||||
rope_N = mkN065 "âúæå" ;
|
rope_N = mkN065 "въже" ;
|
||||||
salt_N = mkN049 "ñîë" ;
|
salt_N = mkN049 "сол" ;
|
||||||
sand_N = mkN014 "ïÿñúê" ;
|
sand_N = mkN014 "пясък" ;
|
||||||
seed_N = mkN069 "ñåìå" ;
|
seed_N = mkN069 "семе" ;
|
||||||
skin_N = mkN041 "êîæà" ;
|
skin_N = mkN041 "кожа" ;
|
||||||
sky_N = mkN070 "íåáå" ;
|
sky_N = mkN070 "небе" ;
|
||||||
smoke_N = mkN014 "ïóøåê" ;
|
smoke_N = mkN014 "пушек" ;
|
||||||
snow_N = mkN002 "ñíÿã" ;
|
snow_N = mkN002 "сняг" ;
|
||||||
stick_N = mkN041 "ïðú÷êà" ;
|
stick_N = mkN041 "пръчка" ;
|
||||||
tail_N = mkN041 "îïàøêà" ;
|
tail_N = mkN041 "опашка" ;
|
||||||
tongue_N = mkN014 "åçèê" ;
|
tongue_N = mkN014 "език" ;
|
||||||
tooth_N = mkN007 "çúá" ;
|
tooth_N = mkN007 "зъб" ;
|
||||||
wife_N = mkN041 "ñúïðóãà" ;
|
wife_N = mkN041 "съпруга" ;
|
||||||
wind_N = mkN004 "âÿòúð" ;
|
wind_N = mkN004 "вятър" ;
|
||||||
wing_N = mkN056 "êðèëî" ;
|
wing_N = mkN056 "крило" ;
|
||||||
worm_N = mkN032 "÷åðâåé" ;
|
worm_N = mkN032 "червей" ;
|
||||||
year_N = mkN041 "ãîäèíà" ;
|
year_N = mkN041 "година" ;
|
||||||
blow_V = stateV (mkV186 "äóõàì") ;
|
blow_V = stateV (mkV186 "духам") ;
|
||||||
breathe_V = dirV2 (stateV (mkV186 "äèøàì")) ;
|
breathe_V = dirV2 (stateV (mkV186 "дишам")) ;
|
||||||
burn_V = actionV (mkV187 "èçãàðÿì") (mkV177 "èçãîðÿ") ;
|
burn_V = actionV (mkV187 "изгарям") (mkV177 "изгоря") ;
|
||||||
dig_V = stateV (mkV161 "êîïàÿ") ;
|
dig_V = stateV (mkV161 "копая") ;
|
||||||
fall_V = actionV (mkV186 "ïàäàì") (mkV152 "ïàäíà") ;
|
fall_V = actionV (mkV186 "падам") (mkV152 "падна") ;
|
||||||
float_V = stateV (mkV186 "ïëàâàì") ;
|
float_V = stateV (mkV186 "плавам") ;
|
||||||
flow_V = stateV (mkV148 "òåêà") ;
|
flow_V = stateV (mkV148 "тека") ;
|
||||||
fly_V = stateV (mkV177 "ëåòÿ") ;
|
fly_V = stateV (mkV177 "летя") ;
|
||||||
freeze_V = stateV (mkV186 "çàìðúçâàì") ;
|
freeze_V = stateV (mkV186 "замръзвам") ;
|
||||||
give_V3 = dirV3 (actionV (mkV186 "äàâàì") (mkV186 "äàì")) naP ;
|
give_V3 = dirV3 (actionV (mkV186 "давам") (mkV186 "дам")) naP ;
|
||||||
laugh_V = medialV (stateV (mkV160 "ñìåÿ")) Acc ;
|
laugh_V = medialV (stateV (mkV160 "смея")) Acc ;
|
||||||
lie_V = stateV (mkV178 "ëåæà") ;
|
lie_V = stateV (mkV178 "лежа") ;
|
||||||
play_V = stateV (mkV161 "èãðàÿ") ;
|
play_V = stateV (mkV161 "играя") ;
|
||||||
sew_V = stateV (mkV163 "øèÿ") ;
|
sew_V = stateV (mkV163 "шия") ;
|
||||||
sing_V = stateV (mkV164 "ïåÿ") ;
|
sing_V = stateV (mkV164 "пея") ;
|
||||||
sit_V = stateV (mkV177 "ñåäÿ") ;
|
sit_V = stateV (mkV177 "седя") ;
|
||||||
smell_V = stateV (mkV159 "ìèðèøà") ;
|
smell_V = stateV (mkV159 "мириша") ;
|
||||||
spit_V = stateV (mkV163 "ïëþÿ") ;
|
spit_V = stateV (mkV163 "плюя") ;
|
||||||
stand_V = stateV (mkV180 "ñòîÿ") ;
|
stand_V = stateV (mkV180 "стоя") ;
|
||||||
swell_V = actionV (mkV186 "íàäóâàì") (mkV163 "íàäóÿ") ;
|
swell_V = actionV (mkV186 "надувам") (mkV163 "надуя") ;
|
||||||
swim_V = stateV (mkV186 "ïëóâàì") ;
|
swim_V = stateV (mkV186 "плувам") ;
|
||||||
think_V = stateV (mkV173 "ìèñëÿ") ;
|
think_V = stateV (mkV173 "мисля") ;
|
||||||
turn_V = actionV (mkV186 "îáðúùàì") (mkV152 "îáúðíà") ;
|
turn_V = actionV (mkV186 "обръщам") (mkV152 "обърна") ;
|
||||||
vomit_V = actionV (mkV186 "ïîâðúùàì") (mkV152 "ïîâúðíà") ;
|
vomit_V = actionV (mkV186 "повръщам") (mkV152 "повърна") ;
|
||||||
|
|
||||||
bite_V2 = dirV2 (stateV (mkV154 "õàïÿ")) ;
|
bite_V2 = dirV2 (stateV (mkV154 "хапя")) ;
|
||||||
count_V2 = dirV2 (stateV (mkV175 "áðîÿ")) ;
|
count_V2 = dirV2 (stateV (mkV175 "броя")) ;
|
||||||
cut_V2 = dirV2 (stateV (mkV157 "ðåæà")) ;
|
cut_V2 = dirV2 (stateV (mkV157 "режа")) ;
|
||||||
fear_V2 = prepV2 (medialV (stateV (mkV186 "ñòðàõóâàì")) Acc) otP;
|
fear_V2 = prepV2 (medialV (stateV (mkV186 "страхувам")) Acc) otP;
|
||||||
fight_V2 = prepV2 (medialV (stateV (mkV173 "áîðÿ")) Acc) sP;
|
fight_V2 = prepV2 (medialV (stateV (mkV173 "боря")) Acc) sP;
|
||||||
hit_V2 = dirV2 (actionV (mkV187 "óäðÿì") (mkV173 "óäàðÿ")) ;
|
hit_V2 = dirV2 (actionV (mkV187 "удрям") (mkV173 "ударя")) ;
|
||||||
hold_V2 = dirV2 (stateV (mkV179 "äúðæà")) ;
|
hold_V2 = dirV2 (stateV (mkV179 "държа")) ;
|
||||||
hunt_V2 = dirV2 (stateV (mkV174 "ëîâÿ")) ;
|
hunt_V2 = dirV2 (stateV (mkV174 "ловя")) ;
|
||||||
kill_V2 = dirV2 (actionV (mkV186 "óáèâàì") (mkV163 "óáèÿ")) ;
|
kill_V2 = dirV2 (actionV (mkV186 "убивам") (mkV163 "убия")) ;
|
||||||
pull_V2 = dirV2 (stateV (mkV186 "äúðïàì")) ;
|
pull_V2 = dirV2 (stateV (mkV186 "дърпам")) ;
|
||||||
push_V2 = dirV2 (stateV (mkV186 "áóòàì")) ;
|
push_V2 = dirV2 (stateV (mkV186 "бутам")) ;
|
||||||
rub_V2 = dirV2 (stateV (mkV163 "òðèÿ")) ;
|
rub_V2 = dirV2 (stateV (mkV163 "трия")) ;
|
||||||
scratch_V2 = dirV2 (actionV (mkV186 "äðàñêàì") (mkV152 "äðàñíà")) ;
|
scratch_V2 = dirV2 (actionV (mkV186 "драскам") (mkV152 "драсна")) ;
|
||||||
split_V2 = dirV2 (actionV (mkV187 "ðàçäåëÿì") (mkV174 "ðàçäåëÿ")) ;
|
split_V2 = dirV2 (actionV (mkV187 "разделям") (mkV174 "разделя")) ;
|
||||||
squeeze_V2 = dirV2 (actionV (mkV186 "ñòèñêàì") (mkV152 "ñòèñíà")) ;
|
squeeze_V2 = dirV2 (actionV (mkV186 "стискам") (mkV152 "стисна")) ;
|
||||||
stab_V2 = dirV2 (actionV (mkV186 "ïðîìóøâàì") (mkV176 "ïðîìóøà")) ;
|
stab_V2 = dirV2 (actionV (mkV186 "промушвам") (mkV176 "промуша")) ;
|
||||||
suck_V2 = dirV2 (stateV (mkV155 "ñó÷à")) ;
|
suck_V2 = dirV2 (stateV (mkV155 "суча")) ;
|
||||||
throw_V2 = dirV2 (actionV (mkV187 "õâúðëÿì") (mkV173 "õâúðëÿ")) ;
|
throw_V2 = dirV2 (actionV (mkV187 "хвърлям") (mkV173 "хвърля")) ;
|
||||||
tie_V2 = dirV2 (actionV (mkV186 "âðúçâàì") (mkV156 "âúðæà")) ;
|
tie_V2 = dirV2 (actionV (mkV186 "връзвам") (mkV156 "вържа")) ;
|
||||||
wash_V2 = dirV2 (stateV (mkV163 "ìèÿ")) ;
|
wash_V2 = dirV2 (stateV (mkV163 "мия")) ;
|
||||||
wipe_V2 = dirV2 (stateV (mkV159 "áúðøà")) ;
|
wipe_V2 = dirV2 (stateV (mkV159 "бърша")) ;
|
||||||
|
|
||||||
grammar_N = mkN041 "ãðàìàòèêà" ;
|
grammar_N = mkN041 "граматика" ;
|
||||||
language_N = mkN014 "åçèê" ;
|
language_N = mkN014 "език" ;
|
||||||
rule_N = mkN054 "ïðàâèëî" ;
|
rule_N = mkN054 "правило" ;
|
||||||
|
|
||||||
john_PN = mkPN "Äæîí" Masc ;
|
john_PN = mkPN "Джон" Masc ;
|
||||||
question_N = mkN007 "âúïðîñ" ;
|
question_N = mkN007 "въпрос" ;
|
||||||
ready_A = mkA076 "ãîòîâ" ;
|
ready_A = mkA076 "готов" ;
|
||||||
reason_N = mkN041 "ïðè÷èíà" ;
|
reason_N = mkN041 "причина" ;
|
||||||
today_Adv = mkAdv "äíåñ" ;
|
today_Adv = mkAdv "днес" ;
|
||||||
uncertain_A = mkA079 "íåÿñåí" ;
|
uncertain_A = mkA079 "неясен" ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
zaP = mkPrep "çà" Acc ;
|
zaP = mkPrep "за" Acc ;
|
||||||
naP = mkPrep [] Dat ;
|
naP = mkPrep [] Dat ;
|
||||||
otP = mkPrep "îò" Acc ;
|
otP = mkPrep "от" Acc ;
|
||||||
doP = mkPrep "äî" Acc ;
|
doP = mkPrep "до" Acc ;
|
||||||
sP = mkPrep (pre { "ñ" ;
|
sP = mkPrep (pre { "с" ;
|
||||||
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
|
"със" / strs {"с" ; "з" ; "С" ; "З"}
|
||||||
}) Acc ;
|
}) Acc ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--# -path=.:../../prelude
|
--# -path=.:../../prelude
|
||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
|
|
||||||
--1 A Simple English Resource Morphology
|
--1 A Simple English Resource Morphology
|
||||||
--
|
--
|
||||||
@@ -14,7 +14,7 @@ resource MorphoBul = ResBul ** open
|
|||||||
Prelude,
|
Prelude,
|
||||||
CatBul
|
CatBul
|
||||||
in {
|
in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
@@ -95,73 +95,73 @@ oper
|
|||||||
\cheta,chete,chetoh,chetqh,chel,chetql,cheten,chetqst,cheti,chetene ->
|
\cheta,chete,chetoh,chetqh,chel,chetql,cheten,chetqst,cheti,chetene ->
|
||||||
table {
|
table {
|
||||||
VPres Sg P1 => cheta;
|
VPres Sg P1 => cheta;
|
||||||
VPres Sg P2 => chete + "ø";
|
VPres Sg P2 => chete + "ш";
|
||||||
VPres Sg P3 => chete;
|
VPres Sg P3 => chete;
|
||||||
VPres Pl P1 => case chete of {
|
VPres Pl P1 => case chete of {
|
||||||
_ + ("à"|"ÿ") => chete + "ìå";
|
_ + ("а"|"я") => chete + "ме";
|
||||||
_ => chete + "ì"
|
_ => chete + "м"
|
||||||
};
|
};
|
||||||
VPres Pl P2 => chete + "òå";
|
VPres Pl P2 => chete + "те";
|
||||||
VPres Pl P3 => case cheta of {
|
VPres Pl P3 => case cheta of {
|
||||||
vika + "ì" => case chete of {
|
vika + "м" => case chete of {
|
||||||
zn + "àå" => zn + "àÿò";
|
zn + "ае" => zn + "аят";
|
||||||
dad + "å" => dad + "àò";
|
dad + "е" => dad + "ат";
|
||||||
vika => vika + "ò"
|
vika => vika + "т"
|
||||||
};
|
};
|
||||||
_ => cheta + "ò"
|
_ => cheta + "т"
|
||||||
};
|
};
|
||||||
VAorist Sg P1 => chetoh;
|
VAorist Sg P1 => chetoh;
|
||||||
VAorist Sg _ => case chetoh of {
|
VAorist Sg _ => case chetoh of {
|
||||||
chet+"îõ" => chete;
|
chet+"ох" => chete;
|
||||||
zova+ "õ" => zova
|
zova+ "х" => zova
|
||||||
};
|
};
|
||||||
VAorist Pl P1 => chetoh + "ìå";
|
VAorist Pl P1 => chetoh + "ме";
|
||||||
VAorist Pl P2 => chetoh + "òå";
|
VAorist Pl P2 => chetoh + "те";
|
||||||
VAorist Pl P3 => chetoh + "à";
|
VAorist Pl P3 => chetoh + "а";
|
||||||
VImperfect Sg P1 => chetqh;
|
VImperfect Sg P1 => chetqh;
|
||||||
VImperfect Sg _ => case chete of {
|
VImperfect Sg _ => case chete of {
|
||||||
rabot + "è" => rabot + "eøå";
|
rabot + "и" => rabot + "eше";
|
||||||
_ => chete + "øå"
|
_ => chete + "ше"
|
||||||
};
|
};
|
||||||
VImperfect Pl P1 => chetqh + "ìå";
|
VImperfect Pl P1 => chetqh + "ме";
|
||||||
VImperfect Pl P2 => chetqh + "òå";
|
VImperfect Pl P2 => chetqh + "те";
|
||||||
VImperfect Pl P3 => chetqh + "à";
|
VImperfect Pl P3 => chetqh + "а";
|
||||||
VPerfect aform =>let chel1 : Str =
|
VPerfect aform =>let chel1 : Str =
|
||||||
case chel of {
|
case chel of {
|
||||||
pas+"úë" => pas+"ë";
|
pas+"ъл" => pas+"л";
|
||||||
_ => chel
|
_ => chel
|
||||||
} ;
|
} ;
|
||||||
chel2 : Str =
|
chel2 : Str =
|
||||||
case chel of {
|
case chel of {
|
||||||
w+"ëÿçúë" => w+"ëåçë";
|
w+"лязъл" => w+"лезл";
|
||||||
_ => chel
|
_ => chel
|
||||||
}
|
}
|
||||||
in (mkAdjective chel
|
in (mkAdjective chel
|
||||||
(chel2+"èÿ")
|
(chel2+"ия")
|
||||||
(chel2+"èÿò")
|
(chel2+"ият")
|
||||||
(chel1+"a")
|
(chel1+"a")
|
||||||
(chel1+"àòà")
|
(chel1+"ата")
|
||||||
(chel1+"î")
|
(chel1+"о")
|
||||||
(chel1+"îòî")
|
(chel1+"ото")
|
||||||
(ia2e chel1+"è")
|
(ia2e chel1+"и")
|
||||||
(ia2e chel1+"èòå")).s ! aform ;
|
(ia2e chel1+"ите")).s ! aform ;
|
||||||
VPluPerfect aform => regAdjective chetql ! aform ;
|
VPluPerfect aform => regAdjective chetql ! aform ;
|
||||||
VPassive aform => regAdjective cheten ! aform ;
|
VPassive aform => regAdjective cheten ! aform ;
|
||||||
VPresPart aform => regAdjective chetqst ! aform ;
|
VPresPart aform => regAdjective chetqst ! aform ;
|
||||||
VImperative Sg => cheti;
|
VImperative Sg => cheti;
|
||||||
VImperative Pl => case cheti of {
|
VImperative Pl => case cheti of {
|
||||||
chet + "è" => chet + "åòå";
|
chet + "и" => chet + "ете";
|
||||||
ela => ela + "òå"
|
ela => ela + "те"
|
||||||
};
|
};
|
||||||
VNoun nform => let v0 = init chetene
|
VNoun nform => let v0 = init chetene
|
||||||
in (mkNoun (v0+"å")
|
in (mkNoun (v0+"е")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"å")
|
(v0+"е")
|
||||||
ANeut) ! nform;
|
ANeut) ! nform;
|
||||||
VGerund => case chete of {
|
VGerund => case chete of {
|
||||||
rabot + "è" => rabot + "åéêè";
|
rabot + "и" => rabot + "ейки";
|
||||||
_ => chete + "éêè"
|
_ => chete + "йки"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -172,51 +172,51 @@ oper
|
|||||||
table {
|
table {
|
||||||
NF Sg Indef => sg ;
|
NF Sg Indef => sg ;
|
||||||
NF Sg Def => case sg of {
|
NF Sg Def => case sg of {
|
||||||
_+"à"=>sg+"òà" ;
|
_+"а"=>sg+"та" ;
|
||||||
_+"ÿ"=>sg+"òà" ;
|
_+"я"=>sg+"та" ;
|
||||||
_+"î"=>sg+"òî" ;
|
_+"о"=>sg+"то" ;
|
||||||
_+"ó"=>sg+"òî" ;
|
_+"у"=>sg+"то" ;
|
||||||
_+"å"=>sg+"òî" ;
|
_+"е"=>sg+"то" ;
|
||||||
_+"è"=>sg+"òî" ;
|
_+"и"=>sg+"то" ;
|
||||||
s+"é"=>s +"ÿ" ;
|
s+"й"=>s +"я" ;
|
||||||
_+("úð")
|
_+("ър")
|
||||||
=>sg +"à" ;
|
=>sg +"а" ;
|
||||||
_+("òåë"|"àð"|"ÿð"|"äåí"
|
_+("тел"|"ар"|"яр"|"ден"
|
||||||
|"ïúò"|"îãúí"|"ñúí"
|
|"път"|"огън"|"сън"
|
||||||
|"êîí"|"êðàë"|"öàð"
|
|"кон"|"крал"|"цар"
|
||||||
|"çåò"|"ëàêúò"|"íîêúò")
|
|"зет"|"лакът"|"нокът")
|
||||||
=>sg +"ÿ" ;
|
=>sg +"я" ;
|
||||||
_ =>case g of {
|
_ =>case g of {
|
||||||
AFem => sg+"òà" ;
|
AFem => sg+"та" ;
|
||||||
_ => sg+"à"
|
_ => sg+"а"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
NF Pl Indef => pl ;
|
NF Pl Indef => pl ;
|
||||||
NF Pl Def => case pl of {
|
NF Pl Def => case pl of {
|
||||||
_+"à"=>pl+"òà" ;
|
_+"а"=>pl+"та" ;
|
||||||
_+"å"=>pl+"òå" ;
|
_+"е"=>pl+"те" ;
|
||||||
_+"è"=>pl+"òå" ;
|
_+"и"=>pl+"те" ;
|
||||||
_+"ÿ"=>pl+"òà" ;
|
_+"я"=>pl+"та" ;
|
||||||
_ =>pl+"òå"
|
_ =>pl+"те"
|
||||||
} ;
|
} ;
|
||||||
NFSgDefNom => case sg of {
|
NFSgDefNom => case sg of {
|
||||||
_+"à"=>sg+"òà" ;
|
_+"а"=>sg+"та" ;
|
||||||
_+"ÿ"=>sg+"òà" ;
|
_+"я"=>sg+"та" ;
|
||||||
_+"î"=>sg+"òî" ;
|
_+"о"=>sg+"то" ;
|
||||||
_+"ó"=>sg+"òî" ;
|
_+"у"=>sg+"то" ;
|
||||||
_+"å"=>sg+"òî" ;
|
_+"е"=>sg+"то" ;
|
||||||
_+"è"=>sg+"òî" ;
|
_+"и"=>sg+"то" ;
|
||||||
s+"é"=>s +"ÿò" ;
|
s+"й"=>s +"ят" ;
|
||||||
_+("úð")
|
_+("ър")
|
||||||
=>sg +"úò" ;
|
=>sg +"ът" ;
|
||||||
_+("òåë"|"àð"|"ÿð"|"äåí"
|
_+("тел"|"ар"|"яр"|"ден"
|
||||||
|"ïúò"|"îãúí"|"ñúí"
|
|"път"|"огън"|"сън"
|
||||||
|"êîí"|"êðàë"|"öàð"
|
|"кон"|"крал"|"цар"
|
||||||
|"çåò"|"ëàêúò"|"íîêúò")
|
|"зет"|"лакът"|"нокът")
|
||||||
=>sg+"ÿò" ;
|
=>sg+"ят" ;
|
||||||
_ =>case g of {
|
_ =>case g of {
|
||||||
AFem => sg+"òà" ;
|
AFem => sg+"та" ;
|
||||||
_ => sg+"úò"
|
_ => sg+"ът"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
NFPlCount => count ;
|
NFPlCount => count ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
--# -path=.:../abstract:../../prelude:../common
|
--# -path=.:../abstract:../../prelude:../common
|
||||||
|
|
||||||
resource MorphoFunsBul = open
|
resource MorphoFunsBul = open
|
||||||
@@ -6,7 +6,7 @@ resource MorphoFunsBul = open
|
|||||||
CatBul,
|
CatBul,
|
||||||
MorphoBul
|
MorphoBul
|
||||||
in {
|
in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -57,11 +57,11 @@ oper
|
|||||||
dualV : VTable -> VTable -> V ;
|
dualV : VTable -> VTable -> V ;
|
||||||
dualV imperf perf = {
|
dualV imperf perf = {
|
||||||
s = table {Imperf=>imperf; Perf=>perf};
|
s = table {Imperf=>imperf; Perf=>perf};
|
||||||
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "í"
|
n = let v0 = init (imperf ! (VImperfect Sg P1)) + "н"
|
||||||
in (mkNoun (v0+"å")
|
in (mkNoun (v0+"е")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"å")
|
(v0+"е")
|
||||||
ANeut).s;
|
ANeut).s;
|
||||||
vtype = VNormal;
|
vtype = VNormal;
|
||||||
lock_V=<>
|
lock_V=<>
|
||||||
@@ -72,11 +72,11 @@ oper
|
|||||||
singleV : VTable -> V ;
|
singleV : VTable -> V ;
|
||||||
singleV vtable = {
|
singleV vtable = {
|
||||||
s = \\_=>vtable;
|
s = \\_=>vtable;
|
||||||
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "í"
|
n = let v0 = init (vtable ! (VImperfect Sg P1)) + "н"
|
||||||
in (mkNoun (v0+"å")
|
in (mkNoun (v0+"е")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"èÿ")
|
(v0+"ия")
|
||||||
(v0+"å")
|
(v0+"е")
|
||||||
ANeut).s;
|
ANeut).s;
|
||||||
vtype = VNormal;
|
vtype = VNormal;
|
||||||
lock_V=<>
|
lock_V=<>
|
||||||
@@ -286,5 +286,5 @@ oper
|
|||||||
--
|
--
|
||||||
|
|
||||||
mkIAdv : Str -> IAdv ;
|
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 {
|
concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
||||||
flags optimize=all_subs ; coding=cp1251 ;
|
flags optimize=all_subs ; coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn =
|
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} ;
|
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 = {
|
DefArt = {
|
||||||
s = table {
|
s = table {
|
||||||
True => \\_ => [] ;
|
True => \\_ => [] ;
|
||||||
False => table {
|
False => table {
|
||||||
ASg Masc _ => "òîé" ;
|
ASg Masc _ => "той" ;
|
||||||
ASgMascDefNom => "òîé" ;
|
ASgMascDefNom => "той" ;
|
||||||
ASg Fem _ => "òÿ" ;
|
ASg Fem _ => "тя" ;
|
||||||
ASg Neut _ => "òî" ;
|
ASg Neut _ => "то" ;
|
||||||
APl _ => "òå"
|
APl _ => "те"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
nonEmpty = False ;
|
nonEmpty = False ;
|
||||||
@@ -145,11 +145,11 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in {
|
|||||||
s = table {
|
s = table {
|
||||||
True => \\_ => [] ;
|
True => \\_ => [] ;
|
||||||
False => table {
|
False => table {
|
||||||
ASg Masc _ => "åäèí" ;
|
ASg Masc _ => "един" ;
|
||||||
ASgMascDefNom => "åäèí" ;
|
ASgMascDefNom => "един" ;
|
||||||
ASg Fem _ => "åäíà" ;
|
ASg Fem _ => "една" ;
|
||||||
ASg Neut _ => "åäíî" ;
|
ASg Neut _ => "едно" ;
|
||||||
APl _ => "åäíè"
|
APl _ => "едни"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
nonEmpty = False ;
|
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} ;
|
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 = {
|
CountNP det np = {
|
||||||
s = \\role => let g = case np.gn of { -- this is lossy
|
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 {
|
concrete NumeralBul of Numeral = CatBul [Numeral,Digits] ** open Prelude, ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
@@ -11,43 +11,43 @@ lincat
|
|||||||
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
||||||
|
|
||||||
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
|
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
|
||||||
lin n2 = mkDigit "äâà" "äâàìà" "äâå" "âòîðè" "äâàéñåò" "äâåñòà" "äâåñòàòà" ;
|
lin n2 = mkDigit "два" "двама" "две" "втори" "двайсет" "двеста" "двестата" ;
|
||||||
lin n3 = mkDigit "òðè" "òðèìà" "òðè" "òðåòè" "òðèéñåò" "òðèñòà" "òðèñòàòà" ;
|
lin n3 = mkDigit "три" "трима" "три" "трети" "трийсет" "триста" "тристата" ;
|
||||||
lin n4 = mkDigit "÷åòèðè" "÷åòèðèìà" "÷åòèðè" "÷åòâúðòè" "÷åòèðèéñåò" "÷åòèðèñòîòèí" "÷åòèðèñòîòèíòå" ;
|
lin n4 = mkDigit "четири" "четирима" "четири" "четвърти" "четирийсет" "четиристотин" "четиристотинте" ;
|
||||||
lin n5 = mkDigit "ïåò" "ïåòèìà" "ïåò" "ïåòè" "ïåòäåñåò" "ïåòñòîòèí" "ïåòñòîòèíòå" ;
|
lin n5 = mkDigit "пет" "петима" "пет" "пети" "петдесет" "петстотин" "петстотинте" ;
|
||||||
lin n6 = mkDigit "øåñò" "øåñòèìà" "øåñò" "øåñòè" "øåéñåò" "øåñòñòîòèí" "øåñòñòîòèíòå" ;
|
lin n6 = mkDigit "шест" "шестима" "шест" "шести" "шейсет" "шестстотин" "шестстотинте" ;
|
||||||
lin n7 = mkDigit "ñåäåì" "ñåäìèíà" "ñåäåì" "ñåäìè" "ñåäåìäåñåò" "ñåäåìñòîòèí" "ñåäåìñòîòèíòå" ;
|
lin n7 = mkDigit "седем" "седмина" "седем" "седми" "седемдесет" "седемстотин" "седемстотинте" ;
|
||||||
lin n8 = mkDigit "îñåì" "îñìèíà" "îñåì" "îñìè" "îñåìäåñåò" "îñåìñòîòèí" "îñåìñòîòèíòå" ;
|
lin n8 = mkDigit "осем" "осмина" "осем" "осми" "осемдесет" "осемстотин" "осемстотинте" ;
|
||||||
lin n9 = mkDigit "äåâåò" "äåâåòèìà" "äåâåò" "äåâåòè" "äåâåòäåñåò" "äåâåòñòîòèí" "äåâåòñòîòèíòå" ;
|
lin n9 = mkDigit "девет" "деветима" "девет" "девети" "деветдесет" "деветстотин" "деветстотинте" ;
|
||||||
|
|
||||||
lin pot01 =
|
lin pot01 =
|
||||||
{s = table {
|
{s = table {
|
||||||
unit => table {
|
unit => table {
|
||||||
NCard (CFMasc Indef _) => "åäèí" ;
|
NCard (CFMasc Indef _) => "един" ;
|
||||||
NCard (CFMasc Def _) => "åäèíèÿ" ;
|
NCard (CFMasc Def _) => "единия" ;
|
||||||
NCard (CFMascDefNom _) => "åäèíèÿò" ;
|
NCard (CFMascDefNom _) => "единият" ;
|
||||||
NCard (CFFem Indef) => "åäíà" ;
|
NCard (CFFem Indef) => "една" ;
|
||||||
NCard (CFFem Def) => "åäíàòà" ;
|
NCard (CFFem Def) => "едната" ;
|
||||||
NCard (CFNeut Indef) => "åäíî" ;
|
NCard (CFNeut Indef) => "едно" ;
|
||||||
NCard (CFNeut Def) => "åäíîòî" ;
|
NCard (CFNeut Def) => "едното" ;
|
||||||
NOrd aform => case aform of {
|
NOrd aform => case aform of {
|
||||||
ASg Masc Indef => "ïúðâè" ;
|
ASg Masc Indef => "първи" ;
|
||||||
ASg Masc Def => "ïúðâèÿ" ;
|
ASg Masc Def => "първия" ;
|
||||||
ASgMascDefNom => "ïúðâèÿò" ;
|
ASgMascDefNom => "първият" ;
|
||||||
ASg Fem Indef => "ïúðâà" ;
|
ASg Fem Indef => "първа" ;
|
||||||
ASg Fem Def => "ïúðâàòà" ;
|
ASg Fem Def => "първата" ;
|
||||||
ASg Neut Indef => "ïúðâî" ;
|
ASg Neut Indef => "първо" ;
|
||||||
ASg Neut Def => "ïúðâîòî" ;
|
ASg Neut Def => "първото" ;
|
||||||
APl Indef => "ïúðâè" ;
|
APl Indef => "първи" ;
|
||||||
APl Def => "ïúðâèòå"
|
APl Def => "първите"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
teen nf => case nf of {
|
teen nf => case nf of {
|
||||||
Formal => mkCardOrd "åäèíàäåñåò" "åäèíàäåñåòèìà" "åäèíàäåñåò" "åäèíàäåñåòè" ;
|
Formal => mkCardOrd "единадесет" "единадесетима" "единадесет" "единадесети" ;
|
||||||
Informal => mkCardOrd "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñòè"
|
Informal => mkCardOrd "единайсет" "единайсет" "единайсет" "единайсти"
|
||||||
} ;
|
} ;
|
||||||
ten nf => mkCardOrd "äåñåò" "äåñåòèìà" "äåñåò" "äåñåòè" ;
|
ten nf => mkCardOrd "десет" "десетима" "десет" "десети" ;
|
||||||
hundred => mkCardOrd100 "ñòî" "ñòîòå" "ñòîòåí"
|
hundred => mkCardOrd100 "сто" "стоте" "стотен"
|
||||||
}
|
}
|
||||||
;n = Sg
|
;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 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 pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
|
||||||
lin pot1plus d e = {
|
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 pot1as2 n = n ;
|
||||||
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
|
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
|
||||||
lin pot2plus d e = {
|
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 ;
|
n = Pl ;
|
||||||
i = False
|
i = False
|
||||||
} ;
|
} ;
|
||||||
@@ -72,17 +72,17 @@ lin pot2plus d e = {
|
|||||||
lin pot2as3 n = n ;
|
lin pot2as3 n = n ;
|
||||||
lin pot3 n = {
|
lin pot3 n = {
|
||||||
s = \\c,nf => case n.n of {
|
s = \\c,nf => case n.n of {
|
||||||
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! c ;
|
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! c ;
|
||||||
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäèòå" "õèëÿäåí" ! c
|
Pl => n.s ! NCard (CFFem Indef) ! nf ++ mkCardOrd100 "хиляди" "хилядите" "хиляден" ! c
|
||||||
} ;
|
} ;
|
||||||
n = Pl
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
lin pot3plus n m = {
|
lin pot3plus n m = {
|
||||||
s = \\c,nf => case n.n of {
|
s = \\c,nf => case n.n of {
|
||||||
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäàòà" "õèëÿäåí" ! NCard (CFMasc Indef NonHuman) ;
|
Sg => mkCardOrd100 "хиляда" "хилядата" "хиляден" ! NCard (CFMasc Indef NonHuman) ;
|
||||||
Pl => n.s ! NCard (CFFem Indef) ! nf ++ 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
|
n = Pl
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -101,16 +101,16 @@ lin pot3plus n m = {
|
|||||||
tail = inc i.tail
|
tail = inc i.tail
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
D_0 = mk3Dig "0" "0" "0åâ" Pl ;
|
D_0 = mk3Dig "0" "0" "0ев" Pl ;
|
||||||
D_1 = mk3Dig "1" "1" "1âè" Sg ;
|
D_1 = mk3Dig "1" "1" "1ви" Sg ;
|
||||||
D_2 = mk2Dig "2" "2ðè" ;
|
D_2 = mk2Dig "2" "2ри" ;
|
||||||
D_3 = mkDig "3" ;
|
D_3 = mkDig "3" ;
|
||||||
D_4 = mkDig "4" ;
|
D_4 = mkDig "4" ;
|
||||||
D_5 = mkDig "5" ;
|
D_5 = mkDig "5" ;
|
||||||
D_6 = mkDig "6" ;
|
D_6 = mkDig "6" ;
|
||||||
D_7 = mk3Dig "7" "7íà" "7ìè" Pl ;
|
D_7 = mk3Dig "7" "7на" "7ми" Pl ;
|
||||||
D_8 = mk3Dig "8" "8íà" "8ìè" Pl ;
|
D_8 = mk3Dig "8" "8на" "8ми" Pl ;
|
||||||
D_9 = mk3Dig "9" "9èìà" "9òè" Pl ;
|
D_9 = mk3Dig "9" "9има" "9ти" Pl ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
spaceIf : DTail -> Str = \t -> case t of {
|
spaceIf : DTail -> Str = \t -> case t of {
|
||||||
@@ -124,8 +124,8 @@ lin pot3plus n m = {
|
|||||||
T3 => T1
|
T3 => T1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ìà") o Pl ;
|
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c (c+"ма") o Pl ;
|
||||||
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "òè") ;
|
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "ти") ;
|
||||||
|
|
||||||
mk3Dig : Str -> Str -> Str -> Number -> TDigit = \c1,c2,o,n -> {
|
mk3Dig : Str -> Str -> Str -> Number -> TDigit = \c1,c2,o,n -> {
|
||||||
s = mkCardOrd c1 c2 c1 o ;
|
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 {
|
concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -12,7 +12,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
|||||||
let cls = cl.s ! t ! a ! p
|
let cls = cl.s ! t ! a ! p
|
||||||
in table {
|
in table {
|
||||||
QDir => cls ! Quest ;
|
QDir => cls ! Quest ;
|
||||||
QIndir => "àêî" ++ cls ! Main
|
QIndir => "ако" ++ cls ! Main
|
||||||
} ---- "whether" in ExtEng
|
} ---- "whether" in ExtEng
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
QuestSlash ip slash =
|
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) } ;
|
{s = slash.s ! (agrP3 ip.gn) } ;
|
||||||
|
|
||||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||||
@@ -30,7 +30,7 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
|
|||||||
QuestIComp icomp np =
|
QuestIComp icomp np =
|
||||||
mkQuestion icomp (mkClause (np.s ! RSubj) np.gn np.p (predV verbBe)) ;
|
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 = {
|
AdvIP ip adv = {
|
||||||
s = \\role,qform => ip.s ! role ! qform ++ adv.s ;
|
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 {
|
concrete RelativeBul of Relative = CatBul ** open ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
RelCl cl = {
|
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 = {
|
RelVP rp vp = {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
--# -path=.:../abstract:../common:../../prelude
|
--# -path=.:../abstract:../common:../../prelude
|
||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
|
|
||||||
--1 Bulgarian auxiliary operations.
|
--1 Bulgarian auxiliary operations.
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
resource ResBul = ParamX ** open Prelude, Predef in {
|
resource ResBul = ParamX ** open Prelude, Predef in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding=cp1251 ; optimize=all ;
|
coding=utf8 ; optimize=all ;
|
||||||
|
|
||||||
|
|
||||||
-- Some parameters, such as $Number$, are inherited from $ParamX$.
|
-- Some parameters, such as $Number$, are inherited from $ParamX$.
|
||||||
@@ -328,149 +328,149 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
|
|
||||||
auxBe : VTable =
|
auxBe : VTable =
|
||||||
table {
|
table {
|
||||||
VPres Sg P1 => "ñúì" ;
|
VPres Sg P1 => "съм" ;
|
||||||
VPres Sg P2 => "ñè" ;
|
VPres Sg P2 => "си" ;
|
||||||
VPres Sg P3 => "å" ;
|
VPres Sg P3 => "е" ;
|
||||||
VPres Pl P1 => "ñìå" ;
|
VPres Pl P1 => "сме" ;
|
||||||
VPres Pl P2 => "ñòå" ;
|
VPres Pl P2 => "сте" ;
|
||||||
VPres Pl P3 => "ñà" ;
|
VPres Pl P3 => "са" ;
|
||||||
VAorist Sg P1 => "áÿõ" ;
|
VAorist Sg P1 => "бях" ;
|
||||||
VAorist Sg _ => "áåøå" ;
|
VAorist Sg _ => "беше" ;
|
||||||
VAorist Pl P1 => "áÿõìå" ;
|
VAorist Pl P1 => "бяхме" ;
|
||||||
VAorist Pl P2 => "áÿõòå" ;
|
VAorist Pl P2 => "бяхте" ;
|
||||||
VAorist Pl P3 => "áÿõà" ;
|
VAorist Pl P3 => "бяха" ;
|
||||||
VImperfect Sg P1 => "áÿõ" ;
|
VImperfect Sg P1 => "бях" ;
|
||||||
VImperfect Sg _ => "áåøå" ;
|
VImperfect Sg _ => "беше" ;
|
||||||
VImperfect Pl P1 => "áÿõìå" ;
|
VImperfect Pl P1 => "бяхме" ;
|
||||||
VImperfect Pl P2 => "áÿõòå" ;
|
VImperfect Pl P2 => "бяхте" ;
|
||||||
VImperfect Pl P3 => "áÿõà" ;
|
VImperfect Pl P3 => "бяха" ;
|
||||||
VPerfect aform => regAdjective "áèë" ! aform ;
|
VPerfect aform => regAdjective "бил" ! aform ;
|
||||||
VPluPerfect aform => regAdjective "áèë" ! aform ;
|
VPluPerfect aform => regAdjective "бил" ! aform ;
|
||||||
VPassive aform => regAdjective "áúäåí" ! aform ;
|
VPassive aform => regAdjective "бъден" ! aform ;
|
||||||
VPresPart aform => regAdjective "áúäåù" ! aform ;
|
VPresPart aform => regAdjective "бъдещ" ! aform ;
|
||||||
VImperative Sg => "áúäè" ;
|
VImperative Sg => "бъди" ;
|
||||||
VImperative Pl => "áúäåòå" ;
|
VImperative Pl => "бъдете" ;
|
||||||
VNoun _ => "áúäåíå";
|
VNoun _ => "бъдене";
|
||||||
VGerund => "áèäåéêè"
|
VGerund => "бидейки"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxWould : VTable =
|
auxWould : VTable =
|
||||||
table {
|
table {
|
||||||
VPres Sg P1 => "áúäà" ;
|
VPres Sg P1 => "бъда" ;
|
||||||
VPres Sg P2 => "áúäåø" ;
|
VPres Sg P2 => "бъдеш" ;
|
||||||
VPres Sg P3 => "áúäå" ;
|
VPres Sg P3 => "бъде" ;
|
||||||
VPres Pl P1 => "áúäåì" ;
|
VPres Pl P1 => "бъдем" ;
|
||||||
VPres Pl P2 => "áúäåòå" ;
|
VPres Pl P2 => "бъдете" ;
|
||||||
VPres Pl P3 => "áúäàò" ;
|
VPres Pl P3 => "бъдат" ;
|
||||||
VAorist Sg P1 => "áÿõ" ;
|
VAorist Sg P1 => "бях" ;
|
||||||
VAorist Sg _ => "áåøå" ;
|
VAorist Sg _ => "беше" ;
|
||||||
VAorist Pl P1 => "áÿõìå" ;
|
VAorist Pl P1 => "бяхме" ;
|
||||||
VAorist Pl P2 => "áÿõòå" ;
|
VAorist Pl P2 => "бяхте" ;
|
||||||
VAorist Pl P3 => "áÿõà" ;
|
VAorist Pl P3 => "бяха" ;
|
||||||
VImperfect Sg P1 => "áúäåõ" ;
|
VImperfect Sg P1 => "бъдех" ;
|
||||||
VImperfect Sg _ => "áúäåøå" ;
|
VImperfect Sg _ => "бъдеше" ;
|
||||||
VImperfect Pl P1 => "áúäåõìå" ;
|
VImperfect Pl P1 => "бъдехме" ;
|
||||||
VImperfect Pl P2 => "áúäåõòå" ;
|
VImperfect Pl P2 => "бъдехте" ;
|
||||||
VImperfect Pl P3 => "áúäåõà" ;
|
VImperfect Pl P3 => "бъдеха" ;
|
||||||
VPerfect aform => regAdjective "áèë" ! aform ;
|
VPerfect aform => regAdjective "бил" ! aform ;
|
||||||
VPluPerfect aform => regAdjective "áúäåë" ! aform ;
|
VPluPerfect aform => regAdjective "бъдел" ! aform ;
|
||||||
VPassive aform => regAdjective "áúäåí" ! aform ;
|
VPassive aform => regAdjective "бъден" ! aform ;
|
||||||
VPresPart aform => regAdjective "áúäåù" ! aform ;
|
VPresPart aform => regAdjective "бъдещ" ! aform ;
|
||||||
VImperative Sg => "áúäè" ;
|
VImperative Sg => "бъди" ;
|
||||||
VImperative Pl => "áúäåòå" ;
|
VImperative Pl => "бъдете" ;
|
||||||
VNoun _ => "áúäåíå";
|
VNoun _ => "бъдене";
|
||||||
VGerund => "áúäåéêè"
|
VGerund => "бъдейки"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxCond : Number => Person => Str =
|
auxCond : Number => Person => Str =
|
||||||
table {
|
table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
P1 => "áèõ" ;
|
P1 => "бих" ;
|
||||||
_ => "áè"
|
_ => "би"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
P1 => "áèõìå" ;
|
P1 => "бихме" ;
|
||||||
P2 => "áèõòå" ;
|
P2 => "бихте" ;
|
||||||
P3 => "áèõà"
|
P3 => "биха"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
verbBe : Verb = {s=table Aspect [auxBe; auxWould] ; vtype=VNormal} ;
|
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 ->
|
personalClitics : Agr -> Case => Str = \agr ->
|
||||||
table {
|
table {
|
||||||
Acc => case agr.gn of {
|
Acc => case agr.gn of {
|
||||||
GSg g => case agr.p of {
|
GSg g => case agr.p of {
|
||||||
P1 => "ìå" ;
|
P1 => "ме" ;
|
||||||
P2 => "òå" ;
|
P2 => "те" ;
|
||||||
P3 => case g of {
|
P3 => case g of {
|
||||||
Masc => "ãî" ;
|
Masc => "го" ;
|
||||||
Fem => "ÿ" ;
|
Fem => "я" ;
|
||||||
Neut => "ãî"
|
Neut => "го"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
GPl => case agr.p of {
|
GPl => case agr.p of {
|
||||||
P1 => "íè" ;
|
P1 => "ни" ;
|
||||||
P2 => "âè" ;
|
P2 => "ви" ;
|
||||||
P3 => "ãè"
|
P3 => "ги"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Dat => case agr.gn of {
|
Dat => case agr.gn of {
|
||||||
GSg g => case agr.p of {
|
GSg g => case agr.p of {
|
||||||
P1 => "ìè" ;
|
P1 => "ми" ;
|
||||||
P2 => "òè" ;
|
P2 => "ти" ;
|
||||||
P3 => case g of {
|
P3 => case g of {
|
||||||
Masc => "ìó" ;
|
Masc => "му" ;
|
||||||
Fem => "é" ;
|
Fem => "й" ;
|
||||||
Neut => "ìó"
|
Neut => "му"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
GPl => case agr.p of {
|
GPl => case agr.p of {
|
||||||
P1 => "íè" ;
|
P1 => "ни" ;
|
||||||
P2 => "âè" ;
|
P2 => "ви" ;
|
||||||
P3 => "èì"
|
P3 => "им"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
WithPrep => case agr.gn of {
|
WithPrep => case agr.gn of {
|
||||||
GSg g => case agr.p of {
|
GSg g => case agr.p of {
|
||||||
P1 => with_Word ++ "ìåí" ;
|
P1 => with_Word ++ "мен" ;
|
||||||
P2 => with_Word ++ "òåá" ;
|
P2 => with_Word ++ "теб" ;
|
||||||
P3 => case g of {
|
P3 => case g of {
|
||||||
Masc => with_Word ++ "íåãî" ;
|
Masc => with_Word ++ "него" ;
|
||||||
Fem => with_Word ++ "íåÿ" ;
|
Fem => with_Word ++ "нея" ;
|
||||||
Neut => with_Word ++ "íåãî"
|
Neut => with_Word ++ "него"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
GPl => case agr.p of {
|
GPl => case agr.p of {
|
||||||
P1 => with_Word ++ "íàñ" ;
|
P1 => with_Word ++ "нас" ;
|
||||||
P2 => with_Word ++ "âàñ" ;
|
P2 => with_Word ++ "вас" ;
|
||||||
P3 => with_Word ++ "òÿõ"
|
P3 => with_Word ++ "тях"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
CPrep => case agr.gn of {
|
CPrep => case agr.gn of {
|
||||||
GSg g => case agr.p of {
|
GSg g => case agr.p of {
|
||||||
P1 => "ìåí" ;
|
P1 => "мен" ;
|
||||||
P2 => "òåá" ;
|
P2 => "теб" ;
|
||||||
P3 => case g of {
|
P3 => case g of {
|
||||||
Masc => "íåãî" ;
|
Masc => "него" ;
|
||||||
Fem => "íåÿ" ;
|
Fem => "нея" ;
|
||||||
Neut => "íåãî"
|
Neut => "него"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
GPl => case agr.p of {
|
GPl => case agr.p of {
|
||||||
P1 => "íàñ" ;
|
P1 => "нас" ;
|
||||||
P2 => "âàñ" ;
|
P2 => "вас" ;
|
||||||
P3 => "òÿõ"
|
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 {
|
\s -> case s of {
|
||||||
x@(_*+_) + "ÿ" + y@(("á"|"â"|"ã"|"ä"|"æ"|"ç"|"ê"|"ë"|"ì"|"í"|"ï"|"ð"|"ñ"|"ò"|"ô"|"õ"|"ö"|"÷"|"ø")*)
|
x@(_*+_) + "я" + y@(("б"|"в"|"г"|"д"|"ж"|"з"|"к"|"л"|"м"|"н"|"п"|"р"|"с"|"т"|"ф"|"х"|"ц"|"ч"|"ш")*)
|
||||||
=> x+"å"+y;
|
=> x+"е"+y;
|
||||||
_ => s
|
_ => s
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -478,19 +478,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
\base ->
|
\base ->
|
||||||
let base0 : Str
|
let base0 : Str
|
||||||
= case base of {
|
= case base of {
|
||||||
x+"è" => x;
|
x+"и" => x;
|
||||||
x => x
|
x => x
|
||||||
}
|
}
|
||||||
in table {
|
in table {
|
||||||
ASg Masc Indef => base ;
|
ASg Masc Indef => base ;
|
||||||
ASg Masc Def => (base0+"èÿ") ;
|
ASg Masc Def => (base0+"ия") ;
|
||||||
ASgMascDefNom => (base0+"èÿò") ;
|
ASgMascDefNom => (base0+"ият") ;
|
||||||
ASg Fem Indef => (base0+"à") ;
|
ASg Fem Indef => (base0+"а") ;
|
||||||
ASg Fem Def => (base0+"àòà") ;
|
ASg Fem Def => (base0+"ата") ;
|
||||||
ASg Neut Indef => (base0+"î") ;
|
ASg Neut Indef => (base0+"о") ;
|
||||||
ASg Neut Def => (base0+"îòî") ;
|
ASg Neut Def => (base0+"ото") ;
|
||||||
APl Indef => (ia2e base0+"è") ;
|
APl Indef => (ia2e base0+"и") ;
|
||||||
APl Def => (ia2e base0+"èòå")
|
APl Def => (ia2e base0+"ите")
|
||||||
};
|
};
|
||||||
|
|
||||||
-- For $Sentence$.
|
-- For $Sentence$.
|
||||||
@@ -545,37 +545,37 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
_ => auxPres++s++clitic.s
|
_ => 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} ;
|
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 ->
|
vf1 : Str -> {s1 : Str; s2 : Str} = \s ->
|
||||||
case p of {
|
case p of {
|
||||||
Pos => case q of {True => {s1=[]; s2="ëè"++apc []};
|
Pos => case q of {True => {s1=[]; s2="ли"++apc []};
|
||||||
False => {s1=apc []; s2=[]}} ;
|
False => {s1=apc []; s2=[]}} ;
|
||||||
Neg => {s1="íå"++apc li; s2=[]}
|
Neg => {s1="не"++apc li; s2=[]}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vf2 : Str -> {s1 : Str; s2 : Str} = \s ->
|
vf2 : Str -> {s1 : Str; s2 : Str} = \s ->
|
||||||
case p of {
|
case p of {
|
||||||
Pos => case q of {True => {s1=[]; s2="ëè"++s};
|
Pos => case q of {True => {s1=[]; s2="ли"++s};
|
||||||
False => {s1=s; s2=[]}} ;
|
False => {s1=s; s2=[]}} ;
|
||||||
Neg => case verb.vtype of
|
Neg => case verb.vtype of
|
||||||
{VNormal => {s1="íå"++s; s2=li} ;
|
{VNormal => {s1="не"++s; s2=li} ;
|
||||||
_ => {s1="íå"++s++li; s2=[]}}
|
_ => {s1="не"++s++li; s2=[]}}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vf3 : Str -> {s1 : Str; s2 : Str} = \s ->
|
vf3 : Str -> {s1 : Str; s2 : Str} = \s ->
|
||||||
case p of {
|
case p of {
|
||||||
Pos => {s1="ùå"++s; s2=li} ;
|
Pos => {s1="ще"++s; s2=li} ;
|
||||||
Neg => {s1="íÿìà"++li++"äà"++s; s2=[]}
|
Neg => {s1="няма"++li++"да"++s; s2=[]}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
vf4 : Str -> {s1 : Str; s2 : Str} = \s ->
|
vf4 : Str -> {s1 : Str; s2 : Str} = \s ->
|
||||||
case p of {
|
case p of {
|
||||||
Pos => {s1= s++li++clitic.s; s2=[]} ;
|
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} =
|
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 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}}
|
VPhrasal c => {s=vp.clitics++personalClitics agr ! c; agr={gn=GSg Neut; p=P3}}
|
||||||
} ;
|
} ;
|
||||||
pol = case p of {Pos => ""; Neg => "íå"}
|
pol = case p of {Pos => ""; Neg => "не"}
|
||||||
in vp.ad.s ++ "äà" ++ pol ++ clitic.s ++
|
in vp.ad.s ++ "да" ++ pol ++ clitic.s ++
|
||||||
case a of {
|
case a of {
|
||||||
Simul => vp.s ! asp ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ;
|
Simul => vp.s ! asp ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ;
|
||||||
Anter => auxBe ! 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 =
|
linCase : Case -> Polarity -> Str =
|
||||||
\c,p -> case c of {
|
\c,p -> case c of {
|
||||||
Acc => "" ;
|
Acc => "" ;
|
||||||
Dat => "íà" ;
|
Dat => "на" ;
|
||||||
WithPrep => case p of {
|
WithPrep => case p of {
|
||||||
Pos => with_Word ;
|
Pos => with_Word ;
|
||||||
Neg => "áåç"
|
Neg => "без"
|
||||||
} ;
|
} ;
|
||||||
CPrep => ""
|
CPrep => ""
|
||||||
} ;
|
} ;
|
||||||
@@ -656,17 +656,17 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
{s = table {
|
{s = table {
|
||||||
unit => mkCardOrd dva dvama dve vtori ;
|
unit => mkCardOrd dva dvama dve vtori ;
|
||||||
teen nf => case nf of {
|
teen nf => case nf of {
|
||||||
Formal => mkCardOrd (dva+"íàäåñåò") (dva+"íàäåñåòèìà") (dva+"íàäåñåò") (dva+"íàäåñåòè") ;
|
Formal => mkCardOrd (dva+"надесет") (dva+"надесетима") (dva+"надесет") (dva+"надесети") ;
|
||||||
Informal => mkCardOrd (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñåò") (dva+"íàéñòè")
|
Informal => mkCardOrd (dva+"найсет") (dva+"найсет") (dva+"найсет") (dva+"найсти")
|
||||||
} ;
|
} ;
|
||||||
ten nf => case nf of {
|
ten nf => case nf of {
|
||||||
Formal => mkCardOrd (dva+"äåñåò") (dva+"äåñåòèìà") (dva+"äåñåò") (dva+"äåñåòè") ;
|
Formal => mkCardOrd (dva+"десет") (dva+"десетима") (dva+"десет") (dva+"десети") ;
|
||||||
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"è")
|
Informal => mkCardOrd dvaiset dvaiset dvaiset (dvaiset+"и")
|
||||||
} ;
|
} ;
|
||||||
hundred => let dvesten : Str
|
hundred => let dvesten : Str
|
||||||
= case dvesta of {
|
= case dvesta of {
|
||||||
dvest+"à" => dvest+"åí" ;
|
dvest+"а" => dvest+"ен" ;
|
||||||
chetiristot+"èí" => chetiristot+"åí"
|
chetiristot+"ин" => chetiristot+"ен"
|
||||||
}
|
}
|
||||||
in mkCardOrd100 dvesta dvestata dvesten
|
in mkCardOrd100 dvesta dvestata dvesten
|
||||||
}
|
}
|
||||||
@@ -676,19 +676,19 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
\dva, dvama, dve, vtori ->
|
\dva, dvama, dve, vtori ->
|
||||||
table {
|
table {
|
||||||
NCard dg => digitGenderSpecies dva dvama dve ! dg ;
|
NCard dg => digitGenderSpecies dva dvama dve ! dg ;
|
||||||
NOrd aform => let vtora : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "à" ;
|
NOrd aform => let vtora : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "а" ;
|
||||||
vtoro : Str = case vtori of {_+"â" => vtori; _ => init vtori} + "î";
|
vtoro : Str = case vtori of {_+"в" => vtori; _ => init vtori} + "о";
|
||||||
i : Str = case vtori of {_+"â" => "è"; _ => ""}
|
i : Str = case vtori of {_+"в" => "и"; _ => ""}
|
||||||
in case aform of {
|
in case aform of {
|
||||||
ASg Masc Indef => vtori ;
|
ASg Masc Indef => vtori ;
|
||||||
ASg Masc Def => vtori+i+"ÿ" ;
|
ASg Masc Def => vtori+i+"я" ;
|
||||||
ASgMascDefNom => vtori+i+"ÿò" ;
|
ASgMascDefNom => vtori+i+"ят" ;
|
||||||
ASg Fem Indef => vtora ;
|
ASg Fem Indef => vtora ;
|
||||||
ASg Fem Def => vtora+"òà" ;
|
ASg Fem Def => vtora+"та" ;
|
||||||
ASg Neut Indef => vtoro ;
|
ASg Neut Indef => vtoro ;
|
||||||
ASg Neut Def => vtoro+"òî" ;
|
ASg Neut Def => vtoro+"то" ;
|
||||||
APl Indef => vtori+i ;
|
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 ;
|
NOrd aform => let stotn = init (init stoten) + last stoten ;
|
||||||
in case aform of {
|
in case aform of {
|
||||||
ASg Masc Indef => stoten ;
|
ASg Masc Indef => stoten ;
|
||||||
ASg Masc Def => stotn+"èÿ" ;
|
ASg Masc Def => stotn+"ия" ;
|
||||||
ASgMascDefNom => stotn+"èÿò" ;
|
ASgMascDefNom => stotn+"ият" ;
|
||||||
ASg Fem Indef => stotn+"à" ;
|
ASg Fem Indef => stotn+"а" ;
|
||||||
ASg Fem Def => stotn+"àòà" ;
|
ASg Fem Def => stotn+"ата" ;
|
||||||
ASg Neut Indef => stotn+"î" ;
|
ASg Neut Indef => stotn+"о" ;
|
||||||
ASg Neut Def => stotn+"îòî" ;
|
ASg Neut Def => stotn+"ото" ;
|
||||||
APl Indef => stotn+"è" ;
|
APl Indef => stotn+"и" ;
|
||||||
APl Def => stotn+"èòå"
|
APl Def => stotn+"ите"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -720,12 +720,12 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
|||||||
\dva, dvama, dve
|
\dva, dvama, dve
|
||||||
-> let addDef : Str -> Gender -> Str =
|
-> let addDef : Str -> Gender -> Str =
|
||||||
\s,g -> case s of {
|
\s,g -> case s of {
|
||||||
dves+"òà" => dves+"òàòå" ;
|
dves+"та" => dves+"тате" ;
|
||||||
dv+"à" => dv+"àòà" ;
|
dv+"а" => dv+"ата" ;
|
||||||
"0" => s+"òà" ;
|
"0" => s+"та" ;
|
||||||
"1" => s+case g of {Masc => "ÿò"; Fem => "òà"; Neut => "òî"} ;
|
"1" => s+case g of {Masc => "ят"; Fem => "та"; Neut => "то"} ;
|
||||||
"2" => s+case g of {Masc => "òà"; _ => "òå"} ;
|
"2" => s+case g of {Masc => "та"; _ => "те"} ;
|
||||||
x => x+"òå"
|
x => x+"те"
|
||||||
}
|
}
|
||||||
in table {
|
in table {
|
||||||
CFMasc Indef NonHuman => dva ;
|
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} =
|
mkIP : Str -> Str -> GenNum -> {s : Role => QForm => Str ; gn : GenNum} =
|
||||||
\koi,kogo,gn -> {
|
\koi,kogo,gn -> {
|
||||||
s = table {
|
s = table {
|
||||||
RSubj => table QForm [koi; koi+"òî"] ;
|
RSubj => table QForm [koi; koi+"то"] ;
|
||||||
RObj Acc => table QForm [kogo; kogo+"òî"] ;
|
RObj Acc => table QForm [kogo; kogo+"то"] ;
|
||||||
RObj Dat => table QForm ["íà" ++ kogo; "íà" ++ kogo+"òî"] ;
|
RObj Dat => table QForm ["на" ++ kogo; "на" ++ kogo+"то"] ;
|
||||||
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"òî"] ;
|
RObj WithPrep => table QForm [with_Word ++ kogo; with_Word ++ kogo+"то"] ;
|
||||||
RObj CPrep => table QForm [kogo; kogo+"òî"] ;
|
RObj CPrep => table QForm [kogo; kogo+"то"] ;
|
||||||
RVoc => table QForm [koi; koi+"òî"]
|
RVoc => table QForm [koi; koi+"то"]
|
||||||
} ;
|
} ;
|
||||||
gn = gn
|
gn = gn
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
with_Word : Str
|
with_Word : Str
|
||||||
= pre { "ñ" ;
|
= pre { "с" ;
|
||||||
"ñúñ" / strs {"ñ" ; "ç" ; "Ñ" ; "Ç"}
|
"със" / strs {"с" ; "з" ; "С" ; "З"}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkPron : (az,moj,moia,moiat,moia_,moiata,moe,moeto,moi,moite : Str) ->
|
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
|
whichRP : GenNum => Str
|
||||||
= table {
|
= table {
|
||||||
GSg Masc => "êîéòî" ;
|
GSg Masc => "който" ;
|
||||||
GSg Fem => "êîÿòî" ;
|
GSg Fem => "която" ;
|
||||||
GSg Neut => "êîåòî" ;
|
GSg Neut => "което" ;
|
||||||
GPl => "êîèòî"
|
GPl => "които"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
suchRP : GenNum => Str
|
suchRP : GenNum => Str
|
||||||
= table {
|
= table {
|
||||||
GSg Masc => "òàêúâ" ;
|
GSg Masc => "такъв" ;
|
||||||
GSg Fem => "òàêàâà" ;
|
GSg Fem => "такава" ;
|
||||||
GSg Neut => "òàêîâà" ;
|
GSg Neut => "такова" ;
|
||||||
GPl => "òàêèâà"
|
GPl => "такива"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
thisRP : GenNum => Str
|
thisRP : GenNum => Str
|
||||||
= table {
|
= table {
|
||||||
GSg Masc => "òîçè" ;
|
GSg Masc => "този" ;
|
||||||
GSg Fem => "òaçè" ;
|
GSg Fem => "тaзи" ;
|
||||||
GSg Neut => "òîâà" ;
|
GSg Neut => "това" ;
|
||||||
GPl => "òåçè"
|
GPl => "тези"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
linCoord : Str -> Ints 4 => Str ;
|
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 ;
|
hyphen : Str = SOFT_BIND ++ "-" ++ SOFT_BIND ;
|
||||||
|
|
||||||
reflPron : AForm => Str =
|
reflPron : AForm => Str =
|
||||||
table {
|
table {
|
||||||
ASg Masc Indef => "ñâîé" ;
|
ASg Masc Indef => "свой" ;
|
||||||
ASg Masc Def => "ñâîÿ" ;
|
ASg Masc Def => "своя" ;
|
||||||
ASgMascDefNom => "ñâîÿò" ;
|
ASgMascDefNom => "своят" ;
|
||||||
ASg Fem Indef => "ñâîÿ" ;
|
ASg Fem Indef => "своя" ;
|
||||||
ASg Fem Def => "ñâîÿòà" ;
|
ASg Fem Def => "своята" ;
|
||||||
ASg Neut Indef => "ñâîå" ;
|
ASg Neut Indef => "свое" ;
|
||||||
ASg Neut Def => "ñâîåòî" ;
|
ASg Neut Def => "своето" ;
|
||||||
APl Indef => "ñâîè" ;
|
APl Indef => "свои" ;
|
||||||
APl Def => "ñâîèòå"
|
APl Def => "своите"
|
||||||
} ;
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -27,7 +27,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
|||||||
}
|
}
|
||||||
in case orPol p vp.p of {
|
in case orPol p vp.p of {
|
||||||
Pos => vp.ad.s ++ verb Perf ++ clitic ;
|
Pos => vp.ad.s ++ verb Perf ++ clitic ;
|
||||||
Neg => "íå" ++ vp.ad.s ++ clitic ++ verb Imperf
|
Neg => "не" ++ vp.ad.s ++ clitic ++ verb Imperf
|
||||||
} ++ compl ;
|
} ++ compl ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -51,11 +51,11 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
|||||||
|
|
||||||
SlashVS np vs slash = {
|
SlashVS np vs slash = {
|
||||||
s = \\agr => (mkClause (np.s ! RSubj) np.gn np.p
|
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
|
c2 = slash.c2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmbedS s = {s = "֌" ++ s.s} ;
|
EmbedS s = {s = "че" ++ s.s} ;
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = daComplex Simul vp.p vp ! Perf ! agrP3 (GSg Masc)} ;
|
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 **
|
concrete StructuralBul of Structural = CatBul **
|
||||||
open MorphoBul, ParadigmsBul, Prelude, (X = ConstructX) in {
|
open MorphoBul, ParadigmsBul, Prelude, (X = ConstructX) in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
above_Prep = mkPrep "íàä" ;
|
above_Prep = mkPrep "над" ;
|
||||||
after_Prep = mkPrep "ñëåä" ;
|
after_Prep = mkPrep "след" ;
|
||||||
all_Predet = {s = table GenNum ["âñè÷êèÿ";"âñè÷êàòà";"âñè÷êîòî";"âñè÷êèòå"]} ;
|
all_Predet = {s = table GenNum ["всичкия";"всичката";"всичкото";"всичките"]} ;
|
||||||
almost_AdA, almost_AdN = ss "ïî÷òè" ;
|
almost_AdA, almost_AdN = ss "почти" ;
|
||||||
at_least_AdN, at_most_AdN = ss "ïî÷òè" ; ---- AR
|
at_least_AdN, at_most_AdN = ss "почти" ; ---- AR
|
||||||
although_Subj = ss ["âúïðåêè ÷å"] ;
|
although_Subj = ss ["въпреки че"] ;
|
||||||
always_AdV = mkAdV "âèíàãè" ;
|
always_AdV = mkAdV "винаги" ;
|
||||||
and_Conj = mkConj "è" Pl ;
|
and_Conj = mkConj "и" Pl ;
|
||||||
because_Subj = ss "çàùîòî" ;
|
because_Subj = ss "защото" ;
|
||||||
before_Prep = mkPrep "ïðåäè" ;
|
before_Prep = mkPrep "преди" ;
|
||||||
behind_Prep = mkPrep "çàä" ;
|
behind_Prep = mkPrep "зад" ;
|
||||||
between_Prep = mkPrep "ìåæäó" ;
|
between_Prep = mkPrep "между" ;
|
||||||
both7and_DConj = mkConj "è" Pl ** {sep=0} ;
|
both7and_DConj = mkConj "и" Pl ** {sep=0} ;
|
||||||
but_PConj = ss "íî" ;
|
but_PConj = ss "но" ;
|
||||||
by8agent_Prep = mkPrep "÷ðåç" ;
|
by8agent_Prep = mkPrep "чрез" ;
|
||||||
by8means_Prep = mkPrep "÷ðåç" ;
|
by8means_Prep = mkPrep "чрез" ;
|
||||||
can8know_VV, can_VV = mkVV (stateV (mkV166 "ìîãà")) ;
|
can8know_VV, can_VV = mkVV (stateV (mkV166 "мога")) ;
|
||||||
during_Prep = mkPrep ["ïî âðåìå íà"] ;
|
during_Prep = mkPrep ["по време на"] ;
|
||||||
either7or_DConj = mkConj "èëè" Sg ** {sep=1} ;
|
either7or_DConj = mkConj "или" Sg ** {sep=1} ;
|
||||||
everybody_NP = mkNP "âñåêè" (GSg Masc) (NounP3 Pos);
|
everybody_NP = mkNP "всеки" (GSg Masc) (NounP3 Pos);
|
||||||
every_Det = mkDeterminerSg "âñåêè" "âñÿêà" "âñÿêî";
|
every_Det = mkDeterminerSg "всеки" "всяка" "всяко";
|
||||||
everything_NP = mkNP "âñè÷êî" (GSg Neut) (NounP3 Pos);
|
everything_NP = mkNP "всичко" (GSg Neut) (NounP3 Pos);
|
||||||
everywhere_Adv = ss "íàâñÿêúäå" ;
|
everywhere_Adv = ss "навсякъде" ;
|
||||||
few_Det = {s = \\_,_,_ => "íÿêîëêî"; nn = NCountable; spec = Indef; p = Pos} ;
|
few_Det = {s = \\_,_,_ => "няколко"; nn = NCountable; spec = Indef; p = Pos} ;
|
||||||
--- first_Ord = ss "first" ; DEPRECATED
|
--- first_Ord = ss "first" ; DEPRECATED
|
||||||
for_Prep = mkPrep "çà" ;
|
for_Prep = mkPrep "за" ;
|
||||||
from_Prep = mkPrep "îò" ;
|
from_Prep = mkPrep "от" ;
|
||||||
he_Pron = mkPron "òîé" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Masc) PronP3 ;
|
he_Pron = mkPron "той" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Masc) PronP3 ;
|
||||||
here_Adv = ss "òóê" ;
|
here_Adv = ss "тук" ;
|
||||||
here7to_Adv = ss ["äî òóê"] ;
|
here7to_Adv = ss ["до тук"] ;
|
||||||
here7from_Adv = ss ["îò òóê"] ;
|
here7from_Adv = ss ["от тук"] ;
|
||||||
how_IAdv = mkIAdv "êàê" ;
|
how_IAdv = mkIAdv "как" ;
|
||||||
how8much_IAdv = mkIAdv "êîëêî" ;
|
how8much_IAdv = mkIAdv "колко" ;
|
||||||
how8many_IDet = {s = \\_ => table QForm ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ;
|
how8many_IDet = {s = \\_ => table QForm ["колко";"колкото"]; n = Pl; nonEmpty = False} ;
|
||||||
if_Subj = ss "àêî" ;
|
if_Subj = ss "ако" ;
|
||||||
in8front_Prep = mkPrep "ïðåä" ;
|
in8front_Prep = mkPrep "пред" ;
|
||||||
i_Pron = mkPron "àç" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) PronP1 ;
|
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
|
||||||
in_Prep = mkPrep (pre { "â" ;
|
in_Prep = mkPrep (pre { "в" ;
|
||||||
"âúâ" / strs {"â" ; "ô" ; "Â" ; "Ô"}
|
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
|
||||||
}) ;
|
}) ;
|
||||||
it_Pron = mkPron "òî" "íåãîâ" "íåãîâèÿ" "íåãîâèÿò" "íåãîâà" "íåãîâàòà" "íåãîâî" "íåãîâîòî" "íåãîâè" "íåãîâèòå" (GSg Neut) PronP3 ;
|
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
|
||||||
less_CAdv = X.mkCAdv "ïî-ìàëêî" "îò" ;
|
less_CAdv = X.mkCAdv "по-малко" "от" ;
|
||||||
many_Det = mkDeterminerPl "ìíîãî" ;
|
many_Det = mkDeterminerPl "много" ;
|
||||||
more_CAdv = X.mkCAdv "ïîâå÷å" "îò" ;
|
more_CAdv = X.mkCAdv "повече" "от" ;
|
||||||
most_Predet = {s = \\_ => "ïîâå÷åòî"} ;
|
most_Predet = {s = \\_ => "повечето"} ;
|
||||||
much_Det = mkDeterminerSg "ìíîãî" "ìíîãî" "ìíîãî";
|
much_Det = mkDeterminerSg "много" "много" "много";
|
||||||
must_VV =
|
must_VV =
|
||||||
mkVV {
|
mkVV {
|
||||||
s = \\_=>table {
|
s = \\_=>table {
|
||||||
VPres _ _ => "òðÿáâà" ;
|
VPres _ _ => "трябва" ;
|
||||||
VAorist _ _ => "òðÿáâàøå" ;
|
VAorist _ _ => "трябваше" ;
|
||||||
VImperfect _ _ => "òðÿáâàëî" ;
|
VImperfect _ _ => "трябвало" ;
|
||||||
VPerfect _ => "òðÿáâàëî" ;
|
VPerfect _ => "трябвало" ;
|
||||||
VPluPerfect _ => "òðÿáâàëî" ;
|
VPluPerfect _ => "трябвало" ;
|
||||||
VPassive _ => "òðÿáâàëî" ;
|
VPassive _ => "трябвало" ;
|
||||||
VPresPart _ => "òðÿáâàëî" ;
|
VPresPart _ => "трябвало" ;
|
||||||
VImperative Sg => "òðÿáâàé" ;
|
VImperative Sg => "трябвай" ;
|
||||||
VImperative Pl => "òðÿáâàéòå" ;
|
VImperative Pl => "трябвайте" ;
|
||||||
VNoun _ => "òðÿáâàíå" ;
|
VNoun _ => "трябване" ;
|
||||||
VGerund => "òðÿáâàéêè"
|
VGerund => "трябвайки"
|
||||||
} ;
|
} ;
|
||||||
vtype=VNormal ;
|
vtype=VNormal ;
|
||||||
lock_V=<>
|
lock_V=<>
|
||||||
} ;
|
} ;
|
||||||
no_Utt = ss "íå" ;
|
no_Utt = ss "не" ;
|
||||||
on_Prep = mkPrep "íà" ;
|
on_Prep = mkPrep "на" ;
|
||||||
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED
|
||||||
only_Predet = {s = \\_ => "ñàìî"} ;
|
only_Predet = {s = \\_ => "само"} ;
|
||||||
or_Conj = mkConj "èëè" Sg ;
|
or_Conj = mkConj "или" Sg ;
|
||||||
otherwise_PConj = ss "èíà÷å" ;
|
otherwise_PConj = ss "иначе" ;
|
||||||
part_Prep = mkPrep "îò" ;
|
part_Prep = mkPrep "от" ;
|
||||||
please_Voc = ss "ìîëÿ" ;
|
please_Voc = ss "моля" ;
|
||||||
possess_Prep = mkPrep [] Dat ;
|
possess_Prep = mkPrep [] Dat ;
|
||||||
quite_Adv = ss "äîñòà" ;
|
quite_Adv = ss "доста" ;
|
||||||
she_Pron = mkPron "òÿ" "íåèí" "íåéíèÿ" "íåéíèÿò" "íåéíà" "íåéíàòà" "íåéíî" "íåéíîòî" "íåéíè" "íåéíèòå" (GSg Fem) PronP3 ;
|
she_Pron = mkPron "тя" "неин" "нейния" "нейният" "нейна" "нейната" "нейно" "нейното" "нейни" "нейните" (GSg Fem) PronP3 ;
|
||||||
so_AdA = ss "òîëêîâà" ;
|
so_AdA = ss "толкова" ;
|
||||||
somebody_NP = mkNP "íÿêîé" (GSg Masc) (NounP3 Pos);
|
somebody_NP = mkNP "някой" (GSg Masc) (NounP3 Pos);
|
||||||
someSg_Det = mkDeterminerSg "íÿêîé" "íÿêîÿ" "íÿêîå" ;
|
someSg_Det = mkDeterminerSg "някой" "някоя" "някое" ;
|
||||||
somePl_Det = mkDeterminerPl "íÿêîè" ;
|
somePl_Det = mkDeterminerPl "някои" ;
|
||||||
something_NP = mkNP "íåùî" (GSg Neut) (NounP3 Pos);
|
something_NP = mkNP "нещо" (GSg Neut) (NounP3 Pos);
|
||||||
somewhere_Adv = ss "íÿêúäå" ;
|
somewhere_Adv = ss "някъде" ;
|
||||||
that_Quant = mkQuant "îíçè" "îíàçè" "îíîâà" "îíåçè" ;
|
that_Quant = mkQuant "онзи" "онази" "онова" "онези" ;
|
||||||
that_Subj = ss "֌" ;
|
that_Subj = ss "че" ;
|
||||||
there_Adv = ss "òàì" ;
|
there_Adv = ss "там" ;
|
||||||
there7to_Adv = ss ["äî òàì"] ;
|
there7to_Adv = ss ["до там"] ;
|
||||||
there7from_Adv = ss ["îò òàì"] ;
|
there7from_Adv = ss ["от там"] ;
|
||||||
therefore_PConj = ss ["òàêà ÷å"] ;
|
therefore_PConj = ss ["така че"] ;
|
||||||
they_Pron = mkPron "òå" "òåõåí" "òåõíèÿ" "òåõíèÿò" "òÿõíà" "òÿõíàòà" "òÿõíî" "òÿõíîòî" "òåõíè" "òåõíèòå" GPl PronP3 ;
|
they_Pron = mkPron "те" "техен" "техния" "техният" "тяхна" "тяхната" "тяхно" "тяхното" "техни" "техните" GPl PronP3 ;
|
||||||
this_Quant = mkQuant "òîçè" "òàçè" "òîâà" "òåçè" ;
|
this_Quant = mkQuant "този" "тази" "това" "тези" ;
|
||||||
through_Prep = mkPrep "ïðåç" ;
|
through_Prep = mkPrep "през" ;
|
||||||
too_AdA = ss "ïðåêàëåíî" ;
|
too_AdA = ss "прекалено" ;
|
||||||
to_Prep = mkPrep "äî" ;
|
to_Prep = mkPrep "до" ;
|
||||||
under_Prep = mkPrep "ïîä" ;
|
under_Prep = mkPrep "под" ;
|
||||||
very_AdA = ss "ìíîãî" ;
|
very_AdA = ss "много" ;
|
||||||
want_VV = mkVV (stateV (mkV186 "èñêàì")) ;
|
want_VV = mkVV (stateV (mkV186 "искам")) ;
|
||||||
we_Pron = mkPron "íèå" "íàø" "íàøèÿ" "íàøèÿò" "íàøà" "íàøàòà" "íàøå" "íàøåòî" "íàøè" "íàøèòå" GPl PronP1 ;
|
we_Pron = mkPron "ние" "наш" "нашия" "нашият" "наша" "нашата" "наше" "нашето" "наши" "нашите" GPl PronP1 ;
|
||||||
whatPl_IP = mkIP "êàêâè" "êàêâè" GPl ;
|
whatPl_IP = mkIP "какви" "какви" GPl ;
|
||||||
whatSg_IP = mkIP "êàêúâ" "êàêúâ" (GSg Masc) ;
|
whatSg_IP = mkIP "какъв" "какъв" (GSg Masc) ;
|
||||||
when_IAdv = mkIAdv "êîãà" ;
|
when_IAdv = mkIAdv "кога" ;
|
||||||
when_Subj = ss "êîãàòî" ;
|
when_Subj = ss "когато" ;
|
||||||
where_IAdv = mkIAdv "êúäå" ;
|
where_IAdv = mkIAdv "къде" ;
|
||||||
which_IQuant = {s = table GenNum [table QForm ["êîé";"êîéòî"];
|
which_IQuant = {s = table GenNum [table QForm ["кой";"който"];
|
||||||
table QForm ["êîÿ";"êîÿòî"];
|
table QForm ["коя";"която"];
|
||||||
table QForm ["êîå";"êîåòî"];
|
table QForm ["кое";"което"];
|
||||||
table QForm ["êîè";"êîèòî"]]} ;
|
table QForm ["кои";"които"]]} ;
|
||||||
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
|
whoSg_IP = mkIP "кой" "кого" (GSg Masc) ;
|
||||||
whoPl_IP = mkIP "êîè" "êîè" GPl ;
|
whoPl_IP = mkIP "кои" "кои" GPl ;
|
||||||
why_IAdv = mkIAdv "çàùî" ;
|
why_IAdv = mkIAdv "защо" ;
|
||||||
without_Prep = mkPrep "áåç" ;
|
without_Prep = mkPrep "без" ;
|
||||||
with_Prep = mkPrep "" WithPrep ;
|
with_Prep = mkPrep "" WithPrep ;
|
||||||
yes_Utt = ss "äà" ;
|
yes_Utt = ss "да" ;
|
||||||
youSg_Pron = mkPron "òè" "òâîé" "òâîÿ" "òâîÿò" "òâîÿ" "òâîÿòà" "òâîå" "òâîåòî" "òâîè" "òâîèòå" (GSg Masc) PronP2 ;
|
youSg_Pron = mkPron "ти" "твой" "твоя" "твоят" "твоя" "твоята" "твое" "твоето" "твои" "твоите" (GSg Masc) PronP2 ;
|
||||||
youPl_Pron = mkPron "âèå" "âàø" "âàøèÿ" "âàøèÿò" "âàøà" "âàøàòà" "âàøå" "âàøåòî" "âàøè" "âàøèòå" GPl PronP2 ;
|
youPl_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ;
|
||||||
youPol_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
|
--# -path=.:../abstract:../common:../prelude
|
||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
|
|
||||||
concrete SymbolBul of Symbol = CatBul ** open Prelude, ResBul in {
|
concrete SymbolBul of Symbol = CatBul ** open Prelude, ResBul in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = cp1251 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
SymbPN i = {s = i.s ; g = Neut} ;
|
SymbPN i = {s = i.s ; g = Neut} ;
|
||||||
@@ -32,15 +32,15 @@ lin
|
|||||||
SymbNum sy = {s = \\_ => sy.s; nn = NNum Pl} ;
|
SymbNum sy = {s = \\_ => sy.s; nn = NNum Pl} ;
|
||||||
SymbOrd sy = {s = \\aform => sy.s ++ "-" ++
|
SymbOrd sy = {s = \\aform => sy.s ++ "-" ++
|
||||||
case aform of {
|
case aform of {
|
||||||
ASg Masc Indef => "òè" ;
|
ASg Masc Indef => "ти" ;
|
||||||
ASg Fem Indef => "òà" ;
|
ASg Fem Indef => "та" ;
|
||||||
ASg Neut Indef => "òî" ;
|
ASg Neut Indef => "то" ;
|
||||||
ASg Masc Def => "òèÿ" ;
|
ASg Masc Def => "тия" ;
|
||||||
ASg Fem Def => "òàòà" ;
|
ASg Fem Def => "тата" ;
|
||||||
ASg Neut Def => "òîòî" ;
|
ASg Neut Def => "тото" ;
|
||||||
ASgMascDefNom => "òèÿò" ;
|
ASgMascDefNom => "тият" ;
|
||||||
APl Indef => "òè" ;
|
APl Indef => "ти" ;
|
||||||
APl Def => "òèòå"
|
APl Def => "тите"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ lin
|
|||||||
|
|
||||||
MkSymb s = s ;
|
MkSymb s = s ;
|
||||||
|
|
||||||
BaseSymb = infixSS "è" ;
|
BaseSymb = infixSS "и" ;
|
||||||
ConsSymb = infixSS bindComma ;
|
ConsSymb = infixSS bindComma ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -coding=cp1251
|
--# -coding=utf8
|
||||||
concrete TextBul of Text = CatBul ** open Prelude in {
|
concrete TextBul of Text = CatBul ** open Prelude in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
-- This will work for almost all languages except Spanish.
|
-- 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 {
|
concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
||||||
flags coding=cp1251 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
@@ -39,7 +39,7 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in {
|
|||||||
}) vp.p
|
}) vp.p
|
||||||
(predV vv) ;
|
(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) ;
|
ComplVQ v q = insertObj (\\_ => q.s ! QDir) Pos (predV v) ;
|
||||||
|
|
||||||
ComplVA v ap =
|
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) ;
|
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
|
-- 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
|
-- test: I saw a boy whom she asked who is here
|
||||||
SlashV2Q v q = insertSlashObj2 (\\_ => q.s ! QDir) Pos (slashV v v.c2 False) ;
|
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
|
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||||
Num = Determiner ;
|
Num = Determiner ;
|
||||||
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
||||||
Pron = PronForms ;
|
Pron = PronForms ** {poss : DemPronForms} ;
|
||||||
|
|
||||||
Adv = {s : Str} ;
|
Adv = {s : Str} ;
|
||||||
Prep = ResCze.ComplementCase ; -- {s : Str ; c : Case ; hasPrep : Bool} ;
|
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 youPl_Pron : Pron = notYet "youPl_Pron" ;
|
||||||
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
oper youPol_Pron : Pron = notYet "youPol_Pron" ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,33 +30,35 @@ lin
|
|||||||
UsePron pron = {
|
UsePron pron = {
|
||||||
s = table {
|
s = table {
|
||||||
Nom | Voc => pron.nom ;
|
Nom | Voc => pron.nom ;
|
||||||
Gen => pron.gen ;
|
Gen => pron.gen ;
|
||||||
Dat => pron.dat ;
|
Dat => pron.dat ;
|
||||||
Acc => pron.acc ;
|
Acc => pron.acc ;
|
||||||
Loc => pron.loc ;
|
Loc => pron.loc ;
|
||||||
Ins => pron.ins
|
Ins => pron.ins
|
||||||
} ;
|
} ;
|
||||||
clit = table {
|
clit = table {
|
||||||
Nom => pron.cnom ;
|
Nom => pron.cnom ;
|
||||||
Voc => pron.nom ;
|
Voc => pron.nom ;
|
||||||
Gen => pron.cgen ;
|
Gen => pron.cgen ;
|
||||||
Dat => pron.cdat ;
|
Dat => pron.cdat ;
|
||||||
Acc => pron.cacc ;
|
Acc => pron.cacc ;
|
||||||
Loc => pron.loc ;
|
Loc => pron.loc ;
|
||||||
Ins => pron.ins
|
Ins => pron.ins
|
||||||
} ;
|
} ;
|
||||||
prep = table {
|
prep = table {
|
||||||
Nom | Voc => pron.nom ;
|
Nom | Voc => pron.nom ;
|
||||||
Gen => pron.pgen ;
|
Gen => pron.pgen ;
|
||||||
Dat => pron.pdat ;
|
Dat => pron.pdat ;
|
||||||
Acc => pron.pacc ;
|
Acc => pron.pacc ;
|
||||||
Loc => pron.loc ;
|
Loc => pron.loc ;
|
||||||
Ins => pron.pins
|
Ins => pron.pins
|
||||||
} ;
|
} ;
|
||||||
a = pron.a ;
|
a = pron.a ;
|
||||||
hasClit = True ;
|
hasClit = True ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
PossPron pron = justDemPronFormsAdjective pron.poss ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s,clit,prep = \\c => pn.s ! c ;
|
s,clit,prep = \\c => pn.s ! c ;
|
||||||
a = Ag pn.g Sg P3 ;
|
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
|
-- demonstrative pronouns, used for Quant and Det
|
||||||
|
|
||||||
@@ -751,6 +786,20 @@ oper
|
|||||||
_ => adjAdj.s ! g ! n ! c
|
_ => adjAdj.s ! g ! n ! c
|
||||||
} + s
|
} + 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 = {
|
Determiner : Type = {
|
||||||
s : Gender => Case => Str ;
|
s : Gender => Case => Str ;
|
||||||
|
|||||||
@@ -19,9 +19,12 @@ lin
|
|||||||
to_Prep = mkPrep "do" Gen ;
|
to_Prep = mkPrep "do" Gen ;
|
||||||
with_Prep = mkPrep (pre {"s"|"z" => "se" ; _ => "s"}) Ins ; ----
|
with_Prep = mkPrep (pre {"s"|"z" => "se" ; _ => "s"}) Ins ; ----
|
||||||
|
|
||||||
i_Pron = personalPron (Ag (Masc Anim) Sg P1) ;
|
i_Pron = mkPron (Ag (Masc Anim) Sg P1) ; --- to add Fem pronouns in Extend
|
||||||
youSg_Pron = personalPron (Ag (Masc Anim) Sg P2) ;
|
youSg_Pron = mkPron (Ag (Masc Anim) Sg P2) ;
|
||||||
he_Pron = personalPron (Ag (Masc Anim) Sg P3) ;
|
he_Pron = mkPron (Ag (Masc Anim) Sg P3) ;
|
||||||
she_Pron = personalPron (Ag Fem 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
|
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
|
--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} ;
|
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 = overload {
|
||||||
mkPN : Str -> PN = regPN ;
|
mkPN : Str -> PN = regPN ;
|
||||||
mkPN : N -> PN = nounPN
|
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,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) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
--# -path=.:../translator
|
|
||||||
|
|
||||||
concrete TransEng of Trans =
|
|
||||||
RGLBaseEng - [Pol,Tense]
|
|
||||||
,PredEng
|
|
||||||
,DictionaryEng - [Pol,Tense]
|
|
||||||
|
|
||||||
** open ResEng, PredInstanceEng, Prelude, (Pr = PredEng) in {
|
|
||||||
|
|
||||||
flags
|
|
||||||
literal=Symb ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
liftV : ResEng.Verb -> Pr.PrV = \v -> lin PrV {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; 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 = \\f => v.s ! VVF f ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; ---- 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 = ap ** {c1,c2 = [] ; obj1 = \\_ => []} ; --- isPre
|
|
||||||
LiftCN cn = {s = \\n => cn.s ! n ! Nom ; c1,c2 = [] ; obj1 = \\_ => []} ;
|
|
||||||
|
|
||||||
LiftAdv a = a ** {isAdV = False ; c1 = []} ;
|
|
||||||
LiftAdV a = a ** {isAdV = True ; c1 = []} ;
|
|
||||||
LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user