]> Git — Sourcephile - gargantext.git/blob - README.md
Merge branch 'dev-textflow' into dev
[gargantext.git] / README.md
1 # Gargantext Haskell
2
3 ## About this project
4
5 Gargantext is a collaborative web platform for the exploration of sets
6 of unstructured documents. It combines tools from natural language
7 processing, text-mining, complex networks analysis and interactive data
8 visualization to pave the way toward new kinds of interactions with your
9 digital corpora.
10
11 This software is a free software, developed by the CNRS Complex Systems
12 Institute of Paris Île-de-France (ISC-PIF) and its partners.
13
14 ## Installation
15
16 Disclaimer: this project is still in development, this is work in
17 progress. Please report and improve this documentation if you encounter issues.
18
19 ### Build Core Code
20
21 #### Docker
22
23 ``` sh
24 curl -sSL https://gitlab.iscpif.fr/gargantext/haskell-gargantext/raw/master/devops/docker/docker-install | sh
25 ```
26
27 #### Debian
28
29 ``` sh
30 curl -sSL https://gitlab.iscpif.fr/gargantext/haskell-gargantext/raw/master/devops/debian/install | sh
31 ```
32
33 ### Add dependencies
34
35 1. CoreNLP is needed (EN and FR); This dependency will not be needed soon.
36
37 ``` sh
38 ./devops/install-corenlp
39 ```
40
41 2. Louvain C++ needed to draw the socio-semantic graphs
42
43 NOTE: This is already added in the Docker build.
44
45 ``` sh
46 git clone https://gitlab.iscpif.fr/gargantext/clustering-louvain-cplusplus.git
47 cd clustering-louvain-cplusplus
48 ./install
49 ```
50
51 ### Initialization
52
53 #### Docker
54
55 Run PostgreSQL first:
56
57 ``` sh
58 cd devops/docker
59 docker-compose up
60 ```
61
62 Initialization schema should be loaded automatically (from `devops/postgres/schema.sql`).
63
64 #### Gargantext
65
66 ##### Fix the passwords
67
68 Change the passwords in gargantext.ini_toModify then move it:
69
70 ``` sh
71 mv gargantext.ini_toModify gargantext.ini
72 ```
73 (`.gitignore` avoids adding this file to the repository by mistake)
74
75
76 ##### Run Gargantext
77
78 Users have to be created first (`user1` is created as instance):
79
80 ``` sh
81 stack install
82 ~/.local/bin/gargantext-init "gargantext.ini"
83 ```
84
85 For Docker env, first create the appropriate image:
86
87 ``` sh
88 cd devops/docker
89 docker build -t fpco/stack-build:lts-14.27-garg .
90 ```
91
92 then run:
93
94 ``` sh
95 stack --docker run gargantext-init -- gargantext.ini
96 ```
97
98 ### Importing data
99
100 You can import some data with:
101 ``` sh
102 docker run --rm -it -p 9000:9000 cgenie/corenlp-garg
103 stack exec gargantext-import -- "corpusCsvHal" "user1" "IMT3" gargantext.ini 10000 ./1000.csv
104 ```
105
106 ### Nix
107
108 It is also possible to build everything with [Nix](https://nixos.org/) instead of Docker:
109 ``` sh
110 stack --nix build
111 stack --nix exec gargantext-import -- "corpusCsvHal" "user1" "IMT3" gargantext.ini 10000 ./1000.csv
112 stack --nix exec gargantext-server -- --ini gargantext.ini --run Prod
113 ```
114
115 ## Use Cases
116
117 ### Multi-User with Graphical User Interface (Server Mode)
118
119 ``` sh
120 ~/.local/bin/stack --docker exec gargantext-server -- --ini "gargantext.ini" --run Prod
121 ```
122
123 Then you can log in with `user1` / `1resu`.
124
125
126 ### Command Line Mode tools
127
128 #### Simple cooccurrences computation and indexation from a list of Ngrams
129
130 ``` sh
131 stack --docker exec gargantext-cli -- CorpusFromGarg.csv ListFromGarg.csv Ouput.json
132 ```
133
134 ### Analyzing the ngrams table repo
135
136 We store the repository in directory `repos` in the [CBOR](https://cbor.io/)
137 file format. To decode it to JSON and analyze, say, using
138 [jq](https://shapeshed.com/jq-json/), use the following command:
139
140 ``` sh
141 cat repos/repo.cbor.v5 | stack --nix exec gargantext-cbor2json | jq .
142 ```