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,7 +47,7 @@ fun
GenIP : IP -> IQuant ; -- whose GenIP : IP -> IQuant ; -- whose
GenRP : Num -> CN -> RP ; -- whose car(s) 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 CompoundAP : N -> A -> AP ; -- language independent / language-independent
GerundCN : VP -> CN ; -- publishing of the document (can get a determiner) GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)

View File

@@ -36,8 +36,9 @@ lin
EmptyRelSlash = E.EmptyRelSlash ; EmptyRelSlash = E.EmptyRelSlash ;
lin lin
CompoundCN noun cn = { CompoundN noun cn = {
s = \\nf => (noun.rel ! nform2aform nf cn.g) ++ (cn.s ! (indefNForm nf)) ; 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 g = cn.g
} ; } ;

View File

@@ -44,7 +44,7 @@ lin
-- but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj -- 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) ; ---- CompoundAP noun adj = complexAP (noun.s ++ possessive_s ++ adj.s) ; ----
GerundN v = { GerundN v = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -28,7 +28,7 @@ concrete TranslateEng of Translate =
DocumentationEng, DocumentationEng,
ChunkEng, 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 DirectComplVS, DirectComplVQ, FocusObjS
---- , PastPartAP, PastPartAgentAP, PresPartAP ---- , PastPartAP, PastPartAgentAP, PresPartAP

View File

@@ -26,7 +26,7 @@ concrete TranslateFin of Translate =
DocumentationFin, DocumentationFin,
ChunkFin, 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], DirectComplVS, DirectComplVQ, FocusObjS],
DictionaryFin ** DictionaryFin **

View File

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

View File

@@ -23,7 +23,7 @@ concrete TranslateGer of Translate =
DocumentationGer, DocumentationGer,
ChunkGer, 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], DirectComplVS, DirectComplVQ, FocusObjS],
DictionaryGer ** DictionaryGer **

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ concrete TranslateSwe of Translate =
DocumentationSwe, DocumentationSwe,
ChunkSwe, 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], DirectComplVS, DirectComplVQ, FocusObjS],
DictionarySwe ** DictionarySwe **

View File

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