forked from GitHub/gf-core
more accurate treatment of negative "have" clauses in Phrasebook
This commit is contained in:
@@ -134,12 +134,16 @@ abstract Sentences = Numeral ** {
|
||||
-- Actions are typically language-dependent, not only lexically but also
|
||||
-- structurally. However, these ones are mostly functorial.
|
||||
|
||||
AHave : Person -> Object -> Action ; -- you have pizzas
|
||||
SHave : Person -> Object -> Sentence ; -- you have beer
|
||||
SHaveNo : Person -> Kind -> Sentence ; -- you have no apples
|
||||
SHaveNoMass : Person -> MassKind -> Sentence ; -- you have no beer
|
||||
QDoHave : Person -> Object -> Question ; -- do you have beer
|
||||
|
||||
AHaveCurr : Person -> Currency -> Action ; -- you have dollars
|
||||
ACitizen : Person -> Citizenship -> Action ; -- you are Swedish
|
||||
ABePlace : Person -> Place -> Action ; -- you are in the bar
|
||||
|
||||
ByTransp : Transport -> ByTransport ; -- by bus
|
||||
ByTransp : Transport -> ByTransport ; -- by bus
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
concrete SentencesDut of Sentences = NumeralDut ** SentencesI with
|
||||
concrete SentencesDut of Sentences = NumeralDut ** SentencesI -
|
||||
[SHaveNo,SHaveNoMass]
|
||||
with
|
||||
(Syntax = SyntaxDut),
|
||||
(Symbolic = SymbolicDut),
|
||||
(Lexicon = LexiconDut) ;
|
||||
(Lexicon = LexiconDut) ** open Prelude, SyntaxDut in {
|
||||
|
||||
lin
|
||||
SHaveNo p k = mkS (mkCl p.name have_V2 (mkNP no_Quant plNum k)) ;
|
||||
SHaveNoMass p k = mkS (mkCl p.name have_V2 (mkNP no_Quant k)) ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [
|
||||
QProp,
|
||||
IFemale, YouFamFemale, YouPolFemale,
|
||||
PYesToNo,
|
||||
SHaveNo,SHaveNoMass,
|
||||
Superlative
|
||||
]
|
||||
with
|
||||
(Syntax = SyntaxFre),
|
||||
(Symbolic = SymbolicFre),
|
||||
(Lexicon = LexiconFre) **
|
||||
open SyntaxFre, ExtraFre, Prelude in {
|
||||
open SyntaxFre, ExtraFre, (P = ParadigmsFre), Prelude in {
|
||||
|
||||
lincat
|
||||
Superlative = {s : Ord ; isPre : Bool} ;
|
||||
@@ -23,4 +24,11 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [
|
||||
{name = mkNP youPol8fem_Pron ; isPron = True ; poss = mkQuant youPol_Pron};
|
||||
|
||||
PYesToNo = mkPhrase (lin Utt (ss "si")) ;
|
||||
|
||||
SHaveNo p k = mkS negativePol (mkCl p.name have_de (mkNP aPl_Det k)) ;
|
||||
SHaveNoMass p k = mkS negativePol (mkCl p.name (ComplCN have_de k)) ;
|
||||
|
||||
oper
|
||||
have_de : V2 = P.mkV2 (P.mkV have_V2) P.genitive ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
concrete SentencesGer of Sentences = NumeralGer ** SentencesI - [PYesToNo] with
|
||||
concrete SentencesGer of Sentences = NumeralGer ** SentencesI -
|
||||
[PYesToNo,SHaveNo,SHaveNoMass] with
|
||||
(Syntax = SyntaxGer),
|
||||
(Symbolic = SymbolicGer),
|
||||
(Lexicon = LexiconGer) ** open Prelude in {
|
||||
(Lexicon = LexiconGer) ** open Prelude, SyntaxGer in {
|
||||
|
||||
lin PYesToNo = mkPhrase (lin Utt (ss "doch")) ;
|
||||
lin
|
||||
PYesToNo = mkPhrase (lin Utt (ss "doch")) ;
|
||||
SHaveNo p k = mkS (mkCl p.name have_V2 (mkNP no_Quant plNum k)) ;
|
||||
SHaveNoMass p k = mkS (mkCl p.name have_V2 (mkNP no_Quant k)) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -123,7 +123,11 @@ incomplete concrete SentencesI of Sentences = Numeral **
|
||||
|
||||
NNumeral n = mkCard <lin Numeral n : Numeral> ;
|
||||
|
||||
AHave p obj = mkCl p.name have_V2 obj ;
|
||||
SHave p obj = mkS (mkCl p.name have_V2 obj) ;
|
||||
SHaveNo p k = mkS negativePol (mkCl p.name have_V2 (mkNP aPl_Det k)) ;
|
||||
SHaveNoMass p m = mkS negativePol (mkCl p.name have_V2 (mkNP m)) ;
|
||||
QDoHave p obj = mkQS (mkQCl (mkCl p.name have_V2 obj)) ;
|
||||
|
||||
AHaveCurr p curr = mkCl p.name have_V2 (mkNP aPl_Det curr) ;
|
||||
ACitizen p n = mkCl p.name n ;
|
||||
ABePlace p place = mkCl p.name place.at ;
|
||||
|
||||
@@ -38,6 +38,7 @@ function empty_id(tag,id) { return empty(tag,"id",id); }
|
||||
function empty_class(tag,cls) { return empty(tag,"class",cls); }
|
||||
|
||||
function div_id(id) { return empty_id("div",id); }
|
||||
function span_id(id) { return empty_id("span",id); }
|
||||
|
||||
function wrap(tag,contents) {
|
||||
var el=empty(tag);
|
||||
@@ -119,7 +120,7 @@ function swap(a,i,j) { // Note: this doesn't work on strings.
|
||||
|
||||
function sort(a) {
|
||||
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/sort
|
||||
return a.sort;
|
||||
return a.sort();
|
||||
/* // Note: this doesn't work on strings.
|
||||
for(var i=0;i<a.length-1;i++) {
|
||||
var min=i;
|
||||
|
||||
Reference in New Issue
Block a user