本文整理了Java中opennlp.tools.cmdline.ArgumentParser.createArguments()
方法的一些代码示例,展示了ArgumentParser.createArguments()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArgumentParser.createArguments()
方法的具体详情如下:
包路径:opennlp.tools.cmdline.ArgumentParser
类名称:ArgumentParser
方法名:createArguments
[英]Outputs the arguments as a data structure so it can be used to create documentation.
[中]将参数作为数据结构输出,以便用于创建文档。
代码示例来源:origin: apache/opennlp
private static void appendHelpForTool(TypedCmdLineTool<?> tool,
StringBuilder sb) {
Class<?> type = tool.type;
Set<String> formats = StreamFactoryRegistry.getFactories(type).keySet();
sb.append("<para>The supported formats and arguments are:</para>\n\n");
Map<String, List<Argument>> formatArguments = new LinkedHashMap<>();
for (String formatName : formats) {
if (!StreamFactoryRegistry.DEFAULT_FORMAT.equals(formatName)) {
ObjectStreamFactory<?> format = tool.getStreamFactory(formatName);
formatArguments.put(formatName,
ArgumentParser.createArguments(format.getParameters()));
}
}
appendArgumentTable(formatArguments, sb);
}
代码示例来源:origin: org.apache.opennlp/opennlp-tools
private static void appendHelpForTool(TypedCmdLineTool<?> tool,
StringBuilder sb) {
Class<?> type = tool.type;
Set<String> formats = StreamFactoryRegistry.getFactories(type).keySet();
sb.append("<para>The supported formats and arguments are:</para>\n\n");
Map<String, List<Argument>> formatArguments = new LinkedHashMap<>();
for (String formatName : formats) {
if (!StreamFactoryRegistry.DEFAULT_FORMAT.equals(formatName)) {
ObjectStreamFactory<?> format = tool.getStreamFactory(formatName);
formatArguments.put(formatName,
ArgumentParser.createArguments(format.getParameters()));
}
}
appendArgumentTable(formatArguments, sb);
}
代码示例来源:origin: ai.idylnlp/idylnlp-opennlp-tools-1.8.3
private static void appendHelpForTool(TypedCmdLineTool<?> tool,
StringBuilder sb) {
Class<?> type = tool.type;
Set<String> formats = StreamFactoryRegistry.getFactories(type).keySet();
sb.append("<para>The supported formats and arguments are:</para>\n\n");
Map<String, List<Argument>> formatArguments = new LinkedHashMap<>();
for (String formatName : formats) {
if (!StreamFactoryRegistry.DEFAULT_FORMAT.equals(formatName)) {
ObjectStreamFactory<?> format = tool.getStreamFactory(formatName);
formatArguments.put(formatName,
ArgumentParser.createArguments(format.getParameters()));
}
}
appendArgumentTable(formatArguments, sb);
}
内容来源于网络,如有侵权,请联系作者删除!