org.carrot2.core.attribute
Class CommonAttributesDescriptor.AttributeBuilder

java.lang.Object
  extended by org.carrot2.core.attribute.CommonAttributesDescriptor.AttributeBuilder
Enclosing class:
CommonAttributesDescriptor

public static class CommonAttributesDescriptor.AttributeBuilder
extends Object

Attribute map builder for the CommonAttributes component. You can use this builder as a type-safe alternative to populating the attribute map using attribute keys.


Field Summary
 Map<String,Object> map
          The attribute map populated by this builder.
 
Constructor Summary
protected CommonAttributesDescriptor.AttributeBuilder(Map<String,Object> map)
          Creates a builder backed by the provided map.
 
Method Summary
 List<Cluster> clusters()
          Clusters created by the clustering algorithm.
 List<Document> documents()
          Documents returned by the search engine/ document retrieval system or documents passed as input to the clustering algorithm.
 CommonAttributesDescriptor.AttributeBuilder documents(List<Document> value)
          Documents returned by the search engine/ document retrieval system or documents passed as input to the clustering algorithm.
 String processingResultTitle()
          Processing result title.
 Long processingTimeAlgorithm()
          Algorithm processing time in milliseconds.
 Long processingTimeSource()
          Data source processing time in milliseconds.
 Long processingTimeTotal()
          Total processing time in milliseconds.
 CommonAttributesDescriptor.AttributeBuilder query(String value)
          Query to perform.
 CommonAttributesDescriptor.AttributeBuilder results(int value)
          Maximum number of documents/ search results to fetch.
 Long resultsTotal()
          Estimated total number of matching documents.
 CommonAttributesDescriptor.AttributeBuilder start(int value)
          Index of the first document/ search result to fetch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public final Map<String,Object> map
The attribute map populated by this builder.

Constructor Detail

CommonAttributesDescriptor.AttributeBuilder

protected CommonAttributesDescriptor.AttributeBuilder(Map<String,Object> map)
Creates a builder backed by the provided map.

Method Detail

start

public CommonAttributesDescriptor.AttributeBuilder start(int value)
Index of the first document/ search result to fetch. The index starts at zero.

See Also:
CommonAttributes.start

results

public CommonAttributesDescriptor.AttributeBuilder results(int value)
Maximum number of documents/ search results to fetch. The query hint can be used by clustering algorithms to avoid creating trivial clusters (combination of query words).

See Also:
CommonAttributes.results

query

public CommonAttributesDescriptor.AttributeBuilder query(String value)
Query to perform.

See Also:
CommonAttributes.query

resultsTotal

public Long resultsTotal()
Estimated total number of matching documents.

See Also:
CommonAttributes.resultsTotal

documents

public CommonAttributesDescriptor.AttributeBuilder documents(List<Document> value)
Documents returned by the search engine/ document retrieval system or documents passed as input to the clustering algorithm.

See Also:
CommonAttributes.documents

documents

public List<Document> documents()
Documents returned by the search engine/ document retrieval system or documents passed as input to the clustering algorithm.

See Also:
CommonAttributes.documents

clusters

public List<Cluster> clusters()
Clusters created by the clustering algorithm.

See Also:
CommonAttributes.clusters

processingTimeTotal

public Long processingTimeTotal()
Total processing time in milliseconds. A sum of processing times of all components in the chain. Total processing time may be greater than the sum of CommonAttributes.processingTimeTotal and CommonAttributes.processingTimeAlgorithm.

See Also:
CommonAttributes.processingTimeTotal

processingTimeSource

public Long processingTimeSource()
Data source processing time in milliseconds. A sum of processing times of all IDocumentSources in the chain, including the IProcessingComponent.beforeProcessing() and IProcessingComponent.afterProcessing() hooks.

See Also:
CommonAttributes.processingTimeSource

processingTimeAlgorithm

public Long processingTimeAlgorithm()
Algorithm processing time in milliseconds. A sum of processing times of all IClusteringAlgorithms in the chain, including the IProcessingComponent.beforeProcessing() and IProcessingComponent.afterProcessing() hooks.

See Also:
CommonAttributes.processingTimeAlgorithm

processingResultTitle

public String processingResultTitle()
Processing result title. A typical title for a processing result will be the query used to fetch documents from that source. For certain document sources the query may not be needed (on-disk XML, feed of syndicated news); in such cases, the input component should set its title properly for visual interfaces such as the workbench.

See Also:
CommonAttributes.processingResultTitle


Copyright (c) Dawid Weiss, Stanislaw Osinski