Introducing Hashformers — Word Segmentation with Transformers

less than 1 minute read

Published:

Introducing Hashformers — Word Segmentation with Transformers

Ever needed to split hashtags or concatenated text into words?

#weneedanationalpark → "we need a national park"

Hashformers uses transformer models and beam search to segment text without spaces. It works with any Hugging Face model and supports multiple languages out of the box.

✨ New: spaCy Pipeline Integration

Hashformers now integrates directly into your spaCy workflows.

📊 Why Hashformers?

Benchmarks show it can outperform both heuristic-based methods and comparable-scale LLM prompting on word segmentation tasks.

📦 pip install hashformers[spacy]

🔗 GitHub: github.com/ruanchaves/hashformers
📓 Try it on Google Colab: colab.research.google.com/github/ruanchaves/hashformers/blob/…

Recognized as state-of-the-art for hashtag segmentation at LREC 2022 🏆

Code: adding the hashformers component to a spaCy pipeline and segmenting #icecold into 'ice cold'.

Originally posted on LinkedIn.