Skip to content

Commit

Permalink
add -ta option
Browse files Browse the repository at this point in the history
  • Loading branch information
arysin committed Apr 4, 2024
1 parent e9d0310 commit 0f08157
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/groovy/ua/net/nlp/tools/tag/TagOptions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ public class TagOptions extends OptionsBase {

@Option(names = ["-t", "--tokenFormat"], description = "Use <token> format (instead of <tokenReading>)")
boolean tokenFormat
@Option(names = ["-t1", "--singleTokenOnly"], description = "Print only one token per reading (-g is recommended with this option)")
@Option(names = ["-t1", "--singleTokenOnly"], description = "Print only one token per reading (default for when -g is specified)")
boolean singleTokenOnly
@Option(names = ["-ta", "--allTokenReadings"], description = "Print all readings of the token (default if -g is not specified)")
boolean allTokenReadings

@Option(names = ["-d", "--showDisambigRules"], description = "Show deterministic disambiguation rules applied")
boolean showDisambigRules
Expand Down Expand Up @@ -108,8 +110,10 @@ public class TagOptions extends OptionsBase {
}
if( disambiguate ) {
tokenFormat = true
singleTokenOnly = true
tagUnknown = true
if( ! allTokenReadings ) {
singleTokenOnly = true
}
}

if( singleTokenOnly ) {
Expand All @@ -119,9 +123,9 @@ public class TagOptions extends OptionsBase {
tagUnknown = true
}

if( ! quiet ) {
System.err.println "Output format: " + outputFormat
}
// if( ! quiet ) {
// System.err.println "Output format: " + outputFormat
// }
}

boolean isSingleFile() {
Expand Down

0 comments on commit 0f08157

Please sign in to comment.