001 package edu.ucdenver.ccp.nlp.biolemmatizer;
002
003 import java.io.File;
004
005 import org.kohsuke.args4j.Argument;
006 import org.kohsuke.args4j.Option;
007
008 /**
009 * Command-line options for the BioLemmatizer
010 *
011 * @author Colorado Computational Pharmacology, UC Denver; ccpsupport@ucdenver.edu
012 *
013 */
014 public class BioLemmatizerCmdOpts {
015
016 @Option(name = "-f", usage = "optional path to a lexicon file. If not set, the default lexicon available on the classpath is used", required = false)
017 private String lexiconFilePath;
018
019 @Option(name = "-i", usage = "the path to the input file", required = false)
020 private String inputFilePath;
021
022 @Option(name = "-o", usage = "the path to the output file", required = false)
023 private String outputFilePath;
024
025 @Option(name = "-a", usage = "if present, normalize common British spellings into American spellings and retrieve lemmas", required = false)
026 private boolean americanize = false;
027
028 @Option(name = "-l", usage = "if present, only the lemma is returned (part-of-speech information is suppressed)", required = false)
029 private boolean outputLemmaOnly = false;
030
031 @Option(name = "-t", usage = "if present, the interactive mode is used")
032 private boolean useInteractiveMode = false;
033
034 @Argument(index = 0, usage = "Single input to be lemmatized", required = false)
035 private String inputStr;
036
037 @Argument(index = 1, usage = "Part of speech of the single input to be lemmatized", required = false)
038 private String inputStrPos;
039
040 /**
041 * @return the inputFile
042 */
043 public File getInputFile() {
044 return (inputFilePath != null) ? new File(inputFilePath) : null;
045 }
046
047 /**
048 * @return the outputFile
049 */
050 public File getOutputFile() {
051 return (outputFilePath != null) ? new File(outputFilePath) : null;
052 }
053
054 /**
055 * @return the lexiconFile
056 */
057 public File getLexiconFile() {
058 return (lexiconFilePath != null) ? new File(lexiconFilePath) : null;
059 }
060
061 /**
062 * @return americanize
063 */
064 public boolean americanizedLemma() {
065 return americanize;
066 }
067
068 /**
069 * @return outputLemmaOnly
070 */
071 public boolean outputLemmaOnly() {
072 return outputLemmaOnly;
073 }
074
075 /**
076 * @return useInteractiveMode
077 */
078 public boolean useInteractiveMode() {
079 return useInteractiveMode;
080 }
081
082 /**
083 * @return the inputStr
084 */
085 public String getInputStr() {
086 return inputStr;
087 }
088
089 /**
090 * @return the inputStrPos
091 */
092 public String getInputStrPos() {
093 return inputStrPos;
094 }
095
096 }