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
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
b176e55b
Commit
b176e55b
authored
Apr 17, 2019
by
Quentin Lobbé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issues with hidden module when trying to make a bin file
parent
eca1c790
Pipeline
#357
failed with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
Main.hs
bin/gargantext-phylo/Main.hs
+10
-18
Tools.hs
src/Gargantext/Viz/Phylo/Tools.hs
+2
-2
No files found.
bin/gargantext-phylo/Main.hs
View file @
b176e55b
...
...
@@ -41,6 +41,7 @@ import Gargantext.Viz.Phylo.View.ViewMaker
import
qualified
Data.Map
as
DM
import
qualified
Data.Vector
as
DV
import
qualified
Data.List
as
DL
import
qualified
Data.Text
as
DT
import
qualified
Prelude
as
P
import
qualified
Data.ByteString.Lazy
as
L
...
...
@@ -92,30 +93,21 @@ main = do
let
termListPath
=
"/home/qlobbe/data/epique/corpus/cultural_evolution/termList.csv"
let
outputPath
=
"/home/qlobbe/data/epique/output/cultural_evolution.dot"
corpus
<-
csvToCorpus
10
corpusPath
termList
<-
csvGraphTermList
termListPath
putStrLn
$
show
$
length
termList
let
patterns
=
buildPatterns
termList
let
corpusParsed
=
map
(
(
\
(
y
,
t
)
->
Document
y
t
)
.
filterTerms
patterns
)
corpus
let
query
=
PhyloQueryBuild
"cultural_evolution"
"Test"
5
3
defaultFis
[]
[]
defaultWeightedLogJaccard
3
defaultRelatedComponents
let
queryView
=
PhyloQueryView
2
Merge
False
1
[
BranchAge
]
[
defaultSmallBranch
]
[
BranchPeakFreq
,
GroupLabelCooc
]
(
Just
(
ByBranchAge
,
Asc
))
Json
Flat
True
let
tree
=
[]
corpus
<-
parse
5000
corpusPath
termListPath
let
foundations
=
DL
.
nub
$
DL
.
concat
$
map
_pat_terms
pattern
s
let
foundations
=
DL
.
nub
$
DL
.
concat
$
map
text
corpu
s
--
let phylo = toPhylo query corpusParsed foundations tree
--
putStrLn $ show $ csvGraphTermList termListPath
-- let queryView = PhyloQueryView 2 Merge False 1 [BranchAge] [defaultSmallBranch] [BranchPeakFreq,GroupLabelCooc] (Just (ByBranchAge,Asc)) Json Flat True
let
phylo
=
toPhylo
query
corpus
foundations
[]
-- let view
= toPhyloView queryView phylo
let
view
=
toPhyloView
queryView
phylo
-- TODO Phylo here
--
P.writeFile outputPath $ dotToString $ viewToDot view
L
.
writeFile
outputPath
$
encode
corpusParsed
P
.
writeFile
outputPath
$
dotToString
$
viewToDot
view
-- L.writeFile outputPath $ encode corpus
src/Gargantext/Viz/Phylo/Tools.hs
View file @
b176e55b
...
...
@@ -713,8 +713,8 @@ initWeightedLogJaccard (def 0 -> thr) (def 0.01 -> sens) = WLJParams thr sens
-- | To initialize a PhyloQueryBuild from given and default parameters
initPhyloQueryBuild
::
Text
->
Text
->
Maybe
Int
->
Maybe
Int
->
Maybe
Cluster
->
Maybe
[
Metric
]
->
Maybe
[
Filter
]
->
Maybe
Proximity
->
Maybe
Level
->
Maybe
Cluster
->
PhyloQueryBuild
initPhyloQueryBuild
name
desc
(
def
5
->
grain
)
(
def
3
->
steps
)
(
def
defaultFis
->
cluster
)
(
def
[]
->
metrics
)
(
def
[]
->
filters
)
(
def
defaultWeightedLogJaccard
->
matching
)
(
def
2
->
nthLevel
)
(
def
defaultRelatedComponents
->
nthCluster
)
=
PhyloQueryBuild
name
desc
grain
steps
cluster
metrics
filters
matching
nthLevel
nthCluster
(
def
defaultWeightedLogJaccard
->
matching
'
)
(
def
2
->
nthLevel
)
(
def
defaultRelatedComponents
->
nthCluster
)
=
PhyloQueryBuild
name
desc
grain
steps
cluster
metrics
filters
matching
'
nthLevel
nthCluster
...
...
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