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
702336c1
Commit
702336c1
authored
Jan 17, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLEAN]
parent
c9cd5e03
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
31 deletions
+35
-31
List.hs
src/Gargantext/Core/Text/List.hs
+2
-2
Social.hs
src/Gargantext/Core/Text/List/Social.hs
+5
-4
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+1
-1
List.hs
src/Gargantext/Database/Action/Flow/List.hs
+26
-23
TFICF.hs
src/Gargantext/Database/Action/Metrics/TFICF.hs
+1
-1
No files found.
src/Gargantext/Core/Text/List.hs
View file @
702336c1
...
...
@@ -161,7 +161,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do
-- Computing global speGen score
printDebug
"[buildNgramsTermsList: Sample List] / start"
nt
allTerms
::
HashMap
NgramsTerm
Double
<-
getTficf_withSample
uCid
mCid
nt
printDebug
"[buildNgramsTermsList: Sample List / end]"
nt
printDebug
"[buildNgramsTermsList: Sample List / end]"
(
nt
,
HashMap
.
size
allTerms
)
printDebug
"[buildNgramsTermsList: Flow Social List / start]"
nt
-- PrivateFirst for first developments since Public NodeMode is not implemented yet
...
...
@@ -218,7 +218,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do
selectedTerms
printDebug
"mapTextDocIds"
mapTextDocIds
--
printDebug "mapTextDocIds" mapTextDocIds
let
groupedTreeScores_SetNodeId
::
HashMap
NgramsTerm
(
GroupedTreeScores
(
Set
NodeId
))
...
...
src/Gargantext/Core/Text/List/Social.hs
View file @
702336c1
...
...
@@ -15,14 +15,15 @@ module Gargantext.Core.Text.List.Social
import
Control.Monad
(
mzero
)
import
Data.Aeson
import
GHC.Generics
import
Data.HashMap.Strict
(
HashMap
)
import
Data.Map
(
Map
)
import
Data.Monoid
(
mconcat
)
import
qualified
Data.Scientific
as
Scientific
import
Data.Swagger
import
qualified
Data.Text
as
T
import
qualified
Data.Vector
as
V
import
GHC.Generics
import
qualified
Data.Scientific
as
Scientific
import
qualified
Data.Text
as
T
import
qualified
Data.Vector
as
V
import
Gargantext.API.Ngrams.Tools
import
Gargantext.API.Ngrams.Types
import
Gargantext.Core.NodeStory
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
702336c1
...
...
@@ -89,12 +89,12 @@ import Gargantext.Database.Admin.Config (userMaster, corpusMasterName)
import
Gargantext.Database.Admin.Types.Hyperdata
import
Gargantext.Database.Admin.Types.Node
-- (HyperdataDocument(..), NodeType(..), NodeId, UserId, ListId, CorpusId, RootId, MasterCorpusId, MasterUserId)
import
Gargantext.Database.Prelude
import
Gargantext.Database.Query.Table.ContextNodeNgrams2
import
Gargantext.Database.Query.Table.Ngrams
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node.Document.Insert
-- (insertDocuments, ReturnId(..), addUniqIdsDoc, addUniqIdsContact, ToDbData(..))
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
(
..
))
import
Gargantext.Database.Query.Table.NodeNgrams
(
listInsertDb
,
getCgramsId
)
import
Gargantext.Database.Query.Table.ContextNodeNgrams2
import
Gargantext.Database.Query.Tree.Root
(
getOrMkRoot
,
getOrMk_RootWithCorpus
)
import
Gargantext.Database.Schema.Node
(
NodePoly
(
..
),
node_id
)
import
Gargantext.Database.Types
...
...
src/Gargantext/Database/Action/Flow/List.hs
View file @
702336c1
...
...
@@ -118,37 +118,40 @@ toNodeNgramsW l ngs = List.concat $ map (toNodeNgramsW'' l) ngs
->
(
NgramsType
,
[
NgramsElement
])
->
[
NodeNgramsW
]
toNodeNgramsW''
l'
(
ngrams_type
,
elms
)
=
[
NodeNgrams
{
_nng_id
=
Nothing
,
_nng_node_id
=
l'
,
_nng_node_subtype
=
list_type
,
_nng_ngrams_id
=
ngrams_terms'
,
_nng_ngrams_type
=
ngrams_type
,
_nng_ngrams_field
=
Nothing
,
_nng_ngrams_tag
=
Nothing
,
_nng_ngrams_class
=
Nothing
[
NodeNgrams
{
_nng_id
=
Nothing
,
_nng_node_id
=
l'
,
_nng_node_subtype
=
list_type
,
_nng_ngrams_id
=
ngrams_terms'
,
_nng_ngrams_type
=
ngrams_type
,
_nng_ngrams_field
=
Nothing
,
_nng_ngrams_tag
=
Nothing
,
_nng_ngrams_class
=
Nothing
,
_nng_ngrams_weight
=
0
}
|
(
NgramsElement
{
_ne_ngrams
=
NgramsTerm
ngrams_terms'
,
_ne_size
=
_size
,
_ne_list
=
list_type
(
NgramsElement
{
_ne_ngrams
=
NgramsTerm
ngrams_terms'
,
_ne_size
=
_size
,
_ne_list
=
list_type
,
_ne_occurrences
=
_occ
,
_ne_root
=
_root
,
_ne_parent
=
_parent
,
_ne_children
=
_children
})
<-
elms
,
_ne_root
=
_root
,
_ne_parent
=
_parent
,
_ne_children
=
_children
}
)
<-
elms
]
toNodeNgramsW'
::
ListId
->
[(
Text
,
[
NgramsType
])]
->
[
NodeNgramsW
]
toNodeNgramsW'
l''
ngs
=
[
NodeNgrams
{
_nng_id
=
Nothing
,
_nng_node_id
=
l''
,
_nng_node_subtype
=
CandidateTerm
,
_nng_ngrams_id
=
terms
,
_nng_ngrams_type
=
ngrams_type
,
_nng_ngrams_field
=
Nothing
,
_nng_ngrams_tag
=
Nothing
,
_nng_ngrams_class
=
Nothing
,
_nng_ngrams_weight
=
0
}
toNodeNgramsW'
l''
ngs
=
[
NodeNgrams
{
_nng_id
=
Nothing
,
_nng_node_id
=
l''
,
_nng_node_subtype
=
CandidateTerm
,
_nng_ngrams_id
=
terms
,
_nng_ngrams_type
=
ngrams_type
,
_nng_ngrams_field
=
Nothing
,
_nng_ngrams_tag
=
Nothing
,
_nng_ngrams_class
=
Nothing
,
_nng_ngrams_weight
=
0
}
|
(
terms
,
ngrams_types
)
<-
ngs
,
ngrams_type
<-
ngrams_types
]
...
...
src/Gargantext/Database/Action/Metrics/TFICF.hs
View file @
702336c1
...
...
@@ -74,7 +74,7 @@ getTficf_withSample cId mId nt = do
<$>
getOccByNgramsOnlyFast_withSample
mId
countGlobal
nt
(
HM
.
keys
mapTextDoubleLocal
)
printDebug
"getTficf_withSample"
(
mapTextDoubleLocal
,
mapTextDoubleGlobal
,
countLocal
,
countGlobal
)
--
printDebug "getTficf_withSample" (mapTextDoubleLocal, mapTextDoubleGlobal, countLocal, countGlobal)
pure
$
HM
.
mapWithKey
(
\
t
n
->
tficf
(
TficfInfra
(
Count
n
)
(
Total
$
fromIntegral
countLocal
))
...
...
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