| Copyright | 2014, Peter Harpending. |
|---|---|
| License | BSD3 |
| Maintainer | Peter Harpending <pharpend2@gmail.com> |
| Stability | experimental |
| Portability | archlinux |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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 PhraseTree Source
A Map of text values the appropriate tree
treeScore :: PhraseTree -> Int Source
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 -> Text Source
Given a PhraseTree, return the top-level phrase.
mkMap :: PhraseForest -> PhraseMap Source
Given a list of PhraseTrees, return a map of each phrase with
the appropriate tree.