Sha256: 665cc625afe23b3be5679dbf6f80cf3065fc99d6130499b339160c85e9208d3e
Contents?: true
Size: 1.01 KB
Versions: 45
Compression:
Stored size: 1.01 KB
Contents
package lingscope.drivers; import java.util.List; import lingscope.algorithms.Annotator; import lingscope.io.AnnotatedSentencesIO; import lingscope.structures.AnnotatedSentence; /** * Runs the annotators * @author shashank */ public class NegexDriver { /** * * @param args * 0 - Annotator type ("cue" or "scope") * 1 - Serialized annotator file * 2 - Input file * 3 - Output file * 4 - (boolean) does the input file contain annotated sentence (true) or * not (false) */ public static void main(String[] args) { Annotator annotator = SentenceTagger.getAnnotator("negex", args[0]); annotator.loadAnnotator(args[1]); boolean isAnnotated = Boolean.parseBoolean(args[4]); List<String> inputSentences = SentenceTagger.getStringList(args[2], isAnnotated); List<AnnotatedSentence> outputSentences = SentenceTagger.annotateSentences(annotator, inputSentences, isAnnotated); AnnotatedSentencesIO.write(args[3], outputSentences); } }
Version data entries
45 entries across 45 versions & 1 rubygems