| Portability | archlinux |
|---|---|
| Stability | experimental |
| Maintainer | Peter Harpending <pharpend2@gmail.com> |
| Safe Haskell | Safe-Inferred |
Text.Eros.Phrase
Description
- data Phrase = Phrase {}
- type PhraseTree = Tree Phrase
- type PhraseForest = Forest Phrase
- type PhraseMap = Map Text PhraseTree
- treeScore :: PhraseTree -> Int
- forestPhrases :: [PhraseTree] -> [Text]
- forestPhrase :: PhraseTree -> Text
- mkMap :: PhraseForest -> PhraseMap
Documentation
A Phrase is a piece of Text, with an int representing its
weight. These are the used internally within eros, in
Trees.
type PhraseMap = Map Text PhraseTreeSource
A Map of text values the appropriate tree
treeScore :: PhraseTree -> IntSource
The score of the PhraseTree is the sum of the scores of its Nodes.
forestPhrases :: [PhraseTree] -> [Text]Source
Given a list of PhraseTrees, return the top-level phrases.
forestPhrase :: PhraseTree -> TextSource
Given a PhraseTree, return the top-level phrase.
mkMap :: PhraseForest -> PhraseMapSource
Given a list of PhraseTrees, return a map of each phrase with
the appropriate tree.