File size: 5,619 Bytes
a94e45c 80dbde5 a94e45c 80dbde5 a94e45c 80dbde5 a94e45c 80dbde5 a94e45c 80dbde5 c969ff2 80dbde5 a94e45c 80dbde5 a94e45c c969ff2 a94e45c 80dbde5 a94e45c 2b59f36 a94e45c 2b780d5 80dbde5 a94e45c 80dbde5 a94e45c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
---
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: 03771 290230 oder 03771 2534030
- text: >-
Seit Jahresbeginn konnten wieder etliche Praxisbeispiele aus den hessischen
Regionen für die OloV - Website aufbereitet oder mit aktuellen Entwicklungen
ergänzt werden.
- text: 在 Greding 出 口 离 开 A9 高 速 公 路 。
- text: 'Vortrag : SIMCP WORKSHOP, online ( eingeladen ) ; 16. 11.'
- text: >-
Nicht nur bei Fragen zur von Smart CROSSBLADE Dachboxen hilft unser neu
gestalteter weiter.
pipeline_tag: text-classification
library_name: setfit
inference: false
license: mit
datasets:
- mbley/german-webtext-quality-classification-dataset
language:
- de
base_model:
- distilbert/distilbert-base-multilingual-cased
---
# Bootstrapping a Sentence-Level Corpus Quality Classifier for Web Text using Active Learning (RANLP25)
A multi-label sentence classifier trained with Active Learning for predicting high- or low-qality labels of german webtext.
Training and evaluation code: <https://github.com/maximilian-bley/german-webtext-quality-classification>
## Model Details
**Labels**
- **0=Sentence Boundary:** Sentence boundary errors occur if the start or ending of a sentence is malformed. This is the case if it begins with a lower case letter or an atypical character, or lacks a proper terminal punctuation mark (e.g., period, exclamation mark, or question mark).
- **1=Grammar Mistake:** Grammar mistakes are any grammatical errors such as incorrect articles, cases, word order and incorrect use or absence of words. Moreover, random-looking sequences of words, usually series of nouns, should be tagged. In most cases where this label is applicable, the sentence' comprehensibility or message is impaired.
- **2=Spelling Anomaly:** A spelling anomaly is tagged when a word does not correspond to German spelling. This includes typos and incorrect capitalization (e.g. “all caps” or lower-case nouns). Spelling anomalies are irregularities that occur within the word boundary, meaning here text between two whitespaces. In particular, individual letters or nonsensical word fragments are also tagged.
- **3=Punctuation Error:** Punctuation errors are tagged if a punctuation symbol has been placed incorrectly or is missing in the intended place. This includes comma errors, missing quotation marks or parentheses, periods instead of question marks or incorrect or missing dashes or hyphens.
- **4=Non-linguistic Content:** Non-linguistic content includes all types of encoding errors, language-atypical occurrences of numbers and characters (e.g. random sequences of characters or letters), code (remnants), URLs, hashtags and emoticons.
- **5=Letter Spacing:** Letter spacings are deliberately inserted spaces between the characters of a word.
- **6=Clean:** Assigned if none of the other labels apply.
**Results**
```
F1-Measures: f1, macro, micro, sample
[0.96 0.86 0.57 0.62 0.77 0.94 0.86] 0.8 0.84 0.81
Precison: P, macro, micro, sample
[0.95 0.85 0.74 0.68 0.8 1. 0.83] 0.83 0.85 0.82
Recall: R, macro, micro, sample
[0.98 0.87 0.47 0.56 0.75 0.88 0.89] 0.77 0.82 0.82
Subset-Acc: 0.67
```
### Model Description
- **Model Type:** SetFit
<!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
- **Classification head:** a [SetFitHead](huggingface.co/docs/setfit/reference/main#setfit.SetFitHead) instance
- **Maximum Sequence Length:** 512 tokens
**Number of Classes:** 7
**Language:** German
### Model Sources
- **Repository:**
- **Paper:**
## Uses
### Direct Use for Inference
First install the SetFit library:
```bash
pip install setfit
```
Then you can load this model and run inference.
```python
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("在 Greding 出 口 离 开 A9 高 速 公 路 。")
```
## Training Details
### Training Hyperparameters
- batch_size: (8, 8)
- num_epochs: (1, 16)
- max_steps: -1
- sampling_strategy: oversampling
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CoSENTLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: True
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- max_length: 512
- seed: 13579
- eval_max_steps: -1
- load_best_model_at_end: False
### Framework Versions
- Python: 3.10.4
- SetFit: 1.1.2
- Sentence Transformers: 4.1.0
- Transformers: 4.52.3
- PyTorch: 2.7.0+cu126
- Datasets: 3.6.0
- Tokenizers: 0.21.1
## Citation
### BibTeX
```bibtex
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
--> |