mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
extended Attempto with some constructs
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
abstract Attempto = Symbols ** {
|
abstract Attempto =
|
||||||
|
Numeral, Symbols ** {
|
||||||
|
|
||||||
flags startcat = ACEText ;
|
flags startcat = ACEText ;
|
||||||
|
|
||||||
cat CN ;
|
cat CN ;
|
||||||
cat NP ;
|
cat NP ;
|
||||||
cat Card ;
|
cat Card ;
|
||||||
cat Numeral ;
|
---cat Numeral ;
|
||||||
cat PN ;
|
cat PN ;
|
||||||
cat A ;
|
cat A ;
|
||||||
cat A2 ;
|
cat A2 ;
|
||||||
@@ -54,10 +55,10 @@ fun noMassNP : MCN -> NP ;
|
|||||||
fun allMassNP : MCN -> NP ;
|
fun allMassNP : MCN -> NP ;
|
||||||
fun notAllMassNP : MCN -> NP ;
|
fun notAllMassNP : MCN -> NP ;
|
||||||
|
|
||||||
fun one_Card : Card ;
|
---fun one_Card : Card ;
|
||||||
fun two_Card : Card ;
|
---fun two_Card : Card ;
|
||||||
fun five_Card : Card ;
|
---fun five_Card : Card ;
|
||||||
fun ten_Card : Card ;
|
---fun ten_Card : Card ;
|
||||||
|
|
||||||
|
|
||||||
fun pnNP : PN -> NP ;
|
fun pnNP : PN -> NP ;
|
||||||
@@ -234,7 +235,7 @@ fun whoseIP : CN -> IP ; -- whose dog
|
|||||||
|
|
||||||
-- 3.6
|
-- 3.6
|
||||||
|
|
||||||
fun impVP : NP -> VP -> Text ; -- John, go to the bank!
|
fun np_impVP : NP -> VP -> Text ; -- John, go to the bank!
|
||||||
|
|
||||||
-- 4
|
-- 4
|
||||||
|
|
||||||
@@ -246,6 +247,14 @@ fun baseText : Text -> ACEText ;
|
|||||||
fun sText : S -> Text ;
|
fun sText : S -> Text ;
|
||||||
fun qsText : QS -> Text ;
|
fun qsText : QS -> Text ;
|
||||||
|
|
||||||
|
-- more
|
||||||
|
|
||||||
|
fun npVP : NP -> VP ; -- is a bank
|
||||||
|
fun impVP : VP -> Text ; -- go to the bank!
|
||||||
|
fun numeralCard : Numeral -> Card ; -- fifteen banks
|
||||||
|
fun digitsCard : Digits -> Card ; -- 8 banks
|
||||||
|
fun have_V2 : V2 ; -- has (an apple)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:present
|
--# -path=.:present
|
||||||
|
|
||||||
concrete AttemptoEng of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoEng of Attempto = SymbolsC,NumeralEng ** AttemptoI with
|
||||||
(Syntax = SyntaxEng),
|
(Syntax = SyntaxEng),
|
||||||
(Symbolic = SymbolicEng),
|
(Symbolic = SymbolicEng),
|
||||||
(LexAttempto = LexAttemptoEng) ;
|
(LexAttempto = LexAttemptoEng) ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:present
|
--# -path=.:present
|
||||||
|
|
||||||
concrete AttemptoFin of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoFin of Attempto = NumeralFin, SymbolsC ** AttemptoI with
|
||||||
(Syntax = SyntaxFin),
|
(Syntax = SyntaxFin),
|
||||||
(Symbolic = SymbolicFin),
|
(Symbolic = SymbolicFin),
|
||||||
(LexAttempto = LexAttemptoFin) ;
|
(LexAttempto = LexAttemptoFin) ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:present
|
--# -path=.:present
|
||||||
|
|
||||||
concrete AttemptoFre of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoFre of Attempto = NumeralFre, SymbolsC ** AttemptoI with
|
||||||
(Syntax = SyntaxFre),
|
(Syntax = SyntaxFre),
|
||||||
(Symbolic = SymbolicFre),
|
(Symbolic = SymbolicFre),
|
||||||
(LexAttempto = LexAttemptoFre) ;
|
(LexAttempto = LexAttemptoFre) ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:/Users/aarne/GF/next-lib/present
|
--# -path=.:/Users/aarne/GF/next-lib/present
|
||||||
|
|
||||||
concrete AttemptoGer of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoGer of Attempto = SymbolsC, NumeralGer ** AttemptoI with
|
||||||
(Syntax = SyntaxGer),
|
(Syntax = SyntaxGer),
|
||||||
(Symbolic = SymbolicGer),
|
(Symbolic = SymbolicGer),
|
||||||
(LexAttempto = LexAttemptoGer) ;
|
(LexAttempto = LexAttemptoGer) ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
incomplete concrete AttemptoI of Attempto = SymbolsC ** open
|
incomplete concrete AttemptoI of Attempto = SymbolsC, Numeral ** open
|
||||||
Syntax,
|
Syntax,
|
||||||
Symbolic,
|
Symbolic,
|
||||||
Prelude,
|
Prelude,
|
||||||
@@ -8,7 +8,7 @@ in {
|
|||||||
lincat CN = Syntax.CN ;
|
lincat CN = Syntax.CN ;
|
||||||
lincat NP = Syntax.NP ;
|
lincat NP = Syntax.NP ;
|
||||||
lincat Card = Syntax.Card ;
|
lincat Card = Syntax.Card ;
|
||||||
lincat Numeral = Syntax.Numeral ;
|
--lincat Numeral = Syntax.Numeral ;
|
||||||
lincat PN = Syntax.PN ;
|
lincat PN = Syntax.PN ;
|
||||||
lincat A = Syntax.A ;
|
lincat A = Syntax.A ;
|
||||||
lincat A2 = Syntax.A2 ;
|
lincat A2 = Syntax.A2 ;
|
||||||
@@ -32,7 +32,7 @@ lincat ACEText = Syntax.Text ;
|
|||||||
lincat RP = Syntax.RP ;
|
lincat RP = Syntax.RP ;
|
||||||
|
|
||||||
lincat MCN = Syntax.CN ;
|
lincat MCN = Syntax.CN ;
|
||||||
lincat PP = Adv ;
|
lincat PP = Syntax.Adv ;
|
||||||
|
|
||||||
lin aNP = mkNP a_Art ;
|
lin aNP = mkNP a_Art ;
|
||||||
lin theNP = mkNP the_Art ;
|
lin theNP = mkNP the_Art ;
|
||||||
@@ -57,10 +57,10 @@ lin allMassNP cn = mkNP all_Predet (mkNP cn) ;
|
|||||||
lin noMassNP = mkNP no_Quant ;
|
lin noMassNP = mkNP no_Quant ;
|
||||||
lin notAllMassNP cn = mkNP not_Predet (mkNP all_Predet (mkNP cn)) ;
|
lin notAllMassNP cn = mkNP not_Predet (mkNP all_Predet (mkNP cn)) ;
|
||||||
|
|
||||||
lin one_Card = mkCard n1_Numeral ;
|
---lin one_Card = mkCard n1_Numeral ;
|
||||||
lin two_Card = mkCard n2_Numeral ;
|
---lin two_Card = mkCard n2_Numeral ;
|
||||||
lin five_Card = mkCard n5_Numeral ;
|
---lin five_Card = mkCard n5_Numeral ;
|
||||||
lin ten_Card = mkCard n10_Numeral ;
|
---lin ten_Card = mkCard n10_Numeral ;
|
||||||
|
|
||||||
lin pnNP = mkNP ;
|
lin pnNP = mkNP ;
|
||||||
lin intNP = symb ;
|
lin intNP = symb ;
|
||||||
@@ -159,7 +159,6 @@ lin more_thanVP ap np = mkVP (mkAP more_CAdv ap np) ;
|
|||||||
---- John is as fond-of Mary as of Sue
|
---- John is as fond-of Mary as of Sue
|
||||||
---- John is more fond-of Mary than of Sue
|
---- John is more fond-of Mary than of Sue
|
||||||
|
|
||||||
lincat PP = Adv ;
|
|
||||||
--lincat [PP] = Adv ;
|
--lincat [PP] = Adv ;
|
||||||
|
|
||||||
--lin BasePP p = p ;
|
--lin BasePP p = p ;
|
||||||
@@ -235,7 +234,7 @@ lin whoseIP = mkIP whose_IDet ;
|
|||||||
|
|
||||||
-- 3.6
|
-- 3.6
|
||||||
|
|
||||||
lin impVP np vp = mkText (mkPhr (mkUtt (mkImp vp)) (mkVoc np)) exclMarkPunct ;
|
lin np_impVP np vp = mkText (mkPhr (mkUtt (mkImp vp)) (mkVoc np)) exclMarkPunct ;
|
||||||
---- John, go to the bank!
|
---- John, go to the bank!
|
||||||
|
|
||||||
|
|
||||||
@@ -244,6 +243,15 @@ lin baseText t = t ;
|
|||||||
lin sText = mkText ;
|
lin sText = mkText ;
|
||||||
lin qsText = mkText ;
|
lin qsText = mkText ;
|
||||||
|
|
||||||
|
|
||||||
|
--- more
|
||||||
|
|
||||||
|
lin npVP = mkVP ;
|
||||||
|
lin impVP vp = mkText (mkImp vp) ;
|
||||||
|
lin numeralCard n = mkCard <lin Numeral n : Numeral> ;
|
||||||
|
lin digitsCard n = mkCard <lin Digits n : Digits> ;
|
||||||
|
lin have_V2 = Syntax.have_V2 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:present
|
--# -path=.:present
|
||||||
|
|
||||||
concrete AttemptoIta of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoIta of Attempto = NumeralIta, SymbolsC ** AttemptoI with
|
||||||
(Syntax = SyntaxIta),
|
(Syntax = SyntaxIta),
|
||||||
(Symbolic = SymbolicIta),
|
(Symbolic = SymbolicIta),
|
||||||
(LexAttempto = LexAttemptoIta) ;
|
(LexAttempto = LexAttemptoIta) ;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--# -path=.:present
|
--# -path=.:present
|
||||||
|
|
||||||
concrete AttemptoSwe of Attempto = SymbolsC ** AttemptoI with
|
concrete AttemptoSwe of Attempto = NumeralSwe, SymbolsC ** AttemptoI with
|
||||||
(Syntax = SyntaxSwe),
|
(Syntax = SyntaxSwe),
|
||||||
(Symbolic = SymbolicSwe),
|
(Symbolic = SymbolicSwe),
|
||||||
(LexAttempto = LexAttemptoSwe) ;
|
(LexAttempto = LexAttemptoSwe) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user