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
200
Issues
200
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
ae1c032e
Commit
ae1c032e
authored
Jul 23, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Tree NodeTexts + DB.
parent
73b0ba2c
Pipeline
#525
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
30 deletions
+2
-30
Metrics.hs
src/Gargantext/Database/Metrics.hs
+0
-28
Node.hs
src/Gargantext/Database/Schema/Node.hs
+1
-1
NodeNode.hs
src/Gargantext/Database/Schema/NodeNode.hs
+1
-1
No files found.
src/Gargantext/Database/Metrics.hs
View file @
ae1c032e
...
...
@@ -44,34 +44,6 @@ getMetrics cId maybeListId tabType maybeLimit = do
pure
(
ngs
,
scored
myCooc
)
{- | TODO remove unused function
getMetrics :: FlowCmdM env err m
=> CorpusId -> Maybe ListId -> TabType -> Maybe Limit
-> m (Map Text (ListType, Maybe Text), [Scored Text])
getMetrics cId maybeListId tabType maybeLimit = do
(ngs, ngs', metrics) <- getLocalMetrics cId maybeListId tabType maybeLimit
(_masterUserId, _masterRootId, masterCorpusId) <- getOrMkRootWithCorpus userMaster "" (Nothing :: Maybe HyperdataCorpus)
lId <- defaultList cId
lIds <- selectNodesWithUsername NodeList userMaster
metrics' <- getTficfWith cId masterCorpusId (lIds <> [lId]) (ngramsTypeFromTabType tabType) ngs'
pure (ngs , toScored [metrics, Map.fromList $ map (\(a,b) -> (a, Vec.fromList [fst b])) $ Map.toList metrics'])
getLocalMetrics :: (FlowCmdM env err m)
=> CorpusId -> Maybe ListId -> TabType -> Maybe Limit
-> m ( Map Text (ListType, Maybe Text)
, Map Text (Maybe RootTerm)
, Map Text (Vec.Vector Double)
)
getLocalMetrics cId maybeListId tabType maybeLimit = do
(ngs, ngs', myCooc) <- getNgramsCooc cId maybeListId tabType maybeLimit
pure (ngs, ngs', localMetrics myCooc)
-}
getNgramsCooc
::
(
FlowCmdM
env
err
m
)
=>
CorpusId
->
Maybe
ListId
->
TabType
->
Maybe
Limit
->
m
(
Map
Text
(
ListType
,
Maybe
Text
)
...
...
src/Gargantext/Database/Schema/Node.hs
View file @
ae1c032e
...
...
@@ -440,7 +440,7 @@ arbitraryTexts :: HyperdataTexts
arbitraryTexts
=
HyperdataTexts
(
Just
"Preferences"
)
nodeTextsW
::
Maybe
Name
->
Maybe
HyperdataList
->
ParentId
->
UserId
->
NodeWrite
nodeTextsW
maybeName
maybeList
pId
=
node
Node
List
name
list
(
Just
pId
)
nodeTextsW
maybeName
maybeList
pId
=
node
Node
Texts
name
list
(
Just
pId
)
where
name
=
maybe
"Texts"
identity
maybeName
list
=
maybe
arbitraryList
identity
maybeList
...
...
src/Gargantext/Database/Schema/NodeNode.hs
View file @
ae1c032e
...
...
@@ -112,7 +112,7 @@ nodeNodesCategory :: [(CorpusId,DocId,Int)] -> Cmd err [Int]
nodeNodesCategory
inputData
=
map
(
\
(
PGS
.
Only
a
)
->
a
)
<$>
runPGSQuery
catQuery
(
PGS
.
Only
$
Values
fields
inputData
)
where
fields
=
map
(
\
t
->
QualifiedIdentifier
Nothing
t
)
[
"int4"
,
"int4"
,
"
category
"
]
fields
=
map
(
\
t
->
QualifiedIdentifier
Nothing
t
)
[
"int4"
,
"int4"
,
"
int4
"
]
catQuery
::
PGS
.
Query
catQuery
=
[
sql
|
UPDATE nodes_nodes as old SET
category = new.category
...
...
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