youssefadarrab commited on
Commit
a32b7f2
1 Parent(s): 9ddbd50

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -3
README.md CHANGED
@@ -1,3 +1,32 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CentraleSupelec - Natural language processing
2
+ # Practical session n°7
3
+
4
+ ## Natural Language Inferencing (NLI):
5
+
6
+ (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*).
7
+
8
+ Ex:
9
+
10
+
11
+ | Premise | Label | Hypothesis |
12
+ | --- | --- | --- |
13
+ | A man inspects the uniform of a figure in some East Asian country. | contradiction | The man is sleeping. |
14
+ | An older and younger man smiling. | neutral | Two men are smiling and laughing at the cats playing on the floor. |
15
+ | A soccer game with multiple males playing. | entailment | Some men are playing a sport. |
16
+
17
+ ### Stanford NLI (SNLI) corpus
18
+
19
+ 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.
20
+
21
+ from datasets import load_dataset
22
+ snli = load_dataset("snli")
23
+ #Removing sentence pairs with no label (-1)
24
+ snli = snli.filter(lambda example: example['label'] != -1)
25
+
26
+ ## Quick summary of the model
27
+
28
+ This is the model from : Youssef Adarrab, Othmane Baziz and Alain Malige
29
+
30
+ - Fist we import the corpus and do some visualization
31
+ - Second we apply DistilBert for sequence classification
32
+ - We illustrate through our work the code used for training, to obtain better results, one should run the training on more epochs