Views
No views yet
oliverguhr/fullstop-punctuation-multilingual-base (XLM-RoBERTa token-classification,
~0.3 B) converted to CoreML (fp16) for on-device punctuation restoration —
downloaded on first use and run locally through CoreML + swift-transformers.. , ? - :) but can never reword the
input. Capitalization is handled separately (a heuristic restorer is typically chained
after it).id2label)| id | label | meaning |
|---|---|---|
| 0 | "" | no punctuation |
| 1 | . | period |
| 2 | , | comma |
| 3 | ? | question mark |
| 4 | - | dash |
| 5 | : | colon |
| File | Purpose |
|---|---|
Fullstop.mlpackage/ | CoreML model bundle (compile before load) |
tokenizer.json | XLM-R Unigram tokenizer (HuggingFace tokenizers) |
tokenizer_config.json | tokenizer config |
special_tokens_map.json | XLM-R special tokens (<s>, </s>, <pad>, <unk>, <mask>) |
config.json | model config incl. id2label / label2id |
1// 1. Snapshot the repo (swift-transformers Hub):
2// Hub.snapshot(from: Repo(id: "gregbarbosa/fullstop-coreml")) -> localDir
3// 2. Compile + load the CoreML model, build the tokenizer from the same folder:
4let compiled = try await MLModel.compileModel(at: localDir.appendingPathComponent("Fullstop.mlpackage"))
5let model = try MLModel(contentsOf: compiled)
6let tokenizer = try await AutoTokenizer.from(modelFolder: localDir)input_ids (shape [1, seq], natural length — no padding)
and attention_mask; the output logits are [1, seq, 6] → argmax per token yields the
label id above. Attach each word's punctuation from the label on its final subword
(token boundaries marked by the XLM-R ▁ U+2581 prefix); skip special tokens.oliverguhr/fullstop-punctuation-multilingual-base (MIT)restore-bench (standalone repo).1@article{guhr-EtAl:2021:fullstop,
2 title={FullStop: Multilingual Deep Models for Punctuation Prediction},
3 author={Guhr, Oliver and Schumann, Anne-Kathrin and Bahrmann, Frank and B{\"o}hme, Hans Joachim},
4 booktitle={Proceedings of the Swiss Text Analytics Conference 2021},
5 month={June},
6 year={2021},
7 address={Winterthur, Switzerland},
8 publisher={CEUR Workshop Proceedings},
9 url={http://ceur-ws.org/Vol-2957/sepp_paper4.pdf}
10}