gargantext-0.0.7.1.5.3: Search, map, share
Copyright(c) CNRS 2017-Present
LicenseAGPL + CECILL v3
Maintainerteam@gargantext.org
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.Database.Schema.Ngrams

Description

Ngrams connection to the Database.

Synopsis

Documentation

type NgramsId = Int #

type Size = Int #

data NgramsPoly id terms n #

Ngrams table n is the size, see G.D.Q.T.Ngrams -> insertNgrams' function. I.e. ngrams with 1 term are of size 1, ngrams with 2 terms are of size 2 etc.

Constructors

NgramsDB 

Fields

Instances

Instances details
(ProductProfunctor p, Default p a1_0 a1_1, Default p a2_0 a2_1, Default p a3_0 a3_1) => Default p (NgramsPoly a1_0 a2_0 a3_0) (NgramsPoly a1_1 a2_1 a3_1) # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

Methods

def :: p (NgramsPoly a1_0 a2_0 a3_0) (NgramsPoly a1_1 a2_1 a3_1) #

(Show id, Show terms, Show n) => Show (NgramsPoly id terms n) # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

Methods

showsPrec :: Int -> NgramsPoly id terms n -> ShowS #

show :: NgramsPoly id terms n -> String #

showList :: [NgramsPoly id terms n] -> ShowS #

pNgramsDb :: forall p a1_0 a2_0 a3_0 a1_1 a2_1 a3_1. ProductProfunctor p => NgramsPoly (p a1_0 a1_1) (p a2_0 a2_1) (p a3_0 a3_1) -> p (NgramsPoly a1_0 a2_0 a3_0) (NgramsPoly a1_1 a2_1 a3_1) #

ngrams_terms :: forall id terms n terms. Lens (NgramsPoly id terms n) (NgramsPoly id terms n) terms terms #

ngrams_n :: forall id terms n n. Lens (NgramsPoly id terms n) (NgramsPoly id terms n) n n #

ngrams_id :: forall id terms n id. Lens (NgramsPoly id terms n) (NgramsPoly id terms n) id id #

newtype NgramsTypeId #

Constructors

NgramsTypeId Int 

Instances

Instances details
Num NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

Show NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

Eq NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

Ord NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

FromField NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

ToField NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

DefaultFromField (Nullable SqlInt4) NgramsTypeId # 
Instance details

Defined in Gargantext.Database.Schema.Ngrams

ngramsTypeIds :: Bimap NgramsType NgramsTypeId #

Bidirectional map between an NgramsType and its id. NOTE This function is total in its domain by construction.

indexTypedNgrams :: HashMap Text NgramsId -> Typed NgramsType Ngrams -> Typed NgramsType (Indexed Int Ngrams) #

TODO replace NgramsT whith Typed NgramsType Ngrams

Orphan instances

HasDBid NgramsType # 
Instance details

FromField Ngrams # 
Instance details

FromField NgramsType # 
Instance details

ToField NgramsType # 
Instance details

Methods

toField :: NgramsType -> Action #

ToRow Text # 
Instance details

Methods

toRow :: Text -> [Action] #