| Copyright | (c) 2017-20192023 Jim Rogers and Dakotah Lambert | 
|---|---|
| License | MIT | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
| Extensions | 
 | 
LTK.Extract.SL
Description
Find forbidden substrings of an automaton.
  Formerly known as LTK.ExtractSL.
Since: 0.2
Synopsis
- data ForbiddenSubstrings e = ForbiddenSubstrings {- attestedUnits :: Set e
- forbiddenWords :: Set [e]
- forbiddenInitials :: Set [e]
- forbiddenFrees :: Set [e]
- forbiddenFinals :: Set [e]
 
- data ForbiddenPaths n e = ForbiddenPaths {- initialPaths :: Set (Path n e)
- freePaths :: Set (Path n e)
- finalPaths :: Set (Path n e)
 
- data TaggedSubstring e
- factorsFromPaths :: (Ord e, Ord n) => Set (Path n e) -> Set [Symbol e]
- forbiddenSubstrings :: (Ord e, Ord n, Enum n) => FSA n e -> ForbiddenSubstrings e
- buildFSA :: (NFData e, Ord e) => ForbiddenSubstrings e -> FSA Integer e
- isSL :: (Ord e, Ord n) => FSA n e -> Bool
- slQ :: (Ord e, Ord n) => FSA n e -> Integer
Documentation
data ForbiddenSubstrings e #
A convenience-type for declaring collections of forbidden substrings. The member types are (lists of) the raw alphabet type (not (Symbol .))
Constructors
| ForbiddenSubstrings | |
| Fields 
 | |
Instances
data ForbiddenPaths n e #
The internal structure gathered by the PSG traversals.
 This structure does not include attested units or forbidden words,
 which are computable separately from the FSA and the forbidden paths
 and are not relevant until the optimal set of initial, free and
 final forbidden paths are fixed.  Labels of paths are (Symbol e).
 Note that, since these are paths in the powerset graph, the states of
 each path are labelled by elements of type Set n if n is
 the type that labels states in the underlying FSA.
Constructors
| ForbiddenPaths | |
| Fields 
 | |
Instances
| (Eq e, Eq n) => Eq (ForbiddenPaths n e) # | |
| Defined in LTK.Extract.SL Methods (==) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # (/=) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # | |
| (Ord e, Ord n) => Ord (ForbiddenPaths n e) # | |
| Defined in LTK.Extract.SL Methods compare :: ForbiddenPaths n e -> ForbiddenPaths n e -> Ordering # (<) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # (<=) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # (>) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # (>=) :: ForbiddenPaths n e -> ForbiddenPaths n e -> Bool # max :: ForbiddenPaths n e -> ForbiddenPaths n e -> ForbiddenPaths n e # min :: ForbiddenPaths n e -> ForbiddenPaths n e -> ForbiddenPaths n e # | |
data TaggedSubstring e #
A sequence of symbols, possibly annotated with end-markers.
Instances
Extracting forbidden substrings
factorsFromPaths :: (Ord e, Ord n) => Set (Path n e) -> Set [Symbol e] #
Convert Set of Paths to Set of sequences of (Symbol e)
forbiddenSubstrings :: (Ord e, Ord n, Enum n) => FSA n e -> ForbiddenSubstrings e #
Forbidden substrings of the given FSA relative to its alphabet
Building automata
buildFSA :: (NFData e, Ord e) => ForbiddenSubstrings e -> FSA Integer e #
Create an FSA satisfying the conditions imposed by the
 given sets of forbidden substrings.