Package com.sun.tools.javac.main

Examples of com.sun.tools.javac.main.JavacOption$Option


 
  public boolean parseArgs(String[] args) {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Option inputFileOpt = obuilder.withLongName("inputFile").withRequired(true).withArgument(
        abuilder.withName("inputFile").withMinimum(1).withMaximum(1).create()).withDescription(
        "The input file").withShortName("i").create();
    Option outputFileOpt = obuilder.withLongName("outputFile").withRequired(true).withArgument(
        abuilder.withName("outputFile").withMinimum(1).withMaximum(1).create()).withDescription(
        "The output file").withShortName("o").create();

    Option limitOpt = obuilder.withLongName("limit").withRequired(false).withArgument(
        abuilder.withName("limit").withMinimum(1).withMaximum(1).create()).withDescription(
        "Emit this many of the most frequent tags").withShortName("l").create();
   
    Option cutoffOpt = obuilder.withLongName("cutoff").withRequired(false).withArgument(
        abuilder.withName("cutoff").withMinimum(1).withMaximum(1).create()).withDescription(
        "Drop tags with a count less than this number").withShortName("c").create();
   
    Group group = gbuilder.withName("Options").withOption(inputFileOpt)
      .withOption(outputFileOpt).withOption(limitOpt)
View Full Code Here


   
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder.withLongName("input")
      .withRequired(true)
      .withArgument(
        abuilder.withName("input")
          .withMinimum(1)
          .withMaximum(1).create())
      .withDescription("Input file")
      .withShortName("i").create();
   
    Option modelOpt = obuilder.withLongName("model")
    .withRequired(true)
    .withArgument(
      abuilder.withName("model")
        .withMinimum(1)
        .withMaximum(1).create())
    .withDescription("Model to use when classifying data")
    .withShortName("m").create();
   
    Option helpOpt = obuilder.withLongName("help")
    .withDescription("Print out help")
    .withShortName("h").create();
   
    Group group = gbuilder.withName("Options")
    .withOption(inputOpt)
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();

    Option wikipediaFileOpt = obuilder.withLongName("wikiFile").withRequired(true).withArgument(
            abuilder.withName("wikiFile").withMinimum(1).withMaximum(1).create()).
            withDescription("The path to the wikipedia dump file.  Maybe a directory containing wikipedia dump files." +
                    "  If a directory is specified, only .xml files are used.").withShortName("w").create();

    Option numDocsOpt = obuilder.withLongName("numDocs").withRequired(false).withArgument(
            abuilder.withName("numDocs").withMinimum(1).withMaximum(1).create()).
            withDescription("The number of docs to index").withShortName("n").create();

    Option solrURLOpt = obuilder.withLongName("solrURL").withRequired(false).withArgument(
            abuilder.withName("solrURL").withMinimum(1).withMaximum(1).create()).
            withDescription("The URL where Solr lives").withShortName("s").create();

    Option solrBatchOpt = obuilder.withLongName("batch").withRequired(false).withArgument(
            abuilder.withName("batch").withMinimum(1).withMaximum(1).create()).
            withDescription("The number of docs to include in each indexing batch").withShortName("b").create();

    Group group = gbuilder.withName("Options").withOption(wikipediaFileOpt).withOption(numDocsOpt).withOption(solrURLOpt).withOption(solrBatchOpt).create();
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Option inputDirOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The input file to classify")
        .withShortName("i").create();
   
    Option modelOpt = obuilder.withLongName("model").withRequired(true).withArgument(
      abuilder.withName("index").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing the index model").withShortName("m").create();
   
    Option categoryFieldOpt = obuilder.withLongName("categoryField").withRequired(true).withArgument(
        abuilder.withName("index").withMinimum(1).withMaximum(1).create()).withDescription(
        "Name of the field containing category information").withShortName("catf").create();

    Option contentFieldOpt = obuilder.withLongName("contentField").withRequired(true).withArgument(
        abuilder.withName("index").withMinimum(1).withMaximum(1).create()).withDescription(
        "Name of the field containing content information").withShortName("contf").create();
   
    Option maxResultsOpt = obuilder.withLongName("maxResults").withRequired(false).withArgument(
        abuilder.withName("gramSize").withMinimum(1).withMaximum(1).create()).withDescription(
        "Number of results to retrive, default: 10 ").withShortName("r").create();
   
    Option gramSizeOpt = obuilder.withLongName("gramSize").withRequired(false).withArgument(
      abuilder.withName("gramSize").withMinimum(1).withMaximum(1).create()).withDescription(
      "Size of the n-gram. Default Value: 1 ").withShortName("ng").create();
   
    Option typeOpt = obuilder.withLongName("classifierType").withRequired(false).withArgument(
      abuilder.withName("classifierType").withMinimum(1).withMaximum(1).create()).withDescription(
      "Type of classifier: knn|tfidf. Default: bayes").withShortName("type").create();
   
    Group group = gbuilder.withName("Options").withOption(gramSizeOpt).withOption(helpOpt).withOption(
        inputDirOpt).withOption(modelOpt).withOption(typeOpt).withOption(contentFieldOpt)
View Full Code Here

  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder.withLongName("dir")
      .withRequired(true)
      .withArgument(
        abuilder.withName("dir")
          .withMinimum(1)
          .withMaximum(1).create())
      .withDescription("The Lucene directory")
      .withShortName("d").create();
   
    Option outputOpt = obuilder.withLongName("output")
      .withRequired(false)
      .withArgument(
        abuilder.withName("output")
          .withMinimum(1)
          .withMaximum(1).create())
      .withDescription("The output directory")
      .withShortName("o").create();
   
    Option maxOpt = obuilder.withLongName("max")
      .withRequired(false)
      .withArgument(
        abuilder.withName("max")
          .withMinimum(1)
          .withMaximum(1)
          .create())
      .withDescription("The maximum number of vectors to output.  If not specified, then it will loop over all docs")
      .withShortName("m").create();
   
    Option fieldOpt =
      obuilder.withLongName("field")
      .withRequired(true)
      .withArgument(
        abuilder.withName("field")
          .withMinimum(1)
          .withMaximum(1)
          .create())
      .withDescription("The field in the index")
      .withShortName("f").create();
   
    Option helpOpt = obuilder.withLongName("help")
      .withDescription("Print out help")
      .withShortName("h").create();
   
    Group group = gbuilder.withName("Options")
      .withOption(inputOpt)
View Full Code Here

  public boolean parseArgs(String[] args) throws Exception {

    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Option inputDirOpt = obuilder.withLongName("inputDir").withRequired(true).withArgument(
        abuilder.withName("inputDir").withMinimum(1).withMaximum(1).create()).withDescription(
        "The input directory").withShortName("i").create();
   
    Option trainingOutputDirOpt = obuilder.withLongName("trainingOutputDir").withRequired(true).withArgument(
        abuilder.withName("outputDir").withMinimum(1).withMaximum(1).create()).withDescription(
        "The training data output directory").withShortName("tr").create();
   
    Option testOutputDirOpt = obuilder.withLongName("testOutputDir").withRequired(true).withArgument(
        abuilder.withName("outputDir").withMinimum(1).withMaximum(1).create()).withDescription(
        "The test data output directory").withShortName("te").create();
   
    Option testSplitSizeOpt = obuilder.withLongName("testSplitSize").withRequired(false).withArgument(
        abuilder.withName("splitSize").withMinimum(1).withMaximum(1).create()).withDescription(
        "The number of documents held back as test data for each category").withShortName("ss").create();
   
    Option testSplitPctOpt = obuilder.withLongName("testSplitPct").withRequired(false).withArgument(
        abuilder.withName("splitPct").withMinimum(1).withMaximum(1).create()).withDescription(
        "The percentage of documents held back as test data for each category").withShortName("sp").create();
   
    Option splitLocationOpt = obuilder.withLongName("splitLocation").withRequired(false).withArgument(
        abuilder.withName("splitLoc").withMinimum(1).withMaximum(1).create()).withDescription(
        "Location for start of test data expressed as a percentage of the input file size (0=start, 50=middle, 100=end")
        .withShortName("sl").create();
   
    Option randomSelectionSizeOpt = obuilder.withLongName("randomSelectionSize").withRequired(false).withArgument(
        abuilder.withName("randomSize").withMinimum(1).withMaximum(1).create()).withDescription(
        "The number of itemr to be randomly selected as test data ").withShortName("rs").create();
   
    Option randomSelectionPctOpt = obuilder.withLongName("randomSelectionPct").withRequired(false).withArgument(
        abuilder.withName("randomPct").withMinimum(1).withMaximum(1).create()).withDescription(
        "Percentage of items to be randomly selected as test data ").withShortName("rp").create();
   
    Option charsetOpt = obuilder.withLongName("charset").withRequired(true).withArgument(
        abuilder.withName("charset").withMinimum(1).withMaximum(1).create()).withDescription(
        "The name of the character encoding of the input files").withShortName("c").create();
   
    Group group = gbuilder.withName("Options").withOption(inputDirOpt).withOption(trainingOutputDirOpt)
         .withOption(testOutputDirOpt).withOption(testSplitSizeOpt).withOption(testSplitPctOpt)
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option wikipediaFileOpt = obuilder
        .withLongName("wikiFile")
        .withRequired(true)
        .withArgument(
            abuilder.withName("wikiFile").withMinimum(1).withMaximum(1)
                .create())
        .withDescription(
            "The path to the wikipedia dump file. "
                + "May be a directory containing wikipedia dump files. "
                + "If a directory is specified, files starting with the prefix "
                + "freebase-segment- are used.").withShortName("w").create();
   
    Option numDocsOpt = obuilder
        .withLongName("numDocs")
        .withRequired(false)
        .withArgument(
            abuilder.withName("numDocs").withMinimum(1).withMaximum(1).create())
        .withDescription("The number of docs to index").withShortName("n")
        .create();
   
    Option solrURLOpt = obuilder
        .withLongName("solrURL")
        .withRequired(false)
        .withArgument(
            abuilder.withName("solrURL").withMinimum(1).withMaximum(1).create())
        .withDescription("The URL where Solr lives").withShortName("s")
        .create();
   
    Option solrBatchOpt = obuilder
        .withLongName("batch")
        .withRequired(false)
        .withArgument(
            abuilder.withName("batch").withMinimum(1).withMaximum(1).create())
        .withDescription("The number of docs to include in each indexing batch")
        .withShortName("b").create();
   
    Option helpOpt = obuilder.withLongName("help").withDescription(
        "Print out help").withShortName("h").create();
   
    Group group = gbuilder.withName("Options").withOption(wikipediaFileOpt)
        .withOption(numDocsOpt).withOption(solrURLOpt).withOption(solrBatchOpt)
        .withOption(helpOpt).create();
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Option inputDirOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The input directory, containing properly formatted files: "
          + "One doc per line, first entry on the line is the label, rest is the evidence")
        .withShortName("i").create();
   
    Option outputOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output directory").withShortName("o").create();
   
    Option gramSizeOpt = obuilder.withLongName("gramSize").withRequired(false).withArgument(
      abuilder.withName("gramSize").withMinimum(1).withMaximum(1).create()).withDescription(
      "Size of the n-gram. Default Value: 1 ").withShortName("ng").create();
   
    Option typeOpt = obuilder.withLongName("classifierType").withRequired(false).withArgument(
      abuilder.withName("classifierType").withMinimum(1).withMaximum(1).create()).withDescription(
      "Type of classifier: knn|tfidf.").withShortName("type").create();
   
    Group group = gbuilder.withName("Options").withOption(gramSizeOpt).withOption(helpOpt).withOption(
        inputDirOpt).withOption(outputOpt).withOption(typeOpt).create();
View Full Code Here

  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder.withLongName("dir")
      .withRequired(true)
      .withArgument(
        abuilder.withName("dir")
          .withMinimum(1)
          .withMaximum(1).create())
      .withDescription("The Lucene directory")
      .withShortName("d").create();
   
    Option outputOpt = obuilder.withLongName("output")
      .withRequired(false)
      .withArgument(
        abuilder.withName("output")
          .withMinimum(1)
          .withMaximum(1).create())
      .withDescription("The output directory")
      .withShortName("o").create();
   
    Option maxOpt = obuilder.withLongName("max")
      .withRequired(false)
      .withArgument(
        abuilder.withName("max")
          .withMinimum(1)
          .withMaximum(1)
          .create())
      .withDescription("The maximum number of documents to analyze.  If not specified, then it will loop over all docs")
      .withShortName("m").create();
   
    Option fieldOpt =
      obuilder.withLongName("field")
      .withRequired(true)
      .withArgument(
        abuilder.withName("field")
          .withMinimum(1)
          .withMaximum(1)
          .create())
      .withDescription("The field in the index")
      .withShortName("f").create();
   
    Option helpOpt = obuilder.withLongName("help")
      .withDescription("Print out help")
      .withShortName("h").create();
   
    Group group = gbuilder.withName("Options")
      .withOption(inputOpt)
View Full Code Here

   
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option dataOpt = obuilder.withLongName("data").withShortName("d").withRequired(true).withArgument(
      abuilder.withName("path").withMinimum(1).withMaximum(1).create()).withDescription("Data path").create();
   
    Option datasetOpt = obuilder.withLongName("dataset").withShortName("ds").withRequired(true).withArgument(
      abuilder.withName("path").withMinimum(1).create()).withDescription("dataset path").create();
   
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(dataOpt).withOption(datasetOpt).withOption(helpOpt)
        .create();
   
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.main.JavacOption$Option

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.