17 Commits

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

View File

@@ -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: |

View File

@@ -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: |

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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}"

View File

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

View File

@@ -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 ;

View File

@@ -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 ;
} ;
}

View File

@@ -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}} ;

View File

@@ -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

View File

@@ -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
} ;

View File

@@ -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 {

View File

@@ -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 ;

View File

@@ -70,8 +70,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q
} ;
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 ;

View File

@@ -1,6 +1,7 @@
concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in {
concrete TenseBul of Tense = CatBul [Tense,Temp], TenseX - [Temp,Tense,TTAnt,TPres,TPast,TFut,TCond,IAdv,AdV,SC] ** open ResBul in {
lin
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

View File

@@ -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 ;

View File

@@ -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} ;
} ;

View File

@@ -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 } ;

View File

@@ -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 ;

View File

@@ -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 ; --%

View File

@@ -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} ;
@@ -1826,4 +1826,4 @@ resource ResGre = ParamX ** open Prelude in {

View File

@@ -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} ;

View File

@@ -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} ;

View File

@@ -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} ;
--------------------------------------------------------------------------------
}

View File

@@ -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> ;

View File

@@ -40,14 +40,14 @@ resource ParadigmsIta = BeschIta **
-- 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 ;

View File

@@ -85,7 +85,9 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in {
N = Noun ;
N2 = Noun ** { c : Prep } ;
N3 = Noun ** { c : Prep ; c2 : Prep } ;
PN = { s : Case => Str ; n : Number ; g : Gender } ;
PN, LN = { s : Case => Str ; n : Number ; g : Gender } ;
GN = { s : Str ; g : Sex } ;
SN = { s : Sex => Str ; pl : Str } ;
A2 = Adjective ** { c : Prep} ;
linref

View File

@@ -72,9 +72,7 @@ concrete ConjunctionLat of Conjunction =
-- BaseS : S -> S -> ListS
BaseS x y = {
s = \\c => { init = combineSentence x ; last = combineSentence y } ;
p = y.p ;
t = y.t
s = \\c => { init = combineSentence x ; last = combineSentence y }
} ;
-- ConsS : S -> ListS -> ListS
@@ -83,11 +81,9 @@ concrete ConjunctionLat of Conjunction =
ConsS s ss = {
s = \\co =>
{ init = \\s,a,d,v,c,o => coord co { init = (ss.s ! co).init ! s ! a ! d ! v ! c ! o ; last = (ss.s ! co).last ! s ! a ! d ! v ! c ! o } ;
last = combineSentence s } ;
p = s.p ;
t = s.t
last = combineSentence s }
} ;
-- BaseAdv : Adv -> Adv -> ListAdv
BaseAdv x y =
{
@@ -137,7 +133,7 @@ concrete ConjunctionLat of Conjunction =
--
lincat
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str} ; p : Pol ; t : Tense } ; -- TO FIX
[S] = { s : Coordinator => {init,last : SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str} } ; -- TO FIX
[Adv] = { s: Coordinator => {init,last : Str}} ;
[NP] = { s : Coordinator => {init,last : PronDropForm => AdvPos => DetPos => Case => Str} ; g : Gender ; n : Number ; p : Person ; isBase : Bool } ;
[AP] = {s : Coordinator => {init,last : Agr => Str } } ;

View File

