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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
f505059b
Verified
Commit
f505059b
authored
Sep 13, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[refactoring] more record syntax refactoring
parent
cf6fbff6
Pipeline
#1810
passed with stage
in 33 minutes and 41 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
Annuaire.hs
src/Gargantext/API/Node/Corpus/Annuaire.hs
+10
-10
Export.hs
src/Gargantext/API/Node/Corpus/Export.hs
+7
-5
No files found.
src/Gargantext/API/Node/Corpus/Annuaire.hs
View file @
f505059b
...
...
@@ -74,9 +74,9 @@ addToAnnuaireWithForm :: FlowCmdM env err m
->
AnnuaireWithForm
->
(
JobLog
->
m
()
)
->
m
JobLog
addToAnnuaireWithForm
_cid
(
AnnuaireWithForm
ft
_d
_l
)
logStatus
=
do
addToAnnuaireWithForm
_cid
(
AnnuaireWithForm
{
_wf_filetype
}
)
logStatus
=
do
printDebug
"ft"
ft
printDebug
"ft"
_wf_filetype
logStatus
JobLog
{
_scst_succeeded
=
Just
1
,
_scst_failed
=
Just
0
...
...
src/Gargantext/API/Node/Corpus/Export.hs
View file @
f505059b
...
...
@@ -63,15 +63,17 @@ getCorpus cId lId nt' = do
repo
<-
getRepo'
[
fromMaybe
(
panic
"[Gargantext.API.Node.Corpus.Export]"
)
lId
]
ngs
<-
getNodeNgrams
cId
lId
nt
repo
let
-- uniqId is hash computed already for each document imported in database
r
=
Map
.
intersectionWith
(
\
a
b
->
Document
a
(
Ngrams
(
Set
.
toList
b
)
(
hash
b
))
(
d_hash
a
b
)
r
=
Map
.
intersectionWith
(
\
a
b
->
Document
{
_d_document
=
a
,
_d_ngrams
=
Ngrams
(
Set
.
toList
b
)
(
hash
b
)
,
_d_hash
=
d_hash
a
b
}
)
ns
(
Map
.
map
(
Set
.
map
unNgramsTerm
)
ngs
)
where
d_hash
a
b
=
hash
[
fromMaybe
""
(
_hd_uniqId
$
_node_hyperdata
a
)
,
hash
b
]
pure
$
Corpus
(
Map
.
elems
r
)
(
hash
$
List
.
map
_d_hash
$
Map
.
elems
r
)
pure
$
Corpus
{
_c_corpus
=
Map
.
elems
r
,
_c_hash
=
hash
$
List
.
map
_d_hash
$
Map
.
elems
r
}
getNodeNgrams
::
HasNodeError
err
=>
CorpusId
...
...
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