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
197
Issues
197
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
063e67d0
Commit
063e67d0
authored
Oct 21, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Clean]
parent
07225081
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
Group.hs
src/Gargantext/Core/Text/Group.hs
+6
-7
List.hs
src/Gargantext/Core/Text/List.hs
+4
-3
Social.hs
src/Gargantext/Core/Text/List/Social.hs
+0
-1
No files found.
src/Gargantext/Core/Text/Group.hs
View file @
063e67d0
...
...
@@ -63,7 +63,8 @@ ngramsGroup :: GroupParams
->
Text
->
Text
ngramsGroup
GroupIdentity
=
identity
ngramsGroup
(
GroupParams
l
_m
_n
_
)
=
Text
.
intercalate
" "
ngramsGroup
(
GroupParams
l
_m
_n
_
)
=
Text
.
intercalate
" "
.
map
(
stem
l
)
-- . take n
.
List
.
sort
...
...
@@ -79,10 +80,10 @@ mergeMapParent = undefined
------------------------------------------------------------------------
toGroupedText
::
Ord
b
=>
(
Text
->
Text
)
->
(
a
->
b
)
->
(
a
->
Set
Text
)
->
(
a
->
Set
NodeId
)
=>
(
Text
->
Text
)
->
(
a
->
b
)
->
(
a
->
Set
Text
)
->
(
a
->
Set
NodeId
)
->
[(
Text
,
a
)]
->
Map
Stem
(
GroupedText
b
)
toGroupedText
fun_stem
fun_score
fun_texts
fun_nodeIds
from
=
groupStems'
$
map
group
from
...
...
@@ -152,5 +153,3 @@ addListType m g = set gt_listType (hasListType m g) g
$
map
(
\
t
->
Map
.
lookup
t
m'
)
$
Set
.
toList
$
Set
.
insert
label
g'
src/Gargantext/Core/Text/List.hs
View file @
063e67d0
...
...
@@ -58,8 +58,8 @@ buildNgramsLists :: ( RepoCmdM env err m
buildNgramsLists
user
gp
uCid
mCid
=
do
ngTerms
<-
buildNgramsTermsList
user
uCid
mCid
gp
othersTerms
<-
mapM
(
buildNgramsOthersList
user
uCid
(
ngramsGroup
GroupIdentity
))
[
(
Authors
,
MapListSize
9
)
,
(
Sources
,
MapListSize
9
)
[
(
Authors
,
MapListSize
9
)
,
(
Sources
,
MapListSize
9
)
,
(
Institutes
,
MapListSize
9
)
]
...
...
@@ -83,7 +83,8 @@ buildNgramsOthersList user uCid groupIt (nt, MapListSize mapListSize) = do
ngs
<-
groupNodesByNgramsWith
groupIt
<$>
getNodesByNgramsUser
uCid
nt
let
grouped
=
toGroupedText
groupIt
(
Set
.
size
.
snd
)
fst
snd
(
Map
.
toList
$
Map
.
mapWithKey
(
\
k
(
a
,
b
)
->
(
Set
.
delete
k
a
,
b
))
$
ngs
)
grouped
=
toGroupedText
groupIt
(
Set
.
size
.
snd
)
fst
snd
(
Map
.
toList
$
Map
.
mapWithKey
(
\
k
(
a
,
b
)
->
(
Set
.
delete
k
a
,
b
))
$
ngs
)
socialLists
<-
flowSocialList
user
nt
(
Set
.
fromList
$
Map
.
keys
ngs
)
...
...
src/Gargantext/Core/Text/List/Social.hs
View file @
063e67d0
...
...
@@ -57,7 +57,6 @@ flowSocialList user nt ngrams' = do
-- printDebug "* socialLists *: results \n" result
pure
result
------------------------------------------------------------------------
unions
::
(
Ord
a
,
Semigroup
a
,
Semigroup
b
,
Ord
b
)
=>
[
Map
a
(
Set
b
)]
->
Map
a
(
Set
b
)
...
...
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