hitsummarizer.java

来自「nutch搜索的改进型工具和优化爬虫的相关工具」· Java 代码 · 共 27 行

JAVA
27
字号
/* Copyright (c) 2003 The Nutch Organization.  All rights reserved.   */
/* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */

package net.nutch.searcher;

import java.io.IOException;

/** Service that builds a summary for a hit on a query. */
public interface HitSummarizer {
  /** Returns a summary for the given hit details.
   *
   * @param details the details of the hit to be summarized
   * @param query  indicates what should be higlighted in the summary text
   */
	// Modified by Xie. add "fullTextSummary" param
  String getSummary(HitDetails detail, Query query, boolean fullTextSummary) throws IOException;
  String getSummaryNew(HitDetails detail, Query query, int summaryType) throws IOException;
  /** Returns summaries for a set of details.  Hook for parallel IPC calls.
   *
   * @param details the details of hits to be summarized
   * @param query  indicates what should be higlighted in the summary text
   */
//Modified by Xie. add "fullTextSummary" param
  String[] getSummary(HitDetails[] details, Query query, boolean fullTextSummary) throws IOException;
  String[] getSummaryNew(HitDetails[] details, Query query, int summaryType) throws IOException;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?