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
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
Show 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
...
@@ -63,7 +63,8 @@ ngramsGroup :: GroupParams
->
Text
->
Text
->
Text
->
Text
ngramsGroup
GroupIdentity
=
identity
ngramsGroup
GroupIdentity
=
identity
ngramsGroup
(
GroupParams
l
_m
_n
_
)
=
Text
.
intercalate
" "
ngramsGroup
(
GroupParams
l
_m
_n
_
)
=
Text
.
intercalate
" "
.
map
(
stem
l
)
.
map
(
stem
l
)
-- . take n
-- . take n
.
List
.
sort
.
List
.
sort
...
@@ -79,9 +80,9 @@ mergeMapParent = undefined
...
@@ -79,9 +80,9 @@ mergeMapParent = undefined
------------------------------------------------------------------------
------------------------------------------------------------------------
toGroupedText
::
Ord
b
toGroupedText
::
Ord
b
=>
(
Text
->
Text
)
=>
(
Text
->
Text
)
->
(
a
->
b
)
->
(
a
->
b
)
->
(
a
->
Set
Text
)
->
(
a
->
Set
Text
)
->
(
a
->
Set
NodeId
)
->
(
a
->
Set
NodeId
)
->
[(
Text
,
a
)]
->
[(
Text
,
a
)]
->
Map
Stem
(
GroupedText
b
)
->
Map
Stem
(
GroupedText
b
)
...
@@ -152,5 +153,3 @@ addListType m g = set gt_listType (hasListType m g) g
...
@@ -152,5 +153,3 @@ addListType m g = set gt_listType (hasListType m g) g
$
map
(
\
t
->
Map
.
lookup
t
m'
)
$
map
(
\
t
->
Map
.
lookup
t
m'
)
$
Set
.
toList
$
Set
.
toList
$
Set
.
insert
label
g'
$
Set
.
insert
label
g'
src/Gargantext/Core/Text/List.hs
View file @
063e67d0
...
@@ -58,8 +58,8 @@ buildNgramsLists :: ( RepoCmdM env err m
...
@@ -58,8 +58,8 @@ buildNgramsLists :: ( RepoCmdM env err m
buildNgramsLists
user
gp
uCid
mCid
=
do
buildNgramsLists
user
gp
uCid
mCid
=
do
ngTerms
<-
buildNgramsTermsList
user
uCid
mCid
gp
ngTerms
<-
buildNgramsTermsList
user
uCid
mCid
gp
othersTerms
<-
mapM
(
buildNgramsOthersList
user
uCid
(
ngramsGroup
GroupIdentity
))
othersTerms
<-
mapM
(
buildNgramsOthersList
user
uCid
(
ngramsGroup
GroupIdentity
))
[
(
Authors
,
MapListSize
9
)
[
(
Authors
,
MapListSize
9
)
,
(
Sources
,
MapListSize
9
)
,
(
Sources
,
MapListSize
9
)
,
(
Institutes
,
MapListSize
9
)
,
(
Institutes
,
MapListSize
9
)
]
]
...
@@ -83,7 +83,8 @@ buildNgramsOthersList user uCid groupIt (nt, MapListSize mapListSize) = do
...
@@ -83,7 +83,8 @@ buildNgramsOthersList user uCid groupIt (nt, MapListSize mapListSize) = do
ngs
<-
groupNodesByNgramsWith
groupIt
<$>
getNodesByNgramsUser
uCid
nt
ngs
<-
groupNodesByNgramsWith
groupIt
<$>
getNodesByNgramsUser
uCid
nt
let
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
)
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
...
@@ -57,7 +57,6 @@ flowSocialList user nt ngrams' = do
-- printDebug "* socialLists *: results \n" result
-- printDebug "* socialLists *: results \n" result
pure
result
pure
result
------------------------------------------------------------------------
------------------------------------------------------------------------
unions
::
(
Ord
a
,
Semigroup
a
,
Semigroup
b
,
Ord
b
)
unions
::
(
Ord
a
,
Semigroup
a
,
Semigroup
b
,
Ord
b
)
=>
[
Map
a
(
Set
b
)]
->
Map
a
(
Set
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