@@ -58,24 +58,24 @@ concrete ExtraLat of ExtraLatAbs =
UttS_VInS s = { s = combineSentence s ! SAPreS ! APreV ! DPostN ! VInS ! CPostV ! SVO } ;
TestRCl t p cl = {
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ;
s = \\g,n => combineSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ;
} ;
-- UseRCl_OSV : Temp -> Pol -> RCl -> RS ;
UseRCl_OSV t p cl = {
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OSV ;
s = \\g,n => combineSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OSV ;
} ;
-- UseRCl_OVS : Temp -> Pol -> RCl -> RS ;
UseRCl_OVS t p cl = {
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OVS ; -- SAPreO APreV DPreN VReg CPostV OVS
s = \\g,n => combineSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ! SAPreO ! APreV ! DPreN ! VReg ! CPostV ! OVS ; -- SAPreO APreV DPreN VReg CPostV OVS
} ;
-- UseRCl_SOV : Temp -> Pol -> RCl -> RS ;
UseRCl_SOV t p cl = {
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SOV ;
s = \\g,n => combineSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SOV ;
} ;
-- UseRCl_SVO : Temp -> Pol -> RCl -> RS ;
UseRCl_SVO t p cl = {
s = \\g,n => combineSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SVO ;
s = \\g,n => combineSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ! SAPreS ! APreV ! DPreN ! VReg ! CPostV ! SVO ;
} ;
-- PrepNP_DPostN : Prep -> NP -> Adv ; -- in the house
PrepNP_DPostN prep np =

View File

@@ -110,6 +110,12 @@ oper
= \p,c -> lin Adv (mkFullAdverb p c nonExist);
};
mkAdV : Str -> AdV
= \s -> lin AdV {s=s} ;
mkAdA : Str -> AdA
= \s -> lin AdA {s=s} ;
mkAdN : Str -> AdN
= \s -> lin AdN {s=s} ;
mkConj = overload {
@@ -147,4 +153,24 @@ oper
mkA2V : A -> Prep -> A2V = \a,p -> lin A2V ( lin A2 ( a ** { c = p } ) ) ;
AV : Type = A ;
mkAV : A -> AV = \a -> lin AV a ;
mkLN : N -> Number -> LN = \noun,num -> lin PN (noun ** { s = noun.s ! num ; n = num } ) ;
mkGN = overload {
mkGN : Str -> GN = \s -> lin GN {s = s ; g = Male}; -- default gender male
mkGN : Str -> Sex -> GN = \s,g -> lin GN {s = s ; g = g} ; -- set other gender
} ;
mkSN = overload {
mkSN : Str -> SN = \s -> lin SN {s = \\_=>s; pl = s}; -- default gender utrum
mkSN : Str -> Str -> Str -> SN =
\male,female,pl -> lin SN {s = table {Male => male;
Female => female} ;
pl = pl
} ;
} ;
mkInterj : Str -> Interj
= \s -> lin Interj {s=s} ;
}

View File

@@ -21,14 +21,9 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in {
compl = vp.compl ! Ag Masc ip.n Nom ; -- default gender masculine
det = { s, sp = \\_ => [] ; n = ip.n } ;
} ;
-- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp )
-- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ;
-- QuestSlash : IP -> ClSlash -> QCl ; -- whom does John love
-- TO FIX
-- QuestSlash ip slash =
-- mkQuestion (ss ( ip.s ! Acc) ) slash ;
-- QuestIAdv : IAdv -> Cl -> QCl
QuestIAdv iadv cl = cl ** { q = iadv.s } ;

View File

