1
0
forked from GitHub/gf-core

changed CompoundCN to CompoundN with type N -> N -> N to reduce overgeneration and re-enable ambiguity

This commit is contained in:
aarne
2014-05-29 11:01:40 +00:00
parent 6275b9c46a
commit 0e554cf7df
25 changed files with 40 additions and 33 deletions

View File

@@ -47,14 +47,14 @@ fun
GenIP : IP -> IQuant ; -- whose
GenRP : Num -> CN -> RP ; -- whose car(s)
CompoundCN : N -> CN -> CN ; -- control system / controls system / control-system
CompoundN : N -> N -> N ; -- control system / controls system / control-system
CompoundAP : N -> A -> AP ; -- language independent / language-independent
GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
PresPartAP : VP -> AP ; -- sleeping (man), (man) sleeping in the car
PresPartAP : VP -> AP ; -- sleeping (man), (man) sleeping in the car
PastPartAP : VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
PastPartAgentAP : VPSlash -> NP -> AP ; -- (opportunity) lost by the company

View File

@@ -36,8 +36,9 @@ lin
EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\nf => (noun.rel ! nform2aform nf cn.g) ++ (cn.s ! (indefNForm nf)) ;
rel = \\af => (noun.rel ! af) ++ (cn.rel ! af) ; ---- is this correct? AR 29/5/2014
g = cn.g
} ;

View File

@@ -44,7 +44,7 @@ lin
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
CompoundCN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
CompoundN noun cn = {s = noun.s ++ cn.s ; c = cn.c} ; ----
CompoundAP noun adj = complexAP (noun.s ++ possessive_s ++ adj.s) ; ----
GerundN v = {

View File

@@ -64,8 +64,8 @@ lin
PredVPosv = G.PredVP;
PredVPovs = G.PredVP;
CompoundCN noun cn = {
s = \\af,nf => glue (noun.s ! NF Sg Nom) (cn.s ! af ! nf) ;
CompoundN noun cn = {
s = \\nf => glue (noun.s ! NF Sg Nom) (cn.s ! nf) ; ---- TODO: introduce compound form
g = cn.g
} ;

View File

@@ -33,7 +33,7 @@ lin
EmptyRelSlash = E.EmptyRelSlash ;
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = (\\n,c => noun.s ! Sg ! Nom ++ cn.s ! n ! c)
| (\\n,c => noun.s ! Pl ! Nom ++ cn.s ! n ! c)
| (\\n,c => noun.s ! Sg ! Nom ++ Predef.BIND ++ "-" ++ Predef.BIND ++ cn.s ! n ! c)

View File

@@ -47,7 +47,7 @@ lin
}
) ;
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\nf => noun.s ! 10 ++ BIND ++ cn.s ! nf ;
h = cn.h
} ;

View File

@@ -48,7 +48,7 @@ lin
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\n => cn.s ! n ++ elisDe ++ noun.s ! Sg ;
g = cn.g
} ;

View File

@@ -63,8 +63,13 @@ lin
PredVPosv = G.PredVP;
PredVPovs = G.PredVP;
CompoundCN noun cn = {
s = \\a,n,c => glue (noun.s ! Sg ! Nom) (cn.s ! a ! n ! c) ;
CompoundN noun cn = {
s = \\n,c => glue noun.co (cn.uncap.s ! n ! c) ;
co = glue noun.co (cn.uncap.co) ;
uncap = {
s = \\n,c => glue noun.uncap.co (cn.uncap.s ! n ! c) ;
co = glue noun.uncap.co (cn.uncap.co)
} ;
g = cn.g
} ;

View File

@@ -37,7 +37,7 @@ lin
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\n,c => cn.s ! Sg ! Dir ++ noun.s ! n ! c;
g = cn.g
} ;

View File

@@ -48,7 +48,7 @@ lin
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\n => cn.s ! n ++ "di" ++ noun.s ! Sg ;
g = cn.g
} ;

View File

@@ -48,7 +48,7 @@ lin
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\n => cn.s ! n ++ "de" ++ noun.s ! Sg ;
g = cn.g
} ;

View File

