Skip to content

Commit

Permalink
fix semtags for vertical format
Browse files Browse the repository at this point in the history
  • Loading branch information
arysin committed Sep 24, 2024
1 parent 20660eb commit a130d5a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/main/groovy/ua/net/nlp/tools/tag/VerticalModule.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ class VerticalModule {
}
sb.append("${tkn.value}\t${tkn.tags}\t${tkn.lemma}")
if( options.semanticTags ) {
sb.append("\t${tkn.semtags?:''}")
if( tkn.semtags ) {
sb.append("\tsemTags=${tkn.semtags}")
}
else {
sb.append("\t_")
}
}
sb.append('\n')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ class TagTextVerticalOutputTest {

def expected =
"""<s>
А conj:coord а
далі adv:compc:&predic далі 1:dist:2:time
- punct -
озеро noun:inanim:n:v_naz озеро
А conj:coord а _
далі adv:compc:&predic далі semTags=1:dist:2:time
- punct - _
озеро noun:inanim:n:v_naz озеро _
<g/>
... punct ...
... punct ... _
</s>
"""

Expand Down

0 comments on commit a130d5a

Please sign in to comment.