1
0
forked from GitHub/gf-core

Text as startcat in ResourceDemo ; adjustments in Finnish NP's

This commit is contained in:
aarne
2012-05-28 15:14:45 +00:00
parent 5108292f80
commit fa4fcdab35
5 changed files with 32 additions and 20 deletions

View File

@@ -115,12 +115,16 @@ abstract ResourceDemo = Lexicon, Numeral, Grammar [
] ** { ] ** {
flags startcat = Utt ; flags startcat = Text ;
-- functions with different type -- functions with different type
fun fun
TextS : S -> Text ; -- with .
TextQS : QS -> Text ; -- with ?
TextImp : VP -> Text ; -- with !
ComplV2 : V2 -> NP -> VP ; ComplV2 : V2 -> NP -> VP ;
ModCN : AP -> CN -> CN ; ModCN : AP -> CN -> CN ;
CompAP : AP -> VP ; CompAP : AP -> VP ;

View File

@@ -61,6 +61,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [
-- extension of the mini grammar -- extension of the mini grammar
-- cat -- cat
Text, -- text (with punctuation) e.g. "Who knows it?"
Utt, -- utterance (sentence or question) e.g. "does she walk" Utt, -- utterance (sentence or question) e.g. "does she walk"
QS, -- question (fixed tense) e.g. "who doesn't walk" QS, -- question (fixed tense) e.g. "who doesn't walk"
QCl, -- question clause (variable tense) e.g. "who walks" QCl, -- question clause (variable tense) e.g. "who walks"
@@ -85,6 +86,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [
Imp, Bool, True, False, Voc, Imp, Bool, True, False, Voc,
-- fun -- fun
UttS , -- S -> Utt, UttS , -- S -> Utt,
UttQS, -- QS -> Utt, UttQS, -- QS -> Utt,
@@ -123,6 +125,10 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [
-- functions with different type -- functions with different type
lin lin
TextS s = mkText (lin S s) ;
TextQS qs = mkText (lin QS qs) ;
TextImp vp = mkText (mkImp (lin VP vp)) ;
ComplV2 v np = mkVP v np ; ComplV2 v np = mkVP v np ;
ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ; ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ;
CompAP ap = mkVP (lin AP ap) ; CompAP ap = mkVP (lin AP ap) ;

View File

@@ -38721,6 +38721,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632
{lock_N = <>}) Sg ; {lock_N = <>}) Sg ;
-- everywhere_Adv = ss "kaikkialla" ; -- everywhere_Adv = ss "kaikkialla" ;
few_Det = mkDet Sg (mkN "harva") ; few_Det = mkDet Sg (mkN "harva") ;
--- first_Ord = {s = \\n,c => (mkN "ensimmäinen").s ! NCase n c} ;
for_Prep = casePrep allative ; for_Prep = casePrep allative ;
from_Prep = casePrep elative ; from_Prep = casePrep elative ;
he_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ; he_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
@@ -38761,22 +38762,22 @@ lin zoom_V = mkV "kiitää" ; -- 7632
somebody_NP = { somebody_NP = {
s = \\c => jokuPron ! Sg ! npform2case Sg c ; s = \\c => jokuPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = False
} ; } ;
someSg_Det = heavyDet { someSg_Det = heavyDet {
s1 = jokuPron ! Sg ; s1 = jokuPron ! Sg ;
s2 = [] ; s2 = [] ;
isNum,isPoss = False ; isDef = True ; n = Sg isNum,isPoss = False ; isDef = True ; isNeg = False ; n = Sg
} ; } ;
somePl_Det = heavyDet { somePl_Det = heavyDet {
s1 = jokuPron ! Pl ; s1 = jokuPron ! Pl ;
s2 = [] ; isNum,isPoss = False ; isDef = True ; s2 = [] ; isNum,isPoss = False ; isNeg = False ; isDef = True ;
n = Pl n = Pl ; isNeg = False
} ; } ;
something_NP = { something_NP = {
s = \\c => jokinPron ! Sg ! npform2case Sg c ; s = \\c => jokinPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = False ; isNeg = False
} ; } ;
-- somewhere_Adv = ss "jossain" ; -- somewhere_Adv = ss "jossain" ;
that_Quant = heavyQuant { that_Quant = heavyQuant {
@@ -38788,7 +38789,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632
c => (mkPronoun "nuo" "noiden" "noita" "noina" "noihin" Sg P3).s ! NPCase c c => (mkPronoun "nuo" "noiden" "noita" "noina" "noihin" Sg P3).s ! NPCase c
} }
} ; } ;
s2 = [] ; isNum,isPoss = False ; isDef = True ; s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = False
} ; } ;
that_Subj = ss "että" ; that_Subj = ss "että" ;
-- there_Adv = ss "siellä" ; --- tuolla -- there_Adv = ss "siellä" ; --- tuolla
@@ -38805,7 +38806,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632
c => (mkPronoun "nämä" "näiden" "näitä" "näinä" "näihin" Sg P3).s ! NPCase c c => (mkPronoun "nämä" "näiden" "näitä" "näinä" "näihin" Sg P3).s ! NPCase c
} }
} ; } ;
s2 = [] ; isNum,isPoss = False ; isDef = True ; s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = False
} ; } ;
through_Prep = postGenPrep "kautta" ; through_Prep = postGenPrep "kautta" ;
too_AdA = ss "liian" ; too_AdA = ss "liian" ;
@@ -38955,7 +38956,7 @@ oper
makeNP noun num = { makeNP noun num = {
s = \\c => noun.s ! NCase num (npform2case num c) ; s = \\c => noun.s ! NCase num (npform2case num c) ;
a = agrP3 num ; a = agrP3 num ;
isPron = False ; isPron, isNeg = False ;
lock_NP = <> lock_NP = <>
} ; } ;
@@ -38963,21 +38964,21 @@ lin
not_Predet = {s = \\_,_ => "ei"} ; not_Predet = {s = \\_,_ => "ei"} ;
no_Quant = heavyQuant { no_Quant = heavyQuant {
s1 = \\n,c => "ei" ++ mikaanPron ! n ! c ; s1 = \\n,c => mikaanPron ! n ! c ; -- requires negative or question polarity
s2 = [] ; isNum,isPoss = False ; isDef = True ; s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = True
} ; } ;
if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ; if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ;
nobody_NP = { nobody_NP = {
s = \\c => "ei" ++ kukaanPron ! Sg ! npform2case Sg c ; s = \\c => kukaanPron ! Sg ! npform2case Sg c ; -- requires negative or question polarity
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = True
} ; } ;
nothing_NP = { nothing_NP = {
s = \\c => "ei" ++ mikaanPron ! Sg ! npform2case Sg c ; s = \\c => mikaanPron ! Sg ! npform2case Sg c ; --- requires negative or question polarity
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = True
} ; } ;
at_least_AdN = ss "vähintään" ; at_least_AdN = ss "vähintään" ;
@@ -38991,7 +38992,6 @@ lin
lin language_title_Utt = ss "suomi" ; lin language_title_Utt = ss "suomi" ;
--- concrete LexiconFin of Lexicon = CatFin ** open MorphoFin, ParadigmsFin in { --- concrete LexiconFin of Lexicon = CatFin ** open MorphoFin, ParadigmsFin in {
lin lin

View File

@@ -13,7 +13,9 @@ concrete ParseFin of ParseEngAbs =
SentenceFin, SentenceFin,
RelativeFin, RelativeFin,
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP], IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP],
ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash] ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
, DictEngFin , DictEngFin
** **
open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, Prelude in { open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, Prelude in {

View File

@@ -11,17 +11,17 @@ lin
CNIntNP cn i = { CNIntNP cn i = {
s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ; s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = False
} ; } ;
CNSymbNP det cn xs = let detcn = NounFin.DetCN det cn in { CNSymbNP det cn xs = let detcn = NounFin.DetCN det cn in {
s = \\c => detcn.s ! c ++ xs.s ; s = \\c => detcn.s ! c ++ xs.s ;
a = detcn.a ; a = detcn.a ;
isPron = False isPron = False ; isNeg = False
} ; } ;
CNNumNP cn i = { CNNumNP cn i = {
s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ! Sg ! Nom ; s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ! Sg ! Nom ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False ; isNeg = False
} ; } ;
SymbS sy = sy ; SymbS sy = sy ;