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
d912a0ad
Commit
d912a0ad
authored
Aug 27, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FLOW] clean var
parent
8426629a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Types.hs
src/Gargantext/Core/Flow/Types.hs
+1
-1
List.hs
src/Gargantext/Database/Action/Flow/List.hs
+1
-1
Utils.hs
src/Gargantext/Database/Action/Flow/Utils.hs
+2
-2
No files found.
src/Gargantext/Core/Flow/Types.hs
View file @
d912a0ad
...
...
@@ -39,7 +39,7 @@ instance UniqId HyperdataContact
data
DocumentIdWithNgrams
a
=
DocumentIdWithNgrams
{
documentWithId
::
!
(
DocumentWithId
a
)
,
document
_n
grams
::
!
(
Map
Ngrams
(
Map
NgramsType
Int
))
,
document
N
grams
::
!
(
Map
Ngrams
(
Map
NgramsType
Int
))
}
deriving
(
Show
)
data
DocumentWithId
a
=
DocumentWithId
...
...
src/Gargantext/Database/Action/Flow/List.hs
View file @
d912a0ad
...
...
@@ -89,7 +89,7 @@ mapNodeIdNgrams = Map.unionsWith (Map.unionWith (Map.unionWith (+))) . fmap f
where
f
::
DocumentIdWithNgrams
a
->
Map
Ngrams
(
Map
NgramsType
(
Map
NodeId
Int
))
f
d
=
fmap
(
fmap
(
Map
.
singleton
nId
))
$
document
_n
grams
d
f
d
=
fmap
(
fmap
(
Map
.
singleton
nId
))
$
document
N
grams
d
where
nId
=
documentId
$
documentWithId
d
...
...
src/Gargantext/Database/Action/Flow/Utils.hs
View file @
d912a0ad
...
...
@@ -57,7 +57,7 @@ mapNodeIdNgrams :: Hyperdata a
mapNodeIdNgrams
ds
=
DM
.
map
(
DM
.
fromListWith
(
+
))
$
DM
.
fromListWith
(
<>
)
xs
where
xs
=
[(
ng
,
[(
nId
,
i
)])
|
(
nId
,
n2i'
)
<-
n2i
ds
,
(
ng
,
i
)
<-
DM
.
toList
n2i'
]
n2i
=
map
(
\
d
->
((
documentId
.
documentWithId
)
d
,
document
_n
grams
d
))
n2i
=
map
(
\
d
->
((
documentId
.
documentWithId
)
d
,
document
N
grams
d
))
documentIdWithNgrams
::
Hyperdata
a
...
...
@@ -76,7 +76,7 @@ data DocumentWithId a =
data
DocumentIdWithNgrams
a
=
DocumentIdWithNgrams
{
documentWithId
::
DocumentWithId
a
,
document
_n
grams
::
Map
(
NgramsT
Ngrams
)
Int
,
document
N
grams
::
Map
(
NgramsT
Ngrams
)
Int
}
deriving
(
Show
)
...
...
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