Skip to content

Commit

Permalink
add VerbForm=Fin
Browse files Browse the repository at this point in the history
  • Loading branch information
arysin committed Sep 24, 2024
1 parent c45bbda commit 20660eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/main/groovy/ua/net/nlp/tools/tag/UdModule.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ class UdModule {
if( tkn.lemma in NEGATIVES ) {
udTags << "Polarity=Neg"
}


if( tkn.tags =~ /^verb(?!.*(:inf|:impers))/ ) {
udTags << "VerbForm=Fin"
}

addPluralGender(tkn, udTags)

def misc = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TagTextVerticalOutputTest {
public void testTxtFormatWithUD() {
tagText.setOptions(new TagOptions(outputFormat: OutputFormat.conllu, semanticTags: true))

def text = "А треба далі воно - озеро Світязь яке я..."
def text = "А треба далі воно - озеро Світязь де я затримався..."
TagResult tagged = tagText.tagText(text)

def expected =
Expand All @@ -105,9 +105,10 @@ class TagTextVerticalOutputTest {
5 - - PUNCT punct _ _ _ _
6 озеро озеро NOUN noun:inanim:n:v_naz Animacy=Inan|Case=Nom|Gender=Neut|Number=Sing _ _ _
7 Світязь Світязь PROPN noun:inanim:m:v_naz:prop:geo:xp1 Animacy=Inan|Case=Nom|Gender=Masc|NameType=Geo|Number=Sing _ _ SemTags=1:conc:loc
8 яке який ADJ adj:n:v_naz:&pron:int:rel:def Case=Nom|Gender=Neut|Number=Sing|PronType=Int|PronType=Rel _ _ _
9 я я PRON noun:anim:s:v_naz:&pron:pers:1 Animacy=Anim|Case=Nom|Number=Sing|Person=1|PronType=Prs _ _ SemTags=1:conc:hum:deictic|SpaceAfter=No
10 ... ... PUNCT punct _ _ _ _
8 де де ADV adv:&pron:int:rel PronType=Int|PronType=Rel _ _ _
9 я я PRON noun:anim:s:v_naz:&pron:pers:1 Animacy=Anim|Case=Nom|Number=Sing|Person=1|PronType=Prs _ _ SemTags=1:conc:hum:deictic
10 затримався затриматися VERB verb:rev:perf:past:m Aspect=Perf|Gender=Masc|Mood=Ind|Number=Sing|Reflex=Yes|Tense=Past|VerbForm=Fin _ _ SpaceAfter=No
11 ... ... PUNCT punct _ _ _ _
""".toString()

assertEquals expected, adjustResult(tagged.tagged)
Expand Down

0 comments on commit 20660eb

Please sign in to comment.