1
0
forked from GitHub/gf-core

made articles and mass syntactic in exper

This commit is contained in:
aarne
2008-04-22 12:34:45 +00:00
parent 30f221cbb4
commit 09a82c8abb
6 changed files with 55 additions and 42 deletions

View File

@@ -24,10 +24,15 @@ fun
OrdInt : Int -> Ord ; -- 51st (DEPRECATED)
-- 20/4
DetSg : Art -> Ord -> Det ; -- the best man
DetPl : Art -> Num -> Ord -> Det ; -- the five best men
DetSg : Quant -> Ord -> Det ; -- the best man
DetPl : Quant -> Num -> Ord -> Det ; -- the five best men
NoNum : Num ;
-- 22/4
DefArt : Quant ; -- the (house), the (houses)
IndefArt : Quant ; -- a (house), (houses)
MassDet : Quant ; -- (beer)
-- from Structural 19/4/2008
that_NP : NP ;

View File

@@ -80,7 +80,6 @@ abstract Cat = Common ** {
Det ; -- determiner phrase e.g. "those seven"
Predet ; -- predeterminer (prefixed Quant) e.g. "all"
Quant ; -- quantifier ('nucleus' of Det) e.g. "this/these"
Art ; -- article (non-independent Quant) e.g. "the"
Num ; -- cardinal number (used with QuantPl) e.g. "seven"
Ord ; -- ordinal number (used in Det) e.g. "seventh"

View File

@@ -36,28 +36,25 @@ abstract Noun = Cat ** {
-- (This is modified from CLE by further dividing their $Num$ into
-- cardinal and ordinal.)
DetArt : Art -> Num -> Ord -> Det ; -- the five best men
DetQuant : Quant -> Num -> Ord -> Det ; -- the five best men
-- Notice that $DetPl$ can still result in a singular determiner, because
-- "one" is a numeral: "this one man".
-- Quantifiers can form noun phrases directly.
DetQuant : Quant -> Num -> Ord -> NP ; -- these five
-- Quantifiers can also be used in the same way as articles.
ArtQuant : Quant -> Art ;
DetNP : Quant -> Num -> Ord -> NP ; -- these five
-- Pronouns have possessive forms. Genitives of other kinds
-- of noun phrases are not given here, since they are not possible
-- in e.g. Romance languages. They can be found in
-- [``Extra`` ../abstract/Extra.gf].
PossPron : Pron -> Art ; -- my (house)
PossPron : Pron -> Quant ; -- my (house)
-- All parts of the determiner can be empty, except $Quant$, which is
-- the "kernel" of a determiner.
-- the "kernel" of a determiner. It is, however, the $Num$ that determines
-- the inherent numbers.
NumSg : Num ;
NumPl : Num ;
@@ -90,18 +87,18 @@ abstract Noun = Cat ** {
OrdNumeralNP : Numeral -> NP ; -- the fiftieth
NumNumeralNP : Numeral -> NP ; -- fifty
-- Definite and indefinite constructions are sometimes realized as
-- Definite and indefinite noun phrases are sometimes realized as
-- neatly distinct words (Spanish "un, unos ; el, los") but also without
-- any particular word (Finnish; Swedish definites).
DefArt : Art ; -- the (house), the (houses)
IndefArt : Art ; -- a (house), (houses)
DefNP : Num -> Ord -> CN -> NP ; -- the (house), the (houses)
IndefNP : Num -> Ord -> CN -> NP ; -- a (house), (houses)
-- Nouns can be used without an article as mass nouns. The resource does
-- not distinguish mass nouns from other common nouns, which can result
-- in semantically odd expressions.
MassDet : Art ; -- (beer)
MassNP : CN -> NP ; -- (beer)
-- Other determiners are defined in [Structural Structural.html].

View File

@@ -51,6 +51,19 @@ concrete BackwardEng of Backward = CatEng ** open ResEng in {
NoNum = {s = []; n = Pl } ;
DefArt = {s = \\_ => artDef} ;
IndefArt = {
s = table {
Sg => artIndef ;
Pl => []
}
} ;
MassDet = {s = \\_ => []} ;
-- from Structural 19/4/2008
that_NP = regNP "that" Sg ;

View File

@@ -51,8 +51,8 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
NP, Pron = {s : Case => Str ; a : Agr} ;
Det = {s : Str ; n : Number} ;
Predet, Ord = {s : Str} ;
Num = {s : Str; n : Number} ;
Quant, Art = {s : Number => Str} ;
Num = {s : Str; n : Number ; isNum : Bool} ;
Quant = {s : Number => Str} ;
-- Numeral

View File

@@ -31,39 +31,29 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
a = np.a
} ;
DetArt quant num ord = {
DetQuant quant num ord = {
s = quant.s ! num.n ++ num.s ++ ord.s ;
n = num.n
} ;
DetQuant quant num ord = {
DetNP quant num ord = {
s = \\c => quant.s ! num.n ++ num.s ++ ord.s ; ---- case
a = agrP3 num.n
} ;
ArtQuant q = q ;
PossPron p = {s = \\_ => p.s ! Gen} ;
NumSg = {s = []; n = Sg} ;
NumPl = {s = []; n = Pl} ;
NumSg = {s = []; n = Sg ; isNum = False} ;
NumPl = {s = []; n = Pl ; isNum = False} ;
NoOrd = {s = []} ;
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
--table (Predef.Ints 1 * Predef.Ints 9) {
-- <0,1> => Sg ;
-- _ => Pl -- DEPRECATED
-- } ! <1,2> ---- parser bug (AR 2/6/2007)
-- ---- <n.size,n.last>
-- } ;
NumDigits n = {s = n.s ! NCard ; n = n.n ; isNum = True} ;
OrdDigits n = {s = n.s ! NOrd} ;
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n ; isNum = True} ;
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
AdNum adn num = {s = adn.s ++ num.s; n = num.n } ;
AdNum adn num = {s = adn.s ++ num.s ; n = num.n ; isNum = True} ; ----
OrdSuperl a = {s = a.s ! AAdj Superl} ;
@@ -82,16 +72,25 @@ concrete NounEng of Noun = CatEng ** open ResEng, Prelude in {
a = agrP3 n.n
} ;
DefArt = {s = \\_ => artDef} ;
IndefArt = {
s = table {
Sg => artIndef ;
Pl => []
}
DefNP num ord cn = {
s = \\c => artDef ++ num.s ++ ord.s ++ cn.s ! num.n ! c ;
a = agrP3 num.n
} ;
MassDet = {s = \\_ => []} ;
IndefNP num ord cn =
let an = case <num.n,num.isNum> of {
<Sg,False> => artIndef ;
_ => []
}
in {
s = \\c => an ++ num.s ++ ord.s ++ cn.s ! num.n ! c ;
a = agrP3 num.n
} ;
MassNP cn = {
s = cn.s ! Sg ;
a = agrP3 Sg
} ;
UseN n = n ;
UseN2 n = n ;