The "Modal Verbs Modality Detector" project aims to build a machine learning model that detects and classifies the different modalities of the French verbs (this repo contains a test conducted on the French verb 'pouvoir'). The project leverages data augmentation, cross-validation, and other techniques to ensure the model's robustness and accuracy. Model avaiable at : https://huggingface.co/DiegoRossini/flaubert-pouvoir-modality-detector
- Python 3.6+
- Libraries:
pandas,numpy,glob,spacy,gensim,sklearn,transformers,datasets - Pre-trained HuggingFace model and tokenizer
- Pre-trained Word2Vec model for French word embeddings
To have the model trained, the following scripts have been called in order:
- dataset_creation: This phase involves loading and preparing the annotated data, specifically for the verb "pouvoir".
- augmentation: Data augmentation is performed to ensure balanced class distribution by replacing verbs with their synonyms.
- train_eval: The final phase involves splitting the data into training, evaluation, and test sets, performing cross-validation, training the model, and evaluating its performance.
To test the detector:
- Load the dataset.
- Perform data augmentation if necessary.
- Split the data into train, test, and evaluation sets.
- Execute cross-validation.
- Evaluate the model.
- Diego Rossini
- Anna Colli
You can read the article detailing the methodology, data, and training process of the "Modal Verbs Modality Detector" in this repository under the name COLLI_ROSSINI_BATTISTELLI.
Note: This project specifically focuses on the French verb "pouvoir", and the resulting model will only work for detecting and classifying the modalities of "pouvoir".
Feel free to contribute to this project by opening issues or submitting pull requests.