/LIVRABLE_ABOUMADA

A tweet crisis classification and psychilogical tweets classification

Primary LanguageJupyter Notebook

Livrable STAGE

This directory contains the implementation of the easy_nlp pipeline applied to the field of crisis and psychology.

To use the pipeline, you have to install the package easy_nlp

$ git clone https://github.com/Moumeneb1/IRIT_INTERNSHIP.git
$ pip install IRIT_INTERNSHIP/
.
├── ...
├── Crisis
│   ├── Bert_Base.ipynb
│   ├── Flaubert_base.ipynb
│   ├── Camembert_base.ipynb
│   ├── Bert+features.ipynb
│   ├── Flaubert+Features.ipynb
│   ├── Flaubert_base_adapted.ipynb
│   ├── Bert_CrisisNLP.ipynb
│   ├── Flaubert_LSTM.ipynb
│   ├── Flaubert_CNN.ipynb
│   ├── Bert Multitask.ipynb
│   ├── Flaubert_Multitask.ipynb 
|   └── Flaubert_base+ Focal Loss.ipynb
├── Psycho
│   ├── Bert_Base.ipynb
│   ├── Flaubert_LSTM.ipynb
|   └── Flaubert_Multitask.ipynb
└── ...

EcologyCrisis

These results showcase some of the models used on the RANDOM-SAMPLING CONFIGURATION

Model Binary Three class Multiclass
Bert_base 0.824 0.742 0.586
Flaubert_base 0.841 0.765 0.617
Camembert_base 0.812 0.7427 0.5587
Flaubert+Features 0.834 0.834 0.613
Flaubert_base_adapted 0.853 0.767 0.654
Bert_CrisisNLP 0.822 0.742 0.591
Flaubert_LSTM.ipynb 0.848 0.7637 0.6713
Flaubert_CNN.ipynb 0.8515 0.7656 0.6654
Flaubert_Multitask.ipynb 0.847 0.769 0.625
Flaubert_base+ Focal Loss.ipynb 0.853 0.7804 0.66

Psycho

These results showcase the results of using these models on the psycho corpus

Model Binary Three class
Bert_base 0.7096 0.5610
Flaubert_LSTM 0.7836 0.6972
Flaubert_Multitask 0.7607 0.6972

You can find the adapted Language models weights on these links :

Notice : Adapted models are adapted Language models weights that can be used with any combination, You can train them using the LM_Training_script from the pipeline and saved them on a folder that you can reference after, for instance if you wanna use the flaubert_base_cased_psycho.

  1. Download the LM
  2. Unzip the folder
  3. Reference the folder when creating instantiating your model
>>> from transformers import AutoModel
>>> from easy_nlp.models import BasicBertForClassification,
>>> base_model = AutoModel.from_pretrained(#Path too your Folder)
>>> model = BasicBertForClassification(base_model,n_class)