當前位置: 首頁>>代碼示例>>Java>>正文


Java MultiStep類代碼示例

本文整理匯總了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;
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:31,代碼來源:BuildIndex.java

示例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;
}
 
開發者ID:jjfiv,項目名稱:galagosearch,代碼行數:63,代碼來源:BuildIndex.java


注:本文中的org.galagosearch.tupleflow.execution.MultiStep類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。