Downloads · 30 days
7
1% of all-time downloads
youssefadarrab/TP_NLP_SNLI_Adarrab_Baziz_Malige
TP_NLP_SNLI_Adarrab_Baziz_Malige is a text classification model from youssefadarrab. Use it when you need a label for a piece of text. It is set up for transformers.
(NLI) is a classical NLP (Natural Language Processing) problem that involves taking two sentences (the premise and the hypothesis ), and deciding how they are related (if the premise entails the hypothesis, contradict…
Downloads · 30 days
7
1% of all-time downloads
All-time downloads
550
Public
Repo size
536 MB
Likes
0
Public
Click a slice to open those files.
.bin268 MB · 100%
From the Hugging Face model README
(NLI) is a classical NLP (Natural Language Processing) problem that involves taking two sentences (the premise and the hypothesis ), and deciding how they are related (if the premise entails the hypothesis, contradicts it, or neither).
Ex:
| Premise | Label | Hypothesis |
|---|---|---|
| A man inspects the uniform of a figure in some East Asian country. | contradiction | The man is sleeping. |
| An older and younger man smiling. | neutral | Two men are smiling and laughing at the cats playing on the floor. |
| A soccer game with multiple males playing. | entailment | Some men are playing a sport. |
In this labwork, I propose to use the Stanford NLI (SNLI) corpus ( https://nlp.stanford.edu/projects/snli/ ), available in the Datasets library by Huggingface.
from datasets import load_dataset
snli = load_dataset("snli")
#Removing sentence pairs with no label (-1)
snli = snli.filter(lambda example: example['label'] != -1)
This is the model from : Youssef Adarrab, Othmane Baziz and Alain Malige