@@ -1323,19 +1323,17 @@ oper
compl = vp.compl ;
adv = vp.adv ++ (a.s ! Posit)
} ;
-- clauses
Sentence =
{
s,o,neg : AdvPos => Str ; -- Subject, verbphrase, object and negation particle plus potential adverb
v : AdvPos => Str ;
t : C.Tense ; -- tense marker
p : C.Pol ; -- polarity marker
sadv : Str ; -- sentence adverb¡
det : { s , sp : Case => Str } ;
compl : Str -- verb complement
} ;
Clause =
{s : AdvPos => Str ;
o : AdvPos => Str ;
@@ -1344,7 +1342,7 @@ oper
compl : Str ;
neg : Polarity => AdvPos => Str ;
adv : Str } ;
QClause = {s : C.Tense => Anteriority => C.Pol => QForm => Str} ;
QClause = {s : Tense => Anteriority => Polarity => QForm => Str} ;
mkClause : NounPhrase -> VerbPhrase -> Clause = \np,vp ->
let
@@ -1390,14 +1388,12 @@ oper
adv = ""
} ;
combineClause : Clause -> C.Tense -> Anteriority -> C.Pol -> VQForm -> Sentence = \cl,tense,anter,pol,vqf ->
combineClause : Str -> Clause -> Tense -> Anteriority -> Polarity -> VQForm -> Sentence = \params,cl,tense,anter,pol,vqf ->
cl **
{
v = \\advpos => cl.v ! tense.t ! anter ! vqf ! advpos ;
neg = cl.neg ! pol.p ;
sadv = cl.adv ;
t = tense ;
p = pol ;
v = \\advpos => params ++ cl.v ! tense ! anter ! vqf ! advpos ;
neg = cl.neg ! pol ;
sadv = cl.adv
} ;
combineSentence : Sentence -> ( SAdvPos => AdvPos => DetPos => VPos => ComplPos => Order => Str ) = \s ->
@@ -1420,37 +1416,31 @@ oper
-- complosp is the position of the verb complement
\\sadvpos,advpos,detpos,verbpos,complpos,order => case order of {
SVO =>
s.t.s ++ s.p.s ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
advpreneg sadvpos ++ s.neg ! advpos ++
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
advpreo sadvpos ++ s.o ! advpos;
VSO =>
s.t.s ++ s.p.s ++
advpreneg sadvpos ++ s.neg ! advpos ++
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
advpreo sadvpos ++ s.o ! advpos;
VOS =>
s.t.s ++ s.p.s ++
advpreneg sadvpos ++ s.neg ! advpos ++
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
advpreo sadvpos ++ s.o ! advpos ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
OSV =>
s.t.s ++ s.p.s ++
advpreo sadvpos ++ s.o ! advpos ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom++
advpreneg sadvpos ++ s.neg ! advpos ++
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ;
OVS =>
s.t.s ++ s.p.s ++
advpreo sadvpos ++ s.o ! advpos ++
advpreneg sadvpos ++ s.neg ! advpos ++
advprev sadvpos ++ (complprev complpos) ++ (verbreg verbpos) ! advpos ++ (complpostv complpos) ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ;
SOV =>
s.t.s ++ s.p.s ++
advpres sadvpos ++ (detpren detpos).s ! Nom ++ s.s ! advpos ++ (verbins verbpos) ! advpos ++ (detpostn detpos).s ! Nom ++ (detpren detpos).sp ! Nom ++
advpreo sadvpos ++ s.o ! advpos ++
advpreneg sadvpos ++ s.neg ! advpos ++
@@ -1458,15 +1448,7 @@ oper
} ;
defaultSentence : Sentence -> Order => Str = \s -> combineSentence s ! SAPreS ! APreV ! DPreN ! VReg ! CPreV ;
-- questions
mkQuestion : SS -> Clause -> QClause = \ss,cl -> {
s = \\tense,anter,pol,form => case form of {
QDir => ss.s ++ (defaultSentence (combineClause cl tense anter pol VQFalse)) ! OVS ;
QIndir => ss.s ++ (combineSentence (combineClause cl tense anter pol VQFalse)) ! SAPreO ! APreO ! DPreN ! VReg ! CPreV ! OSV
}
};
negation : Polarity -> Str = \p -> case p of {
Pos => [] ;
Neg => "non"

View File

@@ -45,12 +45,12 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
--
UseCl t p cl = -- Temp -> Pol-> Cl -> S
(combineClause cl (lin Tense t) t.a (lin Pol p) VQFalse) ;
(combineClause (t.s++p.s) cl t.t t.a p.p VQFalse) ;
-- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion
-- UseQCl : Temp -> Pol -> QCl -> QS
UseQCl t p cl =
{
s = let qs = combineClause cl t t.a p VQTrue in
s = let qs = combineClause (t.s++p.s) cl t.t t.a p.p VQTrue in
\\q => case q of {
QDir => cl.q ++ defaultSentence qs ! SVO ; -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ;
QIndir => cl.q ++ defaultSentence qs ! SOV -- t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV
@@ -58,7 +58,7 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in {
} ;
-- UseRCl : Temp -> Pol -> RCl -> RS ;
UseRCl t p cl = {
s = \\g,n => defaultSentence (combineClause (cl.s ! g ! n) (lin Tense t) t.a (lin Pol p) VQFalse) ! SOV ;
s = \\g,n => defaultSentence (combineClause (t.s++p.s) (cl.s ! g ! n) t.t t.a p.p VQFalse) ! SOV ;
-- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
-- c = cl.c
} ;

View File

@@ -33,7 +33,7 @@ resource ResMlt = ParamX ** open Prelude, Predef, Maybe in {
if_then_else Definiteness b Definite Indefinite ;
-- Agreement system corrected based on comments by [AZ]
Agr : Type = { n : Number ; p : Person ; g : Gender } ;
Agr : PType = { n : Number ; p : Person ; g : Gender } ;
-- Make Agr from raw ingredients
mkAgr : Number -> Person -> Gender -> Agr = \n,p,g -> {n = n ; p = p ; g = g} ;

View File

@@ -46,7 +46,7 @@ resource ParadigmsPor =
-- To abstract over gender names, we define the following identifiers.
oper
Gender : Type ;
Gender : PType ;
Gender = MorphoPor.Gender ;
masculine, male : Gender ;
@@ -57,7 +57,7 @@ oper
-- To abstract over number names, we define the following.
Number : Type ;
Number : PType ;
Number = MorphoPor.Number ;
singular : Number ;

View File

@@ -112,9 +112,9 @@ param
-- Agreement of adjectives, verb phrases, relative pronouns, and predeterminers.
oper
AAgr : Type = {g : Gender ; n : Number} ;
AAgr : PType = {g : Gender ; n : Number} ;
Agr : Type = {g : Gender ; n : Number ; p : Person} ;
Agr : PType = {g : Gender ; n : Number ; p : Person} ;
complAgr : Agr -> {g : Gender ; n : Number} = \a -> {g = a.g ; n = a.n} ;

View File

@@ -502,13 +502,13 @@ oper
-- Agreements :
-- for relatives
AAgr : Type = {g : Gender ; n : Number} ;
-- for relatives
AAgr : PType = {g : Gender ; n : Number} ;
-- for agreement between subject and predicate
Agr : Type = AAgr ** {p : Person} ;
Agr : PType = {g : Gender ; n : Number ; p : Person} ;
-- clause building function :

View File

@@ -175,7 +175,6 @@ oper
----2 Pronouns
--PronForm = {s:Pronoun => Str};
DemonPronForm = {s:DemPronForm => Str};
mkDemonPronForm : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:Str) -> DemPronForm =
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16 -> {
s = table {

View File

@@ -894,7 +894,6 @@ oper
msloc,
msins, fsins,
ampnom, fpnom, -- mpacc = fpacc = fpnom
pgen,
pdat, -- NOT msins like AdjForms
pins : Str
} ;

View File

@@ -40,14 +40,14 @@ resource ParadigmsSpa =
-- 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 ;

View File

@@ -9,7 +9,7 @@ resource ParadigmsSwa = open
in {
oper
Gender : Type ;
Gender : PType ;
a_wa : Gender ; --m-wa
u_i : Gender ; --m-mi
li_ya : Gender ; --ji-ma
@@ -26,14 +26,14 @@ oper
-- To abstract over number names, we define the following.
Number : Type ;
Number : PType ;
singular : Number ;
plural : Number ;
-- To abstract over case names, we define the following.
Case : Type ; --%
Case : PType ; --%
nominative : Case ; --%
locative : Case ; --%