Commit 4efcb92f authored by Grégoire Locqueville's avatar Grégoire Locqueville

Not much progress

parent cbae6ae4
Pipeline #6450 failed with stages
{-# LANGUAGE AllowAmbiguousTypes #-}
module REPL where
import Gargantext.Prelude
......@@ -21,7 +19,7 @@ import Gargantext.Core.Text.List (buildNgramsLists)
import Gargantext.Core.NLP (HasNLPServer)
import Gargantext.Database.Query.Tree.Error (HasTreeError)
import Gargantext.Core.Text.List.Group.WithStem (GroupParams (..))
import Gargantext.Database.Action.Flow (getOrMkRootWithCorpus)
import Gargantext.Database.Action.Flow (getOrMkRootWithCorpus, saveDocNgramsWith)
import Gargantext.Database.Query.Tree.Root (MkCorpusUser (..))
import Gargantext.API.Admin.Types (HasSettings)
import Gargantext.Database.Admin.Types.Hyperdata.Corpus (HyperdataCorpus)
......@@ -84,15 +82,33 @@ makeSubcorpusFromQuery user parentId query reuseParentList = do
-- Either simply copy parent terms... (TODO)
if reuseParentList then return ()
-- ... or rebuild a term list from scratch
else void $ buildNgramsLists user subcorpusId masterCorpusId Nothing GroupIdentity
else do
void $ buildNgramsLists user subcorpusId masterCorpusId Nothing GroupIdentity -- Map NgramsType [NgramsElement]
-- saveDocNgramsWith :: (DbCmd' env err m)
-- => ListId
-- -> HashMap.HashMap ExtractedNgrams (Map NgramsType (Map NodeId (Int, TermsCount)))
-- -> m ()
saveDocNgramsWith lId mapNgramsDocs'
return ()
-- comment Save ??
return subcorpusId
-- TODO
-- Permettre de (mettre les 2 en option) :
-- [X] 1a. relancer le buildNgramsLists (cf. module Flow)
-- [ ] 1a. relancer le buildNgramsLists (cf. module Flow)
-- [ ] 1b. ou copier la liste
-- [ ] 2. générer un graphe
-- Problèmes :
-- * Permission error quand j'essaie d'avoir l'ID du master corpus.
-- Je pense que getOrMkRootWithCorpus n'est pas la bonne fonction à utiliser
-- * Permission error quand j'essaie d'avoir l'ID du master corpus
-- * Comment save une ngramslist ?
-- * Je ne sais pas ce que sont les arguments de type
-- Maybe FlowSocialListWith
-- GroupParams
-- de buildNgramsList
-- * Les types de :
-- - le résultat de buildNgramsLists
-- - les arguments de saveDocNgramsWith
-- n'ont rien à voir l'un avec l'autre
-- * Pour 1b. ... par où commencer, où prendre modèle ?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment