本文整理汇总了Java中org.galagosearch.tupleflow.execution.MultiStep类的典型用法代码示例。如果您正苦于以下问题:Java MultiStep类的具体用法?Java MultiStep怎么用?Java MultiStep使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultiStep类属于org.galagosearch.tupleflow.execution包,在下文中一共展示了MultiStep类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParseLinksStage
import org.galagosearch.tupleflow.execution.MultiStep; //导入依赖的package包/类
public Stage getParseLinksStage() {
Stage stage = new Stage("parseLinks");
stage.add(new StageConnectionPoint(
ConnectionPointType.Input,
"splits", new DocumentSplit.FileNameStartKeyOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"links", new ExtractedLink.DestUrlOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"documentUrls", new DocumentData.UrlOrder()));
stage.add(new InputStep("splits"));
stage.add(new Step(UniversalParser.class));
stage.add(new Step(TagTokenizer.class));
MultiStep multi = new MultiStep();
ArrayList<Step> links =
getExtractionSteps("links", LinkExtractor.class, new ExtractedLink.DestUrlOrder());
ArrayList<Step> data =
getExtractionSteps("documentUrls", DocumentDataExtractor.class,
new DocumentData.UrlOrder());
multi.groups.add(links);
multi.groups.add(data);
stage.add(multi);
return stage;
}
示例2: getParsePostingsStage
import org.galagosearch.tupleflow.execution.MultiStep; //导入依赖的package包/类
public Stage getParsePostingsStage() {
Stage stage = new Stage("parsePostings");
stage.add(new StageConnectionPoint(
ConnectionPointType.Input,
"splits", new DocumentSplit.FileNameStartKeyOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"postings", new DocumentWordPosition.DocumentWordPositionOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"extents", new DocumentExtent.IdentifierOrder()));
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"documentData", new DocumentData.IdentifierOrder()));
if (stemming) {
stage.add(new StageConnectionPoint(
ConnectionPointType.Output,
"stemmedPostings", new DocumentWordPosition.DocumentWordPositionOrder()));
}
if (useLinks) {
stage.add(new StageConnectionPoint(
ConnectionPointType.Input,
"anchorText", new AdditionalDocumentText.IdentifierOrder()));
}
stage.add(new InputStep("splits"));
stage.add(new Step(UniversalParser.class));
if (useLinks) {
Parameters p = new Parameters();
p.add("textSource", "anchorText");
stage.add(new Step(AdditionalTextCombiner.class, p));
}
stage.add(new Step(TagTokenizer.class));
MultiStep multi = new MultiStep();
ArrayList<Step> text =
getExtractionSteps("postings", PostingsPositionExtractor.class,
new DocumentWordPosition.DocumentWordPositionOrder());
ArrayList<Step> extents =
getExtractionSteps("extents", ExtentExtractor.class,
new DocumentExtent.IdentifierOrder());
ArrayList<Step> documentData =
getExtractionSteps("documentData", DocumentDataExtractor.class,
new DocumentData.IdentifierOrder());
multi.groups.add(text);
multi.groups.add(extents);
multi.groups.add(documentData);
if (stemming) {
ArrayList<Step> stemmedSteps = new ArrayList<Step>();
stemmedSteps.add(new Step(Porter2Stemmer.class));
stemmedSteps.add(new Step(PostingsPositionExtractor.class));
stemmedSteps.add(Utility.getSorter(new DocumentWordPosition.DocumentWordPositionOrder()));
stemmedSteps.add(new OutputStep("stemmedPostings"));
multi.groups.add(stemmedSteps);
}
stage.add(multi);
return stage;
}