language-toolkit-1.2.0.1: A set of tools for analyzing languages via logic and automata
Copyright(c) 2019-20202023 Dakotah Lambert
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

LTK.Learn.TSL.AugmentedSubsequences

Description

This module implements a string extension learner for the TSL class. A variant of the tier-finding algorithm of Jardine and McMullin (2017) is used along with a notion of a potential valid tier-factor. This is an efficient online conversion of their algorithm.

For the original work, see https://doi.org/10.1007/978-3-319-53733-7_4

Since: 0.3

Synopsis

Documentation

data TSLG a Source #

A representation of a TSL grammar.

Instances

Instances details
HasAlphabet TSLG Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Methods

alphabet :: TSLG e -> Set e Source #

Grammar TSLG Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Methods

genFSA :: (NFData a, Ord a) => TSLG a -> FSA Integer a Source #

augmentG :: Ord a => TSLG a -> TSLG a -> TSLG a Source #

isSubGOf :: Ord a => TSLG a -> TSLG a -> Bool Source #

emptyG :: Ord a => TSLG a Source #

(Read a, Ord a) => Read (TSLG a) Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Show a => Show (TSLG a) Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Methods

showsPrec :: Int -> TSLG a -> ShowS #

show :: TSLG a -> String #

showList :: [TSLG a] -> ShowS #

Eq a => Eq (TSLG a) Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Methods

(==) :: TSLG a -> TSLG a -> Bool #

(/=) :: TSLG a -> TSLG a -> Bool #

Ord a => Ord (TSLG a) Source # 
Instance details

Defined in LTK.Learn.TSL.AugmentedSubsequences

Methods

compare :: TSLG a -> TSLG a -> Ordering #

(<) :: TSLG a -> TSLG a -> Bool #

(<=) :: TSLG a -> TSLG a -> Bool #

(>) :: TSLG a -> TSLG a -> Bool #

(>=) :: TSLG a -> TSLG a -> Bool #

max :: TSLG a -> TSLG a -> TSLG a #

min :: TSLG a -> TSLG a -> TSLG a #

fTSL :: Ord a => Int -> [a] -> TSLG a Source #

Return the set of subsequence-interveners pairs of length \(k\) in a given word, as well as the adjacency factors of length \(k\) and \(k+1\). If a word is short enough to not contain any \(k\)-factors, the entire word, appropriately anchored, is included in the set.