]> Git — Sourcephile - gargantext.git/blob - README.md
Merge branch 'dev-phylo' of ssh://gitlab.iscpif.fr:20022/gargantext/haskell-gargantex...
[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/dev/devops/docker/docker-install | sh
25 ```
26
27 #### Debian
28
29 ``` sh
30 curl -sSL https://gitlab.iscpif.fr/gargantext/haskell-gargantext/raw/dev/devops/debian/install | sh
31 ```
32
33 #### Ubuntu
34
35 ``` sh
36 curl -sSL https://gitlab.iscpif.fr/gargantext/haskell-gargantext/raw/dev/devops/ubuntu/install | sh
37 ```
38
39 ### Add dependencies
40
41 1. CoreNLP is needed (EN and FR); This dependency will not be needed soon.
42
43 ``` sh
44 ./devops/install-corenlp
45 ```
46
47 2. Louvain C++ needed to draw the socio-semantic graphs
48
49 NOTE: This is already added in the Docker build.
50
51 ``` sh
52 git clone https://gitlab.iscpif.fr/gargantext/clustering-louvain-cplusplus.git
53 cd clustering-louvain-cplusplus
54 ./install
55 ```
56
57 ### Initialization
58
59 #### Docker
60
61 Run PostgreSQL first:
62
63 ``` sh
64 cd devops/docker
65 docker-compose up
66 ```
67
68 Initialization schema should be loaded automatically (from `devops/postgres/schema.sql`).
69
70 #### Gargantext
71
72 ##### Fix the passwords
73
74 Change the passwords in gargantext.ini_toModify then move it:
75
76 ``` sh
77 mv gargantext.ini_toModify gargantext.ini
78 ```
79 (`.gitignore` avoids adding this file to the repository by mistake)
80
81
82 ##### Run Gargantext
83
84 Users have to be created first (`user1` is created as instance):
85
86 ``` sh
87 stack install
88 ~/.local/bin/gargantext-init "gargantext.ini"
89 ```
90
91 For Docker env, first create the appropriate image:
92
93 ``` sh
94 cd devops/docker
95 docker build -t fpco/stack-build:lts-14.27-garg .
96 ```
97
98 then run:
99
100 ``` sh
101 stack --docker run gargantext-init -- gargantext.ini
102 ```
103
104 ### Importing data
105
106 You can import some data with:
107 ``` sh
108 docker run --rm -it -p 9000:9000 cgenie/corenlp-garg
109 stack exec gargantext-import -- "corpusCsvHal" "user1" "IMT3" gargantext.ini 10000 ./1000.csv
110 ```
111
112 ### Nix
113
114 It is also possible to build everything with [Nix](https://nixos.org/) instead of Docker:
115 ``` sh
116 stack --nix build
117 stack --nix exec gargantext-import -- "corpusCsvHal" "user1" "IMT3" gargantext.ini 10000 ./1000.csv
118 stack --nix exec gargantext-server -- --ini gargantext.ini --run Prod
119 ```
120
121 ## Use Cases
122
123 ### Multi-User with Graphical User Interface (Server Mode)
124
125 ``` sh
126 ~/.local/bin/stack --docker exec gargantext-server -- --ini "gargantext.ini" --run Prod
127 ```
128
129 Then you can log in with `user1` / `1resu`.
130
131
132 ### Command Line Mode tools
133
134 #### Simple cooccurrences computation and indexation from a list of Ngrams
135
136 ``` sh
137 stack --docker exec gargantext-cli -- CorpusFromGarg.csv ListFromGarg.csv Ouput.json
138 ```
139
140 ### Analyzing the ngrams table repo
141
142 We store the repository in directory `repos` in the [CBOR](https://cbor.io/)
143 file format. To decode it to JSON and analyze, say, using
144 [jq](https://shapeshed.com/jq-json/), use the following command:
145
146 ``` sh
147 cat repos/repo.cbor.v5 | stack --nix exec gargantext-cbor2json | jq .
148 ```