-
Training data: French newspapers and Wikiconflit comments, automatically annotated in connectives
-
Special tokens: Connectives are wrapped between [MARKER] and [/MARKER] tokens in the training data. These tags signal to the model which word it should focus its attention on for the relation mapping.
-
Context Window: The special tokens must appear within the first 256 tokens of the input. Because these signals are the anchor for the classification, ensuring they are not truncated is crucial for accurate predictions.
-
Predictions: Relex predicts among 19 discourse relations (SDRT) .
-
Example:
-
Input: [MARKER] Peu avant de [/MARKER] mourir, Mio a promis à son mari qu'elle reviendrait à la saison des pluies.
-
Prediction: Narration
1from transformers import pipeline
2
3pipe = pipeline("text-classification", model="FatouSow/Relex")
4
5text ="[MARKER] Peu avant de [/MARKER] mourir, Mio a promis à son mari qu'elle reviendrait à la saison des pluies."
6
7result = pipe(text)
8print(result)