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
159
Issues
159
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
c8c1e536
Commit
c8c1e536
authored
Oct 28, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] merge with local stashed changes
parent
fcf20477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
List.hs
src/Gargantext/Core/Text/List.hs
+11
-0
Social.hs
src/Gargantext/Core/Text/List/Social.hs
+2
-2
No files found.
src/Gargantext/Core/Text/List.hs
View file @
c8c1e536
...
@@ -125,6 +125,17 @@ buildNgramsTermsList user uCid mCid groupParams = do
...
@@ -125,6 +125,17 @@ buildNgramsTermsList user uCid mCid groupParams = do
socialLists
<-
flowSocialList
user
NgramsTerms
(
Set
.
fromList
$
map
fst
allTerms
)
socialLists
<-
flowSocialList
user
NgramsTerms
(
Set
.
fromList
$
map
fst
allTerms
)
-- printDebug "\n * socialLists * \n" socialLists
-- printDebug "\n * socialLists * \n" socialLists
printDebug
"
\n
* socialLists *
\n
"
socialLists
let
socialStop
=
fromMaybe
Set
.
empty
$
Map
.
lookup
StopTerm
socialLists
_socialMap
=
fromMaybe
Set
.
empty
$
Map
.
lookup
MapTerm
socialLists
_socialCand
=
fromMaybe
Set
.
empty
$
Map
.
lookup
CandidateTerm
socialLists
-- stopTerms ignored for now (need to be tagged already)
(
stopTerms
,
candidateTerms
)
=
List
.
partition
((
\
t
->
Set
.
member
t
socialStop
)
.
fst
)
allTerms
-- (mapTerms, candidateTerms) = List.partition ((\t -> Set.member t socialMap ) . fst) allTerms
printDebug
"stopTerms"
stopTerms
-- Grouping the ngrams and keeping the maximum score for label
-- Grouping the ngrams and keeping the maximum score for label
let
grouped
=
toGroupedText
(
ngramsGroup
groupParams
)
identity
(
const
Set
.
empty
)
(
const
Set
.
empty
)
allTerms
let
grouped
=
toGroupedText
(
ngramsGroup
groupParams
)
identity
(
const
Set
.
empty
)
(
const
Set
.
empty
)
allTerms
...
...
src/Gargantext/Core/Text/List/Social.hs
View file @
c8c1e536
...
@@ -174,8 +174,8 @@ toMapTextListType m = Map.fromListWith (<>)
...
@@ -174,8 +174,8 @@ toMapTextListType m = Map.fromListWith (<>)
type
Parent
=
Text
type
Parent
=
Text
parentUnionsMerge
::
(
Ord
a
,
Ord
b
,
Num
c
)
parentUnionsMerge
::
(
Ord
a
,
Ord
b
,
Num
c
)
=>
[
Map
a
(
Map
b
c
)]
=>
[
Map
a
(
Map
b
c
)]
->
Map
a
(
Map
b
c
)
->
Map
a
(
Map
b
c
)
parentUnionsMerge
=
Map
.
unionsWith
(
Map
.
unionWith
(
+
))
parentUnionsMerge
=
Map
.
unionsWith
(
Map
.
unionWith
(
+
))
-- This Parent union is specific
-- This Parent union is specific
...
...
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