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
153
Issues
153
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
9b8b643d
Commit
9b8b643d
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
295ff34d
Changes
2
Hide 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 @
9b8b643d
...
...
@@ -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
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
termList
<-
csvGraphTermList
termListPath
corpus
<-
parse
5000
corpusPath
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
tree
=
[]
let
foundations
=
DL
.
nub
$
DL
.
concat
$
map
_pat_terms
patterns
let
foundations
=
DL
.
nub
$
DL
.
concat
$
map
text
corpus
--
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 @
9b8b643d
...
...
@@ -711,8 +711,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