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
150
Issues
150
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
441edde5
Unverified
Commit
441edde5
authored
Jan 10, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FLOW] Use a Data.Set to avoid extra insertions of the same ngram
parent
081ec8fb
Pipeline
#119
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Flow.hs
src/Gargantext/Database/Flow.hs
+2
-1
No files found.
src/Gargantext/Database/Flow.hs
View file @
441edde5
...
...
@@ -51,6 +51,7 @@ import Gargantext.Prelude
import
Gargantext.Text.Parsers
(
parseDocs
,
FileFormat
)
import
System.FilePath
(
FilePath
)
import
qualified
Data.Map
as
DM
import
qualified
Data.Set
as
DS
flowCorpus
::
HasNodeError
err
=>
FileFormat
->
FilePath
->
CorpusName
->
Cmd
err
CorpusId
...
...
@@ -113,7 +114,7 @@ flowCorpus' NodeCorpus hyperdataDocuments (ids,masterUserId,masterCorpusId, user
let
maps
=
mapNodeIdNgrams
docsWithNgrams
-- printDebug "maps" (maps)
terms2id
<-
insertNgrams
(
map
_ngramsT
$
DM
.
keys
maps
)
terms2id
<-
insertNgrams
(
DS
.
toList
$
DS
.
map
_ngramsT
(
DM
.
keysSet
maps
)
)
let
indexedNgrams
=
DM
.
mapKeys
(
indexNgramsT
terms2id
)
maps
-- printDebug "inserted ngrams" indexedNgrams
_
<-
insertToNodeNgrams
indexedNgrams
...
...
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