Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Warning: This module is internal, and does not follow the Package Versioning Policy. It may be useful for extending Brassica, but be prepared to track development closely if you import this module.
Synopsis
- data ApplicationMode
- data HighlightMode
- data OutputMode
- data TokenisationMode
- = Normal
- | AddEtymons
- tokenisationModeFor :: ApplicationMode -> TokenisationMode
- data ApplicationOutput a r
- = HighlightedWords [Component (a, Bool)]
- | AppliedRulesTable [PWordLog r]
- | ParseError (ParseErrorBundle String Void)
- | ExpandError ExpandError
- data InputLexiconFormat
- data ParseOutput a
- componentise :: OutputMode -> [a] -> ParseOutput a -> [Component a]
- intersperseWords :: [a] -> [Component a] -> [Component a]
- tokeniseAccordingToInputFormat :: InputLexiconFormat -> TokenisationMode -> SoundChanges Expanded [Grapheme] -> String -> Either (ParseErrorBundle String Void) (ParseOutput PWord)
- getParsedWords :: ParseOutput a -> [a]
- parseTokeniseAndApplyRules :: SoundChanges CategorySpec Directive -> String -> InputLexiconFormat -> ApplicationMode -> Maybe [Component PWord] -> ApplicationOutput PWord (Statement Expanded [Grapheme])
Documentation
data ApplicationMode Source #
Rule application mode of the SCA.
Instances
Show ApplicationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> ApplicationMode -> ShowS # show :: ApplicationMode -> String # showList :: [ApplicationMode] -> ShowS # | |
Eq ApplicationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal (==) :: ApplicationMode -> ApplicationMode -> Bool # (/=) :: ApplicationMode -> ApplicationMode -> Bool # |
data HighlightMode Source #
Instances
Enum HighlightMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal succ :: HighlightMode -> HighlightMode # pred :: HighlightMode -> HighlightMode # toEnum :: Int -> HighlightMode # fromEnum :: HighlightMode -> Int # enumFrom :: HighlightMode -> [HighlightMode] # enumFromThen :: HighlightMode -> HighlightMode -> [HighlightMode] # enumFromTo :: HighlightMode -> HighlightMode -> [HighlightMode] # enumFromThenTo :: HighlightMode -> HighlightMode -> HighlightMode -> [HighlightMode] # | |
Show HighlightMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> HighlightMode -> ShowS # show :: HighlightMode -> String # showList :: [HighlightMode] -> ShowS # | |
Eq HighlightMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal (==) :: HighlightMode -> HighlightMode -> Bool # (/=) :: HighlightMode -> HighlightMode -> Bool # |
data OutputMode Source #
Instances
Enum OutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal succ :: OutputMode -> OutputMode # pred :: OutputMode -> OutputMode # toEnum :: Int -> OutputMode # fromEnum :: OutputMode -> Int # enumFrom :: OutputMode -> [OutputMode] # enumFromThen :: OutputMode -> OutputMode -> [OutputMode] # enumFromTo :: OutputMode -> OutputMode -> [OutputMode] # enumFromThenTo :: OutputMode -> OutputMode -> OutputMode -> [OutputMode] # | |
Show OutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> OutputMode -> ShowS # show :: OutputMode -> String # showList :: [OutputMode] -> ShowS # | |
Eq OutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal (==) :: OutputMode -> OutputMode -> Bool # (/=) :: OutputMode -> OutputMode -> Bool # |
data TokenisationMode Source #
Instances
Enum TokenisationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal succ :: TokenisationMode -> TokenisationMode # pred :: TokenisationMode -> TokenisationMode # toEnum :: Int -> TokenisationMode # fromEnum :: TokenisationMode -> Int # enumFrom :: TokenisationMode -> [TokenisationMode] # enumFromThen :: TokenisationMode -> TokenisationMode -> [TokenisationMode] # enumFromTo :: TokenisationMode -> TokenisationMode -> [TokenisationMode] # enumFromThenTo :: TokenisationMode -> TokenisationMode -> TokenisationMode -> [TokenisationMode] # | |
Show TokenisationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> TokenisationMode -> ShowS # show :: TokenisationMode -> String # showList :: [TokenisationMode] -> ShowS # | |
Eq TokenisationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal (==) :: TokenisationMode -> TokenisationMode -> Bool # (/=) :: TokenisationMode -> TokenisationMode -> Bool # |
data ApplicationOutput a r Source #
Output of a single application of rules to a wordlist: either a list of possibly highlighted words, an applied rules table, or a parse error.
HighlightedWords [Component (a, Bool)] | |
AppliedRulesTable [PWordLog r] | |
ParseError (ParseErrorBundle String Void) | |
ExpandError ExpandError |
Instances
data InputLexiconFormat Source #
Kind of input: either a raw wordlist, or an MDF file.
Instances
Enum InputLexiconFormat Source # | |
Defined in Brassica.SoundChange.Frontend.Internal succ :: InputLexiconFormat -> InputLexiconFormat # pred :: InputLexiconFormat -> InputLexiconFormat # toEnum :: Int -> InputLexiconFormat # fromEnum :: InputLexiconFormat -> Int # enumFrom :: InputLexiconFormat -> [InputLexiconFormat] # enumFromThen :: InputLexiconFormat -> InputLexiconFormat -> [InputLexiconFormat] # enumFromTo :: InputLexiconFormat -> InputLexiconFormat -> [InputLexiconFormat] # enumFromThenTo :: InputLexiconFormat -> InputLexiconFormat -> InputLexiconFormat -> [InputLexiconFormat] # | |
Show InputLexiconFormat Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> InputLexiconFormat -> ShowS # show :: InputLexiconFormat -> String # showList :: [InputLexiconFormat] -> ShowS # | |
Eq InputLexiconFormat Source # | |
Defined in Brassica.SoundChange.Frontend.Internal (==) :: InputLexiconFormat -> InputLexiconFormat -> Bool # (/=) :: InputLexiconFormat -> InputLexiconFormat -> Bool # |
data ParseOutput a Source #
Instances
Functor ParseOutput Source # | |
Defined in Brassica.SoundChange.Frontend.Internal fmap :: (a -> b) -> ParseOutput a -> ParseOutput b # (<$) :: a -> ParseOutput b -> ParseOutput a # | |
Show a => Show (ParseOutput a) Source # | |
Defined in Brassica.SoundChange.Frontend.Internal showsPrec :: Int -> ParseOutput a -> ShowS # show :: ParseOutput a -> String # showList :: [ParseOutput a] -> ShowS # |
componentise :: OutputMode -> [a] -> ParseOutput a -> [Component a] Source #
intersperseWords :: [a] -> [Component a] -> [Component a] Source #
tokeniseAccordingToInputFormat :: InputLexiconFormat -> TokenisationMode -> SoundChanges Expanded [Grapheme] -> String -> Either (ParseErrorBundle String Void) (ParseOutput PWord) Source #
getParsedWords :: ParseOutput a -> [a] Source #
parseTokeniseAndApplyRules Source #
:: SoundChanges CategorySpec Directive | changes |
-> String | words |
-> InputLexiconFormat | |
-> ApplicationMode | |
-> Maybe [Component PWord] | previous results |
-> ApplicationOutput PWord (Statement Expanded [Grapheme]) |
Top-level dispatcher for an interactive frontend: given a textual wordlist and a list of sound changes, returns the result of running the changes in the specified mode.