1
0
forked from GitHub/gf-core

more coverage of Chunk grammar, including a general fallback rule Symb_Chunk

This commit is contained in:
aarne
2014-12-08 10:18:57 +00:00
parent 2b3b2282f5
commit 77ecefafbb
7 changed files with 29 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
abstract Chunk = Cat, Extensions [VPS,VPI] ** {
abstract Chunk = Cat, Symbol [Symb], Extensions [VPS,VPI] ** {
cat
Chunks ;
@@ -27,6 +27,7 @@ fun
CN_Pl_Gen_Chunk : CN -> Chunk ;
CN_Sg_Gen_Chunk : CN -> Chunk ;
Conj_Chunk : Conj -> Chunk ;
Det_Chunk : Det -> Chunk ; -- needed if article form is different from NP form, e.g. English a/an
IAdv_Chunk : IAdv -> Chunk ;
IP_Chunk : IP -> Chunk ;
NP_Nom_Chunk : NP -> Chunk ;
@@ -63,6 +64,9 @@ fun
UseVC : Temp -> Pol -> VC -> VPS ;
-- for unknown words that are not names
Symb_Chunk : Symb -> Chunk ;
-- syncategorematic chunks
refl_SgP1_Chunk,

View File

@@ -1,11 +1,13 @@
concrete ChunkCat of Chunk = CatCat, ExtensionsCat [VPS,VPI] **
ChunkFunctor - [SSlash_Chunk]
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxCat), (Extensions = ExtensionsCat) **
open
SyntaxCat, (E = ExtensionsCat), Prelude,
ResCat, CommonRomance, (P = ParadigmsCat) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin

View File

@@ -1,10 +1,18 @@
concrete ChunkEng of Chunk = CatEng, ExtensionsEng [VPS,VPI] **
ChunkFunctor with (Syntax = SyntaxEng), (Extensions = ExtensionsEng) **
concrete ChunkEng of Chunk = CatEng, SymbolEng [Symb], ExtensionsEng [VPS,VPI] **
ChunkFunctor - [Det_Chunk]
with (Syntax = SyntaxEng), (Extensions = ExtensionsEng) **
open
SyntaxEng, (E = ExtensionsEng), Prelude,
(R = ResEng), (P = ParadigmsEng) in {
lin
Det_Chunk det = lin Utt {
s = case det.n of {
R.Sg => det.s ;
R.Pl => det.sp ! R.NCase R.Nom
}
} ;
NP_Acc_Chunk np = ss (np.s ! R.NPAcc) ;
NP_Gen_Chunk np = ss (np.s ! R.NCase R.Gen) | ss (np.s ! R.NPNomPoss) ;

View File

@@ -1,11 +1,13 @@
concrete ChunkFre of Chunk = CatFre, ExtensionsFre [VPS,VPI] **
ChunkFunctor - [SSlash_Chunk]
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxFre), (Extensions = ExtensionsFre) **
open
SyntaxFre, (E = ExtensionsFre), Prelude,
ResFre, PhonoFre, CommonRomance, (P = ParadigmsFre) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin

View File

@@ -1,4 +1,4 @@
incomplete concrete ChunkFunctor of Chunk = Cat, Extensions [VPS,VPI] **
incomplete concrete ChunkFunctor of Chunk = Cat, Symbol [Symb], Extensions [VPS,VPI] **
open
Syntax, Extensions,
Prelude in {
@@ -29,6 +29,7 @@ lin
---- CN_Pl_Gen_Chunk cn = ss (cn.s ! Pl ! Gen) ;
---- CN_Sg_Gen_Chunk cn = ss (cn.s ! Sg ! Gen) ;
Conj_Chunk conj = ss conj.s2 ; ----
Det_Chunk det = mkUtt (Syntax.mkNP det) ;
IAdv_Chunk iadv = iadv ;
IP_Chunk ip = mkUtt ip ;
NP_Nom_Chunk np = mkUtt np ;
@@ -64,6 +65,7 @@ lin
UseVC t p vc = E.MkVPS t p (mkVP vc) ;
Symb_Chunk s = lin Utt s ;
fullstop_Chunk = ss "." ;
exclmark_Chunk = ss "!" ;

View File

@@ -1,11 +1,13 @@
concrete ChunkIta of Chunk = CatIta, ExtensionsIta [VPS,VPI] **
ChunkFunctor - [SSlash_Chunk]
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxIta), (Extensions = ExtensionsIta) **
open
SyntaxIta, (E = ExtensionsIta), Prelude,
ResIta, CommonRomance, (P = ParadigmsIta) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin

View File

@@ -1,11 +1,12 @@
concrete ChunkSpa of Chunk = CatSpa, ExtensionsSpa [VPS,VPI] **
ChunkFunctor - [SSlash_Chunk]
ChunkFunctor - [AP_Chunk, SSlash_Chunk]
with (Syntax = SyntaxSpa), (Extensions = ExtensionsSpa) **
open
SyntaxSpa, (E = ExtensionsSpa), Prelude,
ResSpa, CommonRomance, (P = ParadigmsSpa) in {
lin
AP_Chunk ap = {s = ap.s ! AF (Masc | Fem) (Sg | Pl)} ;
SSlash_Chunk s = mkUtt <lin S {s = s.s ! {g = Masc ; n = Sg}} : S> ;
lin