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
fd4a7810
Commit
fd4a7810
authored
Jan 30, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BOARD] enabling it in the Tree + cosmetics.
parent
ce9814b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+4
-4
NgramsByNode.hs
src/Gargantext/Database/Metrics/NgramsByNode.hs
+7
-7
Tree.hs
src/Gargantext/Database/Tree.hs
+1
-1
No files found.
src/Gargantext/API/Ngrams.hs
View file @
fd4a7810
...
...
@@ -1044,14 +1044,14 @@ getTableNgrams _nType nId tabType listId limit_ offset
-- trace (show lists) $
-- getNgramsTableMap ({-lists <>-} listIds) ngramsType
let
nSco
=
needsScores
orderBy
let
scoresNeeded
=
needsScores
orderBy
tableMap1
<-
getNgramsTableMap
listId
ngramsType
t1
<-
getTime'
tableMap2
<-
tableMap1
&
v_data
%%~
setScores
nSco
tableMap2
<-
tableMap1
&
v_data
%%~
setScores
scoresNeeded
.
Map
.
mapWithKey
ngramsElementFromRepo
t2
<-
getTime'
tableMap3
<-
tableMap2
&
v_data
%%~
fmap
NgramsTable
.
setScores
(
not
nSco
)
.
setScores
(
not
scoresNeeded
)
.
selectAndPaginate
t3
<-
getTime'
liftIO
$
hprint
stderr
...
...
@@ -1059,7 +1059,7 @@ getTableNgrams _nType nId tabType listId limit_ offset
%
" map1="
%
timeSpecs
%
" map2="
%
timeSpecs
%
" map3="
%
timeSpecs
%
" sql="
%
(
if
nSco
then
"map2"
else
"map3"
)
%
" sql="
%
(
if
scoresNeeded
then
"map2"
else
"map3"
)
%
"
\n
"
)
t0
t3
t0
t1
t1
t2
t2
t3
pure
tableMap3
...
...
src/Gargantext/Database/Metrics/NgramsByNode.hs
View file @
fd4a7810
...
...
@@ -174,17 +174,17 @@ getOccByNgramsOnlyFast' cId lId nt tms = trace (show (cId, lId)) $
where
fields
=
[
QualifiedIdentifier
Nothing
"text"
]
run
::
CorpusId
->
ListId
->
NgramsType
->
[
Text
]
->
Cmd
err
[(
Text
,
Double
)]
run
cId'
lId'
_
nt'
tms'
=
runPGSQuery
query
run
cId'
lId'
nt'
tms'
=
runPGSQuery
query
(
Values
fields
(
DPS
.
Only
<$>
tms'
)
,
cId'
,
lId'
--
, ngramsTypeId nt'
,
ngramsTypeId
nt'
)
query
::
DPS
.
Query
...
...
@@ -193,10 +193,10 @@ getOccByNgramsOnlyFast' cId lId nt tms = trace (show (cId, lId)) $
SELECT ng.terms, nng.weight FROM node_node_ngrams nng
JOIN ngrams ng ON nng.ngrams_id = ng.id
JOIN input_rows ir ON ir.terms = ng.terms
WHERE nng.node1_id = ? -- CorpusId
AND nng.node2_id = ?
-- AND nng.ngrams_type
= ? -- NgramsTypeId
-- AND nn.category > 0
WHERE nng.node1_id = ?
-- CorpusId
AND nng.node2_id = ?
-- ListId
AND nng.ngrams_type
= ? -- NgramsTypeId
-- AND nn.category > 0
-- TODO
GROUP BY ng.terms, nng.weight
|]
...
...
src/Gargantext/Database/Tree.hs
View file @
fd4a7810
...
...
@@ -108,7 +108,7 @@ dbTree rootId = map (\(nId, tId, pId, n) -> DbTreeNode nId tId pId n)
FROM nodes AS c
INNER JOIN tree AS s ON c.parent_id = s.id
WHERE c.typename IN (2,20,21,22,3,5,30,31,40,7,9,90)
WHERE c.typename IN (2,20,21,22,3,5,30,31,40,7,9,90
,71
)
)
SELECT * from tree;
|]
(
Only
rootId
)
...
...
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