Portability | none portable |
---|---|
Stability | experimental |
Maintainer | Timo B. Huebel (tbh@holumbus.org) |
Safe Haskell | None |
The Occurences data type
- type Occurrences = DocIdMap Positions
- emptyOccurrences :: Occurrences
- singletonOccurrence :: DocId -> Position -> Occurrences
- nullOccurrences :: Occurrences -> Bool
- sizeOccurrences :: Occurrences -> Int
- insertOccurrence :: DocId -> Position -> Occurrences -> Occurrences
- deleteOccurrence :: DocId -> Position -> Occurrences -> Occurrences
- updateOccurrences :: (DocId -> DocId) -> Occurrences -> Occurrences
- mergeOccurrences :: Occurrences -> Occurrences -> Occurrences
- diffOccurrences :: Occurrences -> Occurrences -> Occurrences
- substractOccurrences :: Occurrences -> Occurrences -> Occurrences
- xpOccurrences :: PU Occurrences
- type Positions = EnumSet Position
- emptyPos :: Positions
- singletonPos :: Position -> Positions
- memberPos :: Position -> Positions -> Bool
- toAscListPos :: Positions -> [Position]
- fromListPos :: [Position] -> Positions
- sizePos :: Positions -> Int
- unionPos :: Positions -> Positions -> Positions
- foldPos :: (Position -> r -> r) -> r -> Positions -> r
- xpPositions :: PU Positions
Documentation
type Occurrences = DocIdMap PositionsSource
The occurrences in a number of documents. A mapping from document ids to the positions in the document.
emptyOccurrences :: OccurrencesSource
Create an empty set of positions.
singletonOccurrence :: DocId -> Position -> OccurrencesSource
Create an empty set of positions.
nullOccurrences :: Occurrences -> BoolSource
Test on empty set of positions.
sizeOccurrences :: Occurrences -> IntSource
Determine the number of positions in a set of occurrences.
insertOccurrence :: DocId -> Position -> Occurrences -> OccurrencesSource
deleteOccurrence :: DocId -> Position -> Occurrences -> OccurrencesSource
updateOccurrences :: (DocId -> DocId) -> Occurrences -> OccurrencesSource
mergeOccurrences :: Occurrences -> Occurrences -> OccurrencesSource
Merge two occurrences.
substractOccurrences :: Occurrences -> Occurrences -> OccurrencesSource
Substract occurrences from some other occurrences.
xpOccurrences :: PU OccurrencesSource
The XML pickler for the occurrences of a word.
toAscListPos :: Positions -> [Position]Source
fromListPos :: [Position] -> PositionsSource
xpPositions :: PU PositionsSource
The XML pickler for a set of positions.