@@ -35,10 +35,11 @@ lin
lin
CompoundCN noun cn = {
CompoundN noun cn = {
s = \\n,d,c => noun.co ++ BIND ++ cn.s ! n ! d ! c ;
g = cn.g ;
isMod = False
co = noun.co ++ BIND ++ cn.s ! Sg ! Indef ! Gen -- (last+bil)s + chaufför
| noun.co ++ cn.co ;
g = cn.g
} ;
CompoundAP noun adj = {

View File

@@ -24,7 +24,7 @@ abstract Translate =
Construction,
Extensions [
CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS
---- , PastPartAP, PastPartAgentAP, PresPartAP ---- not yet available for all languages
],

View File

@@ -24,7 +24,7 @@ concrete TranslateBul of Translate =
DocumentationBul,
ChunkBul,
ExtensionsBul [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
ExtensionsBul [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
DictionaryBul **
open MorphoBul, ResBul, ParadigmsBul, SyntaxBul, CommonScand, (E = ExtraBul), Prelude in {

View File

@@ -27,7 +27,7 @@ concrete TranslateChi of Translate =
DocumentationChi,
ChunkChi,
ExtensionsChi [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
ExtensionsChi [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionaryChi **

View File

@@ -23,7 +23,7 @@ concrete TranslateDut of Translate =
---- DocumentationDut,
ChunkDut,
ExtensionsDut [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
ExtensionsDut [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionaryDut **
open MorphoDut, ResDut, ParadigmsDut, SyntaxDut, (E = ExtraDut), Prelude in {

View File

@@ -28,7 +28,7 @@ concrete TranslateEng of Translate =
DocumentationEng,
ChunkEng,
ExtensionsEng [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
ExtensionsEng [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS
---- , PastPartAP, PastPartAgentAP, PresPartAP

View File

@@ -26,7 +26,7 @@ concrete TranslateFin of Translate =
DocumentationFin,
ChunkFin,
ExtensionsFin [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
ExtensionsFin [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS],
DictionaryFin **

View File

@@ -25,7 +25,7 @@ concrete TranslateFre of Translate =
DocumentationFre,
ChunkFre,
ExtensionsFre [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
ExtensionsFre [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionaryFre **
open PhonoFre, MorphoFre, ResFre, CommonRomance, ParadigmsFre, SyntaxFre, Prelude, (G = GrammarFre) in {

View File

@@ -23,7 +23,7 @@ concrete TranslateGer of Translate =
DocumentationGer,
ChunkGer,
ExtensionsGer [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
ExtensionsGer [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS],
DictionaryGer **

View File

@@ -24,7 +24,7 @@ concrete TranslateHin of Translate =
DocumentationHin,
ChunkHin,
ExtensionsHin [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
ExtensionsHin [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash],
DictionaryHin **
open MorphoHin, ResHin, ParadigmsHin, SyntaxHin, CommonScand, (E = ExtraHin), Prelude in {

View File

@@ -25,7 +25,7 @@ concrete TranslateIta of Translate =
DocumentationIta,
ChunkIta,
ExtensionsIta [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
ExtensionsIta [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionaryIta **
open MorphoIta, ResIta, ParadigmsIta, SyntaxIta, (E = ExtraIta), (G = GrammarIta), Prelude in {

View File

@@ -25,7 +25,7 @@ concrete TranslateSpa of Translate =
DocumentationSpa,
ChunkSpa,
ExtensionsSpa [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
ExtensionsSpa [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP],
DictionarySpa **
open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, (E = ExtraSpa), (G = GrammarSpa), Prelude in {

View File

@@ -23,7 +23,7 @@ concrete TranslateSwe of Translate =
DocumentationSwe,
ChunkSwe,
ExtensionsSwe [CompoundCN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
ExtensionsSwe [CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
DirectComplVS, DirectComplVQ, FocusObjS],
DictionarySwe **

View File

@@ -59,7 +59,7 @@ ComplVQ 3.3840311330864245e-4
ComplVS 0.10664084776246609
ComplVV 6.258577578913727e-2
CompoundAP 0.0010736547702286556
CompoundCN 0.0010736547702286556
CompoundN 0.0010736547702286556
ConjAP 2.1189670416781e-3
ConjAdV 9.744689144416293e-5
ConjAdv 1.0922898208991453e-3