LinguisticsTypes-0.0.0.3: Collection of types for natural language

Safe HaskellNone
LanguageHaskell2010

NLP.Text.BTI

Description

An implementation of Int-mapped Texts with internalization. Wrap a Text with bti to receive a BTI. This internalizes the given Text, meaning that two text inputs x and y will yield the same BTI if they have the same textual representation.

Since internalized Text values are never released, be sure to use it sparingly. I.e. to internalize words, not full sentences.

Synopsis

Documentation

newtype BTI Source #

A BTI behaves much like a Text, but is represented as an Int internally.

Constructors

BTI 

Fields

Instances

Eq BTI Source # 

Methods

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

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

Ord BTI Source # 

Methods

compare :: BTI -> BTI -> Ordering #

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

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

(>) :: BTI -> BTI -> Bool #

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

max :: BTI -> BTI -> BTI #

min :: BTI -> BTI -> BTI #

Read BTI Source # 
Show BTI Source # 

Methods

showsPrec :: Int -> BTI -> ShowS #

show :: BTI -> String #

showList :: [BTI] -> ShowS #

IsString BTI Source # 

Methods

fromString :: String -> BTI #

Generic BTI Source # 

Associated Types

type Rep BTI :: * -> * #

Methods

from :: BTI -> Rep BTI x #

to :: Rep BTI x -> BTI #

Hashable BTI Source # 

Methods

hashWithSalt :: Int -> BTI -> Int #

hash :: BTI -> Int #

ToJSON BTI Source # 
FromJSON BTI Source # 
Binary BTI Source # 

Methods

put :: BTI -> Put #

get :: Get BTI #

putList :: [BTI] -> Put #

Serialize BTI Source # 

Methods

put :: Putter BTI #

get :: Get BTI #

NFData BTI Source # 

Methods

rnf :: BTI -> () #

Unbox BTI Source # 
Vector Vector BTI Source # 
MVector MVector BTI Source # 
type Rep BTI Source # 
type Rep BTI = D1 (MetaData "BTI" "NLP.Text.BTI" "LinguisticsTypes-0.0.0.3-GIJyltGebgi8DIUxDNPryu" True) (C1 (MetaCons "BTI" PrefixI True) (S1 (MetaSel (Just Symbol "getBTI") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))
data Vector BTI Source # 
data MVector s BTI Source # 

bti :: Text -> BTI Source #

Handy wrapper to internalize a Text and get a BTI.