added top-level punctuation to tagged Finnish

This commit is contained in:
aarne
2016-09-22 19:49:26 +00:00
parent ce6ebf9330
commit 02358dbd80
3 changed files with 25 additions and 5 deletions

View File

@@ -17,6 +17,14 @@ concrete LargeFin of LargeFinAbs =
IdiomFin, IdiomFin,
TenseX, TenseX,
ExtraFin, 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" "."} ;
}

View File

@@ -15,6 +15,18 @@ abstract LargeFinAbs =
Structural, Structural,
Tense, Tense,
ExtraFinAbs, ExtraFinAbs,
WordsFinAbs WordsFinAbs ** {
;
flags startcat = Top ;
cat
Top ;
Punct ;
fun
PhrPunctTop : Phr -> Punct -> Top ;
PhrTop : Phr -> Top ;
fullstopPunct : Punct ;
}

View File

@@ -7,7 +7,7 @@ flags coding = utf8 ;
oper oper
-- other classes not treated below are POS tagged when the grammar is used with Omorfi -- 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 oper
SNForm : Type = Predef.Ints 0 ; --- not really needed SNForm : Type = Predef.Ints 0 ; --- not really needed