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
158
Issues
158
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
be5a7bca
Commit
be5a7bca
authored
Nov 17, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX:SocialList] API connection
parent
34b10326
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
List.hs
src/Gargantext/Core/Text/List.hs
+5
-0
WithStem.hs
src/Gargantext/Core/Text/List/Group/WithStem.hs
+11
-5
Scores.hs
src/Gargantext/Core/Text/List/Social/Scores.hs
+1
-1
No files found.
src/Gargantext/Core/Text/List.hs
View file @
be5a7bca
...
...
@@ -90,10 +90,15 @@ buildNgramsOthersList user uCid groupIt (nt, MapListSize mapListSize) = do
<-
flowSocialList'
MySelfFirst
user
nt
(
Set
.
fromList
$
Map
.
keys
ngs'
)
-- PrivateFirst for first developments since Public NodeMode is not implemented yet
-- printDebug "flowSocialList'" socialLists'
let
groupParams
=
GroupedTextParams
groupIt
(
Set
.
size
.
snd
)
fst
snd
{-(size . fst)-}
groupedWithList
=
toGroupedText
groupParams
socialLists'
ngs'
printDebug
"groupedWithList"
groupedWithList
let
(
stopTerms
,
tailTerms
)
=
Map
.
partition
(
\
t
->
t
^.
gt_listType
==
Just
StopTerm
)
groupedWithList
(
mapTerms
,
tailTerms'
)
=
Map
.
partition
(
\
t
->
t
^.
gt_listType
==
Just
MapTerm
)
tailTerms
...
...
src/Gargantext/Core/Text/List/Group/WithStem.hs
View file @
be5a7bca
...
...
@@ -14,7 +14,6 @@ Portability : POSIX
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FunctionalDependencies #-}
module
Gargantext.Core.Text.List.Group.WithStem
where
...
...
@@ -68,8 +67,8 @@ data GroupedText score =
,
_gt_size
::
!
Int
,
_gt_stem
::
!
Stem
-- needed ?
,
_gt_nodes
::
!
(
Set
NodeId
)
}
{-deriving Show
--}
--
{-
}
deriving
Show
--}
{-
instance Show score => Show (GroupedText score) where
show (GroupedText lt l s _ _ _ _) = show l <> " : " <> show lt <> " : " <> show s
--}
...
...
@@ -104,8 +103,16 @@ groupWithStem :: {- ( HasNgrams a
=> -}
GroupedTextParams
a
b
->
Map
Text
(
GroupedTextScores
(
Set
NodeId
))
->
Map
Stem
(
GroupedText
Int
)
groupWithStem
_
=
undefined
-- TODO (just for tests on Others Ngrams which do not need stem)
groupWithStem
_
=
Map
.
mapWithKey
scores2groupedText
scores2groupedText
::
Text
->
GroupedTextScores
(
Set
NodeId
)
->
GroupedText
Int
scores2groupedText
t
g
=
GroupedText
(
view
gts_listType
g
)
t
(
Set
.
size
$
view
gts_score
g
)
(
Set
.
delete
t
$
view
gts_children
g
)
(
size
t
)
t
(
view
gts_score
g
)
------------------------------------------------------------------------
ngramsGroup
::
GroupParams
...
...
@@ -139,5 +146,4 @@ groupedTextWithStem gparams from =
t'
((
view
gt_fun_nodeIds
gparams'
)
d
)
)
------------------------------------------------------------------------
src/Gargantext/Core/Text/List/Social/Scores.hs
View file @
be5a7bca
...
...
@@ -72,7 +72,7 @@ data FlowListScores =
-- You can add any score by incrementing this type
-- , _flc_score :: Map Score Int
}
deriving
(
Generic
)
deriving
(
Show
,
Generic
)
makeLenses
''
F
lowListScores
...
...
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