Commit 6b7a0dc5 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[TEXTFLOW] pipeline and workflow become textflow.

parent 39ab6873
...@@ -24,7 +24,7 @@ library: ...@@ -24,7 +24,7 @@ library:
# - -Werror # - -Werror
exposed-modules: exposed-modules:
- Gargantext - Gargantext
- Gargantext.Pipeline - Gargantext.TextFlow
- Gargantext.Prelude - Gargantext.Prelude
- Gargantext.Core - Gargantext.Core
- Gargantext.Core.Types - Gargantext.Core.Types
......
...@@ -37,9 +37,6 @@ type Context = Text -> [Text] ...@@ -37,9 +37,6 @@ type Context = Text -> [Text]
data Viz = Graph | Phylo | Chart data Viz = Graph | Phylo | Chart
pipeline :: Config -> Text -> Viz
pipeline = undefined
----------------------------------------------------------------- -----------------------------------------------------------------
------------------------------------------------------------------- -------------------------------------------------------------------
......
{-| {-|
Module : Gargantext.Pipeline Module : Gargantext.TextFlow
Description : Server API Description : Server API
Copyright : (c) CNRS, 2017-Present Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3 License : AGPL + CECILL v3
Maintainer : team@gargantext.org Maintainer : team@gargantext.org
Stability : experimental Stability : experimental
Portability : POSIX Portability : POSIX
From text to viz, all the flow of texts in Gargantext.
-} -}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
module Gargantext.Pipeline module Gargantext.TextFlow
where where
import qualified Data.Text as T import qualified Data.Text as T
...@@ -53,10 +56,10 @@ import Data.Graph.Clustering.Louvain.CplusPlus (cLouvain, LouvainNode(..)) ...@@ -53,10 +56,10 @@ import Data.Graph.Clustering.Louvain.CplusPlus (cLouvain, LouvainNode(..))
-} -}
data WorkType = CSV | FullText data TextFlow = CSV | FullText
-- workflow :: Lang (EN|FR) -> FilePath -> Graph -- workflow :: Lang (EN|FR) -> FilePath -> Graph
workflow termsLang workType path = do textflow termsLang workType path = do
-- Text <- IO Text <- FilePath -- Text <- IO Text <- FilePath
contexts <- case workType of contexts <- case workType of
FullText -> splitBy (Sentences 5) <$> readFile path FullText -> splitBy (Sentences 5) <$> readFile path
...@@ -146,5 +149,3 @@ printDebug msg x = putStrLn $ msg <> " " <> show x ...@@ -146,5 +149,3 @@ printDebug msg x = putStrLn $ msg <> " " <> show x
--printDebug _ _ = pure () --printDebug _ _ = pure ()
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