Sha256: beee37d3d667277058ed008d9151d89ab6f505a5ec589c46bc8b92750057709d

Contents?: true

Size: 1.54 KB

Versions: 45

Compression:

Stored size: 1.54 KB

Contents

package lingscope.drivers;

import java.util.List;
import lingscope.algorithms.Annotator;
import lingscope.algorithms.BaselineScopeAnnotator;
import lingscope.io.AnnotatedSentencesIO;
import lingscope.structures.AnnotatedSentence;

/**
 *
 * @author shashank
 */
public class BaselineDriver {

    /**
     *
     * @param args
     * 0 - Annotator type ("cue" or "scope")
     * 1 - Serialized annotator file
     * 2 - Input file
     * 3 - Output file
     * 4 - if annotator type is "scope", then should scope be limited by commas
     * 5 - if annotator type is "scope", then should scope be limited by periods
     * 6 - (boolean) does the input file contain annotated sentence (true) or
     * not (false)
     */
    public static void main(String[] args) {
        Annotator annotator;
        
        if (args[0].equalsIgnoreCase("scope")) {
            annotator = new BaselineScopeAnnotator(SentenceTagger.SCOPE_START,
                    SentenceTagger.SCOPE_INTER, SentenceTagger.OTHER,
                    Boolean.parseBoolean(args[4]), Boolean.parseBoolean(args[5]));
        } else {
            annotator = SentenceTagger.getAnnotator("baseline", args[0]);
        }
        annotator.loadAnnotator(args[1]);

        boolean isAnnotated = Boolean.parseBoolean(args[6]);
        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

Version Path
abstractor-4.4.7 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.6 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.5 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.4 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.3 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.2 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.1 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.4.0 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.3.3 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.3.2 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.3.1 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.3.0 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.2.3 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.2.2 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.2.1 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.2.0 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.1.5 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.1.4 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.1.3 lib/lingscope/src/lingscope/drivers/BaselineDriver.java
abstractor-4.1.2 lib/lingscope/src/lingscope/drivers/BaselineDriver.java