From 02358dbd805e107b6e370c97ded6dda8c3b10ff8 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 22 Sep 2016 19:49:26 +0000 Subject: [PATCH] added top-level punctuation to tagged Finnish --- lib/src/finnish/tagged/LargeFin.gf | 12 ++++++++++-- lib/src/finnish/tagged/LargeFinAbs.gf | 16 ++++++++++++++-- lib/src/finnish/tagged/StemFin.gf | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lib/src/finnish/tagged/LargeFin.gf b/lib/src/finnish/tagged/LargeFin.gf index 0b79ec7c6..7af0549cb 100644 --- a/lib/src/finnish/tagged/LargeFin.gf +++ b/lib/src/finnish/tagged/LargeFin.gf @@ -17,6 +17,14 @@ concrete LargeFin of LargeFinAbs = IdiomFin, TenseX, ExtraFin, - WordsFin - ; + WordsFin ** open TagFin, StemFin in { +lincat + Top = {s : Str} ; + Punct = {s : Str} ; +lin + PhrPunctTop phr pu = {s = phr.s ++ pu.s} ; + PhrTop phr = phr ; + + fullstopPunct = {s = tagPOS "PUNCT" "."} ; +} \ No newline at end of file diff --git a/lib/src/finnish/tagged/LargeFinAbs.gf b/lib/src/finnish/tagged/LargeFinAbs.gf index 0be826008..dbbcd2a7f 100644 --- a/lib/src/finnish/tagged/LargeFinAbs.gf +++ b/lib/src/finnish/tagged/LargeFinAbs.gf @@ -15,6 +15,18 @@ abstract LargeFinAbs = Structural, Tense, ExtraFinAbs, - WordsFinAbs - ; + WordsFinAbs ** { + +flags startcat = Top ; + +cat + Top ; + Punct ; +fun + PhrPunctTop : Phr -> Punct -> Top ; + PhrTop : Phr -> Top ; + fullstopPunct : Punct ; + +} + diff --git a/lib/src/finnish/tagged/StemFin.gf b/lib/src/finnish/tagged/StemFin.gf index 345497250..9555dcc3c 100644 --- a/lib/src/finnish/tagged/StemFin.gf +++ b/lib/src/finnish/tagged/StemFin.gf @@ -7,7 +7,7 @@ flags coding = utf8 ; oper -- other classes not treated below are POS tagged when the grammar is used with Omorfi - tagPOS : Str -> Str -> Str = \p,s -> tagWord p s ; + tagPOS : Str -> Str -> Str = \p,s -> tagWord ("+" + p) s ; oper SNForm : Type = Predef.Ints 0 ; --- not really needed