本文整理了Java中weka.core.Option.description()
方法的一些代码示例,展示了Option.description()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.description()
方法的具体详情如下:
包路径:weka.core.Option
类名称:Option
方法名:description
[英]Returns the option's description.
[中]返回选项的描述。
代码示例来源:origin: Waikato/weka-trunk
/**
* prints all the options to stdout
*/
protected static void printOptions(OptionHandler o) {
Enumeration<Option> enm = o.listOptions();
System.out.println("Options for " + o.getClass().getName() + ":\n");
while (enm.hasMoreElements()) {
Option option = enm.nextElement();
System.out.println(option.synopsis());
System.out.println(option.description());
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* prints all the options to stdout
*/
protected static void printOptions(OptionHandler o) {
Enumeration<Option> enm = o.listOptions();
System.out.println("Options for " + o.getClass().getName() + ":\n");
while (enm.hasMoreElements()) {
Option option = enm.nextElement();
System.out.println(option.synopsis());
System.out.println(option.description());
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/meka
public static void printOptions(Enumeration e) {
// Evaluation Options
StringBuffer text = new StringBuffer();
text.append("\n\nEvaluation Options:\n\n");
text.append("-t\n");
text.append("\tSpecify the dataset (required)\n");
text.append("-B <number of windows>\n");
text.append("\tSets the number of windows (batches) for evalutation; default: 20.\n");
text.append("-semisupervised <ratio labelled>\n");
text.append("\tSets the ratio of labelled instances; default: 1.0.\n");
// Multilabel Options
text.append("\n\nClassifier Options:\n\n");
while (e.hasMoreElements()) {
Option o = (Option) (e.nextElement());
text.append("-"+o.name()+'\n');
text.append(""+o.description()+'\n');
}
System.out.println(text);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* generates a string to print as help on the console
*
* @return the generated help
*/
public String generateHelp() {
String result;
Enumeration<Option> enm;
Option option;
result = getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n";
enm = listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result += option.synopsis() + "\n" + option.description() + "\n";
}
return result;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* generates a string to print as help on the console
*
* @return the generated help
*/
public String generateHelp() {
String result;
Enumeration<Option> enm;
Option option;
result = getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n";
enm = listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result += option.synopsis() + "\n" + option.description() + "\n";
}
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* generates a string to print as help on the console
*
* @return the generated help
*/
public String generateHelp() {
String result;
Enumeration<Option> enm;
Option option;
result = getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n";
enm = listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result += option.synopsis() + "\n" + option.description() + "\n";
}
return result;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* generates a string to print as help on the console
*
* @return the generated help
*/
public String generateHelp() {
String result;
Enumeration<Option> enm;
Option option;
result = getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n";
enm = listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result += option.synopsis() + "\n" + option.description() + "\n";
}
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/distributedWekaBase
/**
* Utility method to make a "help" options string for the supplied object (if
* it is an OptionHandler)
*
* @param obj the object to create an options description for
* @return the options description for the supplied object
*/
public static String makeOptionsStr(Object obj) {
StringBuffer result = new StringBuffer();
Option option;
// build option string
result.append("\n");
result.append(obj.getClass().getName().replaceAll(".*\\.", ""));
if (obj instanceof OptionHandler) {
result.append(" options:\n\n");
Enumeration enm = ((OptionHandler) obj).listOptions();
while (enm.hasMoreElements()) {
option = (Option) enm.nextElement();
result.append(option.synopsis() + "\n");
result.append(option.description() + "\n");
}
}
return result.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* generates a string suitable for output on the command line displaying all
* available options.
*
* @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<Option> enm = saver.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result.append(option.synopsis() + "\n");
result.append(option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* generates a string suitable for output on the command line displaying all
* available options.
*
* @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<Option> enm = saver.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result.append(option.synopsis() + "\n");
result.append(option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* generates the options string.
*
* @return the options string
* @throws Exception in case the generation fails
*/
public String generate() throws Exception {
StringBuffer result;
OptionHandler handler;
Enumeration<Option> enm;
Option option;
result = new StringBuffer();
handler = (OptionHandler) Utils.forName(null, getClassname(), new String[0]);
enm = handler.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result.append(option.synopsis() + '\n');
result.append(option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* generates the options string.
*
* @return the options string
* @throws Exception in case the generation fails
*/
public String generate() throws Exception {
StringBuffer result;
OptionHandler handler;
Enumeration<Option> enm;
Option option;
result = new StringBuffer();
handler = (OptionHandler) Utils.forName(null, getClassname(), new String[0]);
enm = handler.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
result.append(option.synopsis() + '\n');
result.append(option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* returns all the options in a string
*
* @param generator the DataGenerator to return all the options for
* @return the assembled option string
*/
protected static String makeOptionString(DataGenerator generator) {
StringBuffer result;
Enumeration<Option> enm;
Option option;
result = new StringBuffer();
result.append("\nData Generator options:\n\n");
enm = generator.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
// skip option if on blacklist
if (isOnBlacklist(option.name())) {
continue;
}
result.append(option.synopsis() + "\n" + option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* returns all the options in a string
*
* @param generator the DataGenerator to return all the options for
* @return the assembled option string
*/
protected static String makeOptionString(DataGenerator generator) {
StringBuffer result;
Enumeration<Option> enm;
Option option;
result = new StringBuffer();
result.append("\nData Generator options:\n\n");
enm = generator.listOptions();
while (enm.hasMoreElements()) {
option = enm.nextElement();
// skip option if on blacklist
if (isOnBlacklist(option.name())) {
continue;
}
result.append(option.synopsis() + "\n" + option.description() + "\n");
}
return result.toString();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
while (enm.hasMoreElements()) {
Option option = enm.nextElement();
result.append(option.synopsis() + "\n" + option.description() + "\n");
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Test method for this class
*
* @param args the command line arguments
*/
public static void main(String [] args) {
try {
BVDecomposeSegCVSub bvd = new BVDecomposeSegCVSub();
try {
bvd.setOptions(args);
Utils.checkForRemainingOptions(args);
} catch (Exception ex) {
String result = ex.getMessage() + "\nBVDecompose Options:\n\n";
Enumeration<Option> enu = bvd.listOptions();
while (enu.hasMoreElements()) {
Option option = (Option) enu.nextElement();
result += option.synopsis() + "\n" + option.description() + "\n";
}
throw new Exception(result);
}
bvd.decompose();
System.out.println(bvd.toString());
} catch (Exception ex) {
System.err.println(ex.getMessage());
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Checks whether the scheme can take command line options.
*
* @return index 0 is true if the kernel can take options
*/
protected boolean[] canTakeOptions() {
boolean[] result = new boolean[2];
print("options...");
if (m_Kernel instanceof OptionHandler) {
println("yes");
if (m_Debug) {
println("\n=== Full report ===");
Enumeration<Option> enu = ((OptionHandler) m_Kernel).listOptions();
while (enu.hasMoreElements()) {
Option option = enu.nextElement();
print(option.synopsis() + "\n" + option.description() + "\n");
}
println("\n");
}
result[0] = true;
} else {
println("no");
result[0] = false;
}
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Checks whether the scheme can take command line options.
*
* @return index 0 is true if the associator can take options
*/
protected boolean[] canTakeOptions() {
boolean[] result = new boolean[2];
print("options...");
if (m_Associator instanceof OptionHandler) {
println("yes");
if (m_Debug) {
println("\n=== Full report ===");
Enumeration<Option> enu = ((OptionHandler) m_Associator).listOptions();
while (enu.hasMoreElements()) {
Option option = enu.nextElement();
print(option.synopsis() + "\n" + option.description() + "\n");
}
println("\n");
}
result[0] = true;
} else {
println("no");
result[0] = false;
}
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Checks whether the scheme can take command line options.
*
* @return index 0 is true if the estimator can take options
*/
protected boolean[] canTakeOptions() {
boolean[] result = new boolean[2];
print("options...");
if (m_Estimator instanceof OptionHandler) {
println("yes");
if (m_Debug) {
println("\n=== Full report ===");
Enumeration<Option> enu = ((OptionHandler) m_Estimator).listOptions();
while (enu.hasMoreElements()) {
Option option = enu.nextElement();
print(option.synopsis() + "\n" + option.description() + "\n");
}
println("\n");
}
result[0] = true;
} else {
println("no");
result[0] = false;
}
return result;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Checks whether the scheme can take command line options.
*
* @return index 0 is true if the classifier can take options
*/
protected boolean[] canTakeOptions() {
boolean[] result = new boolean[2];
print("options...");
if (m_Classifier instanceof OptionHandler) {
println("yes");
if (m_Debug) {
println("\n=== Full report ===");
Enumeration<Option> enu = ((OptionHandler) m_Classifier).listOptions();
while (enu.hasMoreElements()) {
Option option = enu.nextElement();
print(option.synopsis() + "\n" + option.description() + "\n");
}
println("\n");
}
result[0] = true;
} else {
println("no");
result[0] = false;
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!