Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
72c29d93
Commit
72c29d93
authored
May 03, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] removing printDebug
parent
d4e1dd93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
List.hs
src/Gargantext/API/Ngrams/List.hs
+8
-4
No files found.
src/Gargantext/API/Ngrams/List.hs
View file @
72c29d93
...
...
@@ -117,20 +117,24 @@ reIndexWith cId lId nt lts = do
<$>
HashMap
.
toList
<$>
getTermsWith
identity
[
lId
]
nt
lts
--printDebug "ts" ts
--
printDebug "ts" ts
-- Taking the ngrams with 0 occurrences only (orphans)
occs
<-
getOccByNgramsOnlyFast'
cId
lId
nt
ts
-- printDebug "occs" occs
let
orphans
=
List
.
concat
$
map
(
\
t
->
case
HashMap
.
lookup
t
occs
of
Nothing
->
[
t
]
Just
n
->
if
n
=
=
1
then
[
t
]
else
[ ]
Just
n
->
if
n
<
=
1
then
[
t
]
else
[ ]
)
ts
-- printDebug "orphans" orphans
-- Get all documents of the corpus
docs
<-
selectDocNodes
cId
-- printDebug "docs length" (List.length docs)
-- Checking Text documents where orphans match
-- TODO Tests here
...
...
@@ -147,7 +151,7 @@ reIndexWith cId lId nt lts = do
(
List
.
cycle
[
Map
.
fromList
$
[(
nt
,
Map
.
singleton
(
doc
^.
node_id
)
1
)]])
)
docs
printDebug
"ngramsByDoc"
ngramsByDoc
--
printDebug "ngramsByDoc" ngramsByDoc
-- Saving the indexation in database
_
<-
mapM
(
saveDocNgramsWith
lId
)
ngramsByDoc
...
...
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