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
27c08f8f
Commit
27c08f8f
authored
Dec 02, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getTableNgrams more timing infos
parent
35d2b25a
Pipeline
#631
canceled with stage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+7
-2
No files found.
src/Gargantext/API/Ngrams.hs
View file @
27c08f8f
...
...
@@ -115,7 +115,7 @@ import qualified Data.HashMap.Strict.InsOrd as InsOrdHashMap
import
Data.Swagger
hiding
(
version
,
patch
)
import
Data.Text
(
Text
,
isInfixOf
,
count
)
import
Data.Validity
import
Formatting
(
hprint
,
(
%
))
import
Formatting
(
hprint
,
int
,
(
%
))
import
Formatting.Clock
(
timeSpecs
)
import
GHC.Generics
(
Generic
)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
,
unPrefixSwagger
)
...
...
@@ -997,15 +997,20 @@ getTableNgrams _nType nId tabType listId limit_ offset
setScores
False
table
=
pure
table
setScores
True
table
=
do
let
ngrams_terms
=
(
table
^..
each
.
ne_ngrams
)
t1
<-
getTime'
occurrences
<-
getOccByNgramsOnlyFast
nId
ngramsType
ngrams_terms
t2
<-
getTime'
liftIO
$
hprint
stderr
(
"getTableNgrams/setScores #ngrams="
%
int
%
" time="
%
timeSpecs
%
"
\n
"
)
(
length
ngrams_terms
)
t1
t2
{-
occurrences <- getOccByNgramsOnlySlow nType nId
(lIds <> [listId])
ngramsType
ngrams_terms
-}
-}
let
setOcc
ne
=
ne
&
ne_occurrences
.~
sumOf
(
at
(
ne
^.
ne_ngrams
)
.
_Just
)
occurrences
...
...
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