Views
No views yet
| Text Classification Tag | Text Classification Label | Description |
|---|---|---|
| 0 | NON_DEF_SENTENCE | Text equals a non-definitional sentence |
| 1 | DEF_SENTENCE | Text equals a definitional sentence |
from transformers import pipeline
pipe = pipeline("text-classification", model="samirmsallem/G-SciEdBERT-definition_classification")
results = pipe(['Natural Language Processing ist ein Verfahren der künstlichen Intelligenz.',
'Rosen sind rot, Veilchen sind blau.'])
print(results)
# [{'label': 'DEF_SENTENCE', 'score': 0.9990215301513672}, {'label': 'NON_DEF_SENTENCE', 'score': 0.9968277812004089}]