Commit 9b8b643d authored by Quentin Lobbé's avatar Quentin Lobbé

issues with hidden module when trying to make a bin file

parent 295ff34d
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment