本文整理汇总了Java中org.lemurproject.galago.core.parse.DocumentStreamParser.getBufferedReader方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentStreamParser.getBufferedReader方法的具体用法?Java DocumentStreamParser.getBufferedReader怎么用?Java DocumentStreamParser.getBufferedReader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lemurproject.galago.core.parse.DocumentStreamParser
的用法示例。
在下文中一共展示了DocumentStreamParser.getBufferedReader方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.lemurproject.galago.core.parse.DocumentStreamParser; //导入方法依赖的package包/类
@Override
public void process(DocumentSplit doc) throws IOException {
BufferedReader reader = DocumentStreamParser.getBufferedReader(doc);
for (String str = reader.readLine();
str != null;
str = reader.readLine()) {
String[] parts = str.split(delim);
if (parts.length > 0) {
String t = parts[0];
long cf = 1;
long dc = 1;
long mxdf = 1;
if (parts.length >= 2) {
cf = Long.parseLong(parts[1]);
}
if (parts.length >= 3) {
dc = Long.parseLong(parts[2]);
}
if (parts.length >= 4) {
mxdf = Long.parseLong(parts[4]);
}
WordCount wc = new WordCount(ByteUtil.fromString(t), cf, dc, mxdf);
processor.process(wc);
}
}
reader.close();
}
示例2: readEach
import org.lemurproject.galago.core.parse.DocumentStreamParser; //导入方法依赖的package包/类
public static void readEach(List<DocumentSplit> splits, Operation<BufferedReader> action) throws IOException {
for (DocumentSplit split : splits) {
try (BufferedReader reader = DocumentStreamParser.getBufferedReader(split)) {
action.process(reader);
}
}
}
示例3: BufferedReaderParser
import org.lemurproject.galago.core.parse.DocumentStreamParser; //导入方法依赖的package包/类
public BufferedReaderParser(DocumentSplit split, Parameters p) throws IOException {
super(split, p);
this.reader = DocumentStreamParser.getBufferedReader(split);
this.conf = p;
}
示例4: DbpediaAbstractParser
import org.lemurproject.galago.core.parse.DocumentStreamParser; //导入方法依赖的package包/类
public DbpediaAbstractParser(DocumentSplit split, Parameters p) throws IOException {
super(split, p);
this.reader = DocumentStreamParser.getBufferedReader(split);
}
示例5: SignalMediaJSONParser
import org.lemurproject.galago.core.parse.DocumentStreamParser; //导入方法依赖的package包/类
/**
* This is the constructor expected by UniversalParser
* It must be implemented in each implementing class
*
* @param split
* @param p
*/
public SignalMediaJSONParser(DocumentSplit split, Parameters p) throws IOException {
super(split, p);
this.reader = DocumentStreamParser.getBufferedReader(split);
}