| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
NLP.Scoring.SimpleUnigram.Import
- data ParsedLine
- parseLine :: Text -> ParsedLine
- genSimpleScoring :: Text -> SimpleScoring
- simpleScoreFromFile :: FilePath -> IO SimpleScoring
Documentation
data ParsedLine Source
Each parsed line gives a set of characters, or tells us a score.
TODO add LPimport which starts a recursive import (note: start by storing
the hash or whatever of the file to be imported so that we can comment on
circular imports)
Constructors
| PLset Text [BTI] | |
| PLeq Text Double | |
| PLeqset Text [BTI] | |
| PLinset Text Text Double | |
| PLgap Double | |
| PLgapopen Double | |
| PLgapextend Double | |
| PLdefmatch Double | |
| PLdefmismatch Double | |
| PLcomment Text |
Instances
parseLine :: Text -> ParsedLine Source
Here we simple parse individual lines.
genSimpleScoring :: Text -> SimpleScoring Source
Parses a bytestring to create a simple scoring. We don't do much error checking, many of the bindings below will easily fail.
TODO obviously: implement error-checking
simpleScoreFromFile :: FilePath -> IO SimpleScoring Source
parse a simple scoring file.