2 Module : Gargantext.Pipeline
3 Description : Server API
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
12 {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
13 {-# LANGUAGE NoImplicitPrelude #-}
15 module Gargantext.Pipeline
18 import Data.Text (unpack)
19 import qualified Data.Text as DT
21 import Data.Text.IO (readFile)
23 ----------------------------------------------
24 ----------------------------------------------
26 import Gargantext.Core
27 import Gargantext.Core.Types
28 import Gargantext.Prelude
30 import Gargantext.Viz.Graph.Index (map', createIndexes)
31 import Gargantext.Viz.Graph.Distances.Matrice (distributional, int2double)
32 import Gargantext.Text.Metrics.Occurrences
33 import Gargantext.Text.Terms
34 import Gargantext.Text.Context
36 import Data.Array.Accelerate as A
40 let contexts = splitBy Sentences 4 text
41 myterms <- mapM (terms Multi FR) contexts
42 -- todo filter stop words
43 let myCooc = removeApax $ cooc myterms
46 --pure $ createIndexes myCooc
47 pure $ map' int2double myCooc