Package weka.core

Examples of weka.core.Option


  public Enumeration listOptions() {
    Vector  result;
   
    result = new Vector();

    result.addElement(new Option(
  "\tThe expression to use for filtering\n"
  + "\t(default: true).",
  "E", 1, "-E <expr>"));

    return result.elements();
View Full Code Here


   */ 
  public java.util.Enumeration listOptions() {
     
     Vector<Option> newVector = new Vector<Option>();

     newVector.addElement(new Option(
           "\tThe JDBC URL to connect to.\n"
           + "\t(default: from DatabaseUtils.props file)",
           "url", 1, "-url <JDBC URL>"));
    
     newVector.addElement(new Option(
           "\tThe user to connect with to the database.\n"
           + "\t(default: none)",
           "user", 1, "-user <name>"));
    
     newVector.addElement(new Option(
           "\tThe password to connect with to the database.\n"
           + "\t(default: none)",
           "password", 1, "-password <password>"));
    
     newVector.addElement(new Option(
           "\tThe name of the table.\n"
           + "\t(default: the relation name)",
           "T", 1, "-T <table name>"));
    
     newVector.addElement(new Option(
           "\tAdd an ID column as primary key. The name is specified\n"
           + "\tin the DatabaseUtils file ('idColumn'). The DatabaseLoader\n"
           + "\twon't load this column.",
           "P", 0, "-P"));
    
     newVector.addElement(new Option(
           "\tInput file in arff format that should be saved in database.",
           "i", 1, "-i <input file name>"));
    
     return  newVector.elements();
  }
View Full Code Here

      try {
  DatabaseSaver asv = new DatabaseSaver();
        try {
          Enumeration enumi = asv.listOptions();
          while (enumi.hasMoreElements()) {
            Option option = (Option)enumi.nextElement();
            text.append(option.synopsis()+'\n');
            text.append(option.description()+'\n');
       
          asv.setOptions(options);
          asv.setDestination();
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

        StringBuffer text = new StringBuffer();
        if(m_query.equals("Select * from Results0")){
            text.append("\n\nDatabaseLoader options:\n");
            Enumeration enumi = listOptions();
            while (enumi.hasMoreElements()) {
                Option option = (Option)enumi.nextElement();
                text.append(option.synopsis()+'\n');
                text.append(option.description()+'\n');
            }
            System.out.println(text);
        }
    }
    //System.out.println(result);
View Full Code Here

   */ 
  public java.util.Enumeration listOptions() {
     
     Vector<Option> newVector = new Vector<Option>();

     newVector.add(new Option(
           "\tThe JDBC URL to connect to.\n"
           + "\t(default: from DatabaseUtils.props file)",
           "url", 1, "-url <JDBC URL>"));
    
     newVector.add(new Option(
           "\tThe user to connect with to the database.\n"
           + "\t(default: none)",
           "user", 1, "-user <name>"));
    
     newVector.add(new Option(
           "\tThe password to connect with to the database.\n"
           + "\t(default: none)",
           "password", 1, "-password <password>"));
    
     newVector.add(new Option(
   "\tSQL query of the form\n"
   + "\t\tSELECT <list of columns>|* FROM <table> [WHERE]\n"
   + "\tto execute.\n"
         + "\t(default: Select * From Results0)",
   "Q",1,"-Q <query>"));
    
     newVector.add(new Option(
   "\tList of column names uniquely defining a DB row\n"
   + "\t(separated by ', ').\n"
         + "\tUsed for incremental loading.\n"
   + "\tIf not specified, the key will be determined automatically,\n"
   + "\tif possible with the used JDBC driver.\n"
   + "\tThe auto ID column created by the DatabaseSaver won't be loaded.",
   "P",1,"-P <list of column names>"));

     newVector.add(new Option(
   "\tSets incremental loading",
   "I", 0, "-I"));
    
     return  newVector.elements();
  }
View Full Code Here

   */
  public Enumeration listOptions() {

    Vector<Option> newVector = new Vector<Option>();

    newVector.addElement(new Option(
  "\tThe input file",
  "i", 1, "-i <the input file>"));

    newVector.addElement(new Option(
  "\tThe output file",
  "o", 1, "-o <the output file>"));

    return newVector.elements();
  }
View Full Code Here

   * @param saver  the saver to create the option string for
   * @return    the option string
   */
  protected static String makeOptionStr(AbstractFileSaver saver) {
    StringBuffer   result;
    Option     option;

    result = new StringBuffer();

    // build option string
    result.append("\n");
    result.append(saver.getClass().getName().replaceAll(".*\\.", ""));
    result.append(" options:\n\n");
    Enumeration enm = saver.listOptions();
    while (enm.hasMoreElements()) {
      option = (Option) enm.nextElement();
      result.append(option.synopsis() + "\n");
      result.append(option.description() + "\n");
    }

    return result.toString();
  }
View Full Code Here

   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {
    Vector<Option> result = new Vector<Option>();
   
    result.addElement(new Option(
        "\tThe field separator to be used.\n"
        + "\t'\\t' can be used as well.\n"
        + "\t(default: ',')",
        "F", 1, "-F <separator>"));
   
    result.addElement(new Option(
        "\tThe string representing a missing value.\n"
        + "\t(default: ?)",
        "M", 1, "-M <str>"));
   
    Enumeration en = super.listOptions();
View Full Code Here

   * @param loader  the loader to create the option string for
   * @return    the option string
   */
  protected static String makeOptionStr(AbstractFileLoader loader) {
    StringBuffer   result;
    Option     option;
   
    result = new StringBuffer("\nUsage:\n");
    result.append("\t" + loader.getClass().getName().replaceAll(".*\\.", ""));
    if (loader instanceof OptionHandler)
      result.append(" [options]");
    result.append(" <");
    String[] ext = loader.getFileExtensions();
    for (int i = 0; i < ext.length; i++) {
  if (i > 0)
    result.append(" | ");
  result.append("file" + ext[i]);
    }
    result.append(">\n");

    if (loader instanceof OptionHandler) {
      result.append("\nOptions:\n\n");
      Enumeration enm = ((OptionHandler) loader).listOptions();
      while (enm.hasMoreElements()) {
  option = (Option) enm.nextElement();
  result.append(option.synopsis() + "\n");
  result.append(option.description() + "\n");
      }
    }
   
    return result.toString();
  }
View Full Code Here

   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {
    Vector<Option> result = new Vector<Option>();
   
    result.add(new Option(
        "\tThe range of attributes to force type to be NOMINAL.\n"
        + "\t'first' and 'last' are accepted as well.\n"
        + "\tExamples: \"first-last\", \"1,4,5-27,50-last\"\n"
        + "\t(default: -none-)",
        "N", 1, "-N <range>"));
   
    result.add(new Option(
        "\tThe range of attribute to force type to be STRING.\n"
        + "\t'first' and 'last' are accepted as well.\n"
        + "\tExamples: \"first-last\", \"1,4,5-27,50-last\"\n"
        + "\t(default: -none-)",
        "S", 1, "-S <range>"));
   
    result.add(new Option(
        "\tThe range of attribute to force type to be DATE.\n"
        + "\t'first' and 'last' are accepted as well.\n"
        + "\tExamples: \"first-last\", \"1,4,5-27,50-last\"\n"
        + "\t(default: -none-)",
        "D", 1, "-D <range>"));
   
    result.add(new Option(
        "\tThe date formatting string to use to parse date values.\n"       
        + "\t(default: \"yyyy-MM-dd'T'HH:mm:ss\")",
        "format", 1, "-format <date format>"));
   
    result.add(new Option(
        "\tThe string representing a missing value.\n"
        + "\t(default: ?)",
        "M", 1, "-M <str>"));
   
    result.addElement(new Option(
        "\tThe field separator to be used.\n"
        + "\t'\\t' can be used as well.\n"
        + "\t(default: ',')",
        "F", 1, "-F <separator>"));
     
View Full Code Here

TOP

Related Classes of weka.core.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.