Text Classification
Transformers
PyTorch
Safetensors
German
bert
easy-language
plain-language
leichte-sprache
einfache-sprache
text-complexity
text-embeddings-inference
Run this model with HF Jobs
Run krupper/text-complexity-classification on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/krupper/text-complexity-classification. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/krupper/text-complexity-classification on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use krupper/text-complexity-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use krupper/text-complexity-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="krupper/text-complexity-classification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("krupper/text-complexity-classification") model = AutoModelForSequenceClassification.from_pretrained("krupper/text-complexity-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Card for text-complexity-classification
The model classifies texts into the language complexity classes (German language):
- easy language / leichte Sprache
- simple language / einfache Sprache
- everyday language / Alltagssprache
- special language / Fachsprache
The underlying corpus was trained on the basis of over 300,000 texts of the mentioned language categories. Freely available websites served as sources. Thematic diversity was taken into account when selecting the sources.
- Developed by: Ruben Klepp
- Language(s) (NLP): de
- License: apache-2.0
- Parent Model: https://huggingface.co/deepset/gbert-base
Evaluation
- f1: 0.982
- Precision: 0.981
- Recall: 0.983
How to use
>>> from transformers import pipeline
>>> classifier = pipeline(model="krupper/text-complexity-classification")
>>> classifier("Bei Kleinkindern unter 2 Jahren liegen nur begrenzte Erfahrungen zur Pharmakokinetik vor.")
[{'label': 'special_language', 'score': 0.999923825263977}]
- Downloads last month
- 69