duckling-0.1.5.0: A Haskell library for parsing text into structured data.

Safe HaskellNone
LanguageHaskell2010

Duckling.Types

Synopsis

Documentation

data Token Source #

Constructors

(Resolve a, Eq a, Hashable a, Show a, NFData a) => Token (Dimension a) a 

Instances

Eq Token Source # 

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Show Token Source # 

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

NFData Token Source # 

Methods

rnf :: Token -> () #

Hashable Token Source # 

Methods

hashWithSalt :: Int -> Token -> Int #

hash :: Token -> Int #

class (Show a, Typeable a) => CustomDimension a where Source #

Minimal complete definition

dimRules, dimLangRules, dimLocaleRules, dimDependents

Associated Types

type DimensionData a Source #

data Dimension a where Source #

GADT for differentiating between dimensions Each dimension should have its own constructor and provide the data structure for its parsed data

data Node Source #

Constructors

Node 

Fields

Instances

Eq Node Source # 

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node Source # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Generic Node Source # 

Associated Types

type Rep Node :: * -> * #

Methods

from :: Node -> Rep Node x #

to :: Rep Node x -> Node #

NFData Node Source # 

Methods

rnf :: Node -> () #

Hashable Node Source # 

Methods

hashWithSalt :: Int -> Node -> Int #

hash :: Node -> Int #

type Rep Node Source # 

data Range Source #

Constructors

Range Int Int 

Instances

Eq Range Source # 

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

Ord Range Source # 

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

Show Range Source # 

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Generic Range Source # 

Associated Types

type Rep Range :: * -> * #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

NFData Range Source # 

Methods

rnf :: Range -> () #

Hashable Range Source # 

Methods

hashWithSalt :: Int -> Range -> Int #

hash :: Range -> Int #

type Rep Range Source # 

data Rule Source #

Constructors

Rule 

Fields

Instances

data Entity Source #

Constructors

Entity 

Fields

toJText :: ToJSON x => x -> Text Source #