Skip to content
Snippets Groups Projects

mapaie

Getting started

Rappel : Creating a virtual environment

pip install virtualenv
virtualenv venv

Rappel : Creating a SSH key for GIT

  1. Création de la clé SSH
ssh-keygen -t ed25519 -C "MS IA <prenom.nom> GITLAB_Telecom-Paris" -f GITLAB_ENST_SSHKey
  1. Dépôt sur le GITLAB

  2. Test de la connexion

ssh -i ..\..\..\GITLAB_ENST_SSHKey -T git@gitlab.enst.fr

Getting project environment

  1. Create virtual Python environment
virtualenv venv
source venv/bin/activate

# on Windows
.\venv\Scripts\activate
  1. Clone the repository
git clone <URL>
  1. Configuring GIT
cd mapaie
git config --local user.name "Prénom Nom"
git config --local user.email "prenom.nom@telecom-paris.fr"
git config --local core.sshCommand "ssh -i C:\\<Path_to_SSHey>\\GITLAB_ENST_SSHKey"
  • --local pour une configuration local d'un dépôt GIT (mapaie/.git/config)
  • --global pour une configuration user de GIT ($HOME/.config/git/config)
  • --system pour une configuration PC de GIT (<Path_to_GIT>/etc/gitconfig)
  1. Install all requirement
python -m pip install -r mapaie\requirements.txt
python -m nltk.downloader stopwords
python -m nltk.downloader punkt_tab
  1. Installation des dépendances externes (voir la doc sur python-magic)
  • Windows & Mac
python -m pip install python-magic-bin
  • Linux (Debian/Ubuntu)
sudo apt-get install libmagic1

Using

Snakemake should be installed on the side.

You can then run snakemake -c4 to download PDF files and extract their contents. PDF files are stored in ./pdfs, and textual contents in ./txts/.

Manually

Dans l'ordre :

python dl_docs.py
python parse_docs.py
python preproccess.py
python create_corpus_before_lang.py
python create_corpus.py -t themes.json -d data/preprocessed/ -m iramuteq
python create_corpus.py -t themes.json -d data/preprocessed/ -m cortext