Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- type QueryParamR = QueryParam' '[Required, Strict]
- data TabType
- newtype MSet a = MSet (Map a ())
- mSetFromSet :: Set a -> MSet a
- mSetFromList :: Ord a => [a] -> MSet a
- mSetToSet :: Ord a => MSet a -> Set a
- mSetToList :: MSet a -> [a]
- newtype NgramsTerm = NgramsTerm {
- unNgramsTerm :: Text
- data RootParent = RootParent {}
- rp_root :: Lens' RootParent NgramsTerm
- rp_parent :: Lens' RootParent NgramsTerm
- data NgramsRepoElement = NgramsRepoElement {
- _nre_size :: !Int
- _nre_list :: !ListType
- _nre_root :: !(Maybe NgramsTerm)
- _nre_parent :: !(Maybe NgramsTerm)
- _nre_children :: !(MSet NgramsTerm)
- nre_size :: Lens' NgramsRepoElement Int
- nre_root :: Lens' NgramsRepoElement (Maybe NgramsTerm)
- nre_parent :: Lens' NgramsRepoElement (Maybe NgramsTerm)
- nre_list :: Lens' NgramsRepoElement ListType
- nre_children :: Lens' NgramsRepoElement (MSet NgramsTerm)
- data NgramsElement = NgramsElement {}
- ne_size :: Lens' NgramsElement Int
- ne_root :: Lens' NgramsElement (Maybe NgramsTerm)
- ne_parent :: Lens' NgramsElement (Maybe NgramsTerm)
- ne_occurrences :: Lens' NgramsElement (Set ContextId)
- ne_ngrams :: Lens' NgramsElement NgramsTerm
- ne_list :: Lens' NgramsElement ListType
- ne_children :: Lens' NgramsElement (MSet NgramsTerm)
- mkNgramsElement :: NgramsTerm -> ListType -> Maybe RootParent -> MSet NgramsTerm -> NgramsElement
- newNgramsElement :: Maybe ListType -> NgramsTerm -> NgramsElement
- newtype NgramsTable = NgramsTable [NgramsElement]
- _NgramsTable :: Iso' NgramsTable [NgramsElement]
- mockTable :: NgramsTable
- data OrderBy
- data NgramsSearchQuery = NgramsSearchQuery {
- _nsq_limit :: !Limit
- _nsq_offset :: !(Maybe Offset)
- _nsq_listType :: !(Maybe ListType)
- _nsq_minSize :: !(Maybe MinSize)
- _nsq_maxSize :: !(Maybe MaxSize)
- _nsq_orderBy :: !(Maybe OrderBy)
- _nsq_searchQuery :: !(NgramsTerm -> Bool)
- type NgramsTableMap = Map NgramsTerm NgramsRepoElement
- data PatchSet a = PatchSet {}
- rem :: forall a. Lens' (PatchSet a) (Set a)
- add :: forall a. Lens' (PatchSet a) (Set a)
- _PatchSet :: forall a a. Iso (PatchSet a) (PatchSet a) (Set a, Set a) (Set a, Set a)
- type AddRem = Replace (Maybe ())
- remPatch :: AddRem
- addPatch :: AddRem
- isRem :: Replace (Maybe ()) -> Bool
- type PatchMap = PatchMap
- newtype PatchMSet a = PatchMSet (PatchMap a AddRem)
- unPatchMSet :: PatchMSet a -> PatchMap a AddRem
- type ConflictResolutionPatchMSet a = a -> ConflictResolutionReplace (Maybe ())
- _PatchMap :: forall k pv k pv. Iso (PatchMap k pv) (PatchMap k pv) (Map k pv) (Map k pv)
- _PatchMSet :: forall a a. Iso (PatchMSet a) (PatchMSet a) (PatchMap a AddRem) (PatchMap a AddRem)
- _PatchMSetIso :: Ord a => Iso' (PatchMSet a) (PatchSet a)
- data NgramsPatch
- = NgramsPatch {
- _patch_children :: !(PatchMSet NgramsTerm)
- _patch_list :: !(Replace ListType)
- | NgramsReplace {
- _patch_old :: !(Maybe NgramsRepoElement)
- _patch_new :: !(Maybe NgramsRepoElement)
- = NgramsPatch {
- patch_old :: Traversal' NgramsPatch (Maybe NgramsRepoElement)
- patch_new :: Traversal' NgramsPatch (Maybe NgramsRepoElement)
- patch_list :: Traversal' NgramsPatch (Replace ListType)
- patch_children :: Traversal' NgramsPatch (PatchMSet NgramsTerm)
- type NgramsPatchIso = MaybePatch NgramsRepoElement (PairPatch (PatchMSet NgramsTerm) (Replace ListType))
- _NgramsPatch :: Iso' NgramsPatch NgramsPatchIso
- type ConflictResolutionNgramsPatch = (ConflictResolutionReplace (Maybe NgramsRepoElement), (ConflictResolutionPatchMSet NgramsTerm, ConflictResolutionReplace ListType), (Bool, Bool))
- type PatchedNgramsPatch = Maybe NgramsRepoElement
- newtype NgramsTablePatch = NgramsTablePatch (PatchMap NgramsTerm NgramsPatch)
- mkNgramsTablePatch :: Map NgramsTerm NgramsPatch -> NgramsTablePatch
- type PatchedNgramsTablePatch = Map NgramsTerm PatchedNgramsPatch
- _NgramsTablePatch :: Iso' NgramsTablePatch (PatchMap NgramsTerm NgramsPatch)
- ngramsElementToRepo :: NgramsElement -> NgramsRepoElement
- ngramsElementFromRepo :: NgramsTerm -> NgramsRepoElement -> NgramsElement
- reRootChildren :: NgramsTerm -> NgramsTerm -> State NgramsTableMap ()
- reParent :: Maybe RootParent -> NgramsTerm -> State NgramsTableMap ()
- reParentAddRem :: RootParent -> NgramsTerm -> AddRem -> State NgramsTableMap ()
- reParentNgramsPatch :: NgramsTerm -> NgramsPatch -> State NgramsTableMap ()
- reParentNgramsTablePatch :: NgramsTablePatch -> State NgramsTableMap ()
- type Version = Int
- data Versioned a = Versioned {
- _v_version :: Version
- _v_data :: a
- v_version :: forall a. Lens' (Versioned a) Version
- v_data :: forall a a. Lens (Versioned a) (Versioned a) a a
- type Count = Int
- data VersionedWithCount a = VersionedWithCount {
- _vc_version :: Version
- _vc_count :: Count
- _vc_data :: a
- vc_version :: forall a. Lens' (VersionedWithCount a) Version
- vc_data :: forall a a. Lens (VersionedWithCount a) (VersionedWithCount a) a a
- vc_count :: forall a. Lens' (VersionedWithCount a) Count
- toVersionedWithCount :: Count -> Versioned a -> VersionedWithCount a
- data Repo s p = Repo {
- _r_version :: !Version
- _r_state :: !s
- _r_history :: ![p]
- r_version :: forall s p. Lens' (Repo s p) Version
- r_state :: forall s p s. Lens (Repo s p) (Repo s p) s s
- r_history :: forall s p p. Lens (Repo s p) (Repo s p) [p] [p]
- initRepo :: Monoid s => Repo s p
- type RepoCmdM env err m = (CmdM' env err m, HasConnectionPool env, HasConfig env)
- ngramsTypeFromTabType :: TabType -> NgramsType
- data UpdateTableNgramsCharts = UpdateTableNgramsCharts {
- _utn_tab_type :: !TabType
- _utn_list_id :: !ListId
- utn_tab_type :: Lens' UpdateTableNgramsCharts TabType
- utn_list_id :: Lens' UpdateTableNgramsCharts ListId
- type NgramsList = Map NgramsType (Versioned NgramsTableMap)
- data NgramsListZIP = NgramsListZIP {}
- nlzFileName :: NgramsListZIP -> Text
- toNgramsPatch :: [NgramsTerm] -> NgramsPatch
Documentation
type QueryParamR = QueryParam' '[Required, Strict] #
Instances
Instances
mSetFromSet :: Set a -> MSet a #
mSetFromList :: Ord a => [a] -> MSet a #
mSetToList :: MSet a -> [a] #
newtype NgramsTerm #
Instances
data RootParent #
Instances
data NgramsRepoElement #
NgramsRepoElement | |
|
Instances
data NgramsElement #
Instances
mkNgramsElement :: NgramsTerm -> ListType -> Maybe RootParent -> MSet NgramsTerm -> NgramsElement #
newNgramsElement :: Maybe ListType -> NgramsTerm -> NgramsElement #
newtype NgramsTable #
Instances
TODO Check N and Weight
Instances
data NgramsSearchQuery #
A query on a NgramsTable
.
NgramsSearchQuery | |
|
Instances
(Ord a, FromJSON a) => FromJSON (PatchSet a) # | |
ToJSON a => ToJSON (PatchSet a) # | |
Defined in Gargantext.API.Ngrams.Types | |
Generic (PatchSet a) # | |
Show a => Show (PatchSet a) # | |
Eq a => Eq (PatchSet a) # | |
Ord a => Ord (PatchSet a) # | |
Defined in Gargantext.API.Ngrams.Types | |
type Rep (PatchSet a) # | |
Defined in Gargantext.API.Ngrams.Types type Rep (PatchSet a) = D1 ('MetaData "PatchSet" "Gargantext.API.Ngrams.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "PatchSet" 'PrefixI 'True) (S1 ('MetaSel ('Just "_rem") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set a)) :*: S1 ('MetaSel ('Just "_add") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set a)))) |
Instances
unPatchMSet :: PatchMSet a -> PatchMap a AddRem #
type ConflictResolutionPatchMSet a = a -> ConflictResolutionReplace (Maybe ()) #
data NgramsPatch #
NgramsPatch | |
| |
NgramsReplace | |
|
Instances
type NgramsPatchIso = MaybePatch NgramsRepoElement (PairPatch (PatchMSet NgramsTerm) (Replace ListType)) #
type ConflictResolutionNgramsPatch = (ConflictResolutionReplace (Maybe NgramsRepoElement), (ConflictResolutionPatchMSet NgramsTerm, ConflictResolutionReplace ListType), (Bool, Bool)) #
newtype NgramsTablePatch #
Instances
reRootChildren :: NgramsTerm -> NgramsTerm -> State NgramsTableMap () #
reParent :: Maybe RootParent -> NgramsTerm -> State NgramsTableMap () #
reParentAddRem :: RootParent -> NgramsTerm -> AddRem -> State NgramsTableMap () #
:: NgramsTerm | The |
-> NgramsPatch | The patch to be applied to |
-> State NgramsTableMap () |
For each (k,v) of the PatchMap
, transform the input NgramsTableMap
.
Versioned | |
|
Instances
data VersionedWithCount a #
VersionedWithCount | |
|
Instances
vc_version :: forall a. Lens' (VersionedWithCount a) Version #
vc_data :: forall a a. Lens (VersionedWithCount a) (VersionedWithCount a) a a #
vc_count :: forall a. Lens' (VersionedWithCount a) Count #
toVersionedWithCount :: Count -> Versioned a -> VersionedWithCount a #
TOREMOVE
Repo | |
|
Instances
(FromJSON s, FromJSON p) => FromJSON (Repo s p) # | |
(ToJSON s, ToJSON p) => ToJSON (Repo s p) # | |
Defined in Gargantext.API.Ngrams.Types | |
Generic (Repo s p) # | |
(Show s, Show p) => Show (Repo s p) # | |
(Serialise s, Serialise p) => Serialise (Repo s p) # | |
type Rep (Repo s p) # | |
Defined in Gargantext.API.Ngrams.Types type Rep (Repo s p) = D1 ('MetaData "Repo" "Gargantext.API.Ngrams.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "Repo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_r_version") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Version) :*: (S1 ('MetaSel ('Just "_r_state") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 s) :*: S1 ('MetaSel ('Just "_r_history") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [p])))) |
type RepoCmdM env err m = (CmdM' env err m, HasConnectionPool env, HasConfig env) #
data UpdateTableNgramsCharts #
Instances
type NgramsList = Map NgramsType (Versioned NgramsTableMap) #
data NgramsListZIP #
Same as NgramsList, but wraps node_id so that the inner .json file can have proper name
Instances
Generic NgramsListZIP # | |
Defined in Gargantext.API.Ngrams.Types type Rep NgramsListZIP :: Type -> Type # from :: NgramsListZIP -> Rep NgramsListZIP x # to :: Rep NgramsListZIP x -> NgramsListZIP # | |
ToSchema NgramsListZIP # | |
Defined in Gargantext.API.Ngrams.Types | |
HasSwagger (WithCustomErrorScheme GargAPI) # | |
Defined in Gargantext.API.Routes | |
type Rep NgramsListZIP # | |
Defined in Gargantext.API.Ngrams.Types type Rep NgramsListZIP = D1 ('MetaData "NgramsListZIP" "Gargantext.API.Ngrams.Types" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "NgramsListZIP" 'PrefixI 'True) (S1 ('MetaSel ('Just "_nlz_nl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 NgramsList) :*: S1 ('MetaSel ('Just "_nlz_list_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ListId))) |
nlzFileName :: NgramsListZIP -> Text #
toNgramsPatch :: [NgramsTerm] -> NgramsPatch #