Skip to content

Commit

Permalink
-g implies -t1 and -u
Browse files Browse the repository at this point in the history
  • Loading branch information
arysin committed Apr 4, 2024
1 parent f4a7aa6 commit e9d0310
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/main/groovy/ua/net/nlp/tools/tag/TagOptions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class TagOptions extends OptionsBase {

@Option(names = ["-d", "--showDisambigRules"], description = "Show deterministic disambiguation rules applied")
boolean showDisambigRules
@Option(names = ["-g", "--disambiguate"], description = "Use statistics for disambiguation")
@Option(names = ["-g", "--disambiguate"], description = "Use statistics for disambiguation (implies -t1 abd -u)")
boolean disambiguate
@Option(names = ["-gr", "--disambiguationRate"], description = "Show a disambiguated token ratings")
boolean showDisambigRate
Expand Down Expand Up @@ -95,20 +95,28 @@ public class TagOptions extends OptionsBase {
disambiguate = true
singleTokenOnly = true
}

if( ! outputFormat ) {
outputFormat = outputFormat.xml
}
if( singleTokenOnly ) {
tokenFormat = true
else if( outputFormat == OutputFormat.txt ) {
setLemmaForUnknown = true
}

if( showDisambigRate || disambiguationDebug ) {
disambiguate = true
}
if( unknownRate ) {
if( disambiguate ) {
tokenFormat = true
singleTokenOnly = true
tagUnknown = true
}
if( outputFormat == OutputFormat.txt ) {
setLemmaForUnknown = true

if( singleTokenOnly ) {
tokenFormat = true
}
if( unknownRate ) {
tagUnknown = true
}

if( ! quiet ) {
Expand Down

0 comments on commit e9d0310

Please sign in to comment.