Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Brassica.SoundChange.Frontend.Internal
Description
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 MDFOutputMode
- data TokenisationMode
- = Normal
- | AddEtymons
- data ApplicationOutput a r
- = HighlightedWords [Component (a, Bool)]
- | AppliedRulesTable [PWordLog r]
- | ParseError (ParseErrorBundle String Void)
- data InputLexiconFormat
- data ParseOutput a
- componentise :: MDFOutputMode -> ParseOutput a -> [Component a]
- tokeniseAccordingToInputFormat :: InputLexiconFormat -> TokenisationMode -> SoundChanges -> String -> Either (ParseErrorBundle String Void) (ParseOutput PWord)
- parseTokeniseAndApplyRules :: SoundChanges -> String -> InputLexiconFormat -> TokenisationMode -> ApplicationMode -> Maybe [Component PWord] -> ApplicationOutput PWord Statement
Documentation
data ApplicationMode Source #
Rule application mode of the SCA.
Constructors
ApplyRules HighlightMode MDFOutputMode | |
ReportRulesApplied |
Instances
Show ApplicationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods showsPrec :: Int -> ApplicationMode -> ShowS # show :: ApplicationMode -> String # showList :: [ApplicationMode] -> ShowS # | |
Eq ApplicationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods (==) :: ApplicationMode -> ApplicationMode -> Bool # (/=) :: ApplicationMode -> ApplicationMode -> Bool # |
data HighlightMode Source #
Constructors
NoHighlight | |
DifferentToLastRun | |
DifferentToInput |
Instances
Enum HighlightMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods 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 Methods showsPrec :: Int -> HighlightMode -> ShowS # show :: HighlightMode -> String # showList :: [HighlightMode] -> ShowS # | |
Eq HighlightMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods (==) :: HighlightMode -> HighlightMode -> Bool # (/=) :: HighlightMode -> HighlightMode -> Bool # |
data MDFOutputMode Source #
Constructors
MDFOutput | |
WordsOnlyOutput |
Instances
Enum MDFOutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods succ :: MDFOutputMode -> MDFOutputMode # pred :: MDFOutputMode -> MDFOutputMode # toEnum :: Int -> MDFOutputMode # fromEnum :: MDFOutputMode -> Int # enumFrom :: MDFOutputMode -> [MDFOutputMode] # enumFromThen :: MDFOutputMode -> MDFOutputMode -> [MDFOutputMode] # enumFromTo :: MDFOutputMode -> MDFOutputMode -> [MDFOutputMode] # enumFromThenTo :: MDFOutputMode -> MDFOutputMode -> MDFOutputMode -> [MDFOutputMode] # | |
Show MDFOutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods showsPrec :: Int -> MDFOutputMode -> ShowS # show :: MDFOutputMode -> String # showList :: [MDFOutputMode] -> ShowS # | |
Eq MDFOutputMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods (==) :: MDFOutputMode -> MDFOutputMode -> Bool # (/=) :: MDFOutputMode -> MDFOutputMode -> Bool # |
data TokenisationMode Source #
Constructors
Normal | |
AddEtymons |
Instances
Enum TokenisationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods 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 Methods showsPrec :: Int -> TokenisationMode -> ShowS # show :: TokenisationMode -> String # showList :: [TokenisationMode] -> ShowS # | |
Eq TokenisationMode Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods (==) :: 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.
Constructors
HighlightedWords [Component (a, Bool)] | |
AppliedRulesTable [PWordLog r] | |
ParseError (ParseErrorBundle String Void) |
Instances
data InputLexiconFormat Source #
Kind of input: either a raw wordlist, or an MDF file.
Instances
data ParseOutput a Source #
Instances
Functor ParseOutput Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods fmap :: (a -> b) -> ParseOutput a -> ParseOutput b # (<$) :: a -> ParseOutput b -> ParseOutput a # | |
Show a => Show (ParseOutput a) Source # | |
Defined in Brassica.SoundChange.Frontend.Internal Methods showsPrec :: Int -> ParseOutput a -> ShowS # show :: ParseOutput a -> String # showList :: [ParseOutput a] -> ShowS # |
componentise :: MDFOutputMode -> ParseOutput a -> [Component a] Source #
tokeniseAccordingToInputFormat :: InputLexiconFormat -> TokenisationMode -> SoundChanges -> String -> Either (ParseErrorBundle String Void) (ParseOutput PWord) Source #
parseTokeniseAndApplyRules Source #
Arguments
:: SoundChanges | changes |
-> String | words |
-> InputLexiconFormat | |
-> TokenisationMode | |
-> ApplicationMode | |
-> Maybe [Component PWord] | previous results |
-> ApplicationOutput PWord Statement |
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.