本文整理了Java中weka.filters.Filter.batchFilterFile()
方法的一些代码示例,展示了Filter.batchFilterFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.batchFilterFile()
方法的具体详情如下:
包路径:weka.filters.Filter
类名称:Filter
方法名:batchFilterFile
[英]Method for testing filters ability to process multiple batches.
[中]测试过滤器处理多个批次能力的方法。
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* runs the filter instance with the given options.
*
* @param filter the filter to run
* @param options the commandline options
*/
public static void runFilter(Filter filter, String[] options) {
try {
filter.preExecution();
if (Utils.getFlag('b', options)) {
Filter.batchFilterFile(filter, options);
} else {
Filter.filterFile(filter, options);
}
} catch (Exception e) {
if ((e.toString().indexOf("Help requested") == -1)
&& (e.toString().indexOf("Filter options") == -1)) {
e.printStackTrace();
} else {
System.err.println(e.getMessage());
}
}
try {
filter.postExecution();
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* runs the filter instance with the given options.
*
* @param filter the filter to run
* @param options the commandline options
*/
public static void runFilter(Filter filter, String[] options) {
try {
filter.preExecution();
if (Utils.getFlag('b', options)) {
Filter.batchFilterFile(filter, options);
} else {
Filter.filterFile(filter, options);
}
} catch (Exception e) {
if ((e.toString().indexOf("Help requested") == -1)
&& (e.toString().indexOf("Filter options") == -1)) {
e.printStackTrace();
} else {
System.err.println(e.getMessage());
}
}
try {
filter.postExecution();
} catch (Exception ex) {
ex.printStackTrace();
}
}
代码示例来源:origin: com.entopix/maui
/**
* Main method for testing this class.
*
* @param argv should contain arguments to the filter: use -h for help
*/
public static void main(String[] argv) {
try {
if (Utils.getFlag('b', argv)) {
Filter.batchFilterFile(new NumbersFilter(), argv);
} else {
Filter.filterFile(new NumbersFilter(), argv);
}
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
}
代码示例来源:origin: com.entopix/maui
/**
* Main method for testing this class.
*
* @param argv should contain arguments to the filter: use -h for help
*/
public static void main(String[] argv) {
try {
if (Utils.getFlag('b', argv)) {
Filter.batchFilterFile(new MauiPhraseFilter(), argv);
} else {
Filter.filterFile(new MauiPhraseFilter(), argv);
}
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!