Copyright | Copyright (C) 2011 Sebastian M. Schlatt, Timo B. Huebel, Uwe Schmidt |
---|---|
License | MIT |
Maintainer | Timo B. Huebel (tbh@holumbus.org) |
Stability | experimental |
Portability | none portable |
Safe Haskell | None |
Language | Haskell98 |
Occurrences of words within the index. A word occurs in document at specific locations.
- type Occurrences = DocIdMap Positions
- empty :: Occurrences
- fromDocIdSet :: DocIdSet -> Occurrences
- singleton :: DocId -> Position -> Occurrences
- singleton' :: DocId -> [Position] -> Occurrences
- null :: Occurrences -> Bool
- size :: Occurrences -> Int
- insert :: DocId -> Position -> Occurrences -> Occurrences
- insert' :: DocId -> Positions -> Occurrences -> Occurrences
- deleteOccurrence :: DocId -> Position -> Occurrences -> Occurrences
- delete :: DocId -> Occurrences -> Occurrences
- update :: (DocId -> DocId) -> Occurrences -> Occurrences
- merge :: Occurrences -> Occurrences -> Occurrences
- merges :: [Occurrences] -> Occurrences
- difference :: Occurrences -> Occurrences -> Occurrences
- diffWithSet :: Occurrences -> DocIdSet -> Occurrences
- subtract :: Occurrences -> Occurrences -> Occurrences
- intersectOccurrences :: (Positions -> Positions -> Positions) -> Occurrences -> Occurrences -> Occurrences
Documentation
type Occurrences = DocIdMap Positions Source
The occurrences of words in documents. A mapping from document ids to the positions in the document.
Create an empty set of positions.
singleton :: DocId -> Position -> Occurrences Source
Create a single dcid set with a single position.
singleton' :: DocId -> [Position] -> Occurrences Source
Create a single dcid set with a set of.
null :: Occurrences -> Bool Source
Test on empty set of positions.
size :: Occurrences -> Int Source
Determine the number of positions in a set of occurrences.
insert :: DocId -> Position -> Occurrences -> Occurrences Source
Add a position to occurrences.
insert' :: DocId -> Positions -> Occurrences -> Occurrences Source
Add multiple positions to occurrences
deleteOccurrence :: DocId -> Position -> Occurrences -> Occurrences Source
Remove a position from occurrences.
delete :: DocId -> Occurrences -> Occurrences Source
Delete a document (by DocId
) from occurrences.
update :: (DocId -> DocId) -> Occurrences -> Occurrences Source
Changes the DocIDs of the occurrences.
merge :: Occurrences -> Occurrences -> Occurrences Source
Merge two occurrences.
merges :: [Occurrences] -> Occurrences Source
Merge occurrences
difference :: Occurrences -> Occurrences -> Occurrences Source
Difference of occurrences.
diffWithSet :: Occurrences -> DocIdSet -> Occurrences Source
Remove Set of DocIds from Occurrences
subtract :: Occurrences -> Occurrences -> Occurrences Source
Subtract occurrences from some other occurrences.
intersectOccurrences :: (Positions -> Positions -> Positions) -> Occurrences -> Occurrences -> Occurrences Source