Verified Commit 88c41939 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 184-dev-add-nlp-to-gargantext-ini

parents 81fefa6f 107b2fc6
......@@ -4,4 +4,4 @@ tmux new -d -s gargantext './server' \; \
split-window -h -d 'cd ./purescript-gargantext ; ./server' \; \
select-pane -t 1 \; \
split-window -d 'cd deps/nlp/CoreNLP ; ./startServer.sh' \; \
split-window -d 'cd deps/nlp/spacy-server ; source env/bin/activate ; ./server' \; \
split-window -d 'cd deps/nlp/spacy-server ; docker-compose up' \; \
......@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.6.9.7.4
version: 0.0.6.9.8.1
synopsis: Search, map, share
description: Please see README.md
category: Data
......@@ -45,6 +45,7 @@ library
Gargantext.API.Node.Share
Gargantext.API.Prelude
Gargantext.Core
Gargantext.Core.NLP
Gargantext.Core.Methods.Similarities
Gargantext.Core.NLP
Gargantext.Core.NodeStory
......
......@@ -3,6 +3,61 @@
rec {
inherit pkgs;
ghc = pkgs.haskell.compiler.ghc8107;
igraph_0_10_4 = pkgs.igraph.overrideAttrs (finalAttrs: previousAttrs: {
version = "0.10.4";
src = pkgs.fetchFromGitHub {
owner = "igraph";
repo = "igraph";
rev = "0.10.4";
hash = "sha256-LsTOxUktGZcp46Ec9QH3+9C+VADMYTZZCjKF1gp36xk=";
};
postPatch = ''
echo "0.10.4" > IGRAPH_VERSION
'';
outputs = [ "out" "doc" ];
buildInputs = [
pkgs.arpack
pkgs.blas
pkgs.glpk
pkgs.gmp
pkgs.lapack
pkgs.libxml2
pkgs.plfit
] ++ pkgs.lib.optionals pkgs.stdenv.cc.isClang [
pkgs.llvmPackages.openmp
];
cmakeFlags = [
"-DIGRAPH_USE_INTERNAL_BLAS=OFF"
"-DIGRAPH_USE_INTERNAL_LAPACK=OFF"
"-DIGRAPH_USE_INTERNAL_ARPACK=OFF"
"-DIGRAPH_USE_INTERNAL_GLPK=OFF"
"-DIGRAPH_USE_INTERNAL_GMP=OFF"
"-DIGRAPH_USE_INTERNAL_PLFIT=OFF"
"-DIGRAPH_GLPK_SUPPORT=ON"
"-DIGRAPH_GRAPHML_SUPPORT=ON"
"-DIGRAPH_OPENMP_SUPPORT=ON"
"-DIGRAPH_ENABLE_LTO=AUTO"
"-DIGRAPH_ENABLE_TLS=ON"
"-DBUILD_SHARED_LIBS=ON"
];
postInstall = ''
mkdir -p "$out/share"
cp -r doc "$out/share"
'';
postFixup = previousAttrs.postFixup + ''
CUR_DIR=$PWD
cd "$out/include/igraph" && cp *.h ../
cd $CUR_DIR
'';
});
hsBuildInputs = [
ghc
pkgs.cabal-install
......@@ -16,9 +71,8 @@ rec {
gsl
#haskell-language-server
hlint
igraph
libffi
liblapack
lapack
lzma
pcre
pkgconfig
......@@ -32,6 +86,7 @@ rec {
icu
graphviz
llvm_9
igraph_0_10_4
] ++ ( lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Accelerate
]);
......
......@@ -6,7 +6,7 @@ name: gargantext
# | | | +----- Layers * : New versions with API additions
# | | | | +--- Layers * : New versions without API breaking changes
# | | | | |
version: '0.0.6.9.7.4'
version: '0.0.6.9.8.1'
synopsis: Search, map, share
description: Please see README.md
category: Data
......@@ -70,6 +70,7 @@ library:
- Gargantext.API.Node.Share
- Gargantext.API.Prelude
- Gargantext.Core
- Gargantext.Core.NLP
- Gargantext.Core.Methods.Similarities
- Gargantext.Core.NodeStory
- Gargantext.Core.Text
......
......@@ -117,12 +117,11 @@ cooc2graphWith' :: Partitions
-> Strength
-> HashMap (NgramsTerm, NgramsTerm) Int
-> IO Graph
cooc2graphWith' _doPartitions _bridgenessMethod multi similarity@Conditional threshold strength myCooc = do
cooc2graphWith' _doPartitions _bridgenessMethod multi similarity threshold strength myCooc = do
let (distanceMap, diag, ti) = doSimilarityMap similarity threshold strength myCooc
distanceMap `seq` diag `seq` ti `seq` return ()
partitions <- if (Map.size distanceMap > 0)
-- then recursiveClustering doPartitions distanceMap
then recursiveClustering' (spinglass' 1) distanceMap
else panic $ Text.unlines [ "[Gargantext.C.V.Graph.Tools] Similarity Matrix is empty"
, "Maybe you should add more Map Terms in your list"
......@@ -133,35 +132,7 @@ cooc2graphWith' _doPartitions _bridgenessMethod multi similarity@Conditional thr
let
!confluence' = BAC.computeConfluences 3 (Map.keys distanceMap) True
!bridgeness' = bridgeness (Bridgeness_Recursive partitions 1.0 similarity) distanceMap
{-
!bridgeness' = if bridgenessMethod == BridgenessMethod_Basic
then bridgeness (Bridgeness_Basic partitions 1.0) distanceMap
else bridgeness (Bridgeness_Advanced similarity confluence') distanceMap
-}
pure $ data2graph multi ti diag bridgeness' confluence' (setNodes2clusterNodes $ List.concat partitions)
cooc2graphWith' _doPartitions _bridgenessMethod multi similarity@Distributional threshold strength myCooc = do
let (distanceMap, diag, ti) = doSimilarityMap Distributional threshold strength myCooc
distanceMap `seq` diag `seq` ti `seq` return ()
partitions <- if (Map.size distanceMap > 0)
--then recursiveClustering doPartitions distanceMap
then recursiveClustering' (spinglass' 1) distanceMap
else panic $ Text.unlines [ "[Gargantext.C.V.Graph.Tools] Similarity Matrix is empty"
, "Maybe you should add more Map Terms in your list"
, "Tutorial: TODO"
]
length partitions `seq` return ()
let
!confluence' = BAC.computeConfluences 3 (Map.keys distanceMap) True
!bridgeness' = bridgeness (Bridgeness_Recursive partitions 1.0 similarity) distanceMap
{-
!bridgeness' = if bridgenessMethod == BridgenessMethod_Basic
then bridgeness (Bridgeness_Basic partitions 1.0) distanceMap
else bridgeness (Bridgeness_Advanced Distributional confluence') distanceMap
pure $ data2graph multi ti diag bridgeness' confluence' partitions
-}
pure $ data2graph multi ti diag bridgeness' confluence' (setNodes2clusterNodes $ List.concat partitions)
......@@ -239,7 +210,6 @@ nodeTypeWith (MultiPartite (Partite s1 t1) (Partite _s2 t2)) t =
then t1
else t2
data2graph :: MultiPartite
-> Map NgramsTerm Int
-> Map (Int, Int) Occurrences
......
......@@ -201,6 +201,7 @@ data PhyloSubConfig =
, _sc_timeUnit :: TimeUnit
, _sc_clique :: Cluster
, _sc_exportFilter :: Double
, _sc_defaultMode :: Bool
}
deriving (Show,Generic,Eq)
......
......@@ -102,7 +102,8 @@ extra-deps:
#- git: https://github.com/alpmestan/haskell-igraph.git
# commit: 9f55eb36639c8e0965c8bc539a57738869f33e9a
- git: https://gitlab.iscpif.fr/gargantext/haskell-igraph.git
commit: 03c8885d0166255ed7bf0b624a07610ea68ec02c
# 0.10.4-rc1
commit: 2a28524134b68421f30f6e97961063018f814a82
- git: https://gitlab.iscpif.fr/gargantext/haskell-infomap.git
commit: 6d1d60b952b9b2b272b58fc5539700fd8890ac88
......
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