Condor-0.2: Information retrieval library

Portabilityportable
Stabilityalpha
MaintainerKrzysztof Langner <klangner@gmail.com>
Safe HaskellSafe-Inferred

Condor.Index

Description

This module contains functions which create, update and search index. Default implementation uses algorithms for english language (stemming, stop words etc.)

Functions in this module (for performance reasons) are based on unicode strings Data.Text.

Synopsis

Documentation

data Index Source

Inverted index

Instances

addDocument :: Document -> Index -> IndexSource

Add document to the index. This function uses algorithms for english language to split document content into index terms.

addDocTerms :: DocName -> [Term] -> Index -> IndexSource

Add document to the index. This function should be used if document content should be splitted into terms with custom algorithms.

emptyIndex :: IndexSource

Create empty index. This index will be configured for english language.

search :: Index -> String -> [DocName]Source

Search terms given as single string in the index This function uses algorithms for english language to split query into tokens.

searchTerms :: Index -> [Term] -> [DocName]Source

Search terms given as array in the index. This function should be used if query should be splitted into terms with custom algorithms

termCount :: Index -> IntSource

Get the number of terms in indexs