Copyright | 2014, Peter Harpending. |
---|---|
License | BSD3 |
Maintainer | Peter Harpending <pharpend2@gmail.com> |
Stability | experimental |
Portability | archlinux |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- 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
Tree
s.
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 score
s of its Node
s.
forestPhrases :: [PhraseTree] -> [Text] Source
Given a list of PhraseTree
s, return the top-level phrase
s.
forestPhrase :: PhraseTree -> Text Source
Given a PhraseTree
, return the top-level phrase
.
mkMap :: PhraseForest -> PhraseMap Source
Given a list of PhraseTree
s, return a map of each phrase with
the appropriate tree.