mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
Text as startcat in ResourceDemo ; adjustments in Finnish NP's
This commit is contained in:
@@ -115,12 +115,16 @@ abstract ResourceDemo = Lexicon, Numeral, Grammar [
|
||||
|
||||
] ** {
|
||||
|
||||
flags startcat = Utt ;
|
||||
flags startcat = Text ;
|
||||
|
||||
|
||||
-- functions with different type
|
||||
|
||||
fun
|
||||
TextS : S -> Text ; -- with .
|
||||
TextQS : QS -> Text ; -- with ?
|
||||
TextImp : VP -> Text ; -- with !
|
||||
|
||||
ComplV2 : V2 -> NP -> VP ;
|
||||
ModCN : AP -> CN -> CN ;
|
||||
CompAP : AP -> VP ;
|
||||
|
||||
@@ -61,6 +61,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [
|
||||
-- extension of the mini grammar
|
||||
|
||||
-- cat
|
||||
Text, -- text (with punctuation) e.g. "Who knows it?"
|
||||
Utt, -- utterance (sentence or question) e.g. "does she walk"
|
||||
QS, -- question (fixed tense) e.g. "who doesn't walk"
|
||||
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,
|
||||
|
||||
-- fun
|
||||
|
||||
UttS , -- S -> Utt,
|
||||
UttQS, -- QS -> Utt,
|
||||
|
||||
@@ -123,6 +125,10 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [
|
||||
-- functions with different type
|
||||
|
||||
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 ;
|
||||
ModCN ap cn = lin CN (mkCN <lin AP ap : AP> <lin CN cn : CN>) ;
|
||||
CompAP ap = mkVP (lin AP ap) ;
|
||||
|
||||
Reference in New Issue
Block a user