Safe Haskell | None |
---|---|
Language | Haskell98 |
Positions within document.
- newtype Positions = PS {}
- empty :: Positions
- singleton :: Position -> Positions
- null :: Positions -> Bool
- member :: Position -> Positions -> Bool
- toAscList :: Positions -> [Position]
- fromList :: [Position] -> Positions
- size :: Positions -> Int
- union :: Positions -> Positions -> Positions
- intersection :: Positions -> Positions -> Positions
- difference :: Positions -> Positions -> Positions
- foldr :: (Position -> r -> r) -> r -> Positions -> r
- intersectionWithDispl :: Int -> Positions -> Positions -> Positions
- intersectionWithIntervall :: Int -> Int -> Positions -> Positions -> Positions
Documentation
The positions of the word in the document.
intersectionWithDispl :: Int -> Positions -> Positions -> Positions Source
intersection with a "shifted" 2. set with elements decremented by a displacement d
before the element test
useful when searching for sequences of words (phrases)
intersectionWithIntervall :: Int -> Int -> Positions -> Positions -> Positions Source
intersction with "fuzzy" element test. All elements e1
for which an element e2
in s2
is found with e2 - e1
remain in set elem
[lb..ub]s1
.
Useful for context search with sequences of words.
This generatizes intersectionWithDispl
Law: intersectionWithIntervall d d == intersectionWithDispl d