Edit model card

Swiss German Part-of-Speech Tagging Model

The swiss_german_pos_model is a part-of-speech tagging model for Swiss German. The model is trained on Universal POS tags (upos).

Training procedure and data sets

  1. Base model: German LM: dbmdz/bert-base-german-cased
  2. Continued LM training with swisscrawl data
  3. Task fine-tuning on the UD_German-HDT data set with character-level noise
  4. Task fine-tuning on the Swiss German NOAH-Corpus (train + dev split)
  • Accuracy on Swiss German NOAH test split: 0.9587
  • Accuracy on German UD_German-HDT test set after GSW fine-tuning: 0.9553 (vs. 0.9814 at step 3 before GSW fine-tuning)


from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline

model = AutoModelForTokenClassification.from_pretrained("noeminaepli/swiss_german_pos_model")
tokenizer = AutoTokenizer.from_pretrained("noeminaepli/swiss_german_pos_model")

pos_tagger = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
tokens = pos_tagger("Worum söu mes ned chönne?")


[{'entity_group': 'ADV',
  'score': 0.9627313,
  'word': 'Worum',
  'start': 0,
  'end': 5},
 {'entity_group': 'VERB',
  'score': 0.98772717,
  'word': 'söu',
  'start': 6,
  'end': 9},
 {'entity_group': 'PRON',
  'score': 0.99970305,
  'word': 'mes',
  'start': 10,
  'end': 13},
 {'entity_group': 'PART',
  'score': 0.9999368,
  'word': 'ned',
  'start': 14,
  'end': 17},
 {'entity_group': 'VERB',
  'score': 0.99841064,
  'word': 'chönne',
  'start': 18,
  'end': 24},
 {'entity_group': 'PUNCT',
  'score': 0.9999957,
  'word': '?',
  'start': 24,
  'end': 25}]

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 1
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 5.0

Framework versions

  • Transformers 4.25.0.dev0
  • Pytorch 1.13.1
  • Datasets 2.8.0
  • Tokenizers 0.13.2


    title = "Improving Zero-Shot Cross-lingual Transfer Between Closely Related Languages by Injecting Character-Level Noise",
    author = {Aepli, No{\"e}mi  and
      Sennrich, Rico},
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2022",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-acl.321",
    doi = "10.18653/v1/2022.findings-acl.321",
    pages = "4074--4083",
    abstract = "Cross-lingual transfer between a high-resource language and its dialects or closely related language varieties should be facilitated by their similarity. However, current approaches that operate in the embedding space do not take surface similarity into account. This work presents a simple yet effective strategy to improve cross-lingual transfer between closely related varieties. We propose to augment the data of the high-resource source language with character-level noise to make the model more robust towards spelling variations. Our strategy shows consistent improvements over several languages and tasks: Zero-shot transfer of POS tagging and topic identification between language varieties from the Finnic, West and North Germanic, and Western Romance language branches. Our work provides evidence for the usefulness of simple surface-level noise in improving transfer between language varieties.",
Downloads last month
Hosted inference API
This model can be loaded on the Inference API on-demand.