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
4ef15dd7
Commit
4ef15dd7
authored
Sep 09, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TextFlow] WIP Metrics fixes
parent
38ca4c31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
List.hs
src/Gargantext/Core/Text/List.hs
+2
-5
TFICF.hs
src/Gargantext/Core/Text/Metrics/TFICF.hs
+1
-1
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+1
-1
TFICF.hs
src/Gargantext/Database/Action/Metrics/TFICF.hs
+2
-2
No files found.
src/Gargantext/Core/Text/List.hs
View file @
4ef15dd7
...
...
@@ -141,14 +141,11 @@ buildNgramsTermsList :: Lang
->
Cmd
err
(
Map
NgramsType
[
NgramsElement
])
buildNgramsTermsList
_l
_n
_m
s
uCid
mCid
=
do
candidates
<-
sortTficf
Down
<$>
getTficf
uCid
mCid
NgramsTerms
printDebug
"candidates"
(
length
candidates
)
printDebug
"head candidates"
(
List
.
take
10
$
candidates
)
printDebug
"tail candidates"
(
List
.
take
10
$
List
.
reverse
$
candidates
)
let
candidatesSize
=
400
{-
a = 50
b = 50
-}
candidatesHead
=
List
.
take
candidatesSize
candidates
candidatesTail
=
List
.
drop
candidatesSize
candidates
...
...
src/Gargantext/Core/Text/Metrics/TFICF.hs
View file @
4ef15dd7
...
...
@@ -47,7 +47,7 @@ tficf :: TficfContext Count Total
->
TFICF
tficf
(
TficfInfra
(
Count
ic
)
(
Total
it
)
)
(
TficfSupra
(
Count
sc
)
(
Total
st
)
)
|
it
>=
ic
&&
st
>=
sc
&&
it
<=
st
=
(
i
c
/
it
)
/
log
(
sc
/
st
)
|
it
>=
ic
&&
st
>=
sc
&&
it
<=
st
=
(
i
t
/
ic
)
*
log
(
st
/
sc
)
|
otherwise
=
panic
$
"[ERR]"
<>
path
<>
" Frequency impossible"
tficf
_
_
=
panic
$
"[ERR]"
<>
path
<>
"Undefined for these contexts"
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
4ef15dd7
...
...
@@ -238,7 +238,7 @@ insertDocs :: ( FlowCmdM env err m
insertDocs
uId
cId
hs
=
do
let
docs
=
map
addUniqId
hs
newIds
<-
insertDb
uId
cId
docs
printDebug
"newIds"
newIds
--
printDebug "newIds" newIds
let
newIds'
=
map
reId
newIds
documentsWithId
=
mergeData
(
toInserted
newIds
)
(
Map
.
fromList
$
map
viewUniqId'
docs
)
...
...
src/Gargantext/Database/Action/Metrics/TFICF.hs
View file @
4ef15dd7
...
...
@@ -34,8 +34,8 @@ getTficf :: UserCorpusId
->
NgramsType
->
Cmd
err
(
Map
Text
Double
)
getTficf
cId
mId
nt
=
do
mapTextDoubleLocal
<-
{- Map.filter (> 1)
<$>
-}
Map
.
map
(
fromIntegral
.
Set
.
size
)
mapTextDoubleLocal
<-
Map
.
filter
(
>
1
)
<$>
Map
.
map
(
fromIntegral
.
Set
.
size
)
<$>
getNodesByNgramsUser
cId
nt
mapTextDoubleGlobal
<-
Map
.
map
fromIntegral
...
...
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