mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Compare commits
179 Commits
fix-listVP
...
20250812
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51cb9c3091 | ||
|
|
b84cbcfc28 | ||
|
|
de5468e40a | ||
|
|
b93fd7f051 | ||
|
|
5aa5718ca5 | ||
|
|
fd0706fbc1 | ||
|
|
145e1affe9 | ||
|
|
3d0aa460c5 | ||
|
|
a0a8d99872 | ||
|
|
cdc1108a36 | ||
|
|
1308eb85d9 | ||
|
|
42d06dfafd | ||
|
|
04df53a17a | ||
|
|
41906a31c4 | ||
|
|
2d22802af4 | ||
|
|
76f09c2464 | ||
|
|
1825904f4d | ||
|
|
3f4fd4565a | ||
|
|
11d4f0c770 | ||
|
|
574ed858bc | ||
|
|
176d63f0ac | ||
|
|
607d9240c2 | ||
|
|
35f3b5e206 | ||
|
|
ababe72fb8 | ||
|
|
693cd88f7b | ||
|
|
44eec8629b | ||
|
|
ebba8b5894 | ||
|
|
1633d11e06 | ||
|
|
9e91511724 | ||
|
|
777e572681 | ||
|
|
186a12df0c | ||
|
|
904428fb36 | ||
|
|
8723bde58e | ||
|
|
7b777c425e | ||
|
|
f3811e8a0e | ||
|
|
f03d06b81d | ||
|
|
6876b79d43 | ||
|
|
33bd050b7a | ||
|
|
08793614ab | ||
|
|
70e41e47a7 | ||
|
|
66b5e4108f | ||
|
|
8613a78929 | ||
|
|
643ea07c3b | ||
|
|
c6d43a8bbc | ||
|
|
1b6f42397d | ||
|
|
bcf5db743f | ||
|
|
02456811ee | ||
|
|
dcbfb2a464 | ||
|
|
5e02340160 | ||
|
|
4e034425b9 | ||
|
|
7b7752c308 | ||
|
|
108bfb4163 | ||
|
|
d8aaeeb682 | ||
|
|
ffaedd718b | ||
|
|
b01b94001e | ||
|
|
dc143cc3ae | ||
|
|
0a1df37340 | ||
|
|
ad3fa455b1 | ||
|
|
b82bcde9f1 | ||
|
|
6fcf76e78e | ||
|
|
aa4dc4c3df | ||
|
|
3891cef66a | ||
|
|
8e47600671 | ||
|
|
89f2a9dea6 | ||
|
|
6b5df036e3 | ||
|
|
3dae1cf820 | ||
|
|
c4f94ab218 | ||
|
|
d626f03c48 | ||
|
|
93a06312a7 | ||
|
|
d2754c1623 | ||
|
|
d77c8fa23c | ||
|
|
164cf81477 | ||
|
|
4add2fb2de | ||
|
|
37e08ad739 | ||
|
|
466c7da532 | ||
|
|
e8bda853df | ||
|
|
f8bb75a13c | ||
|
|
576e17f03a | ||
|
|
a235cc9594 | ||
|
|
abf4cd4cb2 | ||
|
|
9e52b2d8a3 | ||
|
|
1111ca0fdd | ||
|
|
4de1b64b58 | ||
|
|
f0d74e59a7 | ||
|
|
a2b20dc6db | ||
|
|
21d1a192c8 | ||
|
|
e99bdb6d1a | ||
|
|
d44298a4ad | ||
|
|
89dc2a13f0 | ||
|
|
6dfce2943c | ||
|
|
0814c9da0f | ||
|
|
bb7786af7c | ||
|
|
650076a867 | ||
|
|
5b636496ef | ||
|
|
41dfd532bd | ||
|
|
26e89421d3 | ||
|
|
e7a4b71160 | ||
|
|
81c71043ca | ||
|
|
9217669c31 | ||
|
|
cc964d1853 | ||
|
|
62b5df23d1 | ||
|
|
e63a3c9d17 | ||
|
|
d895f4ceeb | ||
|
|
ba2e4a4964 | ||
|
|
78f333e79e | ||
|
|
710e73688d | ||
|
|
82075be37b | ||
|
|
7d631fafa2 | ||
|
|
78fc625174 | ||
|
|
afe544bb29 | ||
|
|
ca385925b6 | ||
|
|
4173353eb0 | ||
|
|
5135e5c5ca | ||
|
|
b1a5cf93b6 | ||
|
|
911cbb06c1 | ||
|
|
71f3b2dc78 | ||
|
|
23ccacf222 | ||
|
|
d3ecaadef0 | ||
|
|
4bb96aa295 | ||
|
|
d198de7395 | ||
|
|
9b12c13057 | ||
|
|
4f05d5629b | ||
|
|
6648913d4e | ||
|
|
05c65ccbd8 | ||
|
|
d18b889df6 | ||
|
|
6084aef91b | ||
|
|
687f0cefc8 | ||
|
|
479fe7236f | ||
|
|
15ecf3217c | ||
|
|
1f98f642af | ||
|
|
65a05d223b | ||
|
|
f36bbade45 | ||
|
|
c2b8d98400 | ||
|
|
d182354238 | ||
|
|
1fbec65714 | ||
|
|
d059de5711 | ||
|
|
7a8cdf5c3d | ||
|
|
03e81a3fab | ||
|
|
18716dbbd5 | ||
|
|
44171d7d73 | ||
|
|
726d04f00f | ||
|
|
a251318dad | ||
|
|
2363da4b2f | ||
|
|
cd3a2e0ac4 | ||
|
|
a0c8198a68 | ||
|
|
70223e85f2 | ||
|
|
b404f4e5b3 | ||
|
|
e7dd5304c7 | ||
|
|
0df8e6da39 | ||
|
|
bd75a0529c | ||
|
|
4957955df0 | ||
|
|
f85fa84ae0 | ||
|
|
bb5107fa99 | ||
|
|
97b713520f | ||
|
|
fb42bc6b27 | ||
|
|
13dea0d8ac | ||
|
|
38ba6b1d6c | ||
|
|
04e76381dc | ||
|
|
d6cb2806ff | ||
|
|
6ae9123f87 | ||
|
|
f7ba54db1c | ||
|
|
a338c2c60e | ||
|
|
2eb19b5a2d | ||
|
|
bffdfdb790 | ||
|
|
fa42bf3c41 | ||
|
|
a0a9c31745 | ||
|
|
676e61e255 | ||
|
|
0fe84ad2cf | ||
|
|
2aef82181b | ||
|
|
ffcff47545 | ||
|
|
53e731593d | ||
|
|
9193a303a5 | ||
|
|
4b4fbbb401 | ||
|
|
600af2b8bf | ||
|
|
15367fb05d | ||
|
|
4c508979bb | ||
|
|
a67af709c2 | ||
|
|
128f283377 | ||
|
|
7259848d30 |
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@@ -8,19 +8,26 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
GF_VERSION: 3.10-1
|
||||
GF_VERSION: 3.12
|
||||
DEST: gf-rgl-${{ github.event.inputs.tag }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download GF
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
repo: 'GrammaticalFramework/gf-core'
|
||||
version: 'tags/release-${{ env.GF_VERSION }}'
|
||||
file: 'gf-${{ env.GF_VERSION }}-ubuntu-24.04.deb'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install GF
|
||||
run: |
|
||||
curl -s https://www.grammaticalframework.org/download/gf_${GF_VERSION}_amd64.deb -o gf.deb
|
||||
sudo dpkg -i gf.deb
|
||||
sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb
|
||||
|
||||
- name: Build RGL
|
||||
run: |
|
||||
|
||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -6,26 +6,26 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
GF_VERSION: 3.11
|
||||
GF_VERSION: 3.12
|
||||
DEST: gf-rgl
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download GF
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
repo: 'GrammaticalFramework/gf-core'
|
||||
version: 'tags/${{ env.GF_VERSION }}'
|
||||
file: 'gf-${{ env.GF_VERSION }}-ubuntu-20.04.deb'
|
||||
version: 'tags/release-${{ env.GF_VERSION }}'
|
||||
file: 'gf-${{ env.GF_VERSION }}-ubuntu-24.04.deb'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install GF
|
||||
run: |
|
||||
sudo dpkg -i gf-${GF_VERSION}-ubuntu-20.04.deb
|
||||
sudo dpkg -i gf-${GF_VERSION}-ubuntu-24.04.deb
|
||||
|
||||
- name: Build RGL
|
||||
run: |
|
||||
|
||||
@@ -25,6 +25,7 @@ data LangInfo = LangInfo
|
||||
, langSymbolic :: Bool
|
||||
, langCompatibility :: Bool
|
||||
, langSynopsis :: Bool -- ^ include in RGL synopsis
|
||||
, langMorphodict :: Bool
|
||||
} deriving (Show,Eq)
|
||||
|
||||
-- | Load language information from default config file
|
||||
@@ -55,6 +56,7 @@ loadLangsFrom configFile = do
|
||||
, langSymbolic = boolBit bits 8 True
|
||||
, langCompatibility = boolBit bits 9 False
|
||||
, langSynopsis = boolBit bits 10 False
|
||||
, langMorphodict = boolBit bits 11 False
|
||||
}
|
||||
|
||||
-- | Separate a string on a character
|
||||
|
||||
2
Makefile
2
Makefile
@@ -19,6 +19,7 @@ default: build copy
|
||||
build: src/*/*.gf
|
||||
ifneq (, $(RUNGHC))
|
||||
$(RUNGHC) build
|
||||
$(RUNGHC) build morphodict
|
||||
else
|
||||
./Setup.sh
|
||||
endif
|
||||
@@ -26,6 +27,7 @@ endif
|
||||
copy:
|
||||
ifneq (, $(RUNGHC))
|
||||
$(RUNGHC) copy
|
||||
$(RUNGHC) copy morphodict
|
||||
endif
|
||||
|
||||
install: build copy
|
||||
|
||||
26
Setup.hs
26
Setup.hs
@@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE CPP, LambdaCase #-}
|
||||
|
||||
-- | Main build script for RGL
|
||||
|
||||
@@ -150,11 +150,12 @@ getRGLBuildSubDir mode =
|
||||
case mode of
|
||||
Present -> "present"
|
||||
AllTenses -> "alltenses"
|
||||
MorphoDict -> "morphodict"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Build modes
|
||||
|
||||
data Mode = Present | AllTenses
|
||||
data Mode = Present | AllTenses | MorphoDict
|
||||
deriving (Show,Eq)
|
||||
|
||||
all_modes :: [String]
|
||||
@@ -187,6 +188,7 @@ rglCommands =
|
||||
, RGLCommand "lang" False $ gfcp [l,s]
|
||||
, RGLCommand "api" False $ gfcp [t,sc]
|
||||
, RGLCommand "compat" False $ gfcp [c]
|
||||
, RGLCommand "morphodict" False $ gfcp [m]
|
||||
|
||||
-- Special command, invoked when command ends in .gf
|
||||
, RGLCommand "modules" False $ \modes args bi -> do
|
||||
@@ -223,14 +225,20 @@ rglCommands =
|
||||
s mode args = (symbol,optml mode langTry args)
|
||||
c mode args = (compat,optml AllTenses langCompatibility args)
|
||||
t mode args = (try,optml mode langTry args)
|
||||
m mode args = (morphodict,optml mode langMorphodict args)
|
||||
sc mode args = (symbolic,optml mode langSymbolic args)
|
||||
|
||||
optml :: Mode -> (LangInfo -> Bool) -> [String] -> ([LangInfo] -> [LangInfo])
|
||||
optml mode pred args =
|
||||
\langsAll ->
|
||||
let langsDefault = filter (if mode == Present then langPresent else const True) (filter pred langsAll)
|
||||
let langsDefault = filter (mode2langinfo mode) (filter pred langsAll)
|
||||
in getOptLangs langsAll langsDefault args
|
||||
|
||||
mode2langinfo = \case
|
||||
Present -> langPresent
|
||||
MorphoDict -> langMorphodict
|
||||
_ -> const True
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Getting module paths/names
|
||||
|
||||
@@ -260,6 +268,9 @@ syntax l = sourceDir </> "api" </> ("Syntax" ++ langCode l ++ ".gf")
|
||||
symbolic :: LangInfo -> FilePath
|
||||
symbolic l = sourceDir </> "api" </> ("Symbolic" ++ langCode l ++ ".gf")
|
||||
|
||||
morphodict :: LangInfo -> FilePath
|
||||
morphodict l = sourceDir </> "morphodict" </> ("MorphoDict" ++ langCode l ++ ".gf")
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Argument helpers
|
||||
|
||||
@@ -302,8 +313,9 @@ getOptMode args =
|
||||
else explicit_modes
|
||||
where
|
||||
explicit_modes =
|
||||
[Present|have "present"]++
|
||||
[AllTenses|have "alltenses"]
|
||||
[Present | have "present"] ++
|
||||
[AllTenses | have "alltenses"] ++
|
||||
[MorphoDict | have "morphodict"]
|
||||
have mode = mode `elem` args
|
||||
|
||||
-- | List of languages overriding the default definitions
|
||||
@@ -366,8 +378,8 @@ gfcn :: Info -> Mode -> String -> [FilePath] -> IO ()
|
||||
gfcn bi mode summary files = do
|
||||
let dir = getRGLBuildDir bi mode
|
||||
preproc = case mode of
|
||||
Present -> "--preproc=mkPresent"
|
||||
AllTenses -> ""
|
||||
Present -> "--preproc=mkPresent"
|
||||
_ -> ""
|
||||
createDirectoryIfMissing True dir
|
||||
if length files > 0
|
||||
then do
|
||||
|
||||
13
Setup.sh
13
Setup.sh
@@ -59,6 +59,7 @@ gfc="${gf} --batch --quiet --gf-lib-path=${dist}"
|
||||
mkdir -p "${dist}/prelude"
|
||||
mkdir -p "${dist}/present"
|
||||
mkdir -p "${dist}/alltenses"
|
||||
mkdir -p "${dist}/morphodict"
|
||||
|
||||
# Build: prelude
|
||||
echo "Building [prelude]"
|
||||
@@ -68,6 +69,7 @@ ${gfc} --gfo-dir="${dist}"/prelude "${src}"/prelude/*.gf
|
||||
# Gather all language modules for building
|
||||
modules_present=
|
||||
modules_alltenses=
|
||||
modules_morphodict=
|
||||
for lang in $langs; do
|
||||
for mod in $modules_langs $modules_api; do
|
||||
if [ $mod == "Compatibility" ] && [[ "$langs_compat" != *"$lang"* ]]; then continue; fi
|
||||
@@ -80,8 +82,12 @@ for lang in $langs; do
|
||||
modules_alltenses="${modules_alltenses} ${file}"
|
||||
done
|
||||
done
|
||||
file="${src}/morphodict/MorphoDict${lang}.gf"
|
||||
if [ ! -f "$file" ]; then continue; fi
|
||||
modules_morphodict="${modules_morphodict} ${file}"
|
||||
done
|
||||
|
||||
|
||||
# Build: present
|
||||
echo "Building [present]"
|
||||
if [ $verbose = true ]; then echo $modules_present; fi
|
||||
@@ -96,6 +102,13 @@ for module in $modules_alltenses; do
|
||||
${gfc} --no-pmcfg --gfo-dir="${dist}"/alltenses "${module}"
|
||||
done
|
||||
|
||||
# Build: morphodict
|
||||
echo "Building [morphodict]"
|
||||
if [ $verbose = true ]; then echo $modules_morphodict; fi
|
||||
for module in $modules_morphodict; do
|
||||
${gfc} --no-pmcfg --gfo-dir="${dist}"/morphodict "${module}"
|
||||
done
|
||||
|
||||
# Copy
|
||||
if [ $dest == $dist ]; then exit 0; fi
|
||||
echo "Copying to ${dest}"
|
||||
|
||||
113
languages.csv
113
languages.csv
@@ -1,55 +1,58 @@
|
||||
Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis
|
||||
Afr,Afrikaans,afrikaans,,,,,,n,,y
|
||||
Amh,Amharic,amharic,,,,,n,n,,n
|
||||
Ara,Arabic,arabic,,,,,,y,,y
|
||||
Bul,Bulgarian,bulgarian,,,y,,,,,y
|
||||
Cat,Catalan,catalan,Romance,,y,,,,y,y
|
||||
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y
|
||||
Chi,Chinese (simplified),chinese,,,,,,,,y
|
||||
Cze,Czech,czech,,,,,,n,,y
|
||||
Dan,Danish,danish,Scand,,y,,,,,y
|
||||
Dut,Dutch,dutch,,,y,,,,,y
|
||||
Eng,English,english,,,y,,,,y,y
|
||||
Est,Estonian,estonian,,,,,,,,y
|
||||
Eus,Basque,basque,,,,,,,,y
|
||||
Fin,Finnish,finnish,,,y,,,,y,y
|
||||
Fre,French,french,Romance,,y,,,,y,y
|
||||
Ger,German,german,,,y,,,,,y
|
||||
Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n
|
||||
Gre,Greek,greek,,,,,,,,y
|
||||
Heb,Hebrew,hebrew,,,,,n,n,,n
|
||||
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y
|
||||
Hrv,Croatian,croatian,,,,,,y,,n
|
||||
Hun,Hungarian,hungarian,,,n,y,y,y,n,n
|
||||
Ice,Icelandic,icelandic,,,,,,n,,y
|
||||
Ina,Interlingua,interlingua,,,y,,n,n,,n
|
||||
Ita,Italian,italian,Romance,,y,,,,y,y
|
||||
Jpn,Japanese,japanese,,,,,,,,y
|
||||
Kor,Korean,korean,,,n,y,y,y,n,n
|
||||
Lat,Latin,latin,,,,,y,y,n,y
|
||||
Lav,Latvian,latvian,,,,,,,y,y
|
||||
May,Malay,malay,,,y,,,,n,y
|
||||
Mlt,Maltese,maltese,,,,,,,,y
|
||||
Mon,Mongolian,mongolian,,,,,,n,,y
|
||||
Nep,Nepali,nepali,,,,,,n,,y
|
||||
Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y
|
||||
Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y
|
||||
Pes,Persian,persian,,,,,,,,y
|
||||
Pnb,Punjabi,punjabi,,,y,,,,,y
|
||||
Pol,Polish,polish,,,,,,,,y
|
||||
Por,Portuguese,portuguese,Romance,,y,,,,y,y
|
||||
Ron,Romanian,romanian,,,y,,,,,y
|
||||
Rus,Russian,russian,,,y,,,,,y
|
||||
Slo,Slovak,slovak,,,,,,n,,y
|
||||
Slv,Slovenian,slovenian,,,,,n,n,,n
|
||||
Snd,Sindhi,sindhi,,,,,,,,y
|
||||
Spa,Spanish,spanish,Romance,,y,,,,y,y
|
||||
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n
|
||||
Swe,Swedish,swedish,Scand,,y,,,,y,y
|
||||
Tam,Tamil,tamil,n,n,n,n,n,n,n,n
|
||||
Tel,Telugu,telugu,,,y,n,n,n,,n
|
||||
Tha,Thai,thai,,to_thai,,,,,,y
|
||||
Tur,Turkish,turkish,,,y,,,n,,n
|
||||
Urd,Urdu,urdu,Hindustani,,,,,,,y
|
||||
Som,Somali,somali,,,,,n,n,,n
|
||||
Zul,Zulu,zulu,,,,,n,n,,n
|
||||
Code,Name,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility,Synopsis,MorphoDict
|
||||
Afr,Afrikaans,afrikaans,,,,,,n,,y,n
|
||||
Amh,Amharic,amharic,,,,,n,n,,n,n
|
||||
Ara,Arabic,arabic,,,,,,y,,y,y
|
||||
Bul,Bulgarian,bulgarian,,,y,,,,,y,n
|
||||
Cat,Catalan,catalan,Romance,,y,,,,y,y,n
|
||||
Cgg,Rukiga,rukiga,,,y,y,n,n,y,y,n
|
||||
Chi,Chinese (simplified),chinese,,,,,,,,y,y
|
||||
Cze,Czech,czech,,,,,,n,,y,n
|
||||
Dan,Danish,danish,Scand,,y,,,,,y,n
|
||||
Dut,Dutch,dutch,,,y,,,,,y,n
|
||||
Eng,English,english,,,y,,,,y,y,y
|
||||
Est,Estonian,estonian,,,,,,,,y,n
|
||||
Eus,Basque,basque,,,,,,,,y,n
|
||||
Fin,Finnish,finnish,,,y,,,,y,y,y
|
||||
Fre,French,french,Romance,,y,,,,y,y,y
|
||||
Ger,German,german,,,y,,,,,y,y
|
||||
Grc,Ancient Greek,ancient_greek,,,y,,n,n,,n,n
|
||||
Gre,Greek,greek,,,,,,,,y,n
|
||||
Heb,Hebrew,hebrew,,,,,n,n,,n,n
|
||||
Hin,Hindi,hindi,Hindustani,to_devanagari,y,,,,,y,n
|
||||
Hrv,Croatian,croatian,,,,,,y,,n,n
|
||||
Hun,Hungarian,hungarian,,,n,y,y,y,n,n,n
|
||||
Ice,Icelandic,icelandic,,,,,,n,,y,n
|
||||
Ina,Interlingua,interlingua,,,y,,n,n,,n,n
|
||||
Ita,Italian,italian,Romance,,y,,,,y,y,y
|
||||
Jpn,Japanese,japanese,,,,,,,,y,n
|
||||
Kaz,Kazakh,kazakh,,,,y,n,n,n,y,n
|
||||
Kor,Korean,korean,,,n,y,y,y,n,n,n
|
||||
Lat,Latin,latin,,,,,y,y,n,y,n
|
||||
Lav,Latvian,latvian,,,,,,,y,y,n
|
||||
Mkd,Macedonian,macedonian,,,,y,n,n,n,y,n
|
||||
May,Malay,malay,,,y,,,,n,y,n
|
||||
Mlt,Maltese,maltese,,,,,,,,y,n
|
||||
Mon,Mongolian,mongolian,,,,,,n,,y,n
|
||||
Nep,Nepali,nepali,,,,,,n,,y,n
|
||||
Nno,Norwegian (nynorsk),nynorsk,,,y,,,,,y,n
|
||||
Nor,Norwegian (bokmål),norwegian,Scand,,y,,,,,y,n
|
||||
Pes,Persian,persian,,,,,,,,y,n
|
||||
Pnb,Punjabi,punjabi,,,y,,,,,y,n
|
||||
Pol,Polish,polish,,,,,,,,y,n
|
||||
Por,Portuguese,portuguese,Romance,,y,,,,y,y,y
|
||||
Ron,Romanian,romanian,,,y,,,,,y,n
|
||||
Rus,Russian,russian,,,y,,,,,y,n
|
||||
Slo,Slovak,slovak,,,,,,n,,y,n
|
||||
Slv,Slovenian,slovenian,,,,,n,n,,n,n
|
||||
Snd,Sindhi,sindhi,,,,,,,,y,n
|
||||
Spa,Spanish,spanish,Romance,,y,,,,y,y,y
|
||||
Sqi,Albanian,albanian,,,,y,n,n,n,y,n
|
||||
Swa,Swahili,swahili,Bantu,,,y,n,n,n,n,n
|
||||
Swe,Swedish,swedish,Scand,,y,,,,y,y,y
|
||||
Tam,Tamil,tamil,n,n,n,n,n,n,n,n,n
|
||||
Tel,Telugu,telugu,,,y,n,n,n,,n,n
|
||||
Tha,Thai,thai,,to_thai,,,,,,y,n
|
||||
Tur,Turkish,turkish,,,y,,,n,,n,n
|
||||
Urd,Urdu,urdu,Hindustani,,,,,,,y,n
|
||||
Som,Somali,somali,,,,,n,n,,n,n
|
||||
Zul,Zulu,zulu,,,,,n,n,,n,n
|
||||
|
||||
|
@@ -305,4 +305,7 @@ fun
|
||||
fun
|
||||
TPastSimple : Tense ;
|
||||
|
||||
fun
|
||||
SubjunctRelCN : CN -> RS -> CN ; -- e.g. Romance languages when subjunctive/conjunctive is needed
|
||||
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ param
|
||||
|
||||
--2 Transformations between parameter types
|
||||
|
||||
oper Agr : Type = {g : Gender ; n : Number ; p : Person} ;
|
||||
oper Agr : PType = {g : Gender ; n : Number ; p : Person} ;
|
||||
|
||||
oper
|
||||
agrP3 : Number -> Agr = agrgP3 Neutr ;
|
||||
|
||||
11
src/albanian/AdjectiveSqi.gf
Normal file
11
src/albanian/AdjectiveSqi.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete AdjectiveSqi of Adjective = CatSqi ** open ResSqi, Prelude in {
|
||||
|
||||
lin
|
||||
PositA a = {
|
||||
s = \\spec,c,g,n => case a.clit of {
|
||||
True => link_clitic ! spec ! c ! g ! n ++ a.s ! c ! g ! n ;
|
||||
False => a.s ! c ! g ! n
|
||||
}
|
||||
} ;
|
||||
|
||||
}
|
||||
4
src/albanian/AllSqi.gf
Normal file
4
src/albanian/AllSqi.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
concrete AllSqi of AllSqiAbs =
|
||||
LangSqi
|
||||
**
|
||||
{} ;
|
||||
3
src/albanian/AllSqiAbs.gf
Normal file
3
src/albanian/AllSqiAbs.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
abstract AllSqiAbs =
|
||||
Lang
|
||||
** {}
|
||||
25
src/albanian/CatSqi.gf
Normal file
25
src/albanian/CatSqi.gf
Normal file
@@ -0,0 +1,25 @@
|
||||
concrete CatSqi of Cat = CommonX ** open ParamX, Prelude, ResSqi in {
|
||||
|
||||
lincat N = Noun ;
|
||||
lincat N2 = Noun ** {c2 : Compl} ;
|
||||
lincat N3 = Noun ** {c2,c3 : Compl} ;
|
||||
lincat A = Adj ;
|
||||
lincat A2 = Adj ** {c2 : Compl} ;
|
||||
lincat V, VA, VV, VS, VQ = Verb ;
|
||||
lincat V2, V2S, V2Q = Verb ** {c2 : Compl} ;
|
||||
lincat V3, V2A, V2V = Verb ** {c2,c3 : Compl} ;
|
||||
lincat Prep = Compl ;
|
||||
|
||||
lincat Numeral = {s : Str} ;
|
||||
lincat Digits = {s : Str; n : Number; tail : DTail} ;
|
||||
lincat Decimal = {s : Str; n : Number; hasDot : Bool} ;
|
||||
|
||||
lincat AP = {s: Species => Case => Gender => Number => Str} ;
|
||||
lincat CN = Noun ;
|
||||
lincat Num = {s : Str; n : Number} ;
|
||||
lincat Quant = {s : Case => Gender => Number => Str; spec : Species} ;
|
||||
lincat Det = {s : Case => Gender => Str; spec : Species; n : Number} ;
|
||||
lincat NP = {s: Case => Str; a : Agr} ;
|
||||
lincat Pron = {s: Case => Str; acc_clit, dat_clit : Str; a : Agr} ;
|
||||
|
||||
}
|
||||
117
src/albanian/DocumentationSqi.gf
Normal file
117
src/albanian/DocumentationSqi.gf
Normal file
@@ -0,0 +1,117 @@
|
||||
concrete DocumentationSqi of Documentation = CatSqi ** open
|
||||
ParamX, ResSqi, Prelude, HTML in {
|
||||
|
||||
lincat
|
||||
Inflection = {t : Str; s1,s2,s3 : Str} ;
|
||||
Definition = {s : Str} ;
|
||||
Document = {s : Str} ;
|
||||
Tag = {s : Str} ;
|
||||
|
||||
lin InflectionN = \x -> {
|
||||
t="em" ;
|
||||
s1=heading1 ("Emër" ++
|
||||
case x.g of {
|
||||
Masc => "(mashkullor)" ;
|
||||
Fem => "(femëror)"
|
||||
}) ;
|
||||
s2=frameTable (
|
||||
tr (intagAttr "th" "colspan=\"2\"" "" ++ th "Sg" ++ th "Pl") ++
|
||||
tr (intagAttr "th" "rowspan=\"4\"" "Indef" ++ th "Nom" ++ td (x.s ! Indef ! Nom ! Sg) ++ td (x.s ! Indef ! Nom ! Pl)) ++
|
||||
tr (th "Acc" ++ td (x.s ! Indef ! Acc ! Sg) ++ td (x.s ! Indef ! Acc ! Pl)) ++
|
||||
tr (th "Dat" ++ td (x.s ! Indef ! Dat ! Sg) ++ td (x.s ! Indef ! Dat ! Pl)) ++
|
||||
tr (th "Ablat" ++ td (x.s ! Indef ! Ablat ! Sg) ++ td (x.s ! Indef ! Ablat ! Pl)) ++
|
||||
tr (intagAttr "th" "rowspan=\"4\"" "Def" ++ th "Nom" ++ td (x.s ! Def ! Nom ! Sg) ++ td (x.s ! Def ! Nom ! Pl)) ++
|
||||
tr (th "Acc" ++ td (x.s ! Def ! Acc ! Sg) ++ td (x.s ! Def ! Acc ! Pl)) ++
|
||||
tr (th "Dat" ++ td (x.s ! Def ! Dat ! Sg) ++ td (x.s ! Def ! Dat ! Pl)) ++
|
||||
tr (th "Ablat" ++ td (x.s ! Def ! Ablat ! Sg) ++ td (x.s ! Def ! Ablat ! Pl))) ;
|
||||
s3=[]
|
||||
} ;
|
||||
lin InflectionA = \x -> {
|
||||
t="mb" ;
|
||||
s1=heading1 "Mbiemër" ;
|
||||
s2=frameTable (
|
||||
tr (intagAttr "th" "colspan=\"2\"" "" ++ th "Sg" ++ th "Pl") ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "Nom" ++ th "Masc" ++ td (y ! Nom ! Masc ! Sg) ++ td (y ! Nom ! Masc ! Pl)) ++
|
||||
tr (th "Fem" ++ td (y ! Nom ! Fem ! Sg) ++ td (y ! Nom ! Fem ! Pl)) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "Acc" ++ th "Masc" ++ td (y ! Acc ! Masc ! Sg) ++ td (y ! Acc ! Masc ! Pl)) ++
|
||||
tr (th "Fem" ++ td (y ! Acc ! Fem ! Sg) ++ td (y ! Acc ! Fem ! Pl)) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "Dat" ++ th "Masc" ++ td (y ! Dat ! Masc ! Sg) ++ td (y ! Dat ! Masc ! Pl)) ++
|
||||
tr (th "Fem" ++ td (y ! Dat ! Fem ! Sg) ++ td (y ! Dat ! Fem ! Pl)) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "Ablat" ++ th "Masc" ++ td (y ! Ablat ! Masc ! Sg) ++ td (y ! Ablat ! Masc ! Pl)) ++
|
||||
tr (th "Fem" ++ td (y ! Ablat ! Fem ! Sg) ++ td (y ! Ablat ! Fem ! Pl))) ;
|
||||
s3=[]
|
||||
} where {
|
||||
y : Case => Gender => Number => Str =
|
||||
\\c,g,n => case x.clit of {
|
||||
True => link_clitic ! Indef ! c ! g ! n ++ x.s ! c ! g ! n ;
|
||||
False => x.s ! c ! g ! n
|
||||
} ;
|
||||
} ;
|
||||
lin InflectionV = \x -> {
|
||||
t="fl" ;
|
||||
s1=heading1 "Folje" ;
|
||||
s2=frameTable (
|
||||
tr (intagAttr "th" "rowspan=\"24\"" "Indicative" ++ intagAttr "th" "rowspan=\"6\"" "Pres" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Pres ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Pres ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Pres ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Pres ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Pres ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Pres ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "Past" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Past ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Past ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Past ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Past ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Past ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Past ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "Aorist" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Aorist ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Aorist ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Aorist ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Aorist ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Aorist ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Aorist ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "Imperfect" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.Indicative ! Imperfect ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Imperfect ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Imperfect ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.Indicative ! Imperfect ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.Indicative ! Imperfect ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.Indicative ! Imperfect ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "Imperative" ++ th "Sg" ++ td (x.Imperative ! Sg)) ++
|
||||
tr (th "Pl" ++ td (x.Imperative ! Pl)) ++
|
||||
tr (th "participle" ++ td (x.participle)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "pres_optative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.pres_optative ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.pres_optative ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.pres_optative ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.pres_optative ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.pres_optative ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.pres_optative ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "perf_optative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.perf_optative ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.perf_optative ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.perf_optative ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.perf_optative ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.perf_optative ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.perf_optative ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "pres_admirative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.pres_admirative ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.pres_admirative ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.pres_admirative ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.pres_admirative ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.pres_admirative ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.pres_admirative ! Pl ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"6\"" "imperf_admirative" ++ intagAttr "th" "rowspan=\"3\"" "Sg" ++ th "P1" ++ td (x.imperf_admirative ! Sg ! P1)) ++
|
||||
tr (th "P2" ++ td (x.imperf_admirative ! Sg ! P2)) ++
|
||||
tr (th "P3" ++ td (x.imperf_admirative ! Sg ! P3)) ++
|
||||
tr (intagAttr "th" "rowspan=\"3\"" "Pl" ++ th "P1" ++ td (x.imperf_admirative ! Pl ! P1)) ++
|
||||
tr (th "P2" ++ td (x.imperf_admirative ! Pl ! P2)) ++
|
||||
tr (th "P3" ++ td (x.imperf_admirative ! Pl ! P3))) ;
|
||||
s3=[]
|
||||
} ;
|
||||
lin InflectionAdv = \x -> {
|
||||
t="nd" ;
|
||||
s1=heading1 "Ndajfolje" ;
|
||||
s2=frameTable (
|
||||
tr (th "s" ++ td (x.s))) ;
|
||||
s3=[]
|
||||
} ;
|
||||
lin
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Example:</b>"++e.s++"</p>"};lin MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ; MkTag i = {s = i.t} ;}
|
||||
9
src/albanian/GrammarSqi.gf
Normal file
9
src/albanian/GrammarSqi.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
concrete GrammarSqi of Grammar =
|
||||
NounSqi,
|
||||
AdjectiveSqi,
|
||||
NumeralSqi,
|
||||
PhraseSqi,
|
||||
StructuralSqi
|
||||
** {
|
||||
|
||||
} ;
|
||||
10
src/albanian/LangSqi.gf
Normal file
10
src/albanian/LangSqi.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract
|
||||
concrete LangSqi of Lang =
|
||||
GrammarSqi,
|
||||
LexiconSqi
|
||||
,DocumentationSqi --# notpresent
|
||||
** {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
}
|
||||
8
src/albanian/LexiconSqi.gf
Normal file
8
src/albanian/LexiconSqi.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
concrete LexiconSqi of Lexicon = CatSqi ** open ParadigmsSqi in {
|
||||
|
||||
lin
|
||||
airplane_N = mkN032 "aeroplan" ;
|
||||
apple_N = mkN069 "mollë" ;
|
||||
good_A = mkA "mirë" ;
|
||||
|
||||
}
|
||||
42501
src/albanian/MorphoSqi.gf
Normal file
42501
src/albanian/MorphoSqi.gf
Normal file
File diff suppressed because it is too large
Load Diff
40
src/albanian/NounSqi.gf
Normal file
40
src/albanian/NounSqi.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
concrete NounSqi of Noun = CatSqi ** open MorphoSqi, ResSqi in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ! c ! cn.g ++ cn.s ! det.spec ! c ! det.n ;
|
||||
a = agrgP3 cn.g det.n
|
||||
} ;
|
||||
|
||||
UsePron p = p ;
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\c,g => quant.s ! c ! g ! num.n ++ num.s ;
|
||||
n = num.n ;
|
||||
spec = quant.spec
|
||||
} ;
|
||||
|
||||
NumSg = {s = []; n = Sg} ;
|
||||
NumPl = {s = []; n = Pl} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\c,g,n => [] ;
|
||||
spec = Def
|
||||
} ;
|
||||
|
||||
IndefArt = {
|
||||
s = \\c,g => table Number ["një"; []] ;
|
||||
spec = Indef
|
||||
} ;
|
||||
|
||||
UseN n = n ;
|
||||
UseN2 n = n ;
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\spec,c,n => cn.s ! spec ! c ! n ++ ap.s ! spec ! c ! cn.g ! n ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
}
|
||||
93
src/albanian/NumeralSqi.gf
Normal file
93
src/albanian/NumeralSqi.gf
Normal file
@@ -0,0 +1,93 @@
|
||||
concrete NumeralSqi of Numeral = CatSqi ** open ParamX, Prelude in {
|
||||
|
||||
oper bind : Str -> Str -> Str = \a -> \b -> a ++ b ;
|
||||
|
||||
param DForm = unit | teen | ten ;
|
||||
|
||||
oper LinDigit = {s : DForm => Str };
|
||||
oper LinSub100 = {s : Str } ;
|
||||
|
||||
lincat Digit = LinDigit ;
|
||||
lincat Sub10 = LinDigit ;
|
||||
lincat Sub100 = LinSub100 ;
|
||||
lincat Sub1000 = LinSub100 ;
|
||||
lincat Sub1000000 = { s : Str } ;
|
||||
|
||||
oper mkNum : Str -> LinDigit = \tri ->
|
||||
{ s = table {unit => tri ; teen => tri + "mbë" + "dhjetë" ; ten => tri + "dhjetë" }};
|
||||
|
||||
lin num x = {s = x.s } ;
|
||||
|
||||
lin n2 = {s = table {unit => "dy" ; teen => "dy" + "mbë" + "dhjetë" ; ten => "njëzet" }};
|
||||
lin n3 = mkNum "tre" ;
|
||||
lin n4 = {s = table {unit => "katër" ; teen => "katër" + "mbë" + "dhjetë" ; ten => "dyzet" } };
|
||||
lin n5 = mkNum "pesë" ;
|
||||
lin n6 = mkNum "gjashtë";
|
||||
lin n7 = mkNum "shtatë";
|
||||
lin n8 = mkNum "tetë";
|
||||
lin n9 = mkNum "nëntë";
|
||||
|
||||
oper mkR : Str -> LinSub100 = \n -> {s = n } ;
|
||||
|
||||
lin pot01 = { s = table {_ => "një" }};
|
||||
lin pot0 d = d ;
|
||||
lin pot110 = mkR "dhjetë" ;
|
||||
lin pot111 = mkR ("një" + "mbë" + "dhjetë") ;
|
||||
lin pot1to19 d = mkR (d.s ! teen) ;
|
||||
lin pot0as1 n = mkR (n.s ! unit) ;
|
||||
lin pot1 d = mkR (d.s ! ten) ;
|
||||
lin pot1plus d e = mkR ((d.s ! ten) ++ "e" ++ (e.s ! unit)) ;
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 d = mkR (bind (d.s ! unit) "qind") ;
|
||||
lin pot2plus d e = mkR ((bind (d.s ! unit) "qind") ++ "e" ++ e.s) ;
|
||||
lin pot2as3 n = {s = n.s };
|
||||
lin pot3 n = {s = n.s ++ "mijë" } ;
|
||||
lin pot3plus n m = {s = n.s ++ "mijë" ++ m.s} ;
|
||||
|
||||
|
||||
lincat Dig = {s : Str; n : Number} ;
|
||||
|
||||
lin IDig d = d ** {tail = T1} ;
|
||||
|
||||
IIDig d i = {
|
||||
s = d.s ++ spaceIf i.tail ++ i.s ;
|
||||
n = Pl ;
|
||||
tail = inc i.tail
|
||||
} ;
|
||||
|
||||
D_0 = mkDig "0" Pl ;
|
||||
D_1 = mkDig "1" Sg ;
|
||||
D_2 = mkDig "2" Pl ;
|
||||
D_3 = mkDig "3" Pl ;
|
||||
D_4 = mkDig "4" Pl ;
|
||||
D_5 = mkDig "5" Pl ;
|
||||
D_6 = mkDig "6" Pl ;
|
||||
D_7 = mkDig "7" Pl ;
|
||||
D_8 = mkDig "8" Pl ;
|
||||
D_9 = mkDig "9" Pl ;
|
||||
|
||||
lin PosDecimal d = d ** {hasDot=False} ;
|
||||
NegDecimal d = {s="-" ++ BIND ++ d.s; hasDot=False; n = Pl} ;
|
||||
IFrac d i = {
|
||||
s=d.s ++
|
||||
if_then_Str d.hasDot BIND (BIND++","++BIND) ++
|
||||
i.s ;
|
||||
hasDot=True;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
oper
|
||||
mkDig : Str -> Number -> Dig = \s,n -> lin Dig {s=s; n=n} ;
|
||||
|
||||
spaceIf : DTail -> Str = \t -> case t of {
|
||||
T3 => "" ;
|
||||
_ => BIND
|
||||
} ;
|
||||
|
||||
inc : DTail -> DTail = \t -> case t of {
|
||||
T1 => T2 ;
|
||||
T2 => T3 ;
|
||||
T3 => T1
|
||||
} ;
|
||||
|
||||
}
|
||||
1375
src/albanian/ParadigmsSqi.gf
Normal file
1375
src/albanian/ParadigmsSqi.gf
Normal file
File diff suppressed because it is too large
Load Diff
13
src/albanian/PhraseSqi.gf
Normal file
13
src/albanian/PhraseSqi.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
concrete PhraseSqi of Phrase = CatSqi ** open Prelude, ResSqi in {
|
||||
|
||||
lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
UttNP np = {s = np.s ! Nom} ;
|
||||
UttInterj i = i ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
|
||||
}
|
||||
261
src/albanian/ResSqi.gf
Normal file
261
src/albanian/ResSqi.gf
Normal file
@@ -0,0 +1,261 @@
|
||||
resource ResSqi = ParamX-[Tense,Past,Pres] ** open Prelude in {
|
||||
|
||||
oper Compl = {s : Str} ;
|
||||
|
||||
param Species = Indef | Def ;
|
||||
param Case = Nom | Acc | Dat | Ablat ;
|
||||
param Gender = Masc | Fem ;
|
||||
|
||||
param GenNum = GSg Gender | GPl ;
|
||||
oper Agr = {gn : GenNum; p : Person} ;
|
||||
|
||||
oper Noun = {s: Species => Case => Number => Str; g: Gender} ; -- 3978
|
||||
oper mkNoun : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> Noun =
|
||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,g ->
|
||||
{ s = table {
|
||||
Indef => table {
|
||||
Nom => table {
|
||||
Sg => f1 ;
|
||||
Pl => f2
|
||||
} ;
|
||||
Acc => table {
|
||||
Sg => f3 ;
|
||||
Pl => f4
|
||||
} ;
|
||||
Dat => table {
|
||||
Sg => f5 ;
|
||||
Pl => f6
|
||||
} ;
|
||||
Ablat => table {
|
||||
Sg => f7 ;
|
||||
Pl => f8
|
||||
}
|
||||
} ;
|
||||
Def => table {
|
||||
Nom => table {
|
||||
Sg => f9 ;
|
||||
Pl => f10
|
||||
} ;
|
||||
Acc => table {
|
||||
Sg => f11 ;
|
||||
Pl => f12
|
||||
} ;
|
||||
Dat => table {
|
||||
Sg => f13 ;
|
||||
Pl => f14
|
||||
} ;
|
||||
Ablat => table {
|
||||
Sg => f15 ;
|
||||
Pl => f16
|
||||
}
|
||||
}
|
||||
} ;
|
||||
g = g
|
||||
} ;
|
||||
|
||||
|
||||
oper Adj = {s: Case => Gender => Number => Str; clit: Bool} ; -- 462
|
||||
oper mkAdj : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Bool -> Adj =
|
||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,clit ->
|
||||
{ s = table {
|
||||
Nom => table {
|
||||
Masc => table {
|
||||
Sg => f1 ;
|
||||
Pl => f2
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => f3 ;
|
||||
Pl => f4
|
||||
}
|
||||
} ;
|
||||
Acc => table {
|
||||
Masc => table {
|
||||
Sg => f5 ;
|
||||
Pl => f6
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => f7 ;
|
||||
Pl => f8
|
||||
}
|
||||
} ;
|
||||
Dat => table {
|
||||
Masc => table {
|
||||
Sg => f9 ;
|
||||
Pl => f10
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => f11 ;
|
||||
Pl => f12
|
||||
}
|
||||
} ;
|
||||
Ablat => table {
|
||||
Masc => table {
|
||||
Sg => f13 ;
|
||||
Pl => f14
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => f15 ;
|
||||
Pl => f16
|
||||
}
|
||||
}
|
||||
} ;
|
||||
clit = clit
|
||||
} ;
|
||||
|
||||
|
||||
param Tense = Pres | Past | Imperfect | Aorist ;
|
||||
oper Verb = {Indicative: Tense => Number => Person => Str; Imperative: Number => Str; participle: Str; pres_optative: Number => Person => Str; perf_optative: Number => Person => Str; pres_admirative: Number => Person => Str; imperf_admirative: Number => Person => Str} ; -- 758
|
||||
oper mkVerb : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Verb =
|
||||
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31,f32,f33,f34,f35,f36,f37,f38,f39,f40,f41,f42,f43,f44,f45,f46,f47,f48,f49,f50,f51 ->
|
||||
{ Indicative = table {
|
||||
Pres => table {
|
||||
Sg => table {
|
||||
P1 => f1 ;
|
||||
P2 => f2 ;
|
||||
P3 => f3
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f4 ;
|
||||
P2 => f5 ;
|
||||
P3 => f6
|
||||
}
|
||||
} ;
|
||||
Past => table {
|
||||
Sg => table {
|
||||
P1 => f7 ;
|
||||
P2 => f8 ;
|
||||
P3 => f9
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f10 ;
|
||||
P2 => f11 ;
|
||||
P3 => f12
|
||||
}
|
||||
} ;
|
||||
Aorist => table {
|
||||
Sg => table {
|
||||
P1 => f13 ;
|
||||
P2 => f14 ;
|
||||
P3 => f15
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f16 ;
|
||||
P2 => f17 ;
|
||||
P3 => f18
|
||||
}
|
||||
} ;
|
||||
Imperfect => table {
|
||||
Sg => table {
|
||||
P1 => f19 ;
|
||||
P2 => f20 ;
|
||||
P3 => f21
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f22 ;
|
||||
P2 => f23 ;
|
||||
P3 => f24
|
||||
}
|
||||
}
|
||||
} ;
|
||||
Imperative = table {
|
||||
Sg => f25 ;
|
||||
Pl => f26
|
||||
} ;
|
||||
participle = f27 ;
|
||||
pres_optative = table {
|
||||
Sg => table {
|
||||
P1 => f28 ;
|
||||
P2 => f29 ;
|
||||
P3 => f30
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f31 ;
|
||||
P2 => f32 ;
|
||||
P3 => f33
|
||||
}
|
||||
} ;
|
||||
perf_optative = table {
|
||||
Sg => table {
|
||||
P1 => f34 ;
|
||||
P2 => f35 ;
|
||||
P3 => f36
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f37 ;
|
||||
P2 => f38 ;
|
||||
P3 => f39
|
||||
}
|
||||
} ;
|
||||
pres_admirative = table {
|
||||
Sg => table {
|
||||
P1 => f40 ;
|
||||
P2 => f41 ;
|
||||
P3 => f42
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f43 ;
|
||||
P2 => f44 ;
|
||||
P3 => f45
|
||||
}
|
||||
} ;
|
||||
imperf_admirative = table {
|
||||
Sg => table {
|
||||
P1 => f46 ;
|
||||
P2 => f47 ;
|
||||
P3 => f48
|
||||
} ;
|
||||
Pl => table {
|
||||
P1 => f49 ;
|
||||
P2 => f50 ;
|
||||
P3 => f51
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
oper link_clitic : Species => Case => Gender => Number => Str =
|
||||
table {
|
||||
Indef => table {
|
||||
Nom => table {
|
||||
Masc => table {
|
||||
Sg => "i" ;
|
||||
Pl => "të"
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => "e" ;
|
||||
Pl => "të"
|
||||
}
|
||||
} ;
|
||||
_ => \\_,_ => "të"
|
||||
} ;
|
||||
Def => table {
|
||||
Nom => table {
|
||||
Masc => table {
|
||||
Sg => "i" ;
|
||||
Pl => "e"
|
||||
} ;
|
||||
Fem => table {
|
||||
Sg => "e" ;
|
||||
Pl => "e"
|
||||
}
|
||||
} ;
|
||||
Acc => \\_,_ => "e" ;
|
||||
_ => table {
|
||||
Masc => \\_ => "të" ;
|
||||
Fem => table {
|
||||
Sg => "së" ;
|
||||
Pl => "të"
|
||||
}
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
oper genNum : Gender -> Number -> GenNum = \g,n ->
|
||||
case n of {
|
||||
Sg => GSg g ;
|
||||
Pl => GPl
|
||||
} ;
|
||||
|
||||
agrgP3 : Gender -> Number -> Agr =
|
||||
\g,n -> {gn=genNum g n; p=P3} ;
|
||||
|
||||
}
|
||||
19
src/albanian/StructuralSqi.gf
Normal file
19
src/albanian/StructuralSqi.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
concrete StructuralSqi of Structural = CatSqi ** open ResSqi, ParadigmsSqi in {
|
||||
|
||||
lin i_Pron = mkPron "unë" "mua" "mua" "meje" "më" "më" (GSg Masc) P1 ;
|
||||
lin youSg_Pron = mkPron "ti" "ty" "ty" "teje" "të" "të" (GSg Masc) P2 ;
|
||||
lin he_Pron = mkPron "ai" "atë" "atij" "atij" "e" "i" (GSg Masc) P3 ;
|
||||
lin she_Pron = mkPron "ajo" "atë" "asaj" "asaj" "e" "i" (GSg Fem) P3 ;
|
||||
lin it_Pron = mkPron "ai" "atë" "atij" "atij" "e" "i" (GSg Masc) P3 ;
|
||||
lin we_Pron = mkPron "ne" "ne" "neve" "nesh" "na" "na" GPl P1 ;
|
||||
lin youPl_Pron = mkPron "ju" "ju" "juve" "jush" "ju" "ju" GPl P2 ;
|
||||
lin they_Pron = mkPron "ata" "ata" "atyre" "atyre" "i" "u" GPl P3 ;
|
||||
lin this_Quant = mkQuant "ky" "këta" "kjo" "këto"
|
||||
"këtë" "këtyre" "këtë" "këtyre"
|
||||
"këtij" "këtyre" "kësaj" "këtyre"
|
||||
"këtij" "këtyre" "kësaj" "këtyre" ;
|
||||
lin that_Quant = mkQuant "ai" "ata" "ajo" "ato"
|
||||
"atë" "ata" "atë" "ato"
|
||||
"atij" "atyre" "asaj" "atyre"
|
||||
"atij" "atyre" "asaj" "atyre" ;
|
||||
}
|
||||
@@ -995,8 +995,8 @@ pronNP : (N,A,G,D : Str) -> PerNumGen -> NP = \N,A,G,D,png-> {
|
||||
{
|
||||
s = \\c =>case c of
|
||||
{
|
||||
Gen|Dat => affix!c + word;
|
||||
_ => word + affix!c
|
||||
Gen|Dat => affix!c ++ Predef.BIND ++ word;
|
||||
_ => word ++ Predef.BIND ++ affix!c
|
||||
};
|
||||
a = {png = Per3 n Masc ; isPron = False };
|
||||
lock_NP = <>
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
--# -path=.:../danish:../scandinavian:../common:../abstract:../prelude
|
||||
|
||||
resource TryDan = SyntaxDan, LexiconDan, ParadigmsDan - [mkAdv] ;
|
||||
resource TryDan = SyntaxDan-[mkAdN], LexiconDan, ParadigmsDan - [mkAdv,mkAdN] **
|
||||
open (P = ParadigmsDan) in {
|
||||
|
||||
oper
|
||||
mkAdv = overload SyntaxDan {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxDan.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
--# -path=.:../greek:../common:../abstract:../prelude
|
||||
|
||||
resource TryGre = SyntaxGre, LexiconGre, ParadigmsGre ;
|
||||
|
||||
{-
|
||||
-[mkAdv, mkDet,mkQuant]**
|
||||
resource TryGre = SyntaxGre-[mkAdN,mkVoc], LexiconGre, ParadigmsGre - [mkAdN,mkAdv,mkVoc] **
|
||||
open (P = ParadigmsGre) in {
|
||||
|
||||
oper
|
||||
|
||||
oper
|
||||
mkAdv = overload SyntaxGre {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
}
|
||||
mkVoc = overload {
|
||||
mkVoc : NP -> Voc = SyntaxGre.mkVoc ;
|
||||
mkVoc : Str -> Voc = P.mkVoc ;
|
||||
} ;
|
||||
|
||||
-}
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxGre.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
--# -path=.:../hungarian:../common:../abstract:../prelude
|
||||
|
||||
resource TryHun = SyntaxHun, LexiconHun, ParadigmsHun - [mkAdv] ;
|
||||
resource TryHun = SyntaxHun-[mkAdN], LexiconHun, ParadigmsHun - [mkAdv,mkAdN] **
|
||||
open (P = ParadigmsHun) in {
|
||||
|
||||
oper
|
||||
mkAdv = overload SyntaxHun {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxHun.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
--# -path=.:../icelandic:../common:../abstract:../prelude
|
||||
|
||||
resource TryIce = SyntaxIce, LexiconIce, ParadigmsIce - [mkAdv,mkAdN,mkOrd] ;
|
||||
resource TryIce = SyntaxIce-[mkVoc], LexiconIce, ParadigmsIce - [mkAdv,mkAdN,mkOrd,mkVoc] **
|
||||
open (P = ParadigmsIce) in {
|
||||
|
||||
oper
|
||||
mkVoc = overload {
|
||||
mkVoc : NP -> Voc = SyntaxIce.mkVoc ;
|
||||
mkVoc : Str -> Voc = P.mkVoc ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
--# -path=.:../nynorsk:../scandinavian:../common:../abstract:../prelude
|
||||
|
||||
resource TryNno = SyntaxNno, LexiconNno, ParadigmsNno - [mkAdv] ;
|
||||
resource TryNno = SyntaxNno-[mkAdN], LexiconNno, ParadigmsNno - [mkAdv,mkAdN] **
|
||||
open (P = ParadigmsNno) in {
|
||||
|
||||
oper
|
||||
mkAdv = overload SyntaxNno {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxNno.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
--# -path=.:../norwegian:../scandinavian:../common:../abstract:../prelude
|
||||
|
||||
resource TryNor = SyntaxNor, LexiconNor, ParadigmsNor - [mkAdv] ;
|
||||
resource TryNor = SyntaxNor-[mkAdN], LexiconNor, ParadigmsNor - [mkAdv,mkAdN] **
|
||||
open (P = ParadigmsNor) in {
|
||||
|
||||
oper
|
||||
mkAdv = overload SyntaxNor {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxNor.mkAdN ;
|
||||
mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
||||
Card = ResAra.NumOrdCard ;
|
||||
Predet = ResAra.Predet ;
|
||||
|
||||
Det = ResAra.Det ;
|
||||
DAP, Det = ResAra.Det ;
|
||||
-- {s : Species => Gender => Case => Str ;
|
||||
-- d : State; n : Size; isNum : Bool } ;
|
||||
Quant = ResAra.Quant ;
|
||||
@@ -92,7 +92,8 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
||||
N = ResAra.Noun ;
|
||||
N2 = ResAra.Noun2 ;
|
||||
N3 = ResAra.Noun3 ;
|
||||
GN, SN, LN, PN = {s : Case => Str; g : Gender; h : Species} ;
|
||||
GN, SN, PN = {s : Case => Str; g : Gender; h : Species} ;
|
||||
LN = ResAra.NP ;
|
||||
|
||||
linref
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
-- documenting Arabic inflection
|
||||
---- so far with English titles and tags, AR 2024-01-31
|
||||
@@ -32,7 +32,7 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionPN, InflectionLN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN
|
||||
InflectionPN, InflectionGN, InflectionSN = \pn -> { ---- TODO: special for LN, GN, SN
|
||||
t = "pn" ;
|
||||
s1 = heading1 ("Proper Name" ++
|
||||
case pn.g of {
|
||||
|
||||
@@ -8,7 +8,7 @@ concrete ExtendAra of Extend =
|
||||
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
|
||||
EmbedSSlash, AdjAsNP, GerundNP,
|
||||
PassVPSlash, ---- bogus implementation, see below
|
||||
CompoundN
|
||||
CompoundN, UseDAP, UseDAPMasc, UseDAPFem
|
||||
]
|
||||
with (Grammar=GrammarAra)
|
||||
** open
|
||||
@@ -105,4 +105,31 @@ lin
|
||||
s2 = \\n, s, c => b.s2 ! n ! Const ! c ++ a.s2 ! n ! s ! c
|
||||
} ;
|
||||
|
||||
lin UseDAP dap = case dap.isEmpty of {
|
||||
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
|
||||
<Def,One> => it_Pron ;
|
||||
<Def,_> => they_Pron ;
|
||||
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
|
||||
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
|
||||
} ;
|
||||
False => emptyNP ** {s = dap.s ! NoHum ! Masc} } ;
|
||||
|
||||
lin UseDAPMasc dap = case dap.isEmpty of {
|
||||
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
|
||||
<Def,One> => it_Pron ;
|
||||
<Def,_> => theyMasc_Pron ;
|
||||
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Masc} ;
|
||||
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Masc}
|
||||
} ;
|
||||
False => emptyNP ** {s = dap.s ! NoHum ! Masc} } ;
|
||||
|
||||
lin UseDAPFem dap = case dap.isEmpty of {
|
||||
True => case <dap.d,dap.n> of { -- if the s field is empty, make up some other determiner
|
||||
<Def,One> => it_Pron ;
|
||||
<Def,_> => theyFem_Pron ;
|
||||
<Indef,One> => emptyNP ** {s = someSg_Det.s ! NoHum ! Fem} ;
|
||||
_ => emptyNP ** {s = somePl_Det.s ! NoHum ! Fem}
|
||||
} ;
|
||||
False => emptyNP ** {s = dap.s ! NoHum ! Fem} } ;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,11 +9,10 @@ lin FullName gn sn = emptyNP ** {
|
||||
a = {pgn = Per3 gn.g Sg ; isPron = False} ;
|
||||
} ;
|
||||
|
||||
lin UseLN pn = emptyNP ** {
|
||||
s = pn.s ;
|
||||
a = {pgn = Per3 pn.g Sg ; isPron = False} ;
|
||||
} ;
|
||||
lin UseLN ln = ln ;
|
||||
|
||||
lin InLN n = A.PrepNP S.in_Prep (N.UsePN n) ; ---- TODO: alternative prepositions
|
||||
lin PlainLN ln = ln ;
|
||||
|
||||
lin InLN n = A.PrepNP S.in_Prep n ; ---- TODO: alternative prepositions
|
||||
|
||||
}
|
||||
|
||||
@@ -237,6 +237,11 @@ lin
|
||||
}
|
||||
};
|
||||
|
||||
-- : CN -> NP -> CN ; -- glass of wine
|
||||
--PartNP
|
||||
DetDAP d = d ;
|
||||
|
||||
QuantityNP n m = emptyNP ** {
|
||||
s = \\c => preOrPost m.isPre m.s n.s ;
|
||||
a = { pgn = agrP3 NoHum Masc (sizeToNumber n.n);
|
||||
isPron = False }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ resource ParadigmsAra = open
|
||||
ResAra,
|
||||
OrthoAra,
|
||||
(A=AdjectiveAra),
|
||||
(N=NounAra),
|
||||
CatAra
|
||||
in {
|
||||
|
||||
@@ -97,12 +98,17 @@ resource ParadigmsAra = open
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN -- Predictable LN from a Str: fem hum if ends in ة, otherwise masc hum.
|
||||
= \s -> lin LN (smartPN s) ;
|
||||
= \s -> lin LN (N.UsePN (smartPN s)) ;
|
||||
mkLN : Str -> Gender -> LN
|
||||
= \s, g -> lin LN (N.UsePN (smartPN s ** {g = g})) ;
|
||||
mkLN : N -> LN -- Make a LN out of N. The LN is in construct state.
|
||||
= \n -> lin LN (n ** {
|
||||
s = \\c => n.s ! Sg ! Const ! c
|
||||
++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL
|
||||
}) ;
|
||||
= \n -> lin LN (N.MassNP (N.UseN n)) ;
|
||||
----(n ** { ---- cannot get this to compile AR 2024-04-18
|
||||
---- s = \\c => n.s ! Sg ! Const ! c
|
||||
---- ++ n.s2 ! Sg ! Def ! c -- NB this hack works for idaafa constructions (if you used mkN : N -> N -> N), but wrong for mkN : N -> A -> N. /IL
|
||||
---- }))) ;
|
||||
mkLN : NP -> LN
|
||||
= \np -> np ;
|
||||
} ;
|
||||
|
||||
--3 Relational nouns
|
||||
@@ -206,6 +212,10 @@ resource ParadigmsAra = open
|
||||
mkConj : Str -> Str -> Number -> Conj ; -- either, or, sg
|
||||
} ;
|
||||
|
||||
--2 Measurement Units
|
||||
|
||||
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||
|
||||
--2 Verbs
|
||||
|
||||
-- Overloaded operations
|
||||
|
||||
@@ -71,4 +71,5 @@ concrete SentenceAra of Sentence = CatAra ** open
|
||||
UseSlash t p cls = UseCl t p (complClSlash cls) ;
|
||||
|
||||
AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
|
||||
ExtAdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ param
|
||||
|
||||
oper
|
||||
-- AGRE = {g : Gender ; n : Number ; p : Person} ;
|
||||
Agre : Type = {g : Gender ; n : Number ; p : Person} ;
|
||||
Agre : PType = {g : Gender ; n : Number ; p : Person} ;
|
||||
agre : Gender -> Number -> Person -> Agre = \g,n,p -> {g = g ; n = n ; p = p} ;
|
||||
|
||||
agrFeatures : Agr -> Agre = \a -> case a of {Ag g n p => {g = g ; n = n ; p = p}} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--# -coding=utf8
|
||||
concrete CatBul of Cat = CommonX - [Temp,Tense,IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in {
|
||||
concrete CatBul of Cat = CommonX - [Temp,Tense,TTAnt,IAdv,AdV] ** open ResBul, Prelude, Predef, (R = ParamX) in {
|
||||
|
||||
lincat
|
||||
-- Tensed/Untensed
|
||||
|
||||
@@ -32,7 +32,6 @@ concrete ConjunctionBul of Conjunction =
|
||||
|
||||
ConjAP conj ss = {
|
||||
s = \\aform,p => linCoord []!conj.sep ++ ss.s!aform!p!conj.sep ++ conj.s ++ ss.s!aform!p!4;
|
||||
adv = ss.adv!conj.conj ++ conj.s ++ ss.adv!4;
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@ oper
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
mkAS v = v ** {lock_A = <>} ;
|
||||
mkAS v = v ;
|
||||
|
||||
mkA2S : A -> Prep -> A2S ;
|
||||
mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p ;
|
||||
|
||||
mkAV : A -> AV ;
|
||||
mkAV v = v ** {lock_A = <>} ;
|
||||
mkAV v = v ;
|
||||
|
||||
mkA2V : A -> Prep -> A2V ;
|
||||
mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
|
||||
@@ -75,7 +75,6 @@ oper
|
||||
compoundV : V -> Str -> V ;
|
||||
compoundV v adv = {
|
||||
s = \\asp,vform => v.s ! asp ! vform ++ adv ;
|
||||
n = \\nform => v.n ! nform ++ adv ;
|
||||
vtype = VNormal;
|
||||
lock_V=<>
|
||||
} ;
|
||||
@@ -105,7 +104,7 @@ oper
|
||||
-- the first one or both can be absent.
|
||||
|
||||
mkV3 : V -> Prep -> Prep -> V3 ; -- speak, with, about
|
||||
mkV3 v p q = {s = v.s; s1 = v.s1; c2 = p; c3 = q; vtype = v.vtype; lock_V3 = <>} ;
|
||||
mkV3 v p q = {s = v.s; c2 = p; c3 = q; vtype = v.vtype; lock_V3 = <>} ;
|
||||
|
||||
dirV3 : V -> Prep -> V3 ; -- give,_,to
|
||||
dirV3 v p = mkV3 v noPrep p ;
|
||||
@@ -189,9 +188,9 @@ oper
|
||||
|
||||
compoundN = overload {
|
||||
compoundN : Str -> N -> N
|
||||
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ;
|
||||
= \s,n -> {s = \\nform => s ++ n.s ! nform ; rel = \\aform => s ++ n.rel ! aform; relType = AdvMod; g=n.g ; lock_N = <>} ;
|
||||
compoundN : N -> Str -> N
|
||||
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relType = AdvMod; g=n.g ; anim=n.anim ; lock_N = <>} ;
|
||||
= \n,s -> {s = \\nform => n.s ! nform ++ s; rel = \\aform => n.rel ! aform ++ s; relType = AdvMod; g=n.g ; lock_N = <>} ;
|
||||
compoundN : N -> N -> N
|
||||
= \n1,n2 -> lin N
|
||||
{s = table {
|
||||
|
||||
@@ -187,7 +187,7 @@ oper
|
||||
in {s = mkNoun (v0+"е"+v1)
|
||||
(v0+v1+"и")
|
||||
(v0+"е"+v1+"а")
|
||||
(v0+"е"+v1+"е")
|
||||
(v0+v1+"ьо")
|
||||
g ;
|
||||
rel = \\_ => base ; relType = Pref ;
|
||||
g = g ;
|
||||
|
||||
@@ -70,8 +70,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
|
||||
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q
|
||||
} ;
|
||||
UseRCl t p cl = {
|
||||
s = \\agr => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! agr ;
|
||||
role = cl.role
|
||||
s = \\agr => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! agr
|
||||
} ;
|
||||
UseSlash t p cl = {
|
||||
s = \\agr => t.s ++ p.s ++ cl.s ! agr ! t.t ! t.a ! p.p ! Main ;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in {
|
||||
concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TTAnt,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in {
|
||||
|
||||
lin
|
||||
TTAnt t a = {s = a.s ++ t.s ; a = a.a ; t = t.t} ;
|
||||
TPres = {s = []} ** {t = VPresent} ;
|
||||
TPast = {s = []} ** {t = VPastImperfect} ; --# notpresent
|
||||
TFut = {s = []} ** {t = VFut} ; --# notpresent
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
--# -path=alltenses:../common:../abstract:../romance
|
||||
concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
||||
-- [
|
||||
-- ]
|
||||
-- [
|
||||
|
||||
|
||||
-- ]
|
||||
-- don't forget to put the names of your own
|
||||
-- definitions here
|
||||
with
|
||||
@@ -15,4 +17,6 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
|
||||
ParadigmsCat in {
|
||||
-- put your own definitions here
|
||||
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
@@ -42,14 +42,14 @@ flags
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
Gender : PType ;
|
||||
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
|
||||
Number : Type ;
|
||||
Number : PType ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
@@ -155,6 +155,8 @@ oper
|
||||
= \s,at -> lin Adv {s = word s ; advType = at ; hasDe = advTypeHasDe at} ;
|
||||
mkAdv : Adv -> AdvType -> Adv -- To fix the AdvType in an Adv produced by SyntaxChi.mkAdv
|
||||
= \adv,at -> adv ** {advType = at ; hasDe = advTypeHasDe at} ;
|
||||
mkAdv : Str -> AdvType -> Bool -> Adv
|
||||
= \s,at,hasDe -> lin Adv {s = word s ; advType = at ; hasDe = hasDe} ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -137,6 +137,8 @@ lin
|
||||
ExistNPQS t p np = UseQCl t p (QuestCl (ExistNP np)) ;
|
||||
ExistIPQS t p np = UseQCl t p (ExistIP np) ;
|
||||
|
||||
SubjunctRelCN cn rs = RelCN cn rs ; -- no difference from indicative
|
||||
|
||||
lincat
|
||||
X = {s : Str} ;
|
||||
|
||||
|
||||
@@ -6,4 +6,6 @@ lin
|
||||
s = prep.s ++ np.prep ! prep.c
|
||||
} ;
|
||||
AdnCAdv a = a ;
|
||||
|
||||
SubjS subj s = {s = subj.s ++ s.s} ;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ concrete CatHrv of Cat =
|
||||
|
||||
RS = {s : Agr => Str} ;
|
||||
RCl = {subj,clit,compl : Agr => Str ; verb : VerbForms} ; ---- RAgr with composite RP
|
||||
RP = AdjForms ;
|
||||
RP = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
|
||||
VP = {verb : VerbForms ; clit,compl : Agr => Str} ; ---- more fields probably needed
|
||||
VPSlash = {verb : VerbForms ; clit,compl : Agr => Str ; c : ComplementCase} ; ----
|
||||
@@ -33,10 +33,12 @@ concrete CatHrv of Cat =
|
||||
AdA = {s : Str} ;
|
||||
|
||||
N = ResHrv.NounForms ** {g : Gender} ;
|
||||
N2 = ResHrv.NounForms ** {g : Gender ; c : ComplementCase} ;
|
||||
CN = ResHrv.Noun ; -- {s : Number => Case => Str ; g : Gender}
|
||||
NP = {s,clit,prep : Case => Str ; a : Agr ; hasClit : Bool} ; -- clit,prep differ for pronouns
|
||||
PN = {s : Case => Str ; g : Gender} ;
|
||||
Det = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ; -- can contain a numeral, therefore NumSize
|
||||
Predet = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
Quant = {s : Gender => Number => Case => Str} ; -- same as AP
|
||||
Num = Determiner ;
|
||||
Card = Determiner ; -- {s : Gender => Case => Str ; size : NumSize} ;
|
||||
|
||||
@@ -3,6 +3,7 @@ concrete ExtendHrv of Extend = CatHrv **
|
||||
--- ReflPossPron
|
||||
CardCNCard
|
||||
---- constant not found (yet)
|
||||
,GenRP
|
||||
,youPolFem_Pron
|
||||
,UttVPShort
|
||||
,UttAccIP
|
||||
@@ -32,14 +33,19 @@ concrete ExtendHrv of Extend = CatHrv **
|
||||
with (Grammar = GrammarHrv)
|
||||
**
|
||||
open
|
||||
ResHrv
|
||||
ResHrv, ParadigmsHrv
|
||||
in {
|
||||
|
||||
---lin ReflPossPron = justDemPronFormsAdjective reflPossessivePron ;
|
||||
|
||||
lin CardCNCard card cn = {
|
||||
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
|
||||
size = NS_20_
|
||||
} ;
|
||||
lin
|
||||
CardCNCard card cn = {
|
||||
s = \\g,c => card.s ! g ! c ++ numSizeForm cn.s card.size c ;
|
||||
size = NS_20_
|
||||
} ;
|
||||
|
||||
GenRP num cn = {
|
||||
s = \\g, n, c => (adjFormsAdjective (mkA "čiji").posit).s ! g ! n ! c ++ num.s ! cn.g ! c ++ cn.s ! n ! c
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,4 +10,13 @@ lin
|
||||
|
||||
ExistNPAdv np adv = ExistNP np ** {compl = adv.s} ;
|
||||
|
||||
ImpersCl vp =
|
||||
let npa = Ag Neutr Sg P3 in {
|
||||
subj = "" ;
|
||||
verb = vp.verb ;
|
||||
clit = vp.clit ! npa ;
|
||||
compl = vp.compl ! npa ;
|
||||
a = npa ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,12 +6,10 @@ oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ;
|
||||
oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ;
|
||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
||||
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||
oper CompCN : CN -> Comp = notYet "CompCN" ;
|
||||
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
||||
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||
@@ -34,14 +32,12 @@ oper IdetIP : IDet -> IP = notYet "IdetIP" ;
|
||||
oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ;
|
||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||
oper ImpVP : VP -> Imp = notYet "ImpVP" ;
|
||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
||||
oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ;
|
||||
oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ;
|
||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||
oper PassV2 : V2 -> VP = notYet "PassV2" ;
|
||||
oper PositAdvAdj : A -> Adv = notYet "PositAdvAdj" ;
|
||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||
oper PredetNP : Predet -> NP -> NP = notYet "PredetNP" ;
|
||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||
oper QuestIAdv : IAdv -> Cl -> QCl = notYet "QuestIAdv" ;
|
||||
@@ -66,7 +62,6 @@ oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
|
||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||
oper TCond : Tense = notYet "TCond" ;
|
||||
oper TFut : Tense = notYet "TFut" ;
|
||||
oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
|
||||
|
||||
@@ -62,6 +62,15 @@ lin
|
||||
s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! cn.g ! n ! c) (cn.s ! n ! c) ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
PredetNP predet np =
|
||||
case np.a of {
|
||||
Ag g n _ => {
|
||||
s,clit,prep = \\c => predet.s ! g ! n ! c ++ np.s ! c ;
|
||||
a = np.a ;
|
||||
hasClit = False
|
||||
}
|
||||
} ;
|
||||
|
||||
RelCN cn rs = {
|
||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! Ag cn.g n P3 ;
|
||||
|
||||
@@ -6,13 +6,12 @@ concrete RelativeHrv of Relative = CatHrv ** open
|
||||
lin
|
||||
RelVP rp vp = vp ** {
|
||||
subj =
|
||||
let rel = (adjFormsAdjective rp).s
|
||||
let rel = rp.s
|
||||
in \\a => case a of {
|
||||
Ag g n _ => rel ! g ! n ! Nom
|
||||
}
|
||||
} ;
|
||||
|
||||
IdRP = (mkA "koji").posit ;
|
||||
|
||||
IdRP = adjFormsAdjective (mkA "koji").posit ;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,5 +28,9 @@ lin
|
||||
pol.s ++ verbAgr rcl.verb a CTPres ++
|
||||
rcl.compl ! a ;
|
||||
} ; ---- TODO tenses
|
||||
|
||||
|
||||
AdvS adv s = {s = adv.s ++ s.s} ;
|
||||
ExtAdvS adv s = {s = adv.s ++ Predef.BIND ++ "," ++ s.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,4 +31,17 @@ lin
|
||||
|
||||
somewhere_Adv = mkAdv "negdje" ;
|
||||
|
||||
if_Subj = lin Subj {s = "ako"} ;
|
||||
every_Det = {s = \\g, c => (adjFormsAdjective (velikA "svaki")).s ! g ! Sg ! c ; size = NS_1} ;
|
||||
all_Predet = adjFormsAdjective (velikA "svi") ;
|
||||
that_Subj = lin Subj {s = "da"} ;
|
||||
someSg_Det = {s = \\g, c => (adjFormsAdjective (velikA "neki")).s ! g ! Sg ! c ; size = NS_1} ;
|
||||
at_least_AdN = lin AdN {s = "najmanje"} ;
|
||||
part_Prep = mkPrep genitive ;
|
||||
|
||||
|
||||
-- ExtAdvS
|
||||
-- mkN2
|
||||
-- mkA2
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,12 @@ lin
|
||||
s = \\a_ => np.s ! Nom ;
|
||||
} ;
|
||||
|
||||
CompCN cn = {
|
||||
s = \\a => case a of {
|
||||
Ag _ n _ => cn.s ! n ! Nom
|
||||
} ;
|
||||
} ;
|
||||
|
||||
CompAdv adv = {
|
||||
s = \\a_ => adv.s
|
||||
} ;
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
concrete AllDan of AllDanAbs =
|
||||
LangDan,
|
||||
IrregDan - [fly_V],
|
||||
ExtraDan
|
||||
ExtendDan
|
||||
** {} ;
|
||||
|
||||
282
src/danish/DocumentationDan.gf
Normal file
282
src/danish/DocumentationDan.gf
Normal file
@@ -0,0 +1,282 @@
|
||||
concrete DocumentationDan of Documentation = CatDan ** open
|
||||
ResDan,
|
||||
CommonScand,
|
||||
HTML
|
||||
in {
|
||||
flags coding=utf8 ;
|
||||
lincat
|
||||
Inflection = {t : Str; s1,s2 : Str} ;
|
||||
Definition = {s : Str} ;
|
||||
Document = {s : Str} ;
|
||||
Tag = {s : Str} ;
|
||||
|
||||
{-
|
||||
-} --# notpresent
|
||||
|
||||
|
||||
lin
|
||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||
t = "s" ;
|
||||
s1 = heading1 ("Substantiv" ++ case noun.g of {
|
||||
Utr => "(utrum)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
|
||||
tr (intagAttr "th" "rowspan=2" "nom" ++
|
||||
th "sg" ++ td (noun.s ! Sg ! Indef ! Nom) ++ td (noun.s ! Sg ! Def ! Nom)) ++
|
||||
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Nom) ++ td (noun.s ! Pl ! Def ! Nom)) ++
|
||||
tr (intagAttr "th" "rowspan=2" "gen" ++
|
||||
th "sg" ++ td (noun.s ! Sg ! Indef ! Gen) ++ td (noun.s ! Sg ! Def ! Gen)) ++
|
||||
tr (th "pl" ++ td (noun.s ! Pl ! Indef ! Gen) ++ td (noun.s ! Pl ! Def ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionLN = \n -> {
|
||||
t = "nm" ;
|
||||
s1 = heading1 ("Platsnamn" ++ case n.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (n.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (n.s ! Gen))
|
||||
) ;
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
t = "fnm" ;
|
||||
s1 = heading1 ("Förnamn" ++ case pn.g of {
|
||||
Male => "(man)" ;
|
||||
Female => "(kvinna)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (pn.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (pn.s ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionSN = \pn -> {
|
||||
t = "enm" ;
|
||||
s1 = heading1 "Efternamn" ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (pn.s ! Male ! Nom)) ++
|
||||
tr (th "gen" ++ td (pn.s ! Male ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \adj -> {
|
||||
t = "a" ;
|
||||
s1 = heading1 "Adjektiv" ;
|
||||
s2 = frameTable (
|
||||
tr (intagAttr "th" "colspan=5" "nominativ") ++
|
||||
tr (intagAttr "th" "colspan=2" "posit" ++
|
||||
th "posit" ++
|
||||
th "kompar" ++
|
||||
th "superl") ++
|
||||
caseInfl Nom ++
|
||||
tr (intagAttr "th" "colspan=5" "genitiv") ++
|
||||
caseInfl Nom
|
||||
) ++
|
||||
heading1 ("Adverb") ++
|
||||
paragraph (adj.s ! AAdv) ;
|
||||
} where {
|
||||
caseInfl : Case -> Str = \c ->
|
||||
tr (intagAttr "th" "rowspan=3" "obest" ++
|
||||
th "utr" ++
|
||||
td (adj.s ! (AF (APosit (Strong (GSg Utr))) c)) ++
|
||||
intagAttr "td" "rowspan=5" (adj.s ! (AF ACompar c)) ++
|
||||
intagAttr "td" "rowspan=3" (adj.s ! (AF (ASuperl SupStrong) c))) ++
|
||||
tr (th "neut" ++
|
||||
td (adj.s ! (AF (APosit (Strong (GSg Neutr))) c))) ++
|
||||
tr (th "pl" ++
|
||||
td (adj.s ! (AF (APosit (Strong GPl)) c))) ++
|
||||
tr (intagAttr "th" "rowspan=2" "best" ++
|
||||
th "sg" ++
|
||||
td (adj.s ! (AF (APosit (Weak Sg)) c)) ++
|
||||
intagAttr "td" "rowspan=2" (adj.s ! (AF (ASuperl SupWeak) c))) ++
|
||||
tr (th "pl" ++
|
||||
td (adj.s ! (AF (APosit (Weak Pl)) c))) ;
|
||||
} ;
|
||||
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "adv" ;
|
||||
s1 = heading1 "Adverb" ;
|
||||
s2 = paragraph adv.s
|
||||
} ;
|
||||
|
||||
InflectionPrep p = {
|
||||
t = "prep" ;
|
||||
s1 = heading1 "Preposition" ;
|
||||
s2 = paragraph p.s
|
||||
} ;
|
||||
|
||||
InflectionV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part);
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++ v.c2.s ++
|
||||
pp "objekt") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV3 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
v.c2.s ++ pp "arg1" ++
|
||||
v.c3.s ++ pp "arg2") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2V v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
v.c2.s ++ pp "objekt" ++
|
||||
v.c3.s ++ pp "verb") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2S v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
v.c2.s ++ pp "objekt" ++
|
||||
conjThat ++ pp "mening") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2Q v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
v.c2.s ++ pp "objekt" ++
|
||||
pp "fråga") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2A v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
v.c2.s ++ pp "objekt" ++
|
||||
pp "adjektiv") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
pp "verb") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVS v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
conjThat ++ pp "mening") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVQ v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
pp "fråga") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVA v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Verb" ++
|
||||
paragraph (pp "subjekt" ++
|
||||
v.s ! VI (VInfin Act) ++ v.part ++
|
||||
pp "adjektiv") ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
lin
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Definition:</b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Definition:</b>"++t.s++d.s++"</p><p><b>Exempel:</b>"++e.s++"</p>"};
|
||||
|
||||
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ paragraph e.s} ; -- explanation appended in a new paragraph
|
||||
MkTag i = {s = i.t} ;
|
||||
|
||||
oper
|
||||
inflVerb : Verb -> Str = \verb ->
|
||||
frameTable (
|
||||
tr (th "" ++ th "active" ++ th "passive") ++
|
||||
tr (th "infitiv" ++ td (verb.s ! VI (VInfin Act)) ++ td (verb.s ! VI (VInfin Pass))) ++
|
||||
tr (th "presens" ++ td (verb.s ! VF (VPres Act)) ++ td (verb.s ! VF (VPres Pass))) ++
|
||||
tr (th "preteritum" ++ td (verb.s ! VF (VPret Act)) ++ td (verb.s ! VF (VPret Pass))) ++
|
||||
tr (th "supinum" ++ td (verb.s ! VI (VSupin Act)) ++ td (verb.s ! VI (VSupin Pass))) ++
|
||||
tr (th "imperativ" ++ td (verb.s ! VF (VImper Act)) ++ td (verb.s ! VF (VImper Pass)))
|
||||
) ++
|
||||
heading2 "Particip Presens" ++
|
||||
frameTable (
|
||||
tr (intagAttr "th" "colspan=2" "" ++ th "obest" ++ th "best") ++
|
||||
tr (intagAttr "th" "rowspan=2" "nom" ++
|
||||
th "sg" ++
|
||||
td (verb.s ! VI (VPtPres Sg Indef Nom)) ++
|
||||
td (verb.s ! VI (VPtPres Sg Def Nom))) ++
|
||||
tr (th "pl" ++
|
||||
td (verb.s ! VI (VPtPres Pl Indef Nom)) ++
|
||||
td (verb.s ! VI (VPtPres Pl Def Nom))) ++
|
||||
tr (intagAttr "th" "rowspan=2" "gen" ++
|
||||
th "sg" ++
|
||||
td (verb.s ! VI (VPtPres Sg Indef Gen)) ++
|
||||
td (verb.s ! VI (VPtPres Sg Def Gen))) ++
|
||||
tr (th "pl" ++
|
||||
td (verb.s ! VI (VPtPres Pl Indef Gen)) ++
|
||||
td (verb.s ! VI (VPtPres Pl Def Gen)))
|
||||
) ++
|
||||
heading2 "Particip Perfekt" ++
|
||||
frameTable (
|
||||
tr (intagAttr "th" "colspan=2" "" ++
|
||||
th "nom" ++
|
||||
th "gen") ++
|
||||
tr (intagAttr "th" "rowspan=3" "obest" ++
|
||||
th "utr" ++
|
||||
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Nom)) ++
|
||||
td (verb.s ! VI (VPtPret (Strong (GSg Utr)) Gen))) ++
|
||||
tr (th "neut" ++
|
||||
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Nom)) ++
|
||||
td (verb.s ! VI (VPtPret (Strong (GSg Neutr)) Gen))) ++
|
||||
tr (th "pl" ++
|
||||
td (verb.s ! VI (VPtPret (Strong GPl) Nom)) ++
|
||||
td (verb.s ! VI (VPtPret (Strong GPl) Gen))) ++
|
||||
tr (intagAttr "th" "rowspan=2" "best" ++
|
||||
th "sg" ++
|
||||
td (verb.s ! VI (VPtPret (Weak Sg) Nom)) ++
|
||||
td (verb.s ! VI (VPtPret (Weak Sg) Gen))) ++
|
||||
tr (th "pl" ++
|
||||
td (verb.s ! VI (VPtPret (Weak Pl) Nom)) ++
|
||||
td (verb.s ! VI (VPtPret (Weak Pl) Gen)))
|
||||
) ;
|
||||
|
||||
pp : Str -> Str = \s -> "<"+s+">";
|
||||
|
||||
{- --# notpresent
|
||||
-}
|
||||
|
||||
}
|
||||
26
src/danish/ExtendDan.gf
Normal file
26
src/danish/ExtendDan.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||
concrete ExtendDan of Extend = CatDan **
|
||||
ExtendFunctor -
|
||||
[
|
||||
GenNP, GenModNP, ComplBareVS, CompBareCN,
|
||||
ApposNP, DetNPMasc, DetNPFem,
|
||||
StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
|
||||
PassVPSlash, PassAgentVPSlash, UttVPShort, ByVP, InOrderToVP,
|
||||
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, RelVPS,
|
||||
MkVPS2, ConjVPS2, ComplVPS2, ReflVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
||||
ICompAP,ProDrop,EmbedSSlash,
|
||||
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
|
||||
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
|
||||
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron,
|
||||
CompoundN, CompoundAP, AdvIsNP,
|
||||
A2VPSlash, N2VPSlash,
|
||||
CardCNCard,
|
||||
GenRP
|
||||
]
|
||||
with (Grammar = GrammarDan)
|
||||
** {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
}
|
||||
@@ -14,7 +14,8 @@ concrete GrammarDan of Grammar =
|
||||
TextX - [Tense,Temp] ,
|
||||
IdiomDan,
|
||||
StructuralDan,
|
||||
TenseDan
|
||||
TenseDan,
|
||||
NamesDan
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
concrete LangDan of Lang =
|
||||
GrammarDan,
|
||||
LexiconDan
|
||||
,DocumentationDan --# notpresent
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
2
src/danish/NamesDan.gf
Normal file
2
src/danish/NamesDan.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete NamesDan of Noun = CatDan ** NamesScand with
|
||||
(ResScand = ResDan) ;
|
||||
@@ -144,7 +144,6 @@ oper
|
||||
mkPN : N -> PN ; --%
|
||||
} ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
@@ -182,6 +181,7 @@ oper
|
||||
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||
|
||||
mkAdA : Str -> AdA ; -- modify adjective, e.g. "meget"
|
||||
mkAdN : Str -> AdN ;
|
||||
|
||||
|
||||
--2 Verbs
|
||||
@@ -386,6 +386,7 @@ oper
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
mkAdN x = ss x ** {lock_AdN = <>} ;
|
||||
|
||||
mk6V a b c d e f = mkVerb6 a b c d e f **
|
||||
{part = [] ; vtype = VAct ; lock_V = <> ; isVaere = False} ;
|
||||
@@ -491,6 +492,25 @@ oper
|
||||
mk2PN : Str -> Gender -> PN ;
|
||||
nounPN : N -> PN ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN (regPN s) ** {n=Sg}; -- default gender utrum
|
||||
mkLN : Str -> Gender -> LN = \s,g -> lin LN (mk2PN s g) ** {n=Sg} ; -- set other gender
|
||||
mkLN : Str -> Gender -> Number -> LN = \s,g,n -> lin LN (mk2PN s g) ** {n=n} ; -- set other gender and number
|
||||
} ;
|
||||
mkGN = overload {
|
||||
mkGN : Str -> GN = \s -> lin GN {s = \\c => mkCase c s ; g = Male}; -- default gender utrum
|
||||
mkGN : Str -> Sex -> GN = \s,g -> lin GN {s = \\c => mkCase c s ; g = g} ; -- set other gender
|
||||
} ;
|
||||
|
||||
mkSN = overload {
|
||||
mkSN : Str -> SN = \s -> lin SN {s = \\_,c => mkCase c s; pl = \\c => mkCase c s}; -- default gender utrum
|
||||
mkSN : Str -> Str -> Str -> SN =
|
||||
\male,female,pl -> lin SN {s = table {Male => \\c => mkCase c male;
|
||||
Female => \\c => mkCase c female} ;
|
||||
pl = \\c => mkCase c pl
|
||||
} ;
|
||||
} ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (fin : Str) -> A = regADeg ;
|
||||
mkA : (fin,fint : Str) -> A = mk2ADeg ;
|
||||
@@ -533,4 +553,9 @@ oper
|
||||
mk2V2 : V -> Prep -> V2 ;
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
mkInterj : Str -> Interj
|
||||
= \s -> lin Interj {s = s} ;
|
||||
|
||||
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -19,6 +19,10 @@ concrete ConjunctionDut of Conjunction =
|
||||
|
||||
ConjRS conj ss = conjunctDistrTable2 Gender Number conj ss ;
|
||||
|
||||
ConjCN conj ss = conjunctDistrTable2 Adjf NForm conj ss ** {
|
||||
g = Utr
|
||||
} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoTable Order ;
|
||||
@@ -31,6 +35,8 @@ concrete ConjunctionDut of Conjunction =
|
||||
ConsAP xs x = consrTable2 Agr AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseRS x y = twoTable2 Gender Number x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable2 Gender Number comma xs x ;
|
||||
BaseCN x y = twoTable2 Adjf NForm x y ;
|
||||
ConsCN xs x = consrTable2 Adjf NForm comma xs x ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Order => Str} ;
|
||||
@@ -38,5 +44,6 @@ concrete ConjunctionDut of Conjunction =
|
||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : Agr => AForm => Str ; isPre : Bool} ;
|
||||
[RS] = {s1,s2 : Gender => Number => Str} ;
|
||||
[CN] = {s1,s2 : Adjf => NForm => Str} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ concrete ExtendDut of Extend =
|
||||
VPS,
|
||||
BaseVPS, ConsVPS,
|
||||
MkVPS, ConjVPS, PredVPS,
|
||||
PassVPSlash, PassAgentVPSlash
|
||||
PassVPSlash, PassAgentVPSlash,
|
||||
CompoundN
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarDut) **
|
||||
@@ -121,4 +122,9 @@ lin
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
lin CompoundN n1 n2 = {
|
||||
s = \\n => n1.s ! NF Sg Nom ++ BIND ++ n2.s ! n ;
|
||||
g = n2.g
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -512,8 +512,8 @@ param
|
||||
|
||||
-- IL2018-02: a whole lot of times we only need number and person, not gender
|
||||
-- maybe switch to PersAgr at some point and halve the number of fields
|
||||
oper PersAgr : Type = {n : Number ; p : Person} ;
|
||||
oper Agr : Type = PersAgr ** {g : Gender} ;
|
||||
oper PersAgr : PType = {n : Number ; p : Person} ;
|
||||
oper Agr : PType = {n : Number ; p : Person ; g : Gender} ;
|
||||
|
||||
oper
|
||||
pagr : Agr -> PersAgr = \agr -> { p = agr.p ; n = agr.n } ;
|
||||
|
||||
@@ -86,6 +86,9 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
AdvVPSlash vp adv = vp ** {a2 = vp.a2 ++ adv.s; isHeavy=True} ;
|
||||
AdVVPSlash adv vp = vp ** {a1 = \\a => adv.s ++ vp.a1 ! a} ;
|
||||
|
||||
ReflVP vp = insertObj (\\a => appPrep vp.c2.p1
|
||||
(npLite (\\_ => reflPron ! a))
|
||||
) vp ;
|
||||
|
||||
@@ -104,7 +104,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in {
|
||||
linref
|
||||
SSlash = \ss -> ss.s ++ ss.c2.s.p1 ;
|
||||
ClSlash = \cls -> cls.s ! Pres ! Simul ! Pos ++ cls.c2.s.p1 ;
|
||||
NP = \np -> np.s ! NPAcc ; ----NPSep ;
|
||||
NP = \np -> np.s ! NPCase Nom ; ----NPSep ;
|
||||
CN = cnRef ;
|
||||
|
||||
VP = vpRef ;
|
||||
|
||||
@@ -5,7 +5,7 @@ concrete ExtendFin of Extend =
|
||||
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
|
||||
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
||||
,ExistCN, ExistMassCN, ICompAP, ByVP
|
||||
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
||||
,CompoundN, GenNP, GenIP, GenRP, AdvIsNP, EmbedSSlash
|
||||
,PassVPSlash, PassAgentVPSlash
|
||||
,CardCNCard
|
||||
,UttAccNP
|
||||
@@ -191,6 +191,15 @@ lin
|
||||
|
||||
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
|
||||
|
||||
GenRP num cn = {
|
||||
s = \\n,c =>
|
||||
let k = npform2case num.n c
|
||||
in relPron ! n ! Gen ++ linCN (NCase num.n k) cn ;
|
||||
--- a = RNoAg
|
||||
a = RAg (agrP3 num.n)
|
||||
} ;
|
||||
|
||||
|
||||
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
|
||||
|
||||
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
|
||||
|
||||
@@ -61,8 +61,10 @@ concrete IdiomFin of Idiom = CatFin **
|
||||
ImpP3 np vp =
|
||||
let vps = (sverb2verbSep vp.s).s ! ImperP3 (verbAgr np.a).n
|
||||
in
|
||||
{s = np.s ! subjcase2npform vp.s.sc ++ vps ++
|
||||
vp.s2 ! True ! Pos ! np.a ++ vp.adv ! Pos ++ vp.ext
|
||||
{s = vps ++
|
||||
np.s ! subjcase2npform vp.s.sc ++
|
||||
vp.s2 ! True ! Pos ! np.a ++
|
||||
vp.adv ! Pos ++ vp.ext
|
||||
} ;
|
||||
|
||||
SelfAdvVP vp = insertAdv (\\_ => "itse") vp ;
|
||||
|
||||
@@ -62,7 +62,7 @@ oper
|
||||
-- Adjectives --- could be made more compact by pressing comparison forms down to a few
|
||||
|
||||
oper
|
||||
SAForm : Type = AForm ;
|
||||
SAForm : PType = AForm ;
|
||||
|
||||
oper
|
||||
SAdj = {s : SAForm => Str ; h : Harmony} ;
|
||||
@@ -112,7 +112,7 @@ oper
|
||||
-- verbs
|
||||
|
||||
oper
|
||||
SVForm : Type = VForm ;
|
||||
SVForm : PType = VForm ;
|
||||
SVerb : Type = {s : SVForm => Str ; h : Harmony} ;
|
||||
|
||||
ollaSVerbForms : SVForm => Str = verbOlla.s ;
|
||||
|
||||
@@ -330,8 +330,8 @@ instance DiffFre of DiffRomance - [
|
||||
<_, _, True> =>
|
||||
neg.p1 ++ clit ++ fin ++ bindHyphen ++ subj ++ neg.p2 ++ inf ++ compl ++ ext ;
|
||||
|
||||
-- est loin la ville
|
||||
_ => neg.p1 ++ clit ++ fin ++ neg.p2 ++ inf ++ compl ++ subj ++ ext
|
||||
-- est Paris loin
|
||||
_ => neg.p1 ++ clit ++ fin ++ neg.p2 ++ subj ++ inf ++ compl ++ ext
|
||||
} ;
|
||||
|
||||
bindHyphensT : Str = bindHyphen ++ "t" ++ bindHyphen ;
|
||||
|
||||
@@ -4,8 +4,10 @@ concrete ExtendFre of Extend =
|
||||
CatFre ** ExtendFunctor -
|
||||
[
|
||||
---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron,
|
||||
GenRP,
|
||||
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
|
||||
PassVPSlash, PassAgentVPSlash, ApposNP, CompoundN
|
||||
PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP, ApposNP, CompoundN,
|
||||
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP
|
||||
] -- put the names of your own definitions here
|
||||
with
|
||||
(Grammar = GrammarFre) **
|
||||
@@ -23,6 +25,16 @@ lincat
|
||||
RNP = {s : Agr => Case => Str} ;
|
||||
|
||||
lin
|
||||
GenRP nu cn = {
|
||||
s = \\_b,_aagr,_c => "dont" ++ num ++ artDef False g n Nom ++ cn.s ! n ;
|
||||
a = aagr g n ;
|
||||
hasAgr = True
|
||||
} where {
|
||||
g = cn.g ;
|
||||
n = nu.n ;
|
||||
num = if_then_Str nu.isNum (nu.s ! g) []
|
||||
} ;
|
||||
|
||||
ExistCN cn =
|
||||
let
|
||||
pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
||||
@@ -46,6 +58,9 @@ lin PassVPSlash vps = passVPSlash vps [] ;
|
||||
PassAgentVPSlash vps np = passVPSlash
|
||||
vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||
|
||||
PastPartAP vps = pastPartAP vps [] ;
|
||||
PastPartAgentAP vps np = pastPartAP vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||
|
||||
ReflRNP v rnp = -- VPSlash -> RNP -> VP ; -- love my family and myself
|
||||
case v.c2.isDir of {
|
||||
True => insertRefl v ;
|
||||
@@ -67,6 +82,13 @@ oper
|
||||
comp = \\a => (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ vps.comp ! a ++ agent ;
|
||||
} ;
|
||||
|
||||
pastPartAP : VPSlash -> Str -> AP ;
|
||||
pastPartAP vps agent = lin AP {
|
||||
s = \\af => vps.s.s ! VPart (aform2gender af) (aform2number af) ++ vps.comp ! (aform2aagr af ** {p = P3}) ++ agent ;
|
||||
isPre = False ;
|
||||
copTyp = serCopula
|
||||
} ;
|
||||
|
||||
lin ApposNP np1 np2 = np1 ** { -- guessed by KA
|
||||
s = \\c => np1.s ! c ** {ton =(np1.s ! c).ton ++ "," ++ (np2.s ! Nom).ton;
|
||||
comp =(np1.s ! c).comp ++ "," ++ (np2.s ! Nom).comp
|
||||
@@ -112,4 +134,35 @@ lin UseDAP = \dap ->
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
lincat
|
||||
VPS = {s : Mood => Agr => Bool => Str} ;
|
||||
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
|
||||
|
||||
lin
|
||||
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
|
||||
ConsVPS = consrTable3 Mood Agr Bool comma ;
|
||||
|
||||
lin
|
||||
PredVPS np vpi = {
|
||||
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
|
||||
} ;
|
||||
MkVPS tm p vp = {
|
||||
s = \\m,agr,isNeg =>
|
||||
tm.s ++ p.s ++
|
||||
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
|
||||
! DDir ! tm.t ! tm.a ! p.p ! m
|
||||
} ;
|
||||
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
|
||||
|
||||
RelVPS rp vpi = {
|
||||
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
|
||||
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
ExistsNP np =
|
||||
mkClause "il" True False np.a
|
||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||
(predV (mkV "exister"))) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
concrete LangFre of Lang =
|
||||
GrammarFre,
|
||||
LexiconFre
|
||||
,MarkupFre - [stringMark]
|
||||
,DocumentationFre --# notpresent
|
||||
,ConstructionFre
|
||||
** {
|
||||
|
||||
@@ -44,6 +44,11 @@ oper
|
||||
spn = \\c => prepCase c ++ s ;
|
||||
n = Sg ; s2 = \\g => [] ; isNeg = False
|
||||
} ;
|
||||
mkDet : Str -> Number -> Det = \s, n -> lin Det {
|
||||
s,sp = \\_,c => prepCase c ++ s ;
|
||||
spn = \\c => prepCase c ++ s ;
|
||||
n = n ; s2 = \\g => [] ; isNeg = False
|
||||
} ;
|
||||
mkDet : Str -> Str -> Number -> Det = \m,f,n -> lin Det {
|
||||
s,sp = \\g,c => prepCase c ++ case g of {Masc => m ; Fem => f} ;
|
||||
spn = \\c => prepCase c ++ m ;
|
||||
|
||||
@@ -40,14 +40,14 @@ resource ParadigmsFre =
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
Gender : PType ;
|
||||
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
|
||||
Number : Type ; --%
|
||||
Number : PType ; --%
|
||||
|
||||
singular : Number ; --%
|
||||
plural : Number ; --%
|
||||
|
||||
@@ -16,7 +16,7 @@ concrete AdverbGer of Adverb = CatGer ** open ResGer, Prelude in {
|
||||
|
||||
PositAdAAdj a = {s = a.s ! Posit ! APred} ;
|
||||
|
||||
SubjS subj s = {s = subj.s ++ s.s ! Sub} ;
|
||||
SubjS subj s = {s = {- Predef.BIND ++ "," ++ -} subj.s ++ s.s ! Sub} ; --- comma needed in some uses
|
||||
|
||||
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
concrete ExtendGer of Extend =
|
||||
CatGer ** ExtendFunctor
|
||||
- [ -- remove the default implementations of:
|
||||
GenNP, EmptyRelSlash,
|
||||
GenNP, GenRP, EmptyRelSlash,
|
||||
VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
ICompAP, IAdvAdv, CompIQuant, PrepCN,
|
||||
@@ -36,6 +36,13 @@ concrete ExtendGer of Extend =
|
||||
delCardOne = False
|
||||
} ;
|
||||
|
||||
GenRP nu cn = {
|
||||
s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Weak ! nu.n ! c ;
|
||||
a = RAg nu.n P3
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
s = \\m,t,a,p,gn =>
|
||||
appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ;
|
||||
@@ -46,15 +53,50 @@ concrete ExtendGer of Extend =
|
||||
lincat
|
||||
VPI = {s : Bool => Str} ;
|
||||
[VPI] = {s1,s2 : Bool => Str} ;
|
||||
VPS = {s : Order => Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||
VPS = {s : Order => Agr => {verb, compl : Str}} ;
|
||||
[VPS] = {s : Order => Agr => {s1, s2, s3 : Str}} ; -- liebe, (ich) dich, (und) bin glücklich
|
||||
|
||||
lin
|
||||
BaseVPI = twoTable Bool ;
|
||||
ConsVPI = consrTable Bool comma ;
|
||||
|
||||
BaseVPS = twoTable2 Order Agr ;
|
||||
ConsVPS = consrTable2 Order Agr comma ;
|
||||
BaseVPS v w = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vs = v.s ! ord ! agr ;
|
||||
ws = w.s ! ord ! agr ;
|
||||
in {
|
||||
s1 = vs.verb ;
|
||||
s2 = vs.compl ;
|
||||
s3 = case ord of {
|
||||
Sub => ws.compl ++ ws.verb ;
|
||||
_ => ws.verb ++ ws.compl
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
ConsVPS v vv = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vs = v.s ! ord ! agr ;
|
||||
vvs = vv.s ! ord ! agr ;
|
||||
in {
|
||||
s1 = vs.verb ;
|
||||
s2 = vs.compl ++ comma ++ vvs.s1 ++ vvs.s2 ;
|
||||
s3 = vvs.s3
|
||||
}
|
||||
} ;
|
||||
|
||||
ConjVPS conj vv = {
|
||||
s = \\ord, agr =>
|
||||
let
|
||||
vvs = vv.s ! ord ! agr
|
||||
in {
|
||||
verb = vvs.s1 ;
|
||||
compl = conj.s1 ++ vvs.s2 ++ conj.s2 ++ vvs.s3
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
MkVPS tm p vp =
|
||||
let vps = useVP vp in {
|
||||
@@ -105,26 +147,29 @@ concrete ExtendGer of Extend =
|
||||
} ;
|
||||
extra = vp.inf.extr!agr ++ vp.ext ;
|
||||
in
|
||||
--- AR 22/7/2024 as the subject comes to a wrong place in PredVPS Inv
|
||||
{verb = verb.fin ; compl = compl ++ infCompl ++ pred.inf ++ extra}
|
||||
{-
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ infCompl ++ pred.inf ++ extra ;
|
||||
Main => verb.fin ++ compl ++ infCompl ++ pred.inf ++ extra ;
|
||||
Inv => verb.fin ++ subj ++ compl ++ infCompl ++ pred.inf ++ extra ;
|
||||
Subj => subj ++ compl ++ pred.infComplfin ++ extra
|
||||
}
|
||||
-}
|
||||
} ;
|
||||
|
||||
ConjVPS = conjunctDistrTable2 Order Agr ;
|
||||
|
||||
PredVPS np vpi =
|
||||
PredVPS np vps =
|
||||
let
|
||||
subj = np.s ! False ! Nom ++ bigNP np ;
|
||||
agr = np.a ;
|
||||
in {
|
||||
s = \\o =>
|
||||
let verb = vpi.s ! o ! agr
|
||||
let verb = vps.s ! o ! agr
|
||||
in case o of {
|
||||
Main => subj ++ verb ;
|
||||
Inv => verb ++ subj ; ---- älskar henne och sover jag
|
||||
Sub => subj ++ verb
|
||||
Main => subj ++ verb.verb ++ verb.compl ;
|
||||
Inv => verb.verb ++ subj ++ verb.compl ; -- älskar jag henne och sover
|
||||
Sub => subj ++ verb.compl ++ verb.verb --- not quite correct in ConjVPS
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -36,4 +36,12 @@ oper
|
||||
sp = \\gn,c => q.s ! False ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
|
||||
} ;
|
||||
|
||||
mkStrongDet : Str -> Number -> Det = \adj, n -> lin Det {
|
||||
s,sp = \\_,g,c => adj + adjEnding ! (gennum g Pl) ! c ;
|
||||
n = n ; a = Strong ; isDef = False ; hasDefArt = False} ;
|
||||
|
||||
mkWeakDet : Str -> Number -> Det = \adj, n -> lin Det {
|
||||
s,sp = \\_,g,c => adj + adjEnding ! (gennum g Pl) ! c ;
|
||||
n = n ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -40,29 +40,82 @@ lin
|
||||
e.s ! DUnit ! invNum ++ BIND ++ "und" ++ BIND ++ d.s ! DTen ! g; n = Pl} ;
|
||||
pot1as2 n = n ;
|
||||
|
||||
pot2 d = {s = \\g =>
|
||||
-- HL 15.3.2025 added:
|
||||
-- pot21, pot31, pot41, pot4, pot4plus, pot51, pot5, pot5plus, pot5decimal
|
||||
-- and opers oneCardOrd, cardOrdNum, toFem
|
||||
-- changed: multiple to get pot21 = hundert (Eng: a hundred, Swe: hundra)
|
||||
-- versus pot2 pot01 = einhundert (Eng: one hundred, Swe: etthundra)
|
||||
-- likewise for [ein]tausend, [eine] Million, Milliarde
|
||||
-- Q: add BIND or "und" in pot4plus, pot5plus ?
|
||||
|
||||
pot21 = {s = \\g => cardOrd "hundert" "hundertste" ! g ; n = Pl} ;
|
||||
pot2 d = {s = \\g =>
|
||||
multiple (d.s ! DUnit) d.n ++ cardOrd "hundert" "hundertste" ! g ; n = Pl} ;
|
||||
pot2plus d e = {s = \\g =>
|
||||
multiple (d.s ! DUnit) d.n ++ "hundert" ++ BIND ++ e.s ! g ; n = Pl} ;
|
||||
pot2as3 n = n ;
|
||||
|
||||
pot31 = {s = \\g => cardOrd "tausend" "tausendste" ! g ; n = Pl} ;
|
||||
pot3 n = {s = \\g =>
|
||||
multiple n.s n.n ++ cardOrd "tausend" "tausendste" ! g ; n = Pl} ;
|
||||
pot3plus n m = {s = \\g =>
|
||||
pot3plus n m = {s = \\g =>
|
||||
multiple n.s n.n ++ "tausend" ++ m.s ! g ; n = Pl} ;
|
||||
pot3as4 n = n ;
|
||||
pot3decimal d = {s = \\g =>
|
||||
d.s ! invNum ++ cardOrd "tausend" "tausendste" ! g ; n = Pl} ;
|
||||
d.s ! invNum ++ cardOrd "Tausend" "tausendste" ! g ; n = Pl} ;
|
||||
|
||||
pot41 = {s = \\g => oneCardOrd "Million" "millionste" ! g ; n = Pl} ;
|
||||
pot4 n = let tab = cardOrdNum n.n "Million" "millionste" in {
|
||||
s = table{
|
||||
NCard af => n.s ! (NCard (toFem af)) ++ tab ! (NCard af) ;
|
||||
NOrd af => n.s ! (NCard APred) ++ BIND ++ tab ! (NOrd af)
|
||||
} ;
|
||||
n = Pl} ;
|
||||
pot4plus n m = let tab = cardOrdNum n.n "million" "millionste" in {
|
||||
s = table{
|
||||
NCard af => n.s ! (NCard (toFem af)) ++ BIND ++ tab ! (NCard af) ++ m.s ! NCard af ;
|
||||
NOrd af => n.s ! (NCard (toFem APred)) ++ BIND ++ tab ! (NCard (toFem af)) ++ m.s ! NOrd af
|
||||
} ;
|
||||
n = Pl} ;
|
||||
pot4as5 n = n ;
|
||||
pot4decimal d = {s = \\g =>
|
||||
d.s ! invNum ++ cardOrd "Millionen" "Millionste" ! g ; n = Pl} ; -- * 1 Million
|
||||
d.s ! invNum ++ cardOrdNum d.n "Million" "-millionste" ! g ; n = Pl} ;
|
||||
|
||||
pot51 = {s = \\g => "einer Milliarde"; n = Pl} ; -- KA: case inflection missing
|
||||
pot51 = {s = \\g => oneCardOrd "Milliarde" "milliardste" ! g ; n = Pl} ;
|
||||
pot5 n = let tab = cardOrdNum n.n "Milliarde" "milliardste" in {
|
||||
s = table{
|
||||
NCard af => n.s ! (NCard (toFem af)) ++ tab ! (NCard af) ;
|
||||
NOrd af => n.s ! (NCard APred) ++ BIND ++ tab ! (NOrd af)
|
||||
} ;
|
||||
n = Pl} ;
|
||||
pot5plus n m = let tab = cardOrdNum n.n "milliarde" "milliardste" in {
|
||||
s = table{
|
||||
NCard af => n.s ! (NCard (toFem af)) ++ BIND ++ tab ! (NCard af) ++ "und" ++ m.s ! NCard af ;
|
||||
NOrd af => n.s ! (NCard (toFem APred)) ++ BIND ++ tab ! (NCard (toFem af)) ++ m.s ! NOrd af
|
||||
} ;
|
||||
n = Pl} ;
|
||||
pot5decimal d = {s = \\g =>
|
||||
d.s ! invNum ++ cardOrdNum d.n "Milliarde" "-milliardste" ! g ; n = Pl} ;
|
||||
|
||||
oper
|
||||
multiple : (CardOrd => Str) -> Number -> Str = \d,n ->
|
||||
case n of {Sg => [] ; _ => d ! invNum ++ BIND} ;
|
||||
-- case n of {Sg => [] ; _ => d ! invNum ++ BIND} ;
|
||||
d ! invNum ++ BIND ; -- HL
|
||||
|
||||
oneCardOrd : Str -> Str -> CardOrd => Str =
|
||||
\million,millionste -> table {
|
||||
NCard (AMod (GSg _) c) => "ein" + pronEnding ! (GSg Fem) ! c ++ million ;
|
||||
NCard (AMod GPl _) => pluralN million ;
|
||||
NCard APred => "ein" + pronEnding ! (GSg Fem) ! Nom ++ million ;
|
||||
NOrd a => (regA (init millionste)).s ! Posit ! a
|
||||
} ;
|
||||
|
||||
cardOrdNum : Number -> Str -> Str -> CardOrd => Str = \n,drei,dritte ->
|
||||
case n of {Sg => cardOrd drei dritte ; _ => cardOrd (pluralN drei) dritte} ;
|
||||
|
||||
toFem : AForm -> AForm = \af -> case af of {
|
||||
AMod _ c => AMod (GSg Fem) c ;
|
||||
APred => AMod (GSg Fem) Nom} ;
|
||||
|
||||
--------------------
|
||||
|
||||
@@ -81,15 +134,15 @@ oper
|
||||
-- 101ter,...,119ter,120ster,... , 200ster
|
||||
IIDig d i =
|
||||
let isPld : Bool = case d.n of {Sg => False ; _ => True} ;
|
||||
i = lin Digits i ; -- suppress warning missing lock_Digits
|
||||
b : Bool = case i.isDig of {True => isPld ; _ => notB i.tail1to19} ;
|
||||
i' : Digits = case b of {True => IDig (mkDig (i.s ! invNum ++ BIND ++ "s")) ;
|
||||
_ => i }
|
||||
_ => i}
|
||||
in {s = table {NCard af => d.s ! invNum ++ BIND ++ i.s ! NCard af ;
|
||||
NOrd af => d.s ! invNum ++ BIND ++ i'.s ! NOrd af} ;
|
||||
n = Pl ;
|
||||
isDig = False ;
|
||||
tail1to19 = case i.isDig of {True => notB isPld ; False => i.tail1to19} ;
|
||||
lock_Digits = <>
|
||||
} ;
|
||||
|
||||
D_0 = mkDig "0" ** {isZero = True} ;
|
||||
@@ -123,7 +176,7 @@ oper
|
||||
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
||||
s = table {NCard _ => c ; -- 0,...,9
|
||||
NOrd af => (regA o).s ! Posit ! af} ; -- (ein) 0ter .. 9ter | (der) 0te ... 9te
|
||||
n = n ; -- NOrd APred: "0",... or "am 0ten",... ?
|
||||
n = n ; -- NOrd APred: "0t"
|
||||
isZero = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\m,t,a,b,_ => "derart" ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ;
|
||||
RelCl cl = { --- no comma before derart
|
||||
s = \\m,t,a,b,_ => "derart" ++ Predef.BIND ++ "," ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
|
||||
UseCopula = predV sein_V ;
|
||||
|
||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.s2 ! Nom ++ ap.ext} ;
|
||||
CompNP np = {s = \\_ => np.s ! False ! Nom ++ np.rc ; ext = np.ext} ;
|
||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in {
|
||||
A = ResGre.Adj ; --{s : Degree => Gender => Number => Case => Str } ;
|
||||
|
||||
A2 = {s :Degree => Gender => Number => Case => Str ; adv : Degree => Str ;c2 : Compl } ;
|
||||
|
||||
|
||||
N = Noun;
|
||||
|
||||
@@ -100,5 +99,7 @@ concrete CatGre of Cat = CommonGre ** open ResGre, Prelude in {
|
||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2,c3 : Compl} ;
|
||||
|
||||
PN = PName ;
|
||||
|
||||
LN, GN, SN = {s : Str} ;
|
||||
|
||||
}
|
||||
|
||||
124
src/greek/DocumentationGre.gf
Normal file
124
src/greek/DocumentationGre.gf
Normal file
@@ -0,0 +1,124 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete DocumentationGre of Documentation = CatGre ** open
|
||||
ResGre, HTML, Prelude
|
||||
in {
|
||||
|
||||
lincat
|
||||
Inflection = {t : Str; s1,s2 : Str} ;
|
||||
Definition = {s : Str} ;
|
||||
Document = {s : Str} ;
|
||||
Tag = {s : Str} ;
|
||||
|
||||
lin
|
||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||
t = "ο" ;
|
||||
s1 = heading1 "Ουσιαστικό" ;
|
||||
s2 = inflNoun noun.s
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
t = "ό" ;
|
||||
s1 = heading1 "Όνομα" ;
|
||||
s2 = inflNoun pn.s
|
||||
} ;
|
||||
|
||||
InflectionLN ln = {
|
||||
t = "ό" ;
|
||||
s1 = heading1 "Όνομα" ;
|
||||
s2 = paragraph ln.s
|
||||
} ;
|
||||
|
||||
InflectionGN gn = {
|
||||
t = "ό" ;
|
||||
s1 = heading1 "Όνομα" ;
|
||||
s2 = paragraph gn.s
|
||||
} ;
|
||||
|
||||
InflectionSN sn = {
|
||||
t = "ό" ;
|
||||
s1 = heading1 "Όνομα" ;
|
||||
s2 = paragraph sn.s
|
||||
} ;
|
||||
|
||||
InflectionA, InflectionA2 = \adj -> {
|
||||
t = "ε" ;
|
||||
s1 = heading1 "Επίθετο" ;
|
||||
s2 = inflAdj (adj.s ! Posit) ++
|
||||
inflAdj (adj.s ! Compar) ++
|
||||
inflAdj (adj.s ! Superl)
|
||||
} ;
|
||||
|
||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||
t = "επίρ" ;
|
||||
s1 = heading1 "Επίρρημα" ;
|
||||
s2 = paragraph adv.s
|
||||
} ;
|
||||
|
||||
InflectionPrep p = {
|
||||
t = "πρ" ;
|
||||
s1 = heading1 "Πρόθεση" ;
|
||||
s2 = paragraph p.s
|
||||
} ;
|
||||
|
||||
InflectionV,InflectionV2,InflectionV3,InflectionV2V,InflectionV2S,InflectionV2Q,InflectionV2A,InflectionVV,InflectionVS,InflectionVQ,InflectionVA = \v -> {
|
||||
t = "ρ" ;
|
||||
s1 = heading1 "ρήμα" ;
|
||||
s2 = inflVerb v.s
|
||||
} ;
|
||||
|
||||
oper
|
||||
inflNoun : (Number => Case => Str) -> Str = \n ->
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "ονομαστική" ++ td (n ! Sg ! Nom) ++ td (n ! Pl ! Nom)) ++
|
||||
tr (th "γενική" ++ td (n ! Sg ! Gen) ++ td (n ! Pl ! Gen)) ++
|
||||
tr (th "αιτιατική" ++ td (n ! Sg ! Acc) ++ td (n ! Pl ! Acc)) ++
|
||||
tr (th "κλητική" ++ td (n ! Sg ! Vocative) ++ td (n ! Pl ! Vocative))
|
||||
) ;
|
||||
|
||||
inflAdj : (Gender => Number => Case => Str) -> Str = \n ->
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "ονομαστική" ++ td (n ! Masc ! Sg ! Nom) ++ td (n ! Masc ! Pl ! Nom) ++ td (n ! Fem ! Sg ! Nom) ++ td (n ! Fem ! Pl ! Nom) ++ td (n ! Neut ! Sg ! Nom) ++ td (n ! Neut ! Pl ! Nom)) ++
|
||||
tr (th "γενική" ++ td (n ! Masc ! Sg ! Gen) ++ td (n ! Masc ! Pl ! Gen) ++ td (n ! Fem ! Sg ! Gen) ++ td (n ! Fem ! Pl ! Gen) ++ td (n ! Neut ! Sg ! Gen) ++ td (n ! Neut ! Pl ! Gen)) ++
|
||||
tr (th "αιτιατική" ++ td (n ! Masc ! Sg ! Acc) ++ td (n ! Masc ! Pl ! Acc) ++ td (n ! Fem ! Sg ! Acc) ++ td (n ! Fem ! Pl ! Acc) ++ td (n ! Neut ! Sg ! Acc) ++ td (n ! Neut ! Pl ! Acc)) ++
|
||||
tr (th "κλητική" ++ td (n ! Masc ! Sg ! Vocative) ++ td (n ! Masc ! Pl ! Vocative) ++ td (n ! Fem ! Sg ! Vocative) ++ td (n ! Fem ! Pl ! Vocative) ++ td (n ! Neut ! Sg ! Vocative) ++ td (n ! Neut ! Pl ! Vocative))
|
||||
) ;
|
||||
|
||||
inflVerb : (VForm => Str) -> Str = \v -> v ! VPres Ind Sg P1 Active Imperf {-
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Imperf) ++ td (v ! VPres Ind Pl P1 Active Imperf)) ++
|
||||
tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Imperf) ++ td (v ! VPres Ind Pl P2 Active Imperf)) ++
|
||||
tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Imperf) ++ td (v ! VPres Ind Pl P3 Active Imperf))
|
||||
) ++
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Imperf) ++ td (v ! VPast Ind Pl P1 Active Imperf)) ++
|
||||
tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Imperf) ++ td (v ! VPast Ind Pl P2 Active Imperf)) ++
|
||||
tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Imperf) ++ td (v ! VPast Ind Pl P3 Active Imperf))
|
||||
) ++
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "1" ++ td (v ! VPres Ind Sg P1 Active Perf) ++ td (v ! VPres Ind Pl P1 Active Perf)) ++
|
||||
tr (th "2" ++ td (v ! VPres Ind Sg P2 Active Perf) ++ td (v ! VPres Ind Pl P2 Active Perf)) ++
|
||||
tr (th "3" ++ td (v ! VPres Ind Sg P3 Active Perf) ++ td (v ! VPres Ind Pl P3 Active Perf))
|
||||
) ++
|
||||
frameTable (
|
||||
tr (th "" ++ th "ενικός" ++ th "πληθυντικός") ++
|
||||
tr (th "1" ++ td (v ! VPast Ind Sg P1 Active Perf) ++ td (v ! VPast Ind Pl P1 Active Perf)) ++
|
||||
tr (th "2" ++ td (v ! VPast Ind Sg P2 Active Perf) ++ td (v ! VPast Ind Pl P2 Active Perf)) ++
|
||||
tr (th "3" ++ td (v ! VPast Ind Sg P3 Active Perf) ++ td (v ! VPast Ind Pl P3 Active Perf))
|
||||
) -} ;
|
||||
|
||||
lin
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Παράδειγμα: </b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Παράδειγμα: </b>"++t.s++d.s++"</p><p>"++e.s++"</p>"};
|
||||
|
||||
lin
|
||||
MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
|
||||
MkTag i = ss (i.t) ;
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
concrete LangGre of Lang =
|
||||
GrammarGre,
|
||||
LexiconGre
|
||||
, DocumentationGre --# notpresent
|
||||
;
|
||||
|
||||
@@ -72,6 +72,11 @@ oper
|
||||
= \ nm,gm,am,vm,pn,pa, g -> lin PN (mkName nm gm am vm pn pa g) ;
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN
|
||||
= \s -> lin LN {s=s} ;
|
||||
} ;
|
||||
|
||||
makeNP = overload {
|
||||
makeNP : (_,_,_: Str) -> Number -> Gender -> NP = mkpanta;
|
||||
makeNP : Str -> Number -> Gender ->Bool -> NP = mkkati
|
||||
@@ -310,7 +315,13 @@ oper
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mkGN : Str -> GN = \s -> lin GN {s = s} ;
|
||||
mkSN : Str -> SN = \s -> lin SN {s = s} ;
|
||||
mkAdv : Str -> Adv = \s -> lin Adv {s = s} ;
|
||||
mkAdV : Str -> AdV = \s -> lin AdV {s = s} ;
|
||||
mkAdA : Str -> AdA = \s -> lin AdA {s = s} ;
|
||||
mkAdN : Str -> AdN = \s -> lin AdN {s = s} ;
|
||||
mkInterj : Str -> Interj = \s -> lin Interj {s = s} ;
|
||||
mkVoc : Str -> Voc = \s -> lin Voc {s = s} ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ resource ResGre = ParamX ** open Prelude in {
|
||||
|
||||
oper
|
||||
|
||||
AAgr : Type = {g : Gender ; n : Number} ;
|
||||
AAgr : PType = {g : Gender ; n : Number} ;
|
||||
|
||||
VP = { v : Verb ; clit,clit2 : Str ; comp : Agr => Str ; isNeg : Bool ; voice : Voice ; aspect :Aspect} ;
|
||||
|
||||
@@ -375,7 +375,8 @@ resource ResGre = ParamX ** open Prelude in {
|
||||
Fros + "ω" => mkName Giannis (Fros + "ως") (Fros + "ω") (Fros + "ω") ("") ("")Fem ;
|
||||
Mirt + "ώ" => mkName Giannis (Mirt + "ώς") (Mirt + "ώ") (Mirt + "ώ") ("")("")Fem ;
|
||||
Londin + "ο" => mkName Giannis (Londin + "ου") (Londin + "ο") (Londin + "ο") (Londin + "α") (Londin + "ων") Neut ;
|
||||
Paris + "ι" => mkName Giannis (mkStemNouns Paris + "ιού") (Paris + "ι") (Paris + "ι")(Paris + "ια") (mkStemNouns Paris + "ιών") Neut
|
||||
Paris + "ι" => mkName Giannis (mkStemNouns Paris + "ιού") (Paris + "ι") (Paris + "ι")(Paris + "ια") (mkStemNouns Paris + "ιών") Neut ;
|
||||
x => mkName x x x x x x Neut ---- AR 2025-02-13 guess
|
||||
};
|
||||
|
||||
|
||||
@@ -1379,7 +1380,7 @@ resource ResGre = ParamX ** open Prelude in {
|
||||
|
||||
|
||||
-----Pattern for the final -ν in the Feminine Accusative of the definite article----------
|
||||
FemAccFinalN : pattern Str = #("ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" );
|
||||
FemAccFinalN : pattern Str = #("Α" | "Τ" | "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" );
|
||||
|
||||
|
||||
|
||||
@@ -1405,8 +1406,10 @@ resource ResGre = ParamX ** open Prelude in {
|
||||
<Masc | Change,Sg,CPrep P_se > => "στον" ;
|
||||
<Fem, Sg, Nom> => "η" ;
|
||||
<Fem, Sg, Gen|CPrep P_Dat> => "της" ;
|
||||
<Fem, Sg, Acc |CPrep PNul> => pre { "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" => "την" ; _=> "τη"} ;
|
||||
<Fem, Sg, CPrep P_se > => pre { "ά" | "ό" | "ί"| "έ" | "ή" | "ύ"| "ώ" | "α" | "ο" | "ι"| "ε" |"η" | "υ" | "ω" |"κ"|"π" |"τ"| "ξ" |"ψ"| "γκ" |"μπ" |"ντ" => "στην" ; _=> "στη"} ;
|
||||
<Fem, Sg, Acc |CPrep PNul> =>
|
||||
pre {#FemAccFinalN => "την" ; _=> "τη"} ;
|
||||
<Fem, Sg, CPrep P_se > =>
|
||||
pre {#FemAccFinalN => "στην" ; _=> "στη"} ;
|
||||
<Neut, Sg, Nom | Acc |CPrep PNul> => prepCase c++ "το" ;
|
||||
<Neut, Sg, Gen|CPrep P_Dat> => "του" ;
|
||||
<Neut, Sg, CPrep P_se > => "στο" ;
|
||||
@@ -1823,4 +1826,4 @@ resource ResGre = ParamX ** open Prelude in {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
concrete AllHin of AllHinAbs =
|
||||
LangHin,
|
||||
ExtraHin
|
||||
** {} ;
|
||||
ExtendHin
|
||||
** open ExtraHin in {} ;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
abstract AllHinAbs =
|
||||
Lang,
|
||||
ExtraHinAbs
|
||||
Extend
|
||||
** {} ;
|
||||
|
||||
11
src/hindi/ExtendHin.gf
Normal file
11
src/hindi/ExtendHin.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../common:../abstract
|
||||
|
||||
concrete ExtendHin of Extend =
|
||||
CatHin ** ExtendFunctor -
|
||||
[
|
||||
ComplDirectVQ, ComplDirectVS
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarHin) ** {
|
||||
|
||||
}
|
||||
@@ -117,7 +117,7 @@ concrete CatHun of Cat = CommonX - [Adv] ** open ResHun, Prelude in {
|
||||
N,
|
||||
N2,
|
||||
N3 = ResHun.Noun ;
|
||||
PN = ResHun.NounPhrase ;
|
||||
PN,LN,GN,SN = ResHun.NounPhrase ;
|
||||
|
||||
Adv = {s : Str ; isPre : Bool} ;
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ lincat
|
||||
Sub10 = LinDigit ;
|
||||
Sub100,
|
||||
Sub1000,
|
||||
Sub1000000 = ResHun.Numeral ;
|
||||
Sub1000000,
|
||||
Sub1000000000,
|
||||
Sub1000000000000 = ResHun.Numeral ;
|
||||
|
||||
lin
|
||||
-- TODO: Add case inflection and ordinal forms to all numerals
|
||||
|
||||
@@ -72,6 +75,9 @@ lin
|
||||
{s = table {p => n.s ! Attrib ++ "ezer" ++ m.s ! p} ;
|
||||
n = numNumber ; numtype = IsNum} ;
|
||||
|
||||
pot3as4 n = n ;
|
||||
pot4as5 n = n ;
|
||||
|
||||
oper
|
||||
LinDigit : Type = {s : DForm*Place => Str ; n : Number} ;
|
||||
|
||||
|
||||
@@ -31,6 +31,14 @@ oper
|
||||
-- mkPN : N -> Number -> PN ;
|
||||
} ;
|
||||
|
||||
mkLN : overload {
|
||||
mkLN : Str -> PN ; -- Singular PN out of a string
|
||||
mkLN : Str -> Number -> PN -- PN with a given number
|
||||
} ;
|
||||
|
||||
mkGN : Str -> PN ; -- GN out of a string
|
||||
mkSN : Str -> SN ; -- SN out of a string
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
mkA : overload {
|
||||
@@ -110,6 +118,9 @@ oper
|
||||
mkAdA : Str -> AdA
|
||||
= \s -> lin AdA {s = s} ;
|
||||
|
||||
mkAdN : Str -> AdN
|
||||
= \s -> lin AdN {s = s} ;
|
||||
|
||||
|
||||
--.
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -184,6 +195,14 @@ oper
|
||||
-- mkPN : N -> Number -> PN ;
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN (defNP s Sg) ;
|
||||
mkLN : Str -> Number -> LN = \s,n -> lin LN (defNP s n) ;
|
||||
} ;
|
||||
|
||||
mkGN s = lin GN (defNP s Sg) ;
|
||||
mkSN s = lin SN (defNP s Sg) ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (sgnom : Str) -> A = \s -> lin A (mkAdj s) ;
|
||||
mkA : (sgnom,sgacc : Str) -> A = \nom,acc ->
|
||||
@@ -213,17 +232,54 @@ oper
|
||||
|
||||
copula = ResHun.copula ;
|
||||
|
||||
mkVS = overload {
|
||||
mkVS : Str -> VS = \v -> lin VS (mkVerb v) ;
|
||||
mkVS : V -> VS = \v -> lin VS v ;
|
||||
} ;
|
||||
|
||||
mkVQ = overload {
|
||||
mkVQ : Str -> VQ = \v -> lin VQ (mkVerb v) ;
|
||||
mkVQ : V -> VQ = \v -> lin VQ v ;
|
||||
} ;
|
||||
|
||||
mkVA = overload {
|
||||
mkVA : Str -> VA = \v -> lin VA (mkVerb v) ;
|
||||
mkVA : V -> VA = \v -> lin VA v ;
|
||||
} ;
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : (plain : Str) -> V2 = \v2 -> lin V2 (mkVerb2 v2) ;
|
||||
mkV2 : V -> V2 = vtov2 ;
|
||||
} ;
|
||||
|
||||
mkVV = overload {
|
||||
mkVV : Str -> VV = \v -> lin VV (mkVerb2 v) ;
|
||||
mkVV : V -> VV = \v -> lin VV (vtov2 v) ;
|
||||
} ;
|
||||
|
||||
mkV2A = overload {
|
||||
mkV2A : Str -> V2A = \v -> lin V2A (mkVerb2 v) ;
|
||||
mkV2A : V -> V2A = \v -> lin V2A (vtov2 v) ;
|
||||
} ;
|
||||
|
||||
mkV2V = overload {
|
||||
mkV2V : Str -> V2V = \v -> lin V2V (mkVerb2 v) ;
|
||||
mkV2V : V -> V2V = \v -> lin V2V (vtov2 v) ;
|
||||
} ;
|
||||
|
||||
mkV2S = overload {
|
||||
mkV2S : Str -> V2S = \v -> lin V2S (mkVerb2 v) ;
|
||||
mkV2S : V -> V2S = \v -> lin V2S (vtov2 v) ;
|
||||
} ;
|
||||
|
||||
mkV2Q = overload {
|
||||
mkV2Q : Str -> V2Q = \v -> lin V2Q (mkVerb2 v) ;
|
||||
mkV2Q : V -> V2Q = \v -> lin V2Q (vtov2 v) ;
|
||||
} ;
|
||||
|
||||
mkV3 = overload {
|
||||
mkV3 : (plain : Str) -> V3 = \v3 -> lin V3 (mkVerb3 v3) ;
|
||||
} ;
|
||||
--
|
||||
-- mkVV = overload {
|
||||
-- } ;
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : (e : Str) -> Prep
|
||||
@@ -234,6 +290,8 @@ oper
|
||||
|
||||
casePrep : Case -> Prep
|
||||
= \c -> lin Prep (ResHun.caseAdp c) ;
|
||||
|
||||
mkInterj : Str -> Interj = \s -> lin Interj {s = s} ;
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
@@ -121,12 +121,12 @@ lin under_Prep = nomAdp "alatt" ;
|
||||
-- Pron
|
||||
|
||||
-- Pronouns are closed class, no constructor in ParadigmsHun.
|
||||
-- it_Pron =
|
||||
i_Pron = pronTable ! <P1,Sg> ;
|
||||
youPol_Pron,
|
||||
youSg_Pron = pronTable ! <P2,Sg> ;
|
||||
he_Pron,
|
||||
she_Pron = pronTable ! <P3,Sg> ;
|
||||
she_Pron,
|
||||
it_Pron = pronTable ! <P3,Sg> ;
|
||||
we_Pron = pronTable ! <P1,Pl> ;
|
||||
youPl_Pron = pronTable ! <P2,Pl> ;
|
||||
they_Pron = pronTable ! <P3,Pl> ;
|
||||
|
||||
@@ -7,7 +7,8 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
|
||||
lincat
|
||||
Digit = {s : DForm => CardOrd => Str} ;
|
||||
Sub10 = {s : DForm => CardOrd => Str ; size : Size} ;
|
||||
Sub100, Sub1000, Sub1000000 = {s : CardOrd => Str ; size : Size} ;
|
||||
Sub100, Sub1000, Sub1000000, Sub1000000000, Sub1000000000000 =
|
||||
{s : CardOrd => Str ; size : Size} ;
|
||||
|
||||
lin
|
||||
num x = {
|
||||
@@ -117,6 +118,9 @@ concrete NumeralIce of Numeral = CatIce [Numeral,Digits,Decimal] ** open Prelude
|
||||
} ;
|
||||
size = pl
|
||||
} ;
|
||||
pot3as4 n = n ;
|
||||
|
||||
pot4as5 n = n ;
|
||||
|
||||
oper
|
||||
|
||||
|
||||
@@ -256,6 +256,10 @@ resource ParadigmsIce = open
|
||||
|
||||
} ;
|
||||
|
||||
oper mkLN : Str -> LN = \s -> lin LN {s=s} ;
|
||||
oper mkGN : Str -> GN = \s -> lin GN {s=s} ;
|
||||
oper mkSN : Str -> SN = \s -> lin SN {s=s} ;
|
||||
|
||||
mkN2 : N -> Preposition -> N2 = \n,prep -> lin N2 (n ** {c2 = prep}) ;
|
||||
|
||||
mkN3 : N -> (_,_ : Preposition) -> N3 = \n,c2,c3 -> lin N3 (n ** {c2 = c2; c3 = c3}) ;
|
||||
@@ -442,6 +446,8 @@ resource ParadigmsIce = open
|
||||
sgNeutNom sgNeutAcc sgNeutDat sgNeutGen plMascNom plMascAcc plMascDat plMascGen
|
||||
plFemNom plFemAcc plFemDat plFemGen plNeutNom plNeutAcc plNeutDat plNeutGen
|
||||
weakSgMascNom weakSgMascAccDatGen weakSgFemNom weakSgFemAccDatGen weakSgNeut weakPl flogið) ;
|
||||
|
||||
mkV : V -> Str -> V = \v,part -> v ;
|
||||
};
|
||||
|
||||
depV : V -> V = \verb -> lin V (deponentVerb verb) ;
|
||||
@@ -461,6 +467,18 @@ resource ParadigmsIce = open
|
||||
mk5V : (_,_,_,_,_ : Str) -> V = \telja,tel,taldi,talinn,talið ->
|
||||
lin V (vForms2Verb telja (indsub3 telja tel taldi) (impSg taldi) (impPl telja) (presPart telja) talið (weakPP talinn) (strongPP talinn)) ;
|
||||
|
||||
|
||||
oper mkVQ : V -> VQ = \v -> lin VQ v ;
|
||||
oper mkVV : V -> VV = \v -> lin VV (v ** {c2 = mkPrep "" accusative}) ;
|
||||
oper mkVS : V -> VS = \v -> lin VS v ;
|
||||
oper mkVA : V -> VA = \v -> lin VA v ;
|
||||
oper mkV2V : V -> V2V = \v -> lin V2V (v ** {c2 = mkPrep "" accusative; c3 = mkPrep "" accusative}) ;
|
||||
oper mkV2S : V -> V2S = \v -> lin V2S (v ** {c2 = mkPrep "" accusative}) ;
|
||||
oper mkV2A : V -> V2A = \v -> lin V2A (v ** {c2 = mkPrep "" accusative}) ;
|
||||
|
||||
oper reflV : V -> V = \v -> v;
|
||||
|
||||
|
||||
indsub1 : Str -> MForms = \inf -> case inf of {
|
||||
stem@(front + "e" + c) + "ja" => cTelja inf stem (ðiditi (front + "a" + c)) ;
|
||||
stem@(front + "y" + c) + "ja" => cTelja inf stem (ðiditi (front + "u" + c)) ;
|
||||
@@ -807,7 +825,10 @@ resource ParadigmsIce = open
|
||||
|
||||
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
|
||||
|
||||
mkAdN : CAdv -> AdN = \cadv -> lin AdN {s = cadv.s ++ cadv.p } ;
|
||||
mkAdN = overload {
|
||||
mkAdN : Str -> AdN = \s -> lin AdN {s = s} ;
|
||||
mkAdN : CAdv -> AdN = \cadv -> lin AdN {s = cadv.s ++ cadv.p }
|
||||
} ;
|
||||
|
||||
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
|
||||
|
||||
@@ -826,4 +847,8 @@ resource ParadigmsIce = open
|
||||
|
||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||
lin Conj (sd2 x y ** {n = n}) ;
|
||||
|
||||
mkInterj : Str -> Interj = \s -> lin Interj {s=s} ;
|
||||
mkVoc : Str -> Voc = \s -> lin Voc {s=s} ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete AllIna of AllInaAbs = LangIna ;
|
||||
concrete AllIna of AllInaAbs = LangIna, ExtendIna ;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user