PHP Class TextAnalysis\Indexes\Builders\CollectionInvertedIndexBuilder

Author: yooper
显示文件 Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Property Type Description
$collection ICollection;
$index type The index that gets written out
$metadata array The collection of metadata for all the documents, indexed by doc id

Public Methods

Method Description
__construct ( TextAnalysis\Interfaces\ICollection &$collection ) Build the index from the collection of documents
__destruct ( )
getIndex ( ) : array Get the computed index
getMetadata ( ) : the

Protected Methods

Method Description
buildIndex ( ) Builds the internal index data structure using the provided collection

Method Details

__construct() public method

Build the index from the collection of documents
public __construct ( TextAnalysis\Interfaces\ICollection &$collection )
$collection TextAnalysis\Interfaces\ICollection

__destruct() public method

public __destruct ( )

buildIndex() protected method

Builds the internal index data structure using the provided collection
protected buildIndex ( )

getIndex() public method

Get the computed index
public getIndex ( ) : array
return array

getMetadata() public method

public getMetadata ( ) : the
return the metadata indexed by document id

Property Details

$collection protected_oe property

protected ICollection; $collection
return ICollection;

$index protected_oe property

The index that gets written out
protected type $index
return type

$metadata protected_oe property

The collection of metadata for all the documents, indexed by doc id
protected array $metadata
return array