Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
145
Issues
145
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
c7c5cba3
Commit
c7c5cba3
authored
Feb 12, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TEXT] some comments.
parent
a04e0e9d
Pipeline
#184
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+5
-2
Flow.hs
src/Gargantext/Database/Flow.hs
+4
-5
No files found.
src/Gargantext/API/Ngrams.hs
View file @
c7c5cba3
...
...
@@ -155,6 +155,8 @@ type ListNgrams = NgramsTable
makePrisms
''
N
gramsTable
-- | Question: why these repetition of Type in this instance
-- may you document it please ?
instance
Each
NgramsTable
NgramsTable
NgramsElement
NgramsElement
where
each
=
_NgramsTable
.
each
...
...
@@ -644,8 +646,9 @@ something :: Monoid a => Maybe a -> a
something
Nothing
=
mempty
something
(
Just
a
)
=
a
putListNgrams
::
RepoCmdM
env
err
m
=>
NodeId
->
NgramsType
->
[
NgramsElement
]
->
m
()
putListNgrams
::
RepoCmdM
env
err
m
=>
NodeId
->
NgramsType
->
[
NgramsElement
]
->
m
()
putListNgrams
listId
ngramsType
nes
=
do
var
<-
view
repoVar
liftIO
$
modifyMVar_
var
$
...
...
src/Gargantext/Database/Flow.hs
View file @
c7c5cba3
...
...
@@ -19,6 +19,7 @@ Portability : POSIX
module
Gargantext.Database.Flow
-- (flowDatabase, ngrams2list)
where
--import Debug.Trace (trace)
--import Control.Lens (view)
import
Control.Monad
(
mapM_
)
import
Control.Monad.IO.Class
(
liftIO
)
...
...
@@ -121,9 +122,7 @@ flowCorpus' NodeCorpus hyperdataDocuments (ids,masterUserId,masterCorpusId, user
-- List Ngrams Flow
_masterListId
<-
flowList
masterUserId
masterCorpusId
indexedNgrams
_userListId
<-
flowListUser
userId
userCorpusId
500
--printDebug "Working on User ListId : " userListId
--}
_userListId
<-
flowListUser
userId
userCorpusId
500
--------------------------------------------------
_
<-
mkDashboard
userCorpusId
userId
_
<-
mkGraph
userCorpusId
userId
...
...
@@ -249,6 +248,7 @@ flowList :: FlowCmdM env err m => UserId -> CorpusId
flowList
uId
cId
ngs
=
do
--printDebug "ngs:" ngs
lId
<-
getOrMkList
cId
uId
printDebug
"listId flowList"
lId
--printDebug "ngs" (DM.keys ngs)
-- TODO add stemming equivalence of 2 ngrams
-- TODO needs rework
...
...
@@ -256,8 +256,7 @@ flowList uId cId ngs = do
-- _ <- insertGroups lId groupEd
-- compute Candidate / Map
_is
<-
mapM_
(
\
(
typeList
,
ngElements
)
->
putListNgrams
lId
typeList
ngElements
)
$
toList
$
ngrams2list'
ngs
--printDebug "listNgrams inserted :" is
mapM_
(
\
(
typeList
,
ngElmts
)
->
putListNgrams
lId
typeList
ngElmts
)
$
toList
$
ngrams2list'
ngs
pure
lId
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment