From b90e0364723294972cefca449ab123069bea34ff Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Tue, 25 Jun 2019 17:17:46 +0200 Subject: [PATCH 01/11] kind of working implementation of cardinal numbers --- src/latin/CatLat.gf | 4 +- src/latin/NumeralLat.gf | 199 ++++++++++++++++++++++++++++------------ src/latin/ResLat.gf | 57 ++++++++++-- 3 files changed, 192 insertions(+), 68 deletions(-) diff --git a/src/latin/CatLat.gf b/src/latin/CatLat.gf index 7f95ff773..a1ce8a5be 100644 --- a/src/latin/CatLat.gf +++ b/src/latin/CatLat.gf @@ -1,4 +1,4 @@ -concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in { +concrete CatLat of Cat = CommonX-[Adv,Voc] ** open ResLat, ParamX, Prelude in { flags optimize=all_subs ; @@ -60,7 +60,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in { -- ---- Numeral -- - Numeral = ResLat.Numeral ; + Numeral = ResLat.TNumeral ; Digits = {s : Str ; unit : Unit} ; -- ---- Structural diff --git a/src/latin/NumeralLat.gf b/src/latin/NumeralLat.gf index 4e51cfe10..075915b62 100644 --- a/src/latin/NumeralLat.gf +++ b/src/latin/NumeralLat.gf @@ -1,77 +1,151 @@ -concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat,Prelude in { +concrete NumeralLat of Numeral = CatLat, ParamX[Number] ** open ParadigmsLat, Prelude, ResLat, Predef in { lincat Digit = TDigit ; - Sub10 = Numeral ; - Sub100 = Numeral ; - Sub1000 = Numeral ; - Sub1000000 = Numeral ; + Sub10 = TNumeral ; + Sub100 = TNumeral ; + Sub1000 = TNumeral ; + Sub1000000 = TNumeral ; lin num x = x ; - n2 = lin Digit ( mkDigit "duo" "viginti" "ducenti" "secundus" ) ; - n3 = lin Digit ( mkDigit "tres" "triginta" "trecenti" "tertius" ) ; - n4 = lin Digit ( mkDigit "quattuor" "quadraginta" "quadringenti" "quartus" ) ; - n5 = lin Digit ( mkDigit "quinque" "quinquaginta" "quingenti" "quintus" ) ; - n6 = lin Digit ( mkDigit "sex" "sexaginta" "sescenti" "sextus" ) ; - n7 = lin Digit ( mkDigit "septem" "septuaginta" "septingenti" "septimus" ) ; - n8 = lin Digit ( mkDigit "octo" "octoginta" "octingenti" "ocatvus" ) ; - n9 = lin Digit ( mkDigit "novem" "nonaginta" "nongenti" "nonus") ; + n2 = lin Digit ( mkDigit "duo" "duodecim" "viginti" "ducenti" "secundus" "triginta" Yes ) ; + n3 = lin Digit ( mkDigit "tres" "tredecim" "triginta" "trecenti" "tertius" "quadraginta" Yes ) ; + n4 = lin Digit ( mkDigit "quattuor" "quattuordecim" "quadraginta" "quadringenti" "quartus" "quinquaginta" Yes ) ; + n5 = lin Digit ( mkDigit "quinque" "quindecim" "quinquaginta" "quingenti" "quintus" "sexaginta" Yes ) ; + n6 = lin Digit ( mkDigit "sex" "sedecim" "sexaginta" "sescenti" "sextus" "septuaginta" Yes ) ; + n7 = lin Digit ( mkDigit "septem" "septendecim" "septuaginta" "septingenti" "septimus" "octoginta" Yes ) ; + n8 = lin Digit ( mkDigit "octo" "duodeviginti" "octoginta" "octingenti" "ocatvus" "nonaginta" No8 ) ; + n9 = lin Digit ( mkDigit "novem" "undeviginti" "nonaginta" "nongenti" "nonus" "centum" No9 ) ; -- 1 - pot01 = { s = n1.s ! one ; n = Sg } ; + pot01 = { s = n1.s ! one ; d = n1.s ; n = singular ; below8 = n1.below8 } ; -- d * 1 - pot0 d = { s = d.s ! one ; n = Pl } ; + pot0 d = { + s = d.s ! one ; + d = table { + thousand => \\g,c => d.s ! one ! g ! c ++ d.s ! thousand ! g ! c ; + u => \\g,c => d.s ! u ! g ! c + } ; + n = plural ; + below8 = d.below8 + } ; -- 10 - pot110 = { s = n1.s ! ten ; n = Sg } ; + pot110 = { + s = n1.s ! ten ; + d = table { + thousand => \\g,c => n1.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => n1.s ! u ! g ! c + } ; + n = singular ; + below8 = Yes + } ; -- 11 --- pot111 = pot1to19 pot01 ; --- -- 10 + d --- -- pot1to19 d = mkNum "" "" "" "" ; -- {s = d.s ! teen} ** {n = Pl} ; + pot111 = pot1to19 n1 ; + -- 10 + d + pot1to19 d = { + s = d.s ! eleven ; + d = table { + thousand => \\g,c => d.s ! eleven ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => d.s ! u ! g ! c + } ; + n = plural ; + below8 = Ign + } ; -- coercion of 1..9 pot0as1 n = n ; -- d * 10 - pot1 d = {s = d.s ! ten ; n = Pl} ; + pot1 d = { + s = d.s ! ten ; + d = table { + thousand => \\g,c => d.s ! ten ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => d.s ! u ! g ! c + } ; + n = plural ; + below8 = Yes + } ; -- d * 10 + n - -- pot1plus d e = { - -- s = \\c => d.s ! ten ++ "-" ++ e.s ! one ! c ; - -- n = Pl} ; + pot1plus d n = + let + newS : Gender => Case => Str = \\g,c => case n.below8 of { + No8 => "duo" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ; + No9 => "un" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ "de" ++ Prelude.BIND ++ "-" ++ Prelude.BIND ++ d.tenNext ; + _ => d.s ! ten ! g ! c ++ n.s ! g ! c + } in + { + s = newS ; + d = table { + thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => n.d ! u ! g ! c + } ; + below8 = Ign ; + n = plural + } ; -- coercion of 1..99 pot1as2 n = n ; -- m * 100 --- pot2 d = {s = d.s ! hundred ; n = Pl} ; --- -- m * 100 + n --- --lin pot2plus d e = { --- -- s = \\c => d.s ! unit ! NCard ++ "hundred" ++ "and" ++ e.s ! c ; n = Pl} ; + pot2 n = { + s = n.d ! hundred ; + d = table { + thousand => \\g,c => n.d ! hundred ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => n.d ! u ! g ! c + } ; + n = plural ; + below8 = Yes} ; + -- d * 100 + n + pot2plus d n = + let + newS : Gender => Case => Str = \\g,c => d.d ! hundred ! g ! c ++ "et" ++ n.s ! g ! c + in + { + s = newS ; + d = table { + thousand => \\g,c => newS ! g ! c ++ n1.s ! thousand ! g ! c ; + u => \\g,c => n.d ! u ! g ! c + } ; + below8 = Ign ; + n = plural + } ; -- coercion of 1..999 pot2as3 n = n ; --- -- m * 1000 --- --lin pot3 n = { --- -- s = \\c => n.s ! NCard ++ mkCard c "thousand" ; n = Pl} ; --- -- m * 1000 + n --- --lin pot3plus n m = { --- -- s = \\c => n.s ! NCard ++ "thousand" ++ m.s ! c ; n = Pl} ; + -- m * 1000 + pot3 n = { + s = \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ; + d = table { thousand => \\g,c => n.s ! g ! c ++ n.d ! thousand ! g ! c ; + u => \\g,c => n.d ! u ! g ! c + } ; + below8 = Ign ; + n = plural + } ; + + -- d * 1000 + n + pot3plus d n = { + s = \\g,c => d.d ! thousand ! g ! c ++ "et" ++ n.s ! g ! c ; + d = n.d ; + below8 = Ign ; + n = plural + } ; oper - n1 : Digit = lin Digit ( fullDigit "unus" "decem" "primus" "decimus" "centesimus" "millesimus" ) ; - - mkDigit : (ones, tens, hundreds, ord : Str) -> TDigit = - \ones, tens, hundreds, ord -> + mkDigit : (ones, eleven, tens, hundreds, ord : Str) -> Str -> Below8 -> TDigit = + \ones, eleven, tens, hundreds, ord -> case of { - <"decem",_> => fullDigit ones tens hundreds ord "decimus" "centesimus" ; - <"viginti",_> => fullDigit ones tens hundreds ord "vicesimus" "ducentesimus" ; - <"triginta",_> => fullDigit ones tens hundreds ord "tricesimus" "trecentesimus" ; - => fullDigit ones tens hundreds ord (quadra + "gesimus") (quadringent + "esimus") ; + <"decem",_> => fullDigit ones eleven tens hundreds ord "decimus" "centesimus" ; + <"viginti",_> => fullDigit ones eleven tens hundreds ord "vicesimus" "ducentesimus" ; + <"triginta",_> => fullDigit ones eleven tens hundreds ord "tricesimus" "trecentesimus" ; + => fullDigit ones eleven tens hundreds ord (quadra + "gesimus") (quadringent + "esimus") ; _ => Predef.error "Invalid number" } ; - fullDigit : (ones, tens, hundreds, ord1,ord10,ord100 : Str) -> TDigit = - \ones, tens, hundreds, ord1,ord10,ord100 -> + fullDigit : (ones, eleven, tens, hundreds, ord1,ord10,ord100, tenNext : Str) -> Below8 -> TDigit = + \ones, eleven, tens, hundreds, ord1,ord10,ord100,tenNext,b8 -> { s = table { one => cardFlex ones ; + eleven => cardFlex eleven ; ten => cardFlex tens ; hundred => cardFlex hundreds ; - thousand => \\_,_ => nonExist ; + thousand => cardFlex "milia" ; ten_thousand => \\_,_ => nonExist ; - hundred_thousand => \\_,_ => nonExist } --- n = case ones of { "unus" => Sg ; _ => Pl } ; + hundred_thousand => \\_,_ => nonExist + } ; +-- n = case ones of { "unus" => singular ; _ => plural } ; -- ord = -- \\_,_ => [] ; -- -- table { one => (mkA ord1).s ! Posit; @@ -80,7 +154,11 @@ concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat,Prelude in { -- -- thousand => \\_,_ => nonExist ; -- -- ten_thousand => \\_ => nonExist ; -- -- hundred_thousand => \\_ => nonExist } ; - } ; + tenNext = tenNext ; + below8 = b8 + } ; + n1 : Digit = lin Digit ( fullDigit "unus" "decem" "undecim" "primus" "decimus" "centesimus" "millesimus" "viginti" Yes ) ; + -- numerals as sequences of digits lincat @@ -94,30 +172,31 @@ concrete NumeralLat of Numeral = CatLat ** open ResLat,ParadigmsLat,Prelude in { unit = inc i.unit } ; - D_0 = mkDig "" "" "" "" "" "" ; - D_1 = mkDig "I" "X" "C" "M" "(X)" "(C)" ; - D_2 = mkDig "II" "XX" "CC" "MM" "(XX)" "(CC)" ; - D_3 = mkDig "III" "XXX" "CCC" "MMM" "(XXX)" "(CCC)" ; - D_4 = mkDig "IV" "XL" "CD" "(IV)" "(XL)" "(CD)" ; - D_5 = mkDig "V" "L" "D" "(V)" "(L)" "(D)" ; - D_6 = mkDig "VI" "LX" "DC" "(VI)" "(LX)" "(DC)" ; - D_7 = mkDig "VII" "LXX" "DCC" "(VII)" "(LXX)" "(DCC)" ; - D_8 = mkDig "VIII" "LXXX" "DCCC" "(VIII)" "(LXXX)" "(DCCC)" ; - D_9 = mkDig "IX" "XC" "CM" "(IX)" "(XC)" "(CM)" ; + D_0 = mkDig "" "" "" "" "" "" "" ; + D_1 = mkDig "I" "XI" "X" "C" "M" "(X)" "(C)" ; + D_2 = mkDig "II" "XII" "XX" "CC" "MM" "(XX)" "(CC)" ; + D_3 = mkDig "III" "XIII" "XXX" "CCC" "MMM" "(XXX)" "(CCC)" ; + D_4 = mkDig "IV" "XIV" "XL" "CD" "(IV)" "(XL)" "(CD)" ; + D_5 = mkDig "V" "XV" "L" "D" "(V)" "(L)" "(D)" ; + D_6 = mkDig "VI" "XVI" "LX" "DC" "(VI)" "(LX)" "(DC)" ; + D_7 = mkDig "VII" "XVII" "LXX" "DCC" "(VII)" "(LXX)" "(DCC)" ; + D_8 = mkDig "VIII" "XVIII" "LXXX" "DCCC" "(VIII)" "(LXXX)" "(DCCC)" ; + D_9 = mkDig "IX" "XIX" "XC" "CM" "(IX)" "(XC)" "(CM)" ; oper TDig = { s : Unit => Str } ; - mkDig : Str -> Str -> Str -> Str -> Str -> Str -> TDig = - \one,ten,hundred,thousand,ten_thousand,hundred_thousand -> { - s = table Unit [one;ten;hundred;thousand;ten_thousand;hundred_thousand] + mkDig : Str -> Str -> Str -> Str -> Str -> Str -> Str -> TDig = + \one,eleven,ten,hundred,thousand,ten_thousand,hundred_thousand -> { + s = table Unit [one;eleven;ten;hundred;thousand;ten_thousand;hundred_thousand] } ; inc : Unit -> Unit = \u -> case u of { one => ten ; + eleven => hundred ; ten => hundred ; hundred => thousand ; thousand => ten_thousand ; diff --git a/src/latin/ResLat.gf b/src/latin/ResLat.gf index cd2a2f1f6..0235bddd9 100644 --- a/src/latin/ResLat.gf +++ b/src/latin/ResLat.gf @@ -190,7 +190,51 @@ param audaces audaces (audac + "ium") (audac + "ibus") g ; - + regAdj : Str -> Gender => Number => Case => Str = \s -> + case s of { + un + "us" => \\g,n,c => un + (regAdjSuffixes s g n c) + } ; + + regAdjSuffixes : Str -> Gender -> Number -> Case -> Str = \str,g,n,c -> + case of { + => "us" ; + => "i" ; + => "o" ; + => "um" ; + => "o" ; + => case str of { _ + "ius" => "i" ; _ => "e" } ; + => "i" ; + => "orum" ; + => "is" ; + => "os" ; + => "is" ; + => "i" ; + => "um" ; + => "i" ; + => "o" ; + => "um" ; + => "o" ; + => "um"; + => "a" ; + => "orum" ; + => "is" ; + => "os" ; + => "is" ; + => "a" ; + => "a" ; + => "ae" ; + => "ae" ; + => "am" ; + => "a" ; + => "a"; + => "ae" ; + => "arum" ; + => "is" ; + => "as" ; + => "is" ; + => "ae" + } ; + emptyAdj : Adjective = { s = \\_,_ => "" ; comp_adv = "" ; super_adv = "" ; adv = { s = \\_ => "" } } ; @@ -1421,11 +1465,12 @@ oper -- numerals param -- CardOrd = NCard | NOrd ; - Unit = one | ten | hundred | thousand | ten_thousand | hundred_thousand ; + Unit = one | eleven | ten | hundred | thousand | ten_thousand | hundred_thousand ; + Below8 = Yes | No8 | No9 | Ign ; oper -- Numerals are by default cardinal numbers but have a field for ordinal numbers - TDigit : Type = { s : Unit => Gender => Case => Str } ; -- ord : Unit => Agr => Str } ; - Numeral : Type = { s : Gender => Case => Str ; n : Number } ; -- ord : Unit => Agr => Str } ; + TDigit : Type = { s : Unit => Gender => Case => Str ; tenNext : Str ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ; + TNumeral : Type = { s : Gender => Case => Str ; d : Unit => Gender => Case => Str ; n : Number ; below8 : Below8 } ; -- ord : Unit => Agr => Str } ; -- Inflection for cardinal numbers cardFlex : Str -> Gender => Case => Str = @@ -1442,9 +1487,9 @@ oper => "tria" ; <_, Nom | Acc | Voc > => "tres" ; <_, Gen> => "trium" ; <_, Dat | Abl > => "tribus" } ; + tre + "centi" => \\g,c => regAdj (tre + "centus") ! g ! Pl ! c ; "milia" => table { - Neutr => table Case [ "milia" ; "milia" ; "milium" ; "milibus" ; "milibus" ; "milia" ] ; - _ => \\_ => nonExist + _ => table Case [ "milia" ; "milia" ; "milium" ; "milibus" ; "milibus" ; "milia" ] } ; _ => \\_,_ => c } ; From 841d1211933e843a5a2c2edbe2d987af375189d2 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Wed, 26 Jun 2019 14:32:26 +0200 Subject: [PATCH 02/11] add semicolon at end of the file --- src/api/ConstructorsLat.gf | 2 +- src/latin/api/mkMissing.hs | 10 ++++++++++ src/latin/api/mkMissing.sh | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/latin/api/mkMissing.hs create mode 100755 src/latin/api/mkMissing.sh diff --git a/src/api/ConstructorsLat.gf b/src/api/ConstructorsLat.gf index 7103ccb81..436adba25 100644 --- a/src/api/ConstructorsLat.gf +++ b/src/api/ConstructorsLat.gf @@ -1,4 +1,4 @@ --# -path=.:alltenses:prelude:../latin resource ConstructorsLat = Constructors with (Grammar = GrammarLat) ** - open MissingLat in {} + open MissingLat in {} ; diff --git a/src/latin/api/mkMissing.hs b/src/latin/api/mkMissing.hs new file mode 100644 index 000000000..83b1790c4 --- /dev/null +++ b/src/latin/api/mkMissing.hs @@ -0,0 +1,10 @@ +import PGF +import System.Environment + +main = + do + args <- getArgs -- first one should be pgf file and second one should be the file containing the errors/warnings about missing things + pgf <- PGF.readPGF (args !! 0) -- "tmp/Lang.pgf" + ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . map (last . words) . lines + let ts = [PGF.showType [] t | m <- ms, Just t <- [PGF.functionType pgf (PGF.mkCId m)]] + putStrLn $ unlines ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts] diff --git a/src/latin/api/mkMissing.sh b/src/latin/api/mkMissing.sh new file mode 100755 index 000000000..d809d2247 --- /dev/null +++ b/src/latin/api/mkMissing.sh @@ -0,0 +1,18 @@ +#!/bin/sh +echo "Create tmp dir" +mkdir tmp/ +echo "Remove old file" +echo "resource MissingAPILat = {} " > ../MissingAPILat.gf +echo "Look for missing functions" +# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp +gf -src -i .. -batch TryLat.gf 2>&1 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | grep -E "constant not found|no linearization of" | sort -u > tmp/MissingLat.tmp +echo "Compile grammar" +gf -src -make -i .. -D tmp ../LangLat.gf &> /dev/null +echo "Create placeholders for missing functions" +echo "resource MissingAPILat = open GrammarLat, Prelude in {" > ../MissingAPILat.gf +echo "" >> ../MissingAPILat.gf +echo "-- temporary definitions to enable the compilation of RGL API" >> ../MissingAPILat.gf +runghc mkMissing.hs "tmp/Lang.pgf" "tmp/MissingLat.tmp">> ../MissingAPILat.gf +echo "}" >> ../MissingAPILat.gf +echo "Cleanup" +rm -Rf tmp From 301f985602b159add7ecf49a0ff76fdf9ea01d20 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Wed, 26 Jun 2019 14:32:55 +0200 Subject: [PATCH 03/11] updated missinglat file --- src/latin/MissingLat.gf | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/src/latin/MissingLat.gf b/src/latin/MissingLat.gf index cebb075ef..269a950b4 100644 --- a/src/latin/MissingLat.gf +++ b/src/latin/MissingLat.gf @@ -6,17 +6,18 @@ oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ; oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ; +oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ; oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ; -oper BaseS : S -> S -> ListS = notYet "BaseS" ; oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; oper CompIP : IP -> IComp = notYet "CompIP" ; oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ; oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ; +oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ; +oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ; oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ; -oper ConjS : Conj -> ListS -> S = notYet "ConjS" ; +oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ; oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ; -oper ConsS : S -> ListS -> ListS = notYet "ConsS" ; oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ; oper EmbedQS : QS -> SC = notYet "EmbedQS" ; oper EmbedS : S -> SC = notYet "EmbedS" ; @@ -33,18 +34,11 @@ oper ImpersCl : VP -> Cl = notYet "ImpersCl" ; oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ; oper ImpVP : VP -> Imp = notYet "ImpVP" ; oper NumDigits : Digits -> Card = notYet "NumDigits" ; +oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ; oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ; +oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ; oper PossPron : Pron -> Quant = notYet "PossPron" ; -oper pot1 : Digit -> Sub100 = notYet "pot1" ; -oper pot110 : Sub100 = notYet "pot110" ; -oper pot111 : Sub100 = notYet "pot111" ; -oper pot1plus : Digit -> Sub10 -> Sub100 = notYet "pot1plus" ; -oper pot1to19 : Digit -> Sub100 = notYet "pot1to19" ; -oper pot2 : Sub10 -> Sub1000 = notYet "pot2" ; -oper pot2plus : Sub10 -> Sub100 -> Sub1000 = notYet "pot2plus" ; -oper pot3 : Sub1000 -> Sub1000000 = notYet "pot3" ; -oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ; oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ; @@ -78,27 +72,28 @@ oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; oper AdvQVP : VP -> IAdv -> QVP = notYet "AdvQVP" ; oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ; oper BaseAdV : AdV -> AdV -> ListAdV = notYet "BaseAdV" ; +oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ; oper BaseCN : CN -> CN -> ListCN = notYet "BaseCN" ; oper BaseDAP : DAP -> DAP -> ListDAP = notYet "BaseDAP" ; oper BaseIAdv : IAdv -> IAdv -> ListIAdv = notYet "BaseIAdv" ; oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ; -oper BaseS : S -> S -> ListS = notYet "BaseS" ; oper CompIP : IP -> IComp = notYet "CompIP" ; oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ; oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ; oper ComplSlashIP : VPSlash -> IP -> QVP = notYet "ComplSlashIP" ; +oper ConjAdv : Conj -> ListAdv -> Adv = notYet "ConjAdv" ; oper ConjAdV : Conj -> ListAdV -> AdV = notYet "ConjAdV" ; +oper ConjAP : Conj -> ListAP -> AP = notYet "ConjAP" ; oper ConjCN : Conj -> ListCN -> CN = notYet "ConjCN" ; oper ConjDet : Conj -> ListDAP -> Det = notYet "ConjDet" ; oper ConjIAdv : Conj -> ListIAdv -> IAdv = notYet "ConjIAdv" ; oper ConjRS : Conj -> ListRS -> RS = notYet "ConjRS" ; -oper ConjS : Conj -> ListS -> S = notYet "ConjS" ; oper ConsAdV : AdV -> ListAdV -> ListAdV = notYet "ConsAdV" ; +oper ConsAP : AP -> ListAP -> ListAP = notYet "ConsAP" ; oper ConsCN : CN -> ListCN -> ListCN = notYet "ConsCN" ; oper ConsDAP : DAP -> ListDAP -> ListDAP = notYet "ConsDAP" ; oper ConsIAdv : IAdv -> ListIAdv -> ListIAdv = notYet "ConsIAdv" ; oper ConsRS : RS -> ListRS -> ListRS = notYet "ConsRS" ; -oper ConsS : S -> ListS -> ListS = notYet "ConsS" ; oper CountNP : Det -> NP -> NP = notYet "CountNP" ; oper DetDAP : Det -> DAP = notYet "DetDAP" ; oper DetQuantOrd : Quant -> Num -> Ord -> Det = notYet "DetQuantOrd" ; @@ -112,21 +107,14 @@ oper IdetIP : IDet -> IP = notYet "IdetIP" ; oper IdetQuant : IQuant -> Num -> IDet = notYet "IdetQuant" ; oper ImpVP : VP -> Imp = notYet "ImpVP" ; oper NumDigits : Digits -> Card = notYet "NumDigits" ; +oper NumNumeral : Numeral -> Card = notYet "NumNumeral" ; oper OrdDigits : Digits -> Ord = notYet "OrdDigits" ; +oper OrdNumeral : Numeral -> Ord = notYet "OrdNumeral" ; oper OrdNumeralSuperl : Numeral -> A -> Ord = notYet "OrdNumeralSuperl" ; oper OrdSuperl : A -> Ord = notYet "OrdSuperl" ; oper PartNP : CN -> NP -> CN = notYet "PartNP" ; oper PossNP : CN -> NP -> CN = notYet "PossNP" ; oper PossPron : Pron -> Quant = notYet "PossPron" ; -oper pot1 : Digit -> Sub100 = notYet "pot1" ; -oper pot110 : Sub100 = notYet "pot110" ; -oper pot111 : Sub100 = notYet "pot111" ; -oper pot1plus : Digit -> Sub10 -> Sub100 = notYet "pot1plus" ; -oper pot1to19 : Digit -> Sub100 = notYet "pot1to19" ; -oper pot2 : Sub10 -> Sub1000 = notYet "pot2" ; -oper pot2plus : Sub10 -> Sub100 -> Sub1000 = notYet "pot2plus" ; -oper pot3 : Sub1000 -> Sub1000000 = notYet "pot3" ; -oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ; oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ; oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ; oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ; From 97e44c75c777ed93fe7dd522419049ef5a240e7d Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Wed, 26 Jun 2019 14:34:02 +0200 Subject: [PATCH 04/11] added scripts to regenerate missinglat --- src/latin/api/mkMissing.sh | 18 ------------------ src/latin/{api => }/mkMissing.hs | 0 src/latin/mkMissing.sh | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100755 src/latin/api/mkMissing.sh rename src/latin/{api => }/mkMissing.hs (100%) create mode 100755 src/latin/mkMissing.sh diff --git a/src/latin/api/mkMissing.sh b/src/latin/api/mkMissing.sh deleted file mode 100755 index d809d2247..000000000 --- a/src/latin/api/mkMissing.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -echo "Create tmp dir" -mkdir tmp/ -echo "Remove old file" -echo "resource MissingAPILat = {} " > ../MissingAPILat.gf -echo "Look for missing functions" -# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp -gf -src -i .. -batch TryLat.gf 2>&1 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | grep -E "constant not found|no linearization of" | sort -u > tmp/MissingLat.tmp -echo "Compile grammar" -gf -src -make -i .. -D tmp ../LangLat.gf &> /dev/null -echo "Create placeholders for missing functions" -echo "resource MissingAPILat = open GrammarLat, Prelude in {" > ../MissingAPILat.gf -echo "" >> ../MissingAPILat.gf -echo "-- temporary definitions to enable the compilation of RGL API" >> ../MissingAPILat.gf -runghc mkMissing.hs "tmp/Lang.pgf" "tmp/MissingLat.tmp">> ../MissingAPILat.gf -echo "}" >> ../MissingAPILat.gf -echo "Cleanup" -rm -Rf tmp diff --git a/src/latin/api/mkMissing.hs b/src/latin/mkMissing.hs similarity index 100% rename from src/latin/api/mkMissing.hs rename to src/latin/mkMissing.hs diff --git a/src/latin/mkMissing.sh b/src/latin/mkMissing.sh new file mode 100755 index 000000000..d4370fdae --- /dev/null +++ b/src/latin/mkMissing.sh @@ -0,0 +1,18 @@ +#!/bin/sh +echo "Create tmp dir" +mkdir tmp/ +echo "Remove old file" +echo "resource MissingLat = {} " > MissingLat.gf +echo "Look for missing functions" +# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp +gf -src -i .. -batch ../api/TryLat.gf 2>&1 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | grep -E "constant not found|no linearization of" | sort -u > tmp/MissingLat.tmp +echo "Compile grammar" +gf -src -make -D tmp LangLat.gf &> /dev/null +echo "Create placeholders for missing functions" +echo "resource MissingLat = open GrammarLat, Prelude in {" > MissingLat.gf +echo "" >> MissingLat.gf +echo "-- temporary definitions to enable the compilation of RGL API" >> MissingLat.gf +runghc mkMissing.hs "tmp/Lang.pgf" "tmp/MissingLat.tmp">> MissingLat.gf +echo "}" >> MissingLat.gf +echo "Cleanup" +rm -Rf tmp \ No newline at end of file From c71a79942cc15e52601294fae6108b157e6c050c Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Wed, 26 Jun 2019 14:53:25 +0200 Subject: [PATCH 05/11] basic implementation of SymbolLat --- src/latin/SymbolLat.gf | 46 +++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/src/latin/SymbolLat.gf b/src/latin/SymbolLat.gf index f1274951e..92654d642 100644 --- a/src/latin/SymbolLat.gf +++ b/src/latin/SymbolLat.gf @@ -7,22 +7,44 @@ lin IntPN i = {s = \\n,c => i.s ; g = Neutr} ; --- c FloatPN i = {s = \\n,c => i.s ; g = Neutr} ; --- c NumPN i = {s = \\n,c => i.s ! Neutr ! c; g = Neutr} ; --- c --- CNIntNP cn i = { --- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; --- a = agrgP3 Sg cn.g --- } ; --- CNSymbNP det cn xs = { + CNIntNP cn i = { + s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; + g = cn.g ; + n = Sg ; + adv = [] ; + det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ; + p = P3 ; + postap = { s = \\_ => [] } ; + preap = { s = \\_ => [] } ; + } ; + CNSymbNP det cn xs = { + s = \\c => (cn.s ! Sg ! Nom ++ xs.s ) ; + g = cn.g ; + n = det.n ; + adv = [] ; + det = det ; + p = P3 ; + postap = { s = \\_ => [] } ; + preap = { s = \\_ => [] } ; + } ; -- s = \\c => det.s ++ cn.s ! det.n ! c ++ xs.s ; -- a = agrgP3 det.n cn.g -- } ; --- CNNumNP cn i = { --- s = \\c => (cn.s ! Sg ! Nom ++ i.s) ; --- a = agrgP3 Sg cn.g --- } ; + -- } ; + CNNumNP cn i = { + s = \\c => (cn.s ! Sg ! Nom ++ i.s ! cn.g ! Nom ) ; + g = cn.g ; + n = Sg ; + adv = [] ; + det = { s = \\_,_ => [] ; n = Sg ; sp = \\_,_ => [] } ; + p = P3 ; + postap = { s = \\_ => [] } ; + preap = { s = \\_ => [] } ; + } ; -- SymbS sy = { s = \\_ => sy.s ; neg = \\_ => "" ; o = \\_ => "" ; p = PPos ; sadv = "" ; t = TPres ; v = \\_,_ => "" } ; -- - -- SymbNum sy = {s = sy.s ; n = Pl ; hasCard = True} ; + SymbNum sy = {s = \\_,_ => sy.s ; n = Pl } ; SymbOrd sy = { s = \\g,n,c => sy.s } ; -- does not inflect properly lincat @@ -31,6 +53,6 @@ lincat lin MkSymb s = s ; --- BaseSymb = infixSS "and" ; --- ConsSymb = infixSS "," ; + BaseSymb = infixSS "et" ; + ConsSymb = infixSS "et" ; } From 08ed0d8561b4469b8b626d57ab6d57f2b4978b56 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Wed, 26 Jun 2019 15:04:09 +0200 Subject: [PATCH 06/11] fix minor issues in SymbolicLat --- src/api/SymbolicLat.gf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/SymbolicLat.gf b/src/api/SymbolicLat.gf index 998364997..22d218867 100644 --- a/src/api/SymbolicLat.gf +++ b/src/api/SymbolicLat.gf @@ -1,5 +1,5 @@ ---# -path=.:../icelandic:../common:../abstract:../prelude +--# -path=.:../latin:../common:../abstract:../prelude resource SymbolicLat = Symbolic with (Symbol = SymbolLat), - (Grammar = GrammarLat) ; + (Grammar = GrammarLat) ** open MissingLat in {} ; From aed87223d1957f5e0e03d8161dd510f9c7faacd3 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Thu, 27 Jun 2019 00:09:01 +0200 Subject: [PATCH 07/11] revert removal of voc from common which led to problems --- src/latin/CatLat.gf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/latin/CatLat.gf b/src/latin/CatLat.gf index a1ce8a5be..75ef094c3 100644 --- a/src/latin/CatLat.gf +++ b/src/latin/CatLat.gf @@ -1,4 +1,4 @@ -concrete CatLat of Cat = CommonX-[Adv,Voc] ** open ResLat, ParamX, Prelude in { +concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in { flags optimize=all_subs ; From b12308fc59b687413746560359a6475c64049340 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Thu, 27 Jun 2019 00:10:24 +0200 Subject: [PATCH 08/11] minimal working version of the extendlat module --- src/latin/ExtendLat.gf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/latin/ExtendLat.gf b/src/latin/ExtendLat.gf index cf9be2707..3fd492dee 100644 --- a/src/latin/ExtendLat.gf +++ b/src/latin/ExtendLat.gf @@ -1 +1,9 @@ -concrete ExtendLat of Extend = ExtendFunctor with (Grammar=GrammarLat); \ No newline at end of file +concrete ExtendLat of Extend = CatLat ** ExtendFunctor-[VPS,ComplDirectVQ,ComplDirectVS,CompIQuant,EmptyRelSlash,ExistsNP,ExistCN,ExistMassCN,ExistPluralCN,GenModNP,PredAPVP,PredIAdvVP,SlashBareV2S,StrandQuestSlash,StrandRelSlash] with (Grammar=GrammarLat) ** open MissingLat in { + lincat + VPS = Comp ; + lin + -- ComplDirectVS : VS -> Utt -> VP ; -- say: "today" + ComplDirectVS vs utt = AdvVP (UseV ) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes + -- ComplDirectVQ : VQ -> Utt -> VP ; -- ask: "when" + ComplDirectVQ vq utt = AdvVP (UseV ) (lin Adv {s = \\_ => ":" ++ quoted utt.s}) ; -- DEFAULT complement added as Adv in quotes +} ; \ No newline at end of file From 91042916d3a00d44f2d2fec0d9b761bfbacf12c4 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Thu, 27 Jun 2019 17:46:29 +0200 Subject: [PATCH 09/11] add linref for VV --- src/latin/CatLat.gf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/latin/CatLat.gf b/src/latin/CatLat.gf index 75ef094c3..e0b694062 100644 --- a/src/latin/CatLat.gf +++ b/src/latin/CatLat.gf @@ -90,7 +90,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in { NP = \np -> np.preap.s ! Ag np.g np.n Nom ++ np.s ! Nom ++ np.postap.s ! Ag np.g np.n Nom ; VP = \vp -> vp.adv ++ vp.inf ! VInfActPres ++ vp.obj ++ vp.compl ! Ag Masc Sg Nom ; S = \s -> combineSentence s ! SPreO ! PreO ! CPreV ! SOV ; - V, VS, VQ, VA = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ; + V, VS, VQ, VA, VV = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ; V2, V2A, V2Q, V2S = \v -> v.act ! (VAct VSim (VPres VInd) Sg P1) ; Pron = \p -> p.pers.s ! PronNonDrop ! PronNonRefl ! Nom ; Conj = \c -> c.s1 ++ c.s2 ++ c.s3 ; From d9cded403058b63b953d99efe575d9a1e6c7ed34 Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Thu, 27 Jun 2019 17:46:46 +0200 Subject: [PATCH 10/11] some fixes in structurallat --- src/latin/StructuralLat.gf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/latin/StructuralLat.gf b/src/latin/StructuralLat.gf index 6d9c0afe7..146133261 100644 --- a/src/latin/StructuralLat.gf +++ b/src/latin/StructuralLat.gf @@ -11,21 +11,21 @@ concrete StructuralLat of Structural = CatLat ** almost_AdA, almost_AdN = ss "quasi" ; -- L... although_Subj = ss "quamquam" ; -- L... always_AdV = ss "semper" ; -- L... - and_Conj = mkConj [] "et" Pl Et ; -- L... + and_Conj = mkConj [] "et" Pl Et ; -- L177 -----b and_Conj = ss "and" ** {n = Pl} ; because_Subj = ss "cum" ; -- L... before_Prep = mkPrep "ante" Acc ; -- acc. L... behind_Prep = mkPrep "a tergo" Acc ; -- acc. L... between_Prep = mkPrep "inter" Acc ; -- acc. L... - both7and_DConj = mkConj "et" "et" Pl Et ; --L... + both7and_DConj = mkConj "et" "et" Pl Et ; --L177 but_PConj = ss "sed" ; -- L... by8agent_Prep = mkPrep "per" Abl ; -- L... by8means_Prep = mkPrep "" Abl ; -- L... - can8know_VV, can_VV = mkVV IrregLat.can_V True ; --L... + can8know_VV, can_VV = mkVV (mkV "scire" "scio" "scivi" "scitum") False ; --L... during_Prep = mkPrep "inter" Acc ; -- L... - either7or_DConj = mkConj "aut" "aut" Sg Aut ; -- L... + either7or_DConj = mkConj "aut" "aut" Sg Aut ; -- L177 everybody_NP = regNP "quisque" "quemque" "cuiusque" "cuique" "quoque" "quisque" Masc Sg ;-- regNP "quisquae" Sg ; -- L... - every_Det = mkDeterminer ( mkA "omnis" ) Pl ; -- Pons + every_Det = mkDeterminer ( mkA "omnis" ) Sg ; -- Pons everything_NP = regNP "omnia" "omnia" "omnium" "omnis" "omnis" "omnia" Neutr Pl ; --regNP "omnia" Pl ; -- L... everywhere_Adv = mkAdv "ubique" ; -- L... few_Det = mkDeterminer ( mkA "paulus" ) Pl ; -- L... @@ -55,7 +55,7 @@ concrete StructuralLat of Structural = CatLat ** on_Prep = mkPrep "in" Acc ; -- L... ------ one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED only_Predet = ss "solum" ; -- L... - or_Conj = mkConj [] "aut" Sg Aut ; -- L... + or_Conj = mkConj [] "aut" Sg Aut ; -- L177 otherwise_PConj = ss "praeterea" ; -- Pons part_Prep = mkPrep [] Gen ; -- Bayer-Lindauer 127 please_Voc = ss "queso" ; -- L... @@ -101,7 +101,7 @@ concrete StructuralLat of Structural = CatLat ** -----b whichPl_IDet = mkDeterminer Pl ["which"] ; -----b whichSg_IDet = mkDeterminer Sg ["which"] ; whoSg_IP = { s =pronForms "quis" "quem" "cuius" "cui" "quo" ; n = Sg } ; -- only feminine or masculine Bayer-Lindauer 59.1 - whoPl_IP = { s = \\_ => "" ; n = Pl } ; -- no plural forms Bayer-Lindauer 59.1 + whoPl_IP = { s = pronForms "qui" "quos" "quorum" "quibus" "quibus" ; n = Pl } ; why_IAdv = ss "cur" ; -- L... without_Prep = mkPrep "sine" Abl ; -- abl. L.. From dfbe4b9d93dc48b5ad924510bde19619f35c40dc Mon Sep 17 00:00:00 2001 From: Herbert Lange Date: Thu, 27 Jun 2019 18:31:11 +0200 Subject: [PATCH 11/11] some work on questions --- src/latin/CatLat.gf | 2 +- src/latin/QuestionLat.gf | 43 ++++++++++++++++++++++++---------------- src/latin/SentenceLat.gf | 12 +++++++---- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/latin/CatLat.gf b/src/latin/CatLat.gf index e0b694062..273a0d607 100644 --- a/src/latin/CatLat.gf +++ b/src/latin/CatLat.gf @@ -20,7 +20,7 @@ concrete CatLat of Cat = CommonX-[Adv] ** open ResLat, ParamX, Prelude in { ---- Question -- -- TO FIX - QCl = Clause ; -- {s : ResLat.Tense => Anteriority => Polarity => QForm => Str } ; + QCl = Clause ** { q : Str } ; IP = {s : Case => Str ; n : Number} ; IComp = {s : Str} ; IDet = Determiner ; --{s : Str ; n : Number} ; diff --git a/src/latin/QuestionLat.gf b/src/latin/QuestionLat.gf index 6a039d248..f511d9e95 100644 --- a/src/latin/QuestionLat.gf +++ b/src/latin/QuestionLat.gf @@ -4,19 +4,21 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in { --` lin -- QuestCl : Cl -> QCl ; -- does John walk - -- TO FIX - -- QuestCl cl = { - -- s = \\t,a,p => - -- let cls = (combineClause cl PreS).s ! t ! a ! p - -- in table { - -- QDir => cls ! VQTrue ! VSO ! PreV ; -- cls ! OQuest ; - -- QIndir => "" -- "if" ++ cls ! ODir -- TODO - -- } - -- } ; + QuestCl cl = cl ** { + v = \\t,a,_,ap,cp => cl.v ! t ! a ! VQTrue ! ap ! cp ; + q = "" + } ; -- QuestVP : IP -> VP -> QCl ; -- who walks - -- TO FIX - -- QuestVP ip vp = + QuestVP ip vp = + { + s = \\_ => "" ; + adv = "" ; + neg = \\_,_ => "" ; + o = \\_ => vp.obj ; + q = ip.s ! Nom ; + v = \\t,a,_,ap,cp => vp.s ! VAct (anteriorityToVAnter a) (tenseToVTense t) ip.n P3 ! VQFalse + } ; -- let qcl = mkQuestion { s = ip.s ! Nom } ( mkClause emptyNP vp ) -- in {s = \\t,a,b,qd => qcl.s ! t ! a ! b ! qd} ; @@ -26,12 +28,19 @@ concrete QuestionLat of Question = CatLat ** open ResLat, IrregLat, Prelude in { -- QuestSlash ip slash = -- mkQuestion (ss ( ip.s ! Acc) ) slash ; - -- TO FIX - -- QuestIAdv iadv cl = mkQuestion iadv cl ; --- - -- TO FIX - -- QuestIComp icomp np = - -- mkQuestion icomp (mkClause np (predV be_V) ) ; + -- QuestIAdv : IAdv -> Cl -> QCl + QuestIAdv iadv cl = cl ** { q = iadv.s } ; + + -- QuestIComp : IComp -> NP -> QCl ; + QuestIComp icomp np = + { + s = \\_ => "" ; + adv = "" ; + neg = \\_,_ => "" ; + o = \\_ => np.s ! Nom ; + q = icomp.s ; + v = \\t,a,_,ap,cp => esseAux.act ! VAct (anteriorityToVAnter a) (tenseToVTense t) np.n P3 ; + } ; -- -- -- PrepIP p ip = {s = p.s ++ ip.s ! Acc} ; diff --git a/src/latin/SentenceLat.gf b/src/latin/SentenceLat.gf index 9e09bff47..f05828642 100644 --- a/src/latin/SentenceLat.gf +++ b/src/latin/SentenceLat.gf @@ -47,10 +47,14 @@ concrete SentenceLat of Sentence = CatLat ** open Prelude, ResLat in { UseCl t p cl = -- Temp -> Pol-> Cl -> S (combineClause cl (lin Tense t) t.a (lin Pol p) VQFalse) ; - -- TO FIX - --UseQCl t p cl = - -- s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p ! q - -- { s = \\q => combineSentence (combineClause cl t t.a p VQFalse) ! PreV ! VSO } ; + -- UseQCl : Temp -> Pol -> QCl -> QS -- maybe use mkQuestion + UseQCl t p cl = + { + s = \\q => case q of { + QDir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV ++ cl.o ! PreV ; + QIndir => t.s ++ p.s ++ cl.q ++ cl.s ! PreV ++ cl.o ! PreV ++ cl.v ! t.t ! t.a ! VQTrue ! PreV ! CPostV + } + } ; -- UseRCl t p cl = { -- s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;