本文整理汇总了Java中edu.stanford.nlp.util.logging.Redwood.RedwoodChannels类的典型用法代码示例。如果您正苦于以下问题:Java RedwoodChannels类的具体用法?Java RedwoodChannels怎么用?Java RedwoodChannels使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RedwoodChannels类属于edu.stanford.nlp.util.logging.Redwood包,在下文中一共展示了RedwoodChannels类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: log
import edu.stanford.nlp.util.logging.Redwood.RedwoodChannels; //导入依赖的package包/类
private static <T> void log(RedwoodChannels channels, String description, Iterable<T> iterable) {
Redwood.startTrack(description);
if (iterable == null) {
channels.log("(iterable is null)");
} else {
int index = 0;
for (T item : iterable) {
if (dispatchable(item)) {
log(channels, "Index " + index, item);
} else {
channels.logf("Index %d: %s", index, item);
}
index++;
}
if (index == 0) {
channels.log("(empty)");
}
}
Redwood.endTrack(description);
}
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:22,代码来源:PrettyLogger.java
示例2: prettyLog
import edu.stanford.nlp.util.logging.Redwood.RedwoodChannels; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("unchecked")
public void prettyLog(RedwoodChannels channels, String description) {
Redwood.startTrack(description);
// sort keys by class name
List<Class> sortedKeys = new ArrayList<Class>(this.keySet());
Collections.sort(sortedKeys,
new Comparator<Class>(){
@Override
public int compare(Class a, Class b) {
return a.getCanonicalName().compareTo(b.getCanonicalName());
}
});
// log key/value pairs
for (Class key : sortedKeys) {
String keyName = key.getCanonicalName().replace("class ", "");
Object value = this.get(key);
if (PrettyLogger.dispatchable(value)) {
PrettyLogger.log(channels, keyName, value);
} else {
channels.logf("%s = %s", keyName, value);
}
}
Redwood.endTrack(description);
}
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:31,代码来源:ArrayCoreMap.java
示例3: prettyLog
import edu.stanford.nlp.util.logging.Redwood.RedwoodChannels; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void prettyLog(RedwoodChannels channels, String description) {
PrettyLogger.log(channels, description, Counters.asMap(this));
}
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:7,代码来源:IntCounter.java
示例4: prettyLog
import edu.stanford.nlp.util.logging.Redwood.RedwoodChannels; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void prettyLog(RedwoodChannels channels, String description) {
PrettyLogger.log(channels, description, Counters.asMap(this));
}
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:8,代码来源:ClassicCounter.java
示例5: prettyLog
import edu.stanford.nlp.util.logging.Redwood.RedwoodChannels; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void prettyLog(RedwoodChannels channels, String description) {
PrettyLogger.log(channels, description, this.asList());
}
开发者ID:paulirwin,项目名称:Stanford.NER.Net,代码行数:7,代码来源:Quadruple.java
注:本文中的edu.stanford.nlp.util.logging.Redwood.RedwoodChannels类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论