Views
No views yet
1from transformers import pipeline
2
3texts = [
4 'WTH Riesige giftige Flugspinnen mit 4-Zoll-Beinen auf dem Weg in die Gegend von New York, während sie sich über die Ostküste ausbreiten. Zuerst kamen die gefleckten Laternenfliegen, dann die Zikaden und jetzt die Spinnen. Der Nordosten der USA bereitet sich auf eine Invasion riesiger giftiger Spinnen vor, deren Beine nur einen halben Zoll lang sind und mit dem Fallschirm durch die Luft fliegen können. cbsnews.com/news/joro-spid…',
5 'Es ist Ihnen halt nicht genug was zerstört wurde, Ermittlungen eingestellt und dann kommt die nächste Katastrophe... Wer hier an Zufälle glaubt hat nichts verstanden... <URL>',
6 'IMPFUNG MACHT FREI!!! Schickt das Video an alle eure Kontakte! Abonniert bitte unseren Kanal: <URL> Folgt unserem Chat: <URL> Verbreitet unsere Inhalte und Wissen für den Frieden',
7]
8checkpoint = "Sami92/XLM-R-Large-ClaimDetection"
9tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512}
10claimdetection = pipeline("text-classification", model = checkpoint, tokenizer =checkpoint, **tokenizer_kwargs, device="cuda")
11claimdetection(texts)
12
13>>>
14[{'label': 'factual', 'score': 0.9999344348907471},
15 {'label': 'non-factual', 'score': 0.9990422129631042},
16 {'label': 'non-factual', 'score': 0.9990965127944946}]| precision | recall | f1-score | support | |
|---|---|---|---|---|
| factual | 0.88 | 0.92 | 0.90 | 71 |
| non-factual | 0.92 | 0.88 | 0.90 | 78 |
| accuracy | 0.90 | 149 | ||
| macro avg | 0.90 | 0.90 | 0.90 | 149 |
| weighted avg | 0.90 | 0.90 | 0.90 | 149 |
1@misc{wilms_annotation_2021,
2 title = {Annotation {Guidelines} for {GermEval} 2021 {Shared} {Task} on the {Identification} of {Toxic}, {Engaging}, and {Fact}-{Claiming} {Comments}. {Excerpt} of an unpublished codebook of the {DEDIS} research group at {Heinrich}-{Heine}-{University} {Düsseldorf} (full version available on request)},
3 author = {Wilms, L. and Heinbach, D. and Ziegele, M.},
4 year = {2021},
5}1@inproceedings{risch_overview_2021,
2 address = {Duesseldorf, Germany},
3 title = {Overview of the {GermEval} 2021 {Shared} {Task} on the {Identification} of {Toxic}, {Engaging}, and {Fact}-{Claiming} {Comments}},
4 url = {https://aclanthology.org/2021.germeval-1.1},
5 booktitle = {Proceedings of the {GermEval} 2021 {Shared} {Task} on the {Identification} of {Toxic}, {Engaging}, and {Fact}-{Claiming} {Comments}},
6 publisher = {Association for Computational Linguistics},
7 author = {Risch, Julian and Stoll, Anke and Wilms, Lena and Wiegand, Michael},
8 year = {2021},
9}