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
157
Issues
157
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
0c5f0a04
Commit
0c5f0a04
authored
Nov 15, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE]
parents
e0c7f1bf
5d658a43
Pipeline
#2086
failed with stage
in 10 minutes and 31 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
gargantext.ini_toModify
gargantext.ini_toModify
+3
-2
List.hs
src/Gargantext/Core/Text/List.hs
+2
-2
TFICF.hs
src/Gargantext/Database/Action/Metrics/TFICF.hs
+16
-1
No files found.
gargantext.ini_toModify
View file @
0c5f0a04
...
@@ -72,6 +72,7 @@ LOG_FORMATTER = verbose
...
@@ -72,6 +72,7 @@ LOG_FORMATTER = verbose
MAIL_PORT = 25
MAIL_PORT = 25
MAIL_HOST = localhost
MAIL_HOST = localhost
MAIL_USER = gargantext
MAIL_USER = gargantext
MAIL_PASSWORD =
MAIL_PASSWORD =
# Normal | SSL | TLS | STARTTLS
MAIL_FROM =
# NoAuth | Normal | SSL | TLS | STARTTLS
MAIL_LOGIN_TYPE = Normal
MAIL_LOGIN_TYPE = Normal
src/Gargantext/Core/Text/List.hs
View file @
0c5f0a04
...
@@ -35,7 +35,7 @@ import Gargantext.Core.Text.Metrics (scored', Scored(..), scored_speExc, scored_
...
@@ -35,7 +35,7 @@ import Gargantext.Core.Text.Metrics (scored', Scored(..), scored_speExc, scored_
import
Gargantext.Core.Types
(
ListType
(
..
),
MasterCorpusId
,
UserCorpusId
)
import
Gargantext.Core.Types
(
ListType
(
..
),
MasterCorpusId
,
UserCorpusId
)
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsUser
,
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsUser
,
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.Action.Metrics.TFICF
(
get
Tficf_withSample
)
import
Gargantext.Database.Action.Metrics.TFICF
(
get
Score
)
-- (getTficf_withSample, getTficf_withSample'
)
import
Gargantext.Database.Admin.Types.Node
(
NodeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeId
)
import
Gargantext.Database.Prelude
(
CmdM
)
import
Gargantext.Database.Prelude
(
CmdM
)
import
Gargantext.Database.Query.Table.Ngrams
(
text2ngrams
)
import
Gargantext.Database.Query.Table.Ngrams
(
text2ngrams
)
...
@@ -160,7 +160,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do
...
@@ -160,7 +160,7 @@ buildNgramsTermsList user uCid mCid mfslw groupParams (nt, _mapListSize)= do
-- Filter 0 With Double
-- Filter 0 With Double
-- Computing global speGen score
-- Computing global speGen score
printDebug
"[buldNgramsTermsList: Sample List] / start"
nt
printDebug
"[buldNgramsTermsList: Sample List] / start"
nt
allTerms
::
HashMap
NgramsTerm
Double
<-
get
Tficf_withSampl
e
uCid
mCid
nt
allTerms
::
HashMap
NgramsTerm
Double
<-
get
Scor
e
uCid
mCid
nt
printDebug
"[buldNgramsTermsList: Sample List / end]"
nt
printDebug
"[buldNgramsTermsList: Sample List / end]"
nt
printDebug
"[buldNgramsTermsList: Flow Social List / start]"
nt
printDebug
"[buldNgramsTermsList: Flow Social List / start]"
nt
...
...
src/Gargantext/Database/Action/Metrics/TFICF.hs
View file @
0c5f0a04
...
@@ -21,7 +21,7 @@ import qualified Data.HashMap.Strict as HM
...
@@ -21,7 +21,7 @@ import qualified Data.HashMap.Strict as HM
import
Data.Maybe
(
fromMaybe
)
import
Data.Maybe
(
fromMaybe
)
import
Gargantext.Core
import
Gargantext.Core
import
Gargantext.Core.Text.Metrics.TFICF
import
Gargantext.Core.Text.Metrics.TFICF
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsUser
,
getOccByNgramsOnlyFast
,
getOccByNgramsOnlyFast_withSample
)
import
Gargantext.Database.Action.Metrics.NgramsByNode
(
getNodesByNgramsUser
{-, getOccByNgramsOnlyFast-}
,
getOccByNgramsOnlyFast_withSample
)
import
Gargantext.Database.Admin.Types.Node
-- (ListId, CorpusId, NodeId)
import
Gargantext.Database.Admin.Types.Node
-- (ListId, CorpusId, NodeId)
import
Gargantext.Database.Prelude
(
Cmd
)
import
Gargantext.Database.Prelude
(
Cmd
)
import
Gargantext.Database.Query.Table.NodeNode
(
selectCountDocs
)
import
Gargantext.Database.Query.Table.NodeNode
(
selectCountDocs
)
...
@@ -30,6 +30,7 @@ import Gargantext.API.Ngrams.Types
...
@@ -30,6 +30,7 @@ import Gargantext.API.Ngrams.Types
import
Gargantext.Prelude
import
Gargantext.Prelude
import
qualified
Data.Set
as
Set
import
qualified
Data.Set
as
Set
{-
getTficf :: HasDBid NodeType
getTficf :: HasDBid NodeType
=> UserCorpusId
=> UserCorpusId
-> MasterCorpusId
-> MasterCorpusId
...
@@ -52,6 +53,20 @@ getTficf cId mId nt = do
...
@@ -52,6 +53,20 @@ getTficf cId mId nt = do
(TficfSupra (Count $ fromMaybe 0 $ HM.lookup t mapTextDoubleGlobal)
(TficfSupra (Count $ fromMaybe 0 $ HM.lookup t mapTextDoubleGlobal)
(Total $ fromIntegral countGlobal))
(Total $ fromIntegral countGlobal))
) mapTextDoubleLocal
) mapTextDoubleLocal
-}
getScore
::
HasDBid
NodeType
=>
UserCorpusId
->
MasterCorpusId
->
NgramsType
->
Cmd
err
(
HashMap
NgramsTerm
Double
)
getScore
cId
_mId
nt
=
HM
.
filter
(
>
1
)
<$>
HM
.
map
(
fromIntegral
.
Set
.
size
)
<$>
getNodesByNgramsUser
cId
nt
getTficf_withSample
::
HasDBid
NodeType
getTficf_withSample
::
HasDBid
NodeType
...
...
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