-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Collection of types for natural language
--
-- Types used for natural language applications. Includes an internalized
-- text type, BTI which represents internalized Text
-- values with Ints.
@package LinguisticsTypes
@version 0.0.0.2
-- | This module keeps a persistent bimap between Texts
-- and Ints
--
-- TODO make this a bimap Text - Vector. Compare
-- performance when printing backtracking results. (Do this after the
-- Builder-based backtracking is online)
module NLP.Text.BTI.Internal
btiBimap :: IORef (Bimap Text Int)
-- | Add Text and return Int key. Will return key for
-- existing string and thereby serves for lookup in left-to-right
-- direction.
btiBimapAdd :: Text -> Int
-- | Lookup the InternedMultiChar based on an Int key.
-- Unsafe totality assumption.
btiBimapLookupInt :: Int -> Text
-- | 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.
module NLP.Text.BTI
-- | A BTI behaves much like a Text, but is represented
-- as an Int internally.
newtype BTI
BTI :: Int -> BTI
[getBTI] :: BTI -> Int
-- | Handy wrapper to internalize a Text and get a BTI.
bti :: Text -> BTI
instance Data.Vector.Unboxed.Base.Unbox NLP.Text.BTI.BTI
instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector NLP.Text.BTI.BTI
instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector NLP.Text.BTI.BTI
instance GHC.Classes.Ord NLP.Text.BTI.BTI
instance Data.String.IsString NLP.Text.BTI.BTI
instance GHC.Show.Show NLP.Text.BTI.BTI
instance GHC.Read.Read NLP.Text.BTI.BTI
instance Data.Hashable.Class.Hashable NLP.Text.BTI.BTI
instance Data.Stringable.Stringable NLP.Text.BTI.BTI
instance Control.DeepSeq.NFData NLP.Text.BTI.BTI
instance Data.Binary.Class.Binary NLP.Text.BTI.BTI
instance Data.Serialize.Serialize NLP.Text.BTI.BTI
instance Data.Aeson.Types.Class.FromJSON NLP.Text.BTI.BTI
instance Data.Aeson.Types.Class.ToJSON NLP.Text.BTI.BTI
instance GHC.Generics.Selector NLP.Text.BTI.S1_0_0BTI
instance GHC.Generics.Constructor NLP.Text.BTI.C1_0BTI
instance GHC.Generics.Datatype NLP.Text.BTI.D1BTI
instance GHC.Generics.Generic NLP.Text.BTI.BTI
instance GHC.Classes.Eq NLP.Text.BTI.BTI
-- | Assorted types used in linguistics.
module Linguistics.Types
-- | Concept
--
-- TODO ???
newtype Concept
Concept :: Text -> Concept
[getConcept] :: Concept -> Text
-- | TODO ???
newtype Counterpart
Counterpart :: Text -> Counterpart
[getCountpart] :: Counterpart -> Text
-- | A word in phonetic IPA notation.
newtype IPA
IPA :: Text -> IPA
[getIPA] :: IPA -> Text
-- | TODO ???
newtype Doculect
Doculect :: Text -> Doculect
[getDoculect] :: Doculect -> Text
instance GHC.Generics.Selector Linguistics.Types.S1_0_0Doculect
instance GHC.Generics.Constructor Linguistics.Types.C1_0Doculect
instance GHC.Generics.Datatype Linguistics.Types.D1Doculect
instance GHC.Generics.Selector Linguistics.Types.S1_0_0IPA
instance GHC.Generics.Constructor Linguistics.Types.C1_0IPA
instance GHC.Generics.Datatype Linguistics.Types.D1IPA
instance GHC.Generics.Selector Linguistics.Types.S1_0_0Counterpart
instance GHC.Generics.Constructor Linguistics.Types.C1_0Counterpart
instance GHC.Generics.Datatype Linguistics.Types.D1Counterpart
instance GHC.Generics.Selector Linguistics.Types.S1_0_0Concept
instance GHC.Generics.Constructor Linguistics.Types.C1_0Concept
instance GHC.Generics.Datatype Linguistics.Types.D1Concept
instance GHC.Generics.Generic Linguistics.Types.Doculect
instance GHC.Classes.Ord Linguistics.Types.Doculect
instance GHC.Classes.Eq Linguistics.Types.Doculect
instance GHC.Generics.Generic Linguistics.Types.IPA
instance GHC.Classes.Ord Linguistics.Types.IPA
instance GHC.Classes.Eq Linguistics.Types.IPA
instance GHC.Generics.Generic Linguistics.Types.Counterpart
instance GHC.Classes.Ord Linguistics.Types.Counterpart
instance GHC.Classes.Eq Linguistics.Types.Counterpart
instance GHC.Generics.Generic Linguistics.Types.Concept
instance GHC.Classes.Ord Linguistics.Types.Concept
instance GHC.Classes.Eq Linguistics.Types.Concept
instance Data.Binary.Class.Binary Linguistics.Types.Concept
instance Data.Serialize.Serialize Linguistics.Types.Concept
instance Data.Aeson.Types.Class.FromJSON Linguistics.Types.Concept
instance Data.Aeson.Types.Class.ToJSON Linguistics.Types.Concept
instance Data.Binary.Class.Binary Linguistics.Types.Counterpart
instance Data.Serialize.Serialize Linguistics.Types.Counterpart
instance Data.Aeson.Types.Class.FromJSON Linguistics.Types.Counterpart
instance Data.Aeson.Types.Class.ToJSON Linguistics.Types.Counterpart
instance Data.Binary.Class.Binary Linguistics.Types.IPA
instance Data.Serialize.Serialize Linguistics.Types.IPA
instance Data.Aeson.Types.Class.FromJSON Linguistics.Types.IPA
instance Data.Aeson.Types.Class.ToJSON Linguistics.Types.IPA
instance Data.Binary.Class.Binary Linguistics.Types.Doculect
instance Data.Serialize.Serialize Linguistics.Types.Doculect
instance Data.Aeson.Types.Class.FromJSON Linguistics.Types.Doculect
instance Data.Aeson.Types.Class.ToJSON Linguistics.Types.Doculect